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