1 /* A lexical scanner generated by flex */ 
   3 /* scanner skeleton version: 
   5         Last change:  JS   13 Jul 97    6:17 pm 
  13 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 
  26 /* use prototypes in function declarations */ 
  29 /* the "const" storage-class-modifier is valid */ 
  32 #else   /* ! __cplusplus */ 
  46 #endif  /* ! __cplusplus */ 
  60 #define YY_PROTO(proto) proto 
  62 #define YY_PROTO(proto) () 
  63 /* we can't get here if it's an ANSI C compiler, or a C++ compiler, 
  64  * so it's got to be a K&R compiler, and therefore there's no standard 
  65  * place from which to include these definitions 
  76 /* amount of stuff to slurp up with each read */ 
  77 #ifndef YY_READ_BUF_SIZE 
  78 #define YY_READ_BUF_SIZE 8192 
  81 /* returned upon end-of-file */ 
  84 /* copy whatever the last rule matched to the standard output */ 
  86 /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ 
  87 /* this used to be an fputs(), but since the string might contain NUL's, 
  90 #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) 
  92 /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL, 
  93  * is returned in "result". 
  95 #define YY_INPUT(buf,result,max_size) \ 
  96         if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ 
  97             YY_FATAL_ERROR( "read() in flex scanner failed" ); 
 100 /* no semi-colon after return; correct usage is to write "yyterminate();" - 
 101  * we don't want an extra ';' after the "return" because that will cause 
 102  * some compilers to complain about unreachable statements. 
 104 #define yyterminate() return ( YY_NULL ) 
 106 /* report a fatal error */ 
 108 /* The funky do-while is used to turn this macro definition into 
 109  * a single C statement (which needs a semi-colon terminator). 
 110  * This avoids problems with code like: 
 112  *      if ( something_happens ) 
 113  *              YY_FATAL_ERROR( "oops, the something happened" ); 
 117  * Prior to using the do-while the compiler would get upset at the 
 118  * "else" because it interpreted the "if" statement as being all 
 119  * done when it reached the ';' after the YY_FATAL_ERROR() call. 
 122 #define YY_FATAL_ERROR(msg) \ 
 125                 (void) fputs( msg, stderr ); \ 
 126                 (void) putc( '\n', stderr ); \ 
 131 /* default yywrap function - always treat EOF as an EOF */ 
 132 int yywrap(void) { return 1; } 
 135 /* enter a start condition.  This macro really ought to take a parameter, 
 136  * but we do it the disgusting crufty way forced on us by the ()-less 
 137  * definition of BEGIN 
 139 #define BEGIN yy_start = 1 + 2 * 
 141 /* action number for EOF rule of a given start state */ 
 142 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 
 144 /* special action meaning "start processing a new file" */ 
 145 #define YY_NEW_FILE \ 
 148                 yy_init_buffer( yy_current_buffer, yyin ); \ 
 149                 yy_load_buffer_state(); \ 
 153 /* default declaration of generated scanner - a define so the user can 
 154  * easily add parameters 
 156 #define YY_DECL int yylex YY_PROTO(( void ))  
 158 /* code executed at the end of each rule */ 
 159 #define YY_BREAK break; 
 161 #define YY_END_OF_BUFFER_CHAR 0 
 164 #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ 
 167 typedef struct yy_buffer_state 
