00001 #line 2 "do-lexer.cpp"
00002
00003 #line 4 "do-lexer.cpp"
00004
00005 #define YY_INT_ALIGNED short int
00006
00007
00008
00009 #define yy_create_buffer do_create_buffer
00010 #define yy_delete_buffer do_delete_buffer
00011 #define yy_flex_debug do_flex_debug
00012 #define yy_init_buffer do_init_buffer
00013 #define yy_flush_buffer do_flush_buffer
00014 #define yy_load_buffer_state do_load_buffer_state
00015 #define yy_switch_to_buffer do_switch_to_buffer
00016 #define yyin doin
00017 #define yyleng doleng
00018 #define yylex dolex
00019 #define yylineno dolineno
00020 #define yyout doout
00021 #define yyrestart dorestart
00022 #define yytext dotext
00023 #define yywrap dowrap
00024 #define yyalloc doalloc
00025 #define yyrealloc dorealloc
00026 #define yyfree dofree
00027
00028 #define FLEX_SCANNER
00029 #define YY_FLEX_MAJOR_VERSION 2
00030 #define YY_FLEX_MINOR_VERSION 5
00031 #define YY_FLEX_SUBMINOR_VERSION 35
00032 #if YY_FLEX_SUBMINOR_VERSION > 0
00033 #define FLEX_BETA
00034 #endif
00035
00036
00037
00038
00039 #include <stdio.h>
00040 #include <string.h>
00041 #include <errno.h>
00042 #include <stdlib.h>
00043
00044
00045
00046
00047
00048 #ifndef FLEXINT_H
00049 #define FLEXINT_H
00050
00051
00052
00053 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00054
00055
00056
00057
00058 #ifndef __STDC_LIMIT_MACROS
00059 #define __STDC_LIMIT_MACROS 1
00060 #endif
00061
00062 #include <inttypes.h>
00063 typedef int8_t flex_int8_t;
00064 typedef uint8_t flex_uint8_t;
00065 typedef int16_t flex_int16_t;
00066 typedef uint16_t flex_uint16_t;
00067 typedef int32_t flex_int32_t;
00068 typedef uint32_t flex_uint32_t;
00069 #else
00070 typedef signed char flex_int8_t;
00071 typedef short int flex_int16_t;
00072 typedef int flex_int32_t;
00073 typedef unsigned char flex_uint8_t;
00074 typedef unsigned short int flex_uint16_t;
00075 typedef unsigned int flex_uint32_t;
00076
00077
00078 #ifndef INT8_MIN
00079 #define INT8_MIN (-128)
00080 #endif
00081 #ifndef INT16_MIN
00082 #define INT16_MIN (-32767-1)
00083 #endif
00084 #ifndef INT32_MIN
00085 #define INT32_MIN (-2147483647-1)
00086 #endif
00087 #ifndef INT8_MAX
00088 #define INT8_MAX (127)
00089 #endif
00090 #ifndef INT16_MAX
00091 #define INT16_MAX (32767)
00092 #endif
00093 #ifndef INT32_MAX
00094 #define INT32_MAX (2147483647)
00095 #endif
00096 #ifndef UINT8_MAX
00097 #define UINT8_MAX (255U)
00098 #endif
00099 #ifndef UINT16_MAX
00100 #define UINT16_MAX (65535U)
00101 #endif
00102 #ifndef UINT32_MAX
00103 #define UINT32_MAX (4294967295U)
00104 #endif
00105
00106 #endif
00107
00108 #endif
00109
00110 #ifdef __cplusplus
00111
00112
00113 #define YY_USE_CONST
00114
00115 #else
00116
00117
00118 #if defined (__STDC__)
00119
00120 #define YY_USE_CONST
00121
00122 #endif
00123 #endif
00124
00125 #ifdef YY_USE_CONST
00126 #define yyconst const
00127 #else
00128 #define yyconst
00129 #endif
00130
00131
00132 #define YY_NULL 0
00133
00134
00135
00136
00137
00138
00139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00140
00141
00142
00143
00144
00145 #define BEGIN (yy_start) = 1 + 2 *
00146
00147
00148
00149
00150
00151 #define YY_START (((yy_start) - 1) / 2)
00152 #define YYSTATE YY_START
00153
00154
00155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00156
00157
00158 #define YY_NEW_FILE dorestart(doin )
00159
00160 #define YY_END_OF_BUFFER_CHAR 0
00161
00162
00163 #ifndef YY_BUF_SIZE
00164 #ifdef __ia64__
00165
00166
00167
00168
00169 #define YY_BUF_SIZE 32768
00170 #else
00171 #define YY_BUF_SIZE 16384
00172 #endif
00173 #endif
00174
00175
00176
00177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00178
00179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00180 #define YY_TYPEDEF_YY_BUFFER_STATE
00181 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00182 #endif
00183
00184 extern int doleng;
00185
00186 extern FILE *doin, *doout;
00187
00188 #define EOB_ACT_CONTINUE_SCAN 0
00189 #define EOB_ACT_END_OF_FILE 1
00190 #define EOB_ACT_LAST_MATCH 2
00191
00192
00193
00194
00195
00196
00197
00198
00199 #define YY_LESS_LINENO(n) \
00200 do { \
00201 int yyl;\
00202 for ( yyl = n; yyl < doleng; ++yyl )\
00203 if ( dotext[yyl] == '\n' )\
00204 --dolineno;\
00205 }while(0)
00206
00207
00208 #define yyless(n) \
00209 do \
00210 { \
00211 \
00212 int yyless_macro_arg = (n); \
00213 YY_LESS_LINENO(yyless_macro_arg);\
00214 *yy_cp = (yy_hold_char); \
00215 YY_RESTORE_YY_MORE_OFFSET \
00216 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00217 YY_DO_BEFORE_ACTION; \
00218 } \
00219 while ( 0 )
00220
00221 #define unput(c) yyunput( c, (yytext_ptr) )
00222
00223 #ifndef YY_TYPEDEF_YY_SIZE_T
00224 #define YY_TYPEDEF_YY_SIZE_T
00225 typedef size_t yy_size_t;
00226 #endif
00227
00228 #ifndef YY_STRUCT_YY_BUFFER_STATE
00229 #define YY_STRUCT_YY_BUFFER_STATE
00230 struct yy_buffer_state
00231 {
00232 FILE *yy_input_file;
00233
00234 char *yy_ch_buf;
00235 char *yy_buf_pos;
00236
00237
00238
00239
00240 yy_size_t yy_buf_size;
00241
00242
00243
00244
00245 int yy_n_chars;
00246
00247
00248
00249
00250
00251 int yy_is_our_buffer;
00252
00253
00254
00255
00256
00257
00258 int yy_is_interactive;
00259
00260
00261
00262
00263
00264 int yy_at_bol;
00265
00266 int yy_bs_lineno;
00267 int yy_bs_column;
00269
00270
00271
00272 int yy_fill_buffer;
00273
00274 int yy_buffer_status;
00275
00276 #define YY_BUFFER_NEW 0
00277 #define YY_BUFFER_NORMAL 1
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288 #define YY_BUFFER_EOF_PENDING 2
00289
00290 };
00291 #endif
00292
00293
00294 static size_t yy_buffer_stack_top = 0;
00295 static size_t yy_buffer_stack_max = 0;
00296 static YY_BUFFER_STATE * yy_buffer_stack = 0;
00298
00299
00300
00301
00302
00303
00304 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00305 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00306 : NULL)
00307
00308
00309
00310
00311 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00312
00313
00314 static char yy_hold_char;
00315 static int yy_n_chars;
00316 int doleng;
00317
00318
00319 static char *yy_c_buf_p = (char *) 0;
00320 static int yy_init = 0;
00321 static int yy_start = 0;
00322
00323
00324
00325
00326 static int yy_did_buffer_switch_on_eof;
00327
00328 void dorestart (FILE *input_file );
00329 void do_switch_to_buffer (YY_BUFFER_STATE new_buffer );
00330 YY_BUFFER_STATE do_create_buffer (FILE *file,int size );
00331 void do_delete_buffer (YY_BUFFER_STATE b );
00332 void do_flush_buffer (YY_BUFFER_STATE b );
00333 void dopush_buffer_state (YY_BUFFER_STATE new_buffer );
00334 void dopop_buffer_state (void );
00335
00336 static void doensure_buffer_stack (void );
00337 static void do_load_buffer_state (void );
00338 static void do_init_buffer (YY_BUFFER_STATE b,FILE *file );
00339
00340 #define YY_FLUSH_BUFFER do_flush_buffer(YY_CURRENT_BUFFER )
00341
00342 YY_BUFFER_STATE do_scan_buffer (char *base,yy_size_t size );
00343 YY_BUFFER_STATE do_scan_string (yyconst char *yy_str );
00344 YY_BUFFER_STATE do_scan_bytes (yyconst char *bytes,int len );
00345
00346 void *doalloc (yy_size_t );
00347 void *dorealloc (void *,yy_size_t );
00348 void dofree (void * );
00349
00350 #define yy_new_buffer do_create_buffer
00351
00352 #define yy_set_interactive(is_interactive) \
00353 { \
00354 if ( ! YY_CURRENT_BUFFER ){ \
00355 doensure_buffer_stack (); \
00356 YY_CURRENT_BUFFER_LVALUE = \
00357 do_create_buffer(doin,YY_BUF_SIZE ); \
00358 } \
00359 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00360 }
00361
00362 #define yy_set_bol(at_bol) \
00363 { \
00364 if ( ! YY_CURRENT_BUFFER ){\
00365 doensure_buffer_stack (); \
00366 YY_CURRENT_BUFFER_LVALUE = \
00367 do_create_buffer(doin,YY_BUF_SIZE ); \
00368 } \
00369 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00370 }
00371
00372 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00373
00374
00375
00376 typedef unsigned char YY_CHAR;
00377
00378 FILE *doin = (FILE *) 0, *doout = (FILE *) 0;
00379
00380 typedef int yy_state_type;
00381
00382 extern int dolineno;
00383
00384 int dolineno = 1;
00385
00386 extern char *dotext;
00387 #define yytext_ptr dotext
00388
00389 static yy_state_type yy_get_previous_state (void );
00390 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
00391 static int yy_get_next_buffer (void );
00392 static void yy_fatal_error (yyconst char msg[] );
00393
00394
00395
00396
00397 #define YY_DO_BEFORE_ACTION \
00398 (yytext_ptr) = yy_bp; \
00399 doleng = (size_t) (yy_cp - yy_bp); \
00400 (yy_hold_char) = *yy_cp; \
00401 *yy_cp = '\0'; \
00402 (yy_c_buf_p) = yy_cp;
00403
00404 #define YY_NUM_RULES 31
00405 #define YY_END_OF_BUFFER 32
00406
00407
00408 struct yy_trans_info
00409 {
00410 flex_int32_t yy_verify;
00411 flex_int32_t yy_nxt;
00412 };
00413 static yyconst flex_int16_t yy_accept[85] =
00414 { 0,
00415 0, 0, 32, 31, 2, 2, 31, 22, 23, 24,
00416 25, 31, 6, 20, 27, 26, 28, 7, 29, 20,
00417 31, 10, 20, 20, 20, 20, 20, 3, 4, 30,
00418 21, 9, 22, 20, 20, 8, 5, 0, 0, 20,
00419 20, 20, 20, 20, 20, 0, 1, 20, 0, 0,
00420 20, 20, 20, 20, 20, 20, 20, 0, 0, 20,
00421 20, 12, 20, 14, 20, 20, 0, 0, 11, 17,
00422 20, 20, 20, 15, 0, 20, 20, 20, 16, 13,
00423 20, 18, 19, 0
00424 } ;
00425
00426 static yyconst flex_int32_t yy_ec[256] =
00427 { 0,
00428 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00429 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
00430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00431 1, 4, 5, 1, 6, 1, 1, 7, 1, 8,
00432 9, 10, 11, 12, 11, 7, 13, 14, 14, 14,
00433 14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
00434 18, 19, 1, 1, 20, 20, 20, 20, 20, 20,
00435 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00436 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00437 21, 1, 22, 1, 20, 23, 24, 20, 25, 26,
00438
00439 27, 20, 28, 20, 29, 20, 20, 30, 31, 32,
00440 33, 34, 20, 35, 36, 37, 38, 39, 40, 20,
00441 20, 20, 41, 1, 42, 43, 1, 1, 1, 1,
00442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00449
00450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00455 1, 1, 1, 1, 1
00456 } ;
00457
00458 static yyconst flex_int32_t yy_meta[44] =
00459 { 0,
00460 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
00461 1, 1, 3, 3, 1, 1, 1, 1, 1, 3,
00462 1, 1, 1, 3, 3, 3, 3, 3, 3, 3,
00463 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00464 1, 1, 1
00465 } ;
00466
00467 static yyconst flex_int16_t yy_base[87] =
00468 { 0,
00469 0, 0, 161, 162, 162, 146, 141, 0, 162, 162,
00470 162, 144, 162, 144, 162, 162, 162, 138, 162, 0,
00471 22, 162, 15, 131, 127, 119, 123, 162, 162, 162,
00472 137, 162, 0, 0, 62, 162, 162, 123, 114, 124,
00473 115, 109, 10, 118, 109, 99, 162, 0, 119, 112,
00474 86, 85, 96, 82, 93, 81, 78, 88, 74, 74,
00475 72, 0, 84, 0, 83, 23, 38, 32, 0, 0,
00476 30, 19, 31, 162, 32, 26, 19, 21, 162, 0,
00477 15, 0, 0, 162, 139, 46
00478 } ;
00479
00480 static yyconst flex_int16_t yy_def[87] =
00481 { 0,
00482 84, 1, 84, 84, 84, 84, 84, 85, 84, 84,
00483 84, 84, 84, 86, 84, 84, 84, 84, 84, 86,
00484 84, 84, 86, 86, 86, 86, 86, 84, 84, 84,
00485 84, 84, 85, 86, 84, 84, 84, 84, 84, 86,
00486 86, 86, 86, 86, 86, 35, 84, 35, 84, 84,
00487 86, 86, 86, 86, 86, 86, 86, 84, 84, 86,
00488 86, 86, 86, 86, 86, 86, 84, 84, 86, 86,
00489 86, 86, 86, 84, 84, 86, 86, 86, 84, 86,
00490 86, 86, 86, 0, 84, 84
00491 } ;
00492
00493 static yyconst flex_int16_t yy_nxt[206] =
00494 { 0,
00495 4, 5, 5, 6, 7, 8, 4, 9, 10, 11,
00496 12, 13, 14, 4, 15, 16, 17, 18, 19, 20,
00497 21, 4, 22, 20, 23, 24, 20, 20, 20, 20,
00498 25, 20, 26, 20, 20, 20, 20, 20, 27, 20,
00499 28, 29, 30, 37, 40, 54, 55, 41, 34, 83,
00500 82, 81, 80, 79, 78, 77, 38, 76, 75, 74,
00501 73, 39, 46, 46, 47, 46, 46, 46, 48, 46,
00502 46, 46, 46, 46, 48, 48, 46, 46, 46, 46,
00503 46, 48, 46, 46, 46, 48, 48, 48, 48, 48,
00504 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
00505
00506 48, 48, 46, 46, 46, 46, 72, 71, 70, 69,
00507 68, 46, 46, 67, 66, 65, 64, 63, 46, 62,
00508 61, 60, 46, 46, 46, 46, 46, 46, 46, 46,
00509 46, 46, 46, 46, 46, 46, 46, 46, 46, 33,
00510 59, 33, 58, 57, 56, 53, 52, 51, 50, 49,
00511 31, 45, 44, 43, 42, 36, 35, 31, 32, 31,
00512 84, 3, 84, 84, 84, 84, 84, 84, 84, 84,
00513 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00514 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00515 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00516
00517 84, 84, 84, 84, 84
00518 } ;
00519
00520 static yyconst flex_int16_t yy_chk[206] =
00521 { 0,
00522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00524 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00526 1, 1, 1, 21, 23, 43, 43, 23, 86, 81,
00527 78, 77, 76, 75, 73, 72, 21, 71, 68, 67,
00528 66, 21, 35, 35, 35, 35, 35, 35, 35, 35,
00529 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
00530 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
00531 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
00532
00533 35, 35, 35, 35, 35, 46, 65, 63, 61, 60,
00534 59, 46, 46, 58, 57, 56, 55, 54, 46, 53,
00535 52, 51, 46, 46, 46, 46, 46, 46, 46, 46,
00536 46, 46, 46, 46, 46, 46, 46, 46, 46, 85,
00537 50, 85, 49, 45, 44, 42, 41, 40, 39, 38,
00538 31, 27, 26, 25, 24, 18, 14, 12, 7, 6,
00539 3, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00540 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00541 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00542 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
00543
00544 84, 84, 84, 84, 84
00545 } ;
00546
00547
00548 static yyconst flex_int32_t yy_rule_can_match_eol[32] =
00549 { 0,
00550 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
00552
00553 static yy_state_type yy_last_accepting_state;
00554 static char *yy_last_accepting_cpos;
00555
00556 extern int do_flex_debug;
00557 int do_flex_debug = 0;
00558
00559
00560
00561
00562 #define REJECT reject_used_but_not_detected
00563 #define yymore() yymore_used_but_not_detected
00564 #define YY_MORE_ADJ 0
00565 #define YY_RESTORE_YY_MORE_OFFSET
00566 char *dotext;
00567 #line 1 "do-lexer.l"
00568 #line 2 "do-lexer.l"
00569 #include <stdlib.h>
00570 #include <ctype.h>
00571 #include <assert.h>
00572 #define YYSTYPE char*
00573 #include "do-syntax.h"
00574 static int read_string(char open, char close);
00575 #line 576 "do-lexer.cpp"
00576
00577 #define INITIAL 0
00578
00579 #ifndef YY_NO_UNISTD_H
00580
00581
00582
00583
00584 #include <unistd.h>
00585 #endif
00586
00587 #ifndef YY_EXTRA_TYPE
00588 #define YY_EXTRA_TYPE void *
00589 #endif
00590
00591 static int yy_init_globals (void );
00592
00593
00594
00595
00596 int dolex_destroy (void );
00597
00598 int doget_debug (void );
00599
00600 void doset_debug (int debug_flag );
00601
00602 YY_EXTRA_TYPE doget_extra (void );
00603
00604 void doset_extra (YY_EXTRA_TYPE user_defined );
00605
00606 FILE *doget_in (void );
00607
00608 void doset_in (FILE * in_str );
00609
00610 FILE *doget_out (void );
00611
00612 void doset_out (FILE * out_str );
00613
00614 int doget_leng (void );
00615
00616 char *doget_text (void );
00617
00618 int doget_lineno (void );
00619
00620 void doset_lineno (int line_number );
00621
00622
00623
00624
00625
00626 #ifndef YY_SKIP_YYWRAP
00627 #ifdef __cplusplus
00628 extern "C" int dowrap (void );
00629 #else
00630 extern int dowrap (void );
00631 #endif
00632 #endif
00633
00634 static void yyunput (int c,char *buf_ptr );
00635
00636 #ifndef yytext_ptr
00637 static void yy_flex_strncpy (char *,yyconst char *,int );
00638 #endif
00639
00640 #ifdef YY_NEED_STRLEN
00641 static int yy_flex_strlen (yyconst char * );
00642 #endif
00643
00644 #ifndef YY_NO_INPUT
00645
00646 #ifdef __cplusplus
00647 static int yyinput (void );
00648 #else
00649 static int input (void );
00650 #endif
00651
00652 #endif
00653
00654
00655 #ifndef YY_READ_BUF_SIZE
00656 #ifdef __ia64__
00657
00658 #define YY_READ_BUF_SIZE 16384
00659 #else
00660 #define YY_READ_BUF_SIZE 8192
00661 #endif
00662 #endif
00663
00664
00665 #ifndef ECHO
00666
00667
00668
00669 #define ECHO do { if (fwrite( dotext, doleng, 1, doout )) {} } while (0)
00670 #endif
00671
00672
00673
00674
00675 #ifndef YY_INPUT
00676 #define YY_INPUT(buf,result,max_size) \
00677 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00678 { \
00679 int c = '*'; \
00680 size_t n; \
00681 for ( n = 0; n < max_size && \
00682 (c = getc( doin )) != EOF && c != '\n'; ++n ) \
00683 buf[n] = (char) c; \
00684 if ( c == '\n' ) \
00685 buf[n++] = (char) c; \
00686 if ( c == EOF && ferror( doin ) ) \
00687 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00688 result = n; \
00689 } \
00690 else \
00691 { \
00692 errno=0; \
00693 while ( (result = fread(buf, 1, max_size, doin))==0 && ferror(doin)) \
00694 { \
00695 if( errno != EINTR) \
00696 { \
00697 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00698 break; \
00699 } \
00700 errno=0; \
00701 clearerr(doin); \
00702 } \
00703 }\
00704 \
00705
00706 #endif
00707
00708
00709
00710
00711
00712 #ifndef yyterminate
00713 #define yyterminate() return YY_NULL
00714 #endif
00715
00716
00717 #ifndef YY_START_STACK_INCR
00718 #define YY_START_STACK_INCR 25
00719 #endif
00720
00721
00722 #ifndef YY_FATAL_ERROR
00723 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00724 #endif
00725
00726
00727
00728
00729
00730
00731 #ifndef YY_DECL
00732 #define YY_DECL_IS_OURS 1
00733
00734 extern int dolex (void);
00735
00736 #define YY_DECL int dolex (void)
00737 #endif
00738
00739
00740
00741
00742 #ifndef YY_USER_ACTION
00743 #define YY_USER_ACTION
00744 #endif
00745
00746
00747 #ifndef YY_BREAK
00748 #define YY_BREAK break;
00749 #endif
00750
00751 #define YY_RULE_SETUP \
00752 YY_USER_ACTION
00753
00756 YY_DECL
00757 {
00758 register yy_state_type yy_current_state;
00759 register char *yy_cp, *yy_bp;
00760 register int yy_act;
00761
00762 #line 12 "do-lexer.l"
00763
00764
00765 #line 766 "do-lexer.cpp"
00766
00767 if ( !(yy_init) )
00768 {
00769 (yy_init) = 1;
00770
00771 #ifdef YY_USER_INIT
00772 YY_USER_INIT;
00773 #endif
00774
00775 if ( ! (yy_start) )
00776 (yy_start) = 1;
00777
00778 if ( ! doin )
00779 doin = stdin;
00780
00781 if ( ! doout )
00782 doout = stdout;
00783
00784 if ( ! YY_CURRENT_BUFFER ) {
00785 doensure_buffer_stack ();
00786 YY_CURRENT_BUFFER_LVALUE =
00787 do_create_buffer(doin,YY_BUF_SIZE );
00788 }
00789
00790 do_load_buffer_state( );
00791 }
00792
00793 while ( 1 )
00794 {
00795 yy_cp = (yy_c_buf_p);
00796
00797
00798 *yy_cp = (yy_hold_char);
00799
00800
00801
00802
00803 yy_bp = yy_cp;
00804
00805 yy_current_state = (yy_start);
00806 yy_match:
00807 do
00808 {
00809 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00810 if ( yy_accept[yy_current_state] )
00811 {
00812 (yy_last_accepting_state) = yy_current_state;
00813 (yy_last_accepting_cpos) = yy_cp;
00814 }
00815 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00816 {
00817 yy_current_state = (int) yy_def[yy_current_state];
00818 if ( yy_current_state >= 85 )
00819 yy_c = yy_meta[(unsigned int) yy_c];
00820 }
00821 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00822 ++yy_cp;
00823 }
00824 while ( yy_base[yy_current_state] != 162 );
00825
00826 yy_find_action:
00827 yy_act = yy_accept[yy_current_state];
00828 if ( yy_act == 0 )
00829 {
00830 yy_cp = (yy_last_accepting_cpos);
00831 yy_current_state = (yy_last_accepting_state);
00832 yy_act = yy_accept[yy_current_state];
00833 }
00834
00835 YY_DO_BEFORE_ACTION;
00836
00837 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
00838 {
00839 int yyl;
00840 for ( yyl = 0; yyl < doleng; ++yyl )
00841 if ( dotext[yyl] == '\n' )
00842
00843 dolineno++;
00844 ;
00845 }
00846
00847 do_action:
00848
00849 switch ( yy_act )
00850 {
00851 case 0:
00852
00853 *yy_cp = (yy_hold_char);
00854 yy_cp = (yy_last_accepting_cpos);
00855 yy_current_state = (yy_last_accepting_state);
00856 goto yy_find_action;
00857
00858 case 1:
00859
00860 YY_RULE_SETUP
00861 #line 14 "do-lexer.l"
00862 {}
00863 YY_BREAK
00864 case 2:
00865
00866 YY_RULE_SETUP
00867 #line 15 "do-lexer.l"
00868 {}
00869 YY_BREAK
00870 case 3:
00871 YY_RULE_SETUP
00872 #line 16 "do-lexer.l"
00873 return LBRACE;
00874 YY_BREAK
00875 case 4:
00876 YY_RULE_SETUP
00877 #line 17 "do-lexer.l"
00878 return RBRACE;
00879 YY_BREAK
00880 case 5:
00881 YY_RULE_SETUP
00882 #line 18 "do-lexer.l"
00883 return BRACKETS;
00884 YY_BREAK
00885 case 6:
00886 YY_RULE_SETUP
00887 #line 19 "do-lexer.l"
00888 return COMMA;
00889 YY_BREAK
00890 case 7:
00891 YY_RULE_SETUP
00892 #line 20 "do-lexer.l"
00893 return ASSIGNMENT;
00894 YY_BREAK
00895 case 8:
00896 YY_RULE_SETUP
00897 #line 21 "do-lexer.l"
00898 return EQUALITY;
00899 YY_BREAK
00900 case 9:
00901 YY_RULE_SETUP
00902 #line 22 "do-lexer.l"
00903 return NEQ;
00904 YY_BREAK
00905 case 10:
00906 YY_RULE_SETUP
00907 #line 23 "do-lexer.l"
00908 return read_string('`','ī');
00909 YY_BREAK
00910 case 11:
00911 YY_RULE_SETUP
00912 #line 24 "do-lexer.l"
00913 return CLASS;
00914 YY_BREAK
00915 case 12:
00916 YY_RULE_SETUP
00917 #line 25 "do-lexer.l"
00918 return DATA;
00919 YY_BREAK
00920 case 13:
00921 YY_RULE_SETUP
00922 #line 26 "do-lexer.l"
00923 return MESSAGE;
00924 YY_BREAK
00925 case 14:
00926 YY_RULE_SETUP
00927 #line 27 "do-lexer.l"
00928 return META;
00929 YY_BREAK
00930 case 15:
00931 YY_RULE_SETUP
00932 #line 28 "do-lexer.l"
00933 return READ;
00934 YY_BREAK
00935 case 16:
00936 YY_RULE_SETUP
00937 #line 29 "do-lexer.l"
00938 return WRITE;
00939 YY_BREAK
00940 case 17:
00941 YY_RULE_SETUP
00942 #line 30 "do-lexer.l"
00943 return CONST;
00944 YY_BREAK
00945 case 18:
00946 YY_RULE_SETUP
00947 #line 31 "do-lexer.l"
00948 return VIRTUAL;
00949 YY_BREAK
00950 case 19:
00951 YY_RULE_SETUP
00952 #line 32 "do-lexer.l"
00953 return OPERATOR;
00954 YY_BREAK
00955 case 20:
00956 YY_RULE_SETUP
00957 #line 33 "do-lexer.l"
00958 {
00959 dolval = strdup(dotext);
00960 return NAME;
00961 }
00962 YY_BREAK
00963 case 21:
00964 YY_RULE_SETUP
00965 #line 37 "do-lexer.l"
00966 {
00967 dolval = strdup(dotext);
00968 return NUMBER;
00969 }
00970 YY_BREAK
00971 case 22:
00972 YY_RULE_SETUP
00973 #line 41 "do-lexer.l"
00974 {
00975 dolval = strdup(dotext);
00976 return PRECOMPILER;
00977 }
00978 YY_BREAK
00979 case 23:
00980 YY_RULE_SETUP
00981 #line 45 "do-lexer.l"
00982 return LPAREN;
00983 YY_BREAK
00984 case 24:
00985 YY_RULE_SETUP
00986 #line 46 "do-lexer.l"
00987 return RPAREN;
00988 YY_BREAK
00989 case 25:
00990 YY_RULE_SETUP
00991 #line 47 "do-lexer.l"
00992 return STAR;
00993 YY_BREAK
00994 case 26:
00995 YY_RULE_SETUP
00996 #line 48 "do-lexer.l"
00997 return SEMICOLON;
00998 YY_BREAK
00999 case 27:
01000 YY_RULE_SETUP
01001 #line 49 "do-lexer.l"
01002 return COLON;
01003 YY_BREAK
01004 case 28:
01005 YY_RULE_SETUP
01006 #line 50 "do-lexer.l"
01007 return TEMPLATE_OPEN;
01008 YY_BREAK
01009 case 29:
01010 YY_RULE_SETUP
01011 #line 51 "do-lexer.l"
01012 return TEMPLATE_CLOSE;
01013 YY_BREAK
01014 case 30:
01015 YY_RULE_SETUP
01016 #line 52 "do-lexer.l"
01017 return TILDE;
01018 YY_BREAK
01019 case 31:
01020 YY_RULE_SETUP
01021 #line 53 "do-lexer.l"
01022 ECHO;
01023 YY_BREAK
01024 #line 1025 "do-lexer.cpp"
01025 case YY_STATE_EOF(INITIAL):
01026 yyterminate();
01027
01028 case YY_END_OF_BUFFER:
01029 {
01030
01031 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
01032
01033
01034 *yy_cp = (yy_hold_char);
01035 YY_RESTORE_YY_MORE_OFFSET
01036
01037 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01038 {
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01049 YY_CURRENT_BUFFER_LVALUE->yy_input_file = doin;
01050 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01051 }
01052
01053
01054
01055
01056
01057
01058
01059
01060 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01061 {
01062 yy_state_type yy_next_state;
01063
01064 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
01065
01066 yy_current_state = yy_get_previous_state( );
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077 yy_next_state = yy_try_NUL_trans( yy_current_state );
01078
01079 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01080
01081 if ( yy_next_state )
01082 {
01083
01084 yy_cp = ++(yy_c_buf_p);
01085 yy_current_state = yy_next_state;
01086 goto yy_match;
01087 }
01088
01089 else
01090 {
01091 yy_cp = (yy_c_buf_p);
01092 goto yy_find_action;
01093 }
01094 }
01095
01096 else switch ( yy_get_next_buffer( ) )
01097 {
01098 case EOB_ACT_END_OF_FILE:
01099 {
01100 (yy_did_buffer_switch_on_eof) = 0;
01101
01102 if ( dowrap( ) )
01103 {
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
01114
01115 yy_act = YY_STATE_EOF(YY_START);
01116 goto do_action;
01117 }
01118
01119 else
01120 {
01121 if ( ! (yy_did_buffer_switch_on_eof) )
01122 YY_NEW_FILE;
01123 }
01124 break;
01125 }
01126
01127 case EOB_ACT_CONTINUE_SCAN:
01128 (yy_c_buf_p) =
01129 (yytext_ptr) + yy_amount_of_matched_text;
01130
01131 yy_current_state = yy_get_previous_state( );
01132
01133 yy_cp = (yy_c_buf_p);
01134 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01135 goto yy_match;
01136
01137 case EOB_ACT_LAST_MATCH:
01138 (yy_c_buf_p) =
01139 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
01140
01141 yy_current_state = yy_get_previous_state( );
01142
01143 yy_cp = (yy_c_buf_p);
01144 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01145 goto yy_find_action;
01146 }
01147 break;
01148 }
01149
01150 default:
01151 YY_FATAL_ERROR(
01152 "fatal flex scanner internal error--no action found" );
01153 }
01154 }
01155 }
01156
01157
01158
01159
01160
01161
01162
01163
01164 static int yy_get_next_buffer (void)
01165 {
01166 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01167 register char *source = (yytext_ptr);
01168 register int number_to_move, i;
01169 int ret_val;
01170
01171 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
01172 YY_FATAL_ERROR(
01173 "fatal flex scanner internal error--end of buffer missed" );
01174
01175 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01176 {
01177 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
01178 {
01179
01180
01181
01182 return EOB_ACT_END_OF_FILE;
01183 }
01184
01185 else
01186 {
01187
01188
01189
01190 return EOB_ACT_LAST_MATCH;
01191 }
01192 }
01193
01194
01195
01196
01197 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
01198
01199 for ( i = 0; i < number_to_move; ++i )
01200 *(dest++) = *(source++);
01201
01202 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01203
01204
01205
01206 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
01207
01208 else
01209 {
01210 int num_to_read =
01211 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01212
01213 while ( num_to_read <= 0 )
01214 {
01215
01216
01217 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01218
01219 int yy_c_buf_p_offset =
01220 (int) ((yy_c_buf_p) - b->yy_ch_buf);
01221
01222 if ( b->yy_is_our_buffer )
01223 {
01224 int new_size = b->yy_buf_size * 2;
01225
01226 if ( new_size <= 0 )
01227 b->yy_buf_size += b->yy_buf_size / 8;
01228 else
01229 b->yy_buf_size *= 2;
01230
01231 b->yy_ch_buf = (char *)
01232
01233 dorealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
01234 }
01235 else
01236
01237 b->yy_ch_buf = 0;
01238
01239 if ( ! b->yy_ch_buf )
01240 YY_FATAL_ERROR(
01241 "fatal error - scanner input buffer overflow" );
01242
01243 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
01244
01245 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01246 number_to_move - 1;
01247
01248 }
01249
01250 if ( num_to_read > YY_READ_BUF_SIZE )
01251 num_to_read = YY_READ_BUF_SIZE;
01252
01253
01254 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01255 (yy_n_chars), (size_t) num_to_read );
01256
01257 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01258 }
01259
01260 if ( (yy_n_chars) == 0 )
01261 {
01262 if ( number_to_move == YY_MORE_ADJ )
01263 {
01264 ret_val = EOB_ACT_END_OF_FILE;
01265 dorestart(doin );
01266 }
01267
01268 else
01269 {
01270 ret_val = EOB_ACT_LAST_MATCH;
01271 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01272 YY_BUFFER_EOF_PENDING;
01273 }
01274 }
01275
01276 else
01277 ret_val = EOB_ACT_CONTINUE_SCAN;
01278
01279 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
01280
01281 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
01282 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) dorealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
01283 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01284 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
01285 }
01286
01287 (yy_n_chars) += number_to_move;
01288 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
01289 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
01290
01291 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01292
01293 return ret_val;
01294 }
01295
01296
01297
01298 static yy_state_type yy_get_previous_state (void)
01299 {
01300 register yy_state_type yy_current_state;
01301 register char *yy_cp;
01302
01303 yy_current_state = (yy_start);
01304
01305 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
01306 {
01307 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01308 if ( yy_accept[yy_current_state] )
01309 {
01310 (yy_last_accepting_state) = yy_current_state;
01311 (yy_last_accepting_cpos) = yy_cp;
01312 }
01313 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01314 {
01315 yy_current_state = (int) yy_def[yy_current_state];
01316 if ( yy_current_state >= 85 )
01317 yy_c = yy_meta[(unsigned int) yy_c];
01318 }
01319 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01320 }
01321
01322 return yy_current_state;
01323 }
01324
01325
01326
01327
01328
01329
01330 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
01331 {
01332 register int yy_is_jam;
01333 register char *yy_cp = (yy_c_buf_p);
01334
01335 register YY_CHAR yy_c = 1;
01336 if ( yy_accept[yy_current_state] )
01337 {
01338 (yy_last_accepting_state) = yy_current_state;
01339 (yy_last_accepting_cpos) = yy_cp;
01340 }
01341 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01342 {
01343 yy_current_state = (int) yy_def[yy_current_state];
01344 if ( yy_current_state >= 85 )
01345 yy_c = yy_meta[(unsigned int) yy_c];
01346 }
01347 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01348 yy_is_jam = (yy_current_state == 84);
01349
01350 return yy_is_jam ? 0 : yy_current_state;
01351 }
01352
01353 static void yyunput (int c, register char * yy_bp )
01354 {
01355 register char *yy_cp;
01356
01357 yy_cp = (yy_c_buf_p);
01358
01359
01360 *yy_cp = (yy_hold_char);
01361
01362 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01363 {
01364
01365 register int number_to_move = (yy_n_chars) + 2;
01366 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01367 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01368 register char *source =
01369 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01370
01371 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01372 *--dest = *--source;
01373
01374 yy_cp += (int) (dest - source);
01375 yy_bp += (int) (dest - source);
01376 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01377 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01378
01379 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01380 YY_FATAL_ERROR( "flex scanner push-back overflow" );
01381 }
01382
01383 *--yy_cp = (char) c;
01384
01385 if ( c == '\n' ){
01386 --dolineno;
01387 }
01388
01389 (yytext_ptr) = yy_bp;
01390 (yy_hold_char) = *yy_cp;
01391 (yy_c_buf_p) = yy_cp;
01392 }
01393
01394 #ifndef YY_NO_INPUT
01395 #ifdef __cplusplus
01396 static int yyinput (void)
01397 #else
01398 static int input (void)
01399 #endif
01400
01401 {
01402 int c;
01403
01404 *(yy_c_buf_p) = (yy_hold_char);
01405
01406 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01407 {
01408
01409
01410
01411
01412 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01413
01414 *(yy_c_buf_p) = '\0';
01415
01416 else
01417 {
01418 int offset = (yy_c_buf_p) - (yytext_ptr);
01419 ++(yy_c_buf_p);
01420
01421 switch ( yy_get_next_buffer( ) )
01422 {
01423 case EOB_ACT_LAST_MATCH:
01424
01425
01426
01427
01428
01429
01430
01431
01432
01433
01434
01435 dorestart(doin );
01436
01437
01438
01439 case EOB_ACT_END_OF_FILE:
01440 {
01441 if ( dowrap( ) )
01442 return EOF;
01443
01444 if ( ! (yy_did_buffer_switch_on_eof) )
01445 YY_NEW_FILE;
01446 #ifdef __cplusplus
01447 return yyinput();
01448 #else
01449 return input();
01450 #endif
01451 }
01452
01453 case EOB_ACT_CONTINUE_SCAN:
01454 (yy_c_buf_p) = (yytext_ptr) + offset;
01455 break;
01456 }
01457 }
01458 }
01459
01460 c = *(unsigned char *) (yy_c_buf_p);
01461 *(yy_c_buf_p) = '\0';
01462 (yy_hold_char) = *++(yy_c_buf_p);
01463
01464 if ( c == '\n' )
01465
01466 dolineno++;
01467 ;
01468
01469 return c;
01470 }
01471 #endif
01472
01478 void dorestart (FILE * input_file )
01479 {
01480
01481 if ( ! YY_CURRENT_BUFFER ){
01482 doensure_buffer_stack ();
01483 YY_CURRENT_BUFFER_LVALUE =
01484 do_create_buffer(doin,YY_BUF_SIZE );
01485 }
01486
01487 do_init_buffer(YY_CURRENT_BUFFER,input_file );
01488 do_load_buffer_state( );
01489 }
01490
01495 void do_switch_to_buffer (YY_BUFFER_STATE new_buffer )
01496 {
01497
01498
01499
01500
01501
01502
01503 doensure_buffer_stack ();
01504 if ( YY_CURRENT_BUFFER == new_buffer )
01505 return;
01506
01507 if ( YY_CURRENT_BUFFER )
01508 {
01509
01510 *(yy_c_buf_p) = (yy_hold_char);
01511 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01512 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01513 }
01514
01515 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01516 do_load_buffer_state( );
01517
01518
01519
01520
01521
01522
01523 (yy_did_buffer_switch_on_eof) = 1;
01524 }
01525
01526 static void do_load_buffer_state (void)
01527 {
01528 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01529 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01530 doin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01531 (yy_hold_char) = *(yy_c_buf_p);
01532 }
01533
01540 YY_BUFFER_STATE do_create_buffer (FILE * file, int size )
01541 {
01542 YY_BUFFER_STATE b;
01543
01544 b = (YY_BUFFER_STATE) doalloc(sizeof( struct yy_buffer_state ) );
01545 if ( ! b )
01546 YY_FATAL_ERROR( "out of dynamic memory in do_create_buffer()" );
01547
01548 b->yy_buf_size = size;
01549
01550
01551
01552
01553 b->yy_ch_buf = (char *) doalloc(b->yy_buf_size + 2 );
01554 if ( ! b->yy_ch_buf )
01555 YY_FATAL_ERROR( "out of dynamic memory in do_create_buffer()" );
01556
01557 b->yy_is_our_buffer = 1;
01558
01559 do_init_buffer(b,file );
01560
01561 return b;
01562 }
01563
01568 void do_delete_buffer (YY_BUFFER_STATE b )
01569 {
01570
01571 if ( ! b )
01572 return;
01573
01574 if ( b == YY_CURRENT_BUFFER )
01575 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01576
01577 if ( b->yy_is_our_buffer )
01578 dofree((void *) b->yy_ch_buf );
01579
01580 dofree((void *) b );
01581 }
01582
01583 #ifndef __cplusplus
01584 extern int isatty (int );
01585 #endif
01586
01587
01588
01589
01590
01591 static void do_init_buffer (YY_BUFFER_STATE b, FILE * file )
01592
01593 {
01594 int oerrno = errno;
01595
01596 do_flush_buffer(b );
01597
01598 b->yy_input_file = file;
01599 b->yy_fill_buffer = 1;
01600
01601
01602
01603
01604
01605 if (b != YY_CURRENT_BUFFER){
01606 b->yy_bs_lineno = 1;
01607 b->yy_bs_column = 0;
01608 }
01609
01610 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01611
01612 errno = oerrno;
01613 }
01614
01619 void do_flush_buffer (YY_BUFFER_STATE b )
01620 {
01621 if ( ! b )
01622 return;
01623
01624 b->yy_n_chars = 0;
01625
01626
01627
01628
01629
01630 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01631 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01632
01633 b->yy_buf_pos = &b->yy_ch_buf[0];
01634
01635 b->yy_at_bol = 1;
01636 b->yy_buffer_status = YY_BUFFER_NEW;
01637
01638 if ( b == YY_CURRENT_BUFFER )
01639 do_load_buffer_state( );
01640 }
01641
01648 void dopush_buffer_state (YY_BUFFER_STATE new_buffer )
01649 {
01650 if (new_buffer == NULL)
01651 return;
01652
01653 doensure_buffer_stack();
01654
01655
01656 if ( YY_CURRENT_BUFFER )
01657 {
01658
01659 *(yy_c_buf_p) = (yy_hold_char);
01660 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01661 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01662 }
01663
01664
01665 if (YY_CURRENT_BUFFER)
01666 (yy_buffer_stack_top)++;
01667 YY_CURRENT_BUFFER_LVALUE = new_buffer;
01668
01669
01670 do_load_buffer_state( );
01671 (yy_did_buffer_switch_on_eof) = 1;
01672 }
01673
01678 void dopop_buffer_state (void)
01679 {
01680 if (!YY_CURRENT_BUFFER)
01681 return;
01682
01683 do_delete_buffer(YY_CURRENT_BUFFER );
01684 YY_CURRENT_BUFFER_LVALUE = NULL;
01685 if ((yy_buffer_stack_top) > 0)
01686 --(yy_buffer_stack_top);
01687
01688 if (YY_CURRENT_BUFFER) {
01689 do_load_buffer_state( );
01690 (yy_did_buffer_switch_on_eof) = 1;
01691 }
01692 }
01693
01694
01695
01696
01697 static void doensure_buffer_stack (void)
01698 {
01699 int num_to_alloc;
01700
01701 if (!(yy_buffer_stack)) {
01702
01703
01704
01705
01706
01707 num_to_alloc = 1;
01708 (yy_buffer_stack) = (struct yy_buffer_state**)doalloc
01709 (num_to_alloc * sizeof(struct yy_buffer_state*)
01710 );
01711 if ( ! (yy_buffer_stack) )
01712 YY_FATAL_ERROR( "out of dynamic memory in doensure_buffer_stack()" );
01713
01714 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01715
01716 (yy_buffer_stack_max) = num_to_alloc;
01717 (yy_buffer_stack_top) = 0;
01718 return;
01719 }
01720
01721 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01722
01723
01724 int grow_size = 8 ;
01725
01726 num_to_alloc = (yy_buffer_stack_max) + grow_size;
01727 (yy_buffer_stack) = (struct yy_buffer_state**)dorealloc
01728 ((yy_buffer_stack),
01729 num_to_alloc * sizeof(struct yy_buffer_state*)
01730 );
01731 if ( ! (yy_buffer_stack) )
01732 YY_FATAL_ERROR( "out of dynamic memory in doensure_buffer_stack()" );
01733
01734
01735 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01736 (yy_buffer_stack_max) = num_to_alloc;
01737 }
01738 }
01739
01746 YY_BUFFER_STATE do_scan_buffer (char * base, yy_size_t size )
01747 {
01748 YY_BUFFER_STATE b;
01749
01750 if ( size < 2 ||
01751 base[size-2] != YY_END_OF_BUFFER_CHAR ||
01752 base[size-1] != YY_END_OF_BUFFER_CHAR )
01753
01754 return 0;
01755
01756 b = (YY_BUFFER_STATE) doalloc(sizeof( struct yy_buffer_state ) );
01757 if ( ! b )
01758 YY_FATAL_ERROR( "out of dynamic memory in do_scan_buffer()" );
01759
01760 b->yy_buf_size = size - 2;
01761 b->yy_buf_pos = b->yy_ch_buf = base;
01762 b->yy_is_our_buffer = 0;
01763 b->yy_input_file = 0;
01764 b->yy_n_chars = b->yy_buf_size;
01765 b->yy_is_interactive = 0;
01766 b->yy_at_bol = 1;
01767 b->yy_fill_buffer = 0;
01768 b->yy_buffer_status = YY_BUFFER_NEW;
01769
01770 do_switch_to_buffer(b );
01771
01772 return b;
01773 }
01774
01783 YY_BUFFER_STATE do_scan_string (yyconst char * yystr )
01784 {
01785
01786 return do_scan_bytes(yystr,strlen(yystr) );
01787 }
01788
01796 YY_BUFFER_STATE do_scan_bytes (yyconst char * yybytes, int _yybytes_len )
01797 {
01798 YY_BUFFER_STATE b;
01799 char *buf;
01800 yy_size_t n;
01801 int i;
01802
01803
01804 n = _yybytes_len + 2;
01805 buf = (char *) doalloc(n );
01806 if ( ! buf )
01807 YY_FATAL_ERROR( "out of dynamic memory in do_scan_bytes()" );
01808
01809 for ( i = 0; i < _yybytes_len; ++i )
01810 buf[i] = yybytes[i];
01811
01812 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01813
01814 b = do_scan_buffer(buf,n );
01815 if ( ! b )
01816 YY_FATAL_ERROR( "bad buffer in do_scan_bytes()" );
01817
01818
01819
01820
01821 b->yy_is_our_buffer = 1;
01822
01823 return b;
01824 }
01825
01826 #ifndef YY_EXIT_FAILURE
01827 #define YY_EXIT_FAILURE 2
01828 #endif
01829
01830 static void yy_fatal_error (yyconst char* msg )
01831 {
01832 (void) fprintf( stderr, "%s\n", msg );
01833 exit( YY_EXIT_FAILURE );
01834 }
01835
01836
01837
01838 #undef yyless
01839 #define yyless(n) \
01840 do \
01841 { \
01842 \
01843 int yyless_macro_arg = (n); \
01844 YY_LESS_LINENO(yyless_macro_arg);\
01845 dotext[doleng] = (yy_hold_char); \
01846 (yy_c_buf_p) = dotext + yyless_macro_arg; \
01847 (yy_hold_char) = *(yy_c_buf_p); \
01848 *(yy_c_buf_p) = '\0'; \
01849 doleng = yyless_macro_arg; \
01850 } \
01851 while ( 0 )
01852
01853
01854
01858 int doget_lineno (void)
01859 {
01860
01861 return dolineno;
01862 }
01863
01867 FILE *doget_in (void)
01868 {
01869 return doin;
01870 }
01871
01875 FILE *doget_out (void)
01876 {
01877 return doout;
01878 }
01879
01883 int doget_leng (void)
01884 {
01885 return doleng;
01886 }
01887
01892 char *doget_text (void)
01893 {
01894 return dotext;
01895 }
01896
01901 void doset_lineno (int line_number )
01902 {
01903
01904 dolineno = line_number;
01905 }
01906
01913 void doset_in (FILE * in_str )
01914 {
01915 doin = in_str ;
01916 }
01917
01918 void doset_out (FILE * out_str )
01919 {
01920 doout = out_str ;
01921 }
01922
01923 int doget_debug (void)
01924 {
01925 return do_flex_debug;
01926 }
01927
01928 void doset_debug (int bdebug )
01929 {
01930 do_flex_debug = bdebug ;
01931 }
01932
01933 static int yy_init_globals (void)
01934 {
01935
01936
01937
01938
01939
01940 dolineno = 1;
01941
01942 (yy_buffer_stack) = 0;
01943 (yy_buffer_stack_top) = 0;
01944 (yy_buffer_stack_max) = 0;
01945 (yy_c_buf_p) = (char *) 0;
01946 (yy_init) = 0;
01947 (yy_start) = 0;
01948
01949
01950 #ifdef YY_STDINIT
01951 doin = stdin;
01952 doout = stdout;
01953 #else
01954 doin = (FILE *) 0;
01955 doout = (FILE *) 0;
01956 #endif
01957
01958
01959
01960
01961 return 0;
01962 }
01963
01964
01965 int dolex_destroy (void)
01966 {
01967
01968
01969 while(YY_CURRENT_BUFFER){
01970 do_delete_buffer(YY_CURRENT_BUFFER );
01971 YY_CURRENT_BUFFER_LVALUE = NULL;
01972 dopop_buffer_state();
01973 }
01974
01975
01976 dofree((yy_buffer_stack) );
01977 (yy_buffer_stack) = NULL;
01978
01979
01980
01981 yy_init_globals( );
01982
01983 return 0;
01984 }
01985
01986
01987
01988
01989
01990 #ifndef yytext_ptr
01991 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
01992 {
01993 register int i;
01994 for ( i = 0; i < n; ++i )
01995 s1[i] = s2[i];
01996 }
01997 #endif
01998
01999 #ifdef YY_NEED_STRLEN
02000 static int yy_flex_strlen (yyconst char * s )
02001 {
02002 register int n;
02003 for ( n = 0; s[n]; ++n )
02004 ;
02005
02006 return n;
02007 }
02008 #endif
02009
02010 void *doalloc (yy_size_t size )
02011 {
02012 return (void *) malloc( size );
02013 }
02014
02015 void *dorealloc (void * ptr, yy_size_t size )
02016 {
02017
02018
02019
02020
02021
02022
02023
02024 return (void *) realloc( (char *) ptr, size );
02025 }
02026
02027 void dofree (void * ptr )
02028 {
02029 free( (char *) ptr );
02030 }
02031
02032 #define YYTABLES_NAME "yytables"
02033
02034 #line 53 "do-lexer.l"
02035
02036
02037
02038 void doerror(const char* text)
02039 {
02040 fprintf(stderr,"doc: parse error at line %d\n",dolineno);
02041 exit(1);
02042 }
02043
02044 static int read_string(char openchar, char closechar)
02045 {
02046 char result[5000];
02047 int i = 0;
02048 char t;
02049 int open_count = 1;
02050 while(true)
02051 {
02052 t=yyinput();
02053 if (t==openchar) open_count++;
02054 if (t==closechar) open_count--;
02055 if (open_count==0)
02056 {
02057 result[i++]=0;
02058 dolval=strdup(result);
02059
02060 return NAME;
02061 }
02062 result[i++]=t;
02063 assert(i<5000);
02064 if (t==EOF) doerror("eof in external block");
02065 }
02066 unput(t);
02067 }
02068
02069 int dowrap()
02070 {
02071 return 1;
02072 }
02073
02074