#include <FlexLexer.hpp>
Inheritance diagram for FlexLexer:
Public Member Functions | |
virtual | ~FlexLexer () |
const char * | YYText () |
int | YYLeng () |
virtual void | yy_switch_to_buffer (struct yy_buffer_state *new_buffer)=0 |
virtual struct yy_buffer_state * | yy_create_buffer (istream *s, int size)=0 |
virtual void | yy_delete_buffer (struct yy_buffer_state *b)=0 |
virtual void | yyrestart (istream *s)=0 |
virtual int | yylex ()=0 |
int | yylex (istream *new_in, ostream *new_out=0) |
virtual void | switch_streams (istream *new_in=0, ostream *new_out=0)=0 |
int | lineno () const |
int | debug () const |
void | set_debug (int flag) |
Protected Attributes | |
char * | yytext |
int | yyleng |
int | yylineno |
int | yy_flex_debug |
Vanris Subject: Modification of FlexLexer.h
Date: Thu, 17 Jan 2002 14:35:26 -0600
I modified FlexLexer.h a bit.
To prevent a compiler warning (complaining that yylex() was hiding this function) I added in class yyFlexLexer the following:
int yylex( istream* new_in, ostream* new_out = 0 ) { return FlexLexer::yylex(new_in, new_out); }
Also in the class yyFlexLexer I added a protected method:
Function that can be used by subclasses during yylex() virtual int actionHook(void* data = 0) { return data == 0; }
I override this function in a subclass of yyFlexLexer and I use it in the lex file to call my subclass. Any data I have to save (e.g. character count) I can now keep in my own subclass as memberfields instead of global variables in the lex file.
I attached the FlexLexer.h file.
I don't know whether Flex is still maintained since the last tarfile is from July 27th 1997, but I thought I at least pass it on.
Frank Vanris.
Sept 2003: changes by stephan@s11n.net
Oct 2004: changed by stephan@s11n.net
Definition at line 111 of file FlexLexer.hpp.
|
Definition at line 113 of file FlexLexer.hpp. |
|
Definition at line 141 of file FlexLexer.hpp. References yy_flex_debug. |
|
Definition at line 139 of file FlexLexer.hpp. References yylineno. |
|
Definition at line 142 of file FlexLexer.hpp. References yy_flex_debug. |
|
Implemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. Referenced by yylex(). |
|
Implemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. |
|
Implemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. |
|
Implemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. |
|
Definition at line 116 of file FlexLexer.hpp. References yyleng. |
|
Reimplemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. Definition at line 128 of file FlexLexer.hpp. References switch_streams(), and yylex(). |
|
|
Implemented in compact_data_nodeFlexLexer, funtxt_data_nodeFlexLexer, funxml_data_nodeFlexLexer, parens_data_nodeFlexLexer, simplexml_data_nodeFlexLexer, and wesnoth_data_nodeFlexLexer. |
|
Definition at line 115 of file FlexLexer.hpp. References yytext. |
|
Definition at line 148 of file FlexLexer.hpp. Referenced by debug(), and set_debug(). |
|
Definition at line 146 of file FlexLexer.hpp. Referenced by YYLeng(). |
|
Definition at line 147 of file FlexLexer.hpp. Referenced by lineno(). |
|
Definition at line 145 of file FlexLexer.hpp. Referenced by YYText(). |