*YY_BUFFER_STATE
; 
 169 #define YY_CHAR unsigned char 
 175  * Description:  Lexical analyser for PROLOGIO; can be used with 
 176  *               either lex and flex. 
 180 /* +++steve162e: added, otherwise, PROIO_input will be undefined (at least under LINUX) 
 181              please check, if this is also TRUE under other UNIXes. 
 184 #if defined(FLEX_SCANNER) && defined(_LINUX) 
 185 #define PROIO_input my_input 
 191 extern char *malloc(); 
 193 #define Return(x) return x; 
 195 #if defined(VMS) && ( __VMS_VER < 70000000 ) 
 196 #define strdup(s) (strcpy((char *)malloc(strlen(s)+1), s)); 
 199 static size_t lex_buffer_length 
= 0; 
 200 static const char *lex_buffer 
= NULL
; 
 201 static size_t lex_string_ptr 
= 0; 
 202 static int lex_read_from_string 
= 0; 
 204 static int my_input(void); 
 205 static int my_unput(char); 
 209 # define YY_INPUT(buf,result,max_size) \ 
 210    if (lex_read_from_string) \ 
 211    {  int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \ 
 213         if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ 
 214             YY_FATAL_ERROR( "read() in flex scanner failed" ); 
 217 # define unput(_c) my_unput(_c) 
 222 /* done after the current pattern has been matched and before the 
 223  * corresponding action - sets up yytext 
 225 #define YY_DO_BEFORE_ACTION \ 
 227         yyleng = yy_cp - yy_bp; \ 
 228         yy_hold_char = *yy_cp; \ 
 232 #define EOB_ACT_CONTINUE_SCAN 0 
 233 #define EOB_ACT_END_OF_FILE 1 
 234 #define EOB_ACT_LAST_MATCH 2 
 236 /* return all but the first 'n' matched characters back to the input stream */ 
 240                 /* undo effects of setting up yytext */ \ 
 241                 *yy_cp = yy_hold_char; \ 
 242                 yy_c_buf_p = yy_cp = yy_bp + n; \ 
 243                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 
 248 #define unput(c) yyunput( c, yytext ) 
 251 struct yy_buffer_state
 
 255     YY_CHAR 
*yy_ch_buf
;         /* input buffer */ 
 256     YY_CHAR 
*yy_buf_pos
;        /* current position in input buffer */ 
 258     /* size of input buffer in bytes, not including room for EOB characters*/ 
 261     /* number of characters read into yy_ch_buf, not including EOB characters */ 
 264     int yy_eof_status
;          /* whether we've seen an EOF on this buffer */ 
 265 #define EOF_NOT_SEEN 0 
 266     /* "pending" happens when the EOF has been seen but there's still 
 269 #define EOF_PENDING 1 
 273 static YY_BUFFER_STATE yy_current_buffer
; 
 275 /* we provide macros for accessing buffer states in case in the 
 276  * future we want to put the buffer states in a more general 
 279 #define YY_CURRENT_BUFFER yy_current_buffer 
 282 /* yy_hold_char holds the character lost when yytext is formed */ 
 283 static YY_CHAR yy_hold_char
; 
 285 static int yy_n_chars
;          /* number of characters read into yy_ch_buf */ 
 289 #ifndef YY_USER_ACTION 
 290 #define YY_USER_ACTION 
 297 extern YY_CHAR 
*yytext
; 
 299 extern FILE *yyin
, *yyout
; 
 304 FILE *yyin 
= (FILE *) 0, *yyout 
= (FILE *) 0; 
 306 #define YY_END_OF_BUFFER 18 
 307 typedef int yy_state_type
; 
 308 static const short int yy_accept
[34] = 
 310         0,    0,   18,   16,   13,   14,   16,   16,    6,    7, 
 311        16,    8,   12,   16,    1,   11,    3,    9,   10,    2, 
 312         0,    5,    0,    0,    0,    4,    1,   15,    3,    5, 
 316 static const YY_CHAR yy_ec
[256] = 
 318         1,    1,    1,    1,    1,    1,    1,    1,    2,    3, 
 319         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 320         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 321         1,    2,    1,    4,    1,    1,    1,    1,    5,    6, 
 322         7,    8,    9,   10,    9,   11,   12,   13,   13,   13, 
 323        13,   13,   13,   13,   13,   13,   13,    1,    1,    1, 
 324        14,    1,    1,    1,   15,   15,   15,   15,   15,   15, 
 325        15,   15,   15,   15,   15,   15,   15,   15,   15,   15, 
 326        15,   15,   15,   15,   15,   15,   15,   15,   15,   15, 
 327        16,   17,   18,    1,   15,    1,   15,   15,   15,   15, 
 329        19,   15,   15,   15,   15,   15,   15,   15,   15,   15, 
 330        15,   15,   15,   15,   15,   15,   15,   15,   15,   15, 
 331        15,   15,    1,   20,    1,    1,    1,    1,    1,    1, 
 332         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 333         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 334         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 335         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 336         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 337         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 338         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 340         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 341         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 342         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 343         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 348 static const YY_CHAR yy_meta
