Chris@16: /*============================================================================= Chris@16: Boost.Wave: A Standard compliant C++ preprocessor library Chris@16: Chris@16: http://www.boost.org/ Chris@16: Chris@16: Copyright (c) 2001 Daniel C. Nuffer. Chris@16: Copyright (c) 2001-2012 Hartmut Kaiser. Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: =============================================================================*/ Chris@16: Chris@16: #if !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED) Chris@16: #define SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: // this must occur after all of the includes and before any code appears Chris@16: #ifdef BOOST_HAS_ABI_HEADERS Chris@16: #include BOOST_ABI_PREFIX Chris@16: #endif Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: namespace boost { Chris@16: namespace wave { Chris@16: namespace cpplexer { Chris@16: namespace re2clex { Chris@16: Chris@16: struct Scanner; Chris@16: typedef unsigned char uchar; Chris@16: typedef int (* ReportErrorProc)(struct Scanner const *, int errorcode, Chris@16: char const *, ...); Chris@16: Chris@16: typedef struct Scanner { Chris@16: uchar* first; /* start of input buffer */ Chris@16: uchar* act; /* act position of input buffer */ Chris@16: uchar* last; /* end (one past last char) of input buffer */ Chris@16: uchar* bot; /* beginning of the current buffer */ Chris@16: uchar* top; /* top of the current buffer */ Chris@16: uchar* eof; /* when we read in the last buffer, will point 1 past the Chris@16: end of the file, otherwise 0 */ Chris@16: uchar* tok; /* points to the beginning of the current token */ Chris@16: uchar* ptr; /* used for YYMARKER - saves backtracking info */ Chris@16: uchar* cur; /* saves the cursor (maybe is redundant with tok?) */ Chris@16: uchar* lim; /* used for YYLIMIT - points to the end of the buffer */ Chris@16: /* (lim == top) except for the last buffer, it points to Chris@16: the end of the input (lim == eof - 1) */ Chris@16: std::size_t line; /* current line being lex'ed */ Chris@16: std::size_t column; /* current token start column position */ Chris@16: std::size_t curr_column; /* current column position */ Chris@16: ReportErrorProc error_proc; /* must be != 0, this function is called to Chris@16: report an error */ Chris@16: char const *file_name; /* name of the lex'ed file */ Chris@16: aq_queue eol_offsets; Chris@16: bool enable_ms_extensions; /* enable MS extensions */ Chris@16: bool act_in_c99_mode; /* lexer works in C99 mode */ Chris@16: bool detect_pp_numbers; /* lexer should prefer to detect pp-numbers */ Chris@16: bool enable_import_keyword; /* recognize import as a keyword */ Chris@16: bool single_line_only; /* don't report missing eol's in C++ comments */ Chris@16: bool act_in_cpp0x_mode; /* lexer works in C++11 mode */ Chris@16: } Scanner; Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: } // namespace re2clex Chris@16: } // namespace cpplexer Chris@16: } // namespace wave Chris@16: } // namespace boost Chris@16: Chris@16: // the suffix header occurs after all of the code Chris@16: #ifdef BOOST_HAS_ABI_HEADERS Chris@16: #include BOOST_ABI_SUFFIX Chris@16: #endif Chris@16: Chris@16: #endif // !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED)