47 #ifndef __FLEX_LEXER_H
49 #define __FLEX_LEXER_H
53 # define FLEX_STD std::
58 struct yy_buffer_state;
59 typedef int yy_state_type;
63 virtual ~FlexLexer() { }
65 const char* YYText()
const {
return yytext; }
66 int YYLeng()
const {
return yyleng; }
69 yy_switch_to_buffer(
struct yy_buffer_state* new_buffer ) = 0;
70 virtual struct yy_buffer_state*
71 yy_create_buffer( FLEX_STD istream* s,
int size ) = 0;
72 virtual void yy_delete_buffer(
struct yy_buffer_state* b ) = 0;
73 virtual void yyrestart( FLEX_STD istream* s ) = 0;
75 virtual int yylex() = 0;
78 int yylex( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 )
80 switch_streams( new_in, new_out );
86 virtual void switch_streams( FLEX_STD istream* new_in = 0,
87 FLEX_STD ostream* new_out = 0 ) = 0;
89 int lineno()
const {
return yylineno; }
91 int debug()
const {
return yy_flex_debug; }
92 void set_debug(
int flag ) { yy_flex_debug = flag; }
102 #endif // FLEXLEXER_H
104 #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
108 #define yyFlexLexerOnce
112 class yyFlexLexer :
public FlexLexer {
116 yyFlexLexer( FLEX_STD istream* arg_yyin = 0, FLEX_STD ostream* arg_yyout = 0 );
118 virtual ~yyFlexLexer();
120 void yy_switch_to_buffer(
struct yy_buffer_state* new_buffer );
121 struct yy_buffer_state* yy_create_buffer( FLEX_STD istream* s,
int size );
122 void yy_delete_buffer(
struct yy_buffer_state* b );
123 void yyrestart( FLEX_STD istream* s );
125 void yypush_buffer_state(
struct yy_buffer_state* new_buffer );
126 void yypop_buffer_state();
129 virtual void switch_streams( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 );
130 virtual int yywrap();
133 virtual int LexerInput(
char* buf,
int max_size );
134 virtual void LexerOutput(
const char* buf,
int size );
135 virtual void LexerError(
const char* msg );
137 void yyunput(
int c,
char* buf_ptr );
140 void yy_load_buffer_state();
141 void yy_init_buffer(
struct yy_buffer_state* b, FLEX_STD istream* s );
142 void yy_flush_buffer(
struct yy_buffer_state* b );
144 int yy_start_stack_ptr;
145 int yy_start_stack_depth;
148 void yy_push_state(
int new_state );
152 yy_state_type yy_get_previous_state();
153 yy_state_type yy_try_NUL_trans( yy_state_type current_state );
154 int yy_get_next_buffer();
156 FLEX_STD istream* yyin;
157 FLEX_STD ostream* yyout;
173 int yy_did_buffer_switch_on_eof;
176 size_t yy_buffer_stack_top;
177 size_t yy_buffer_stack_max;
178 struct yy_buffer_state ** yy_buffer_stack;
179 void yyensure_buffer_stack(
void);
184 yy_state_type yy_last_accepting_state;
185 char* yy_last_accepting_cpos;
187 yy_state_type* yy_state_buf;
188 yy_state_type* yy_state_ptr;
195 int yy_looking_for_trail_begin;
200 int yy_prev_more_offset;
205 #endif // yyFlexLexer || ! yyFlexLexerOnce