Annotation of embedaddon/strongswan/src/starter/parser/lexer.c, revision 1.1
1.1 ! misho 1: #line 2 "parser/lexer.c"
! 2:
! 3: #line 4 "parser/lexer.c"
! 4:
! 5: #define YY_INT_ALIGNED short int
! 6:
! 7: /* A lexical scanner generated by flex */
! 8:
! 9: /* %not-for-header */
! 10: /* %if-c-only */
! 11: /* %if-not-reentrant */
! 12: /* %endif */
! 13: /* %endif */
! 14: /* %ok-for-header */
! 15:
! 16: #define FLEX_SCANNER
! 17: #define YY_FLEX_MAJOR_VERSION 2
! 18: #define YY_FLEX_MINOR_VERSION 6
! 19: #define YY_FLEX_SUBMINOR_VERSION 4
! 20: #if YY_FLEX_SUBMINOR_VERSION > 0
! 21: #define FLEX_BETA
! 22: #endif
! 23:
! 24: /* %if-c++-only */
! 25: /* %endif */
! 26:
! 27: /* %if-c-only */
! 28: #ifdef yy_create_buffer
! 29: #define conf_parser__create_buffer_ALREADY_DEFINED
! 30: #else
! 31: #define yy_create_buffer conf_parser__create_buffer
! 32: #endif
! 33:
! 34: #ifdef yy_delete_buffer
! 35: #define conf_parser__delete_buffer_ALREADY_DEFINED
! 36: #else
! 37: #define yy_delete_buffer conf_parser__delete_buffer
! 38: #endif
! 39:
! 40: #ifdef yy_scan_buffer
! 41: #define conf_parser__scan_buffer_ALREADY_DEFINED
! 42: #else
! 43: #define yy_scan_buffer conf_parser__scan_buffer
! 44: #endif
! 45:
! 46: #ifdef yy_scan_string
! 47: #define conf_parser__scan_string_ALREADY_DEFINED
! 48: #else
! 49: #define yy_scan_string conf_parser__scan_string
! 50: #endif
! 51:
! 52: #ifdef yy_scan_bytes
! 53: #define conf_parser__scan_bytes_ALREADY_DEFINED
! 54: #else
! 55: #define yy_scan_bytes conf_parser__scan_bytes
! 56: #endif
! 57:
! 58: #ifdef yy_init_buffer
! 59: #define conf_parser__init_buffer_ALREADY_DEFINED
! 60: #else
! 61: #define yy_init_buffer conf_parser__init_buffer
! 62: #endif
! 63:
! 64: #ifdef yy_flush_buffer
! 65: #define conf_parser__flush_buffer_ALREADY_DEFINED
! 66: #else
! 67: #define yy_flush_buffer conf_parser__flush_buffer
! 68: #endif
! 69:
! 70: #ifdef yy_load_buffer_state
! 71: #define conf_parser__load_buffer_state_ALREADY_DEFINED
! 72: #else
! 73: #define yy_load_buffer_state conf_parser__load_buffer_state
! 74: #endif
! 75:
! 76: #ifdef yy_switch_to_buffer
! 77: #define conf_parser__switch_to_buffer_ALREADY_DEFINED
! 78: #else
! 79: #define yy_switch_to_buffer conf_parser__switch_to_buffer
! 80: #endif
! 81:
! 82: #ifdef yypush_buffer_state
! 83: #define conf_parser_push_buffer_state_ALREADY_DEFINED
! 84: #else
! 85: #define yypush_buffer_state conf_parser_push_buffer_state
! 86: #endif
! 87:
! 88: #ifdef yypop_buffer_state
! 89: #define conf_parser_pop_buffer_state_ALREADY_DEFINED
! 90: #else
! 91: #define yypop_buffer_state conf_parser_pop_buffer_state
! 92: #endif
! 93:
! 94: #ifdef yyensure_buffer_stack
! 95: #define conf_parser_ensure_buffer_stack_ALREADY_DEFINED
! 96: #else
! 97: #define yyensure_buffer_stack conf_parser_ensure_buffer_stack
! 98: #endif
! 99:
! 100: #ifdef yylex
! 101: #define conf_parser_lex_ALREADY_DEFINED
! 102: #else
! 103: #define yylex conf_parser_lex
! 104: #endif
! 105:
! 106: #ifdef yyrestart
! 107: #define conf_parser_restart_ALREADY_DEFINED
! 108: #else
! 109: #define yyrestart conf_parser_restart
! 110: #endif
! 111:
! 112: #ifdef yylex_init
! 113: #define conf_parser_lex_init_ALREADY_DEFINED
! 114: #else
! 115: #define yylex_init conf_parser_lex_init
! 116: #endif
! 117:
! 118: #ifdef yylex_init_extra
! 119: #define conf_parser_lex_init_extra_ALREADY_DEFINED
! 120: #else
! 121: #define yylex_init_extra conf_parser_lex_init_extra
! 122: #endif
! 123:
! 124: #ifdef yylex_destroy
! 125: #define conf_parser_lex_destroy_ALREADY_DEFINED
! 126: #else
! 127: #define yylex_destroy conf_parser_lex_destroy
! 128: #endif
! 129:
! 130: #ifdef yyget_debug
! 131: #define conf_parser_get_debug_ALREADY_DEFINED
! 132: #else
! 133: #define yyget_debug conf_parser_get_debug
! 134: #endif
! 135:
! 136: #ifdef yyset_debug
! 137: #define conf_parser_set_debug_ALREADY_DEFINED
! 138: #else
! 139: #define yyset_debug conf_parser_set_debug
! 140: #endif
! 141:
! 142: #ifdef yyget_extra
! 143: #define conf_parser_get_extra_ALREADY_DEFINED
! 144: #else
! 145: #define yyget_extra conf_parser_get_extra
! 146: #endif
! 147:
! 148: #ifdef yyset_extra
! 149: #define conf_parser_set_extra_ALREADY_DEFINED
! 150: #else
! 151: #define yyset_extra conf_parser_set_extra
! 152: #endif
! 153:
! 154: #ifdef yyget_in
! 155: #define conf_parser_get_in_ALREADY_DEFINED
! 156: #else
! 157: #define yyget_in conf_parser_get_in
! 158: #endif
! 159:
! 160: #ifdef yyset_in
! 161: #define conf_parser_set_in_ALREADY_DEFINED
! 162: #else
! 163: #define yyset_in conf_parser_set_in
! 164: #endif
! 165:
! 166: #ifdef yyget_out
! 167: #define conf_parser_get_out_ALREADY_DEFINED
! 168: #else
! 169: #define yyget_out conf_parser_get_out
! 170: #endif
! 171:
! 172: #ifdef yyset_out
! 173: #define conf_parser_set_out_ALREADY_DEFINED
! 174: #else
! 175: #define yyset_out conf_parser_set_out
! 176: #endif
! 177:
! 178: #ifdef yyget_leng
! 179: #define conf_parser_get_leng_ALREADY_DEFINED
! 180: #else
! 181: #define yyget_leng conf_parser_get_leng
! 182: #endif
! 183:
! 184: #ifdef yyget_text
! 185: #define conf_parser_get_text_ALREADY_DEFINED
! 186: #else
! 187: #define yyget_text conf_parser_get_text
! 188: #endif
! 189:
! 190: #ifdef yyget_lineno
! 191: #define conf_parser_get_lineno_ALREADY_DEFINED
! 192: #else
! 193: #define yyget_lineno conf_parser_get_lineno
! 194: #endif
! 195:
! 196: #ifdef yyset_lineno
! 197: #define conf_parser_set_lineno_ALREADY_DEFINED
! 198: #else
! 199: #define yyset_lineno conf_parser_set_lineno
! 200: #endif
! 201:
! 202: #ifdef yyget_column
! 203: #define conf_parser_get_column_ALREADY_DEFINED
! 204: #else
! 205: #define yyget_column conf_parser_get_column
! 206: #endif
! 207:
! 208: #ifdef yyset_column
! 209: #define conf_parser_set_column_ALREADY_DEFINED
! 210: #else
! 211: #define yyset_column conf_parser_set_column
! 212: #endif
! 213:
! 214: #ifdef yywrap
! 215: #define conf_parser_wrap_ALREADY_DEFINED
! 216: #else
! 217: #define yywrap conf_parser_wrap
! 218: #endif
! 219:
! 220: /* %endif */
! 221:
! 222: #ifdef yyget_lval
! 223: #define conf_parser_get_lval_ALREADY_DEFINED
! 224: #else
! 225: #define yyget_lval conf_parser_get_lval
! 226: #endif
! 227:
! 228: #ifdef yyset_lval
! 229: #define conf_parser_set_lval_ALREADY_DEFINED
! 230: #else
! 231: #define yyset_lval conf_parser_set_lval
! 232: #endif
! 233:
! 234: #ifdef yyalloc
! 235: #define conf_parser_alloc_ALREADY_DEFINED
! 236: #else
! 237: #define yyalloc conf_parser_alloc
! 238: #endif
! 239:
! 240: #ifdef yyrealloc
! 241: #define conf_parser_realloc_ALREADY_DEFINED
! 242: #else
! 243: #define yyrealloc conf_parser_realloc
! 244: #endif
! 245:
! 246: #ifdef yyfree
! 247: #define conf_parser_free_ALREADY_DEFINED
! 248: #else
! 249: #define yyfree conf_parser_free
! 250: #endif
! 251:
! 252: /* %if-c-only */
! 253:
! 254: /* %endif */
! 255:
! 256: /* First, we deal with platform-specific or compiler-specific issues. */
! 257:
! 258: /* begin standard C headers. */
! 259: /* %if-c-only */
! 260: #include <stdio.h>
! 261: #include <string.h>
! 262: #include <errno.h>
! 263: #include <stdlib.h>
! 264: /* %endif */
! 265:
! 266: /* %if-tables-serialization */
! 267: /* %endif */
! 268: /* end standard C headers. */
! 269:
! 270: /* %if-c-or-c++ */
! 271: /* flex integer type definitions */
! 272:
! 273: #ifndef FLEXINT_H
! 274: #define FLEXINT_H
! 275:
! 276: /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
! 277:
! 278: #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
! 279:
! 280: /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
! 281: * if you want the limit (max/min) macros for int types.
! 282: */
! 283: #ifndef __STDC_LIMIT_MACROS
! 284: #define __STDC_LIMIT_MACROS 1
! 285: #endif
! 286:
! 287: #include <inttypes.h>
! 288: typedef int8_t flex_int8_t;
! 289: typedef uint8_t flex_uint8_t;
! 290: typedef int16_t flex_int16_t;
! 291: typedef uint16_t flex_uint16_t;
! 292: typedef int32_t flex_int32_t;
! 293: typedef uint32_t flex_uint32_t;
! 294: #else
! 295: typedef signed char flex_int8_t;
! 296: typedef short int flex_int16_t;
! 297: typedef int flex_int32_t;
! 298: typedef unsigned char flex_uint8_t;
! 299: typedef unsigned short int flex_uint16_t;
! 300: typedef unsigned int flex_uint32_t;
! 301:
! 302: /* Limits of integral types. */
! 303: #ifndef INT8_MIN
! 304: #define INT8_MIN (-128)
! 305: #endif
! 306: #ifndef INT16_MIN
! 307: #define INT16_MIN (-32767-1)
! 308: #endif
! 309: #ifndef INT32_MIN
! 310: #define INT32_MIN (-2147483647-1)
! 311: #endif
! 312: #ifndef INT8_MAX
! 313: #define INT8_MAX (127)
! 314: #endif
! 315: #ifndef INT16_MAX
! 316: #define INT16_MAX (32767)
! 317: #endif
! 318: #ifndef INT32_MAX
! 319: #define INT32_MAX (2147483647)
! 320: #endif
! 321: #ifndef UINT8_MAX
! 322: #define UINT8_MAX (255U)
! 323: #endif
! 324: #ifndef UINT16_MAX
! 325: #define UINT16_MAX (65535U)
! 326: #endif
! 327: #ifndef UINT32_MAX
! 328: #define UINT32_MAX (4294967295U)
! 329: #endif
! 330:
! 331: #ifndef SIZE_MAX
! 332: #define SIZE_MAX (~(size_t)0)
! 333: #endif
! 334:
! 335: #endif /* ! C99 */
! 336:
! 337: #endif /* ! FLEXINT_H */
! 338:
! 339: /* %endif */
! 340:
! 341: /* begin standard C++ headers. */
! 342: /* %if-c++-only */
! 343: /* %endif */
! 344:
! 345: /* TODO: this is always defined, so inline it */
! 346: #define yyconst const
! 347:
! 348: #if defined(__GNUC__) && __GNUC__ >= 3
! 349: #define yynoreturn __attribute__((__noreturn__))
! 350: #else
! 351: #define yynoreturn
! 352: #endif
! 353:
! 354: /* %not-for-header */
! 355: /* Returned upon end-of-file. */
! 356: #define YY_NULL 0
! 357: /* %ok-for-header */
! 358:
! 359: /* %not-for-header */
! 360: /* Promotes a possibly negative, possibly signed char to an
! 361: * integer in range [0..255] for use as an array index.
! 362: */
! 363: #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
! 364: /* %ok-for-header */
! 365:
! 366: /* %if-reentrant */
! 367:
! 368: /* An opaque pointer. */
! 369: #ifndef YY_TYPEDEF_YY_SCANNER_T
! 370: #define YY_TYPEDEF_YY_SCANNER_T
! 371: typedef void* yyscan_t;
! 372: #endif
! 373:
! 374: /* For convenience, these vars (plus the bison vars far below)
! 375: are macros in the reentrant scanner. */
! 376: #define yyin yyg->yyin_r
! 377: #define yyout yyg->yyout_r
! 378: #define yyextra yyg->yyextra_r
! 379: #define yyleng yyg->yyleng_r
! 380: #define yytext yyg->yytext_r
! 381: #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
! 382: #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
! 383: #define yy_flex_debug yyg->yy_flex_debug_r
! 384:
! 385: /* %endif */
! 386:
! 387: /* %if-not-reentrant */
! 388: /* %endif */
! 389:
! 390: /* Enter a start condition. This macro really ought to take a parameter,
! 391: * but we do it the disgusting crufty way forced on us by the ()-less
! 392: * definition of BEGIN.
! 393: */
! 394: #define BEGIN yyg->yy_start = 1 + 2 *
! 395: /* Translate the current start state into a value that can be later handed
! 396: * to BEGIN to return to the state. The YYSTATE alias is for lex
! 397: * compatibility.
! 398: */
! 399: #define YY_START ((yyg->yy_start - 1) / 2)
! 400: #define YYSTATE YY_START
! 401: /* Action number for EOF rule of a given start state. */
! 402: #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
! 403: /* Special action meaning "start processing a new file". */
! 404: #define YY_NEW_FILE yyrestart( yyin , yyscanner )
! 405: #define YY_END_OF_BUFFER_CHAR 0
! 406:
! 407: /* Size of default input buffer. */
! 408: #ifndef YY_BUF_SIZE
! 409: #ifdef __ia64__
! 410: /* On IA-64, the buffer size is 16k, not 8k.
! 411: * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
! 412: * Ditto for the __ia64__ case accordingly.
! 413: */
! 414: #define YY_BUF_SIZE 32768
! 415: #else
! 416: #define YY_BUF_SIZE 16384
! 417: #endif /* __ia64__ */
! 418: #endif
! 419:
! 420: /* The state buf must be large enough to hold one state per character in the main buffer.
! 421: */
! 422: #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
! 423:
! 424: #ifndef YY_TYPEDEF_YY_BUFFER_STATE
! 425: #define YY_TYPEDEF_YY_BUFFER_STATE
! 426: typedef struct yy_buffer_state *YY_BUFFER_STATE;
! 427: #endif
! 428:
! 429: #ifndef YY_TYPEDEF_YY_SIZE_T
! 430: #define YY_TYPEDEF_YY_SIZE_T
! 431: typedef size_t yy_size_t;
! 432: #endif
! 433:
! 434: /* %if-not-reentrant */
! 435: /* %endif */
! 436:
! 437: /* %if-c-only */
! 438: /* %if-not-reentrant */
! 439: /* %endif */
! 440: /* %endif */
! 441:
! 442: #define EOB_ACT_CONTINUE_SCAN 0
! 443: #define EOB_ACT_END_OF_FILE 1
! 444: #define EOB_ACT_LAST_MATCH 2
! 445:
! 446: /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
! 447: * access to the local variable yy_act. Since yyless() is a macro, it would break
! 448: * existing scanners that call yyless() from OUTSIDE yylex.
! 449: * One obvious solution it to make yy_act a global. I tried that, and saw
! 450: * a 5% performance hit in a non-yylineno scanner, because yy_act is
! 451: * normally declared as a register variable-- so it is not worth it.
! 452: */
! 453: #define YY_LESS_LINENO(n) \
! 454: do { \
! 455: int yyl;\
! 456: for ( yyl = n; yyl < yyleng; ++yyl )\
! 457: if ( yytext[yyl] == '\n' )\
! 458: --yylineno;\
! 459: }while(0)
! 460: #define YY_LINENO_REWIND_TO(dst) \
! 461: do {\
! 462: const char *p;\
! 463: for ( p = yy_cp-1; p >= (dst); --p)\
! 464: if ( *p == '\n' )\
! 465: --yylineno;\
! 466: }while(0)
! 467:
! 468: /* Return all but the first "n" matched characters back to the input stream. */
! 469: #define yyless(n) \
! 470: do \
! 471: { \
! 472: /* Undo effects of setting up yytext. */ \
! 473: int yyless_macro_arg = (n); \
! 474: YY_LESS_LINENO(yyless_macro_arg);\
! 475: *yy_cp = yyg->yy_hold_char; \
! 476: YY_RESTORE_YY_MORE_OFFSET \
! 477: yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
! 478: YY_DO_BEFORE_ACTION; /* set up yytext again */ \
! 479: } \
! 480: while ( 0 )
! 481: #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
! 482:
! 483: #ifndef YY_STRUCT_YY_BUFFER_STATE
! 484: #define YY_STRUCT_YY_BUFFER_STATE
! 485: struct yy_buffer_state
! 486: {
! 487: /* %if-c-only */
! 488: FILE *yy_input_file;
! 489: /* %endif */
! 490:
! 491: /* %if-c++-only */
! 492: /* %endif */
! 493:
! 494: char *yy_ch_buf; /* input buffer */
! 495: char *yy_buf_pos; /* current position in input buffer */
! 496:
! 497: /* Size of input buffer in bytes, not including room for EOB
! 498: * characters.
! 499: */
! 500: int yy_buf_size;
! 501:
! 502: /* Number of characters read into yy_ch_buf, not including EOB
! 503: * characters.
! 504: */
! 505: int yy_n_chars;
! 506:
! 507: /* Whether we "own" the buffer - i.e., we know we created it,
! 508: * and can realloc() it to grow it, and should free() it to
! 509: * delete it.
! 510: */
! 511: int yy_is_our_buffer;
! 512:
! 513: /* Whether this is an "interactive" input source; if so, and
! 514: * if we're using stdio for input, then we want to use getc()
! 515: * instead of fread(), to make sure we stop fetching input after
! 516: * each newline.
! 517: */
! 518: int yy_is_interactive;
! 519:
! 520: /* Whether we're considered to be at the beginning of a line.
! 521: * If so, '^' rules will be active on the next match, otherwise
! 522: * not.
! 523: */
! 524: int yy_at_bol;
! 525:
! 526: int yy_bs_lineno; /**< The line count. */
! 527: int yy_bs_column; /**< The column count. */
! 528:
! 529: /* Whether to try to fill the input buffer when we reach the
! 530: * end of it.
! 531: */
! 532: int yy_fill_buffer;
! 533:
! 534: int yy_buffer_status;
! 535:
! 536: #define YY_BUFFER_NEW 0
! 537: #define YY_BUFFER_NORMAL 1
! 538: /* When an EOF's been seen but there's still some text to process
! 539: * then we mark the buffer as YY_EOF_PENDING, to indicate that we
! 540: * shouldn't try reading from the input source any more. We might
! 541: * still have a bunch of tokens to match, though, because of
! 542: * possible backing-up.
! 543: *
! 544: * When we actually see the EOF, we change the status to "new"
! 545: * (via yyrestart()), so that the user can continue scanning by
! 546: * just pointing yyin at a new input file.
! 547: */
! 548: #define YY_BUFFER_EOF_PENDING 2
! 549:
! 550: };
! 551: #endif /* !YY_STRUCT_YY_BUFFER_STATE */
! 552:
! 553: /* %if-c-only Standard (non-C++) definition */
! 554: /* %not-for-header */
! 555: /* %if-not-reentrant */
! 556: /* %endif */
! 557: /* %ok-for-header */
! 558:
! 559: /* %endif */
! 560:
! 561: /* We provide macros for accessing buffer states in case in the
! 562: * future we want to put the buffer states in a more general
! 563: * "scanner state".
! 564: *
! 565: * Returns the top of the stack, or NULL.
! 566: */
! 567: #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
! 568: ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
! 569: : NULL)
! 570: /* Same as previous macro, but useful when we know that the buffer stack is not
! 571: * NULL or when we need an lvalue. For internal use only.
! 572: */
! 573: #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
! 574:
! 575: /* %if-c-only Standard (non-C++) definition */
! 576:
! 577: /* %if-not-reentrant */
! 578: /* %not-for-header */
! 579: /* %ok-for-header */
! 580:
! 581: /* %endif */
! 582:
! 583: void yyrestart ( FILE *input_file , yyscan_t yyscanner );
! 584: void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
! 585: YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
! 586: void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
! 587: void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
! 588: void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
! 589: void yypop_buffer_state ( yyscan_t yyscanner );
! 590:
! 591: static void yyensure_buffer_stack ( yyscan_t yyscanner );
! 592: static void yy_load_buffer_state ( yyscan_t yyscanner );
! 593: static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
! 594: #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
! 595:
! 596: YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
! 597: YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
! 598: YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
! 599:
! 600: /* %endif */
! 601:
! 602: void *yyalloc ( yy_size_t , yyscan_t yyscanner );
! 603: void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
! 604: void yyfree ( void * , yyscan_t yyscanner );
! 605:
! 606: #define yy_new_buffer yy_create_buffer
! 607: #define yy_set_interactive(is_interactive) \
! 608: { \
! 609: if ( ! YY_CURRENT_BUFFER ){ \
! 610: yyensure_buffer_stack (yyscanner); \
! 611: YY_CURRENT_BUFFER_LVALUE = \
! 612: yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
! 613: } \
! 614: YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
! 615: }
! 616: #define yy_set_bol(at_bol) \
! 617: { \
! 618: if ( ! YY_CURRENT_BUFFER ){\
! 619: yyensure_buffer_stack (yyscanner); \
! 620: YY_CURRENT_BUFFER_LVALUE = \
! 621: yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
! 622: } \
! 623: YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
! 624: }
! 625: #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
! 626:
! 627: /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
! 628: /* Begin user sect3 */
! 629:
! 630: #define conf_parser_wrap(yyscanner) (/*CONSTCOND*/1)
! 631: #define YY_SKIP_YYWRAP
! 632:
! 633: #define FLEX_DEBUG
! 634: typedef flex_uint8_t YY_CHAR;
! 635:
! 636: typedef int yy_state_type;
! 637:
! 638: #define yytext_ptr yytext_r
! 639:
! 640: /* %% [1.5] DFA */
! 641:
! 642: /* %if-c-only Standard (non-C++) definition */
! 643:
! 644: static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
! 645: static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
! 646: static int yy_get_next_buffer ( yyscan_t yyscanner );
! 647: static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
! 648:
! 649: /* %endif */
! 650:
! 651: /* Done after the current pattern has been matched and before the
! 652: * corresponding action - sets up yytext.
! 653: */
! 654: #define YY_DO_BEFORE_ACTION \
! 655: yyg->yytext_ptr = yy_bp; \
! 656: /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
! 657: yyleng = (int) (yy_cp - yy_bp); \
! 658: yyg->yy_hold_char = *yy_cp; \
! 659: *yy_cp = '\0'; \
! 660: /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
! 661: yyg->yy_c_buf_p = yy_cp;
! 662: /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
! 663: #define YY_NUM_RULES 26
! 664: #define YY_END_OF_BUFFER 27
! 665: /* This struct is not used in this scanner,
! 666: but its presence is necessary. */
! 667: struct yy_trans_info
! 668: {
! 669: flex_int32_t yy_verify;
! 670: flex_int32_t yy_nxt;
! 671: };
! 672: static const flex_int16_t yy_accept[80] =
! 673: { 0,
! 674: 0, 0, 0, 0, 0, 0, 27, 12, 3, 5,
! 675: 11, 4, 6, 12, 12, 2, 12, 12, 17, 13,
! 676: 14, 15, 25, 18, 19, 12, 3, 4, 4, 0,
! 677: 12, 2, 0, 9, 12, 12, 17, 16, 25, 24,
! 678: 23, 24, 20, 21, 22, 12, 0, 12, 12, 12,
! 679: 0, 12, 8, 12, 12, 0, 12, 12, 12, 0,
! 680: 12, 12, 12, 0, 0, 12, 0, 0, 0, 12,
! 681: 0, 1, 10, 10, 0, 0, 0, 7, 0
! 682: } ;
! 683:
! 684: static const YY_CHAR yy_ec[256] =
! 685: { 0,
! 686: 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
! 687: 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
! 688: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 689: 1, 5, 1, 6, 7, 1, 1, 1, 1, 1,
! 690: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 691: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 692: 8, 1, 1, 9, 1, 1, 1, 1, 1, 1,
! 693: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 694: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 695: 1, 10, 1, 1, 1, 1, 11, 1, 12, 13,
! 696:
! 697: 14, 15, 16, 1, 17, 1, 1, 18, 1, 19,
! 698: 20, 21, 1, 22, 23, 24, 25, 26, 1, 1,
! 699: 1, 1, 1, 1, 27, 1, 1, 1, 1, 1,
! 700: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 701: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 702: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 703: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 704: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 705: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 706: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 707:
! 708: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 709: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 710: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 711: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 712: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 713: 1, 1, 1, 1, 1
! 714: } ;
! 715:
! 716: static const YY_CHAR yy_meta[28] =
! 717: { 0,
! 718: 1, 2, 3, 1, 2, 4, 2, 5, 1, 6,
! 719: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 720: 1, 1, 1, 1, 1, 1, 1
! 721: } ;
! 722:
! 723: static const flex_int16_t yy_base[91] =
! 724: { 0,
! 725: 0, 16, 41, 50, 4, 5, 101, 0, 24, 184,
! 726: 184, 0, 184, 92, 79, 32, 16, 83, 0, 184,
! 727: 184, 56, 0, 184, 81, 0, 33, 0, 0, 0,
! 728: 84, 62, 81, 0, 75, 71, 0, 184, 0, 184,
! 729: 184, 89, 184, 184, 184, 73, 68, 1, 66, 62,
! 730: 63, 65, 0, 64, 67, 62, 62, 57, 62, 55,
! 731: 67, 47, 63, 40, 31, 104, 68, 47, 35, 111,
! 732: 42, 184, 184, 69, 17, 7, 9, 184, 184, 119,
! 733: 125, 131, 137, 143, 149, 154, 159, 165, 171, 177
! 734: } ;
! 735:
! 736: static const flex_int16_t yy_def[91] =
! 737: { 0,
! 738: 80, 80, 81, 81, 82, 82, 79, 83, 79, 79,
! 739: 79, 84, 79, 83, 83, 79, 83, 83, 85, 79,
! 740: 79, 79, 86, 79, 87, 83, 79, 84, 84, 83,
! 741: 83, 79, 79, 83, 83, 83, 85, 79, 86, 79,
! 742: 79, 79, 79, 79, 79, 83, 79, 83, 83, 83,
! 743: 79, 83, 83, 83, 83, 79, 83, 83, 83, 79,
! 744: 83, 83, 83, 79, 79, 88, 89, 90, 79, 88,
! 745: 90, 79, 79, 89, 79, 79, 79, 79, 0, 79,
! 746: 79, 79, 79, 79, 79, 79, 79, 79, 79, 79
! 747: } ;
! 748:
! 749: static const flex_int16_t yy_nxt[212] =
! 750: { 0,
! 751: 79, 9, 10, 79, 9, 11, 12, 13, 14, 24,
! 752: 24, 79, 79, 25, 25, 52, 15, 16, 10, 53,
! 753: 16, 11, 12, 13, 14, 27, 34, 17, 27, 78,
! 754: 28, 77, 15, 32, 27, 35, 32, 27, 28, 28,
! 755: 76, 18, 20, 20, 72, 20, 21, 20, 75, 72,
! 756: 22, 20, 20, 69, 20, 21, 20, 33, 68, 22,
! 757: 38, 38, 38, 32, 67, 66, 32, 67, 28, 74,
! 758: 74, 65, 74, 74, 64, 63, 62, 61, 60, 59,
! 759: 58, 57, 38, 41, 42, 56, 55, 33, 54, 51,
! 760: 50, 41, 49, 48, 47, 46, 36, 31, 30, 43,
! 761:
! 762: 79, 79, 44, 79, 45, 71, 72, 79, 71, 71,
! 763: 71, 71, 71, 72, 79, 71, 71, 71, 71, 8,
! 764: 8, 8, 8, 8, 8, 19, 19, 19, 19, 19,
! 765: 19, 23, 23, 23, 23, 23, 23, 26, 79, 79,
! 766: 79, 79, 26, 29, 29, 79, 29, 29, 29, 37,
! 767: 79, 79, 79, 37, 39, 39, 39, 79, 39, 40,
! 768: 40, 40, 40, 40, 40, 70, 70, 70, 70, 70,
! 769: 70, 73, 73, 73, 73, 79, 73, 71, 71, 71,
! 770: 71, 71, 71, 7, 79, 79, 79, 79, 79, 79,
! 771: 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
! 772:
! 773: 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
! 774: 79
! 775: } ;
! 776:
! 777: static const flex_int16_t yy_chk[212] =
! 778: { 0,
! 779: 0, 1, 1, 0, 1, 1, 1, 1, 1, 5,
! 780: 6, 0, 0, 5, 6, 48, 1, 2, 2, 48,
! 781: 2, 2, 2, 2, 2, 9, 17, 2, 9, 77,
! 782: 9, 76, 2, 16, 27, 17, 16, 27, 16, 27,
! 783: 75, 2, 3, 3, 71, 3, 3, 3, 69, 68,
! 784: 3, 4, 4, 65, 4, 4, 4, 16, 64, 4,
! 785: 22, 22, 22, 32, 63, 62, 32, 63, 32, 67,
! 786: 74, 61, 67, 74, 60, 59, 58, 57, 56, 55,
! 787: 54, 52, 22, 25, 25, 51, 50, 32, 49, 47,
! 788: 46, 42, 36, 35, 33, 31, 18, 15, 14, 25,
! 789:
! 790: 7, 0, 25, 0, 25, 66, 66, 0, 66, 66,
! 791: 66, 66, 70, 70, 0, 70, 70, 70, 70, 80,
! 792: 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
! 793: 81, 82, 82, 82, 82, 82, 82, 83, 0, 0,
! 794: 0, 0, 83, 84, 84, 0, 84, 84, 84, 85,
! 795: 0, 0, 0, 85, 86, 86, 86, 0, 86, 87,
! 796: 87, 87, 87, 87, 87, 88, 88, 88, 88, 88,
! 797: 88, 89, 89, 89, 89, 0, 89, 90, 90, 90,
! 798: 90, 90, 90, 79, 79, 79, 79, 79, 79, 79,
! 799: 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
! 800:
! 801: 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
! 802: 79
! 803: } ;
! 804:
! 805: /* Table of booleans, true if rule could match eol. */
! 806: static const flex_int32_t yy_rule_can_match_eol[27] =
! 807: { 0,
! 808: 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
! 809: 0, 0, 0, 1, 0, 1, 0, };
! 810:
! 811: static const flex_int16_t yy_rule_linenum[26] =
! 812: { 0,
! 813: 65, 66, 67, 68, 70, 72, 73, 74, 75, 77,
! 814: 82, 87, 95, 114, 117, 120, 123, 129, 131, 150,
! 815: 151, 152, 153, 154, 155
! 816: } ;
! 817:
! 818: /* The intent behind this definition is that it'll catch
! 819: * any uses of REJECT which flex missed.
! 820: */
! 821: #define REJECT reject_used_but_not_detected
! 822: #define yymore() yymore_used_but_not_detected
! 823: #define YY_MORE_ADJ 0
! 824: #define YY_RESTORE_YY_MORE_OFFSET
! 825: #line 1 "parser/lexer.l"
! 826: #line 2 "parser/lexer.l"
! 827: /*
! 828: * Copyright (C) 2013-2014 Tobias Brunner
! 829: * HSR Hochschule fuer Technik Rapperswil
! 830: *
! 831: * This program is free software; you can redistribute it and/or modify it
! 832: * under the terms of the GNU General Public License as published by the
! 833: * Free Software Foundation; either version 2 of the License, or (at your
! 834: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
! 835: *
! 836: * This program is distributed in the hope that it will be useful, but
! 837: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 838: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! 839: * for more details.
! 840: */
! 841:
! 842: #include <utils/parser_helper.h>
! 843: #include <parser/conf_parser.h>
! 844:
! 845: #include "parser.h"
! 846:
! 847: bool conf_parser_open_next_file(parser_helper_t *ctx);
! 848:
! 849: static void include_files(parser_helper_t *ctx);
! 850:
! 851: #line 852 "parser/lexer.c"
! 852: /* use start conditions stack */
! 853: /* do not declare unneeded functions */
! 854: #define YY_NO_INPUT 1
! 855: /* do not include unistd.h as it might conflict with our scanner states */
! 856: #define YY_NO_UNISTD_H 1
! 857: /* due to that disable interactive mode, which requires isatty() */
! 858: /* don't use global variables, and interact properly with bison */
! 859: /* maintain the line number */
! 860: /* don't generate a default rule */
! 861: /* prefix function/variable declarations */
! 862: /* don't change the name of the output file otherwise autotools has issues */
! 863: /* type of our extra data */
! 864: /* state used to scan include file patterns */
! 865:
! 866: /* state used to scan quoted strings */
! 867:
! 868: #line 869 "parser/lexer.c"
! 869:
! 870: #define INITIAL 0
! 871: #define inc 1
! 872: #define str 2
! 873:
! 874: #ifndef YY_NO_UNISTD_H
! 875: /* Special case for "unistd.h", since it is non-ANSI. We include it way
! 876: * down here because we want the user's section 1 to have been scanned first.
! 877: * The user has a chance to override it with an option.
! 878: */
! 879: /* %if-c-only */
! 880: #include <unistd.h>
! 881: /* %endif */
! 882: /* %if-c++-only */
! 883: /* %endif */
! 884: #endif
! 885:
! 886: #define YY_EXTRA_TYPE parser_helper_t*
! 887:
! 888: /* %if-c-only Reentrant structure and macros (non-C++). */
! 889: /* %if-reentrant */
! 890:
! 891: /* Holds the entire state of the reentrant scanner. */
! 892: struct yyguts_t
! 893: {
! 894:
! 895: /* User-defined. Not touched by flex. */
! 896: YY_EXTRA_TYPE yyextra_r;
! 897:
! 898: /* The rest are the same as the globals declared in the non-reentrant scanner. */
! 899: FILE *yyin_r, *yyout_r;
! 900: size_t yy_buffer_stack_top; /**< index of top of stack. */
! 901: size_t yy_buffer_stack_max; /**< capacity of stack. */
! 902: YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
! 903: char yy_hold_char;
! 904: int yy_n_chars;
! 905: int yyleng_r;
! 906: char *yy_c_buf_p;
! 907: int yy_init;
! 908: int yy_start;
! 909: int yy_did_buffer_switch_on_eof;
! 910: int yy_start_stack_ptr;
! 911: int yy_start_stack_depth;
! 912: int *yy_start_stack;
! 913: yy_state_type yy_last_accepting_state;
! 914: char* yy_last_accepting_cpos;
! 915:
! 916: int yylineno_r;
! 917: int yy_flex_debug_r;
! 918:
! 919: char *yytext_r;
! 920: int yy_more_flag;
! 921: int yy_more_len;
! 922:
! 923: YYSTYPE * yylval_r;
! 924:
! 925: }; /* end struct yyguts_t */
! 926:
! 927: /* %if-c-only */
! 928:
! 929: static int yy_init_globals ( yyscan_t yyscanner );
! 930:
! 931: /* %endif */
! 932:
! 933: /* %if-reentrant */
! 934:
! 935: /* This must go here because YYSTYPE and YYLTYPE are included
! 936: * from bison output in section 1.*/
! 937: # define yylval yyg->yylval_r
! 938:
! 939: int yylex_init (yyscan_t* scanner);
! 940:
! 941: int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
! 942:
! 943: /* %endif */
! 944:
! 945: /* %endif End reentrant structures and macros. */
! 946:
! 947: /* Accessor methods to globals.
! 948: These are made visible to non-reentrant scanners for convenience. */
! 949:
! 950: int yylex_destroy ( yyscan_t yyscanner );
! 951:
! 952: int yyget_debug ( yyscan_t yyscanner );
! 953:
! 954: void yyset_debug ( int debug_flag , yyscan_t yyscanner );
! 955:
! 956: YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
! 957:
! 958: void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
! 959:
! 960: FILE *yyget_in ( yyscan_t yyscanner );
! 961:
! 962: void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
! 963:
! 964: FILE *yyget_out ( yyscan_t yyscanner );
! 965:
! 966: void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
! 967:
! 968: int yyget_leng ( yyscan_t yyscanner );
! 969:
! 970: char *yyget_text ( yyscan_t yyscanner );
! 971:
! 972: int yyget_lineno ( yyscan_t yyscanner );
! 973:
! 974: void yyset_lineno ( int _line_number , yyscan_t yyscanner );
! 975:
! 976: int yyget_column ( yyscan_t yyscanner );
! 977:
! 978: void yyset_column ( int _column_no , yyscan_t yyscanner );
! 979:
! 980: /* %if-bison-bridge */
! 981:
! 982: YYSTYPE * yyget_lval ( yyscan_t yyscanner );
! 983:
! 984: void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
! 985:
! 986: /* %endif */
! 987:
! 988: /* Macros after this point can all be overridden by user definitions in
! 989: * section 1.
! 990: */
! 991:
! 992: #ifndef YY_SKIP_YYWRAP
! 993: #ifdef __cplusplus
! 994: extern "C" int yywrap ( yyscan_t yyscanner );
! 995: #else
! 996: extern int yywrap ( yyscan_t yyscanner );
! 997: #endif
! 998: #endif
! 999:
! 1000: /* %not-for-header */
! 1001: #ifndef YY_NO_UNPUT
! 1002:
! 1003: static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
! 1004:
! 1005: #endif
! 1006: /* %ok-for-header */
! 1007:
! 1008: /* %endif */
! 1009:
! 1010: #ifndef yytext_ptr
! 1011: static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
! 1012: #endif
! 1013:
! 1014: #ifdef YY_NEED_STRLEN
! 1015: static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
! 1016: #endif
! 1017:
! 1018: #ifndef YY_NO_INPUT
! 1019: /* %if-c-only Standard (non-C++) definition */
! 1020: /* %not-for-header */
! 1021: #ifdef __cplusplus
! 1022: static int yyinput ( yyscan_t yyscanner );
! 1023: #else
! 1024: static int input ( yyscan_t yyscanner );
! 1025: #endif
! 1026: /* %ok-for-header */
! 1027:
! 1028: /* %endif */
! 1029: #endif
! 1030:
! 1031: /* %if-c-only */
! 1032:
! 1033: static void yy_push_state ( int _new_state , yyscan_t yyscanner);
! 1034:
! 1035: static void yy_pop_state ( yyscan_t yyscanner );
! 1036:
! 1037: static int yy_top_state ( yyscan_t yyscanner );
! 1038:
! 1039: /* %endif */
! 1040:
! 1041: /* Amount of stuff to slurp up with each read. */
! 1042: #ifndef YY_READ_BUF_SIZE
! 1043: #ifdef __ia64__
! 1044: /* On IA-64, the buffer size is 16k, not 8k */
! 1045: #define YY_READ_BUF_SIZE 16384
! 1046: #else
! 1047: #define YY_READ_BUF_SIZE 8192
! 1048: #endif /* __ia64__ */
! 1049: #endif
! 1050:
! 1051: /* Copy whatever the last rule matched to the standard output. */
! 1052: #ifndef ECHO
! 1053: /* %if-c-only Standard (non-C++) definition */
! 1054: /* This used to be an fputs(), but since the string might contain NUL's,
! 1055: * we now use fwrite().
! 1056: */
! 1057: #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
! 1058: /* %endif */
! 1059: /* %if-c++-only C++ definition */
! 1060: /* %endif */
! 1061: #endif
! 1062:
! 1063: /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
! 1064: * is returned in "result".
! 1065: */
! 1066: #ifndef YY_INPUT
! 1067: #define YY_INPUT(buf,result,max_size) \
! 1068: /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
! 1069: if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
! 1070: { \
! 1071: int c = '*'; \
! 1072: int n; \
! 1073: for ( n = 0; n < max_size && \
! 1074: (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
! 1075: buf[n] = (char) c; \
! 1076: if ( c == '\n' ) \
! 1077: buf[n++] = (char) c; \
! 1078: if ( c == EOF && ferror( yyin ) ) \
! 1079: YY_FATAL_ERROR( "input in flex scanner failed" ); \
! 1080: result = n; \
! 1081: } \
! 1082: else \
! 1083: { \
! 1084: errno=0; \
! 1085: while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
! 1086: { \
! 1087: if( errno != EINTR) \
! 1088: { \
! 1089: YY_FATAL_ERROR( "input in flex scanner failed" ); \
! 1090: break; \
! 1091: } \
! 1092: errno=0; \
! 1093: clearerr(yyin); \
! 1094: } \
! 1095: }\
! 1096: \
! 1097: /* %if-c++-only C++ definition \ */\
! 1098: /* %endif */
! 1099:
! 1100: #endif
! 1101:
! 1102: /* No semi-colon after return; correct usage is to write "yyterminate();" -
! 1103: * we don't want an extra ';' after the "return" because that will cause
! 1104: * some compilers to complain about unreachable statements.
! 1105: */
! 1106: #ifndef yyterminate
! 1107: #define yyterminate() return YY_NULL
! 1108: #endif
! 1109:
! 1110: /* Number of entries by which start-condition stack grows. */
! 1111: #ifndef YY_START_STACK_INCR
! 1112: #define YY_START_STACK_INCR 25
! 1113: #endif
! 1114:
! 1115: /* Report a fatal error. */
! 1116: #ifndef YY_FATAL_ERROR
! 1117: /* %if-c-only */
! 1118: #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
! 1119: /* %endif */
! 1120: /* %if-c++-only */
! 1121: /* %endif */
! 1122: #endif
! 1123:
! 1124: /* %if-tables-serialization structures and prototypes */
! 1125: /* %not-for-header */
! 1126: /* %ok-for-header */
! 1127:
! 1128: /* %not-for-header */
! 1129: /* %tables-yydmap generated elements */
! 1130: /* %endif */
! 1131: /* end tables serialization structures and prototypes */
! 1132:
! 1133: /* %ok-for-header */
! 1134:
! 1135: /* Default declaration of generated scanner - a define so the user can
! 1136: * easily add parameters.
! 1137: */
! 1138: #ifndef YY_DECL
! 1139: #define YY_DECL_IS_OURS 1
! 1140: /* %if-c-only Standard (non-C++) definition */
! 1141:
! 1142: extern int yylex \
! 1143: (YYSTYPE * yylval_param , yyscan_t yyscanner);
! 1144:
! 1145: #define YY_DECL int yylex \
! 1146: (YYSTYPE * yylval_param , yyscan_t yyscanner)
! 1147: /* %endif */
! 1148: /* %if-c++-only C++ definition */
! 1149: /* %endif */
! 1150: #endif /* !YY_DECL */
! 1151:
! 1152: /* Code executed at the beginning of each rule, after yytext and yyleng
! 1153: * have been set up.
! 1154: */
! 1155: #ifndef YY_USER_ACTION
! 1156: #define YY_USER_ACTION
! 1157: #endif
! 1158:
! 1159: /* Code executed at the end of each rule. */
! 1160: #ifndef YY_BREAK
! 1161: #define YY_BREAK /*LINTED*/break;
! 1162: #endif
! 1163:
! 1164: /* %% [6.0] YY_RULE_SETUP definition goes here */
! 1165: #define YY_RULE_SETUP \
! 1166: if ( yyleng > 0 ) \
! 1167: YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
! 1168: (yytext[yyleng - 1] == '\n'); \
! 1169: YY_USER_ACTION
! 1170:
! 1171: /* %not-for-header */
! 1172: /** The main scanner function which does all the work.
! 1173: */
! 1174: YY_DECL
! 1175: {
! 1176: yy_state_type yy_current_state;
! 1177: char *yy_cp, *yy_bp;
! 1178: int yy_act;
! 1179: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 1180:
! 1181: yylval = yylval_param;
! 1182:
! 1183: if ( !yyg->yy_init )
! 1184: {
! 1185: yyg->yy_init = 1;
! 1186:
! 1187: #ifdef YY_USER_INIT
! 1188: YY_USER_INIT;
! 1189: #endif
! 1190:
! 1191: if ( ! yyg->yy_start )
! 1192: yyg->yy_start = 1; /* first start state */
! 1193:
! 1194: if ( ! yyin )
! 1195: /* %if-c-only */
! 1196: yyin = stdin;
! 1197: /* %endif */
! 1198: /* %if-c++-only */
! 1199: /* %endif */
! 1200:
! 1201: if ( ! yyout )
! 1202: /* %if-c-only */
! 1203: yyout = stdout;
! 1204: /* %endif */
! 1205: /* %if-c++-only */
! 1206: /* %endif */
! 1207:
! 1208: if ( ! YY_CURRENT_BUFFER ) {
! 1209: yyensure_buffer_stack (yyscanner);
! 1210: YY_CURRENT_BUFFER_LVALUE =
! 1211: yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
! 1212: }
! 1213:
! 1214: yy_load_buffer_state( yyscanner );
! 1215: }
! 1216:
! 1217: {
! 1218: /* %% [7.0] user's declarations go here */
! 1219: #line 63 "parser/lexer.l"
! 1220:
! 1221:
! 1222: #line 1223 "parser/lexer.c"
! 1223:
! 1224: while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
! 1225: {
! 1226: /* %% [8.0] yymore()-related code goes here */
! 1227: yy_cp = yyg->yy_c_buf_p;
! 1228:
! 1229: /* Support of yytext. */
! 1230: *yy_cp = yyg->yy_hold_char;
! 1231:
! 1232: /* yy_bp points to the position in yy_ch_buf of the start of
! 1233: * the current run.
! 1234: */
! 1235: yy_bp = yy_cp;
! 1236:
! 1237: /* %% [9.0] code to set up and find next match goes here */
! 1238: yy_current_state = yyg->yy_start;
! 1239: yy_current_state += YY_AT_BOL();
! 1240: yy_match:
! 1241: do
! 1242: {
! 1243: YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
! 1244: if ( yy_accept[yy_current_state] )
! 1245: {
! 1246: yyg->yy_last_accepting_state = yy_current_state;
! 1247: yyg->yy_last_accepting_cpos = yy_cp;
! 1248: }
! 1249: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
! 1250: {
! 1251: yy_current_state = (int) yy_def[yy_current_state];
! 1252: if ( yy_current_state >= 80 )
! 1253: yy_c = yy_meta[yy_c];
! 1254: }
! 1255: yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
! 1256: ++yy_cp;
! 1257: }
! 1258: while ( yy_current_state != 79 );
! 1259: yy_cp = yyg->yy_last_accepting_cpos;
! 1260: yy_current_state = yyg->yy_last_accepting_state;
! 1261:
! 1262: yy_find_action:
! 1263: /* %% [10.0] code to find the action number goes here */
! 1264: yy_act = yy_accept[yy_current_state];
! 1265:
! 1266: YY_DO_BEFORE_ACTION;
! 1267:
! 1268: /* %% [11.0] code for yylineno update goes here */
! 1269:
! 1270: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
! 1271: {
! 1272: int yyl;
! 1273: for ( yyl = 0; yyl < yyleng; ++yyl )
! 1274: if ( yytext[yyl] == '\n' )
! 1275:
! 1276: do{ yylineno++;
! 1277: yycolumn=0;
! 1278: }while(0)
! 1279: ;
! 1280: }
! 1281:
! 1282: do_action: /* This label is used only to access EOF actions. */
! 1283:
! 1284: /* %% [12.0] debug code goes here */
! 1285: if ( yy_flex_debug )
! 1286: {
! 1287: if ( yy_act == 0 )
! 1288: fprintf( stderr, "--scanner backing up\n" );
! 1289: else if ( yy_act < 26 )
! 1290: fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
! 1291: (long)yy_rule_linenum[yy_act], yytext );
! 1292: else if ( yy_act == 26 )
! 1293: fprintf( stderr, "--accepting default rule (\"%s\")\n",
! 1294: yytext );
! 1295: else if ( yy_act == 27 )
! 1296: fprintf( stderr, "--(end of buffer or a NUL)\n" );
! 1297: else
! 1298: fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
! 1299: }
! 1300:
! 1301: switch ( yy_act )
! 1302: { /* beginning of action switch */
! 1303: /* %% [13.0] actions go here */
! 1304: case 0: /* must back up */
! 1305: /* undo the effects of YY_DO_BEFORE_ACTION */
! 1306: *yy_cp = yyg->yy_hold_char;
! 1307: yy_cp = yyg->yy_last_accepting_cpos;
! 1308: yy_current_state = yyg->yy_last_accepting_state;
! 1309: goto yy_find_action;
! 1310:
! 1311: case 1:
! 1312: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
! 1313: yyg->yy_c_buf_p = yy_cp -= 1;
! 1314: YY_DO_BEFORE_ACTION; /* set up yytext again */
! 1315: YY_RULE_SETUP
! 1316: #line 65 "parser/lexer.l"
! 1317: /* eat legacy version declaration */
! 1318: YY_BREAK
! 1319: case 2:
! 1320: YY_RULE_SETUP
! 1321: #line 66 "parser/lexer.l"
! 1322: return SPACES;
! 1323: YY_BREAK
! 1324: case 3:
! 1325: YY_RULE_SETUP
! 1326: #line 67 "parser/lexer.l"
! 1327: /* eat other whitespace */
! 1328: YY_BREAK
! 1329: case 4:
! 1330: YY_RULE_SETUP
! 1331: #line 68 "parser/lexer.l"
! 1332: /* eat comments */
! 1333: YY_BREAK
! 1334: case 5:
! 1335: /* rule 5 can match eol */
! 1336: YY_RULE_SETUP
! 1337: #line 70 "parser/lexer.l"
! 1338: return NEWLINE;
! 1339: YY_BREAK
! 1340: case 6:
! 1341: YY_RULE_SETUP
! 1342: #line 72 "parser/lexer.l"
! 1343: return EQ;
! 1344: YY_BREAK
! 1345: case 7:
! 1346: YY_RULE_SETUP
! 1347: #line 73 "parser/lexer.l"
! 1348: return CONFIG_SETUP;
! 1349: YY_BREAK
! 1350: case 8:
! 1351: YY_RULE_SETUP
! 1352: #line 74 "parser/lexer.l"
! 1353: return CONN;
! 1354: YY_BREAK
! 1355: case 9:
! 1356: YY_RULE_SETUP
! 1357: #line 75 "parser/lexer.l"
! 1358: return CA;
! 1359: YY_BREAK
! 1360: case 10:
! 1361: /* rule 10 can match eol */
! 1362: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
! 1363: YY_LINENO_REWIND_TO(yy_cp - 1);
! 1364: yyg->yy_c_buf_p = yy_cp -= 1;
! 1365: YY_DO_BEFORE_ACTION; /* set up yytext again */
! 1366: YY_RULE_SETUP
! 1367: #line 77 "parser/lexer.l"
! 1368: {
! 1369: yyextra->string_init(yyextra);
! 1370: yy_push_state(inc, yyscanner);
! 1371: }
! 1372: YY_BREAK
! 1373: case 11:
! 1374: YY_RULE_SETUP
! 1375: #line 82 "parser/lexer.l"
! 1376: {
! 1377: yyextra->string_init(yyextra);
! 1378: yy_push_state(str, yyscanner);
! 1379: }
! 1380: YY_BREAK
! 1381: case 12:
! 1382: YY_RULE_SETUP
! 1383: #line 87 "parser/lexer.l"
! 1384: {
! 1385: yylval->s = strdup(yytext);
! 1386: return STRING;
! 1387: }
! 1388: YY_BREAK
! 1389:
! 1390: /* we allow all characters except # and spaces, they can be escaped */
! 1391: case YY_STATE_EOF(inc):
! 1392: #line 94 "parser/lexer.l"
! 1393: case 13:
! 1394: /* rule 13 can match eol */
! 1395: YY_RULE_SETUP
! 1396: #line 95 "parser/lexer.l"
! 1397: {
! 1398: if (*yytext)
! 1399: {
! 1400: switch (yytext[0])
! 1401: {
! 1402: case '\n':
! 1403: /* put the newline back to fix the line numbers */
! 1404: unput('\n');
! 1405: yy_set_bol(0);
! 1406: break;
! 1407: case '#':
! 1408: /* comments are parsed outside of this start condition */
! 1409: unput(yytext[0]);
! 1410: break;
! 1411: }
! 1412: }
! 1413: include_files(yyextra);
! 1414: yy_pop_state(yyscanner);
! 1415: }
! 1416: YY_BREAK
! 1417: case 14:
! 1418: YY_RULE_SETUP
! 1419: #line 114 "parser/lexer.l"
! 1420: { /* string include */
! 1421: yy_push_state(str, yyscanner);
! 1422: }
! 1423: YY_BREAK
! 1424: case 15:
! 1425: YY_RULE_SETUP
! 1426: #line 117 "parser/lexer.l"
! 1427: {
! 1428: yyextra->string_add(yyextra, yytext);
! 1429: }
! 1430: YY_BREAK
! 1431: case 16:
! 1432: YY_RULE_SETUP
! 1433: #line 120 "parser/lexer.l"
! 1434: {
! 1435: yyextra->string_add(yyextra, yytext+1);
! 1436: }
! 1437: YY_BREAK
! 1438: case 17:
! 1439: YY_RULE_SETUP
! 1440: #line 123 "parser/lexer.l"
! 1441: {
! 1442: yyextra->string_add(yyextra, yytext);
! 1443: }
! 1444: YY_BREAK
! 1445:
! 1446:
! 1447: case 18:
! 1448: #line 130 "parser/lexer.l"
! 1449: YY_RULE_SETUP
! 1450: case YY_STATE_EOF(str):
! 1451: #line 130 "parser/lexer.l"
! 1452: case 19:
! 1453: YY_RULE_SETUP
! 1454: #line 131 "parser/lexer.l"
! 1455: {
! 1456: if (!streq(yytext, "\""))
! 1457: {
! 1458: PARSER_DBG1(yyextra, "unterminated string detected");
! 1459: return STRING_ERROR;
! 1460: }
! 1461: if (yy_top_state(yyscanner) == inc)
! 1462: { /* string include */
! 1463: include_files(yyextra);
! 1464: yy_pop_state(yyscanner);
! 1465: yy_pop_state(yyscanner);
! 1466: }
! 1467: else
! 1468: {
! 1469: yy_pop_state(yyscanner);
! 1470: yylval->s = yyextra->string_get(yyextra);
! 1471: return STRING;
! 1472: }
! 1473: }
! 1474: YY_BREAK
! 1475: case 20:
! 1476: YY_RULE_SETUP
! 1477: #line 150 "parser/lexer.l"
! 1478: yyextra->string_add(yyextra, "\n");
! 1479: YY_BREAK
! 1480: case 21:
! 1481: YY_RULE_SETUP
! 1482: #line 151 "parser/lexer.l"
! 1483: yyextra->string_add(yyextra, "\r");
! 1484: YY_BREAK
! 1485: case 22:
! 1486: YY_RULE_SETUP
! 1487: #line 152 "parser/lexer.l"
! 1488: yyextra->string_add(yyextra, "\t");
! 1489: YY_BREAK
! 1490: case 23:
! 1491: /* rule 23 can match eol */
! 1492: YY_RULE_SETUP
! 1493: #line 153 "parser/lexer.l"
! 1494: /* merge lines that end with EOL characters */
! 1495: YY_BREAK
! 1496: case 24:
! 1497: YY_RULE_SETUP
! 1498: #line 154 "parser/lexer.l"
! 1499: yyextra->string_add(yyextra, yytext+1);
! 1500: YY_BREAK
! 1501: case 25:
! 1502: /* rule 25 can match eol */
! 1503: YY_RULE_SETUP
! 1504: #line 155 "parser/lexer.l"
! 1505: {
! 1506: yyextra->string_add(yyextra, yytext);
! 1507: }
! 1508: YY_BREAK
! 1509:
! 1510: case YY_STATE_EOF(INITIAL):
! 1511: #line 160 "parser/lexer.l"
! 1512: {
! 1513: conf_parser_pop_buffer_state(yyscanner);
! 1514: if (!conf_parser_open_next_file(yyextra) && !YY_CURRENT_BUFFER)
! 1515: {
! 1516: yyterminate();
! 1517: }
! 1518: }
! 1519: YY_BREAK
! 1520: case 26:
! 1521: YY_RULE_SETUP
! 1522: #line 168 "parser/lexer.l"
! 1523: YY_FATAL_ERROR( "flex scanner jammed" );
! 1524: YY_BREAK
! 1525: #line 1526 "parser/lexer.c"
! 1526:
! 1527: case YY_END_OF_BUFFER:
! 1528: {
! 1529: /* Amount of text matched not including the EOB char. */
! 1530: int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
! 1531:
! 1532: /* Undo the effects of YY_DO_BEFORE_ACTION. */
! 1533: *yy_cp = yyg->yy_hold_char;
! 1534: YY_RESTORE_YY_MORE_OFFSET
! 1535:
! 1536: if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
! 1537: {
! 1538: /* We're scanning a new file or input source. It's
! 1539: * possible that this happened because the user
! 1540: * just pointed yyin at a new source and called
! 1541: * yylex(). If so, then we have to assure
! 1542: * consistency between YY_CURRENT_BUFFER and our
! 1543: * globals. Here is the right place to do so, because
! 1544: * this is the first action (other than possibly a
! 1545: * back-up) that will match for the new input source.
! 1546: */
! 1547: yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
! 1548: /* %if-c-only */
! 1549: YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
! 1550: /* %endif */
! 1551: /* %if-c++-only */
! 1552: /* %endif */
! 1553: YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
! 1554: }
! 1555:
! 1556: /* Note that here we test for yy_c_buf_p "<=" to the position
! 1557: * of the first EOB in the buffer, since yy_c_buf_p will
! 1558: * already have been incremented past the NUL character
! 1559: * (since all states make transitions on EOB to the
! 1560: * end-of-buffer state). Contrast this with the test
! 1561: * in input().
! 1562: */
! 1563: if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
! 1564: { /* This was really a NUL. */
! 1565: yy_state_type yy_next_state;
! 1566:
! 1567: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
! 1568:
! 1569: yy_current_state = yy_get_previous_state( yyscanner );
! 1570:
! 1571: /* Okay, we're now positioned to make the NUL
! 1572: * transition. We couldn't have
! 1573: * yy_get_previous_state() go ahead and do it
! 1574: * for us because it doesn't know how to deal
! 1575: * with the possibility of jamming (and we don't
! 1576: * want to build jamming into it because then it
! 1577: * will run more slowly).
! 1578: */
! 1579:
! 1580: yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
! 1581:
! 1582: yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
! 1583:
! 1584: if ( yy_next_state )
! 1585: {
! 1586: /* Consume the NUL. */
! 1587: yy_cp = ++yyg->yy_c_buf_p;
! 1588: yy_current_state = yy_next_state;
! 1589: goto yy_match;
! 1590: }
! 1591:
! 1592: else
! 1593: {
! 1594: /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
! 1595: yy_cp = yyg->yy_last_accepting_cpos;
! 1596: yy_current_state = yyg->yy_last_accepting_state;
! 1597: goto yy_find_action;
! 1598: }
! 1599: }
! 1600:
! 1601: else switch ( yy_get_next_buffer( yyscanner ) )
! 1602: {
! 1603: case EOB_ACT_END_OF_FILE:
! 1604: {
! 1605: yyg->yy_did_buffer_switch_on_eof = 0;
! 1606:
! 1607: if ( yywrap( yyscanner ) )
! 1608: {
! 1609: /* Note: because we've taken care in
! 1610: * yy_get_next_buffer() to have set up
! 1611: * yytext, we can now set up
! 1612: * yy_c_buf_p so that if some total
! 1613: * hoser (like flex itself) wants to
! 1614: * call the scanner after we return the
! 1615: * YY_NULL, it'll still work - another
! 1616: * YY_NULL will get returned.
! 1617: */
! 1618: yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
! 1619:
! 1620: yy_act = YY_STATE_EOF(YY_START);
! 1621: goto do_action;
! 1622: }
! 1623:
! 1624: else
! 1625: {
! 1626: if ( ! yyg->yy_did_buffer_switch_on_eof )
! 1627: YY_NEW_FILE;
! 1628: }
! 1629: break;
! 1630: }
! 1631:
! 1632: case EOB_ACT_CONTINUE_SCAN:
! 1633: yyg->yy_c_buf_p =
! 1634: yyg->yytext_ptr + yy_amount_of_matched_text;
! 1635:
! 1636: yy_current_state = yy_get_previous_state( yyscanner );
! 1637:
! 1638: yy_cp = yyg->yy_c_buf_p;
! 1639: yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
! 1640: goto yy_match;
! 1641:
! 1642: case EOB_ACT_LAST_MATCH:
! 1643: yyg->yy_c_buf_p =
! 1644: &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
! 1645:
! 1646: yy_current_state = yy_get_previous_state( yyscanner );
! 1647:
! 1648: yy_cp = yyg->yy_c_buf_p;
! 1649: yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
! 1650: goto yy_find_action;
! 1651: }
! 1652: break;
! 1653: }
! 1654:
! 1655: default:
! 1656: YY_FATAL_ERROR(
! 1657: "fatal flex scanner internal error--no action found" );
! 1658: } /* end of action switch */
! 1659: } /* end of scanning one token */
! 1660: } /* end of user's declarations */
! 1661: } /* end of yylex */
! 1662: /* %ok-for-header */
! 1663:
! 1664: /* %if-c++-only */
! 1665: /* %not-for-header */
! 1666: /* %ok-for-header */
! 1667:
! 1668: /* %endif */
! 1669:
! 1670: /* yy_get_next_buffer - try to read in a new buffer
! 1671: *
! 1672: * Returns a code representing an action:
! 1673: * EOB_ACT_LAST_MATCH -
! 1674: * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
! 1675: * EOB_ACT_END_OF_FILE - end of file
! 1676: */
! 1677: /* %if-c-only */
! 1678: static int yy_get_next_buffer (yyscan_t yyscanner)
! 1679: /* %endif */
! 1680: /* %if-c++-only */
! 1681: /* %endif */
! 1682: {
! 1683: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 1684: char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
! 1685: char *source = yyg->yytext_ptr;
! 1686: int number_to_move, i;
! 1687: int ret_val;
! 1688:
! 1689: if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
! 1690: YY_FATAL_ERROR(
! 1691: "fatal flex scanner internal error--end of buffer missed" );
! 1692:
! 1693: if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
! 1694: { /* Don't try to fill the buffer, so this is an EOF. */
! 1695: if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
! 1696: {
! 1697: /* We matched a single character, the EOB, so
! 1698: * treat this as a final EOF.
! 1699: */
! 1700: return EOB_ACT_END_OF_FILE;
! 1701: }
! 1702:
! 1703: else
! 1704: {
! 1705: /* We matched some text prior to the EOB, first
! 1706: * process it.
! 1707: */
! 1708: return EOB_ACT_LAST_MATCH;
! 1709: }
! 1710: }
! 1711:
! 1712: /* Try to read more data. */
! 1713:
! 1714: /* First move last chars to start of buffer. */
! 1715: number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
! 1716:
! 1717: for ( i = 0; i < number_to_move; ++i )
! 1718: *(dest++) = *(source++);
! 1719:
! 1720: if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
! 1721: /* don't do the read, it's not guaranteed to return an EOF,
! 1722: * just force an EOF
! 1723: */
! 1724: YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
! 1725:
! 1726: else
! 1727: {
! 1728: int num_to_read =
! 1729: YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
! 1730:
! 1731: while ( num_to_read <= 0 )
! 1732: { /* Not enough room in the buffer - grow it. */
! 1733:
! 1734: /* just a shorter name for the current buffer */
! 1735: YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
! 1736:
! 1737: int yy_c_buf_p_offset =
! 1738: (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
! 1739:
! 1740: if ( b->yy_is_our_buffer )
! 1741: {
! 1742: int new_size = b->yy_buf_size * 2;
! 1743:
! 1744: if ( new_size <= 0 )
! 1745: b->yy_buf_size += b->yy_buf_size / 8;
! 1746: else
! 1747: b->yy_buf_size *= 2;
! 1748:
! 1749: b->yy_ch_buf = (char *)
! 1750: /* Include room in for 2 EOB chars. */
! 1751: yyrealloc( (void *) b->yy_ch_buf,
! 1752: (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
! 1753: }
! 1754: else
! 1755: /* Can't grow it, we don't own it. */
! 1756: b->yy_ch_buf = NULL;
! 1757:
! 1758: if ( ! b->yy_ch_buf )
! 1759: YY_FATAL_ERROR(
! 1760: "fatal error - scanner input buffer overflow" );
! 1761:
! 1762: yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
! 1763:
! 1764: num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
! 1765: number_to_move - 1;
! 1766:
! 1767: }
! 1768:
! 1769: if ( num_to_read > YY_READ_BUF_SIZE )
! 1770: num_to_read = YY_READ_BUF_SIZE;
! 1771:
! 1772: /* Read in more data. */
! 1773: YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
! 1774: yyg->yy_n_chars, num_to_read );
! 1775:
! 1776: YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
! 1777: }
! 1778:
! 1779: if ( yyg->yy_n_chars == 0 )
! 1780: {
! 1781: if ( number_to_move == YY_MORE_ADJ )
! 1782: {
! 1783: ret_val = EOB_ACT_END_OF_FILE;
! 1784: yyrestart( yyin , yyscanner);
! 1785: }
! 1786:
! 1787: else
! 1788: {
! 1789: ret_val = EOB_ACT_LAST_MATCH;
! 1790: YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
! 1791: YY_BUFFER_EOF_PENDING;
! 1792: }
! 1793: }
! 1794:
! 1795: else
! 1796: ret_val = EOB_ACT_CONTINUE_SCAN;
! 1797:
! 1798: if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
! 1799: /* Extend the array by 50%, plus the number we really need. */
! 1800: int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
! 1801: YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
! 1802: (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
! 1803: if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
! 1804: YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
! 1805: /* "- 2" to take care of EOB's */
! 1806: YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
! 1807: }
! 1808:
! 1809: yyg->yy_n_chars += number_to_move;
! 1810: YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
! 1811: YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
! 1812:
! 1813: yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
! 1814:
! 1815: return ret_val;
! 1816: }
! 1817:
! 1818: /* yy_get_previous_state - get the state just before the EOB char was reached */
! 1819:
! 1820: /* %if-c-only */
! 1821: /* %not-for-header */
! 1822: static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
! 1823: /* %endif */
! 1824: /* %if-c++-only */
! 1825: /* %endif */
! 1826: {
! 1827: yy_state_type yy_current_state;
! 1828: char *yy_cp;
! 1829: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 1830:
! 1831: /* %% [15.0] code to get the start state into yy_current_state goes here */
! 1832: yy_current_state = yyg->yy_start;
! 1833: yy_current_state += YY_AT_BOL();
! 1834:
! 1835: for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
! 1836: {
! 1837: /* %% [16.0] code to find the next state goes here */
! 1838: YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
! 1839: if ( yy_accept[yy_current_state] )
! 1840: {
! 1841: yyg->yy_last_accepting_state = yy_current_state;
! 1842: yyg->yy_last_accepting_cpos = yy_cp;
! 1843: }
! 1844: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
! 1845: {
! 1846: yy_current_state = (int) yy_def[yy_current_state];
! 1847: if ( yy_current_state >= 80 )
! 1848: yy_c = yy_meta[yy_c];
! 1849: }
! 1850: yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
! 1851: }
! 1852:
! 1853: return yy_current_state;
! 1854: }
! 1855:
! 1856: /* yy_try_NUL_trans - try to make a transition on the NUL character
! 1857: *
! 1858: * synopsis
! 1859: * next_state = yy_try_NUL_trans( current_state );
! 1860: */
! 1861: /* %if-c-only */
! 1862: static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
! 1863: /* %endif */
! 1864: /* %if-c++-only */
! 1865: /* %endif */
! 1866: {
! 1867: int yy_is_jam;
! 1868: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
! 1869: /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
! 1870: char *yy_cp = yyg->yy_c_buf_p;
! 1871:
! 1872: YY_CHAR yy_c = 1;
! 1873: if ( yy_accept[yy_current_state] )
! 1874: {
! 1875: yyg->yy_last_accepting_state = yy_current_state;
! 1876: yyg->yy_last_accepting_cpos = yy_cp;
! 1877: }
! 1878: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
! 1879: {
! 1880: yy_current_state = (int) yy_def[yy_current_state];
! 1881: if ( yy_current_state >= 80 )
! 1882: yy_c = yy_meta[yy_c];
! 1883: }
! 1884: yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
! 1885: yy_is_jam = (yy_current_state == 79);
! 1886:
! 1887: (void)yyg;
! 1888: return yy_is_jam ? 0 : yy_current_state;
! 1889: }
! 1890:
! 1891: #ifndef YY_NO_UNPUT
! 1892: /* %if-c-only */
! 1893:
! 1894: static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
! 1895: /* %endif */
! 1896: /* %if-c++-only */
! 1897: /* %endif */
! 1898: {
! 1899: char *yy_cp;
! 1900: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 1901:
! 1902: yy_cp = yyg->yy_c_buf_p;
! 1903:
! 1904: /* undo effects of setting up yytext */
! 1905: *yy_cp = yyg->yy_hold_char;
! 1906:
! 1907: if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
! 1908: { /* need to shift things up to make room */
! 1909: /* +2 for EOB chars. */
! 1910: int number_to_move = yyg->yy_n_chars + 2;
! 1911: char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
! 1912: YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
! 1913: char *source =
! 1914: &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
! 1915:
! 1916: while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
! 1917: *--dest = *--source;
! 1918:
! 1919: yy_cp += (int) (dest - source);
! 1920: yy_bp += (int) (dest - source);
! 1921: YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
! 1922: yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
! 1923:
! 1924: if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
! 1925: YY_FATAL_ERROR( "flex scanner push-back overflow" );
! 1926: }
! 1927:
! 1928: *--yy_cp = (char) c;
! 1929:
! 1930: /* %% [18.0] update yylineno here */
! 1931:
! 1932: if ( c == '\n' ){
! 1933: --yylineno;
! 1934: }
! 1935:
! 1936: yyg->yytext_ptr = yy_bp;
! 1937: yyg->yy_hold_char = *yy_cp;
! 1938: yyg->yy_c_buf_p = yy_cp;
! 1939: }
! 1940: /* %if-c-only */
! 1941:
! 1942: /* %endif */
! 1943: #endif
! 1944:
! 1945: /* %if-c-only */
! 1946: #ifndef YY_NO_INPUT
! 1947: #ifdef __cplusplus
! 1948: static int yyinput (yyscan_t yyscanner)
! 1949: #else
! 1950: static int input (yyscan_t yyscanner)
! 1951: #endif
! 1952:
! 1953: /* %endif */
! 1954: /* %if-c++-only */
! 1955: /* %endif */
! 1956: {
! 1957: int c;
! 1958: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 1959:
! 1960: *yyg->yy_c_buf_p = yyg->yy_hold_char;
! 1961:
! 1962: if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
! 1963: {
! 1964: /* yy_c_buf_p now points to the character we want to return.
! 1965: * If this occurs *before* the EOB characters, then it's a
! 1966: * valid NUL; if not, then we've hit the end of the buffer.
! 1967: */
! 1968: if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
! 1969: /* This was really a NUL. */
! 1970: *yyg->yy_c_buf_p = '\0';
! 1971:
! 1972: else
! 1973: { /* need more input */
! 1974: int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
! 1975: ++yyg->yy_c_buf_p;
! 1976:
! 1977: switch ( yy_get_next_buffer( yyscanner ) )
! 1978: {
! 1979: case EOB_ACT_LAST_MATCH:
! 1980: /* This happens because yy_g_n_b()
! 1981: * sees that we've accumulated a
! 1982: * token and flags that we need to
! 1983: * try matching the token before
! 1984: * proceeding. But for input(),
! 1985: * there's no matching to consider.
! 1986: * So convert the EOB_ACT_LAST_MATCH
! 1987: * to EOB_ACT_END_OF_FILE.
! 1988: */
! 1989:
! 1990: /* Reset buffer status. */
! 1991: yyrestart( yyin , yyscanner);
! 1992:
! 1993: /*FALLTHROUGH*/
! 1994:
! 1995: case EOB_ACT_END_OF_FILE:
! 1996: {
! 1997: if ( yywrap( yyscanner ) )
! 1998: return 0;
! 1999:
! 2000: if ( ! yyg->yy_did_buffer_switch_on_eof )
! 2001: YY_NEW_FILE;
! 2002: #ifdef __cplusplus
! 2003: return yyinput(yyscanner);
! 2004: #else
! 2005: return input(yyscanner);
! 2006: #endif
! 2007: }
! 2008:
! 2009: case EOB_ACT_CONTINUE_SCAN:
! 2010: yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
! 2011: break;
! 2012: }
! 2013: }
! 2014: }
! 2015:
! 2016: c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
! 2017: *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
! 2018: yyg->yy_hold_char = *++yyg->yy_c_buf_p;
! 2019:
! 2020: /* %% [19.0] update BOL and yylineno */
! 2021: YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
! 2022: if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
! 2023:
! 2024: do{ yylineno++;
! 2025: yycolumn=0;
! 2026: }while(0)
! 2027: ;
! 2028:
! 2029: return c;
! 2030: }
! 2031: /* %if-c-only */
! 2032: #endif /* ifndef YY_NO_INPUT */
! 2033: /* %endif */
! 2034:
! 2035: /** Immediately switch to a different input stream.
! 2036: * @param input_file A readable stream.
! 2037: * @param yyscanner The scanner object.
! 2038: * @note This function does not reset the start condition to @c INITIAL .
! 2039: */
! 2040: /* %if-c-only */
! 2041: void yyrestart (FILE * input_file , yyscan_t yyscanner)
! 2042: /* %endif */
! 2043: /* %if-c++-only */
! 2044: /* %endif */
! 2045: {
! 2046: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2047:
! 2048: if ( ! YY_CURRENT_BUFFER ){
! 2049: yyensure_buffer_stack (yyscanner);
! 2050: YY_CURRENT_BUFFER_LVALUE =
! 2051: yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
! 2052: }
! 2053:
! 2054: yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
! 2055: yy_load_buffer_state( yyscanner );
! 2056: }
! 2057:
! 2058: /* %if-c++-only */
! 2059: /* %endif */
! 2060:
! 2061: /** Switch to a different input buffer.
! 2062: * @param new_buffer The new input buffer.
! 2063: * @param yyscanner The scanner object.
! 2064: */
! 2065: /* %if-c-only */
! 2066: void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
! 2067: /* %endif */
! 2068: /* %if-c++-only */
! 2069: /* %endif */
! 2070: {
! 2071: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2072:
! 2073: /* TODO. We should be able to replace this entire function body
! 2074: * with
! 2075: * yypop_buffer_state();
! 2076: * yypush_buffer_state(new_buffer);
! 2077: */
! 2078: yyensure_buffer_stack (yyscanner);
! 2079: if ( YY_CURRENT_BUFFER == new_buffer )
! 2080: return;
! 2081:
! 2082: if ( YY_CURRENT_BUFFER )
! 2083: {
! 2084: /* Flush out information for old buffer. */
! 2085: *yyg->yy_c_buf_p = yyg->yy_hold_char;
! 2086: YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
! 2087: YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
! 2088: }
! 2089:
! 2090: YY_CURRENT_BUFFER_LVALUE = new_buffer;
! 2091: yy_load_buffer_state( yyscanner );
! 2092:
! 2093: /* We don't actually know whether we did this switch during
! 2094: * EOF (yywrap()) processing, but the only time this flag
! 2095: * is looked at is after yywrap() is called, so it's safe
! 2096: * to go ahead and always set it.
! 2097: */
! 2098: yyg->yy_did_buffer_switch_on_eof = 1;
! 2099: }
! 2100:
! 2101: /* %if-c-only */
! 2102: static void yy_load_buffer_state (yyscan_t yyscanner)
! 2103: /* %endif */
! 2104: /* %if-c++-only */
! 2105: /* %endif */
! 2106: {
! 2107: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2108: yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
! 2109: yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
! 2110: /* %if-c-only */
! 2111: yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
! 2112: /* %endif */
! 2113: /* %if-c++-only */
! 2114: /* %endif */
! 2115: yyg->yy_hold_char = *yyg->yy_c_buf_p;
! 2116: }
! 2117:
! 2118: /** Allocate and initialize an input buffer state.
! 2119: * @param file A readable stream.
! 2120: * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
! 2121: * @param yyscanner The scanner object.
! 2122: * @return the allocated buffer state.
! 2123: */
! 2124: /* %if-c-only */
! 2125: YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
! 2126: /* %endif */
! 2127: /* %if-c++-only */
! 2128: /* %endif */
! 2129: {
! 2130: YY_BUFFER_STATE b;
! 2131:
! 2132: b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
! 2133: if ( ! b )
! 2134: YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
! 2135:
! 2136: b->yy_buf_size = size;
! 2137:
! 2138: /* yy_ch_buf has to be 2 characters longer than the size given because
! 2139: * we need to put in 2 end-of-buffer characters.
! 2140: */
! 2141: b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
! 2142: if ( ! b->yy_ch_buf )
! 2143: YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
! 2144:
! 2145: b->yy_is_our_buffer = 1;
! 2146:
! 2147: yy_init_buffer( b, file , yyscanner);
! 2148:
! 2149: return b;
! 2150: }
! 2151:
! 2152: /* %if-c++-only */
! 2153: /* %endif */
! 2154:
! 2155: /** Destroy the buffer.
! 2156: * @param b a buffer created with yy_create_buffer()
! 2157: * @param yyscanner The scanner object.
! 2158: */
! 2159: /* %if-c-only */
! 2160: void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
! 2161: /* %endif */
! 2162: /* %if-c++-only */
! 2163: /* %endif */
! 2164: {
! 2165: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2166:
! 2167: if ( ! b )
! 2168: return;
! 2169:
! 2170: if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
! 2171: YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
! 2172:
! 2173: if ( b->yy_is_our_buffer )
! 2174: yyfree( (void *) b->yy_ch_buf , yyscanner );
! 2175:
! 2176: yyfree( (void *) b , yyscanner );
! 2177: }
! 2178:
! 2179: /* Initializes or reinitializes a buffer.
! 2180: * This function is sometimes called more than once on the same buffer,
! 2181: * such as during a yyrestart() or at EOF.
! 2182: */
! 2183: /* %if-c-only */
! 2184: static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
! 2185: /* %endif */
! 2186: /* %if-c++-only */
! 2187: /* %endif */
! 2188:
! 2189: {
! 2190: int oerrno = errno;
! 2191: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2192:
! 2193: yy_flush_buffer( b , yyscanner);
! 2194:
! 2195: /* %if-c-only */
! 2196: b->yy_input_file = file;
! 2197: /* %endif */
! 2198: /* %if-c++-only */
! 2199: /* %endif */
! 2200: b->yy_fill_buffer = 1;
! 2201:
! 2202: /* If b is the current buffer, then yy_init_buffer was _probably_
! 2203: * called from yyrestart() or through yy_get_next_buffer.
! 2204: * In that case, we don't want to reset the lineno or column.
! 2205: */
! 2206: if (b != YY_CURRENT_BUFFER){
! 2207: b->yy_bs_lineno = 1;
! 2208: b->yy_bs_column = 0;
! 2209: }
! 2210:
! 2211: /* %if-c-only */
! 2212:
! 2213: b->yy_is_interactive = 0;
! 2214:
! 2215: /* %endif */
! 2216: /* %if-c++-only */
! 2217: /* %endif */
! 2218: errno = oerrno;
! 2219: }
! 2220:
! 2221: /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
! 2222: * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
! 2223: * @param yyscanner The scanner object.
! 2224: */
! 2225: /* %if-c-only */
! 2226: void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
! 2227: /* %endif */
! 2228: /* %if-c++-only */
! 2229: /* %endif */
! 2230: {
! 2231: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2232: if ( ! b )
! 2233: return;
! 2234:
! 2235: b->yy_n_chars = 0;
! 2236:
! 2237: /* We always need two end-of-buffer characters. The first causes
! 2238: * a transition to the end-of-buffer state. The second causes
! 2239: * a jam in that state.
! 2240: */
! 2241: b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
! 2242: b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
! 2243:
! 2244: b->yy_buf_pos = &b->yy_ch_buf[0];
! 2245:
! 2246: b->yy_at_bol = 1;
! 2247: b->yy_buffer_status = YY_BUFFER_NEW;
! 2248:
! 2249: if ( b == YY_CURRENT_BUFFER )
! 2250: yy_load_buffer_state( yyscanner );
! 2251: }
! 2252:
! 2253: /* %if-c-or-c++ */
! 2254: /** Pushes the new state onto the stack. The new state becomes
! 2255: * the current state. This function will allocate the stack
! 2256: * if necessary.
! 2257: * @param new_buffer The new state.
! 2258: * @param yyscanner The scanner object.
! 2259: */
! 2260: /* %if-c-only */
! 2261: void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
! 2262: /* %endif */
! 2263: /* %if-c++-only */
! 2264: /* %endif */
! 2265: {
! 2266: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2267: if (new_buffer == NULL)
! 2268: return;
! 2269:
! 2270: yyensure_buffer_stack(yyscanner);
! 2271:
! 2272: /* This block is copied from yy_switch_to_buffer. */
! 2273: if ( YY_CURRENT_BUFFER )
! 2274: {
! 2275: /* Flush out information for old buffer. */
! 2276: *yyg->yy_c_buf_p = yyg->yy_hold_char;
! 2277: YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
! 2278: YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
! 2279: }
! 2280:
! 2281: /* Only push if top exists. Otherwise, replace top. */
! 2282: if (YY_CURRENT_BUFFER)
! 2283: yyg->yy_buffer_stack_top++;
! 2284: YY_CURRENT_BUFFER_LVALUE = new_buffer;
! 2285:
! 2286: /* copied from yy_switch_to_buffer. */
! 2287: yy_load_buffer_state( yyscanner );
! 2288: yyg->yy_did_buffer_switch_on_eof = 1;
! 2289: }
! 2290: /* %endif */
! 2291:
! 2292: /* %if-c-or-c++ */
! 2293: /** Removes and deletes the top of the stack, if present.
! 2294: * The next element becomes the new top.
! 2295: * @param yyscanner The scanner object.
! 2296: */
! 2297: /* %if-c-only */
! 2298: void yypop_buffer_state (yyscan_t yyscanner)
! 2299: /* %endif */
! 2300: /* %if-c++-only */
! 2301: /* %endif */
! 2302: {
! 2303: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2304: if (!YY_CURRENT_BUFFER)
! 2305: return;
! 2306:
! 2307: yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
! 2308: YY_CURRENT_BUFFER_LVALUE = NULL;
! 2309: if (yyg->yy_buffer_stack_top > 0)
! 2310: --yyg->yy_buffer_stack_top;
! 2311:
! 2312: if (YY_CURRENT_BUFFER) {
! 2313: yy_load_buffer_state( yyscanner );
! 2314: yyg->yy_did_buffer_switch_on_eof = 1;
! 2315: }
! 2316: }
! 2317: /* %endif */
! 2318:
! 2319: /* %if-c-or-c++ */
! 2320: /* Allocates the stack if it does not exist.
! 2321: * Guarantees space for at least one push.
! 2322: */
! 2323: /* %if-c-only */
! 2324: static void yyensure_buffer_stack (yyscan_t yyscanner)
! 2325: /* %endif */
! 2326: /* %if-c++-only */
! 2327: /* %endif */
! 2328: {
! 2329: yy_size_t num_to_alloc;
! 2330: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2331:
! 2332: if (!yyg->yy_buffer_stack) {
! 2333:
! 2334: /* First allocation is just for 2 elements, since we don't know if this
! 2335: * scanner will even need a stack. We use 2 instead of 1 to avoid an
! 2336: * immediate realloc on the next call.
! 2337: */
! 2338: num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
! 2339: yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
! 2340: (num_to_alloc * sizeof(struct yy_buffer_state*)
! 2341: , yyscanner);
! 2342: if ( ! yyg->yy_buffer_stack )
! 2343: YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
! 2344:
! 2345: memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
! 2346:
! 2347: yyg->yy_buffer_stack_max = num_to_alloc;
! 2348: yyg->yy_buffer_stack_top = 0;
! 2349: return;
! 2350: }
! 2351:
! 2352: if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
! 2353:
! 2354: /* Increase the buffer to prepare for a possible push. */
! 2355: yy_size_t grow_size = 8 /* arbitrary grow size */;
! 2356:
! 2357: num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
! 2358: yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
! 2359: (yyg->yy_buffer_stack,
! 2360: num_to_alloc * sizeof(struct yy_buffer_state*)
! 2361: , yyscanner);
! 2362: if ( ! yyg->yy_buffer_stack )
! 2363: YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
! 2364:
! 2365: /* zero only the new slots.*/
! 2366: memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
! 2367: yyg->yy_buffer_stack_max = num_to_alloc;
! 2368: }
! 2369: }
! 2370: /* %endif */
! 2371:
! 2372: /* %if-c-only */
! 2373: /** Setup the input buffer state to scan directly from a user-specified character buffer.
! 2374: * @param base the character buffer
! 2375: * @param size the size in bytes of the character buffer
! 2376: * @param yyscanner The scanner object.
! 2377: * @return the newly allocated buffer state object.
! 2378: */
! 2379: YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
! 2380: {
! 2381: YY_BUFFER_STATE b;
! 2382:
! 2383: if ( size < 2 ||
! 2384: base[size-2] != YY_END_OF_BUFFER_CHAR ||
! 2385: base[size-1] != YY_END_OF_BUFFER_CHAR )
! 2386: /* They forgot to leave room for the EOB's. */
! 2387: return NULL;
! 2388:
! 2389: b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
! 2390: if ( ! b )
! 2391: YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
! 2392:
! 2393: b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
! 2394: b->yy_buf_pos = b->yy_ch_buf = base;
! 2395: b->yy_is_our_buffer = 0;
! 2396: b->yy_input_file = NULL;
! 2397: b->yy_n_chars = b->yy_buf_size;
! 2398: b->yy_is_interactive = 0;
! 2399: b->yy_at_bol = 1;
! 2400: b->yy_fill_buffer = 0;
! 2401: b->yy_buffer_status = YY_BUFFER_NEW;
! 2402:
! 2403: yy_switch_to_buffer( b , yyscanner );
! 2404:
! 2405: return b;
! 2406: }
! 2407: /* %endif */
! 2408:
! 2409: /* %if-c-only */
! 2410: /** Setup the input buffer state to scan a string. The next call to yylex() will
! 2411: * scan from a @e copy of @a str.
! 2412: * @param yystr a NUL-terminated string to scan
! 2413: * @param yyscanner The scanner object.
! 2414: * @return the newly allocated buffer state object.
! 2415: * @note If you want to scan bytes that may contain NUL values, then use
! 2416: * yy_scan_bytes() instead.
! 2417: */
! 2418: YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
! 2419: {
! 2420:
! 2421: return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
! 2422: }
! 2423: /* %endif */
! 2424:
! 2425: /* %if-c-only */
! 2426: /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
! 2427: * scan from a @e copy of @a bytes.
! 2428: * @param yybytes the byte buffer to scan
! 2429: * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
! 2430: * @param yyscanner The scanner object.
! 2431: * @return the newly allocated buffer state object.
! 2432: */
! 2433: YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
! 2434: {
! 2435: YY_BUFFER_STATE b;
! 2436: char *buf;
! 2437: yy_size_t n;
! 2438: int i;
! 2439:
! 2440: /* Get memory for full buffer, including space for trailing EOB's. */
! 2441: n = (yy_size_t) (_yybytes_len + 2);
! 2442: buf = (char *) yyalloc( n , yyscanner );
! 2443: if ( ! buf )
! 2444: YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
! 2445:
! 2446: for ( i = 0; i < _yybytes_len; ++i )
! 2447: buf[i] = yybytes[i];
! 2448:
! 2449: buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
! 2450:
! 2451: b = yy_scan_buffer( buf, n , yyscanner);
! 2452: if ( ! b )
! 2453: YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
! 2454:
! 2455: /* It's okay to grow etc. this buffer, and we should throw it
! 2456: * away when we're done.
! 2457: */
! 2458: b->yy_is_our_buffer = 1;
! 2459:
! 2460: return b;
! 2461: }
! 2462: /* %endif */
! 2463:
! 2464: /* %if-c-only */
! 2465: static void yy_push_state (int _new_state , yyscan_t yyscanner)
! 2466: /* %endif */
! 2467: /* %if-c++-only */
! 2468: /* %endif */
! 2469: {
! 2470: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2471: if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
! 2472: {
! 2473: yy_size_t new_size;
! 2474:
! 2475: yyg->yy_start_stack_depth += YY_START_STACK_INCR;
! 2476: new_size = (yy_size_t) yyg->yy_start_stack_depth * sizeof( int );
! 2477:
! 2478: if ( ! yyg->yy_start_stack )
! 2479: yyg->yy_start_stack = (int *) yyalloc( new_size , yyscanner );
! 2480:
! 2481: else
! 2482: yyg->yy_start_stack = (int *) yyrealloc(
! 2483: (void *) yyg->yy_start_stack, new_size , yyscanner );
! 2484:
! 2485: if ( ! yyg->yy_start_stack )
! 2486: YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
! 2487: }
! 2488:
! 2489: yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
! 2490:
! 2491: BEGIN(_new_state);
! 2492: }
! 2493:
! 2494: /* %if-c-only */
! 2495: static void yy_pop_state (yyscan_t yyscanner)
! 2496: /* %endif */
! 2497: /* %if-c++-only */
! 2498: /* %endif */
! 2499: {
! 2500: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2501: if ( --yyg->yy_start_stack_ptr < 0 )
! 2502: YY_FATAL_ERROR( "start-condition stack underflow" );
! 2503:
! 2504: BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
! 2505: }
! 2506:
! 2507: /* %if-c-only */
! 2508: static int yy_top_state (yyscan_t yyscanner)
! 2509: /* %endif */
! 2510: /* %if-c++-only */
! 2511: /* %endif */
! 2512: {
! 2513: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2514: return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
! 2515: }
! 2516:
! 2517: #ifndef YY_EXIT_FAILURE
! 2518: #define YY_EXIT_FAILURE 2
! 2519: #endif
! 2520:
! 2521: /* %if-c-only */
! 2522: static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
! 2523: {
! 2524: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2525: (void)yyg;
! 2526: fprintf( stderr, "%s\n", msg );
! 2527: exit( YY_EXIT_FAILURE );
! 2528: }
! 2529: /* %endif */
! 2530: /* %if-c++-only */
! 2531: /* %endif */
! 2532:
! 2533: /* Redefine yyless() so it works in section 3 code. */
! 2534:
! 2535: #undef yyless
! 2536: #define yyless(n) \
! 2537: do \
! 2538: { \
! 2539: /* Undo effects of setting up yytext. */ \
! 2540: int yyless_macro_arg = (n); \
! 2541: YY_LESS_LINENO(yyless_macro_arg);\
! 2542: yytext[yyleng] = yyg->yy_hold_char; \
! 2543: yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
! 2544: yyg->yy_hold_char = *yyg->yy_c_buf_p; \
! 2545: *yyg->yy_c_buf_p = '\0'; \
! 2546: yyleng = yyless_macro_arg; \
! 2547: } \
! 2548: while ( 0 )
! 2549:
! 2550: /* Accessor methods (get/set functions) to struct members. */
! 2551:
! 2552: /* %if-c-only */
! 2553: /* %if-reentrant */
! 2554:
! 2555: /** Get the user-defined data for this scanner.
! 2556: * @param yyscanner The scanner object.
! 2557: */
! 2558: YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
! 2559: {
! 2560: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2561: return yyextra;
! 2562: }
! 2563:
! 2564: /* %endif */
! 2565:
! 2566: /** Get the current line number.
! 2567: * @param yyscanner The scanner object.
! 2568: */
! 2569: int yyget_lineno (yyscan_t yyscanner)
! 2570: {
! 2571: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2572:
! 2573: if (! YY_CURRENT_BUFFER)
! 2574: return 0;
! 2575:
! 2576: return yylineno;
! 2577: }
! 2578:
! 2579: /** Get the current column number.
! 2580: * @param yyscanner The scanner object.
! 2581: */
! 2582: int yyget_column (yyscan_t yyscanner)
! 2583: {
! 2584: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2585:
! 2586: if (! YY_CURRENT_BUFFER)
! 2587: return 0;
! 2588:
! 2589: return yycolumn;
! 2590: }
! 2591:
! 2592: /** Get the input stream.
! 2593: * @param yyscanner The scanner object.
! 2594: */
! 2595: FILE *yyget_in (yyscan_t yyscanner)
! 2596: {
! 2597: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2598: return yyin;
! 2599: }
! 2600:
! 2601: /** Get the output stream.
! 2602: * @param yyscanner The scanner object.
! 2603: */
! 2604: FILE *yyget_out (yyscan_t yyscanner)
! 2605: {
! 2606: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2607: return yyout;
! 2608: }
! 2609:
! 2610: /** Get the length of the current token.
! 2611: * @param yyscanner The scanner object.
! 2612: */
! 2613: int yyget_leng (yyscan_t yyscanner)
! 2614: {
! 2615: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2616: return yyleng;
! 2617: }
! 2618:
! 2619: /** Get the current token.
! 2620: * @param yyscanner The scanner object.
! 2621: */
! 2622:
! 2623: char *yyget_text (yyscan_t yyscanner)
! 2624: {
! 2625: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2626: return yytext;
! 2627: }
! 2628:
! 2629: /* %if-reentrant */
! 2630:
! 2631: /** Set the user-defined data. This data is never touched by the scanner.
! 2632: * @param user_defined The data to be associated with this scanner.
! 2633: * @param yyscanner The scanner object.
! 2634: */
! 2635: void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
! 2636: {
! 2637: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2638: yyextra = user_defined ;
! 2639: }
! 2640:
! 2641: /* %endif */
! 2642:
! 2643: /** Set the current line number.
! 2644: * @param _line_number line number
! 2645: * @param yyscanner The scanner object.
! 2646: */
! 2647: void yyset_lineno (int _line_number , yyscan_t yyscanner)
! 2648: {
! 2649: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2650:
! 2651: /* lineno is only valid if an input buffer exists. */
! 2652: if (! YY_CURRENT_BUFFER )
! 2653: YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
! 2654:
! 2655: yylineno = _line_number;
! 2656: }
! 2657:
! 2658: /** Set the current column.
! 2659: * @param _column_no column number
! 2660: * @param yyscanner The scanner object.
! 2661: */
! 2662: void yyset_column (int _column_no , yyscan_t yyscanner)
! 2663: {
! 2664: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2665:
! 2666: /* column is only valid if an input buffer exists. */
! 2667: if (! YY_CURRENT_BUFFER )
! 2668: YY_FATAL_ERROR( "yyset_column called with no buffer" );
! 2669:
! 2670: yycolumn = _column_no;
! 2671: }
! 2672:
! 2673: /** Set the input stream. This does not discard the current
! 2674: * input buffer.
! 2675: * @param _in_str A readable stream.
! 2676: * @param yyscanner The scanner object.
! 2677: * @see yy_switch_to_buffer
! 2678: */
! 2679: void yyset_in (FILE * _in_str , yyscan_t yyscanner)
! 2680: {
! 2681: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2682: yyin = _in_str ;
! 2683: }
! 2684:
! 2685: void yyset_out (FILE * _out_str , yyscan_t yyscanner)
! 2686: {
! 2687: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2688: yyout = _out_str ;
! 2689: }
! 2690:
! 2691: int yyget_debug (yyscan_t yyscanner)
! 2692: {
! 2693: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2694: return yy_flex_debug;
! 2695: }
! 2696:
! 2697: void yyset_debug (int _bdebug , yyscan_t yyscanner)
! 2698: {
! 2699: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2700: yy_flex_debug = _bdebug ;
! 2701: }
! 2702:
! 2703: /* %endif */
! 2704:
! 2705: /* %if-reentrant */
! 2706: /* Accessor methods for yylval and yylloc */
! 2707:
! 2708: /* %if-bison-bridge */
! 2709:
! 2710: YYSTYPE * yyget_lval (yyscan_t yyscanner)
! 2711: {
! 2712: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2713: return yylval;
! 2714: }
! 2715:
! 2716: void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
! 2717: {
! 2718: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2719: yylval = yylval_param;
! 2720: }
! 2721:
! 2722: /* %endif */
! 2723:
! 2724: /* User-visible API */
! 2725:
! 2726: /* yylex_init is special because it creates the scanner itself, so it is
! 2727: * the ONLY reentrant function that doesn't take the scanner as the last argument.
! 2728: * That's why we explicitly handle the declaration, instead of using our macros.
! 2729: */
! 2730: int yylex_init(yyscan_t* ptr_yy_globals)
! 2731: {
! 2732: if (ptr_yy_globals == NULL){
! 2733: errno = EINVAL;
! 2734: return 1;
! 2735: }
! 2736:
! 2737: *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
! 2738:
! 2739: if (*ptr_yy_globals == NULL){
! 2740: errno = ENOMEM;
! 2741: return 1;
! 2742: }
! 2743:
! 2744: /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
! 2745: memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
! 2746:
! 2747: return yy_init_globals ( *ptr_yy_globals );
! 2748: }
! 2749:
! 2750: /* yylex_init_extra has the same functionality as yylex_init, but follows the
! 2751: * convention of taking the scanner as the last argument. Note however, that
! 2752: * this is a *pointer* to a scanner, as it will be allocated by this call (and
! 2753: * is the reason, too, why this function also must handle its own declaration).
! 2754: * The user defined value in the first argument will be available to yyalloc in
! 2755: * the yyextra field.
! 2756: */
! 2757: int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
! 2758: {
! 2759: struct yyguts_t dummy_yyguts;
! 2760:
! 2761: yyset_extra (yy_user_defined, &dummy_yyguts);
! 2762:
! 2763: if (ptr_yy_globals == NULL){
! 2764: errno = EINVAL;
! 2765: return 1;
! 2766: }
! 2767:
! 2768: *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
! 2769:
! 2770: if (*ptr_yy_globals == NULL){
! 2771: errno = ENOMEM;
! 2772: return 1;
! 2773: }
! 2774:
! 2775: /* By setting to 0xAA, we expose bugs in
! 2776: yy_init_globals. Leave at 0x00 for releases. */
! 2777: memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
! 2778:
! 2779: yyset_extra (yy_user_defined, *ptr_yy_globals);
! 2780:
! 2781: return yy_init_globals ( *ptr_yy_globals );
! 2782: }
! 2783:
! 2784: /* %endif if-c-only */
! 2785:
! 2786: /* %if-c-only */
! 2787: static int yy_init_globals (yyscan_t yyscanner)
! 2788: {
! 2789: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2790: /* Initialization is the same as for the non-reentrant scanner.
! 2791: * This function is called from yylex_destroy(), so don't allocate here.
! 2792: */
! 2793:
! 2794: yyg->yy_buffer_stack = NULL;
! 2795: yyg->yy_buffer_stack_top = 0;
! 2796: yyg->yy_buffer_stack_max = 0;
! 2797: yyg->yy_c_buf_p = NULL;
! 2798: yyg->yy_init = 0;
! 2799: yyg->yy_start = 0;
! 2800:
! 2801: yyg->yy_start_stack_ptr = 0;
! 2802: yyg->yy_start_stack_depth = 0;
! 2803: yyg->yy_start_stack = NULL;
! 2804:
! 2805: /* Defined in main.c */
! 2806: #ifdef YY_STDINIT
! 2807: yyin = stdin;
! 2808: yyout = stdout;
! 2809: #else
! 2810: yyin = NULL;
! 2811: yyout = NULL;
! 2812: #endif
! 2813:
! 2814: /* For future reference: Set errno on error, since we are called by
! 2815: * yylex_init()
! 2816: */
! 2817: return 0;
! 2818: }
! 2819: /* %endif */
! 2820:
! 2821: /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
! 2822: /* yylex_destroy is for both reentrant and non-reentrant scanners. */
! 2823: int yylex_destroy (yyscan_t yyscanner)
! 2824: {
! 2825: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2826:
! 2827: /* Pop the buffer stack, destroying each element. */
! 2828: while(YY_CURRENT_BUFFER){
! 2829: yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
! 2830: YY_CURRENT_BUFFER_LVALUE = NULL;
! 2831: yypop_buffer_state(yyscanner);
! 2832: }
! 2833:
! 2834: /* Destroy the stack itself. */
! 2835: yyfree(yyg->yy_buffer_stack , yyscanner);
! 2836: yyg->yy_buffer_stack = NULL;
! 2837:
! 2838: /* Destroy the start condition stack. */
! 2839: yyfree( yyg->yy_start_stack , yyscanner );
! 2840: yyg->yy_start_stack = NULL;
! 2841:
! 2842: /* Reset the globals. This is important in a non-reentrant scanner so the next time
! 2843: * yylex() is called, initialization will occur. */
! 2844: yy_init_globals( yyscanner);
! 2845:
! 2846: /* %if-reentrant */
! 2847: /* Destroy the main struct (reentrant only). */
! 2848: yyfree ( yyscanner , yyscanner );
! 2849: yyscanner = NULL;
! 2850: /* %endif */
! 2851: return 0;
! 2852: }
! 2853: /* %endif */
! 2854:
! 2855: /*
! 2856: * Internal utility routines.
! 2857: */
! 2858:
! 2859: #ifndef yytext_ptr
! 2860: static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
! 2861: {
! 2862: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2863: (void)yyg;
! 2864:
! 2865: int i;
! 2866: for ( i = 0; i < n; ++i )
! 2867: s1[i] = s2[i];
! 2868: }
! 2869: #endif
! 2870:
! 2871: #ifdef YY_NEED_STRLEN
! 2872: static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
! 2873: {
! 2874: int n;
! 2875: for ( n = 0; s[n]; ++n )
! 2876: ;
! 2877:
! 2878: return n;
! 2879: }
! 2880: #endif
! 2881:
! 2882: void *yyalloc (yy_size_t size , yyscan_t yyscanner)
! 2883: {
! 2884: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2885: (void)yyg;
! 2886: return malloc(size);
! 2887: }
! 2888:
! 2889: void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
! 2890: {
! 2891: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2892: (void)yyg;
! 2893:
! 2894: /* The cast to (char *) in the following accommodates both
! 2895: * implementations that use char* generic pointers, and those
! 2896: * that use void* generic pointers. It works with the latter
! 2897: * because both ANSI C and C++ allow castless assignment from
! 2898: * any pointer type to void*, and deal with argument conversions
! 2899: * as though doing an assignment.
! 2900: */
! 2901: return realloc(ptr, size);
! 2902: }
! 2903:
! 2904: void yyfree (void * ptr , yyscan_t yyscanner)
! 2905: {
! 2906: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! 2907: (void)yyg;
! 2908: free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
! 2909: }
! 2910:
! 2911: /* %if-tables-serialization definitions */
! 2912: /* %define-yytables The name for this specific scanner's tables. */
! 2913: #define YYTABLES_NAME "yytables"
! 2914: /* %endif */
! 2915:
! 2916: /* %ok-for-header */
! 2917:
! 2918: #line 168 "parser/lexer.l"
! 2919:
! 2920:
! 2921: /**
! 2922: * Open the next file, if any is queued and readable, otherwise returns FALSE.
! 2923: */
! 2924: bool conf_parser_open_next_file(parser_helper_t *ctx)
! 2925: {
! 2926: FILE *file;
! 2927:
! 2928: file = ctx->file_next(ctx);
! 2929: if (!file)
! 2930: {
! 2931: return FALSE;
! 2932: }
! 2933:
! 2934: conf_parser_set_in(file, ctx->scanner);
! 2935: conf_parser_push_buffer_state(
! 2936: conf_parser__create_buffer(file, YY_BUF_SIZE,
! 2937: ctx->scanner), ctx->scanner);
! 2938: return TRUE;
! 2939: }
! 2940:
! 2941: /**
! 2942: * Assumes that the file pattern to include is currently stored as string on
! 2943: * the helper object.
! 2944: */
! 2945: static void include_files(parser_helper_t *ctx)
! 2946: {
! 2947: char *pattern = ctx->string_get(ctx);
! 2948:
! 2949: ctx->file_include(ctx, pattern);
! 2950: free(pattern);
! 2951:
! 2952: conf_parser_open_next_file(ctx);
! 2953: }
! 2954:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>