1 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version: 4 * Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp 5 */ 6 7 #define FLEX_SCANNER 8 #define YY_FLEX_MAJOR_VERSION 2 9 #define YY_FLEX_MINOR_VERSION 5 10 11 #include <stdio.h> 12 13 14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 15 #ifdef c_plusplus 16 #ifndef __cplusplus 17 #define __cplusplus 18 #endif 19 #endif 20 21 22 #ifdef __cplusplus 23 24 #include <stdlib.h> 25 #include <unistd.h> 26 27 /* Use prototypes in function declarations. */ 28 #define YY_USE_PROTOS 29 30 /* The "const" storage-class-modifier is valid. */ 31 #define YY_USE_CONST 32 33 #else /* ! __cplusplus */ 34 35 #if __STDC__ 36 37 #define YY_USE_PROTOS 38 #define YY_USE_CONST 39 40 #endif /* __STDC__ */ 41 #endif /* ! __cplusplus */ 42 43 #ifdef __TURBOC__ 44 #pragma warn -rch 45 #pragma warn -use 46 #include <io.h> 47 #include <stdlib.h> 48 #define YY_USE_CONST 49 #define YY_USE_PROTOS 50 #endif 51 52 #ifdef YY_USE_CONST 53 #define yyconst const 54 #else 55 #define yyconst 56 #endif 57 58 59 #ifdef YY_USE_PROTOS 60 #define YY_PROTO(proto) proto 61 #else 62 #define YY_PROTO(proto) () 63 #endif 64 65 /* Returned upon end-of-file. */ 66 #define YY_NULL 0 67 68 /* Promotes a possibly negative, possibly signed char to an unsigned 69 * integer for use as an array index. If the signed char is negative, 70 * we want to instead treat it as an 8-bit unsigned char, hence the 71 * double cast. 72 */ 73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 74 75 /* Enter a start condition. This macro really ought to take a parameter, 76 * but we do it the disgusting crufty way forced on us by the ()-less 77 * definition of BEGIN. 78 */ 79 #define BEGIN yy_start = 1 + 2 * 80 81 /* Translate the current start state into a value that can be later handed 82 * to BEGIN to return to the state. The YYSTATE alias is for lex 83 * compatibility. 84 */ 85 #define YY_START ((yy_start - 1) / 2) 86 #define YYSTATE YY_START 87 88 /* Action number for EOF rule of a given start state. */ 89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 90 91 /* Special action meaning "start processing a new file". */ 92 #define YY_NEW_FILE yyrestart( yyin ) 93 94 #define YY_END_OF_BUFFER_CHAR 0 95 96 /* Size of default input buffer. */ 97 #define YY_BUF_SIZE 16384 98 99 typedef struct yy_buffer_state *YY_BUFFER_STATE; 100 101 extern int yyleng; 102 extern FILE *yyin, *yyout; 103 104 #define EOB_ACT_CONTINUE_SCAN 0 105 #define EOB_ACT_END_OF_FILE 1 106 #define EOB_ACT_LAST_MATCH 2 107 108 /* The funky do-while in the following #define is used to turn the definition 109 * int a single C statement (which needs a semi-colon terminator). This 110 * avoids problems with code like: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 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 yyless() call. 120 */ 121 122 /* Return all but the first 'n' matched characters back to the input stream. */ 123 124 #define yyless(n) \ 125 do \ 126 { \ 127 /* Undo effects of setting up yytext. */ \ 128 *yy_cp = yy_hold_char; \ 129 YY_RESTORE_YY_MORE_OFFSET \ 130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 132 } \ 133 while ( 0 ) 134 135 #define unput(c) yyunput( c, yytext_ptr ) 136 137 /* The following is because we cannot portably get our hands on size_t 138 * (without autoconf's help, which isn't available because we want 139 * flex-generated scanners to compile on their own). 140 */ 141 typedef unsigned int yy_size_t; 142 143 144 struct yy_buffer_state 145 { 146 FILE *yy_input_file; 147 148 char *yy_ch_buf; /* input buffer */ 149 char *yy_buf_pos; /* current position in input buffer */ 150 151 /* Size of input buffer in bytes, not including room for EOB 152 * characters. 153 */ 154 yy_size_t yy_buf_size; 155 156 /* Number of characters read into yy_ch_buf, not including EOB 157 * characters. 158 */ 159 int yy_n_chars; 160 161 /* Whether we "own" the buffer - i.e., we know we created it, 162 * and can realloc() it to grow it, and should free() it to 163 * delete it. 164 */ 165 int yy_is_our_buffer; 166 167 /* Whether this is an "interactive" input source; if so, and 168 * if we're using stdio for input, then we want to use getc() 169 * instead of fread(), to make sure we stop fetching input after 170 * each newline. 171 */ 172 int yy_is_interactive; 173 174 /* Whether we're considered to be at the beginning of a line. 175 * If so, '^' rules will be active on the next match, otherwise 176 * not. 177 */ 178 int yy_at_bol; 179 180 /* Whether to try to fill the input buffer when we reach the 181 * end of it. 182 */ 183 int yy_fill_buffer; 184 185 int yy_buffer_status; 186 #define YY_BUFFER_NEW 0 187 #define YY_BUFFER_NORMAL 1 188 /* When an EOF's been seen but there's still some text to process 189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 190 * shouldn't try reading from the input source any more. We might 191 * still have a bunch of tokens to match, though, because of 192 * possible backing-up. 193 * 194 * When we actually see the EOF, we change the status to "new" 195 * (via yyrestart()), so that the user can continue scanning by 196 * just pointing yyin at a new input file. 197 */ 198 #define YY_BUFFER_EOF_PENDING 2 199 }; 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 202 203 /* We provide macros for accessing buffer states in case in the 204 * future we want to put the buffer states in a more general 205 * "scanner state". 206 */ 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 209 210 /* yy_hold_char holds the character lost when yytext is formed. */ 211 static char yy_hold_char; 212 213 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216 int yyleng; 217 218 /* Points to current character in buffer. */ 219 static char *yy_c_buf_p = (char *) 0; 220 static int yy_init = 1; /* whether we need to initialize */ 221 static int yy_start = 0; /* start state number */ 222 223 /* Flag which is used to allow yywrap()'s to do buffer switches 224 * instead of setting up a fresh yyin. A bit of a hack ... 225 */ 226 static int yy_did_buffer_switch_on_eof; 227 228 void yyrestart YY_PROTO(( FILE *input_file )); 229 230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231 void yy_load_buffer_state YY_PROTO(( void )); 232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244 static void yy_flex_free YY_PROTO(( void * )); 245 246 #define yy_new_buffer yy_create_buffer 247 248 #define yy_set_interactive(is_interactive) \ 249 { \ 250 if ( ! yy_current_buffer ) \ 251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 252 yy_current_buffer->yy_is_interactive = is_interactive; \ 253 } 254 255 #define yy_set_bol(at_bol) \ 256 { \ 257 if ( ! yy_current_buffer ) \ 258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 259 yy_current_buffer->yy_at_bol = at_bol; \ 260 } 261 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 263 264 265 #define yywrap() 1 266 #define YY_SKIP_YYWRAP 267 typedef unsigned char YY_CHAR; 268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 269 typedef int yy_state_type; 270 extern char *yytext; 271 #define yytext_ptr yytext 272 273 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 274 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 275 static int yy_get_next_buffer YY_PROTO(( void )); 276 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 277 278 /* Done after the current pattern has been matched and before the 279 * corresponding action - sets up yytext. 280 */ 281 #define YY_DO_BEFORE_ACTION \ 282 yytext_ptr = yy_bp; \ 283 yyleng = (int) (yy_cp - yy_bp); \ 284 yy_hold_char = *yy_cp; \ 285 *yy_cp = '\0'; \ 286 yy_c_buf_p = yy_cp; 287 288 #define YY_NUM_RULES 32 289 #define YY_END_OF_BUFFER 33 290 static yyconst short int yy_accept[50] = 291 { 0, 292 0, 0, 33, 31, 30, 29, 6, 9, 20, 3, 293 4, 7, 10, 11, 8, 27, 27, 14, 31, 15, 294 26, 26, 21, 26, 22, 5, 30, 19, 23, 1, 295 2, 27, 0, 13, 16, 18, 17, 12, 26, 26, 296 26, 24, 28, 26, 26, 26, 26, 25, 0 297 } ; 298 299 static yyconst int yy_ec[256] = 300 { 0, 301 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 302 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 304 1, 2, 4, 1, 1, 1, 5, 6, 1, 7, 305 8, 9, 10, 1, 11, 1, 12, 13, 14, 14, 306 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, 307 16, 17, 1, 1, 18, 18, 18, 18, 18, 18, 308 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 309 19, 19, 19, 19, 19, 19, 19, 20, 19, 19, 310 1, 1, 1, 21, 1, 1, 18, 18, 18, 22, 311 312 23, 24, 19, 19, 25, 19, 19, 19, 19, 26, 313 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 314 19, 19, 1, 27, 1, 28, 1, 1, 1, 1, 315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 322 323 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 328 1, 1, 1, 1, 1 329 } ; 330 331 static yyconst int yy_meta[29] = 332 { 0, 333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 334 1, 1, 2, 2, 1, 1, 1, 2, 3, 4, 335 1, 2, 2, 2, 3, 3, 1, 1 336 } ; 337 338 static yyconst short int yy_base[54] = 339 { 0, 340 0, 0, 72, 73, 69, 73, 54, 73, 63, 73, 341 73, 73, 73, 73, 20, 48, 47, 15, 50, 17, 342 16, 0, 73, 24, 38, 73, 62, 73, 73, 73, 343 73, 43, 0, 73, 73, 73, 73, 73, 39, 0, 344 14, 73, 0, 20, 35, 37, 30, 0, 73, 49, 345 52, 55, 46 346 } ; 347 348 static yyconst short int yy_def[54] = 349 { 0, 350 49, 1, 49, 49, 49, 49, 49, 49, 49, 49, 351 49, 49, 49, 49, 49, 50, 50, 49, 49, 49, 352 51, 52, 49, 51, 49, 49, 49, 49, 49, 49, 353 49, 50, 53, 49, 49, 49, 49, 49, 24, 52, 354 24, 49, 53, 51, 52, 52, 52, 52, 0, 49, 355 49, 49, 49 356 } ; 357 358 static yyconst short int yy_nxt[102] = 359 { 0, 360 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 361 14, 15, 16, 17, 18, 19, 20, 21, 22, 22, 362 23, 24, 21, 21, 22, 22, 25, 26, 30, 34, 363 35, 31, 37, 38, 40, 40, 39, 44, 40, 40, 364 40, 40, 40, 40, 45, 40, 41, 43, 40, 40, 365 32, 48, 32, 39, 39, 39, 40, 40, 40, 47, 366 46, 39, 49, 27, 42, 36, 49, 33, 29, 28, 367 27, 49, 3, 49, 49, 49, 49, 49, 49, 49, 368 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 369 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 370 371 49 372 } ; 373 374 static yyconst short int yy_chk[102] = 375 { 0, 376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 378 1, 1, 1, 1, 1, 1, 1, 1, 15, 18, 379 18, 15, 20, 20, 21, 21, 41, 41, 44, 44, 380 21, 21, 24, 24, 44, 44, 24, 53, 24, 24, 381 50, 47, 50, 51, 51, 51, 52, 52, 52, 46, 382 45, 39, 32, 27, 25, 19, 17, 16, 9, 7, 383 5, 3, 49, 49, 49, 49, 49, 49, 49, 49, 384 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 385 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 386 387 49 388 } ; 389 390 static yy_state_type yy_last_accepting_state; 391 static char *yy_last_accepting_cpos; 392 393 /* The intent behind this definition is that it'll catch 394 * any uses of REJECT which flex missed. 395 */ 396 #define REJECT reject_used_but_not_detected 397 #define yymore() yymore_used_but_not_detected 398 #define YY_MORE_ADJ 0 399 #define YY_RESTORE_YY_MORE_OFFSET 400 char *yytext; 401 #line 1 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 402 #define INITIAL 0 403 #line 2 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 404 /****************************************************************************** 405 * 406 * Module Name: prparser.l - Flex input file for preprocessor lexer 407 * 408 *****************************************************************************/ 409 410 /* 411 * Copyright (C) 2000 - 2025, Intel Corp. 412 * All rights reserved. 413 * 414 * Redistribution and use in source and binary forms, with or without 415 * modification, are permitted provided that the following conditions 416 * are met: 417 * 1. Redistributions of source code must retain the above copyright 418 * notice, this list of conditions, and the following disclaimer, 419 * without modification. 420 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 421 * substantially similar to the "NO WARRANTY" disclaimer below 422 * ("Disclaimer") and any redistribution must be conditioned upon 423 * including a substantially similar Disclaimer requirement for further 424 * binary redistribution. 425 * 3. Neither the names of the above-listed copyright holders nor the names 426 * of any contributors may be used to endorse or promote products derived 427 * from this software without specific prior written permission. 428 * 429 * Alternatively, this software may be distributed under the terms of the 430 * GNU General Public License ("GPL") version 2 as published by the Free 431 * Software Foundation. 432 * 433 * NO WARRANTY 434 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 435 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 436 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 437 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 438 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 439 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 440 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 441 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 442 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 443 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 444 * POSSIBILITY OF SUCH DAMAGES. 445 */ 446 447 #include "aslcompiler.h" 448 #include "prparser.y.h" 449 450 /* Buffer to pass strings to the parser */ 451 452 #define STRING_SETUP strcpy (AslGbl_StringBuffer, PrParsertext);\ 453 PrParserlval.str = AslGbl_StringBuffer 454 455 #define _COMPONENT ACPI_COMPILER 456 ACPI_MODULE_NAME ("prscanner") 457 458 459 /* Local prototypes */ 460 461 static char 462 PrDoCommentType1 ( 463 void); 464 465 static char 466 PrDoCommentType2 ( 467 void); 468 #line 577 "lex.yy.c" 469 470 /* Macros after this point can all be overridden by user definitions in 471 * section 1. 472 */ 473 474 #ifndef YY_SKIP_YYWRAP 475 #ifdef __cplusplus 476 extern "C" int yywrap YY_PROTO(( void )); 477 #else 478 extern int yywrap YY_PROTO(( void )); 479 #endif 480 #endif 481 482 #ifndef YY_NO_UNPUT 483 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 484 #endif 485 486 #ifndef yytext_ptr 487 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 488 #endif 489 490 #ifdef YY_NEED_STRLEN 491 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 492 #endif 493 494 #ifndef YY_NO_INPUT 495 #ifdef __cplusplus 496 static int yyinput YY_PROTO(( void )); 497 #else 498 static int input YY_PROTO(( void )); 499 #endif 500 #endif 501 502 #if YY_STACK_USED 503 static int yy_start_stack_ptr = 0; 504 static int yy_start_stack_depth = 0; 505 static int *yy_start_stack = 0; 506 #ifndef YY_NO_PUSH_STATE 507 static void yy_push_state YY_PROTO(( int new_state )); 508 #endif 509 #ifndef YY_NO_POP_STATE 510 static void yy_pop_state YY_PROTO(( void )); 511 #endif 512 #ifndef YY_NO_TOP_STATE 513 static int yy_top_state YY_PROTO(( void )); 514 #endif 515 516 #else 517 #define YY_NO_PUSH_STATE 1 518 #define YY_NO_POP_STATE 1 519 #define YY_NO_TOP_STATE 1 520 #endif 521 522 #ifdef YY_MALLOC_DECL 523 YY_MALLOC_DECL 524 #else 525 #if __STDC__ 526 #ifndef __cplusplus 527 #include <stdlib.h> 528 #endif 529 #else 530 /* Just try to get by without declaring the routines. This will fail 531 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 532 * or sizeof(void*) != sizeof(int). 533 */ 534 #endif 535 #endif 536 537 /* Amount of stuff to slurp up with each read. */ 538 #ifndef YY_READ_BUF_SIZE 539 #define YY_READ_BUF_SIZE 8192 540 #endif 541 542 /* Copy whatever the last rule matched to the standard output. */ 543 544 #ifndef ECHO 545 /* This used to be an fputs(), but since the string might contain NUL's, 546 * we now use fwrite(). 547 */ 548 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 549 #endif 550 551 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 552 * is returned in "result". 553 */ 554 #ifndef YY_INPUT 555 #define YY_INPUT(buf,result,max_size) \ 556 if ( yy_current_buffer->yy_is_interactive ) \ 557 { \ 558 int c = '*', n; \ 559 for ( n = 0; n < max_size && \ 560 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 561 buf[n] = (char) c; \ 562 if ( c == '\n' ) \ 563 buf[n++] = (char) c; \ 564 if ( c == EOF && ferror( yyin ) ) \ 565 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 566 result = n; \ 567 } \ 568 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 569 && ferror( yyin ) ) \ 570 YY_FATAL_ERROR( "input in flex scanner failed" ); 571 #endif 572 573 /* No semi-colon after return; correct usage is to write "yyterminate();" - 574 * we don't want an extra ';' after the "return" because that will cause 575 * some compilers to complain about unreachable statements. 576 */ 577 #ifndef yyterminate 578 #define yyterminate() return YY_NULL 579 #endif 580 581 /* Number of entries by which start-condition stack grows. */ 582 #ifndef YY_START_STACK_INCR 583 #define YY_START_STACK_INCR 25 584 #endif 585 586 /* Report a fatal error. */ 587 #ifndef YY_FATAL_ERROR 588 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 589 #endif 590 591 /* Default declaration of generated scanner - a define so the user can 592 * easily add parameters. 593 */ 594 #ifndef YY_DECL 595 #define YY_DECL int yylex YY_PROTO(( void )) 596 #endif 597 598 /* Code executed at the beginning of each rule, after yytext and yyleng 599 * have been set up. 600 */ 601 #ifndef YY_USER_ACTION 602 #define YY_USER_ACTION 603 #endif 604 605 /* Code executed at the end of each rule. */ 606 #ifndef YY_BREAK 607 #define YY_BREAK break; 608 #endif 609 610 #define YY_RULE_SETUP \ 611 YY_USER_ACTION 612 613 YY_DECL 614 { 615 register yy_state_type yy_current_state; 616 register char *yy_cp, *yy_bp; 617 register int yy_act; 618 619 #line 184 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 620 621 #line 730 "lex.yy.c" 622 623 if ( yy_init ) 624 { 625 yy_init = 0; 626 627 #ifdef YY_USER_INIT 628 YY_USER_INIT; 629 #endif 630 631 if ( ! yy_start ) 632 yy_start = 1; /* first start state */ 633 634 if ( ! yyin ) 635 yyin = stdin; 636 637 if ( ! yyout ) 638 yyout = stdout; 639 640 if ( ! yy_current_buffer ) 641 yy_current_buffer = 642 yy_create_buffer( yyin, YY_BUF_SIZE ); 643 644 yy_load_buffer_state(); 645 } 646 647 while ( 1 ) /* loops until end-of-file is reached */ 648 { 649 yy_cp = yy_c_buf_p; 650 651 /* Support of yytext. */ 652 *yy_cp = yy_hold_char; 653 654 /* yy_bp points to the position in yy_ch_buf of the start of 655 * the current run. 656 */ 657 yy_bp = yy_cp; 658 659 yy_current_state = yy_start; 660 yy_match: 661 do 662 { 663 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 664 if ( yy_accept[yy_current_state] ) 665 { 666 yy_last_accepting_state = yy_current_state; 667 yy_last_accepting_cpos = yy_cp; 668 } 669 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 670 { 671 yy_current_state = (int) yy_def[yy_current_state]; 672 if ( yy_current_state >= 50 ) 673 yy_c = yy_meta[(unsigned int) yy_c]; 674 } 675 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 676 ++yy_cp; 677 } 678 while ( yy_base[yy_current_state] != 73 ); 679 680 yy_find_action: 681 yy_act = yy_accept[yy_current_state]; 682 if ( yy_act == 0 ) 683 { /* have to back up */ 684 yy_cp = yy_last_accepting_cpos; 685 yy_current_state = yy_last_accepting_state; 686 yy_act = yy_accept[yy_current_state]; 687 } 688 689 YY_DO_BEFORE_ACTION; 690 691 692 do_action: /* This label is used only to access EOF actions. */ 693 694 695 switch ( yy_act ) 696 { /* beginning of action switch */ 697 case 0: /* must back up */ 698 /* undo the effects of YY_DO_BEFORE_ACTION */ 699 *yy_cp = yy_hold_char; 700 yy_cp = yy_last_accepting_cpos; 701 yy_current_state = yy_last_accepting_state; 702 goto yy_find_action; 703 704 case 1: 705 YY_RULE_SETUP 706 #line 185 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 707 { if (!PrDoCommentType1 ()) {yyterminate ();} } 708 YY_BREAK 709 case 2: 710 YY_RULE_SETUP 711 #line 186 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 712 { if (!PrDoCommentType2 ()) {yyterminate ();} } 713 YY_BREAK 714 case 3: 715 YY_RULE_SETUP 716 #line 188 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 717 return (EXPOP_PAREN_OPEN); 718 YY_BREAK 719 case 4: 720 YY_RULE_SETUP 721 #line 189 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 722 return (EXPOP_PAREN_CLOSE); 723 YY_BREAK 724 case 5: 725 YY_RULE_SETUP 726 #line 190 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 727 return (EXPOP_ONES_COMPLIMENT); 728 YY_BREAK 729 case 6: 730 YY_RULE_SETUP 731 #line 191 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 732 return (EXPOP_LOGICAL_NOT); 733 YY_BREAK 734 case 7: 735 YY_RULE_SETUP 736 #line 192 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 737 return (EXPOP_MULTIPLY); 738 YY_BREAK 739 case 8: 740 YY_RULE_SETUP 741 #line 193 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 742 return (EXPOP_DIVIDE); 743 YY_BREAK 744 case 9: 745 YY_RULE_SETUP 746 #line 194 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 747 return (EXPOP_MODULO); 748 YY_BREAK 749 case 10: 750 YY_RULE_SETUP 751 #line 195 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 752 return (EXPOP_ADD); 753 YY_BREAK 754 case 11: 755 YY_RULE_SETUP 756 #line 196 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 757 return (EXPOP_SUBTRACT); 758 YY_BREAK 759 case 12: 760 YY_RULE_SETUP 761 #line 197 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 762 return (EXPOP_SHIFT_RIGHT); 763 YY_BREAK 764 case 13: 765 YY_RULE_SETUP 766 #line 198 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 767 return (EXPOP_SHIFT_LEFT); 768 YY_BREAK 769 case 14: 770 YY_RULE_SETUP 771 #line 199 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 772 return (EXPOP_LESS); 773 YY_BREAK 774 case 15: 775 YY_RULE_SETUP 776 #line 200 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 777 return (EXPOP_GREATER); 778 YY_BREAK 779 case 16: 780 YY_RULE_SETUP 781 #line 201 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 782 return (EXPOP_LESS_EQUAL); 783 YY_BREAK 784 case 17: 785 YY_RULE_SETUP 786 #line 202 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 787 return (EXPOP_GREATER_EQUAL); 788 YY_BREAK 789 case 18: 790 YY_RULE_SETUP 791 #line 203 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 792 return (EXPOP_EQUAL); 793 YY_BREAK 794 case 19: 795 YY_RULE_SETUP 796 #line 204 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 797 return (EXPOP_NOT_EQUAL); 798 YY_BREAK 799 case 20: 800 YY_RULE_SETUP 801 #line 205 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 802 return (EXPOP_AND); 803 YY_BREAK 804 case 21: 805 YY_RULE_SETUP 806 #line 206 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 807 return (EXPOP_XOR); 808 YY_BREAK 809 case 22: 810 YY_RULE_SETUP 811 #line 207 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 812 return (EXPOP_OR); 813 YY_BREAK 814 case 23: 815 YY_RULE_SETUP 816 #line 208 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 817 return (EXPOP_LOGICAL_AND); 818 YY_BREAK 819 case 24: 820 YY_RULE_SETUP 821 #line 209 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 822 return (EXPOP_LOGICAL_OR); 823 YY_BREAK 824 case 25: 825 YY_RULE_SETUP 826 #line 211 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 827 return (EXPOP_DEFINE); 828 YY_BREAK 829 case 26: 830 YY_RULE_SETUP 831 #line 212 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 832 {STRING_SETUP; return (EXPOP_IDENTIFIER);} 833 YY_BREAK 834 case YY_STATE_EOF(INITIAL): 835 #line 214 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 836 return (EXPOP_EOF); /* null end-of-string */ 837 YY_BREAK 838 case 27: 839 YY_RULE_SETUP 840 #line 216 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 841 return (EXPOP_NUMBER); 842 YY_BREAK 843 case 28: 844 YY_RULE_SETUP 845 #line 217 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 846 return (EXPOP_HEX_NUMBER); 847 YY_BREAK 848 case 29: 849 YY_RULE_SETUP 850 #line 218 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 851 return (EXPOP_NEW_LINE); 852 YY_BREAK 853 case 30: 854 YY_RULE_SETUP 855 #line 219 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 856 /* Ignore */ 857 YY_BREAK 858 case 31: 859 YY_RULE_SETUP 860 #line 221 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 861 return (EXPOP_EOF); 862 YY_BREAK 863 case 32: 864 YY_RULE_SETUP 865 #line 222 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 866 ECHO; 867 YY_BREAK 868 #line 977 "lex.yy.c" 869 870 case YY_END_OF_BUFFER: 871 { 872 /* Amount of text matched not including the EOB char. */ 873 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 874 875 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 876 *yy_cp = yy_hold_char; 877 YY_RESTORE_YY_MORE_OFFSET 878 879 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 880 { 881 /* We're scanning a new file or input source. It's 882 * possible that this happened because the user 883 * just pointed yyin at a new source and called 884 * yylex(). If so, then we have to assure 885 * consistency between yy_current_buffer and our 886 * globals. Here is the right place to do so, because 887 * this is the first action (other than possibly a 888 * back-up) that will match for the new input source. 889 */ 890 yy_n_chars = yy_current_buffer->yy_n_chars; 891 yy_current_buffer->yy_input_file = yyin; 892 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 893 } 894 895 /* Note that here we test for yy_c_buf_p "<=" to the position 896 * of the first EOB in the buffer, since yy_c_buf_p will 897 * already have been incremented past the NUL character 898 * (since all states make transitions on EOB to the 899 * end-of-buffer state). Contrast this with the test 900 * in input(). 901 */ 902 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 903 { /* This was really a NUL. */ 904 yy_state_type yy_next_state; 905 906 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 907 908 yy_current_state = yy_get_previous_state(); 909 910 /* Okay, we're now positioned to make the NUL 911 * transition. We couldn't have 912 * yy_get_previous_state() go ahead and do it 913 * for us because it doesn't know how to deal 914 * with the possibility of jamming (and we don't 915 * want to build jamming into it because then it 916 * will run more slowly). 917 */ 918 919 yy_next_state = yy_try_NUL_trans( yy_current_state ); 920 921 yy_bp = yytext_ptr + YY_MORE_ADJ; 922 923 if ( yy_next_state ) 924 { 925 /* Consume the NUL. */ 926 yy_cp = ++yy_c_buf_p; 927 yy_current_state = yy_next_state; 928 goto yy_match; 929 } 930 931 else 932 { 933 yy_cp = yy_c_buf_p; 934 goto yy_find_action; 935 } 936 } 937 938 else switch ( yy_get_next_buffer() ) 939 { 940 case EOB_ACT_END_OF_FILE: 941 { 942 yy_did_buffer_switch_on_eof = 0; 943 944 if ( yywrap() ) 945 { 946 /* Note: because we've taken care in 947 * yy_get_next_buffer() to have set up 948 * yytext, we can now set up 949 * yy_c_buf_p so that if some total 950 * hoser (like flex itself) wants to 951 * call the scanner after we return the 952 * YY_NULL, it'll still work - another 953 * YY_NULL will get returned. 954 */ 955 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 956 957 yy_act = YY_STATE_EOF(YY_START); 958 goto do_action; 959 } 960 961 else 962 { 963 if ( ! yy_did_buffer_switch_on_eof ) 964 YY_NEW_FILE; 965 } 966 break; 967 } 968 969 case EOB_ACT_CONTINUE_SCAN: 970 yy_c_buf_p = 971 yytext_ptr + yy_amount_of_matched_text; 972 973 yy_current_state = yy_get_previous_state(); 974 975 yy_cp = yy_c_buf_p; 976 yy_bp = yytext_ptr + YY_MORE_ADJ; 977 goto yy_match; 978 979 case EOB_ACT_LAST_MATCH: 980 yy_c_buf_p = 981 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 982 983 yy_current_state = yy_get_previous_state(); 984 985 yy_cp = yy_c_buf_p; 986 yy_bp = yytext_ptr + YY_MORE_ADJ; 987 goto yy_find_action; 988 } 989 break; 990 } 991 992 default: 993 YY_FATAL_ERROR( 994 "fatal flex scanner internal error--no action found" ); 995 } /* end of action switch */ 996 } /* end of scanning one token */ 997 } /* end of yylex */ 998 999 1000 /* yy_get_next_buffer - try to read in a new buffer 1001 * 1002 * Returns a code representing an action: 1003 * EOB_ACT_LAST_MATCH - 1004 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1005 * EOB_ACT_END_OF_FILE - end of file 1006 */ 1007 1008 static int yy_get_next_buffer() 1009 { 1010 register char *dest = yy_current_buffer->yy_ch_buf; 1011 register char *source = yytext_ptr; 1012 register int number_to_move, i; 1013 int ret_val; 1014 1015 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1016 YY_FATAL_ERROR( 1017 "fatal flex scanner internal error--end of buffer missed" ); 1018 1019 if ( yy_current_buffer->yy_fill_buffer == 0 ) 1020 { /* Don't try to fill the buffer, so this is an EOF. */ 1021 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1022 { 1023 /* We matched a single character, the EOB, so 1024 * treat this as a final EOF. 1025 */ 1026 return EOB_ACT_END_OF_FILE; 1027 } 1028 1029 else 1030 { 1031 /* We matched some text prior to the EOB, first 1032 * process it. 1033 */ 1034 return EOB_ACT_LAST_MATCH; 1035 } 1036 } 1037 1038 /* Try to read more data. */ 1039 1040 /* First move last chars to start of buffer. */ 1041 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1042 1043 for ( i = 0; i < number_to_move; ++i ) 1044 *(dest++) = *(source++); 1045 1046 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1047 /* don't do the read, it's not guaranteed to return an EOF, 1048 * just force an EOF 1049 */ 1050 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1051 1052 else 1053 { 1054 int num_to_read = 1055 yy_current_buffer->yy_buf_size - number_to_move - 1; 1056 1057 while ( num_to_read <= 0 ) 1058 { /* Not enough room in the buffer - grow it. */ 1059 #ifdef YY_USES_REJECT 1060 YY_FATAL_ERROR( 1061 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 1062 #else 1063 1064 /* just a shorter name for the current buffer */ 1065 YY_BUFFER_STATE b = yy_current_buffer; 1066 1067 int yy_c_buf_p_offset = 1068 (int) (yy_c_buf_p - b->yy_ch_buf); 1069 1070 if ( b->yy_is_our_buffer ) 1071 { 1072 int new_size = b->yy_buf_size * 2; 1073 1074 if ( new_size <= 0 ) 1075 b->yy_buf_size += b->yy_buf_size / 8; 1076 else 1077 b->yy_buf_size *= 2; 1078 1079 b->yy_ch_buf = (char *) 1080 /* Include room in for 2 EOB chars. */ 1081 yy_flex_realloc( (void *) b->yy_ch_buf, 1082 b->yy_buf_size + 2 ); 1083 } 1084 else 1085 /* Can't grow it, we don't own it. */ 1086 b->yy_ch_buf = 0; 1087 1088 if ( ! b->yy_ch_buf ) 1089 YY_FATAL_ERROR( 1090 "fatal error - scanner input buffer overflow" ); 1091 1092 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1093 1094 num_to_read = yy_current_buffer->yy_buf_size - 1095 number_to_move - 1; 1096 #endif 1097 } 1098 1099 if ( num_to_read > YY_READ_BUF_SIZE ) 1100 num_to_read = YY_READ_BUF_SIZE; 1101 1102 /* Read in more data. */ 1103 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 1104 yy_n_chars, num_to_read ); 1105 1106 yy_current_buffer->yy_n_chars = yy_n_chars; 1107 } 1108 1109 if ( yy_n_chars == 0 ) 1110 { 1111 if ( number_to_move == YY_MORE_ADJ ) 1112 { 1113 ret_val = EOB_ACT_END_OF_FILE; 1114 yyrestart( yyin ); 1115 } 1116 1117 else 1118 { 1119 ret_val = EOB_ACT_LAST_MATCH; 1120 yy_current_buffer->yy_buffer_status = 1121 YY_BUFFER_EOF_PENDING; 1122 } 1123 } 1124 1125 else 1126 ret_val = EOB_ACT_CONTINUE_SCAN; 1127 1128 yy_n_chars += number_to_move; 1129 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1130 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1131 1132 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1133 1134 return ret_val; 1135 } 1136 1137 1138 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1139 1140 static yy_state_type yy_get_previous_state() 1141 { 1142 register yy_state_type yy_current_state; 1143 register char *yy_cp; 1144 1145 yy_current_state = yy_start; 1146 1147 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1148 { 1149 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1150 if ( yy_accept[yy_current_state] ) 1151 { 1152 yy_last_accepting_state = yy_current_state; 1153 yy_last_accepting_cpos = yy_cp; 1154 } 1155 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1156 { 1157 yy_current_state = (int) yy_def[yy_current_state]; 1158 if ( yy_current_state >= 50 ) 1159 yy_c = yy_meta[(unsigned int) yy_c]; 1160 } 1161 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1162 } 1163 1164 return yy_current_state; 1165 } 1166 1167 1168 /* yy_try_NUL_trans - try to make a transition on the NUL character 1169 * 1170 * synopsis 1171 * next_state = yy_try_NUL_trans( current_state ); 1172 */ 1173 1174 #ifdef YY_USE_PROTOS 1175 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1176 #else 1177 static yy_state_type yy_try_NUL_trans( yy_current_state ) 1178 yy_state_type yy_current_state; 1179 #endif 1180 { 1181 register int yy_is_jam; 1182 register char *yy_cp = yy_c_buf_p; 1183 1184 register YY_CHAR yy_c = 1; 1185 if ( yy_accept[yy_current_state] ) 1186 { 1187 yy_last_accepting_state = yy_current_state; 1188 yy_last_accepting_cpos = yy_cp; 1189 } 1190 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1191 { 1192 yy_current_state = (int) yy_def[yy_current_state]; 1193 if ( yy_current_state >= 50 ) 1194 yy_c = yy_meta[(unsigned int) yy_c]; 1195 } 1196 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1197 yy_is_jam = (yy_current_state == 49); 1198 1199 return yy_is_jam ? 0 : yy_current_state; 1200 } 1201 1202 1203 #ifndef YY_NO_UNPUT 1204 #ifdef YY_USE_PROTOS 1205 static void yyunput( int c, register char *yy_bp ) 1206 #else 1207 static void yyunput( c, yy_bp ) 1208 int c; 1209 register char *yy_bp; 1210 #endif 1211 { 1212 register char *yy_cp = yy_c_buf_p; 1213 1214 /* undo effects of setting up yytext */ 1215 *yy_cp = yy_hold_char; 1216 1217 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1218 { /* need to shift things up to make room */ 1219 /* +2 for EOB chars. */ 1220 register int number_to_move = yy_n_chars + 2; 1221 register char *dest = &yy_current_buffer->yy_ch_buf[ 1222 yy_current_buffer->yy_buf_size + 2]; 1223 register char *source = 1224 &yy_current_buffer->yy_ch_buf[number_to_move]; 1225 1226 while ( source > yy_current_buffer->yy_ch_buf ) 1227 *--dest = *--source; 1228 1229 yy_cp += (int) (dest - source); 1230 yy_bp += (int) (dest - source); 1231 yy_current_buffer->yy_n_chars = 1232 yy_n_chars = yy_current_buffer->yy_buf_size; 1233 1234 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1235 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1236 } 1237 1238 *--yy_cp = (char) c; 1239 1240 1241 yytext_ptr = yy_bp; 1242 yy_hold_char = *yy_cp; 1243 yy_c_buf_p = yy_cp; 1244 } 1245 #endif /* ifndef YY_NO_UNPUT */ 1246 1247 1248 #ifdef __cplusplus 1249 static int yyinput() 1250 #else 1251 static int input() 1252 #endif 1253 { 1254 int c; 1255 1256 *yy_c_buf_p = yy_hold_char; 1257 1258 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1259 { 1260 /* yy_c_buf_p now points to the character we want to return. 1261 * If this occurs *before* the EOB characters, then it's a 1262 * valid NUL; if not, then we've hit the end of the buffer. 1263 */ 1264 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1265 /* This was really a NUL. */ 1266 *yy_c_buf_p = '\0'; 1267 1268 else 1269 { /* need more input */ 1270 int offset = yy_c_buf_p - yytext_ptr; 1271 ++yy_c_buf_p; 1272 1273 switch ( yy_get_next_buffer() ) 1274 { 1275 case EOB_ACT_LAST_MATCH: 1276 /* This happens because yy_g_n_b() 1277 * sees that we've accumulated a 1278 * token and flags that we need to 1279 * try matching the token before 1280 * proceeding. But for input(), 1281 * there's no matching to consider. 1282 * So convert the EOB_ACT_LAST_MATCH 1283 * to EOB_ACT_END_OF_FILE. 1284 */ 1285 1286 /* Reset buffer status. */ 1287 yyrestart( yyin ); 1288 1289 /* fall through */ 1290 1291 case EOB_ACT_END_OF_FILE: 1292 { 1293 if ( yywrap() ) 1294 return EOF; 1295 1296 if ( ! yy_did_buffer_switch_on_eof ) 1297 YY_NEW_FILE; 1298 #ifdef __cplusplus 1299 return yyinput(); 1300 #else 1301 return input(); 1302 #endif 1303 } 1304 1305 case EOB_ACT_CONTINUE_SCAN: 1306 yy_c_buf_p = yytext_ptr + offset; 1307 break; 1308 } 1309 } 1310 } 1311 1312 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1313 *yy_c_buf_p = '\0'; /* preserve yytext */ 1314 yy_hold_char = *++yy_c_buf_p; 1315 1316 1317 return c; 1318 } 1319 1320 1321 #ifdef YY_USE_PROTOS 1322 void yyrestart( FILE *input_file ) 1323 #else 1324 void yyrestart( input_file ) 1325 FILE *input_file; 1326 #endif 1327 { 1328 if ( ! yy_current_buffer ) 1329 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1330 1331 yy_init_buffer( yy_current_buffer, input_file ); 1332 yy_load_buffer_state(); 1333 } 1334 1335 1336 #ifdef YY_USE_PROTOS 1337 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1338 #else 1339 void yy_switch_to_buffer( new_buffer ) 1340 YY_BUFFER_STATE new_buffer; 1341 #endif 1342 { 1343 if ( yy_current_buffer == new_buffer ) 1344 return; 1345 1346 if ( yy_current_buffer ) 1347 { 1348 /* Flush out information for old buffer. */ 1349 *yy_c_buf_p = yy_hold_char; 1350 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1351 yy_current_buffer->yy_n_chars = yy_n_chars; 1352 } 1353 1354 yy_current_buffer = new_buffer; 1355 yy_load_buffer_state(); 1356 1357 /* We don't actually know whether we did this switch during 1358 * EOF (yywrap()) processing, but the only time this flag 1359 * is looked at is after yywrap() is called, so it's safe 1360 * to go ahead and always set it. 1361 */ 1362 yy_did_buffer_switch_on_eof = 1; 1363 } 1364 1365 1366 #ifdef YY_USE_PROTOS 1367 void yy_load_buffer_state( void ) 1368 #else 1369 void yy_load_buffer_state() 1370 #endif 1371 { 1372 yy_n_chars = yy_current_buffer->yy_n_chars; 1373 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1374 yyin = yy_current_buffer->yy_input_file; 1375 yy_hold_char = *yy_c_buf_p; 1376 } 1377 1378 1379 #ifdef YY_USE_PROTOS 1380 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1381 #else 1382 YY_BUFFER_STATE yy_create_buffer( file, size ) 1383 FILE *file; 1384 int size; 1385 #endif 1386 { 1387 YY_BUFFER_STATE b; 1388 1389 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1390 if ( ! b ) 1391 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1392 1393 b->yy_buf_size = size; 1394 1395 /* yy_ch_buf has to be 2 characters longer than the size given because 1396 * we need to put in 2 end-of-buffer characters. 1397 */ 1398 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1399 if ( ! b->yy_ch_buf ) 1400 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1401 1402 b->yy_is_our_buffer = 1; 1403 1404 yy_init_buffer( b, file ); 1405 1406 return b; 1407 } 1408 1409 1410 #ifdef YY_USE_PROTOS 1411 void yy_delete_buffer( YY_BUFFER_STATE b ) 1412 #else 1413 void yy_delete_buffer( b ) 1414 YY_BUFFER_STATE b; 1415 #endif 1416 { 1417 if ( ! b ) 1418 return; 1419 1420 if ( b == yy_current_buffer ) 1421 yy_current_buffer = (YY_BUFFER_STATE) 0; 1422 1423 if ( b->yy_is_our_buffer ) 1424 yy_flex_free( (void *) b->yy_ch_buf ); 1425 1426 yy_flex_free( (void *) b ); 1427 } 1428 1429 1430 #ifndef YY_ALWAYS_INTERACTIVE 1431 #ifndef YY_NEVER_INTERACTIVE 1432 extern int isatty YY_PROTO(( int )); 1433 #endif 1434 #endif 1435 1436 #ifdef YY_USE_PROTOS 1437 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1438 #else 1439 void yy_init_buffer( b, file ) 1440 YY_BUFFER_STATE b; 1441 FILE *file; 1442 #endif 1443 1444 1445 { 1446 yy_flush_buffer( b ); 1447 1448 b->yy_input_file = file; 1449 b->yy_fill_buffer = 1; 1450 1451 #if YY_ALWAYS_INTERACTIVE 1452 b->yy_is_interactive = 1; 1453 #else 1454 #if YY_NEVER_INTERACTIVE 1455 b->yy_is_interactive = 0; 1456 #else 1457 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1458 #endif 1459 #endif 1460 } 1461 1462 1463 #ifdef YY_USE_PROTOS 1464 void yy_flush_buffer( YY_BUFFER_STATE b ) 1465 #else 1466 void yy_flush_buffer( b ) 1467 YY_BUFFER_STATE b; 1468 #endif 1469 1470 { 1471 if ( ! b ) 1472 return; 1473 1474 b->yy_n_chars = 0; 1475 1476 /* We always need two end-of-buffer characters. The first causes 1477 * a transition to the end-of-buffer state. The second causes 1478 * a jam in that state. 1479 */ 1480 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 1481 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 1482 1483 b->yy_buf_pos = &b->yy_ch_buf[0]; 1484 1485 b->yy_at_bol = 1; 1486 b->yy_buffer_status = YY_BUFFER_NEW; 1487 1488 if ( b == yy_current_buffer ) 1489 yy_load_buffer_state(); 1490 } 1491 1492 1493 #ifndef YY_NO_SCAN_BUFFER 1494 #ifdef YY_USE_PROTOS 1495 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1496 #else 1497 YY_BUFFER_STATE yy_scan_buffer( base, size ) 1498 char *base; 1499 yy_size_t size; 1500 #endif 1501 { 1502 YY_BUFFER_STATE b; 1503 1504 if ( size < 2 || 1505 base[size-2] != YY_END_OF_BUFFER_CHAR || 1506 base[size-1] != YY_END_OF_BUFFER_CHAR ) 1507 /* They forgot to leave room for the EOB's. */ 1508 return 0; 1509 1510 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1511 if ( ! b ) 1512 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1513 1514 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 1515 b->yy_buf_pos = b->yy_ch_buf = base; 1516 b->yy_is_our_buffer = 0; 1517 b->yy_input_file = 0; 1518 b->yy_n_chars = b->yy_buf_size; 1519 b->yy_is_interactive = 0; 1520 b->yy_at_bol = 1; 1521 b->yy_fill_buffer = 0; 1522 b->yy_buffer_status = YY_BUFFER_NEW; 1523 1524 yy_switch_to_buffer( b ); 1525 1526 return b; 1527 } 1528 #endif 1529 1530 1531 #ifndef YY_NO_SCAN_STRING 1532 #ifdef YY_USE_PROTOS 1533 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1534 #else 1535 YY_BUFFER_STATE yy_scan_string( yy_str ) 1536 yyconst char *yy_str; 1537 #endif 1538 { 1539 int len; 1540 for ( len = 0; yy_str[len]; ++len ) 1541 ; 1542 1543 return yy_scan_bytes( yy_str, len ); 1544 } 1545 #endif 1546 1547 1548 #ifndef YY_NO_SCAN_BYTES 1549 #ifdef YY_USE_PROTOS 1550 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1551 #else 1552 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1553 yyconst char *bytes; 1554 int len; 1555 #endif 1556 { 1557 YY_BUFFER_STATE b; 1558 char *buf; 1559 yy_size_t n; 1560 int i; 1561 1562 /* Get memory for full buffer, including space for trailing EOB's. */ 1563 n = len + 2; 1564 buf = (char *) yy_flex_alloc( n ); 1565 if ( ! buf ) 1566 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1567 1568 for ( i = 0; i < len; ++i ) 1569 buf[i] = bytes[i]; 1570 1571 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1572 1573 b = yy_scan_buffer( buf, n ); 1574 if ( ! b ) 1575 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1576 1577 /* It's okay to grow etc. this buffer, and we should throw it 1578 * away when we're done. 1579 */ 1580 b->yy_is_our_buffer = 1; 1581 1582 return b; 1583 } 1584 #endif 1585 1586 1587 #ifndef YY_NO_PUSH_STATE 1588 #ifdef YY_USE_PROTOS 1589 static void yy_push_state( int new_state ) 1590 #else 1591 static void yy_push_state( new_state ) 1592 int new_state; 1593 #endif 1594 { 1595 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1596 { 1597 yy_size_t new_size; 1598 1599 yy_start_stack_depth += YY_START_STACK_INCR; 1600 new_size = yy_start_stack_depth * sizeof( int ); 1601 1602 if ( ! yy_start_stack ) 1603 yy_start_stack = (int *) yy_flex_alloc( new_size ); 1604 1605 else 1606 yy_start_stack = (int *) yy_flex_realloc( 1607 (void *) yy_start_stack, new_size ); 1608 1609 if ( ! yy_start_stack ) 1610 YY_FATAL_ERROR( 1611 "out of memory expanding start-condition stack" ); 1612 } 1613 1614 yy_start_stack[yy_start_stack_ptr++] = YY_START; 1615 1616 BEGIN(new_state); 1617 } 1618 #endif 1619 1620 1621 #ifndef YY_NO_POP_STATE 1622 static void yy_pop_state() 1623 { 1624 if ( --yy_start_stack_ptr < 0 ) 1625 YY_FATAL_ERROR( "start-condition stack underflow" ); 1626 1627 BEGIN(yy_start_stack[yy_start_stack_ptr]); 1628 } 1629 #endif 1630 1631 1632 #ifndef YY_NO_TOP_STATE 1633 static int yy_top_state() 1634 { 1635 return yy_start_stack[yy_start_stack_ptr - 1]; 1636 } 1637 #endif 1638 1639 #ifndef YY_EXIT_FAILURE 1640 #define YY_EXIT_FAILURE 2 1641 #endif 1642 1643 #ifdef YY_USE_PROTOS 1644 static void yy_fatal_error( yyconst char msg[] ) 1645 #else 1646 static void yy_fatal_error( msg ) 1647 char msg[]; 1648 #endif 1649 { 1650 (void) fprintf( stderr, "%s\n", msg ); 1651 exit( YY_EXIT_FAILURE ); 1652 } 1653 1654 1655 1656 /* Redefine yyless() so it works in section 3 code. */ 1657 1658 #undef yyless 1659 #define yyless(n) \ 1660 do \ 1661 { \ 1662 /* Undo effects of setting up yytext. */ \ 1663 yytext[yyleng] = yy_hold_char; \ 1664 yy_c_buf_p = yytext + n; \ 1665 yy_hold_char = *yy_c_buf_p; \ 1666 *yy_c_buf_p = '\0'; \ 1667 yyleng = n; \ 1668 } \ 1669 while ( 0 ) 1670 1671 1672 /* Internal utility routines. */ 1673 1674 #ifndef yytext_ptr 1675 #ifdef YY_USE_PROTOS 1676 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1677 #else 1678 static void yy_flex_strncpy( s1, s2, n ) 1679 char *s1; 1680 yyconst char *s2; 1681 int n; 1682 #endif 1683 { 1684 register int i; 1685 for ( i = 0; i < n; ++i ) 1686 s1[i] = s2[i]; 1687 } 1688 #endif 1689 1690 #ifdef YY_NEED_STRLEN 1691 #ifdef YY_USE_PROTOS 1692 static int yy_flex_strlen( yyconst char *s ) 1693 #else 1694 static int yy_flex_strlen( s ) 1695 yyconst char *s; 1696 #endif 1697 { 1698 register int n; 1699 for ( n = 0; s[n]; ++n ) 1700 ; 1701 1702 return n; 1703 } 1704 #endif 1705 1706 1707 #ifdef YY_USE_PROTOS 1708 static void *yy_flex_alloc( yy_size_t size ) 1709 #else 1710 static void *yy_flex_alloc( size ) 1711 yy_size_t size; 1712 #endif 1713 { 1714 return (void *) malloc( size ); 1715 } 1716 1717 #ifdef YY_USE_PROTOS 1718 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1719 #else 1720 static void *yy_flex_realloc( ptr, size ) 1721 void *ptr; 1722 yy_size_t size; 1723 #endif 1724 { 1725 /* The cast to (char *) in the following accommodates both 1726 * implementations that use char* generic pointers, and those 1727 * that use void* generic pointers. It works with the latter 1728 * because both ANSI C and C++ allow castless assignment from 1729 * any pointer type to void*, and deal with argument conversions 1730 * as though doing an assignment. 1731 */ 1732 return (void *) realloc( (char *) ptr, size ); 1733 } 1734 1735 #ifdef YY_USE_PROTOS 1736 static void yy_flex_free( void *ptr ) 1737 #else 1738 static void yy_flex_free( ptr ) 1739 void *ptr; 1740 #endif 1741 { 1742 free( ptr ); 1743 } 1744 1745 #if YY_MAIN 1746 int main() 1747 { 1748 yylex(); 1749 return 0; 1750 } 1751 #endif 1752 #line 222 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\prparser.l" 1753 1754 1755 /* 1756 * Local support functions 1757 */ 1758 static YY_BUFFER_STATE LexBuffer; 1759 1760 1761 /****************************************************************************** 1762 * 1763 * FUNCTION: PrInitLexer 1764 * 1765 * PARAMETERS: String - Input string to be parsed 1766 * 1767 * RETURN: TRUE if parser returns NULL. FALSE otherwise. 1768 * 1769 * DESCRIPTION: Initialization routine for lexer. The lexer needs 1770 * a buffer to handle strings instead of a file. 1771 * 1772 *****************************************************************************/ 1773 1774 int 1775 PrInitLexer ( 1776 char *String) 1777 { 1778 1779 LexBuffer = yy_scan_string (String); 1780 return (LexBuffer == NULL); 1781 } 1782 1783 1784 /****************************************************************************** 1785 * 1786 * FUNCTION: PrTerminateLexer 1787 * 1788 * PARAMETERS: None 1789 * 1790 * RETURN: None 1791 * 1792 * DESCRIPTION: Termination routine for thelexer. 1793 * 1794 *****************************************************************************/ 1795 1796 void 1797 PrTerminateLexer ( 1798 void) 1799 { 1800 1801 yy_delete_buffer (LexBuffer); 1802 } 1803 1804 1805 /******************************************************************************** 1806 * 1807 * FUNCTION: PrDoCommentType1 1808 * 1809 * PARAMETERS: none 1810 * 1811 * RETURN: none 1812 * 1813 * DESCRIPTION: Process a new legacy comment. Just toss it. 1814 * 1815 ******************************************************************************/ 1816 1817 static char 1818 PrDoCommentType1 ( 1819 void) 1820 { 1821 int c; 1822 1823 1824 Loop: 1825 while (((c = input ()) != '*') && (c != EOF)) 1826 { 1827 } 1828 if (c == EOF) 1829 { 1830 return (FALSE); 1831 } 1832 1833 if (((c = input ()) != '/') && (c != EOF)) 1834 { 1835 unput (c); 1836 goto Loop; 1837 } 1838 if (c == EOF) 1839 { 1840 return (FALSE); 1841 } 1842 1843 return (TRUE); 1844 } 1845 1846 1847 /******************************************************************************** 1848 * 1849 * FUNCTION: PrDoCommentType2 1850 * 1851 * PARAMETERS: none 1852 * 1853 * RETURN: none 1854 * 1855 * DESCRIPTION: Process a new "//" comment. Just toss it. 1856 * 1857 ******************************************************************************/ 1858 1859 static char 1860 PrDoCommentType2 ( 1861 void) 1862 { 1863 int c; 1864 1865 1866 while (((c = input ()) != '\n') && (c != EOF)) 1867 { 1868 } 1869 if (c == EOF) 1870 { 1871 return (FALSE); 1872 } 1873 1874 return (TRUE); 1875 } 1876