00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef __FLEX_LEXER_H
00045
00046 #define __FLEX_LEXER_H
00047 #include <iostream>
00048
00049 extern "C++" {
00050
00051 struct yy_buffer_state;
00052 typedef int yy_state_type;
00053
00054 class FlexLexer {
00055 public:
00056 virtual ~FlexLexer() { }
00057
00058 const char* YYText() { return yytext; }
00059 int YYLeng() { return yyleng; }
00060
00061 virtual void
00062 yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
00063 virtual struct yy_buffer_state*
00064 yy_create_buffer( std::istream* s, int size ) = 0;
00065 virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
00066 virtual void yyrestart( std::istream* s ) = 0;
00067
00068 virtual int yylex() = 0;
00069
00070
00071 int yylex( std::istream* new_in, std::ostream* new_out = 0 )
00072 {
00073 switch_streams( new_in, new_out );
00074 return yylex();
00075 }
00076
00077
00078
00079 virtual void switch_streams( std::istream* new_in = 0,
00080 std::ostream* new_out = 0 ) = 0;
00081
00082 int lineno() const { return yylineno; }
00083
00084 int debug() const { return yy_flex_debug; }
00085 void set_debug( int flag ) { yy_flex_debug = flag; }
00086
00087 protected:
00088 char* yytext;
00089 int yyleng;
00090 int yylineno;
00091 int yy_flex_debug;
00092 };
00093
00094 }
00095 #endif
00096
00097 #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
00098
00099
00100
00101 #define yyFlexLexerOnce
00102
00103 class yyFlexLexer : public FlexLexer {
00104 public:
00105
00106
00107 yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
00108
00109 virtual ~yyFlexLexer();
00110
00111 void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
00112 struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
00113 void yy_delete_buffer( struct yy_buffer_state* b );
00114 void yyrestart( std::istream* s );
00115
00116 virtual int yylex();
00117 virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
00118
00119 protected:
00120 virtual int LexerInput( char* buf, int max_size );
00121 virtual void LexerOutput( const char* buf, int size );
00122 virtual void LexerError( const char* msg );
00123
00124 void yyunput( int c, char* buf_ptr );
00125 int yyinput();
00126
00127 void yy_load_buffer_state();
00128 void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
00129 void yy_flush_buffer( struct yy_buffer_state* b );
00130
00131 int yy_start_stack_ptr;
00132 int yy_start_stack_depth;
00133 int* yy_start_stack;
00134
00135 void yy_push_state( int new_state );
00136 void yy_pop_state();
00137 int yy_top_state();
00138
00139 yy_state_type yy_get_previous_state();
00140 yy_state_type yy_try_NUL_trans( yy_state_type current_state );
00141 int yy_get_next_buffer();
00142
00143 std::istream* yyin;
00144 std::ostream* yyout;
00145
00146 struct yy_buffer_state* yy_current_buffer;
00147
00148
00149 char yy_hold_char;
00150
00151
00152 int yy_n_chars;
00153
00154
00155 char* yy_c_buf_p;
00156
00157 int yy_init;
00158 int yy_start;
00159
00160
00161
00162 int yy_did_buffer_switch_on_eof;
00163
00164
00165
00166
00167 yy_state_type yy_last_accepting_state;
00168 char* yy_last_accepting_cpos;
00169
00170 yy_state_type* yy_state_buf;
00171 yy_state_type* yy_state_ptr;
00172
00173 char* yy_full_match;
00174 int* yy_full_state;
00175 int yy_full_lp;
00176
00177 int yy_lp;
00178 int yy_looking_for_trail_begin;
00179
00180 int yy_more_flag;
00181 int yy_more_len;
00182 int yy_more_offset;
00183 int yy_prev_more_offset;
00184 };
00185
00186 #endif