1 #ifndef FLEX_HEADER_mootTokenLexer_h 2 #define FLEX_HEADER_mootTokenLexer_h 3 #define YY_mootTokenLexer_CHAR unsigned char 45 #define YY_PROTO(proto) proto 47 #define YY_PROTO(proto) () 56 #line 50 "mootTokenLexer.ll" 97 #line 94 "mootTokenLexer.ll" 98 #define YY_mootTokenLexer_CLASS mootTokenLexer 99 #line 96 "mootTokenLexer.ll" 100 #define YY_mootTokenLexer_INHERIT \ 101 : public moot::GenericLexer 102 #line 99 "mootTokenLexer.ll" 103 #define YY_mootTokenLexer_INPUT_CODE \ 104 return moot::GenericLexer::yyinput(buffer,result,max_size); 105 #line 102 "mootTokenLexer.ll" 106 #define YY_mootTokenLexer_MEMBERS \ 109 typedef moot::mootTokenType TokenType; \ 111 static const int LexTypeText = moot::NTokTypes+1; \ 112 static const int LexTypeTag = moot::NTokTypes+2; \ 113 static const int LexTypeDetails = moot::NTokTypes+3; \ 114 static const int LexTypeEOA = moot::NTokTypes+4; \ 115 static const int LexTypeEOT = moot::NTokTypes+5; \ 116 static const int LexTypeIgnore = moot::NTokTypes+6; \ 126 moot::mootToken mtoken_default; \ 128 moot::mootToken *mtoken; \ 131 moot::mootToken::Analysis *manalysis;\ 134 bool ignore_comments; \ 136 bool first_analysis_is_best; \ 138 bool current_analysis_is_best; \ 140 bool ignore_first_analysis; \ 142 bool ignore_current_analysis; \ 144 bool parse_location; \ 146 bool parse_analysis_cost; \ 148 bool analysis_cost_details; \ 153 virtual ~mootTokenLexer(void) {};\ 155 virtual void reset(void); \ 159 inline void loc_set(moot::OffsetT off, int len) \ 160 { mtoken->location(off,len); } \ 162 inline void loc_add(int len) \ 163 { if (!parse_location) mtoken->loc_length(mtoken->loc_length()+yyleng); } \ 166 virtual void *mgl_yy_current_buffer_p(void) \ 167 {return reinterpret_cast<void*>(&yy_current_buffer);}; \ 168 virtual void *mgl_yy_create_buffer(int size, FILE *unused=stdin) \ 169 {return reinterpret_cast<void*>(yy_create_buffer(unused,size));};\ 170 virtual void mgl_yy_init_buffer(void *buf, FILE *unused=stdin) \ 171 {yy_init_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf),unused);};\ 172 virtual void mgl_yy_delete_buffer(void *buf) \ 173 {yy_delete_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf));};\ 174 virtual void mgl_yy_switch_to_buffer(void *buf) \ 175 {yy_switch_to_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf));};\ 176 virtual void mgl_begin(int stateno); 177 #line 175 "mootTokenLexer.ll" 178 #define YY_mootTokenLexer_CONSTRUCTOR_INIT :\ 179 GenericLexer("mootTokenLexer"), \ 181 lasttyp(moot::TokTypeEOS), \ 184 ignore_comments(false), \ 185 first_analysis_is_best(true), \ 186 current_analysis_is_best(false), \ 187 ignore_first_analysis(false), \ 188 ignore_current_analysis(false), \ 189 parse_location(false), \ 190 parse_analysis_cost(true), \ 191 analysis_cost_details(false) 192 #line 191 "mootTokenLexer.ll" 193 #define YY_mootTokenLexer_CONSTRUCTOR_CODE \ 194 mtoken = &mtoken_default; 195 #line 226 "mootTokenLexer.ll" 196 #line 52 "./flexskel.h" 200 #ifndef YY_mootTokenLexer_TEXT 201 #define YY_mootTokenLexer_TEXT yytext 203 #ifndef YY_mootTokenLexer_LENG 204 #define YY_mootTokenLexer_LENG yyleng 206 #ifndef YY_mootTokenLexer_IN 207 #define YY_mootTokenLexer_IN yyin 209 #ifndef YY_mootTokenLexer_OUT 210 #define YY_mootTokenLexer_OUT yyout 212 #ifndef YY_mootTokenLexer_LEX_RETURN 213 #define YY_mootTokenLexer_LEX_RETURN int 215 #ifndef YY_mootTokenLexer_LEX_DEFINED 216 #define YY_mootTokenLexer_LEX_DEFINED 220 #ifndef YY_mootTokenLexer_LEX 221 #define YY_mootTokenLexer_LEX yylex 223 #ifndef YY_mootTokenLexer_LEX_DEFINED 224 #define YY_mootTokenLexer_LEX_DEFINED 228 #ifndef YY_mootTokenLexer_LEX_PARAM 229 #ifndef YY_USE_PROTOS 230 #define YY_mootTokenLexer_LEX_PARAM 232 #define YY_mootTokenLexer_LEX_PARAM void 235 #ifndef YY_mootTokenLexer_LEX_DEFINED 236 #define YY_mootTokenLexer_LEX_DEFINED 240 #ifndef YY_mootTokenLexer_LEX_PARAM_DEF 241 #define YY_mootTokenLexer_LEX_PARAM_DEF 243 #ifndef YY_mootTokenLexer_LEX_DEFINED 244 #define YY_mootTokenLexer_LEX_DEFINED 248 #ifndef YY_mootTokenLexer_RESTART 249 #define YY_mootTokenLexer_RESTART yyrestart 251 #ifndef YY_mootTokenLexer_SWITCH_TO_BUFFER 252 #define YY_mootTokenLexer_SWITCH_TO_BUFFER yy_switch_to_buffer 254 #ifndef YY_mootTokenLexer_LOAD_BUFFER_STATE 255 #define YY_mootTokenLexer_LOAD_BUFFER_STATE yy_load_buffer_state 258 #ifndef YY_mootTokenLexer_CREATE_BUFFER 259 #define YY_mootTokenLexer_CREATE_BUFFER yy_create_buffer 261 #ifndef yy_new_buffer 262 #define yy_new_buffer yy_create_buffer 266 #ifndef YY_mootTokenLexer_DELETE_BUFFER 267 #define YY_mootTokenLexer_DELETE_BUFFER yy_delete_buffer 269 #ifndef YY_mootTokenLexer_INIT_BUFFER 270 #define YY_mootTokenLexer_INIT_BUFFER yy_init_buffer 272 #ifdef YY_mootTokenLexer_FLEX_DEBUG 273 #ifndef YY_mootTokenLexer_DEBUG 274 #define YY_mootTokenLexer_DEBUG 1 277 #ifndef YY_mootTokenLexer_DEBUG 278 #define YY_mootTokenLexer_DEBUG 0 282 #if YY_mootTokenLexer_DEBUG != 0 283 #ifndef YY_mootTokenLexer_DEBUG_FLAG 284 #define YY_mootTokenLexer_DEBUG_FLAG yy_flex_debug 286 #ifndef YY_mootTokenLexer_DEBUG_INIT 287 #define YY_mootTokenLexer_DEBUG_INIT 1 297 extern void YY_mootTokenLexer_RESTART YY_PROTO(( FILE *input_file ));
298 extern void YY_mootTokenLexer_SWITCH_TO_BUFFER YY_PROTO((
YY_BUFFER_STATE new_buffer ));
299 extern void YY_mootTokenLexer_LOAD_BUFFER_STATE YY_PROTO((
void ));
300 extern YY_BUFFER_STATE YY_mootTokenLexer_CREATE_BUFFER YY_PROTO(( FILE *file,
int size ));
301 extern void YY_mootTokenLexer_DELETE_BUFFER YY_PROTO((
YY_BUFFER_STATE b ));
302 extern void YY_mootTokenLexer_INIT_BUFFER YY_PROTO((
YY_BUFFER_STATE b, FILE *file ));
304 #if YY_mootTokenLexer_DEBUG != 0 305 extern int YY_mootTokenLexer_DEBUG_FLAG ;
307 extern YY_mootTokenLexer_CHAR *YY_mootTokenLexer_TEXT;
308 extern int YY_mootTokenLexer_LENG;
309 extern FILE *YY_mootTokenLexer_IN, *YY_mootTokenLexer_OUT;
310 #ifdef YY_mootTokenLexer_LEX_DEFINED 311 extern YY_mootTokenLexer_LEX_RETURN YY_mootTokenLexer_LEX ( YY_mootTokenLexer_LEX_PARAM )
312 YY_mootTokenLexer_LEX_PARAM_DEF
315 extern YY_mootTokenLexer_LEX_RETURN YY_mootTokenLexer_LEX ( YY_mootTokenLexer_LEX_PARAM )
316 YY_mootTokenLexer_LEX_PARAM_DEF
323 #ifndef YY_mootTokenLexer_CLASS 324 #define YY_mootTokenLexer_CLASS mootTokenLexer 326 #ifndef YY_mootTokenLexer_ECHO 327 #define YY_mootTokenLexer_ECHO yy_echo 329 #ifdef YY_mootTokenLexer_ECHO_PURE 330 #define YY_mootTokenLexer_ECHO_NOCODE 332 #ifndef YY_mootTokenLexer_ECHO_CODE 333 #define YY_mootTokenLexer_ECHO_CODE fwrite( (char *) YY_mootTokenLexer_TEXT, YY_mootTokenLexer_LENG, 1, YY_mootTokenLexer_OUT ); 335 #ifndef YY_mootTokenLexer_INPUT 336 #define YY_mootTokenLexer_INPUT yy_input 338 #ifdef YY_mootTokenLexer_INPUT_PURE 339 #define YY_mootTokenLexer_INPUT_NOCODE 341 #ifndef YY_mootTokenLexer_INPUT_CODE 342 #define YY_mootTokenLexer_INPUT_CODE return result= fread( buffer, 1,max_size,YY_mootTokenLexer_IN ); 344 #ifdef YY_mootTokenLexer_FATAL_ERROR_PURE 345 #define YY_mootTokenLexer_FATAL_ERRO_NOCODE 347 #ifndef YY_mootTokenLexer_FATAL_ERROR 348 #define YY_mootTokenLexer_FATAL_ERROR yy_fatal_error 350 #ifndef YY_mootTokenLexer_FATAL_ERROR_CODE 351 #define YY_mootTokenLexer_FATAL_ERROR_CODE fputs( msg, stderr );putc( '\n', stderr );exit( 1 ); 353 #ifndef YY_mootTokenLexer_WRAP 354 #define YY_mootTokenLexer_WRAP yy_wrap 356 #ifdef YY_mootTokenLexer_WRAP_PURE 357 #define YY_mootTokenLexer_WRAP_NOCODE 359 #ifndef YY_mootTokenLexer_WRAP_CODE 360 #define YY_mootTokenLexer_WRAP_CODE return 1; 364 #ifndef YY_mootTokenLexer_INHERIT 365 #define YY_mootTokenLexer_INHERIT 367 #ifndef YY_mootTokenLexer_MEMBERS 368 #define YY_mootTokenLexer_MEMBERS 370 #ifndef YY_mootTokenLexer_CONSTRUCTOR_PARAM 371 #define YY_mootTokenLexer_CONSTRUCTOR_PARAM 373 #ifndef YY_mootTokenLexer_CONSTRUCTOR_CODE 374 #define YY_mootTokenLexer_CONSTRUCTOR_CODE 376 #ifndef YY_mootTokenLexer_CONSTRUCTOR_INIT 377 #define YY_mootTokenLexer_CONSTRUCTOR_INIT 381 class YY_mootTokenLexer_CLASS YY_mootTokenLexer_INHERIT
384 YY_mootTokenLexer_CHAR *yy_c_buf_p;
385 YY_mootTokenLexer_CHAR yy_hold_char;
389 int yy_did_buffer_switch_on_eof;
391 void yy_initialize();
393 int yyinput() {
return input();};
394 int yy_get_next_buffer();
395 void yyunput( YY_mootTokenLexer_CHAR c, YY_mootTokenLexer_CHAR *buf_ptr );
397 long yy_get_previous_state_ (
void );
398 long yy_try_NUL_trans_ (
long current_state_ );
400 YY_BUFFER_STATE yy_current_buffer;
401 void YY_mootTokenLexer_RESTART ( FILE *input_file );
402 void YY_mootTokenLexer_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer );
403 void YY_mootTokenLexer_LOAD_BUFFER_STATE(
void );
404 YY_BUFFER_STATE YY_mootTokenLexer_CREATE_BUFFER( FILE *file,
int size );
405 void YY_mootTokenLexer_DELETE_BUFFER( YY_BUFFER_STATE b );
406 void YY_mootTokenLexer_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file );
408 virtual void YY_mootTokenLexer_ECHO()
409 #ifdef YY_mootTokenLexer_ECHO_PURE 413 virtual int YY_mootTokenLexer_INPUT(
char *buf,
int &result,
int max_size)
414 #ifdef YY_mootTokenLexer_INPUT_PURE 418 virtual void YY_mootTokenLexer_FATAL_ERROR(
const char *msg)
419 #ifdef YY_mootTokenLexer_FATAL_ERROR_PURE 423 virtual int YY_mootTokenLexer_WRAP()
424 #ifdef YY_mootTokenLexer_WRAP_PURE 429 YY_mootTokenLexer_CHAR *YY_mootTokenLexer_TEXT;
430 int YY_mootTokenLexer_LENG;
431 FILE *YY_mootTokenLexer_IN, *YY_mootTokenLexer_OUT;
432 YY_mootTokenLexer_LEX_RETURN YY_mootTokenLexer_LEX ( YY_mootTokenLexer_LEX_PARAM);
433 YY_mootTokenLexer_CLASS(YY_mootTokenLexer_CONSTRUCTOR_PARAM) ;
434 #if YY_mootTokenLexer_DEBUG != 0 435 int YY_mootTokenLexer_DEBUG_FLAG;
438 YY_mootTokenLexer_MEMBERS
447 #line 520 "mootTokenLexer.ll" 449 #line 302 "./flexskel.h" Definition: mootAssocVector.h:39
classes and utilities for tokens and associated analyses
common utilities for flex++ lexers
struct yy_buffer_state * YY_BUFFER_STATE
Definition: mootClassfreqsLexer.h:49
struct yy_buffer_state * YY_BUFFER_STATE
Definition: mootTokenLexer.h:69