[21] = 
 350         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 351         1,    1,    2,    1,    2,    1,    3,    1,    2,    1 
 354 static const short int yy_base
[37] = 
 356         0,    0,   48,   55,   55,   55,   17,   42,   55,   55, 
 357        19,   55,   55,   23,   17,   55,    0,   55,   55,    0, 
 358        18,   55,   19,   23,   21,   55,   12,   55,    0,   24, 
 359        25,   29,   55,   49,   52,   22 
 362 static const short int yy_def
[37] = 
 364        33,    1,   33,   33,   33,   33,   34,   35,   33,   33, 
 365        33,   33,   33,   33,   33,   33,   36,   33,   33,   36, 
 366        34,   33,   34,   34,   35,   33,   33,   33,   36,   34, 
 367        34,   34,    0,   33,   33,   33 
 370 static const short int yy_nxt
[76] = 
 372         4,    5,    6,    7,    8,    9,   10,    4,   11,   12, 
 373        13,   14,   15,   16,   17,   18,    4,   19,   20,    4, 
 374        22,   22,   30,   29,   27,   26,   22,   22,   30,   27, 
 375        28,   27,   30,   23,   23,   23,   24,   24,   24,   31, 
 376        23,   32,   24,   24,   24,   23,   26,   33,   24,   21, 
 377        21,   21,   25,   25,    3,   33,   33,   33,   33,   33, 
 378        33,   33,   33,   33,   33,   33,   33,   33,   33,   33, 
 382 static const short int yy_chk
[76] = 
 384         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 385         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
 386         7,   21,   23,   36,   27,   25,   24,   30,   31,   15, 
 387        14,   11,   32,    7,   21,   23,    7,   21,   23,   24, 
 388        30,   31,   24,   30,   31,   32,    8,    3,   32,   34, 
 389        34,   34,   35,   35,   33,   33,   33,   33,   33,   33, 
 390        33,   33,   33,   33,   33,   33,   33,   33,   33,   33, 
 394 static yy_state_type yy_last_accepting_state
; 
 395 static YY_CHAR 
*yy_last_accepting_cpos
; 
 397 /* the intent behind this definition is that it'll catch 
 398  * any uses of REJECT which flex missed 
 400 #define REJECT reject_used_but_not_detected 
 401 #define yymore() yymore_used_but_not_detected 
 402 #define YY_MORE_ADJ 0 
 404 /* these variables are all declared out here so that section 3 code can 
 407 /* points to current character in buffer */ 
 408 static YY_CHAR 
*yy_c_buf_p 
= (YY_CHAR 
*) 0; 
 409 static int yy_init 
= 1;         /* whether we need to initialize */ 
 410 static int yy_start 
= 0;        /* start state number */ 
 412 /* flag which is used to allow yywrap()'s to do buffer switches 
 413  * instead of setting up a fresh yyin.  A bit of a hack ... 
 415 static int yy_did_buffer_switch_on_eof
; 
 417 static yy_state_type yy_get_previous_state 
YY_PROTO(( void )); 
 418 static yy_state_type yy_try_NUL_trans 
YY_PROTO(( yy_state_type current_state 
)); 
 419 static int yy_get_next_buffer 
YY_PROTO(( void )); 
 420 static void yyunput 
YY_PROTO(( YY_CHAR c
, YY_CHAR 
*buf_ptr 
)); 
 421 void yyrestart 
YY_PROTO(( FILE *input_file 
)); 
 422 void yy_switch_to_buffer 
YY_PROTO(( YY_BUFFER_STATE new_buffer 
)); 
 423 void yy_load_buffer_state 
YY_PROTO(( void )); 
 424 YY_BUFFER_STATE yy_create_buffer 
YY_PROTO(( FILE *file
, int size 
)); 
 425 void yy_delete_buffer 
YY_PROTO(( YY_BUFFER_STATE b 
)); 
 426 void yy_init_buffer 
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file 
)); 
 428 #define yy_new_buffer yy_create_buffer 
 431 static int yyinput 
YY_PROTO(( void )); 
 433 static int input 
YY_PROTO(( void )); 
 438     register yy_state_type yy_current_state
; 
 439     register YY_CHAR 
*yy_cp
, *yy_bp
; 
 450             yy_start 
= 1;       /* first start state */ 
 458         if ( yy_current_buffer 
) 
 459             yy_init_buffer( yy_current_buffer
, yyin 
); 
 461             yy_current_buffer 
= yy_create_buffer( yyin
, YY_BUF_SIZE 
); 
 463         yy_load_buffer_state(); 
 468     while ( 1 )         /* loops until end-of-file is reached */ 
 472         /* support of yytext */ 
 473         *yy_cp 
= yy_hold_char
; 
 475         /* yy_bp points to the position in yy_ch_buf of the start of the 
 480         yy_current_state 
= yy_start
; 
 484             register YY_CHAR yy_c 
= yy_ec
[*yy_cp
]; 
 485             if ( yy_accept
[yy_current_state
] ) 
 487                 yy_last_accepting_state 
= yy_current_state
; 
 488                 yy_last_accepting_cpos 
= yy_cp
; 
 490             while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state 
) 
 492                 yy_current_state 
= yy_def
[yy_current_state
]; 
 493                 if ( yy_current_state 
>= 34 ) 
 494                     yy_c 
= yy_meta
[yy_c
]; 
 496             yy_current_state 
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
]; 
 499         while ( yy_current_state 
!= 33 ); 
 500         yy_cp 
= yy_last_accepting_cpos
; 
 501         yy_current_state 
= yy_last_accepting_state
; 
 504         yy_act 
= yy_accept
[yy_current_state
]; 
 509 do_action
:      /* this label is used only to access EOF actions */ 
 514             case 0: /* must backtrack */ 
 515             /* undo the effects of YY_DO_BEFORE_ACTION */ 
 516             *yy_cp 
= yy_hold_char
; 
 517             yy_cp 
= yy_last_accepting_cpos
; 
 518             yy_current_state 
