This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
class | _InternalFlexScannerBase |
Internally used common parts of scanner base classes. More... | |
struct | _InternalFlexScannerBase::Config |
Scanner base configuration. More... | |
struct | _InternalFlexScannerBase::LexerInput |
This is interally used instead of FILE* to feed the lexer. More... | |
struct | _InternalFlexScannerBase::TokenEntry |
Used to store a token (by token buffer). More... | |
struct | _InternalFlexScannerBase::XYPos |
Represents position in one file for this class, only. (C++-safe). More... | |
Defines | |
#define | _LIB_LEX_FLEXSCANNERBASE_H_ 1 |
In order to use this class, you need to stick to the following procedure.
// myscanner.h #include <lib/sconfig.h> #include <lib/lex/location.h> #include <lib/sourcepos/sparchive.h> #define PREFIX_FlexScannerBase BLAH_FlexScannerBase #include <lib/lex/scannerbase.h> #undef PREFIX_FlexScannerBase class MyScanner : public BLAH_FlexScannerBase // Note: prefix { friend int BLAH_lex(void *); // ... };
%{ #define YY_EXTRA_TYPE class MyScanner* // Include for the first time (FLEX_BOTTOM_PART not defined): #include "scannerbase.cc" %} %pointer %option 8bit %option reentrant %option reentrant %option stack %option prefix="BLAH_" %% ...rules... %% #define PREFIX_FlexScannerBase BLAH_FlexScannerBase #define PREFIX_lex BLAH_lex #define PREFIX_lex_init BLAH_lex_init #define PREFIX_lex_destroy BLAH_lex_destroy #define PREFIX_pop_buffer_state BLAH_pop_buffer_state #define PREFIX_push_buffer_state BLAH_push_buffer_state #define PREFIX_create_buffer BLAH__create_buffer #define PREFIX_switch_to_buffer BLAH__switch_to_buffer inline void PREFIX_set_extra(PREFIX_FlexScannerBase *arg,yyscan_t scanner) { yyset_extra((MyScanner*)arg,scanner); } // Include for the second time: #define FLEX_BOTTOM_PART #include "scannerbase.cc"
Definition in file scannerbase.h.
|
Definition at line 18 of file scannerbase.h. |