00001 #line 2 "scanner.cc"
00002
00003 #line 4 "scanner.cc"
00004
00005 #define YY_INT_ALIGNED short int
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #define FLEX_SCANNER
00018 #define YY_FLEX_MAJOR_VERSION 2
00019 #define YY_FLEX_MINOR_VERSION 5
00020 #define YY_FLEX_SUBMINOR_VERSION 35
00021 #if YY_FLEX_SUBMINOR_VERSION > 0
00022 #define FLEX_BETA
00023 #endif
00024
00025
00026
00027
00028
00029
00030
00031
00032 #define yyFlexLexer ExampleFlexLexer
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef FLEXINT_H
00055 #define FLEXINT_H
00056
00057
00058
00059 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00060
00061
00062
00063
00064 #ifndef __STDC_LIMIT_MACROS
00065 #define __STDC_LIMIT_MACROS 1
00066 #endif
00067
00068 #include <inttypes.h>
00069 typedef int8_t flex_int8_t;
00070 typedef uint8_t flex_uint8_t;
00071 typedef int16_t flex_int16_t;
00072 typedef uint16_t flex_uint16_t;
00073 typedef int32_t flex_int32_t;
00074 typedef uint32_t flex_uint32_t;
00075 #else
00076 typedef signed char flex_int8_t;
00077 typedef short int flex_int16_t;
00078 typedef int flex_int32_t;
00079 typedef unsigned char flex_uint8_t;
00080 typedef unsigned short int flex_uint16_t;
00081 typedef unsigned int flex_uint32_t;
00082 #endif
00083
00084
00085 #ifndef INT8_MIN
00086 #define INT8_MIN (-128)
00087 #endif
00088 #ifndef INT16_MIN
00089 #define INT16_MIN (-32767-1)
00090 #endif
00091 #ifndef INT32_MIN
00092 #define INT32_MIN (-2147483647-1)
00093 #endif
00094 #ifndef INT8_MAX
00095 #define INT8_MAX (127)
00096 #endif
00097 #ifndef INT16_MAX
00098 #define INT16_MAX (32767)
00099 #endif
00100 #ifndef INT32_MAX
00101 #define INT32_MAX (2147483647)
00102 #endif
00103 #ifndef UINT8_MAX
00104 #define UINT8_MAX (255U)
00105 #endif
00106 #ifndef UINT16_MAX
00107 #define UINT16_MAX (65535U)
00108 #endif
00109 #ifndef UINT32_MAX
00110 #define UINT32_MAX (4294967295U)
00111 #endif
00112
00113 #endif
00114
00115
00116
00117
00118
00119 #include <iostream>
00120 #include <errno.h>
00121 #include <cstdlib>
00122 #include <cstring>
00123 #include <cstdio>
00124
00125
00126
00127 #ifdef __cplusplus
00128
00129
00130 #define YY_USE_CONST
00131
00132 #else
00133
00134
00135 #if defined (__STDC__)
00136
00137 #define YY_USE_CONST
00138
00139 #endif
00140 #endif
00141
00142 #ifdef YY_USE_CONST
00143 #define yyconst const
00144 #else
00145 #define yyconst
00146 #endif
00147
00148
00149
00150
00151 #define YY_NULL 0
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 #define BEGIN (yy_start) = 1 + 2 *
00176
00177
00178
00179
00180
00181 #define YY_START (((yy_start) - 1) / 2)
00182 #define YYSTATE YY_START
00183
00184
00185 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00186
00187
00188 #define YY_NEW_FILE yyrestart( yyin )
00189
00190 #define YY_END_OF_BUFFER_CHAR 0
00191
00192
00193 #ifndef YY_BUF_SIZE
00194 #define YY_BUF_SIZE 16384
00195 #endif
00196
00197
00198
00199 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00200
00201 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00202 #define YY_TYPEDEF_YY_BUFFER_STATE
00203 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00204 #endif
00205
00206
00207 extern int yyleng;
00208
00209
00210
00211
00212
00213
00214
00215 #define EOB_ACT_CONTINUE_SCAN 0
00216 #define EOB_ACT_END_OF_FILE 1
00217 #define EOB_ACT_LAST_MATCH 2
00218
00219 #define YY_LESS_LINENO(n)
00220
00221
00222 #define yyless(n) \
00223 do \
00224 { \
00225 \
00226 int yyless_macro_arg = (n); \
00227 YY_LESS_LINENO(yyless_macro_arg);\
00228 *yy_cp = (yy_hold_char); \
00229 YY_RESTORE_YY_MORE_OFFSET \
00230 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00231 YY_DO_BEFORE_ACTION; \
00232 } \
00233 while ( 0 )
00234
00235 #define unput(c) yyunput( c, (yytext_ptr) )
00236
00237 #ifndef YY_TYPEDEF_YY_SIZE_T
00238 #define YY_TYPEDEF_YY_SIZE_T
00239 typedef size_t yy_size_t;
00240 #endif
00241
00242 #ifndef YY_STRUCT_YY_BUFFER_STATE
00243 #define YY_STRUCT_YY_BUFFER_STATE
00244 struct yy_buffer_state
00245 {
00246
00247
00248
00249
00250 std::istream* yy_input_file;
00251
00252
00253 char *yy_ch_buf;
00254 char *yy_buf_pos;
00255
00256
00257
00258
00259 yy_size_t yy_buf_size;
00260
00261
00262
00263
00264 int yy_n_chars;
00265
00266
00267
00268
00269
00270 int yy_is_our_buffer;
00271
00272
00273
00274
00275
00276
00277 int yy_is_interactive;
00278
00279
00280
00281
00282
00283 int yy_at_bol;
00284
00285 int yy_bs_lineno;
00286 int yy_bs_column;
00288
00289
00290
00291 int yy_fill_buffer;
00292
00293 int yy_buffer_status;
00294
00295 #define YY_BUFFER_NEW 0
00296 #define YY_BUFFER_NORMAL 1
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307 #define YY_BUFFER_EOF_PENDING 2
00308
00309 };
00310 #endif
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00328 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00329 : NULL)
00330
00331
00332
00333
00334 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345 void *Examplealloc (yy_size_t );
00346 void *Examplerealloc (void *,yy_size_t );
00347 void Examplefree (void * );
00348
00349 #define yy_new_buffer yy_create_buffer
00350
00351 #define yy_set_interactive(is_interactive) \
00352 { \
00353 if ( ! YY_CURRENT_BUFFER ){ \
00354 yyensure_buffer_stack (); \
00355 YY_CURRENT_BUFFER_LVALUE = \
00356 yy_create_buffer( yyin, YY_BUF_SIZE ); \
00357 } \
00358 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00359 }
00360
00361 #define yy_set_bol(at_bol) \
00362 { \
00363 if ( ! YY_CURRENT_BUFFER ){\
00364 yyensure_buffer_stack (); \
00365 YY_CURRENT_BUFFER_LVALUE = \
00366 yy_create_buffer( yyin, YY_BUF_SIZE ); \
00367 } \
00368 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00369 }
00370
00371 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00372
00373
00374
00375
00376 #define FLEX_DEBUG
00377
00378 typedef unsigned char YY_CHAR;
00379
00380 #define yytext_ptr yytext
00381
00382 #include <FlexLexer.h>
00383
00384
00385
00386
00387
00388
00389
00390 #define YY_DO_BEFORE_ACTION \
00391 (yytext_ptr) = yy_bp; \
00392 \
00393 yyleng = (size_t) (yy_cp - yy_bp); \
00394 (yy_hold_char) = *yy_cp; \
00395 *yy_cp = '\0'; \
00396 \
00397 (yy_c_buf_p) = yy_cp;
00398
00399
00400 #define YY_NUM_RULES 7
00401 #define YY_END_OF_BUFFER 8
00402
00403
00404 struct yy_trans_info
00405 {
00406 flex_int32_t yy_verify;
00407 flex_int32_t yy_nxt;
00408 };
00409 static yyconst flex_int16_t yy_accept[15] =
00410 { 0,
00411 0, 0, 8, 6, 4, 5, 1, 3, 4, 2,
00412 1, 3, 2, 0
00413 } ;
00414
00415 static yyconst flex_int32_t yy_ec[256] =
00416 { 0,
00417 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00418 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
00419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00420 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
00421 1, 1, 1, 4, 4, 5, 1, 6, 6, 6,
00422 6, 6, 6, 6, 6, 6, 6, 1, 1, 1,
00423 1, 1, 1, 1, 7, 7, 7, 7, 7, 7,
00424 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00425 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00426 1, 1, 1, 1, 4, 1, 7, 7, 7, 7,
00427
00428 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00429 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00430 7, 7, 1, 1, 1, 1, 1, 1, 1, 1,
00431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00438
00439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00444 1, 1, 1, 1, 1
00445 } ;
00446
00447 static yyconst flex_int32_t yy_meta[8] =
00448 { 0,
00449 1, 1, 1, 2, 2, 2, 2
00450 } ;
00451
00452 static yyconst flex_int16_t yy_base[16] =
00453 { 0,
00454 0, 0, 15, 16, 12, 16, 3, 0, 11, 6,
00455 0, 0, 5, 16, 8
00456 } ;
00457
00458 static yyconst flex_int16_t yy_def[16] =
00459 { 0,
00460 14, 1, 14, 14, 14, 14, 14, 15, 14, 14,
00461 7, 15, 14, 0, 14
00462 } ;
00463
00464 static yyconst flex_int16_t yy_nxt[24] =
00465 { 0,
00466 4, 5, 6, 4, 4, 7, 8, 10, 11, 12,
00467 13, 13, 9, 9, 14, 3, 14, 14, 14, 14,
00468 14, 14, 14
00469 } ;
00470
00471 static yyconst flex_int16_t yy_chk[24] =
00472 { 0,
00473 1, 1, 1, 1, 1, 1, 1, 7, 7, 15,
00474 13, 10, 9, 5, 3, 14, 14, 14, 14, 14,
00475 14, 14, 14
00476 } ;
00477
00478 static yyconst flex_int16_t yy_rule_linenum[7] =
00479 { 0,
00480 61, 66, 71, 77, 82, 88
00481 } ;
00482
00483
00484
00485
00486 #define REJECT reject_used_but_not_detected
00487 #define yymore() yymore_used_but_not_detected
00488 #define YY_MORE_ADJ 0
00489 #define YY_RESTORE_YY_MORE_OFFSET
00490 #line 1 "scanner.ll"
00491
00493 #line 5 "scanner.ll"
00494
00495 #include <string>
00496
00497 #include "scanner.h"
00498
00499
00500 typedef example::Parser::token token;
00501 typedef example::Parser::token_type token_type;
00502
00503
00504
00505 #define yyterminate() return token::END
00506
00507
00508
00509 #define YY_NO_UNISTD_H
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521 #line 48 "scanner.ll"
00522 #define YY_USER_ACTION yylloc->columns(yyleng);
00523 #line 524 "scanner.cc"
00524
00525 #define INITIAL 0
00526
00527 #ifndef YY_NO_UNISTD_H
00528
00529
00530
00531
00532
00533
00534
00535 #include <unistd.h>
00536
00537 #endif
00538
00539 #ifndef YY_EXTRA_TYPE
00540 #define YY_EXTRA_TYPE void *
00541 #endif
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558 #ifndef yytext_ptr
00559 static void yy_flex_strncpy (char *,yyconst char *,int );
00560 #endif
00561
00562 #ifdef YY_NEED_STRLEN
00563 static int yy_flex_strlen (yyconst char * );
00564 #endif
00565
00566 #ifndef YY_NO_INPUT
00567
00568
00569
00570
00571
00572
00573 #endif
00574
00575
00576
00577
00578
00579 #ifndef YY_READ_BUF_SIZE
00580 #define YY_READ_BUF_SIZE 8192
00581 #endif
00582
00583
00584 #ifndef ECHO
00585
00586
00587
00588 #define ECHO LexerOutput( yytext, yyleng )
00589
00590 #endif
00591
00592
00593
00594
00595 #ifndef YY_INPUT
00596 #define YY_INPUT(buf,result,max_size) \
00597 \
00598 \
00599 \
00600 if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
00601 YY_FATAL_ERROR( "input in flex scanner failed" );
00602
00603
00604 #endif
00605
00606
00607
00608
00609
00610 #ifndef yyterminate
00611 #define yyterminate() return YY_NULL
00612 #endif
00613
00614
00615 #ifndef YY_START_STACK_INCR
00616 #define YY_START_STACK_INCR 25
00617 #endif
00618
00619
00620 #ifndef YY_FATAL_ERROR
00621
00622
00623
00624 #define YY_FATAL_ERROR(msg) LexerError( msg )
00625
00626 #endif
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644 #ifndef YY_DECL
00645 #define YY_DECL_IS_OURS 1
00646
00647
00648
00649 #define YY_DECL int yyFlexLexer::yylex()
00650
00651 #endif
00652
00653
00654
00655
00656 #ifndef YY_USER_ACTION
00657 #define YY_USER_ACTION
00658 #endif
00659
00660
00661 #ifndef YY_BREAK
00662 #define YY_BREAK break;
00663 #endif
00664
00665
00666 #define YY_RULE_SETUP \
00667 YY_USER_ACTION
00668
00669
00670
00673 YY_DECL
00674 {
00675 register yy_state_type yy_current_state;
00676 register char *yy_cp, *yy_bp;
00677 register int yy_act;
00678
00679
00680 #line 51 "scanner.ll"
00681
00682
00683
00684
00685
00686 yylloc->step();
00687
00688
00689
00690
00691 #line 692 "scanner.cc"
00692
00693 if ( !(yy_init) )
00694 {
00695 (yy_init) = 1;
00696
00697 #ifdef YY_USER_INIT
00698 YY_USER_INIT;
00699 #endif
00700
00701 if ( ! (yy_start) )
00702 (yy_start) = 1;
00703
00704 if ( ! yyin )
00705
00706
00707
00708 yyin = & std::cin;
00709
00710
00711 if ( ! yyout )
00712
00713
00714
00715 yyout = & std::cout;
00716
00717
00718 if ( ! YY_CURRENT_BUFFER ) {
00719 yyensure_buffer_stack ();
00720 YY_CURRENT_BUFFER_LVALUE =
00721 yy_create_buffer( yyin, YY_BUF_SIZE );
00722 }
00723
00724 yy_load_buffer_state( );
00725 }
00726
00727 while ( 1 )
00728 {
00729
00730 yy_cp = (yy_c_buf_p);
00731
00732
00733 *yy_cp = (yy_hold_char);
00734
00735
00736
00737
00738 yy_bp = yy_cp;
00739
00740
00741 yy_current_state = (yy_start);
00742 yy_match:
00743 do
00744 {
00745 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00746 if ( yy_accept[yy_current_state] )
00747 {
00748 (yy_last_accepting_state) = yy_current_state;
00749 (yy_last_accepting_cpos) = yy_cp;
00750 }
00751 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00752 {
00753 yy_current_state = (int) yy_def[yy_current_state];
00754 if ( yy_current_state >= 15 )
00755 yy_c = yy_meta[(unsigned int) yy_c];
00756 }
00757 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00758 ++yy_cp;
00759 }
00760 while ( yy_current_state != 14 );
00761 yy_cp = (yy_last_accepting_cpos);
00762 yy_current_state = (yy_last_accepting_state);
00763
00764 yy_find_action:
00765
00766 yy_act = yy_accept[yy_current_state];
00767
00768 YY_DO_BEFORE_ACTION;
00769
00770
00771
00772 do_action:
00773
00774
00775 if ( yy_flex_debug )
00776 {
00777 if ( yy_act == 0 )
00778 std::cerr << "--scanner backing up\n";
00779 else if ( yy_act < 7 )
00780 std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] <<
00781 "(\"" << yytext << "\")\n";
00782 else if ( yy_act == 7 )
00783 std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
00784 else if ( yy_act == 8 )
00785 std::cerr << "--(end of buffer or a NUL)\n";
00786 else
00787 std::cerr << "--EOF (start condition " << YY_START << ")\n";
00788 }
00789
00790 switch ( yy_act )
00791 {
00792
00793 case 0:
00794
00795 *yy_cp = (yy_hold_char);
00796 yy_cp = (yy_last_accepting_cpos);
00797 yy_current_state = (yy_last_accepting_state);
00798 goto yy_find_action;
00799
00800 case 1:
00801 YY_RULE_SETUP
00802 #line 61 "scanner.ll"
00803 {
00804 yylval->integerVal = atoi(yytext);
00805 return token::INTEGER;
00806 }
00807 YY_BREAK
00808 case 2:
00809 YY_RULE_SETUP
00810 #line 66 "scanner.ll"
00811 {
00812 yylval->doubleVal = atof(yytext);
00813 return token::DOUBLE;
00814 }
00815 YY_BREAK
00816 case 3:
00817 YY_RULE_SETUP
00818 #line 71 "scanner.ll"
00819 {
00820 yylval->stringVal = new std::string(yytext, yyleng);
00821 return token::STRING;
00822 }
00823 YY_BREAK
00824
00825 case 4:
00826 YY_RULE_SETUP
00827 #line 77 "scanner.ll"
00828 {
00829 yylloc->step();
00830 }
00831 YY_BREAK
00832
00833 case 5:
00834
00835 YY_RULE_SETUP
00836 #line 82 "scanner.ll"
00837 {
00838 yylloc->lines(yyleng); yylloc->step();
00839 return token::EOL;
00840 }
00841 YY_BREAK
00842
00843 case 6:
00844 YY_RULE_SETUP
00845 #line 88 "scanner.ll"
00846 {
00847 return static_cast<token_type>(*yytext);
00848 }
00849 YY_BREAK
00850
00851 case 7:
00852 YY_RULE_SETUP
00853 #line 94 "scanner.ll"
00854 ECHO;
00855 YY_BREAK
00856 #line 857 "scanner.cc"
00857 case YY_STATE_EOF(INITIAL):
00858 yyterminate();
00859
00860 case YY_END_OF_BUFFER:
00861 {
00862
00863 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
00864
00865
00866 *yy_cp = (yy_hold_char);
00867 YY_RESTORE_YY_MORE_OFFSET
00868
00869 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
00870 {
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
00881 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
00882 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
00883 }
00884
00885
00886
00887
00888
00889
00890
00891
00892 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
00893 {
00894 yy_state_type yy_next_state;
00895
00896 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
00897
00898 yy_current_state = yy_get_previous_state( );
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909 yy_next_state = yy_try_NUL_trans( yy_current_state );
00910
00911 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00912
00913 if ( yy_next_state )
00914 {
00915
00916 yy_cp = ++(yy_c_buf_p);
00917 yy_current_state = yy_next_state;
00918 goto yy_match;
00919 }
00920
00921 else
00922 {
00923
00924 yy_cp = (yy_last_accepting_cpos);
00925 yy_current_state = (yy_last_accepting_state);
00926 goto yy_find_action;
00927 }
00928 }
00929
00930 else switch ( yy_get_next_buffer( ) )
00931 {
00932 case EOB_ACT_END_OF_FILE:
00933 {
00934 (yy_did_buffer_switch_on_eof) = 0;
00935
00936 if ( yywrap( ) )
00937 {
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
00948
00949 yy_act = YY_STATE_EOF(YY_START);
00950 goto do_action;
00951 }
00952
00953 else
00954 {
00955 if ( ! (yy_did_buffer_switch_on_eof) )
00956 YY_NEW_FILE;
00957 }
00958 break;
00959 }
00960
00961 case EOB_ACT_CONTINUE_SCAN:
00962 (yy_c_buf_p) =
00963 (yytext_ptr) + yy_amount_of_matched_text;
00964
00965 yy_current_state = yy_get_previous_state( );
00966
00967 yy_cp = (yy_c_buf_p);
00968 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00969 goto yy_match;
00970
00971 case EOB_ACT_LAST_MATCH:
00972 (yy_c_buf_p) =
00973 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
00974
00975 yy_current_state = yy_get_previous_state( );
00976
00977 yy_cp = (yy_c_buf_p);
00978 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00979 goto yy_find_action;
00980 }
00981 break;
00982 }
00983
00984 default:
00985 YY_FATAL_ERROR(
00986 "fatal flex scanner internal error--no action found" );
00987 }
00988 }
00989 }
00990
00991
00992
00993
00994
00995
00996
00997 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
00998 {
00999 yyin = arg_yyin;
01000 yyout = arg_yyout;
01001 yy_c_buf_p = 0;
01002 yy_init = 0;
01003 yy_start = 0;
01004 yy_flex_debug = 0;
01005 yylineno = 1;
01006
01007 yy_did_buffer_switch_on_eof = 0;
01008
01009 yy_looking_for_trail_begin = 0;
01010 yy_more_flag = 0;
01011 yy_more_len = 0;
01012 yy_more_offset = yy_prev_more_offset = 0;
01013
01014 yy_start_stack_ptr = yy_start_stack_depth = 0;
01015 yy_start_stack = NULL;
01016
01017 yy_buffer_stack = 0;
01018 yy_buffer_stack_top = 0;
01019 yy_buffer_stack_max = 0;
01020
01021 yy_state_buf = 0;
01022
01023 }
01024
01025
01026
01027 yyFlexLexer::~yyFlexLexer()
01028 {
01029 delete [] yy_state_buf;
01030 Examplefree(yy_start_stack );
01031 yy_delete_buffer( YY_CURRENT_BUFFER );
01032 Examplefree(yy_buffer_stack );
01033 }
01034
01035
01036
01037 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
01038 {
01039 if ( new_in )
01040 {
01041 yy_delete_buffer( YY_CURRENT_BUFFER );
01042 yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
01043 }
01044
01045 if ( new_out )
01046 yyout = new_out;
01047 }
01048
01049 #ifdef YY_INTERACTIVE
01050 int yyFlexLexer::LexerInput( char* buf, int )
01051 #else
01052 int yyFlexLexer::LexerInput( char* buf, int max_size )
01053 #endif
01054 {
01055 if ( yyin->eof() || yyin->fail() )
01056 return 0;
01057
01058 #ifdef YY_INTERACTIVE
01059 yyin->get( buf[0] );
01060
01061 if ( yyin->eof() )
01062 return 0;
01063
01064 if ( yyin->bad() )
01065 return -1;
01066
01067 return 1;
01068
01069 #else
01070 (void) yyin->read( buf, max_size );
01071
01072 if ( yyin->bad() )
01073 return -1;
01074 else
01075 return yyin->gcount();
01076 #endif
01077 }
01078
01079 void yyFlexLexer::LexerOutput( const char* buf, int size )
01080 {
01081 (void) yyout->write( buf, size );
01082 }
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097 int yyFlexLexer::yy_get_next_buffer()
01098
01099 {
01100 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01101 register char *source = (yytext_ptr);
01102 register int number_to_move, i;
01103 int ret_val;
01104
01105 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
01106 YY_FATAL_ERROR(
01107 "fatal flex scanner internal error--end of buffer missed" );
01108
01109 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01110 {
01111 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
01112 {
01113
01114
01115
01116 return EOB_ACT_END_OF_FILE;
01117 }
01118
01119 else
01120 {
01121
01122
01123
01124 return EOB_ACT_LAST_MATCH;
01125 }
01126 }
01127
01128
01129
01130
01131 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
01132
01133 for ( i = 0; i < number_to_move; ++i )
01134 *(dest++) = *(source++);
01135
01136 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01137
01138
01139
01140 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
01141
01142 else
01143 {
01144 int num_to_read =
01145 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01146
01147 while ( num_to_read <= 0 )
01148 {
01149
01150
01151 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01152
01153 int yy_c_buf_p_offset =
01154 (int) ((yy_c_buf_p) - b->yy_ch_buf);
01155
01156 if ( b->yy_is_our_buffer )
01157 {
01158 int new_size = b->yy_buf_size * 2;
01159
01160 if ( new_size <= 0 )
01161 b->yy_buf_size += b->yy_buf_size / 8;
01162 else
01163 b->yy_buf_size *= 2;
01164
01165 b->yy_ch_buf = (char *)
01166
01167 Examplerealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
01168 }
01169 else
01170
01171 b->yy_ch_buf = 0;
01172
01173 if ( ! b->yy_ch_buf )
01174 YY_FATAL_ERROR(
01175 "fatal error - scanner input buffer overflow" );
01176
01177 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
01178
01179 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01180 number_to_move - 1;
01181
01182 }
01183
01184 if ( num_to_read > YY_READ_BUF_SIZE )
01185 num_to_read = YY_READ_BUF_SIZE;
01186
01187
01188 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01189 (yy_n_chars), (size_t) num_to_read );
01190
01191 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01192 }
01193
01194 if ( (yy_n_chars) == 0 )
01195 {
01196 if ( number_to_move == YY_MORE_ADJ )
01197 {
01198 ret_val = EOB_ACT_END_OF_FILE;
01199 yyrestart( yyin );
01200 }
01201
01202 else
01203 {
01204 ret_val = EOB_ACT_LAST_MATCH;
01205 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01206 YY_BUFFER_EOF_PENDING;
01207 }
01208 }
01209
01210 else
01211 ret_val = EOB_ACT_CONTINUE_SCAN;
01212
01213 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
01214
01215 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
01216 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Examplerealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
01217 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01218 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
01219 }
01220
01221 (yy_n_chars) += number_to_move;
01222 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
01223 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
01224
01225 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01226
01227 return ret_val;
01228 }
01229
01230
01231
01232
01233
01234
01235
01236
01237 yy_state_type yyFlexLexer::yy_get_previous_state()
01238
01239 {
01240 register yy_state_type yy_current_state;
01241 register char *yy_cp;
01242
01243
01244 yy_current_state = (yy_start);
01245
01246 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
01247 {
01248
01249 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01250 if ( yy_accept[yy_current_state] )
01251 {
01252 (yy_last_accepting_state) = yy_current_state;
01253 (yy_last_accepting_cpos) = yy_cp;
01254 }
01255 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01256 {
01257 yy_current_state = (int) yy_def[yy_current_state];
01258 if ( yy_current_state >= 15 )
01259 yy_c = yy_meta[(unsigned int) yy_c];
01260 }
01261 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01262 }
01263
01264 return yy_current_state;
01265 }
01266
01267
01268
01269
01270
01271
01272
01273
01274
01275 yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
01276
01277 {
01278 register int yy_is_jam;
01279
01280 register char *yy_cp = (yy_c_buf_p);
01281
01282 register YY_CHAR yy_c = 1;
01283 if ( yy_accept[yy_current_state] )
01284 {
01285 (yy_last_accepting_state) = yy_current_state;
01286 (yy_last_accepting_cpos) = yy_cp;
01287 }
01288 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01289 {
01290 yy_current_state = (int) yy_def[yy_current_state];
01291 if ( yy_current_state >= 15 )
01292 yy_c = yy_meta[(unsigned int) yy_c];
01293 }
01294 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01295 yy_is_jam = (yy_current_state == 14);
01296
01297 return yy_is_jam ? 0 : yy_current_state;
01298 }
01299
01300
01301
01302
01303 void yyFlexLexer::yyunput( int c, register char* yy_bp)
01304
01305 {
01306 register char *yy_cp;
01307
01308 yy_cp = (yy_c_buf_p);
01309
01310
01311 *yy_cp = (yy_hold_char);
01312
01313 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01314 {
01315
01316 register int number_to_move = (yy_n_chars) + 2;
01317 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01318 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01319 register char *source =
01320 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01321
01322 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01323 *--dest = *--source;
01324
01325 yy_cp += (int) (dest - source);
01326 yy_bp += (int) (dest - source);
01327 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01328 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01329
01330 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01331 YY_FATAL_ERROR( "flex scanner push-back overflow" );
01332 }
01333
01334 *--yy_cp = (char) c;
01335
01336
01337
01338 (yytext_ptr) = yy_bp;
01339 (yy_hold_char) = *yy_cp;
01340 (yy_c_buf_p) = yy_cp;
01341 }
01342
01343
01344
01345
01346
01347
01348 int yyFlexLexer::yyinput()
01349
01350 {
01351 int c;
01352
01353 *(yy_c_buf_p) = (yy_hold_char);
01354
01355 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01356 {
01357
01358
01359
01360
01361 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01362
01363 *(yy_c_buf_p) = '\0';
01364
01365 else
01366 {
01367 int offset = (yy_c_buf_p) - (yytext_ptr);
01368 ++(yy_c_buf_p);
01369
01370 switch ( yy_get_next_buffer( ) )
01371 {
01372 case EOB_ACT_LAST_MATCH:
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384 yyrestart( yyin );
01385
01386
01387
01388 case EOB_ACT_END_OF_FILE:
01389 {
01390 if ( yywrap( ) )
01391 return EOF;
01392
01393 if ( ! (yy_did_buffer_switch_on_eof) )
01394 YY_NEW_FILE;
01395 #ifdef __cplusplus
01396 return yyinput();
01397 #else
01398 return input();
01399 #endif
01400 }
01401
01402 case EOB_ACT_CONTINUE_SCAN:
01403 (yy_c_buf_p) = (yytext_ptr) + offset;
01404 break;
01405 }
01406 }
01407 }
01408
01409 c = *(unsigned char *) (yy_c_buf_p);
01410 *(yy_c_buf_p) = '\0';
01411 (yy_hold_char) = *++(yy_c_buf_p);
01412
01413
01414
01415 return c;
01416 }
01417
01418
01419
01425
01426
01427
01428 void yyFlexLexer::yyrestart( std::istream* input_file )
01429
01430 {
01431
01432 if ( ! YY_CURRENT_BUFFER ){
01433 yyensure_buffer_stack ();
01434 YY_CURRENT_BUFFER_LVALUE =
01435 yy_create_buffer( yyin, YY_BUF_SIZE );
01436 }
01437
01438 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
01439 yy_load_buffer_state( );
01440 }
01441
01446
01447
01448
01449 void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01450
01451 {
01452
01453
01454
01455
01456
01457
01458 yyensure_buffer_stack ();
01459 if ( YY_CURRENT_BUFFER == new_buffer )
01460 return;
01461
01462 if ( YY_CURRENT_BUFFER )
01463 {
01464
01465 *(yy_c_buf_p) = (yy_hold_char);
01466 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01467 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01468 }
01469
01470 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01471 yy_load_buffer_state( );
01472
01473
01474
01475
01476
01477
01478 (yy_did_buffer_switch_on_eof) = 1;
01479 }
01480
01481
01482
01483
01484 void yyFlexLexer::yy_load_buffer_state()
01485
01486 {
01487 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01488 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01489 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01490 (yy_hold_char) = *(yy_c_buf_p);
01491 }
01492
01499
01500
01501
01502 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
01503
01504 {
01505 YY_BUFFER_STATE b;
01506
01507 b = (YY_BUFFER_STATE) Examplealloc(sizeof( struct yy_buffer_state ) );
01508 if ( ! b )
01509 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01510
01511 b->yy_buf_size = size;
01512
01513
01514
01515
01516 b->yy_ch_buf = (char *) Examplealloc(b->yy_buf_size + 2 );
01517 if ( ! b->yy_ch_buf )
01518 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01519
01520 b->yy_is_our_buffer = 1;
01521
01522 yy_init_buffer( b, file );
01523
01524 return b;
01525 }
01526
01531
01532
01533
01534 void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
01535
01536 {
01537
01538 if ( ! b )
01539 return;
01540
01541 if ( b == YY_CURRENT_BUFFER )
01542 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01543
01544 if ( b->yy_is_our_buffer )
01545 Examplefree((void *) b->yy_ch_buf );
01546
01547 Examplefree((void *) b );
01548 }
01549
01550
01551
01552
01553
01554
01555 extern "C" int isatty (int );
01556
01557
01558
01559
01560
01561
01562
01563
01564
01565
01566 void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
01567
01568
01569 {
01570 int oerrno = errno;
01571
01572 yy_flush_buffer( b );
01573
01574 b->yy_input_file = file;
01575 b->yy_fill_buffer = 1;
01576
01577
01578
01579
01580
01581 if (b != YY_CURRENT_BUFFER){
01582 b->yy_bs_lineno = 1;
01583 b->yy_bs_column = 0;
01584 }
01585
01586
01587
01588
01589 b->yy_is_interactive = 0;
01590
01591 errno = oerrno;
01592 }
01593
01598
01599
01600
01601 void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
01602
01603 {
01604 if ( ! b )
01605 return;
01606
01607 b->yy_n_chars = 0;
01608
01609
01610
01611
01612
01613 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01614 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01615
01616 b->yy_buf_pos = &b->yy_ch_buf[0];
01617
01618 b->yy_at_bol = 1;
01619 b->yy_buffer_status = YY_BUFFER_NEW;
01620
01621 if ( b == YY_CURRENT_BUFFER )
01622 yy_load_buffer_state( );
01623 }
01624
01625
01632
01633
01634
01635 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
01636
01637 {
01638 if (new_buffer == NULL)
01639 return;
01640
01641 yyensure_buffer_stack();
01642
01643
01644 if ( YY_CURRENT_BUFFER )
01645 {
01646
01647 *(yy_c_buf_p) = (yy_hold_char);
01648 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01649 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01650 }
01651
01652
01653 if (YY_CURRENT_BUFFER)
01654 (yy_buffer_stack_top)++;
01655 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01656
01657
01658 yy_load_buffer_state( );
01659 (yy_did_buffer_switch_on_eof) = 1;
01660 }
01661
01662
01663
01668
01669
01670
01671 void yyFlexLexer::yypop_buffer_state (void)
01672
01673 {
01674 if (!YY_CURRENT_BUFFER)
01675 return;
01676
01677 yy_delete_buffer(YY_CURRENT_BUFFER );
01678 YY_CURRENT_BUFFER_LVALUE = NULL;
01679 if ((yy_buffer_stack_top) > 0)
01680 --(yy_buffer_stack_top);
01681
01682 if (YY_CURRENT_BUFFER) {
01683 yy_load_buffer_state( );
01684 (yy_did_buffer_switch_on_eof) = 1;
01685 }
01686 }
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696 void yyFlexLexer::yyensure_buffer_stack(void)
01697
01698 {
01699 int num_to_alloc;
01700
01701 if (!(yy_buffer_stack)) {
01702
01703
01704
01705
01706
01707 num_to_alloc = 1;
01708 (yy_buffer_stack) = (struct yy_buffer_state**)Examplealloc
01709 (num_to_alloc * sizeof(struct yy_buffer_state*)
01710 );
01711 if ( ! (yy_buffer_stack) )
01712 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
01713
01714 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01715
01716 (yy_buffer_stack_max) = num_to_alloc;
01717 (yy_buffer_stack_top) = 0;
01718 return;
01719 }
01720
01721 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01722
01723
01724 int grow_size = 8 ;
01725
01726 num_to_alloc = (yy_buffer_stack_max) + grow_size;
01727 (yy_buffer_stack) = (struct yy_buffer_state**)Examplerealloc
01728 ((yy_buffer_stack),
01729 num_to_alloc * sizeof(struct yy_buffer_state*)
01730 );
01731 if ( ! (yy_buffer_stack) )
01732 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
01733
01734
01735 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01736 (yy_buffer_stack_max) = num_to_alloc;
01737 }
01738 }
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749
01750
01751
01752
01753 void yyFlexLexer::yy_push_state( int new_state )
01754
01755 {
01756 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
01757 {
01758 yy_size_t new_size;
01759
01760 (yy_start_stack_depth) += YY_START_STACK_INCR;
01761 new_size = (yy_start_stack_depth) * sizeof( int );
01762
01763 if ( ! (yy_start_stack) )
01764 (yy_start_stack) = (int *) Examplealloc(new_size );
01765
01766 else
01767 (yy_start_stack) = (int *) Examplerealloc((void *) (yy_start_stack),new_size );
01768
01769 if ( ! (yy_start_stack) )
01770 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
01771 }
01772
01773 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
01774
01775 BEGIN(new_state);
01776 }
01777
01778
01779
01780
01781 void yyFlexLexer::yy_pop_state()
01782
01783 {
01784 if ( --(yy_start_stack_ptr) < 0 )
01785 YY_FATAL_ERROR( "start-condition stack underflow" );
01786
01787 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
01788 }
01789
01790
01791
01792
01793 int yyFlexLexer::yy_top_state()
01794
01795 {
01796 return (yy_start_stack)[(yy_start_stack_ptr) - 1];
01797 }
01798
01799 #ifndef YY_EXIT_FAILURE
01800 #define YY_EXIT_FAILURE 2
01801 #endif
01802
01803
01804
01805
01806 void yyFlexLexer::LexerError( yyconst char msg[] )
01807 {
01808 std::cerr << msg << std::endl;
01809 exit( YY_EXIT_FAILURE );
01810 }
01811
01812
01813
01814
01815 #undef yyless
01816 #define yyless(n) \
01817 do \
01818 { \
01819 \
01820 int yyless_macro_arg = (n); \
01821 YY_LESS_LINENO(yyless_macro_arg);\
01822 yytext[yyleng] = (yy_hold_char); \
01823 (yy_c_buf_p) = yytext + yyless_macro_arg; \
01824 (yy_hold_char) = *(yy_c_buf_p); \
01825 *(yy_c_buf_p) = '\0'; \
01826 yyleng = yyless_macro_arg; \
01827 } \
01828 while ( 0 )
01829
01830
01831
01832
01833
01834
01835
01836
01837
01838
01839
01840
01841
01842
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852
01853
01854
01855
01856 #ifndef yytext_ptr
01857 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
01858 {
01859 register int i;
01860 for ( i = 0; i < n; ++i )
01861 s1[i] = s2[i];
01862 }
01863 #endif
01864
01865 #ifdef YY_NEED_STRLEN
01866 static int yy_flex_strlen (yyconst char * s )
01867 {
01868 register int n;
01869 for ( n = 0; s[n]; ++n )
01870 ;
01871
01872 return n;
01873 }
01874 #endif
01875
01876 void *Examplealloc (yy_size_t size )
01877 {
01878 return (void *) malloc( size );
01879 }
01880
01881 void *Examplerealloc (void * ptr, yy_size_t size )
01882 {
01883
01884
01885
01886
01887
01888
01889
01890 return (void *) realloc( (char *) ptr, size );
01891 }
01892
01893 void Examplefree (void * ptr )
01894 {
01895 free( (char *) ptr );
01896 }
01897
01898
01899
01900 #define YYTABLES_NAME "yytables"
01901
01902
01903
01904
01905 #line 94 "scanner.ll"
01906
01907
01908
01909 namespace example {
01910
01911 Scanner::Scanner(std::istream* in,
01912 std::ostream* out)
01913 : ExampleFlexLexer(in, out)
01914 {
01915 }
01916
01917 Scanner::~Scanner()
01918 {
01919 }
01920
01921 void Scanner::set_debug(bool b)
01922 {
01923 yy_flex_debug = b;
01924 }
01925
01926 }
01927
01928
01929
01930
01931
01932 #ifdef yylex
01933 #undef yylex
01934 #endif
01935
01936 int ExampleFlexLexer::yylex()
01937 {
01938 std::cerr << "in ExampleFlexLexer::yylex() !" << std::endl;
01939 return 0;
01940 }
01941
01942
01943
01944
01945
01946
01947
01948 int ExampleFlexLexer::yywrap()
01949 {
01950 return 1;
01951 }
01952