kconfig/lex.zconf.c
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 25 17:22:54 2009 +0000 (2009-05-25)
branchgcc-4.4
changeset 1382 b3b1369752ba
parent 943 1cca90ce0481
child 2448 a103abae1560
permissions -rw-r--r--
/devel/gcc-4.4:
- TODO: add new item

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