Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-25 09:44:09

0001 /*=============================================================================
0002     Boost.Wave: A Standard compliant C++ preprocessor library
0003 
0004     http://www.boost.org/
0005 
0006     Copyright (c) 2001 Daniel C. Nuffer.
0007     Copyright (c) 2001-2012 Hartmut Kaiser.
0008     Distributed under the Boost Software License, Version 1.0. (See accompanying
0009     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0010 =============================================================================*/
0011 
0012 #if !defined(BOOST_SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED)
0013 #define BOOST_SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED
0014 
0015 #include <boost/wave/wave_config.hpp>
0016 #include <boost/wave/cpplexer/re2clex/aq.hpp>
0017 
0018 // this must occur after all of the includes and before any code appears
0019 #ifdef BOOST_HAS_ABI_HEADERS
0020 #include BOOST_ABI_PREFIX
0021 #endif
0022 
0023 ///////////////////////////////////////////////////////////////////////////////
0024 namespace boost {
0025 namespace wave {
0026 namespace cpplexer {
0027 namespace re2clex {
0028 
0029 template<typename Iterator>
0030 struct Scanner;
0031 typedef unsigned char uchar;
0032 
0033 template<typename Iterator>
0034 struct Scanner {
0035     typedef int (* ReportErrorProc)(struct Scanner const *, int errorcode,
0036         char const *, ...);
0037 
0038 
0039     Scanner(Iterator const & f, Iterator const & l)
0040         : first(f), act(f), last(l),
0041           bot(0), top(0), eof(0), tok(0), ptr(0), cur(0), lim(0),
0042           eol_offsets(aq_create())
0043           // remaining data members externally initialized
0044     {}
0045 
0046     ~Scanner()
0047     {
0048         aq_terminate(eol_offsets);
0049     }
0050 
0051     Iterator first; /* start of input buffer */
0052     Iterator act;   /* act position of input buffer */
0053     Iterator last;  /* end (one past last char) of input buffer */
0054     uchar* bot;     /* beginning of the current buffer */
0055     uchar* top;     /* top of the current buffer */
0056     uchar* eof;     /* when we read in the last buffer, will point 1 past the
0057                        end of the file, otherwise 0 */
0058     uchar* tok;     /* points to the beginning of the current token */
0059     uchar* ptr;     /* used for YYMARKER - saves backtracking info */
0060     uchar* cur;     /* saves the cursor (maybe is redundant with tok?) */
0061     uchar* lim;     /* used for YYLIMIT - points to the end of the buffer */
0062                     /* (lim == top) except for the last buffer, it points to
0063                        the end of the input (lim == eof - 1) */
0064     std::size_t line;           /* current line being lex'ed */
0065     std::size_t column;         /* current token start column position */
0066     std::size_t curr_column;    /* current column position */
0067     ReportErrorProc error_proc; /* must be != 0, this function is called to
0068                                    report an error */
0069     char const *file_name;      /* name of the lex'ed file */
0070     aq_queue eol_offsets;
0071     bool enable_ms_extensions;   /* enable MS extensions */
0072     bool act_in_c99_mode;        /* lexer works in C99 mode */
0073     bool detect_pp_numbers;      /* lexer should prefer to detect pp-numbers */
0074     bool enable_import_keyword;  /* recognize import as a keyword */
0075     bool single_line_only;       /* don't report missing eol's in C++ comments */
0076     bool act_in_cpp0x_mode;      /* lexer works in C++11 mode */
0077     bool act_in_cpp2a_mode;      /* lexer works in C++20 mode */
0078 };
0079 
0080 ///////////////////////////////////////////////////////////////////////////////
0081 }   // namespace re2clex
0082 }   // namespace cpplexer
0083 }   // namespace wave
0084 }   // namespace boost
0085 
0086 // the suffix header occurs after all of the code
0087 #ifdef BOOST_HAS_ABI_HEADERS
0088 #include BOOST_ABI_SUFFIX
0089 #endif
0090 
0091 #endif // !defined(BOOST_SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED)