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