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