= yy_last_accepting_state
; 
 523 {yylval
.s 
= strdup(yytext
); Return(INTEGER
);} 
 531 {yylval
.s 
= strdup(yytext
); Return(WORD
);} 
 535 {int len 
= strlen(yytext
); 
 537                                    yylval
.s 
= strdup(yytext
+1);  
 542 {yylval
.s 
= strdup(yytext
); Return(STRING
);} 
 562 Return(CLOSE_SQUARE
); 
 584                           while (yyinput() != '*'); 
 587                           while (input() != '*'); 
 592                                   case '*': unput('*'); 
 605 case YY_STATE_EOF(INITIAL
): 
 608             case YY_END_OF_BUFFER
: 
 610                 /* amount of text matched not including the EOB char */ 
 611                 int yy_amount_of_matched_text 
= yy_cp 
- yytext 
- 1; 
 613                 /* undo the effects of YY_DO_BEFORE_ACTION */ 
 614                 *yy_cp 
= yy_hold_char
; 
 616                 /* note that here we test for yy_c_buf_p "<=" to the position 
 617                  * of the first EOB in the buffer, since yy_c_buf_p will 
 618                  * already have been incremented past the NUL character 
 619                  * (since all states make transitions on EOB to the end- 
 620                  * of-buffer state).  Contrast this with the test in yyinput(). 
 622                 if ( yy_c_buf_p 
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] ) 
 623                     /* this was really a NUL */ 
 625                     yy_state_type yy_next_state
; 
 627                     yy_c_buf_p 
= yytext 
+ yy_amount_of_matched_text
; 
 629                     yy_current_state 
= yy_get_previous_state(); 
 631                     /* okay, we're now positioned to make the 
 632                      * NUL transition.  We couldn't have 
 633                      * yy_get_previous_state() go ahead and do it 
 634                      * for us because it doesn't know how to deal 
 635                      * with the possibility of jamming (and we 
 636                      * don't want to build jamming into it because 
 637                      * then it will run more slowly) 
 640                     yy_next_state 
= yy_try_NUL_trans( yy_current_state 
); 
 642                     yy_bp 
= yytext 
+ YY_MORE_ADJ
; 
 646                         /* consume the NUL */ 
 647                         yy_cp 
= ++yy_c_buf_p
; 
 648                         yy_current_state 
= yy_next_state
; 
 654                             yy_cp 
= yy_last_accepting_cpos
; 
 655                             yy_current_state 
= yy_last_accepting_state
; 
 660                 else switch ( yy_get_next_buffer() ) 
 662                     case EOB_ACT_END_OF_FILE
: 
 664                         yy_did_buffer_switch_on_eof 
= 0; 
 668                             /* note: because we've taken care in 
 669                              * yy_get_next_buffer() to have set up yytext, 
 670                              * we can now set up yy_c_buf_p so that if some 
 671                              * total hoser (like flex itself) wants 
 672                              * to call the scanner after we return the 
 673                              * YY_NULL, it'll still work - another YY_NULL 
 676                             yy_c_buf_p 
= yytext 
+ YY_MORE_ADJ
; 
 678                             yy_act 
= YY_STATE_EOF((yy_start 
- 1) / 2); 
 684                             if ( ! yy_did_buffer_switch_on_eof 
) 
 690                     case EOB_ACT_CONTINUE_SCAN
: 
 691                         yy_c_buf_p 
= yytext 
+ yy_amount_of_matched_text
; 
 693                         yy_current_state 
= yy_get_previous_state(); 
 696                         yy_bp 
= yytext 
+ YY_MORE_ADJ
; 
 699                     case EOB_ACT_LAST_MATCH
: 
 701                             &yy_current_buffer
->yy_ch_buf
[yy_n_chars
]; 
 703                         yy_current_state 
= yy_get_previous_state(); 
 706                         yy_bp 
= yytext 
+ YY_MORE_ADJ
; 
 714                 printf( "action # %d\n", yy_act 
); 
 717                         "fatal flex scanner internal error--no action found" ); 
 723 /* yy_get_next_buffer - try to read in a new buffer 
 726  *     int yy_get_next_buffer(); 
 728  * returns a code representing an action 
 729  *     EOB_ACT_LAST_MATCH -  
 730  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position 
 731  *     EOB_ACT_END_OF_FILE - end of file 
 734 static int yy_get_next_buffer() 
 737     register YY_CHAR 
*dest 
= yy_current_buffer
->yy_ch_buf
; 
 738     register YY_CHAR 
*source 
= yytext 
- 1; /* copy prev. char, too */ 
 739     register int number_to_move
, i
; 
 742     if ( yy_c_buf_p 
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars 
+ 1] ) 
 744                 "fatal flex scanner internal error--end of buffer missed" ); 
 746     /* try to read more data */ 
 748     /* first move last chars to start of buffer */ 
 749     number_to_move 
= yy_c_buf_p 
- yytext
; 
 751     for ( i 
= 0; i 
< number_to_move
; ++i 
) 
 752         *(dest
++) = *(source
++); 
 754     if ( yy_current_buffer
->yy_eof_status 
!= EOF_NOT_SEEN 
) 
 755         /* don't do the read, it's not guaranteed to return an EOF, 
 762         int num_to_read 
= yy_current_buffer
->yy_buf_size 
- number_to_move 
- 1; 
 764         if ( num_to_read 
> YY_READ_BUF_SIZE 
) 
 765             num_to_read 
= YY_READ_BUF_SIZE
; 
 767         else if ( num_to_read 
<= 0 ) 
 768             YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); 
 770         /* read in more data */ 
 771         YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]), 
 772                   yy_n_chars
