Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:47:49

0001 // consts.h
0002 // Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 #ifndef BOOST_SPIRIT_SUPPORT_DETAIL_LEXER_CONSTS_HPP
0007 #define BOOST_SPIRIT_SUPPORT_DETAIL_LEXER_CONSTS_HPP
0008 
0009 #include <boost/config.hpp>
0010 #include <boost/integer_traits.hpp>
0011 #include "size_t.hpp"
0012 
0013 namespace boost
0014 {
0015 namespace lexer
0016 {
0017     enum regex_flags {none = 0, icase = 1, dot_not_newline = 2};
0018     // 0 = end state, 1 = id, 2 = unique_id, 3 = lex state, 4 = bol, 5 = eol,
0019     // 6 = dead_state_index
0020     enum {end_state_index, id_index, unique_id_index, state_index, bol_index,
0021         eol_index, dead_state_index, dfa_offset};
0022 
0023     const std::size_t max_macro_len = 30;
0024     const std::size_t num_chars = 256;
0025     // If sizeof(wchar_t) == sizeof(size_t) then don't overflow to 0
0026     // by adding one to comparison.
0027     const std::size_t num_wchar_ts =
0028         (boost::integer_traits<wchar_t>::const_max < 0x110000) ?
0029         boost::integer_traits<wchar_t>::const_max +
0030         static_cast<std::size_t> (1) : 0x110000;
0031     const std::size_t null_token = static_cast<std::size_t> (~0);
0032     const std::size_t bol_token = static_cast<std::size_t> (~1);
0033     const std::size_t eol_token = static_cast<std::size_t> (~2);
0034     const std::size_t end_state = 1;
0035     const std::size_t npos = static_cast<std::size_t> (~0);
0036 }
0037 }
0038 
0039 #endif