1 2 #line 3 "arlex.c" 3 4 #define YY_INT_ALIGNED short int 5 6 /* A lexical scanner generated by flex */ 7 8 #define FLEX_SCANNER 9 #define YY_FLEX_MAJOR_VERSION 2 10 #define YY_FLEX_MINOR_VERSION 6 11 #define YY_FLEX_SUBMINOR_VERSION 1 12 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #define FLEX_BETA 14 #endif 15 16 /* First, we deal with platform-specific or compiler-specific issues. */ 17 18 /* begin standard C headers. */ 19 #include <stdio.h> 20 #include <string.h> 21 #include <errno.h> 22 #include <stdlib.h> 23 24 /* end standard C headers. */ 25 26 /* flex integer type definitions */ 27 28 #ifndef FLEXINT_H 29 #define FLEXINT_H 30 31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 32 33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 34 35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 36 * if you want the limit (max/min) macros for int types. 37 */ 38 #ifndef __STDC_LIMIT_MACROS 39 #define __STDC_LIMIT_MACROS 1 40 #endif 41 42 #include <inttypes.h> 43 typedef int8_t flex_int8_t; 44 typedef uint8_t flex_uint8_t; 45 typedef int16_t flex_int16_t; 46 typedef uint16_t flex_uint16_t; 47 typedef int32_t flex_int32_t; 48 typedef uint32_t flex_uint32_t; 49 #else 50 typedef signed char flex_int8_t; 51 typedef short int flex_int16_t; 52 typedef int flex_int32_t; 53 typedef unsigned char flex_uint8_t; 54 typedef unsigned short int flex_uint16_t; 55 typedef unsigned int flex_uint32_t; 56 57 /* Limits of integral types. */ 58 #ifndef INT8_MIN 59 #define INT8_MIN (-128) 60 #endif 61 #ifndef INT16_MIN 62 #define INT16_MIN (-32767-1) 63 #endif 64 #ifndef INT32_MIN 65 #define INT32_MIN (-2147483647-1) 66 #endif 67 #ifndef INT8_MAX 68 #define INT8_MAX (127) 69 #endif 70 #ifndef INT16_MAX 71 #define INT16_MAX (32767) 72 #endif 73 #ifndef INT32_MAX 74 #define INT32_MAX (2147483647) 75 #endif 76 #ifndef UINT8_MAX 77 #define UINT8_MAX (255U) 78 #endif 79 #ifndef UINT16_MAX 80 #define UINT16_MAX (65535U) 81 #endif 82 #ifndef UINT32_MAX 83 #define UINT32_MAX (4294967295U) 84 #endif 85 86 #endif /* ! C99 */ 87 88 #endif /* ! FLEXINT_H */ 89 90 /* TODO: this is always defined, so inline it */ 91 #define yyconst const 92 93 #if defined(__GNUC__) && __GNUC__ >= 3 94 #define yynoreturn __attribute__((__noreturn__)) 95 #else 96 #define yynoreturn 97 #endif 98 99 /* Returned upon end-of-file. */ 100 #define YY_NULL 0 101 102 /* Promotes a possibly negative, possibly signed char to an unsigned 103 * integer for use as an array index. If the signed char is negative, 104 * we want to instead treat it as an 8-bit unsigned char, hence the 105 * double cast. 106 */ 107 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 108 109 /* Enter a start condition. This macro really ought to take a parameter, 110 * but we do it the disgusting crufty way forced on us by the ()-less 111 * definition of BEGIN. 112 */ 113 #define BEGIN (yy_start) = 1 + 2 * 114 115 /* Translate the current start state into a value that can be later handed 116 * to BEGIN to return to the state. The YYSTATE alias is for lex 117 * compatibility. 118 */ 119 #define YY_START (((yy_start) - 1) / 2) 120 #define YYSTATE YY_START 121 122 /* Action number for EOF rule of a given start state. */ 123 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 124 125 /* Special action meaning "start processing a new file". */ 126 #define YY_NEW_FILE yyrestart(yyin ) 127 128 #define YY_END_OF_BUFFER_CHAR 0 129 130 /* Size of default input buffer. */ 131 #ifndef YY_BUF_SIZE 132 #ifdef __ia64__ 133 /* On IA-64, the buffer size is 16k, not 8k. 134 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 135 * Ditto for the __ia64__ case accordingly. 136 */ 137 #define YY_BUF_SIZE 32768 138 #else 139 #define YY_BUF_SIZE 16384 140 #endif /* __ia64__ */ 141 #endif 142 143 /* The state buf must be large enough to hold one state per character in the main buffer. 144 */ 145 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 146 147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 148 #define YY_TYPEDEF_YY_BUFFER_STATE 149 typedef struct yy_buffer_state *YY_BUFFER_STATE; 150 #endif 151 152 #ifndef YY_TYPEDEF_YY_SIZE_T 153 #define YY_TYPEDEF_YY_SIZE_T 154 typedef size_t yy_size_t; 155 #endif 156 157 extern int yyleng; 158 159 extern FILE *yyin, *yyout; 160 161 #define EOB_ACT_CONTINUE_SCAN 0 162 #define EOB_ACT_END_OF_FILE 1 163 #define EOB_ACT_LAST_MATCH 2 164 165 #define YY_LESS_LINENO(n) 166 #define YY_LINENO_REWIND_TO(ptr) 167 168 /* Return all but the first "n" matched characters back to the input stream. */ 169 #define yyless(n) \ 170 do \ 171 { \ 172 /* Undo effects of setting up yytext. */ \ 173 yy_size_t yyless_macro_arg = (n); \ 174 YY_LESS_LINENO(yyless_macro_arg);\ 175 *yy_cp = (yy_hold_char); \ 176 YY_RESTORE_YY_MORE_OFFSET \ 177 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 178 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 179 } \ 180 while ( 0 ) 181 182 #define unput(c) yyunput( c, (yytext_ptr) ) 183 184 #ifndef YY_STRUCT_YY_BUFFER_STATE 185 #define YY_STRUCT_YY_BUFFER_STATE 186 struct yy_buffer_state 187 { 188 FILE *yy_input_file; 189 190 char *yy_ch_buf; /* input buffer */ 191 char *yy_buf_pos; /* current position in input buffer */ 192 193 /* Size of input buffer in bytes, not including room for EOB 194 * characters. 195 */ 196 int yy_buf_size; 197 198 /* Number of characters read into yy_ch_buf, not including EOB 199 * characters. 200 */ 201 int yy_n_chars; 202 203 /* Whether we "own" the buffer - i.e., we know we created it, 204 * and can realloc() it to grow it, and should free() it to 205 * delete it. 206 */ 207 int yy_is_our_buffer; 208 209 /* Whether this is an "interactive" input source; if so, and 210 * if we're using stdio for input, then we want to use getc() 211 * instead of fread(), to make sure we stop fetching input after 212 * each newline. 213 */ 214 int yy_is_interactive; 215 216 /* Whether we're considered to be at the beginning of a line. 217 * If so, '^' rules will be active on the next match, otherwise 218 * not. 219 */ 220 int yy_at_bol; 221 222 int yy_bs_lineno; /**< The line count. */ 223 int yy_bs_column; /**< The column count. */ 224 225 /* Whether to try to fill the input buffer when we reach the 226 * end of it. 227 */ 228 int yy_fill_buffer; 229 230 int yy_buffer_status; 231 232 #define YY_BUFFER_NEW 0 233 #define YY_BUFFER_NORMAL 1 234 /* When an EOF's been seen but there's still some text to process 235 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 236 * shouldn't try reading from the input source any more. We might 237 * still have a bunch of tokens to match, though, because of 238 * possible backing-up. 239 * 240 * When we actually see the EOF, we change the status to "new" 241 * (via yyrestart()), so that the user can continue scanning by 242 * just pointing yyin at a new input file. 243 */ 244 #define YY_BUFFER_EOF_PENDING 2 245 246 }; 247 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 248 249 /* Stack of input buffers. */ 250 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 251 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 252 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ 253 254 /* We provide macros for accessing buffer states in case in the 255 * future we want to put the buffer states in a more general 256 * "scanner state". 257 * 258 * Returns the top of the stack, or NULL. 259 */ 260 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 261 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 262 : NULL) 263 264 /* Same as previous macro, but useful when we know that the buffer stack is not 265 * NULL or when we need an lvalue. For internal use only. 266 */ 267 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 268 269 /* yy_hold_char holds the character lost when yytext is formed. */ 270 static char yy_hold_char; 271 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 272 int yyleng; 273 274 /* Points to current character in buffer. */ 275 static char *yy_c_buf_p = NULL; 276 static int yy_init = 0; /* whether we need to initialize */ 277 static int yy_start = 0; /* start state number */ 278 279 /* Flag which is used to allow yywrap()'s to do buffer switches 280 * instead of setting up a fresh yyin. A bit of a hack ... 281 */ 282 static int yy_did_buffer_switch_on_eof; 283 284 void yyrestart (FILE *input_file ); 285 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 286 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 287 void yy_delete_buffer (YY_BUFFER_STATE b ); 288 void yy_flush_buffer (YY_BUFFER_STATE b ); 289 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 290 void yypop_buffer_state (void ); 291 292 static void yyensure_buffer_stack (void ); 293 static void yy_load_buffer_state (void ); 294 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 295 296 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 297 298 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 299 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 300 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 301 302 void *yyalloc (yy_size_t ); 303 void *yyrealloc (void *,yy_size_t ); 304 void yyfree (void * ); 305 306 #define yy_new_buffer yy_create_buffer 307 308 #define yy_set_interactive(is_interactive) \ 309 { \ 310 if ( ! YY_CURRENT_BUFFER ){ \ 311 yyensure_buffer_stack (); \ 312 YY_CURRENT_BUFFER_LVALUE = \ 313 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 314 } \ 315 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 316 } 317 318 #define yy_set_bol(at_bol) \ 319 { \ 320 if ( ! YY_CURRENT_BUFFER ){\ 321 yyensure_buffer_stack (); \ 322 YY_CURRENT_BUFFER_LVALUE = \ 323 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 324 } \ 325 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 326 } 327 328 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 329 330 /* Begin user sect3 */ 331 332 #define yywrap() (/*CONSTCOND*/1) 333 #define YY_SKIP_YYWRAP 334 335 typedef unsigned char YY_CHAR; 336 337 FILE *yyin = NULL, *yyout = NULL; 338 339 typedef int yy_state_type; 340 341 extern int yylineno; 342 343 int yylineno = 1; 344 345 extern char *yytext; 346 #ifdef yytext_ptr 347 #undef yytext_ptr 348 #endif 349 #define yytext_ptr yytext 350 351 static yy_state_type yy_get_previous_state (void ); 352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 353 static int yy_get_next_buffer (void ); 354 static void yynoreturn yy_fatal_error (yyconst char* msg ); 355 356 /* Done after the current pattern has been matched and before the 357 * corresponding action - sets up yytext. 358 */ 359 #define YY_DO_BEFORE_ACTION \ 360 (yytext_ptr) = yy_bp; \ 361 yyleng = (int) (yy_cp - yy_bp); \ 362 (yy_hold_char) = *yy_cp; \ 363 *yy_cp = '\0'; \ 364 (yy_c_buf_p) = yy_cp; 365 366 #define YY_NUM_RULES 40 367 #define YY_END_OF_BUFFER 41 368 /* This struct is not used in this scanner, 369 but its presence is necessary. */ 370 struct yy_trans_info 371 { 372 flex_int32_t yy_verify; 373 flex_int32_t yy_nxt; 374 }; 375 static yyconst flex_int16_t yy_accept[177] = 376 { 0, 377 0, 0, 41, 40, 39, 38, 35, 32, 33, 36, 378 40, 34, 37, 35, 35, 35, 35, 35, 35, 35, 379 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 380 35, 35, 35, 35, 35, 35, 36, 31, 37, 35, 381 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 382 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 383 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 384 35, 35, 7, 35, 35, 35, 35, 35, 35, 35, 385 35, 35, 35, 35, 35, 35, 22, 35, 35, 35, 386 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 387 388 35, 35, 35, 10, 11, 12, 35, 15, 35, 35, 389 35, 35, 35, 35, 35, 35, 35, 25, 26, 27, 390 35, 30, 35, 35, 35, 3, 35, 35, 35, 35, 391 35, 35, 35, 35, 35, 18, 35, 35, 35, 35, 392 35, 35, 35, 1, 2, 4, 5, 35, 35, 35, 393 35, 35, 16, 17, 19, 20, 35, 35, 35, 35, 394 35, 35, 8, 9, 13, 14, 35, 23, 24, 28, 395 29, 35, 35, 6, 21, 0 396 } ; 397 398 static yyconst YY_CHAR yy_ec[256] = 399 { 0, 400 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 403 1, 3, 1, 1, 1, 4, 1, 1, 1, 5, 404 6, 7, 8, 9, 4, 4, 4, 4, 4, 4, 405 4, 4, 4, 4, 4, 4, 4, 4, 10, 1, 406 1, 1, 1, 1, 11, 12, 13, 14, 15, 16, 407 4, 17, 18, 4, 4, 19, 20, 21, 22, 23, 408 4, 24, 25, 26, 27, 28, 4, 29, 30, 4, 409 1, 4, 1, 1, 4, 1, 31, 32, 33, 34, 410 411 35, 36, 4, 37, 38, 4, 4, 39, 40, 41, 412 42, 43, 4, 44, 45, 46, 47, 48, 4, 49, 413 50, 4, 1, 1, 1, 1, 1, 1, 1, 1, 414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 421 422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 427 1, 1, 1, 1, 1 428 } ; 429 430 static yyconst YY_CHAR yy_meta[51] = 431 { 0, 432 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 433 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 434 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 435 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 436 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 437 } ; 438 439 static yyconst flex_uint16_t yy_base[180] = 440 { 0, 441 0, 0, 193, 194, 194, 194, 0, 194, 194, 0, 442 190, 194, 0, 177, 32, 37, 32, 163, 174, 170, 443 164, 171, 174, 169, 149, 15, 22, 17, 135, 146, 444 142, 136, 143, 146, 141, 0, 0, 194, 0, 161, 445 159, 158, 153, 147, 156, 143, 149, 148, 141, 150, 446 141, 135, 138, 127, 125, 124, 119, 113, 122, 109, 447 115, 114, 107, 116, 107, 101, 104, 43, 136, 135, 448 130, 129, 0, 119, 123, 118, 114, 118, 119, 122, 449 124, 25, 104, 103, 98, 97, 0, 87, 91, 86, 450 82, 86, 87, 90, 92, 105, 100, 97, 94, 93, 451 452 105, 106, 102, 0, 0, 0, 104, 0, 92, 75, 453 70, 67, 64, 63, 75, 76, 72, 0, 0, 0, 454 74, 0, 62, 91, 88, 0, 86, 85, 73, 85, 455 79, 83, 70, 62, 59, 0, 57, 56, 44, 56, 456 50, 54, 41, 0, 0, 0, 0, 63, 58, 59, 457 67, 66, 0, 0, 0, 0, 38, 33, 34, 42, 458 41, 51, 0, 0, 0, 0, 30, 0, 0, 0, 459 0, 43, 21, 0, 0, 194, 65, 66, 69 460 } ; 461 462 static yyconst flex_int16_t yy_def[180] = 463 { 0, 464 176, 1, 176, 176, 176, 176, 177, 176, 176, 178, 465 176, 176, 179, 177, 177, 177, 177, 177, 177, 177, 466 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 467 177, 177, 177, 177, 177, 177, 178, 176, 179, 177, 468 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 469 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 470 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 471 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 472 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 473 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 474 475 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 476 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 477 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 478 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 479 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 480 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 481 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 482 177, 177, 177, 177, 177, 0, 176, 176, 176 483 } ; 484 485 static yyconst flex_uint16_t yy_nxt[245] = 486 { 0, 487 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 488 14, 7, 15, 16, 17, 18, 19, 7, 20, 7, 489 7, 21, 7, 22, 23, 7, 7, 24, 7, 7, 490 25, 7, 26, 27, 28, 29, 30, 7, 31, 7, 491 7, 32, 7, 33, 34, 7, 7, 35, 7, 7, 492 41, 43, 45, 55, 44, 42, 57, 59, 56, 58, 493 46, 96, 97, 110, 111, 60, 37, 36, 37, 39, 494 175, 39, 174, 173, 172, 171, 170, 169, 168, 167, 495 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 496 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 497 498 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 499 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 500 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 501 116, 115, 114, 113, 112, 109, 108, 107, 106, 105, 502 104, 103, 102, 101, 100, 99, 98, 95, 94, 93, 503 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 504 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 505 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 506 62, 61, 54, 53, 52, 51, 50, 49, 48, 47, 507 40, 38, 176, 3, 176, 176, 176, 176, 176, 176, 508 509 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 510 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 511 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 512 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 513 176, 176, 176, 176 514 } ; 515 516 static yyconst flex_int16_t yy_chk[245] = 517 { 0, 518 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 523 15, 16, 17, 26, 16, 15, 27, 28, 26, 27, 524 17, 68, 68, 82, 82, 28, 178, 177, 178, 179, 525 173, 179, 172, 167, 162, 161, 160, 159, 158, 157, 526 152, 151, 150, 149, 148, 143, 142, 141, 140, 139, 527 138, 137, 135, 134, 133, 132, 131, 130, 129, 128, 528 529 127, 125, 124, 123, 121, 117, 116, 115, 114, 113, 530 112, 111, 110, 109, 107, 103, 102, 101, 100, 99, 531 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 532 88, 86, 85, 84, 83, 81, 80, 79, 78, 77, 533 76, 75, 74, 72, 71, 70, 69, 67, 66, 65, 534 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 535 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 536 44, 43, 42, 41, 40, 35, 34, 33, 32, 31, 537 30, 29, 25, 24, 23, 22, 21, 20, 19, 18, 538 14, 11, 3, 176, 176, 176, 176, 176, 176, 176, 539 540 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 541 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 542 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 543 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 544 176, 176, 176, 176 545 } ; 546 547 static yy_state_type yy_last_accepting_state; 548 static char *yy_last_accepting_cpos; 549 550 extern int yy_flex_debug; 551 int yy_flex_debug = 0; 552 553 /* The intent behind this definition is that it'll catch 554 * any uses of REJECT which flex missed. 555 */ 556 #define REJECT reject_used_but_not_detected 557 #define yymore() yymore_used_but_not_detected 558 #define YY_MORE_ADJ 0 559 #define YY_RESTORE_YY_MORE_OFFSET 560 char *yytext; 561 #line 1 "arlex.l" 562 #define YY_NO_INPUT 1 563 #line 4 "arlex.l" 564 /* arlex.l - Strange script language lexer */ 565 566 /* Copyright (C) 1992-2020 Free Software Foundation, Inc. 567 568 This file is part of GNU Binutils. 569 570 This program is free software; you can redistribute it and/or modify 571 it under the terms of the GNU General Public License as published by 572 the Free Software Foundation; either version 3 of the License, or 573 (at your option) any later version. 574 575 This program is distributed in the hope that it will be useful, 576 but WITHOUT ANY WARRANTY; without even the implied warranty of 577 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 578 GNU General Public License for more details. 579 580 You should have received a copy of the GNU General Public License 581 along with this program; if not, write to the Free Software 582 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 583 MA 02110-1301, USA. */ 584 585 586 /* Contributed by Steve Chamberlain <sac@cygnus.com>. */ 587 588 #define DONTDECLARE_MALLOC 589 #include "ansidecl.h" 590 #include "libiberty.h" 591 #include "arparse.h" 592 593 #ifndef YY_NO_UNPUT 594 #define YY_NO_UNPUT 595 #endif 596 597 extern int yylex (void); 598 599 int linenumber; 600 #line 601 "arlex.c" 601 602 #define INITIAL 0 603 604 #ifndef YY_NO_UNISTD_H 605 /* Special case for "unistd.h", since it is non-ANSI. We include it way 606 * down here because we want the user's section 1 to have been scanned first. 607 * The user has a chance to override it with an option. 608 */ 609 #include <unistd.h> 610 #endif 611 612 #ifndef YY_EXTRA_TYPE 613 #define YY_EXTRA_TYPE void * 614 #endif 615 616 static int yy_init_globals (void ); 617 618 /* Accessor methods to globals. 619 These are made visible to non-reentrant scanners for convenience. */ 620 621 int yylex_destroy (void ); 622 623 int yyget_debug (void ); 624 625 void yyset_debug (int debug_flag ); 626 627 YY_EXTRA_TYPE yyget_extra (void ); 628 629 void yyset_extra (YY_EXTRA_TYPE user_defined ); 630 631 FILE *yyget_in (void ); 632 633 void yyset_in (FILE * _in_str ); 634 635 FILE *yyget_out (void ); 636 637 void yyset_out (FILE * _out_str ); 638 639 int yyget_leng (void ); 640 641 char *yyget_text (void ); 642 643 int yyget_lineno (void ); 644 645 void yyset_lineno (int _line_number ); 646 647 /* Macros after this point can all be overridden by user definitions in 648 * section 1. 649 */ 650 651 #ifndef YY_SKIP_YYWRAP 652 #ifdef __cplusplus 653 extern "C" int yywrap (void ); 654 #else 655 extern int yywrap (void ); 656 #endif 657 #endif 658 659 #ifndef YY_NO_UNPUT 660 661 #endif 662 663 #ifndef yytext_ptr 664 static void yy_flex_strncpy (char *,yyconst char *,int ); 665 #endif 666 667 #ifdef YY_NEED_STRLEN 668 static int yy_flex_strlen (yyconst char * ); 669 #endif 670 671 #ifndef YY_NO_INPUT 672 673 #ifdef __cplusplus 674 static int yyinput (void ); 675 #else 676 static int input (void ); 677 #endif 678 679 #endif 680 681 /* Amount of stuff to slurp up with each read. */ 682 #ifndef YY_READ_BUF_SIZE 683 #ifdef __ia64__ 684 /* On IA-64, the buffer size is 16k, not 8k */ 685 #define YY_READ_BUF_SIZE 16384 686 #else 687 #define YY_READ_BUF_SIZE 8192 688 #endif /* __ia64__ */ 689 #endif 690 691 /* Copy whatever the last rule matched to the standard output. */ 692 #ifndef ECHO 693 /* This used to be an fputs(), but since the string might contain NUL's, 694 * we now use fwrite(). 695 */ 696 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) 697 #endif 698 699 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 700 * is returned in "result". 701 */ 702 #ifndef YY_INPUT 703 #define YY_INPUT(buf,result,max_size) \ 704 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 705 { \ 706 int c = '*'; \ 707 int n; \ 708 for ( n = 0; n < max_size && \ 709 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 710 buf[n] = (char) c; \ 711 if ( c == '\n' ) \ 712 buf[n++] = (char) c; \ 713 if ( c == EOF && ferror( yyin ) ) \ 714 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 715 result = n; \ 716 } \ 717 else \ 718 { \ 719 errno=0; \ 720 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ 721 { \ 722 if( errno != EINTR) \ 723 { \ 724 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 725 break; \ 726 } \ 727 errno=0; \ 728 clearerr(yyin); \ 729 } \ 730 }\ 731 \ 732 733 #endif 734 735 /* No semi-colon after return; correct usage is to write "yyterminate();" - 736 * we don't want an extra ';' after the "return" because that will cause 737 * some compilers to complain about unreachable statements. 738 */ 739 #ifndef yyterminate 740 #define yyterminate() return YY_NULL 741 #endif 742 743 /* Number of entries by which start-condition stack grows. */ 744 #ifndef YY_START_STACK_INCR 745 #define YY_START_STACK_INCR 25 746 #endif 747 748 /* Report a fatal error. */ 749 #ifndef YY_FATAL_ERROR 750 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 751 #endif 752 753 /* end tables serialization structures and prototypes */ 754 755 /* Default declaration of generated scanner - a define so the user can 756 * easily add parameters. 757 */ 758 #ifndef YY_DECL 759 #define YY_DECL_IS_OURS 1 760 761 extern int yylex (void); 762 763 #define YY_DECL int yylex (void) 764 #endif /* !YY_DECL */ 765 766 /* Code executed at the beginning of each rule, after yytext and yyleng 767 * have been set up. 768 */ 769 #ifndef YY_USER_ACTION 770 #define YY_USER_ACTION 771 #endif 772 773 /* Code executed at the end of each rule. */ 774 #ifndef YY_BREAK 775 #define YY_BREAK /*LINTED*/break; 776 #endif 777 778 #define YY_RULE_SETUP \ 779 YY_USER_ACTION 780 781 /** The main scanner function which does all the work. 782 */ 783 YY_DECL 784 { 785 yy_state_type yy_current_state; 786 char *yy_cp, *yy_bp; 787 int yy_act; 788 789 if ( !(yy_init) ) 790 { 791 (yy_init) = 1; 792 793 #ifdef YY_USER_INIT 794 YY_USER_INIT; 795 #endif 796 797 if ( ! (yy_start) ) 798 (yy_start) = 1; /* first start state */ 799 800 if ( ! yyin ) 801 yyin = stdin; 802 803 if ( ! yyout ) 804 yyout = stdout; 805 806 if ( ! YY_CURRENT_BUFFER ) { 807 yyensure_buffer_stack (); 808 YY_CURRENT_BUFFER_LVALUE = 809 yy_create_buffer(yyin,YY_BUF_SIZE ); 810 } 811 812 yy_load_buffer_state( ); 813 } 814 815 { 816 #line 45 "arlex.l" 817 818 819 #line 820 "arlex.c" 820 821 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ 822 { 823 yy_cp = (yy_c_buf_p); 824 825 /* Support of yytext. */ 826 *yy_cp = (yy_hold_char); 827 828 /* yy_bp points to the position in yy_ch_buf of the start of 829 * the current run. 830 */ 831 yy_bp = yy_cp; 832 833 yy_current_state = (yy_start); 834 yy_match: 835 do 836 { 837 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; 838 if ( yy_accept[yy_current_state] ) 839 { 840 (yy_last_accepting_state) = yy_current_state; 841 (yy_last_accepting_cpos) = yy_cp; 842 } 843 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 844 { 845 yy_current_state = (int) yy_def[yy_current_state]; 846 if ( yy_current_state >= 177 ) 847 yy_c = yy_meta[(unsigned int) yy_c]; 848 } 849 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; 850 ++yy_cp; 851 } 852 while ( yy_base[yy_current_state] != 194 ); 853 854 yy_find_action: 855 yy_act = yy_accept[yy_current_state]; 856 if ( yy_act == 0 ) 857 { /* have to back up */ 858 yy_cp = (yy_last_accepting_cpos); 859 yy_current_state = (yy_last_accepting_state); 860 yy_act = yy_accept[yy_current_state]; 861 } 862 863 YY_DO_BEFORE_ACTION; 864 865 do_action: /* This label is used only to access EOF actions. */ 866 867 switch ( yy_act ) 868 { /* beginning of action switch */ 869 case 0: /* must back up */ 870 /* undo the effects of YY_DO_BEFORE_ACTION */ 871 *yy_cp = (yy_hold_char); 872 yy_cp = (yy_last_accepting_cpos); 873 yy_current_state = (yy_last_accepting_state); 874 goto yy_find_action; 875 876 case 1: 877 YY_RULE_SETUP 878 #line 47 "arlex.l" 879 { return ADDLIB; } 880 YY_BREAK 881 case 2: 882 YY_RULE_SETUP 883 #line 48 "arlex.l" 884 { return ADDMOD; } 885 YY_BREAK 886 case 3: 887 YY_RULE_SETUP 888 #line 49 "arlex.l" 889 { return CLEAR; } 890 YY_BREAK 891 case 4: 892 YY_RULE_SETUP 893 #line 50 "arlex.l" 894 { return CREATE; } 895 YY_BREAK 896 case 5: 897 YY_RULE_SETUP 898 #line 51 "arlex.l" 899 { return DELETE; } 900 YY_BREAK 901 case 6: 902 YY_RULE_SETUP 903 #line 52 "arlex.l" 904 { return DIRECTORY; } 905 YY_BREAK 906 case 7: 907 YY_RULE_SETUP 908 #line 53 "arlex.l" 909 { return END; } 910 YY_BREAK 911 case 8: 912 YY_RULE_SETUP 913 #line 54 "arlex.l" 914 { return EXTRACT; } 915 YY_BREAK 916 case 9: 917 YY_RULE_SETUP 918 #line 55 "arlex.l" 919 { return FULLDIR; } 920 YY_BREAK 921 case 10: 922 YY_RULE_SETUP 923 #line 56 "arlex.l" 924 { return HELP; } 925 YY_BREAK 926 case 11: 927 YY_RULE_SETUP 928 #line 57 "arlex.l" 929 { return LIST; } 930 YY_BREAK 931 case 12: 932 YY_RULE_SETUP 933 #line 58 "arlex.l" 934 { return OPEN; } 935 YY_BREAK 936 case 13: 937 YY_RULE_SETUP 938 #line 59 "arlex.l" 939 { return REPLACE; } 940 YY_BREAK 941 case 14: 942 YY_RULE_SETUP 943 #line 60 "arlex.l" 944 { return VERBOSE; } 945 YY_BREAK 946 case 15: 947 YY_RULE_SETUP 948 #line 61 "arlex.l" 949 { return SAVE; } 950 YY_BREAK 951 case 16: 952 YY_RULE_SETUP 953 #line 62 "arlex.l" 954 { return ADDLIB; } 955 YY_BREAK 956 case 17: 957 YY_RULE_SETUP 958 #line 63 "arlex.l" 959 { return ADDMOD; } 960 YY_BREAK 961 case 18: 962 YY_RULE_SETUP 963 #line 64 "arlex.l" 964 { return CLEAR; } 965 YY_BREAK 966 case 19: 967 YY_RULE_SETUP 968 #line 65 "arlex.l" 969 { return CREATE; } 970 YY_BREAK 971 case 20: 972 YY_RULE_SETUP 973 #line 66 "arlex.l" 974 { return DELETE; } 975 YY_BREAK 976 case 21: 977 YY_RULE_SETUP 978 #line 67 "arlex.l" 979 { return DIRECTORY; } 980 YY_BREAK 981 case 22: 982 YY_RULE_SETUP 983 #line 68 "arlex.l" 984 { return END; } 985 YY_BREAK 986 case 23: 987 YY_RULE_SETUP 988 #line 69 "arlex.l" 989 { return EXTRACT; } 990 YY_BREAK 991 case 24: 992 YY_RULE_SETUP 993 #line 70 "arlex.l" 994 { return FULLDIR; } 995 YY_BREAK 996 case 25: 997 YY_RULE_SETUP 998 #line 71 "arlex.l" 999 { return HELP; } 1000 YY_BREAK 1001 case 26: 1002 YY_RULE_SETUP 1003 #line 72 "arlex.l" 1004 { return LIST; } 1005 YY_BREAK 1006 case 27: 1007 YY_RULE_SETUP 1008 #line 73 "arlex.l" 1009 { return OPEN; } 1010 YY_BREAK 1011 case 28: 1012 YY_RULE_SETUP 1013 #line 74 "arlex.l" 1014 { return REPLACE; } 1015 YY_BREAK 1016 case 29: 1017 YY_RULE_SETUP 1018 #line 75 "arlex.l" 1019 { return VERBOSE; } 1020 YY_BREAK 1021 case 30: 1022 YY_RULE_SETUP 1023 #line 76 "arlex.l" 1024 { return SAVE; } 1025 YY_BREAK 1026 case 31: 1027 /* rule 31 can match eol */ 1028 YY_RULE_SETUP 1029 #line 77 "arlex.l" 1030 { linenumber ++; } 1031 YY_BREAK 1032 case 32: 1033 YY_RULE_SETUP 1034 #line 78 "arlex.l" 1035 { return '('; } 1036 YY_BREAK 1037 case 33: 1038 YY_RULE_SETUP 1039 #line 79 "arlex.l" 1040 { return ')'; } 1041 YY_BREAK 1042 case 34: 1043 YY_RULE_SETUP 1044 #line 80 "arlex.l" 1045 { return ','; } 1046 YY_BREAK 1047 case 35: 1048 YY_RULE_SETUP 1049 #line 81 "arlex.l" 1050 { 1051 yylval.name = xstrdup (yytext); 1052 return FILENAME; 1053 } 1054 YY_BREAK 1055 case 36: 1056 YY_RULE_SETUP 1057 #line 85 "arlex.l" 1058 { } 1059 YY_BREAK 1060 case 37: 1061 YY_RULE_SETUP 1062 #line 86 "arlex.l" 1063 { } 1064 YY_BREAK 1065 case 38: 1066 YY_RULE_SETUP 1067 #line 87 "arlex.l" 1068 { } 1069 YY_BREAK 1070 case 39: 1071 /* rule 39 can match eol */ 1072 YY_RULE_SETUP 1073 #line 88 "arlex.l" 1074 { linenumber ++; return NEWLINE; } 1075 YY_BREAK 1076 case 40: 1077 YY_RULE_SETUP 1078 #line 90 "arlex.l" 1079 ECHO; 1080 YY_BREAK 1081 #line 1082 "arlex.c" 1082 case YY_STATE_EOF(INITIAL): 1083 yyterminate(); 1084 1085 case YY_END_OF_BUFFER: 1086 { 1087 /* Amount of text matched not including the EOB char. */ 1088 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 1089 1090 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1091 *yy_cp = (yy_hold_char); 1092 YY_RESTORE_YY_MORE_OFFSET 1093 1094 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 1095 { 1096 /* We're scanning a new file or input source. It's 1097 * possible that this happened because the user 1098 * just pointed yyin at a new source and called 1099 * yylex(). If so, then we have to assure 1100 * consistency between YY_CURRENT_BUFFER and our 1101 * globals. Here is the right place to do so, because 1102 * this is the first action (other than possibly a 1103 * back-up) that will match for the new input source. 1104 */ 1105 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1106 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 1107 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 1108 } 1109 1110 /* Note that here we test for yy_c_buf_p "<=" to the position 1111 * of the first EOB in the buffer, since yy_c_buf_p will 1112 * already have been incremented past the NUL character 1113 * (since all states make transitions on EOB to the 1114 * end-of-buffer state). Contrast this with the test 1115 * in input(). 1116 */ 1117 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1118 { /* This was really a NUL. */ 1119 yy_state_type yy_next_state; 1120 1121 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1122 1123 yy_current_state = yy_get_previous_state( ); 1124 1125 /* Okay, we're now positioned to make the NUL 1126 * transition. We couldn't have 1127 * yy_get_previous_state() go ahead and do it 1128 * for us because it doesn't know how to deal 1129 * with the possibility of jamming (and we don't 1130 * want to build jamming into it because then it 1131 * will run more slowly). 1132 */ 1133 1134 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1135 1136 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1137 1138 if ( yy_next_state ) 1139 { 1140 /* Consume the NUL. */ 1141 yy_cp = ++(yy_c_buf_p); 1142 yy_current_state = yy_next_state; 1143 goto yy_match; 1144 } 1145 1146 else 1147 { 1148 yy_cp = (yy_c_buf_p); 1149 goto yy_find_action; 1150 } 1151 } 1152 1153 else switch ( yy_get_next_buffer( ) ) 1154 { 1155 case EOB_ACT_END_OF_FILE: 1156 { 1157 (yy_did_buffer_switch_on_eof) = 0; 1158 1159 if ( yywrap( ) ) 1160 { 1161 /* Note: because we've taken care in 1162 * yy_get_next_buffer() to have set up 1163 * yytext, we can now set up 1164 * yy_c_buf_p so that if some total 1165 * hoser (like flex itself) wants to 1166 * call the scanner after we return the 1167 * YY_NULL, it'll still work - another 1168 * YY_NULL will get returned. 1169 */ 1170 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1171 1172 yy_act = YY_STATE_EOF(YY_START); 1173 goto do_action; 1174 } 1175 1176 else 1177 { 1178 if ( ! (yy_did_buffer_switch_on_eof) ) 1179 YY_NEW_FILE; 1180 } 1181 break; 1182 } 1183 1184 case EOB_ACT_CONTINUE_SCAN: 1185 (yy_c_buf_p) = 1186 (yytext_ptr) + yy_amount_of_matched_text; 1187 1188 yy_current_state = yy_get_previous_state( ); 1189 1190 yy_cp = (yy_c_buf_p); 1191 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1192 goto yy_match; 1193 1194 case EOB_ACT_LAST_MATCH: 1195 (yy_c_buf_p) = 1196 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1197 1198 yy_current_state = yy_get_previous_state( ); 1199 1200 yy_cp = (yy_c_buf_p); 1201 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1202 goto yy_find_action; 1203 } 1204 break; 1205 } 1206 1207 default: 1208 YY_FATAL_ERROR( 1209 "fatal flex scanner internal error--no action found" ); 1210 } /* end of action switch */ 1211 } /* end of scanning one token */ 1212 } /* end of user's declarations */ 1213 } /* end of yylex */ 1214 1215 /* yy_get_next_buffer - try to read in a new buffer 1216 * 1217 * Returns a code representing an action: 1218 * EOB_ACT_LAST_MATCH - 1219 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1220 * EOB_ACT_END_OF_FILE - end of file 1221 */ 1222 static int yy_get_next_buffer (void) 1223 { 1224 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1225 char *source = (yytext_ptr); 1226 yy_size_t number_to_move, i; 1227 int ret_val; 1228 1229 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1230 YY_FATAL_ERROR( 1231 "fatal flex scanner internal error--end of buffer missed" ); 1232 1233 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1234 { /* Don't try to fill the buffer, so this is an EOF. */ 1235 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1236 { 1237 /* We matched a single character, the EOB, so 1238 * treat this as a final EOF. 1239 */ 1240 return EOB_ACT_END_OF_FILE; 1241 } 1242 1243 else 1244 { 1245 /* We matched some text prior to the EOB, first 1246 * process it. 1247 */ 1248 return EOB_ACT_LAST_MATCH; 1249 } 1250 } 1251 1252 /* Try to read more data. */ 1253 1254 /* First move last chars to start of buffer. */ 1255 number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1256 1257 for ( i = 0; i < number_to_move; ++i ) 1258 *(dest++) = *(source++); 1259 1260 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1261 /* don't do the read, it's not guaranteed to return an EOF, 1262 * just force an EOF 1263 */ 1264 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1265 1266 else 1267 { 1268 int num_to_read = 1269 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1270 1271 while ( num_to_read <= 0 ) 1272 { /* Not enough room in the buffer - grow it. */ 1273 1274 /* just a shorter name for the current buffer */ 1275 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; 1276 1277 int yy_c_buf_p_offset = 1278 (int) ((yy_c_buf_p) - b->yy_ch_buf); 1279 1280 if ( b->yy_is_our_buffer ) 1281 { 1282 int new_size = b->yy_buf_size * 2; 1283 1284 if ( new_size <= 0 ) 1285 b->yy_buf_size += b->yy_buf_size / 8; 1286 else 1287 b->yy_buf_size *= 2; 1288 1289 b->yy_ch_buf = (char *) 1290 /* Include room in for 2 EOB chars. */ 1291 yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); 1292 } 1293 else 1294 /* Can't grow it, we don't own it. */ 1295 b->yy_ch_buf = NULL; 1296 1297 if ( ! b->yy_ch_buf ) 1298 YY_FATAL_ERROR( 1299 "fatal error - scanner input buffer overflow" ); 1300 1301 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 1302 1303 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 1304 number_to_move - 1; 1305 1306 } 1307 1308 if ( num_to_read > YY_READ_BUF_SIZE ) 1309 num_to_read = YY_READ_BUF_SIZE; 1310 1311 /* Read in more data. */ 1312 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1313 (yy_n_chars), num_to_read ); 1314 1315 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1316 } 1317 1318 if ( (yy_n_chars) == 0 ) 1319 { 1320 if ( number_to_move == YY_MORE_ADJ ) 1321 { 1322 ret_val = EOB_ACT_END_OF_FILE; 1323 yyrestart(yyin ); 1324 } 1325 1326 else 1327 { 1328 ret_val = EOB_ACT_LAST_MATCH; 1329 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 1330 YY_BUFFER_EOF_PENDING; 1331 } 1332 } 1333 1334 else 1335 ret_val = EOB_ACT_CONTINUE_SCAN; 1336 1337 if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1338 /* Extend the array by 50%, plus the number we really need. */ 1339 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1340 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); 1341 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1342 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1343 } 1344 1345 (yy_n_chars) += number_to_move; 1346 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1347 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1348 1349 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1350 1351 return ret_val; 1352 } 1353 1354 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1355 1356 static yy_state_type yy_get_previous_state (void) 1357 { 1358 yy_state_type yy_current_state; 1359 char *yy_cp; 1360 1361 yy_current_state = (yy_start); 1362 1363 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1364 { 1365 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1366 if ( yy_accept[yy_current_state] ) 1367 { 1368 (yy_last_accepting_state) = yy_current_state; 1369 (yy_last_accepting_cpos) = yy_cp; 1370 } 1371 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1372 { 1373 yy_current_state = (int) yy_def[yy_current_state]; 1374 if ( yy_current_state >= 177 ) 1375 yy_c = yy_meta[(unsigned int) yy_c]; 1376 } 1377 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; 1378 } 1379 1380 return yy_current_state; 1381 } 1382 1383 /* yy_try_NUL_trans - try to make a transition on the NUL character 1384 * 1385 * synopsis 1386 * next_state = yy_try_NUL_trans( current_state ); 1387 */ 1388 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1389 { 1390 int yy_is_jam; 1391 char *yy_cp = (yy_c_buf_p); 1392 1393 YY_CHAR yy_c = 1; 1394 if ( yy_accept[yy_current_state] ) 1395 { 1396 (yy_last_accepting_state) = yy_current_state; 1397 (yy_last_accepting_cpos) = yy_cp; 1398 } 1399 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1400 { 1401 yy_current_state = (int) yy_def[yy_current_state]; 1402 if ( yy_current_state >= 177 ) 1403 yy_c = yy_meta[(unsigned int) yy_c]; 1404 } 1405 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; 1406 yy_is_jam = (yy_current_state == 176); 1407 1408 return yy_is_jam ? 0 : yy_current_state; 1409 } 1410 1411 #ifndef YY_NO_UNPUT 1412 1413 #endif 1414 1415 #ifndef YY_NO_INPUT 1416 #ifdef __cplusplus 1417 static int yyinput (void) 1418 #else 1419 static int input (void) 1420 #endif 1421 1422 { 1423 int c; 1424 1425 *(yy_c_buf_p) = (yy_hold_char); 1426 1427 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 1428 { 1429 /* yy_c_buf_p now points to the character we want to return. 1430 * If this occurs *before* the EOB characters, then it's a 1431 * valid NUL; if not, then we've hit the end of the buffer. 1432 */ 1433 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1434 /* This was really a NUL. */ 1435 *(yy_c_buf_p) = '\0'; 1436 1437 else 1438 { /* need more input */ 1439 int offset = (yy_c_buf_p) - (yytext_ptr); 1440 ++(yy_c_buf_p); 1441 1442 switch ( yy_get_next_buffer( ) ) 1443 { 1444 case EOB_ACT_LAST_MATCH: 1445 /* This happens because yy_g_n_b() 1446 * sees that we've accumulated a 1447 * token and flags that we need to 1448 * try matching the token before 1449 * proceeding. But for input(), 1450 * there's no matching to consider. 1451 * So convert the EOB_ACT_LAST_MATCH 1452 * to EOB_ACT_END_OF_FILE. 1453 */ 1454 1455 /* Reset buffer status. */ 1456 yyrestart(yyin ); 1457 1458 /*FALLTHROUGH*/ 1459 1460 case EOB_ACT_END_OF_FILE: 1461 { 1462 if ( yywrap( ) ) 1463 return 0; 1464 1465 if ( ! (yy_did_buffer_switch_on_eof) ) 1466 YY_NEW_FILE; 1467 #ifdef __cplusplus 1468 return yyinput(); 1469 #else 1470 return input(); 1471 #endif 1472 } 1473 1474 case EOB_ACT_CONTINUE_SCAN: 1475 (yy_c_buf_p) = (yytext_ptr) + offset; 1476 break; 1477 } 1478 } 1479 } 1480 1481 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1482 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1483 (yy_hold_char) = *++(yy_c_buf_p); 1484 1485 return c; 1486 } 1487 #endif /* ifndef YY_NO_INPUT */ 1488 1489 /** Immediately switch to a different input stream. 1490 * @param input_file A readable stream. 1491 * 1492 * @note This function does not reset the start condition to @c INITIAL . 1493 */ 1494 void yyrestart (FILE * input_file ) 1495 { 1496 1497 if ( ! YY_CURRENT_BUFFER ){ 1498 yyensure_buffer_stack (); 1499 YY_CURRENT_BUFFER_LVALUE = 1500 yy_create_buffer(yyin,YY_BUF_SIZE ); 1501 } 1502 1503 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1504 yy_load_buffer_state( ); 1505 } 1506 1507 /** Switch to a different input buffer. 1508 * @param new_buffer The new input buffer. 1509 * 1510 */ 1511 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1512 { 1513 1514 /* TODO. We should be able to replace this entire function body 1515 * with 1516 * yypop_buffer_state(); 1517 * yypush_buffer_state(new_buffer); 1518 */ 1519 yyensure_buffer_stack (); 1520 if ( YY_CURRENT_BUFFER == new_buffer ) 1521 return; 1522 1523 if ( YY_CURRENT_BUFFER ) 1524 { 1525 /* Flush out information for old buffer. */ 1526 *(yy_c_buf_p) = (yy_hold_char); 1527 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1528 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1529 } 1530 1531 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1532 yy_load_buffer_state( ); 1533 1534 /* We don't actually know whether we did this switch during 1535 * EOF (yywrap()) processing, but the only time this flag 1536 * is looked at is after yywrap() is called, so it's safe 1537 * to go ahead and always set it. 1538 */ 1539 (yy_did_buffer_switch_on_eof) = 1; 1540 } 1541 1542 static void yy_load_buffer_state (void) 1543 { 1544 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1545 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1546 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1547 (yy_hold_char) = *(yy_c_buf_p); 1548 } 1549 1550 /** Allocate and initialize an input buffer state. 1551 * @param file A readable stream. 1552 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1553 * 1554 * @return the allocated buffer state. 1555 */ 1556 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1557 { 1558 YY_BUFFER_STATE b; 1559 1560 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1561 if ( ! b ) 1562 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1563 1564 b->yy_buf_size = size; 1565 1566 /* yy_ch_buf has to be 2 characters longer than the size given because 1567 * we need to put in 2 end-of-buffer characters. 1568 */ 1569 b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); 1570 if ( ! b->yy_ch_buf ) 1571 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1572 1573 b->yy_is_our_buffer = 1; 1574 1575 yy_init_buffer(b,file ); 1576 1577 return b; 1578 } 1579 1580 /** Destroy the buffer. 1581 * @param b a buffer created with yy_create_buffer() 1582 * 1583 */ 1584 void yy_delete_buffer (YY_BUFFER_STATE b ) 1585 { 1586 1587 if ( ! b ) 1588 return; 1589 1590 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 1591 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 1592 1593 if ( b->yy_is_our_buffer ) 1594 yyfree((void *) b->yy_ch_buf ); 1595 1596 yyfree((void *) b ); 1597 } 1598 1599 /* Initializes or reinitializes a buffer. 1600 * This function is sometimes called more than once on the same buffer, 1601 * such as during a yyrestart() or at EOF. 1602 */ 1603 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1604 1605 { 1606 int oerrno = errno; 1607 1608 yy_flush_buffer(b ); 1609 1610 b->yy_input_file = file; 1611 b->yy_fill_buffer = 1; 1612 1613 /* If b is the current buffer, then yy_init_buffer was _probably_ 1614 * called from yyrestart() or through yy_get_next_buffer. 1615 * In that case, we don't want to reset the lineno or column. 1616 */ 1617 if (b != YY_CURRENT_BUFFER){ 1618 b->yy_bs_lineno = 1; 1619 b->yy_bs_column = 0; 1620 } 1621 1622 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1623 1624 errno = oerrno; 1625 } 1626 1627 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1628 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1629 * 1630 */ 1631 void yy_flush_buffer (YY_BUFFER_STATE b ) 1632 { 1633 if ( ! b ) 1634 return; 1635 1636 b->yy_n_chars = 0; 1637 1638 /* We always need two end-of-buffer characters. The first causes 1639 * a transition to the end-of-buffer state. The second causes 1640 * a jam in that state. 1641 */ 1642 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 1643 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 1644 1645 b->yy_buf_pos = &b->yy_ch_buf[0]; 1646 1647 b->yy_at_bol = 1; 1648 b->yy_buffer_status = YY_BUFFER_NEW; 1649 1650 if ( b == YY_CURRENT_BUFFER ) 1651 yy_load_buffer_state( ); 1652 } 1653 1654 /** Pushes the new state onto the stack. The new state becomes 1655 * the current state. This function will allocate the stack 1656 * if necessary. 1657 * @param new_buffer The new state. 1658 * 1659 */ 1660 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1661 { 1662 if (new_buffer == NULL) 1663 return; 1664 1665 yyensure_buffer_stack(); 1666 1667 /* This block is copied from yy_switch_to_buffer. */ 1668 if ( YY_CURRENT_BUFFER ) 1669 { 1670 /* Flush out information for old buffer. */ 1671 *(yy_c_buf_p) = (yy_hold_char); 1672 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1673 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1674 } 1675 1676 /* Only push if top exists. Otherwise, replace top. */ 1677 if (YY_CURRENT_BUFFER) 1678 (yy_buffer_stack_top)++; 1679 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1680 1681 /* copied from yy_switch_to_buffer. */ 1682 yy_load_buffer_state( ); 1683 (yy_did_buffer_switch_on_eof) = 1; 1684 } 1685 1686 /** Removes and deletes the top of the stack, if present. 1687 * The next element becomes the new top. 1688 * 1689 */ 1690 void yypop_buffer_state (void) 1691 { 1692 if (!YY_CURRENT_BUFFER) 1693 return; 1694 1695 yy_delete_buffer(YY_CURRENT_BUFFER ); 1696 YY_CURRENT_BUFFER_LVALUE = NULL; 1697 if ((yy_buffer_stack_top) > 0) 1698 --(yy_buffer_stack_top); 1699 1700 if (YY_CURRENT_BUFFER) { 1701 yy_load_buffer_state( ); 1702 (yy_did_buffer_switch_on_eof) = 1; 1703 } 1704 } 1705 1706 /* Allocates the stack if it does not exist. 1707 * Guarantees space for at least one push. 1708 */ 1709 static void yyensure_buffer_stack (void) 1710 { 1711 int num_to_alloc; 1712 1713 if (!(yy_buffer_stack)) { 1714 1715 /* First allocation is just for 2 elements, since we don't know if this 1716 * scanner will even need a stack. We use 2 instead of 1 to avoid an 1717 * immediate realloc on the next call. 1718 */ 1719 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ 1720 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 1721 (num_to_alloc * sizeof(struct yy_buffer_state*) 1722 ); 1723 if ( ! (yy_buffer_stack) ) 1724 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1725 1726 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 1727 1728 (yy_buffer_stack_max) = num_to_alloc; 1729 (yy_buffer_stack_top) = 0; 1730 return; 1731 } 1732 1733 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 1734 1735 /* Increase the buffer to prepare for a possible push. */ 1736 yy_size_t grow_size = 8 /* arbitrary grow size */; 1737 1738 num_to_alloc = (yy_buffer_stack_max) + grow_size; 1739 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 1740 ((yy_buffer_stack), 1741 num_to_alloc * sizeof(struct yy_buffer_state*) 1742 ); 1743 if ( ! (yy_buffer_stack) ) 1744 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1745 1746 /* zero only the new slots.*/ 1747 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 1748 (yy_buffer_stack_max) = num_to_alloc; 1749 } 1750 } 1751 1752 /** Setup the input buffer state to scan directly from a user-specified character buffer. 1753 * @param base the character buffer 1754 * @param size the size in bytes of the character buffer 1755 * 1756 * @return the newly allocated buffer state object. 1757 */ 1758 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 1759 { 1760 YY_BUFFER_STATE b; 1761 1762 if ( size < 2 || 1763 base[size-2] != YY_END_OF_BUFFER_CHAR || 1764 base[size-1] != YY_END_OF_BUFFER_CHAR ) 1765 /* They forgot to leave room for the EOB's. */ 1766 return NULL; 1767 1768 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1769 if ( ! b ) 1770 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1771 1772 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ 1773 b->yy_buf_pos = b->yy_ch_buf = base; 1774 b->yy_is_our_buffer = 0; 1775 b->yy_input_file = NULL; 1776 b->yy_n_chars = b->yy_buf_size; 1777 b->yy_is_interactive = 0; 1778 b->yy_at_bol = 1; 1779 b->yy_fill_buffer = 0; 1780 b->yy_buffer_status = YY_BUFFER_NEW; 1781 1782 yy_switch_to_buffer(b ); 1783 1784 return b; 1785 } 1786 1787 /** Setup the input buffer state to scan a string. The next call to yylex() will 1788 * scan from a @e copy of @a str. 1789 * @param yystr a NUL-terminated string to scan 1790 * 1791 * @return the newly allocated buffer state object. 1792 * @note If you want to scan bytes that may contain NUL values, then use 1793 * yy_scan_bytes() instead. 1794 */ 1795 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 1796 { 1797 1798 return yy_scan_bytes(yystr,(int) strlen(yystr) ); 1799 } 1800 1801 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1802 * scan from a @e copy of @a bytes. 1803 * @param yybytes the byte buffer to scan 1804 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 1805 * 1806 * @return the newly allocated buffer state object. 1807 */ 1808 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 1809 { 1810 YY_BUFFER_STATE b; 1811 char *buf; 1812 yy_size_t n; 1813 int i; 1814 1815 /* Get memory for full buffer, including space for trailing EOB's. */ 1816 n = (yy_size_t) (_yybytes_len + 2); 1817 buf = (char *) yyalloc(n ); 1818 if ( ! buf ) 1819 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1820 1821 for ( i = 0; i < _yybytes_len; ++i ) 1822 buf[i] = yybytes[i]; 1823 1824 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 1825 1826 b = yy_scan_buffer(buf,n ); 1827 if ( ! b ) 1828 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1829 1830 /* It's okay to grow etc. this buffer, and we should throw it 1831 * away when we're done. 1832 */ 1833 b->yy_is_our_buffer = 1; 1834 1835 return b; 1836 } 1837 1838 #ifndef YY_EXIT_FAILURE 1839 #define YY_EXIT_FAILURE 2 1840 #endif 1841 1842 static void yynoreturn yy_fatal_error (yyconst char* msg ) 1843 { 1844 (void) fprintf( stderr, "%s\n", msg ); 1845 exit( YY_EXIT_FAILURE ); 1846 } 1847 1848 /* Redefine yyless() so it works in section 3 code. */ 1849 1850 #undef yyless 1851 #define yyless(n) \ 1852 do \ 1853 { \ 1854 /* Undo effects of setting up yytext. */ \ 1855 yy_size_t yyless_macro_arg = (n); \ 1856 YY_LESS_LINENO(yyless_macro_arg);\ 1857 yytext[yyleng] = (yy_hold_char); \ 1858 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 1859 (yy_hold_char) = *(yy_c_buf_p); \ 1860 *(yy_c_buf_p) = '\0'; \ 1861 yyleng = yyless_macro_arg; \ 1862 } \ 1863 while ( 0 ) 1864 1865 /* Accessor methods (get/set functions) to struct members. */ 1866 1867 /** Get the current line number. 1868 * 1869 */ 1870 int yyget_lineno (void) 1871 { 1872 1873 return yylineno; 1874 } 1875 1876 /** Get the input stream. 1877 * 1878 */ 1879 FILE *yyget_in (void) 1880 { 1881 return yyin; 1882 } 1883 1884 /** Get the output stream. 1885 * 1886 */ 1887 FILE *yyget_out (void) 1888 { 1889 return yyout; 1890 } 1891 1892 /** Get the length of the current token. 1893 * 1894 */ 1895 int yyget_leng (void) 1896 { 1897 return yyleng; 1898 } 1899 1900 /** Get the current token. 1901 * 1902 */ 1903 1904 char *yyget_text (void) 1905 { 1906 return yytext; 1907 } 1908 1909 /** Set the current line number. 1910 * @param _line_number line number 1911 * 1912 */ 1913 void yyset_lineno (int _line_number ) 1914 { 1915 1916 yylineno = _line_number; 1917 } 1918 1919 /** Set the input stream. This does not discard the current 1920 * input buffer. 1921 * @param _in_str A readable stream. 1922 * 1923 * @see yy_switch_to_buffer 1924 */ 1925 void yyset_in (FILE * _in_str ) 1926 { 1927 yyin = _in_str ; 1928 } 1929 1930 void yyset_out (FILE * _out_str ) 1931 { 1932 yyout = _out_str ; 1933 } 1934 1935 int yyget_debug (void) 1936 { 1937 return yy_flex_debug; 1938 } 1939 1940 void yyset_debug (int _bdebug ) 1941 { 1942 yy_flex_debug = _bdebug ; 1943 } 1944 1945 static int yy_init_globals (void) 1946 { 1947 /* Initialization is the same as for the non-reentrant scanner. 1948 * This function is called from yylex_destroy(), so don't allocate here. 1949 */ 1950 1951 (yy_buffer_stack) = NULL; 1952 (yy_buffer_stack_top) = 0; 1953 (yy_buffer_stack_max) = 0; 1954 (yy_c_buf_p) = NULL; 1955 (yy_init) = 0; 1956 (yy_start) = 0; 1957 1958 /* Defined in main.c */ 1959 #ifdef YY_STDINIT 1960 yyin = stdin; 1961 yyout = stdout; 1962 #else 1963 yyin = NULL; 1964 yyout = NULL; 1965 #endif 1966 1967 /* For future reference: Set errno on error, since we are called by 1968 * yylex_init() 1969 */ 1970 return 0; 1971 } 1972 1973 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1974 int yylex_destroy (void) 1975 { 1976 1977 /* Pop the buffer stack, destroying each element. */ 1978 while(YY_CURRENT_BUFFER){ 1979 yy_delete_buffer(YY_CURRENT_BUFFER ); 1980 YY_CURRENT_BUFFER_LVALUE = NULL; 1981 yypop_buffer_state(); 1982 } 1983 1984 /* Destroy the stack itself. */ 1985 yyfree((yy_buffer_stack) ); 1986 (yy_buffer_stack) = NULL; 1987 1988 /* Reset the globals. This is important in a non-reentrant scanner so the next time 1989 * yylex() is called, initialization will occur. */ 1990 yy_init_globals( ); 1991 1992 return 0; 1993 } 1994 1995 /* 1996 * Internal utility routines. 1997 */ 1998 1999 #ifndef yytext_ptr 2000 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 2001 { 2002 2003 int i; 2004 for ( i = 0; i < n; ++i ) 2005 s1[i] = s2[i]; 2006 } 2007 #endif 2008 2009 #ifdef YY_NEED_STRLEN 2010 static int yy_flex_strlen (yyconst char * s ) 2011 { 2012 int n; 2013 for ( n = 0; s[n]; ++n ) 2014 ; 2015 2016 return n; 2017 } 2018 #endif 2019 2020 void *yyalloc (yy_size_t size ) 2021 { 2022 return malloc(size); 2023 } 2024 2025 void *yyrealloc (void * ptr, yy_size_t size ) 2026 { 2027 2028 /* The cast to (char *) in the following accommodates both 2029 * implementations that use char* generic pointers, and those 2030 * that use void* generic pointers. It works with the latter 2031 * because both ANSI C and C++ allow castless assignment from 2032 * any pointer type to void*, and deal with argument conversions 2033 * as though doing an assignment. 2034 */ 2035 return realloc(ptr, size); 2036 } 2037 2038 void yyfree (void * ptr ) 2039 { 2040 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 2041 } 2042 2043 #define YYTABLES_NAME "yytables" 2044 2045 #line 90 "arlex.l" 2046 2047 2048 2049