, num_to_read 
); 
 775     if ( yy_n_chars 
== 0 ) 
 777         if ( number_to_move 
== 1 ) 
 779             ret_val 
= EOB_ACT_END_OF_FILE
; 
 780             yy_current_buffer
->yy_eof_status 
= EOF_DONE
; 
 785             ret_val 
= EOB_ACT_LAST_MATCH
; 
 786             yy_current_buffer
->yy_eof_status 
= EOF_PENDING
; 
 791         ret_val 
= EOB_ACT_CONTINUE_SCAN
; 
 793     yy_n_chars 
+= number_to_move
; 
 794     yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
; 
 795     yy_current_buffer
->yy_ch_buf
[yy_n_chars 
+ 1] = YY_END_OF_BUFFER_CHAR
; 
 797     /* yytext begins at the second character in yy_ch_buf; the first 
 798      * character is the one which preceded it before reading in the latest 
 799      * buffer; it needs to be kept around in case it's a newline, so 
 800      * yy_get_previous_state() will have with '^' rules active 
 803     yytext 
= &yy_current_buffer
->yy_ch_buf
[1]; 
 809 /* yy_get_previous_state - get the state just before the EOB char was reached 
 812  *     yy_state_type yy_get_previous_state(); 
 815 static yy_state_type 
yy_get_previous_state() 
 818     register yy_state_type yy_current_state
; 
 819     register YY_CHAR 
*yy_cp
; 
 821     yy_current_state 
= yy_start
; 
 823     for ( yy_cp 
= yytext 
+ YY_MORE_ADJ
; yy_cp 
< yy_c_buf_p
; ++yy_cp 
) 
 825         register YY_CHAR yy_c 
= (*yy_cp 
? yy_ec
[*yy_cp
] : 1); 
 826         if ( yy_accept
[yy_current_state
] ) 
 828             yy_last_accepting_state 
= yy_current_state
; 
 829             yy_last_accepting_cpos 
= yy_cp
; 
 831         while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state 
) 
 833             yy_current_state 
= yy_def
[yy_current_state
]; 
 834             if ( yy_current_state 
>= 34 ) 
 835                 yy_c 
= yy_meta
[yy_c
]; 
 837         yy_current_state 
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
]; 
 840     return ( yy_current_state 
); 
 844 /* yy_try_NUL_trans - try to make a transition on the NUL character 
 847  *     next_state = yy_try_NUL_trans( current_state ); 
 851 static yy_state_type 
yy_try_NUL_trans( register yy_state_type yy_current_state 
) 
 853 static yy_state_type 
yy_try_NUL_trans( yy_current_state 
) 
 854 register yy_state_type yy_current_state
; 
 858     register int yy_is_jam
; 
 859     register YY_CHAR 
*yy_cp 
= yy_c_buf_p
; 
 861     register YY_CHAR yy_c 
= 1; 
 862     if ( yy_accept
[yy_current_state
] ) 
 864         yy_last_accepting_state 
= yy_current_state
; 
 865         yy_last_accepting_cpos 
= yy_cp
; 
 867     while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state 
) 
 869         yy_current_state 
= yy_def
[yy_current_state
]; 
 870         if ( yy_current_state 
>= 34 ) 
 871             yy_c 
= yy_meta
[yy_c
]; 
 873     yy_current_state 
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
]; 
 874     yy_is_jam 
= (yy_current_state 
== 33); 
 876     return ( yy_is_jam 
? 0 : yy_current_state 
); 
 881 static void yyunput( YY_CHAR c
, register YY_CHAR 
*yy_bp 
) 
 883 static void yyunput( c
, yy_bp 
) 
 885 register YY_CHAR 
*yy_bp
; 
 889     register YY_CHAR 
*yy_cp 
= yy_c_buf_p
; 
 891     /* undo effects of setting up yytext */ 
 892     *yy_cp 
