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
00045
00046
00047 #ifndef __FLEX_LEXER_H
00048
00049 #define __FLEX_LEXER_H
00050
00051 #include <iostream>
00052 # ifndef FLEX_STD
00053 # define FLEX_STD std::
00054 # endif
00055
00056 extern "C++" {
00057
00058 struct yy_buffer_state;
00059 typedef int yy_state_type;
00060
00061 class FlexLexer {
00062 public:
00063 virtual ~FlexLexer() { }
00064
00065 const char* YYText() const { return yytext; }
00066 int YYLeng() const { return yyleng; }
00067
00068 virtual void
00069 yy_switch_to_buffer(struct yy_buffer_state* new_buffer) = 0;
00070 virtual struct yy_buffer_state*
00071 yy_create_buffer(FLEX_STD istream* s, int size) = 0;
00072 virtual void yy_delete_buffer(struct yy_buffer_state* b) = 0;
00073 virtual void yyrestart(FLEX_STD istream* s) = 0;
00074
00075 virtual int yylex() = 0;
00076
00077
00078 int yylex(FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0)
00079 {
00080 switch_streams(new_in, new_out);
00081 return yylex();
00082 }
00083
00084
00085
00086 virtual void switch_streams(FLEX_STD istream* new_in = 0,
00087 FLEX_STD ostream* new_out = 0) = 0;
00088
00089 int lineno() const { return yylineno; }
00090
00091 int debug() const { return yy_flex_debug; }
00092 void set_debug(int flag) { yy_flex_debug = flag; }
00093
00094 protected:
00095 char* yytext;
00096 int yyleng;
00097 int yylineno;
00098 int yy_flex_debug;
00099 };
00100
00101 }
00102 #endif // FLEXLEXER_H
00103
00104 #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
00105
00106
00107
00108 #define yyFlexLexerOnce
00109
00110 extern "C++" {
00111
00112 class yyFlexLexer : public FlexLexer
00113 {
00114 public:
00115
00116
00117 yyFlexLexer(FLEX_STD istream* arg_yyin = 0,
00118 FLEX_STD ostream* arg_yyout = 0);
00119
00120 virtual ~yyFlexLexer();
00121
00122 void yy_switch_to_buffer(struct yy_buffer_state* new_buffer);
00123 struct yy_buffer_state* yy_create_buffer(FLEX_STD istream* s, int size);
00124 void yy_delete_buffer(struct yy_buffer_state* b);
00125 void yyrestart(FLEX_STD istream* s);
00126
00127 void yypush_buffer_state(struct yy_buffer_state* new_buffer);
00128 void yypop_buffer_state();
00129
00130 virtual int yylex();
00131 virtual void switch_streams(FLEX_STD istream* new_in,
00132 FLEX_STD ostream* new_out);
00133
00134
00135
00136 virtual int yywrap();
00137
00138 protected:
00139 virtual int LexerInput(char* buf, int max_size);
00140 virtual void LexerOutput(const char* buf, int size);
00141 virtual void LexerError(const char* msg);
00142
00143 void yyunput(int c, char* buf_ptr);
00144 int yyinput();
00145
00146 void yy_load_buffer_state();
00147 void yy_init_buffer(struct yy_buffer_state* b, FLEX_STD istream* s);
00148 void yy_flush_buffer(struct yy_buffer_state* b);
00149
00150 int yy_start_stack_ptr;
00151 int yy_start_stack_depth;
00152 int* yy_start_stack;
00153
00154 void yy_push_state(int new_state);
00155 void yy_pop_state();
00156 int yy_top_state();
00157
00158 yy_state_type yy_get_previous_state();
00159 yy_state_type yy_try_NUL_trans(yy_state_type current_state);
00160 int yy_get_next_buffer();
00161
00162 FLEX_STD istream* yyin;
00163 FLEX_STD ostream* yyout;
00164
00165
00166 char yy_hold_char;
00167
00168
00169 int yy_n_chars;
00170
00171
00172 char* yy_c_buf_p;
00173
00174 int yy_init;
00175 int yy_start;
00176
00177
00178
00179 int yy_did_buffer_switch_on_eof;
00180
00181
00182 size_t yy_buffer_stack_top;
00183 size_t yy_buffer_stack_max;
00184 struct yy_buffer_state ** yy_buffer_stack;
00185 void yyensure_buffer_stack(void);
00186
00187
00188
00189
00190 yy_state_type yy_last_accepting_state;
00191 char* yy_last_accepting_cpos;
00192
00193 yy_state_type* yy_state_buf;
00194 yy_state_type* yy_state_ptr;
00195
00196 char* yy_full_match;
00197 int* yy_full_state;
00198 int yy_full_lp;
00199
00200 int yy_lp;
00201 int yy_looking_for_trail_begin;
00202
00203 int yy_more_flag;
00204 int yy_more_len;
00205 int yy_more_offset;
00206 int yy_prev_more_offset;
00207 };
00208
00209 }
00210
00211 #endif // yyFlexLexer || ! yyFlexLexerOnce