File indexing completed on 2025-01-18 10:03:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #ifndef __FLEX_LEXER_H
0048
0049 #define __FLEX_LEXER_H
0050
0051 #include <iostream>
0052
0053 extern "C++" {
0054
0055 struct yy_buffer_state;
0056 typedef int yy_state_type;
0057
0058 class FlexLexer
0059 {
0060 public:
0061 virtual ~FlexLexer() { }
0062
0063 const char* YYText() const { return yytext; }
0064 int YYLeng() const { return yyleng; }
0065
0066 virtual void
0067 yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0;
0068 virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0;
0069 virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0;
0070 virtual void yy_delete_buffer( yy_buffer_state* b ) = 0;
0071 virtual void yyrestart( std::istream* s ) = 0;
0072 virtual void yyrestart( std::istream& s ) = 0;
0073
0074 virtual int yylex() = 0;
0075
0076
0077 int yylex( std::istream& new_in, std::ostream& new_out )
0078 {
0079 switch_streams( new_in, new_out );
0080 return yylex();
0081 }
0082
0083 int yylex( std::istream* new_in, std::ostream* new_out = 0)
0084 {
0085 switch_streams( new_in, new_out );
0086 return yylex();
0087 }
0088
0089
0090
0091 virtual void switch_streams( std::istream* new_in,
0092 std::ostream* new_out ) = 0;
0093 virtual void switch_streams( std::istream& new_in,
0094 std::ostream& new_out ) = 0;
0095
0096 int lineno() const { return yylineno; }
0097
0098 int debug() const { return yy_flex_debug; }
0099 void set_debug( int flag ) { yy_flex_debug = flag; }
0100
0101 protected:
0102 char* yytext;
0103 int yyleng;
0104 int yylineno;
0105 int yy_flex_debug;
0106 };
0107
0108 }
0109 #endif
0110
0111 #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
0112
0113
0114
0115 # define yyFlexLexerOnce
0116
0117 extern "C++" {
0118
0119 class yyFlexLexer : public FlexLexer {
0120 public:
0121
0122
0123 yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout );
0124 yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
0125 private:
0126 void ctor_common();
0127
0128 public:
0129
0130 virtual ~yyFlexLexer();
0131
0132 void yy_switch_to_buffer( yy_buffer_state* new_buffer );
0133 yy_buffer_state* yy_create_buffer( std::istream* s, int size );
0134 yy_buffer_state* yy_create_buffer( std::istream& s, int size );
0135 void yy_delete_buffer( yy_buffer_state* b );
0136 void yyrestart( std::istream* s );
0137 void yyrestart( std::istream& s );
0138
0139 void yypush_buffer_state( yy_buffer_state* new_buffer );
0140 void yypop_buffer_state();
0141
0142 virtual int yylex();
0143 virtual void switch_streams( std::istream& new_in, std::ostream& new_out );
0144 virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 );
0145 virtual int yywrap();
0146
0147 protected:
0148 virtual int LexerInput( char* buf, int max_size );
0149 virtual void LexerOutput( const char* buf, int size );
0150 virtual void LexerError( const char* msg );
0151
0152 void yyunput( int c, char* buf_ptr );
0153 int yyinput();
0154
0155 void yy_load_buffer_state();
0156 void yy_init_buffer( yy_buffer_state* b, std::istream& s );
0157 void yy_flush_buffer( yy_buffer_state* b );
0158
0159 int yy_start_stack_ptr;
0160 int yy_start_stack_depth;
0161 int* yy_start_stack;
0162
0163 void yy_push_state( int new_state );
0164 void yy_pop_state();
0165 int yy_top_state();
0166
0167 yy_state_type yy_get_previous_state();
0168 yy_state_type yy_try_NUL_trans( yy_state_type current_state );
0169 int yy_get_next_buffer();
0170
0171 std::istream yyin;
0172 std::ostream yyout;
0173
0174
0175 char yy_hold_char;
0176
0177
0178 int yy_n_chars;
0179
0180
0181 char* yy_c_buf_p;
0182
0183 int yy_init;
0184 int yy_start;
0185
0186
0187
0188 int yy_did_buffer_switch_on_eof;
0189
0190
0191 size_t yy_buffer_stack_top;
0192 size_t yy_buffer_stack_max;
0193 yy_buffer_state ** yy_buffer_stack;
0194 void yyensure_buffer_stack(void);
0195
0196
0197
0198
0199 yy_state_type yy_last_accepting_state;
0200 char* yy_last_accepting_cpos;
0201
0202 yy_state_type* yy_state_buf;
0203 yy_state_type* yy_state_ptr;
0204
0205 char* yy_full_match;
0206 int* yy_full_state;
0207 int yy_full_lp;
0208
0209 int yy_lp;
0210 int yy_looking_for_trail_begin;
0211
0212 int yy_more_flag;
0213 int yy_more_len;
0214 int yy_more_offset;
0215 int yy_prev_more_offset;
0216 };
0217
0218 }
0219
0220 #endif