source: NonGTP/Boost/boost/wave/cpplexer/re2clex/scanner.hpp @ 857

Revision 857, 2.7 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1/*=============================================================================
2    Boost.Wave: A Standard compliant C++ preprocessor library
3
4    http://www.boost.org/
5   
6    Copyright (c) 2001 Daniel C. Nuffer.
7    Copyright (c) 2001-2005 Hartmut Kaiser.
8    Distributed under the Boost Software License, Version 1.0. (See accompanying
9    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10=============================================================================*/
11
12#if !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED)
13#define SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED
14
15#include <boost/wave/cpplexer/re2clex/aq.hpp>
16
17///////////////////////////////////////////////////////////////////////////////
18namespace boost {
19namespace wave {
20namespace cpplexer {
21namespace re2clex {
22
23struct Scanner;
24typedef unsigned char uchar;
25typedef int (* ReportErrorProc)(struct Scanner const *, char const *, ...);
26
27typedef struct Scanner {
28    int    fd;  /* file descriptor */
29    uchar* first;   /* start of input buffer (if fd == -1) */
30    uchar* act;     /* act position of input buffer (if fd == -1) */
31    uchar* last;    /* end (one past last char) of input buffer (if fd == -1) */
32    uchar* bot; /* beginning of the current buffer */
33    uchar* top; /* top of the current buffer */
34    uchar* eof; /* when we read in the last buffer, will point 1 past the
35                   end of the file, otherwise 0 */
36    uchar* tok; /* points to the beginning of the current token */
37    uchar* ptr; /* used for YYMARKER - saves backtracking info */
38    uchar* cur; /* saves the cursor (maybe is redundant with tok?) */
39    uchar* lim; /* used for YYLIMIT - points to the end of the buffer */
40                /* (lim == top) except for the last buffer, it points to
41                   the end of the input (lim == eof - 1) */
42    unsigned int line;    /* current line being lexed */
43    unsigned int column;        /* current token start column position */
44    unsigned int curr_column;   /* current column position */
45    ReportErrorProc error_proc;     /* if != 0 this function is called to
46                report an error */
47    char const *file_name;  /* name of the lexed file */
48    aq_queue eol_offsets;
49    int enable_ms_extensions;   /* enable MS extensions */
50    int act_in_c99_mode;        /* lexer works in C99 mode */
51    int act_in_cpp0x_mode;      /* lexer works in C++0x mode */
52} Scanner;
53
54///////////////////////////////////////////////////////////////////////////////
55}   // namespace re2clex
56}   // namespace cpplexer
57}   // namespace wave
58}   // namespace boost
59
60#endif // !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED)
Note: See TracBrowser for help on using the repository browser.