00001
00002
00003
00004
00005
00006
00007 #define FLEX_SCANNER
00008 #define YY_FLEX_MAJOR_VERSION 2
00009 #define YY_FLEX_MINOR_VERSION 5
00010
00011 #include <stdio.h>
00012 #include <unistd.h>
00013
00014
00015
00016 #ifdef c_plusplus
00017 #ifndef __cplusplus
00018 #define __cplusplus
00019 #endif
00020 #endif
00021
00022
00023 #ifdef __cplusplus
00024
00025 #include <stdlib.h>
00026
00027
00028 #define YY_USE_PROTOS
00029
00030
00031 #define YY_USE_CONST
00032
00033 #else
00034
00035 #if __STDC__
00036
00037 #define YY_USE_PROTOS
00038 #define YY_USE_CONST
00039
00040 #endif
00041 #endif
00042
00043 #ifdef __TURBOC__
00044 #pragma warn -rch
00045 #pragma warn -use
00046 #include <io.h>
00047 #include <stdlib.h>
00048 #define YY_USE_CONST
00049 #define YY_USE_PROTOS
00050 #endif
00051
00052 #ifdef YY_USE_CONST
00053 #define yyconst const
00054 #else
00055 #define yyconst
00056 #endif
00057
00058
00059 #ifdef YY_USE_PROTOS
00060 #define YY_PROTO(proto) proto
00061 #else
00062 #define YY_PROTO(proto) ()
00063 #endif
00064
00065
00066 #define YY_NULL 0
00067
00068
00069
00070
00071
00072
00073 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00074
00075
00076
00077
00078
00079 #define BEGIN yy_start = 1 + 2 *
00080
00081
00082
00083
00084
00085 #define YY_START ((yy_start - 1) / 2)
00086 #define YYSTATE YY_START
00087
00088
00089 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00090
00091
00092 #define YY_NEW_FILE yyrestart( yyin )
00093
00094 #define YY_END_OF_BUFFER_CHAR 0
00095
00096
00097 #define YY_BUF_SIZE 16384
00098
00099 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00100
00101 extern int yyleng;
00102 extern FILE *yyin, *yyout;
00103
00104 #define EOB_ACT_CONTINUE_SCAN 0
00105 #define EOB_ACT_END_OF_FILE 1
00106 #define EOB_ACT_LAST_MATCH 2
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 #define yyless(n) \
00125 do \
00126 { \
00127 \
00128 *yy_cp = yy_hold_char; \
00129 YY_RESTORE_YY_MORE_OFFSET \
00130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00131 YY_DO_BEFORE_ACTION; \
00132 } \
00133 while ( 0 )
00134
00135 #define unput(c) yyunput( c, yytext_ptr )
00136
00137
00138
00139
00140
00141 typedef unsigned int yy_size_t;
00142
00143
00144 struct yy_buffer_state
00145 {
00146 FILE *yy_input_file;
00147
00148 char *yy_ch_buf;
00149 char *yy_buf_pos;
00150
00151
00152
00153
00154 yy_size_t yy_buf_size;
00155
00156
00157
00158
00159 int yy_n_chars;
00160
00161
00162
00163
00164
00165 int yy_is_our_buffer;
00166
00167
00168
00169
00170
00171
00172 int yy_is_interactive;
00173
00174
00175
00176
00177
00178 int yy_at_bol;
00179
00180
00181
00182
00183 int yy_fill_buffer;
00184
00185 int yy_buffer_status;
00186 #define YY_BUFFER_NEW 0
00187 #define YY_BUFFER_NORMAL 1
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 #define YY_BUFFER_EOF_PENDING 2
00199 };
00200
00201 static YY_BUFFER_STATE yy_current_buffer = 0;
00202
00203
00204
00205
00206
00207 #define YY_CURRENT_BUFFER yy_current_buffer
00208
00209
00210
00211 static char yy_hold_char;
00212
00213 static int yy_n_chars;
00214
00215
00216 int yyleng;
00217
00218
00219 static char *yy_c_buf_p = (char *) 0;
00220 static int yy_init = 1;
00221 static int yy_start = 0;
00222
00223
00224
00225
00226 static int yy_did_buffer_switch_on_eof;
00227
00228 void yyrestart YY_PROTO(( FILE *input_file ));
00229
00230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00231 void yy_load_buffer_state YY_PROTO(( void ));
00232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00237
00238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00241
00242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00244 static void yy_flex_free YY_PROTO(( void * ));
00245
00246 #define yy_new_buffer yy_create_buffer
00247
00248 #define yy_set_interactive(is_interactive) \
00249 { \
00250 if ( ! yy_current_buffer ) \
00251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00252 yy_current_buffer->yy_is_interactive = is_interactive; \
00253 }
00254
00255 #define yy_set_bol(at_bol) \
00256 { \
00257 if ( ! yy_current_buffer ) \
00258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00259 yy_current_buffer->yy_at_bol = at_bol; \
00260 }
00261
00262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00263
00264 typedef unsigned char YY_CHAR;
00265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00266 typedef int yy_state_type;
00267 extern char *yytext;
00268 #define yytext_ptr yytext
00269
00270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00272 static int yy_get_next_buffer YY_PROTO(( void ));
00273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00274
00275
00276
00277
00278 #define YY_DO_BEFORE_ACTION \
00279 yytext_ptr = yy_bp; \
00280 yyleng = (int) (yy_cp - yy_bp); \
00281 yy_hold_char = *yy_cp; \
00282 *yy_cp = '\0'; \
00283 yy_c_buf_p = yy_cp;
00284
00285 #define YY_NUM_RULES 8
00286 #define YY_END_OF_BUFFER 9
00287 static yyconst short int yy_accept[24] =
00288 { 0,
00289 0, 0, 9, 7, 4, 3, 7, 2, 1, 0,
00290 5, 2, 0, 1, 0, 0, 5, 0, 2, 1,
00291 1, 6, 0
00292 } ;
00293
00294 static yyconst int yy_ec[256] =
00295 { 0,
00296 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00297 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00298 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00299 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
00300 1, 4, 5, 1, 6, 1, 7, 8, 8, 8,
00301 8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
00302 1, 1, 1, 1, 9, 9, 9, 9, 10, 9,
00303 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
00304 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
00305 1, 1, 1, 1, 9, 1, 9, 9, 9, 9,
00306
00307 10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
00308 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
00309 9, 9, 1, 1, 1, 1, 1, 1, 1, 1,
00310 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00311 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00317
00318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00323 1, 1, 1, 1, 1
00324 } ;
00325
00326 static yyconst int yy_meta[11] =
00327 { 0,
00328 1, 1, 2, 1, 3, 4, 1, 5, 6, 6
00329 } ;
00330
00331 static yyconst short int yy_base[29] =
00332 { 0,
00333 0, 0, 42, 43, 43, 43, 7, 7, 0, 37,
00334 0, 0, 32, 33, 34, 20, 0, 8, 5, 6,
00335 0, 43, 43, 13, 19, 25, 29, 31
00336 } ;
00337
00338 static yyconst short int yy_def[29] =
00339 { 0,
00340 23, 1, 23, 23, 23, 23, 23, 23, 24, 25,
00341 26, 8, 27, 28, 25, 25, 26, 23, 23, 28,
00342 20, 23, 0, 23, 23, 23, 23, 23
00343 } ;
00344
00345 static yyconst short int yy_nxt[54] =
00346 { 0,
00347 4, 5, 6, 4, 4, 4, 7, 8, 9, 9,
00348 10, 20, 19, 11, 12, 19, 13, 14, 14, 15,
00349 15, 15, 15, 15, 15, 17, 22, 17, 17, 17,
00350 17, 18, 18, 18, 21, 21, 21, 16, 20, 19,
00351 16, 23, 3, 23, 23, 23, 23, 23, 23, 23,
00352 23, 23, 23
00353 } ;
00354
00355 static yyconst short int yy_chk[54] =
00356 { 0,
00357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00358 7, 20, 19, 7, 8, 18, 8, 24, 24, 25,
00359 25, 25, 25, 25, 25, 26, 16, 26, 26, 26,
00360 26, 27, 27, 27, 28, 28, 28, 15, 14, 13,
00361 10, 3, 23, 23, 23, 23, 23, 23, 23, 23,
00362 23, 23, 23
00363 } ;
00364
00365 static yy_state_type yy_last_accepting_state;
00366 static char *yy_last_accepting_cpos;
00367
00368
00369
00370
00371 #define REJECT reject_used_but_not_detected
00372 #define yymore() yymore_used_but_not_detected
00373 #define YY_MORE_ADJ 0
00374 #define YY_RESTORE_YY_MORE_OFFSET
00375 char *yytext;
00376 #line 1 "dotty_scanner.l"
00377 #define INITIAL 0
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387 #define YY_NEVER_INTERACTIVE 1
00388 #line 13 "dotty_scanner.l"
00389 #include "dotty_parser.h"
00390 #include "strdup.h"
00391 #include <string>
00392
00393
00394 extern char* yyfilename;
00395 extern int yylineno;
00396 #line 397 "lex.yy.c"
00397
00398
00399
00400
00401
00402 #ifndef YY_SKIP_YYWRAP
00403 #ifdef __cplusplus
00404 extern "C" int yywrap YY_PROTO(( void ));
00405 #else
00406 extern int yywrap YY_PROTO(( void ));
00407 #endif
00408 #endif
00409
00410 #ifndef YY_NO_UNPUT
00411 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00412 #endif
00413
00414 #ifndef yytext_ptr
00415 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00416 #endif
00417
00418 #ifdef YY_NEED_STRLEN
00419 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00420 #endif
00421
00422 #ifndef YY_NO_INPUT
00423 #ifdef __cplusplus
00424 static int yyinput YY_PROTO(( void ));
00425 #else
00426 static int input YY_PROTO(( void ));
00427 #endif
00428 #endif
00429
00430 #if YY_STACK_USED
00431 static int yy_start_stack_ptr = 0;
00432 static int yy_start_stack_depth = 0;
00433 static int *yy_start_stack = 0;
00434 #ifndef YY_NO_PUSH_STATE
00435 static void yy_push_state YY_PROTO(( int new_state ));
00436 #endif
00437 #ifndef YY_NO_POP_STATE
00438 static void yy_pop_state YY_PROTO(( void ));
00439 #endif
00440 #ifndef YY_NO_TOP_STATE
00441 static int yy_top_state YY_PROTO(( void ));
00442 #endif
00443
00444 #else
00445 #define YY_NO_PUSH_STATE 1
00446 #define YY_NO_POP_STATE 1
00447 #define YY_NO_TOP_STATE 1
00448 #endif
00449
00450 #ifdef YY_MALLOC_DECL
00451 YY_MALLOC_DECL
00452 #else
00453 #if __STDC__
00454 #ifndef __cplusplus
00455 #include <stdlib.h>
00456 #endif
00457 #else
00458
00459
00460
00461
00462 #endif
00463 #endif
00464
00465
00466 #ifndef YY_READ_BUF_SIZE
00467 #define YY_READ_BUF_SIZE 8192
00468 #endif
00469
00470
00471
00472 #ifndef ECHO
00473
00474
00475
00476 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00477 #endif
00478
00479
00480
00481
00482 #ifndef YY_INPUT
00483 #define YY_INPUT(buf,result,max_size) \
00484 if ( yy_current_buffer->yy_is_interactive ) \
00485 { \
00486 int c = '*', n; \
00487 for ( n = 0; n < max_size && \
00488 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00489 buf[n] = (char) c; \
00490 if ( c == '\n' ) \
00491 buf[n++] = (char) c; \
00492 if ( c == EOF && ferror( yyin ) ) \
00493 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00494 result = n; \
00495 } \
00496 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00497 && ferror( yyin ) ) \
00498 YY_FATAL_ERROR( "input in flex scanner failed" );
00499 #endif
00500
00501
00502
00503
00504
00505 #ifndef yyterminate
00506 #define yyterminate() return YY_NULL
00507 #endif
00508
00509
00510 #ifndef YY_START_STACK_INCR
00511 #define YY_START_STACK_INCR 25
00512 #endif
00513
00514
00515 #ifndef YY_FATAL_ERROR
00516 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00517 #endif
00518
00519
00520
00521
00522 #ifndef YY_DECL
00523 #define YY_DECL int yylex YY_PROTO(( void ))
00524 #endif
00525
00526
00527
00528
00529 #ifndef YY_USER_ACTION
00530 #define YY_USER_ACTION
00531 #endif
00532
00533
00534 #ifndef YY_BREAK
00535 #define YY_BREAK break;
00536 #endif
00537
00538 #define YY_RULE_SETUP \
00539 YY_USER_ACTION
00540
00541 YY_DECL
00542 {
00543 register yy_state_type yy_current_state;
00544 register char *yy_cp = NULL, *yy_bp = NULL;
00545 register int yy_act;
00546
00547 #line 29 "dotty_scanner.l"
00548
00549 #line 550 "lex.yy.c"
00550
00551 if ( yy_init )
00552 {
00553 yy_init = 0;
00554
00555 #ifdef YY_USER_INIT
00556 YY_USER_INIT;
00557 #endif
00558
00559 if ( ! yy_start )
00560 yy_start = 1;
00561
00562 if ( ! yyin )
00563 yyin = stdin;
00564
00565 if ( ! yyout )
00566 yyout = stdout;
00567
00568 if ( ! yy_current_buffer )
00569 yy_current_buffer =
00570 yy_create_buffer( yyin, YY_BUF_SIZE );
00571
00572 yy_load_buffer_state();
00573 }
00574
00575 while ( 1 )
00576 {
00577 yy_cp = yy_c_buf_p;
00578
00579
00580 *yy_cp = yy_hold_char;
00581
00582
00583
00584
00585 yy_bp = yy_cp;
00586
00587 yy_current_state = yy_start;
00588 yy_match:
00589 do
00590 {
00591 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00592 if ( yy_accept[yy_current_state] )
00593 {
00594 yy_last_accepting_state = yy_current_state;
00595 yy_last_accepting_cpos = yy_cp;
00596 }
00597 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00598 {
00599 yy_current_state = (int) yy_def[yy_current_state];
00600 if ( yy_current_state >= 24 )
00601 yy_c = yy_meta[(unsigned int) yy_c];
00602 }
00603 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00604 ++yy_cp;
00605 }
00606 while ( yy_current_state != 23 );
00607 yy_cp = yy_last_accepting_cpos;
00608 yy_current_state = yy_last_accepting_state;
00609
00610 yy_find_action:
00611 yy_act = yy_accept[yy_current_state];
00612
00613 YY_DO_BEFORE_ACTION;
00614
00615
00616 do_action:
00617
00618
00619 switch ( yy_act )
00620 {
00621 case 0:
00622
00623 *yy_cp = yy_hold_char;
00624 yy_cp = yy_last_accepting_cpos;
00625 yy_current_state = yy_last_accepting_state;
00626 goto yy_find_action;
00627
00628 case 1:
00629 YY_RULE_SETUP
00630 #line 30 "dotty_scanner.l"
00631 { yylval.s = strDup(yytext); return STRING; }
00632 YY_BREAK
00633 case 2:
00634 YY_RULE_SETUP
00635 #line 31 "dotty_scanner.l"
00636 { yylval.n = atoi(yytext); return INTEGER; }
00637 YY_BREAK
00638 case 3:
00639 YY_RULE_SETUP
00640 #line 32 "dotty_scanner.l"
00641 yylineno++;
00642 YY_BREAK
00643 case 4:
00644 YY_RULE_SETUP
00645 #line 33 "dotty_scanner.l"
00646 ;
00647 YY_BREAK
00648 case 5:
00649 YY_RULE_SETUP
00650 #line 34 "dotty_scanner.l"
00651 ;
00652 YY_BREAK
00653 case 6:
00654 YY_RULE_SETUP
00655 #line 35 "dotty_scanner.l"
00656 ;
00657 YY_BREAK
00658 case 7:
00659 YY_RULE_SETUP
00660 #line 36 "dotty_scanner.l"
00661 return yytext[0];
00662 YY_BREAK
00663 case 8:
00664 YY_RULE_SETUP
00665 #line 37 "dotty_scanner.l"
00666 ECHO;
00667 YY_BREAK
00668 #line 669 "lex.yy.c"
00669 case YY_STATE_EOF(INITIAL):
00670 yyterminate();
00671
00672 case YY_END_OF_BUFFER:
00673 {
00674
00675 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
00676
00677
00678 *yy_cp = yy_hold_char;
00679 YY_RESTORE_YY_MORE_OFFSET
00680
00681 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
00682 {
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692 yy_n_chars = yy_current_buffer->yy_n_chars;
00693 yy_current_buffer->yy_input_file = yyin;
00694 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
00695 }
00696
00697
00698
00699
00700
00701
00702
00703
00704 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
00705 {
00706 yy_state_type yy_next_state;
00707
00708 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
00709
00710 yy_current_state = yy_get_previous_state();
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721 yy_next_state = yy_try_NUL_trans( yy_current_state );
00722
00723 yy_bp = yytext_ptr + YY_MORE_ADJ;
00724
00725 if ( yy_next_state )
00726 {
00727
00728 yy_cp = ++yy_c_buf_p;
00729 yy_current_state = yy_next_state;
00730 goto yy_match;
00731 }
00732
00733 else
00734 {
00735 yy_cp = yy_last_accepting_cpos;
00736 yy_current_state = yy_last_accepting_state;
00737 goto yy_find_action;
00738 }
00739 }
00740
00741 else switch ( yy_get_next_buffer() )
00742 {
00743 case EOB_ACT_END_OF_FILE:
00744 {
00745 yy_did_buffer_switch_on_eof = 0;
00746
00747 if ( yywrap() )
00748 {
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
00759
00760 yy_act = YY_STATE_EOF(YY_START);
00761 goto do_action;
00762 }
00763
00764 else
00765 {
00766 if ( ! yy_did_buffer_switch_on_eof )
00767 YY_NEW_FILE;
00768 }
00769 break;
00770 }
00771
00772 case EOB_ACT_CONTINUE_SCAN:
00773 yy_c_buf_p =
00774 yytext_ptr + yy_amount_of_matched_text;
00775
00776 yy_current_state = yy_get_previous_state();
00777
00778 yy_cp = yy_c_buf_p;
00779 yy_bp = yytext_ptr + YY_MORE_ADJ;
00780 goto yy_match;
00781
00782 case EOB_ACT_LAST_MATCH:
00783 yy_c_buf_p =
00784 &yy_current_buffer->yy_ch_buf[yy_n_chars];
00785
00786 yy_current_state = yy_get_previous_state();
00787
00788 yy_cp = yy_c_buf_p;
00789 yy_bp = yytext_ptr + YY_MORE_ADJ;
00790 goto yy_find_action;
00791 }
00792 break;
00793 }
00794
00795 default:
00796 YY_FATAL_ERROR(
00797 "fatal flex scanner internal error--no action found" );
00798 }
00799 }
00800 }
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811 static int yy_get_next_buffer()
00812 {
00813 register char *dest = yy_current_buffer->yy_ch_buf;
00814 register char *source = yytext_ptr;
00815 register int number_to_move, i;
00816 int ret_val;
00817
00818 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
00819 YY_FATAL_ERROR(
00820 "fatal flex scanner internal error--end of buffer missed" );
00821
00822 if ( yy_current_buffer->yy_fill_buffer == 0 )
00823 {
00824 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
00825 {
00826
00827
00828
00829 return EOB_ACT_END_OF_FILE;
00830 }
00831
00832 else
00833 {
00834
00835
00836
00837 return EOB_ACT_LAST_MATCH;
00838 }
00839 }
00840
00841
00842
00843
00844 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
00845
00846 for ( i = 0; i < number_to_move; ++i )
00847 *(dest++) = *(source++);
00848
00849 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
00850
00851
00852
00853 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
00854
00855 else
00856 {
00857 int num_to_read =
00858 yy_current_buffer->yy_buf_size - number_to_move - 1;
00859
00860 while ( num_to_read <= 0 )
00861 {
00862 #ifdef YY_USES_REJECT
00863 YY_FATAL_ERROR(
00864 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
00865 #else
00866
00867
00868 YY_BUFFER_STATE b = yy_current_buffer;
00869
00870 int yy_c_buf_p_offset =
00871 (int) (yy_c_buf_p - b->yy_ch_buf);
00872
00873 if ( b->yy_is_our_buffer )
00874 {
00875 int new_size = b->yy_buf_size * 2;
00876
00877 if ( new_size <= 0 )
00878 b->yy_buf_size += b->yy_buf_size / 8;
00879 else
00880 b->yy_buf_size *= 2;
00881
00882 b->yy_ch_buf = (char *)
00883
00884 yy_flex_realloc( (void *) b->yy_ch_buf,
00885 b->yy_buf_size + 2 );
00886 }
00887 else
00888
00889 b->yy_ch_buf = 0;
00890
00891 if ( ! b->yy_ch_buf )
00892 YY_FATAL_ERROR(
00893 "fatal error - scanner input buffer overflow" );
00894
00895 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
00896
00897 num_to_read = yy_current_buffer->yy_buf_size -
00898 number_to_move - 1;
00899 #endif
00900 }
00901
00902 if ( num_to_read > YY_READ_BUF_SIZE )
00903 num_to_read = YY_READ_BUF_SIZE;
00904
00905
00906 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
00907 yy_n_chars, num_to_read );
00908
00909 yy_current_buffer->yy_n_chars = yy_n_chars;
00910 }
00911
00912 if ( yy_n_chars == 0 )
00913 {
00914 if ( number_to_move == YY_MORE_ADJ )
00915 {
00916 ret_val = EOB_ACT_END_OF_FILE;
00917 yyrestart( yyin );
00918 }
00919
00920 else
00921 {
00922 ret_val = EOB_ACT_LAST_MATCH;
00923 yy_current_buffer->yy_buffer_status =
00924 YY_BUFFER_EOF_PENDING;
00925 }
00926 }
00927
00928 else
00929 ret_val = EOB_ACT_CONTINUE_SCAN;
00930
00931 yy_n_chars += number_to_move;
00932 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
00933 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
00934
00935 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
00936
00937 return ret_val;
00938 }
00939
00940
00941
00942
00943 static yy_state_type yy_get_previous_state()
00944 {
00945 register yy_state_type yy_current_state;
00946 register char *yy_cp;
00947
00948 yy_current_state = yy_start;
00949
00950 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
00951 {
00952 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
00953 if ( yy_accept[yy_current_state] )
00954 {
00955 yy_last_accepting_state = yy_current_state;
00956 yy_last_accepting_cpos = yy_cp;
00957 }
00958 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00959 {
00960 yy_current_state = (int) yy_def[yy_current_state];
00961 if ( yy_current_state >= 24 )
00962 yy_c = yy_meta[(unsigned int) yy_c];
00963 }
00964 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00965 }
00966
00967 return yy_current_state;
00968 }
00969
00970
00971
00972
00973
00974
00975
00976
00977 #ifdef YY_USE_PROTOS
00978 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
00979 #else
00980 static yy_state_type yy_try_NUL_trans( yy_current_state )
00981 yy_state_type yy_current_state;
00982 #endif
00983 {
00984 register int yy_is_jam;
00985 register char *yy_cp = yy_c_buf_p;
00986
00987 register YY_CHAR yy_c = 1;
00988 if ( yy_accept[yy_current_state] )
00989 {
00990 yy_last_accepting_state = yy_current_state;
00991 yy_last_accepting_cpos = yy_cp;
00992 }
00993 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00994 {
00995 yy_current_state = (int) yy_def[yy_current_state];
00996 if ( yy_current_state >= 24 )
00997 yy_c = yy_meta[(unsigned int) yy_c];
00998 }
00999 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01000 yy_is_jam = (yy_current_state == 23);
01001
01002 return yy_is_jam ? 0 : yy_current_state;
01003 }
01004
01005
01006 #ifndef YY_NO_UNPUT
01007 #ifdef YY_USE_PROTOS
01008 static void yyunput( int c, register char *yy_bp )
01009 #else
01010 static void yyunput( c, yy_bp )
01011 int c;
01012 register char *yy_bp;
01013 #endif
01014 {
01015 register char *yy_cp = yy_c_buf_p;
01016
01017
01018 *yy_cp = yy_hold_char;
01019
01020 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01021 {
01022
01023 register int number_to_move = yy_n_chars + 2;
01024 register char *dest = &yy_current_buffer->yy_ch_buf[
01025 yy_current_buffer->yy_buf_size + 2];
01026 register char *source =
01027 &yy_current_buffer->yy_ch_buf[number_to_move];
01028
01029 while ( source > yy_current_buffer->yy_ch_buf )
01030 *--dest = *--source;
01031
01032 yy_cp += (int) (dest - source);
01033 yy_bp += (int) (dest - source);
01034 yy_current_buffer->yy_n_chars =
01035 yy_n_chars = yy_current_buffer->yy_buf_size;
01036
01037 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01038 YY_FATAL_ERROR( "flex scanner push-back overflow" );
01039 }
01040
01041 *--yy_cp = (char) c;
01042
01043
01044 yytext_ptr = yy_bp;
01045 yy_hold_char = *yy_cp;
01046 yy_c_buf_p = yy_cp;
01047 }
01048 #endif
01049
01050
01051 #ifndef YY_NO_INPUT
01052 #ifdef __cplusplus
01053 static int yyinput()
01054 #else
01055 static int input()
01056 #endif
01057 {
01058 int c;
01059
01060 *yy_c_buf_p = yy_hold_char;
01061
01062 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01063 {
01064
01065
01066
01067
01068 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01069
01070 *yy_c_buf_p = '\0';
01071
01072 else
01073 {
01074 int offset = yy_c_buf_p - yytext_ptr;
01075 ++yy_c_buf_p;
01076
01077 switch ( yy_get_next_buffer() )
01078 {
01079 case EOB_ACT_LAST_MATCH:
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091 yyrestart( yyin );
01092
01093
01094
01095 case EOB_ACT_END_OF_FILE:
01096 {
01097 if ( yywrap() )
01098 return EOF;
01099
01100 if ( ! yy_did_buffer_switch_on_eof )
01101 YY_NEW_FILE;
01102 #ifdef __cplusplus
01103 return yyinput();
01104 #else
01105 return input();
01106 #endif
01107 }
01108
01109 case EOB_ACT_CONTINUE_SCAN:
01110 yy_c_buf_p = yytext_ptr + offset;
01111 break;
01112 }
01113 }
01114 }
01115
01116 c = *(unsigned char *) yy_c_buf_p;
01117 *yy_c_buf_p = '\0';
01118 yy_hold_char = *++yy_c_buf_p;
01119
01120
01121 return c;
01122 }
01123 #endif
01124
01125 #ifdef YY_USE_PROTOS
01126 void yyrestart( FILE *input_file )
01127 #else
01128 void yyrestart( input_file )
01129 FILE *input_file;
01130 #endif
01131 {
01132 if ( ! yy_current_buffer )
01133 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01134
01135 yy_init_buffer( yy_current_buffer, input_file );
01136 yy_load_buffer_state();
01137 }
01138
01139
01140 #ifdef YY_USE_PROTOS
01141 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01142 #else
01143 void yy_switch_to_buffer( new_buffer )
01144 YY_BUFFER_STATE new_buffer;
01145 #endif
01146 {
01147 if ( yy_current_buffer == new_buffer )
01148 return;
01149
01150 if ( yy_current_buffer )
01151 {
01152
01153 *yy_c_buf_p = yy_hold_char;
01154 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01155 yy_current_buffer->yy_n_chars = yy_n_chars;
01156 }
01157
01158 yy_current_buffer = new_buffer;
01159 yy_load_buffer_state();
01160
01161
01162
01163
01164
01165
01166 yy_did_buffer_switch_on_eof = 1;
01167 }
01168
01169
01170 #ifdef YY_USE_PROTOS
01171 void yy_load_buffer_state( void )
01172 #else
01173 void yy_load_buffer_state()
01174 #endif
01175 {
01176 yy_n_chars = yy_current_buffer->yy_n_chars;
01177 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01178 yyin = yy_current_buffer->yy_input_file;
01179 yy_hold_char = *yy_c_buf_p;
01180 }
01181
01182
01183 #ifdef YY_USE_PROTOS
01184 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01185 #else
01186 YY_BUFFER_STATE yy_create_buffer( file, size )
01187 FILE *file;
01188 int size;
01189 #endif
01190 {
01191 YY_BUFFER_STATE b;
01192
01193 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01194 if ( ! b )
01195 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01196
01197 b->yy_buf_size = size;
01198
01199
01200
01201
01202 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01203 if ( ! b->yy_ch_buf )
01204 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01205
01206 b->yy_is_our_buffer = 1;
01207
01208 yy_init_buffer( b, file );
01209
01210 return b;
01211 }
01212
01213
01214 #ifdef YY_USE_PROTOS
01215 void yy_delete_buffer( YY_BUFFER_STATE b )
01216 #else
01217 void yy_delete_buffer( b )
01218 YY_BUFFER_STATE b;
01219 #endif
01220 {
01221 if ( ! b )
01222 return;
01223
01224 if ( b == yy_current_buffer )
01225 yy_current_buffer = (YY_BUFFER_STATE) 0;
01226
01227 if ( b->yy_is_our_buffer )
01228 yy_flex_free( (void *) b->yy_ch_buf );
01229
01230 yy_flex_free( (void *) b );
01231 }
01232
01233
01234
01235 #ifdef YY_USE_PROTOS
01236 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01237 #else
01238 void yy_init_buffer( b, file )
01239 YY_BUFFER_STATE b;
01240 FILE *file;
01241 #endif
01242
01243
01244 {
01245 yy_flush_buffer( b );
01246
01247 b->yy_input_file = file;
01248 b->yy_fill_buffer = 1;
01249
01250 #if YY_ALWAYS_INTERACTIVE
01251 b->yy_is_interactive = 1;
01252 #else
01253 #if YY_NEVER_INTERACTIVE
01254 b->yy_is_interactive = 0;
01255 #else
01256 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01257 #endif
01258 #endif
01259 }
01260
01261
01262 #ifdef YY_USE_PROTOS
01263 void yy_flush_buffer( YY_BUFFER_STATE b )
01264 #else
01265 void yy_flush_buffer( b )
01266 YY_BUFFER_STATE b;
01267 #endif
01268
01269 {
01270 if ( ! b )
01271 return;
01272
01273 b->yy_n_chars = 0;
01274
01275
01276
01277
01278
01279 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01280 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01281
01282 b->yy_buf_pos = &b->yy_ch_buf[0];
01283
01284 b->yy_at_bol = 1;
01285 b->yy_buffer_status = YY_BUFFER_NEW;
01286
01287 if ( b == yy_current_buffer )
01288 yy_load_buffer_state();
01289 }
01290
01291
01292 #ifndef YY_NO_SCAN_BUFFER
01293 #ifdef YY_USE_PROTOS
01294 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01295 #else
01296 YY_BUFFER_STATE yy_scan_buffer( base, size )
01297 char *base;
01298 yy_size_t size;
01299 #endif
01300 {
01301 YY_BUFFER_STATE b;
01302
01303 if ( size < 2 ||
01304 base[size-2] != YY_END_OF_BUFFER_CHAR ||
01305 base[size-1] != YY_END_OF_BUFFER_CHAR )
01306
01307 return 0;
01308
01309 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01310 if ( ! b )
01311 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01312
01313 b->yy_buf_size = size - 2;
01314 b->yy_buf_pos = b->yy_ch_buf = base;
01315 b->yy_is_our_buffer = 0;
01316 b->yy_input_file = 0;
01317 b->yy_n_chars = b->yy_buf_size;
01318 b->yy_is_interactive = 0;
01319 b->yy_at_bol = 1;
01320 b->yy_fill_buffer = 0;
01321 b->yy_buffer_status = YY_BUFFER_NEW;
01322
01323 yy_switch_to_buffer( b );
01324
01325 return b;
01326 }
01327 #endif
01328
01329
01330 #ifndef YY_NO_SCAN_STRING
01331 #ifdef YY_USE_PROTOS
01332 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01333 #else
01334 YY_BUFFER_STATE yy_scan_string( yy_str )
01335 yyconst char *yy_str;
01336 #endif
01337 {
01338 int len;
01339 for ( len = 0; yy_str[len]; ++len )
01340 ;
01341
01342 return yy_scan_bytes( yy_str, len );
01343 }
01344 #endif
01345
01346
01347 #ifndef YY_NO_SCAN_BYTES
01348 #ifdef YY_USE_PROTOS
01349 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01350 #else
01351 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01352 yyconst char *bytes;
01353 int len;
01354 #endif
01355 {
01356 YY_BUFFER_STATE b;
01357 char *buf;
01358 yy_size_t n;
01359 int i;
01360
01361
01362 n = len + 2;
01363 buf = (char *) yy_flex_alloc( n );
01364 if ( ! buf )
01365 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01366
01367 for ( i = 0; i < len; ++i )
01368 buf[i] = bytes[i];
01369
01370 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01371
01372 b = yy_scan_buffer( buf, n );
01373 if ( ! b )
01374 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01375
01376
01377
01378
01379 b->yy_is_our_buffer = 1;
01380
01381 return b;
01382 }
01383 #endif
01384
01385
01386 #ifndef YY_NO_PUSH_STATE
01387 #ifdef YY_USE_PROTOS
01388 static void yy_push_state( int new_state )
01389 #else
01390 static void yy_push_state( new_state )
01391 int new_state;
01392 #endif
01393 {
01394 if ( yy_start_stack_ptr >= yy_start_stack_depth )
01395 {
01396 yy_size_t new_size;
01397
01398 yy_start_stack_depth += YY_START_STACK_INCR;
01399 new_size = yy_start_stack_depth * sizeof( int );
01400
01401 if ( ! yy_start_stack )
01402 yy_start_stack = (int *) yy_flex_alloc( new_size );
01403
01404 else
01405 yy_start_stack = (int *) yy_flex_realloc(
01406 (void *) yy_start_stack, new_size );
01407
01408 if ( ! yy_start_stack )
01409 YY_FATAL_ERROR(
01410 "out of memory expanding start-condition stack" );
01411 }
01412
01413 yy_start_stack[yy_start_stack_ptr++] = YY_START;
01414
01415 BEGIN(new_state);
01416 }
01417 #endif
01418
01419
01420 #ifndef YY_NO_POP_STATE
01421 static void yy_pop_state()
01422 {
01423 if ( --yy_start_stack_ptr < 0 )
01424 YY_FATAL_ERROR( "start-condition stack underflow" );
01425
01426 BEGIN(yy_start_stack[yy_start_stack_ptr]);
01427 }
01428 #endif
01429
01430
01431 #ifndef YY_NO_TOP_STATE
01432 static int yy_top_state()
01433 {
01434 return yy_start_stack[yy_start_stack_ptr - 1];
01435 }
01436 #endif
01437
01438 #ifndef YY_EXIT_FAILURE
01439 #define YY_EXIT_FAILURE 2
01440 #endif
01441
01442 #ifdef YY_USE_PROTOS
01443 static void yy_fatal_error( yyconst char msg[] )
01444 #else
01445 static void yy_fatal_error( msg )
01446 char msg[];
01447 #endif
01448 {
01449 (void) fprintf( stderr, "%s\n", msg );
01450 exit( YY_EXIT_FAILURE );
01451 }
01452
01453
01454
01455
01456
01457 #undef yyless
01458 #define yyless(n) \
01459 do \
01460 { \
01461 \
01462 yytext[yyleng] = yy_hold_char; \
01463 yy_c_buf_p = yytext + n; \
01464 yy_hold_char = *yy_c_buf_p; \
01465 *yy_c_buf_p = '\0'; \
01466 yyleng = n; \
01467 } \
01468 while ( 0 )
01469
01470
01471
01472
01473 #ifndef yytext_ptr
01474 #ifdef YY_USE_PROTOS
01475 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01476 #else
01477 static void yy_flex_strncpy( s1, s2, n )
01478 char *s1;
01479 yyconst char *s2;
01480 int n;
01481 #endif
01482 {
01483 register int i;
01484 for ( i = 0; i < n; ++i )
01485 s1[i] = s2[i];
01486 }
01487 #endif
01488
01489 #ifdef YY_NEED_STRLEN
01490 #ifdef YY_USE_PROTOS
01491 static int yy_flex_strlen( yyconst char *s )
01492 #else
01493 static int yy_flex_strlen( s )
01494 yyconst char *s;
01495 #endif
01496 {
01497 register int n;
01498 for ( n = 0; s[n]; ++n )
01499 ;
01500
01501 return n;
01502 }
01503 #endif
01504
01505
01506 #ifdef YY_USE_PROTOS
01507 static void *yy_flex_alloc( yy_size_t size )
01508 #else
01509 static void *yy_flex_alloc( size )
01510 yy_size_t size;
01511 #endif
01512 {
01513 return (void *) malloc( size );
01514 }
01515
01516 #ifdef YY_USE_PROTOS
01517 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01518 #else
01519 static void *yy_flex_realloc( ptr, size )
01520 void *ptr;
01521 yy_size_t size;
01522 #endif
01523 {
01524
01525
01526
01527
01528
01529
01530
01531 return (void *) realloc( (char *) ptr, size );
01532 }
01533
01534 #ifdef YY_USE_PROTOS
01535 static void yy_flex_free( void *ptr )
01536 #else
01537 static void yy_flex_free( ptr )
01538 void *ptr;
01539 #endif
01540 {
01541 free( ptr );
01542 }
01543
01544 #if YY_MAIN
01545 int main()
01546 {
01547 yylex();
01548 return 0;
01549 }
01550 #endif
01551 #line 37 "dotty_scanner.l"
01552
01553 int yywrap() { return 1; }