= yy_hold_char
; 
 894     if ( yy_cp 
< yy_current_buffer
->yy_ch_buf 
+ 2 ) 
 895         { /* need to shift things up to make room */ 
 896         register int number_to_move 
= yy_n_chars 
+ 2; /* +2 for EOB chars */ 
 897         register YY_CHAR 
*dest 
= 
 898             &yy_current_buffer
->yy_ch_buf
[yy_current_buffer
->yy_buf_size 
+ 2]; 
 899         register YY_CHAR 
*source 
= 
 900             &yy_current_buffer
->yy_ch_buf
[number_to_move
]; 
 902         while ( source 
> yy_current_buffer
->yy_ch_buf 
) 
 905         yy_cp 
+= dest 
- source
; 
 906         yy_bp 
+= dest 
- source
; 
 907         yy_n_chars 
= yy_current_buffer
->yy_buf_size
; 
 909         if ( yy_cp 
< yy_current_buffer
->yy_ch_buf 
+ 2 ) 
 910             YY_FATAL_ERROR( "flex scanner push-back overflow" ); 
 913     if ( yy_cp 
> yy_bp 
&& yy_cp
[-1] == '\n' ) 
 918     /* note: the formal parameter *must* be called "yy_bp" for this 
 919      *       macro to now work correctly 
 921     YY_DO_BEFORE_ACTION
; /* set up yytext again */ 
 933     YY_CHAR 
*yy_cp 
= yy_c_buf_p
; 
 935     *yy_cp 
= yy_hold_char
; 
 937     if ( *yy_c_buf_p 
== YY_END_OF_BUFFER_CHAR 
) 
 939         /* yy_c_buf_p now points to the character we want to return. 
 940          * If this occurs *before* the EOB characters, then it's a 
 941          * valid NUL; if not, then we've hit the end of the buffer. 
 943         if ( yy_c_buf_p 
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] ) 
 944             /* this was really a NUL */ 
 948             { /* need more input */ 
 952             switch ( yy_get_next_buffer() ) 
 954                 case EOB_ACT_END_OF_FILE
: 
 958                         yy_c_buf_p 
= yytext 
+ YY_MORE_ADJ
; 
 965                     return ( yyinput() ); 
 972                 case EOB_ACT_CONTINUE_SCAN
: 
 973                     yy_c_buf_p 
= yytext 
+ YY_MORE_ADJ
; 
 976                 case EOB_ACT_LAST_MATCH
: 
 978                     YY_FATAL_ERROR( "unexpected last match in yyinput()" ); 
 980                     YY_FATAL_ERROR( "unexpected last match in input()" ); 
 987     yy_hold_char 
= *++yy_c_buf_p
; 
 994 void yyrestart( FILE *input_file 
) 
 996 void yyrestart( input_file 
) 
1001     yy_init_buffer( yy_current_buffer
, input_file 
); 
1002     yy_load_buffer_state(); 
1006 #ifdef YY_USE_PROTOS 
1007 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer 
) 
1009 void yy_switch_to_buffer( new_buffer 
) 
1010 YY_BUFFER_STATE new_buffer
; 
1014     if ( yy_current_buffer 
== new_buffer 
) 
1017     if ( yy_current_buffer 
) 
1019         /* flush out information for old buffer */ 
1020         *yy_c_buf_p 
= yy_hold_char
; 
1021         yy_current_buffer
->yy_buf_pos 
= yy_c_buf_p
; 
1022         yy_current_buffer
->yy_n_chars 
= yy_n_chars
; 
1025     yy_current_buffer 
= new_buffer
; 
1026     yy_load_buffer_state(); 
1028     /* we don't actually know whether we did this switch during 
1029      * EOF (yywrap()) processing, but the only time this flag 
1030      * is looked at is after yywrap() is called, so it's safe 
1031      * to go ahead and always set it. 
1033     yy_did_buffer_switch_on_eof 
= 1; 
1037 #ifdef YY_USE_PROTOS 
1038 void yy_load_buffer_state( void ) 
1040 void yy_load_buffer_state() 
1044     yy_n_chars 
= yy_current_buffer
->yy_n_chars
; 
1045     yytext 
= yy_c_buf_p 
= yy_current_buffer
->yy_buf_pos
; 
1046     yyin 
= yy_current_buffer
->yy_input_file
; 
1047     yy_hold_char 
= *yy_c_buf_p
; 
1051 #ifdef YY_USE_PROTOS 
1052 YY_BUFFER_STATE 
yy_create_buffer( FILE *file
, int size 
) 
1054 YY_BUFFER_STATE 
yy_create_buffer( file
, size 
) 
1062     b 
= (YY_BUFFER_STATE
) malloc( sizeof( struct yy_buffer_state 
) ); 
1065         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
1067     b
->yy_buf_size 
= size
; 
1069     /* yy_ch_buf has to be 2 characters longer than the size given because 
1070      * we need to put in 2 end-of-buffer characters. 
1072     b
->yy_ch_buf 
= (YY_CHAR 
*) malloc( (unsigned) (b
->yy_buf_size 
+ 2) ); 
1074     if ( ! b
->yy_ch_buf 
) 
1075         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
1077     yy_init_buffer( b
, file 
); 
1083 #ifdef YY_USE_PROTOS 
1084 void yy_delete_buffer( YY_BUFFER_STATE b 
) 
1086 void yy_delete_buffer( b 
) 
1091     if ( b 
== yy_current_buffer 
) 
1092         yy_current_buffer 
= (YY_BUFFER_STATE
) 0; 
1094     free( (char *) b
->yy_ch_buf 
); 
1099 #ifdef YY_USE_PROTOS 
1100 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file 
) 
1102 void yy_init_buffer( b
, file 
) 
1108     b
->yy_input_file 
= file
; 
1110     /* we put in the '\n' and start reading from [1] so that an 
1111      * initial match-at-newline will be true. 
1114     b
->yy_ch_buf
[0] = '\n'; 
1117     /* we always need two end-of-buffer characters.  The first causes 
1118      * a transition to the end-of-buffer state.  The second causes 
1119      * a jam in that state. 
1121     b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
; 
1122     b
->yy_ch_buf
[2] = YY_END_OF_BUFFER_CHAR
; 
1124     b
->yy_buf_pos 
= &b
->yy_ch_buf
[1]; 
1126     b
->yy_eof_status 
= EOF_NOT_SEEN
; 
1128 # line 108 "lexer.l" 
1133 static int lex_input() { 
1136 #else   /* BSD/AT&T lex */ 
1138 # error "Sorry, but need either flex or AT&T lex" 
1140 static int lex_input() { 
1144 # define unput(_c) my_unput(_c) 
1148 # define input() my_input() 
1149 static int my_unput(char c
) 
1151   if (lex_read_from_string
) { 
1152     /* Make sure we have something */ 
1153     if (lex_string_ptr
) { 
1154       if (c 
== '\n') yylineno
--; 
1158     yytchar
= (c
);if(yytchar
=='\n')yylineno
--;*yysptr
++=yytchar
; 
1159 /*    unput(c); Causes infinite recursion! */ 
1167 void LexFromFile(FILE *fd
) 
1169   lex_read_from_string 
= 0; 
1171   /* Don't know why this is necessary, but otherwise 
1172    * lex only works _once_! 
1179 void LexFromString(char *buffer
) 
1181   lex_read_from_string 
= 1; 
1182   lex_buffer 
= buffer
; 
1183   lex_buffer_length 
= strlen(buffer
); 
1185   /* Don't know why this is necessary, but otherwise 
1186    * lex only works _once_! 
1193 static int my_input( void ) 
1195   if (lex_read_from_string
) { 
1196     if (lex_string_ptr 
== lex_buffer_length
) 
1199       char c 
= lex_buffer
[lex_string_ptr
++]; 
1200 #ifndef FLEX_SCANNER 
1201       if (c 
== '\n') yylineno
++; 
1210 void wxExprCleanUp() 
1212         if (yy_current_buffer
) 
1213                 yy_delete_buffer(yy_current_buffer
);