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