Annotation of embedaddon/strongswan/src/starter/parser/lexer.c, revision 1.1.1.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>