GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: usr.bin/mklocale/lex.c Lines: 0 425 0.0 %
Date: 2017-11-07 Branches: 0 391 0.0 %

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