blob: 500636bdbf4b3d384b9636b8d8f5fe0347b24a9c [file] [log] [blame]
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002#define YY_INT_ALIGNED short int
3
4/* A lexical scanner generated by flex */
5
6#define FLEX_SCANNER
7#define YY_FLEX_MAJOR_VERSION 2
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07008#define YY_FLEX_MINOR_VERSION 6
9#define YY_FLEX_SUBMINOR_VERSION 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000010#if YY_FLEX_SUBMINOR_VERSION > 0
11#define FLEX_BETA
12#endif
13
14/* First, we deal with platform-specific or compiler-specific issues. */
15
16/* begin standard C headers. */
17#include <stdio.h>
18#include <string.h>
19#include <errno.h>
20#include <stdlib.h>
21
22/* end standard C headers. */
23
24/* flex integer type definitions */
25
26#ifndef FLEXINT_H
27#define FLEXINT_H
28
29/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
30
31#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
32
33/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
Patrick Georgi8d313682010-05-05 13:12:42 +000034 * if you want the limit (max/min) macros for int types.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000035 */
36#ifndef __STDC_LIMIT_MACROS
37#define __STDC_LIMIT_MACROS 1
38#endif
39
40#include <inttypes.h>
41typedef int8_t flex_int8_t;
42typedef uint8_t flex_uint8_t;
43typedef int16_t flex_int16_t;
44typedef uint16_t flex_uint16_t;
45typedef int32_t flex_int32_t;
46typedef uint32_t flex_uint32_t;
47#else
48typedef signed char flex_int8_t;
49typedef short int flex_int16_t;
50typedef int flex_int32_t;
Patrick Georgi8d313682010-05-05 13:12:42 +000051typedef unsigned char flex_uint8_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000052typedef unsigned short int flex_uint16_t;
53typedef unsigned int flex_uint32_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000054
55/* Limits of integral types. */
56#ifndef INT8_MIN
57#define INT8_MIN (-128)
58#endif
59#ifndef INT16_MIN
60#define INT16_MIN (-32767-1)
61#endif
62#ifndef INT32_MIN
63#define INT32_MIN (-2147483647-1)
64#endif
65#ifndef INT8_MAX
66#define INT8_MAX (127)
67#endif
68#ifndef INT16_MAX
69#define INT16_MAX (32767)
70#endif
71#ifndef INT32_MAX
72#define INT32_MAX (2147483647)
73#endif
74#ifndef UINT8_MAX
75#define UINT8_MAX (255U)
76#endif
77#ifndef UINT16_MAX
78#define UINT16_MAX (65535U)
79#endif
80#ifndef UINT32_MAX
81#define UINT32_MAX (4294967295U)
82#endif
83
Patrick Georgi8d313682010-05-05 13:12:42 +000084#endif /* ! C99 */
85
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000086#endif /* ! FLEXINT_H */
87
88#ifdef __cplusplus
89
90/* The "const" storage-class-modifier is valid. */
91#define YY_USE_CONST
92
93#else /* ! __cplusplus */
94
95/* C99 requires __STDC__ to be defined as 1. */
96#if defined (__STDC__)
97
98#define YY_USE_CONST
99
100#endif /* defined (__STDC__) */
101#endif /* ! __cplusplus */
102
103#ifdef YY_USE_CONST
104#define yyconst const
105#else
106#define yyconst
107#endif
108
109/* Returned upon end-of-file. */
110#define YY_NULL 0
111
112/* Promotes a possibly negative, possibly signed char to an unsigned
113 * integer for use as an array index. If the signed char is negative,
114 * we want to instead treat it as an 8-bit unsigned char, hence the
115 * double cast.
116 */
117#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
118
119/* Enter a start condition. This macro really ought to take a parameter,
120 * but we do it the disgusting crufty way forced on us by the ()-less
121 * definition of BEGIN.
122 */
123#define BEGIN (yy_start) = 1 + 2 *
124
125/* Translate the current start state into a value that can be later handed
126 * to BEGIN to return to the state. The YYSTATE alias is for lex
127 * compatibility.
128 */
129#define YY_START (((yy_start) - 1) / 2)
130#define YYSTATE YY_START
131
132/* Action number for EOF rule of a given start state. */
133#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
134
135/* Special action meaning "start processing a new file". */
136#define YY_NEW_FILE yyrestart(yyin )
137
138#define YY_END_OF_BUFFER_CHAR 0
139
140/* Size of default input buffer. */
141#ifndef YY_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000142#ifdef __ia64__
143/* On IA-64, the buffer size is 16k, not 8k.
144 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
145 * Ditto for the __ia64__ case accordingly.
146 */
147#define YY_BUF_SIZE 32768
148#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000149#define YY_BUF_SIZE 16384
Patrick Georgi8d313682010-05-05 13:12:42 +0000150#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000151#endif
152
153/* The state buf must be large enough to hold one state per character in the main buffer.
154 */
155#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
156
157#ifndef YY_TYPEDEF_YY_BUFFER_STATE
158#define YY_TYPEDEF_YY_BUFFER_STATE
159typedef struct yy_buffer_state *YY_BUFFER_STATE;
160#endif
161
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700162#ifndef YY_TYPEDEF_YY_SIZE_T
163#define YY_TYPEDEF_YY_SIZE_T
164typedef size_t yy_size_t;
165#endif
166
167extern yy_size_t yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000168
169extern FILE *yyin, *yyout;
170
171#define EOB_ACT_CONTINUE_SCAN 0
172#define EOB_ACT_END_OF_FILE 1
173#define EOB_ACT_LAST_MATCH 2
174
175 #define YY_LESS_LINENO(n)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700176 #define YY_LINENO_REWIND_TO(ptr)
Patrick Georgi8d313682010-05-05 13:12:42 +0000177
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000178/* Return all but the first "n" matched characters back to the input stream. */
179#define yyless(n) \
180 do \
181 { \
182 /* Undo effects of setting up yytext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
186 YY_RESTORE_YY_MORE_OFFSET \
187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
189 } \
190 while ( 0 )
191
192#define unput(c) yyunput( c, (yytext_ptr) )
193
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000194#ifndef YY_STRUCT_YY_BUFFER_STATE
195#define YY_STRUCT_YY_BUFFER_STATE
196struct yy_buffer_state
197 {
198 FILE *yy_input_file;
199
200 char *yy_ch_buf; /* input buffer */
201 char *yy_buf_pos; /* current position in input buffer */
202
203 /* Size of input buffer in bytes, not including room for EOB
204 * characters.
205 */
206 yy_size_t yy_buf_size;
207
208 /* Number of characters read into yy_ch_buf, not including EOB
209 * characters.
210 */
Furquan Shaikhe6700292017-02-11 00:50:38 -0800211 yy_size_t yy_n_chars;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000212
213 /* Whether we "own" the buffer - i.e., we know we created it,
214 * and can realloc() it to grow it, and should free() it to
215 * delete it.
216 */
217 int yy_is_our_buffer;
218
219 /* Whether this is an "interactive" input source; if so, and
220 * if we're using stdio for input, then we want to use getc()
221 * instead of fread(), to make sure we stop fetching input after
222 * each newline.
223 */
224 int yy_is_interactive;
225
226 /* Whether we're considered to be at the beginning of a line.
227 * If so, '^' rules will be active on the next match, otherwise
228 * not.
229 */
230 int yy_at_bol;
231
232 int yy_bs_lineno; /**< The line count. */
233 int yy_bs_column; /**< The column count. */
Patrick Georgi8d313682010-05-05 13:12:42 +0000234
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000235 /* Whether to try to fill the input buffer when we reach the
236 * end of it.
237 */
238 int yy_fill_buffer;
239
240 int yy_buffer_status;
241
242#define YY_BUFFER_NEW 0
243#define YY_BUFFER_NORMAL 1
244 /* When an EOF's been seen but there's still some text to process
245 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
246 * shouldn't try reading from the input source any more. We might
247 * still have a bunch of tokens to match, though, because of
248 * possible backing-up.
249 *
250 * When we actually see the EOF, we change the status to "new"
251 * (via yyrestart()), so that the user can continue scanning by
252 * just pointing yyin at a new input file.
253 */
254#define YY_BUFFER_EOF_PENDING 2
255
256 };
257#endif /* !YY_STRUCT_YY_BUFFER_STATE */
258
259/* Stack of input buffers. */
260static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
261static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
262static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
263
264/* We provide macros for accessing buffer states in case in the
265 * future we want to put the buffer states in a more general
266 * "scanner state".
267 *
268 * Returns the top of the stack, or NULL.
269 */
270#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
271 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
272 : NULL)
273
274/* Same as previous macro, but useful when we know that the buffer stack is not
275 * NULL or when we need an lvalue. For internal use only.
276 */
277#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
278
279/* yy_hold_char holds the character lost when yytext is formed. */
280static char yy_hold_char;
Furquan Shaikhe6700292017-02-11 00:50:38 -0800281static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700282yy_size_t yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000283
284/* Points to current character in buffer. */
285static char *yy_c_buf_p = (char *) 0;
286static int yy_init = 0; /* whether we need to initialize */
287static int yy_start = 0; /* start state number */
288
289/* Flag which is used to allow yywrap()'s to do buffer switches
290 * instead of setting up a fresh yyin. A bit of a hack ...
291 */
292static int yy_did_buffer_switch_on_eof;
293
294void yyrestart (FILE *input_file );
295void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
296YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
297void yy_delete_buffer (YY_BUFFER_STATE b );
298void yy_flush_buffer (YY_BUFFER_STATE b );
299void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
300void yypop_buffer_state (void );
301
302static void yyensure_buffer_stack (void );
303static void yy_load_buffer_state (void );
304static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
305
306#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
307
308YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
309YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700310YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000311
312void *yyalloc (yy_size_t );
313void *yyrealloc (void *,yy_size_t );
314void yyfree (void * );
315
316#define yy_new_buffer yy_create_buffer
317
318#define yy_set_interactive(is_interactive) \
319 { \
320 if ( ! YY_CURRENT_BUFFER ){ \
321 yyensure_buffer_stack (); \
322 YY_CURRENT_BUFFER_LVALUE = \
323 yy_create_buffer(yyin,YY_BUF_SIZE ); \
324 } \
325 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
326 }
327
328#define yy_set_bol(at_bol) \
329 { \
330 if ( ! YY_CURRENT_BUFFER ){\
331 yyensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 yy_create_buffer(yyin,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
336 }
337
338#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
339
340/* Begin user sect3 */
341
342typedef unsigned char YY_CHAR;
343
344FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
345
346typedef int yy_state_type;
347
348extern int yylineno;
349
350int yylineno = 1;
351
352extern char *yytext;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700353#ifdef yytext_ptr
354#undef yytext_ptr
355#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000356#define yytext_ptr yytext
357
358static yy_state_type yy_get_previous_state (void );
359static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
360static int yy_get_next_buffer (void );
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700361#if defined(__GNUC__) && __GNUC__ >= 3
362__attribute__((__noreturn__))
363#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000364static void yy_fatal_error (yyconst char msg[] );
365
366/* Done after the current pattern has been matched and before the
367 * corresponding action - sets up yytext.
368 */
369#define YY_DO_BEFORE_ACTION \
370 (yytext_ptr) = yy_bp; \
371 yyleng = (size_t) (yy_cp - yy_bp); \
372 (yy_hold_char) = *yy_cp; \
373 *yy_cp = '\0'; \
374 (yy_c_buf_p) = yy_cp;
375
Furquan Shaikhe6700292017-02-11 00:50:38 -0800376#define YY_NUM_RULES 34
377#define YY_END_OF_BUFFER 35
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000378/* This struct is not used in this scanner,
379 but its presence is necessary. */
380struct yy_trans_info
381 {
382 flex_int32_t yy_verify;
383 flex_int32_t yy_nxt;
384 };
Furquan Shaikhe6700292017-02-11 00:50:38 -0800385static yyconst flex_int16_t yy_accept[132] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000386 { 0,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800387 0, 0, 35, 33, 1, 3, 33, 33, 33, 28,
388 28, 26, 29, 33, 29, 29, 29, 33, 33, 33,
389 33, 33, 33, 33, 33, 1, 3, 33, 0, 33,
390 33, 0, 2, 28, 29, 33, 33, 33, 33, 29,
391 33, 33, 33, 33, 33, 33, 21, 33, 33, 33,
392 7, 33, 33, 33, 33, 33, 32, 32, 33, 0,
393 27, 33, 33, 15, 33, 33, 20, 25, 33, 12,
394 33, 33, 19, 33, 8, 9, 11, 33, 18, 33,
395 33, 0, 30, 4, 33, 33, 33, 33, 33, 33,
396 33, 33, 33, 31, 31, 33, 33, 33, 33, 33,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000397
Furquan Shaikhe6700292017-02-11 00:50:38 -0800398 33, 13, 33, 33, 33, 5, 16, 33, 33, 10,
399 33, 33, 33, 17, 23, 33, 33, 33, 33, 33,
400 6, 33, 33, 33, 33, 33, 22, 33, 14, 24,
401 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000402 } ;
403
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700404static yyconst YY_CHAR yy_ec[256] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000405 { 0,
406 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
407 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 7, 1, 8, 7, 9,
411 7, 7, 7, 7, 7, 7, 7, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200412 10, 1, 1, 1, 11, 11, 11, 11, 12, 12,
413 1, 1, 13, 1, 1, 1, 1, 14, 1, 1,
414 1, 1, 1, 15, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000416
Patrick Georgi2b108a42012-07-13 12:02:44 +0200417 21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
418 29, 30, 31, 32, 33, 34, 35, 36, 1, 37,
419 38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000420 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427
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, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1
434 } ;
435
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700436static yyconst YY_CHAR yy_meta[39] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000437 { 0,
438 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200441 1, 1, 1, 1, 1, 1, 1, 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000442 } ;
443
Furquan Shaikhe6700292017-02-11 00:50:38 -0800444static yyconst flex_uint16_t yy_base[139] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445 { 0,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800446 0, 0, 202, 0, 199, 203, 197, 37, 41, 38,
447 162, 0, 44, 184, 54, 78, 60, 176, 45, 179,
448 42, 47, 174, 41, 0, 192, 203, 77, 188, 87,
449 91, 189, 203, 0, 88, 104, 176, 165, 154, 93,
450 161, 156, 166, 157, 165, 159, 165, 150, 150, 157,
451 0, 153, 147, 153, 150, 156, 0, 203, 101, 168,
452 0, 161, 141, 154, 144, 151, 0, 0, 146, 0,
453 145, 135, 0, 139, 0, 0, 0, 138, 0, 129,
454 156, 155, 0, 0, 140, 139, 132, 124, 123, 129,
455 134, 119, 113, 0, 203, 124, 128, 120, 122, 121,
Patrick Georgi8d313682010-05-05 13:12:42 +0000456
Furquan Shaikhe6700292017-02-11 00:50:38 -0800457 126, 0, 110, 110, 107, 0, 0, 109, 93, 104,
458 98, 84, 84, 0, 0, 89, 77, 87, 71, 66,
459 0, 64, 62, 50, 47, 33, 0, 28, 0, 0,
460 203, 40, 129, 131, 133, 135, 137, 139
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000461 } ;
462
Furquan Shaikhe6700292017-02-11 00:50:38 -0800463static yyconst flex_int16_t yy_def[139] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000464 { 0,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800465 131, 1, 131, 132, 131, 131, 132, 133, 134, 132,
466 10, 132, 10, 132, 10, 10, 10, 132, 132, 132,
467 132, 132, 132, 132, 132, 131, 131, 133, 135, 136,
468 134, 137, 131, 10, 10, 10, 132, 132, 132, 10,
469 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
470 132, 132, 132, 132, 132, 132, 132, 131, 136, 138,
471 36, 132, 132, 132, 132, 132, 132, 132, 132, 132,
472 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
473 132, 131, 132, 132, 132, 132, 132, 132, 132, 132,
474 132, 132, 132, 132, 131, 132, 132, 132, 132, 132,
Patrick Georgi8d313682010-05-05 13:12:42 +0000475
Furquan Shaikhe6700292017-02-11 00:50:38 -0800476 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
477 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
478 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
479 0, 131, 131, 131, 131, 131, 131, 131
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000480 } ;
481
Furquan Shaikhe6700292017-02-11 00:50:38 -0800482static yyconst flex_uint16_t yy_nxt[242] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000483 { 0,
484 4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200485 13, 13, 14, 4, 4, 4, 13, 13, 15, 16,
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700486 17, 13, 18, 4, 19, 20, 4, 4, 21, 22,
487 4, 23, 24, 4, 4, 4, 4, 4, 29, 29,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800488 25, 30, 32, 33, 34, 34, 34, 130, 35, 35,
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700489 35, 35, 35, 45, 35, 35, 35, 35, 35, 35,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800490 35, 35, 35, 50, 129, 52, 35, 35, 35, 51,
491 55, 128, 46, 47, 53, 56, 48, 38, 29, 29,
492 127, 57, 126, 39, 35, 35, 35, 43, 60, 60,
493 125, 25, 32, 33, 35, 35, 35, 124, 40, 35,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000494
Furquan Shaikhe6700292017-02-11 00:50:38 -0800495 35, 35, 60, 60, 123, 81, 41, 122, 121, 42,
496 61, 61, 61, 120, 61, 61, 119, 118, 117, 116,
497 61, 61, 61, 61, 61, 61, 115, 114, 65, 28,
498 28, 31, 31, 29, 29, 59, 59, 32, 32, 60,
499 60, 113, 112, 111, 110, 109, 108, 107, 106, 105,
500 104, 103, 102, 101, 100, 99, 98, 97, 96, 95,
501 94, 93, 92, 91, 90, 89, 88, 87, 86, 85,
502 84, 83, 82, 80, 79, 78, 77, 76, 75, 74,
503 73, 72, 71, 70, 69, 68, 67, 66, 64, 63,
504 62, 33, 58, 26, 54, 49, 44, 37, 36, 27,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000505
Furquan Shaikhe6700292017-02-11 00:50:38 -0800506 26, 131, 3, 131, 131, 131, 131, 131, 131, 131,
507 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
508 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
509 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
510 131
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000511 } ;
512
Furquan Shaikhe6700292017-02-11 00:50:38 -0800513static yyconst flex_int16_t yy_chk[242] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000514 { 0,
515 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
516 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
517 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200518 1, 1, 1, 1, 1, 1, 1, 1, 8, 8,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800519 132, 8, 9, 9, 10, 10, 10, 128, 10, 10,
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700520 13, 13, 13, 19, 10, 10, 10, 10, 10, 10,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800521 15, 15, 15, 21, 126, 22, 17, 17, 17, 21,
522 24, 125, 19, 19, 22, 24, 19, 15, 28, 28,
523 124, 28, 123, 15, 16, 16, 16, 17, 30, 30,
524 122, 30, 31, 31, 35, 35, 35, 120, 16, 40,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000525
Furquan Shaikhe6700292017-02-11 00:50:38 -0800526 40, 40, 59, 59, 119, 59, 16, 118, 117, 16,
527 36, 36, 36, 116, 36, 36, 113, 112, 111, 110,
528 36, 36, 36, 36, 36, 36, 109, 108, 40, 133,
529 133, 134, 134, 135, 135, 136, 136, 137, 137, 138,
530 138, 105, 104, 103, 101, 100, 99, 98, 97, 96,
531 93, 92, 91, 90, 89, 88, 87, 86, 85, 82,
532 81, 80, 78, 74, 72, 71, 69, 66, 65, 64,
533 63, 62, 60, 56, 55, 54, 53, 52, 50, 49,
534 48, 47, 46, 45, 44, 43, 42, 41, 39, 38,
535 37, 32, 29, 26, 23, 20, 18, 14, 11, 7,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000536
Furquan Shaikhe6700292017-02-11 00:50:38 -0800537 5, 3, 131, 131, 131, 131, 131, 131, 131, 131,
538 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
539 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
540 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
541 131
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000542 } ;
543
544static yy_state_type yy_last_accepting_state;
545static char *yy_last_accepting_cpos;
546
547extern int yy_flex_debug;
548int yy_flex_debug = 0;
549
550/* The intent behind this definition is that it'll catch
551 * any uses of REJECT which flex missed.
552 */
553#define REJECT reject_used_but_not_detected
554#define yymore() yymore_used_but_not_detected
555#define YY_MORE_ADJ 0
556#define YY_RESTORE_YY_MORE_OFFSET
557char *yytext;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000558/*
559 * sconfig, coreboot device tree compiler
560 *
561 * Copyright (C) 2010 coresystems GmbH
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700562 * written by Patrick Georgi <patrick@georgi-clan.de>
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000563 *
564 * This program is free software; you can redistribute it and/or modify
565 * it under the terms of the GNU General Public License as published by
566 * the Free Software Foundation; version 2 of the License.
567 *
568 * This program is distributed in the hope that it will be useful,
569 * but WITHOUT ANY WARRANTY; without even the implied warranty of
570 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
571 * GNU General Public License for more details.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000572 */
573
574#include "sconfig.tab.h"
575
576int linenum = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000577
578#define INITIAL 0
579
580#ifndef YY_NO_UNISTD_H
581/* Special case for "unistd.h", since it is non-ANSI. We include it way
582 * down here because we want the user's section 1 to have been scanned first.
583 * The user has a chance to override it with an option.
584 */
585#include <unistd.h>
586#endif
587
588#ifndef YY_EXTRA_TYPE
589#define YY_EXTRA_TYPE void *
590#endif
591
592static int yy_init_globals (void );
593
594/* Accessor methods to globals.
595 These are made visible to non-reentrant scanners for convenience. */
596
597int yylex_destroy (void );
598
599int yyget_debug (void );
600
601void yyset_debug (int debug_flag );
602
603YY_EXTRA_TYPE yyget_extra (void );
604
605void yyset_extra (YY_EXTRA_TYPE user_defined );
606
607FILE *yyget_in (void );
608
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700609void yyset_in (FILE * _in_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000610
611FILE *yyget_out (void );
612
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700613void yyset_out (FILE * _out_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000614
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700615yy_size_t yyget_leng (void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000616
617char *yyget_text (void );
618
619int yyget_lineno (void );
620
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700621void yyset_lineno (int _line_number );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000622
623/* Macros after this point can all be overridden by user definitions in
624 * section 1.
625 */
626
627#ifndef YY_SKIP_YYWRAP
628#ifdef __cplusplus
629extern "C" int yywrap (void );
630#else
631extern int yywrap (void );
632#endif
633#endif
634
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700635#ifndef YY_NO_UNPUT
Furquan Shaikhe6700292017-02-11 00:50:38 -0800636
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000637 static void yyunput (int c,char *buf_ptr );
Patrick Georgi8d313682010-05-05 13:12:42 +0000638
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700639#endif
640
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000641#ifndef yytext_ptr
642static void yy_flex_strncpy (char *,yyconst char *,int );
643#endif
644
645#ifdef YY_NEED_STRLEN
646static int yy_flex_strlen (yyconst char * );
647#endif
648
649#ifndef YY_NO_INPUT
650
651#ifdef __cplusplus
652static int yyinput (void );
653#else
654static int input (void );
655#endif
656
657#endif
658
659/* Amount of stuff to slurp up with each read. */
660#ifndef YY_READ_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000661#ifdef __ia64__
662/* On IA-64, the buffer size is 16k, not 8k */
663#define YY_READ_BUF_SIZE 16384
664#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000665#define YY_READ_BUF_SIZE 8192
Patrick Georgi8d313682010-05-05 13:12:42 +0000666#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000667#endif
668
669/* Copy whatever the last rule matched to the standard output. */
670#ifndef ECHO
671/* This used to be an fputs(), but since the string might contain NUL's,
672 * we now use fwrite().
673 */
Patrick Georgi8d313682010-05-05 13:12:42 +0000674#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000675#endif
676
677/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
678 * is returned in "result".
679 */
680#ifndef YY_INPUT
681#define YY_INPUT(buf,result,max_size) \
682 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
683 { \
684 int c = '*'; \
Patrick Georgi8d313682010-05-05 13:12:42 +0000685 size_t n; \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000686 for ( n = 0; n < max_size && \
687 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
688 buf[n] = (char) c; \
689 if ( c == '\n' ) \
690 buf[n++] = (char) c; \
691 if ( c == EOF && ferror( yyin ) ) \
692 YY_FATAL_ERROR( "input in flex scanner failed" ); \
693 result = n; \
694 } \
695 else \
696 { \
697 errno=0; \
698 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
699 { \
700 if( errno != EINTR) \
701 { \
702 YY_FATAL_ERROR( "input in flex scanner failed" ); \
703 break; \
704 } \
705 errno=0; \
706 clearerr(yyin); \
707 } \
708 }\
709\
710
711#endif
712
713/* No semi-colon after return; correct usage is to write "yyterminate();" -
714 * we don't want an extra ';' after the "return" because that will cause
715 * some compilers to complain about unreachable statements.
716 */
717#ifndef yyterminate
718#define yyterminate() return YY_NULL
719#endif
720
721/* Number of entries by which start-condition stack grows. */
722#ifndef YY_START_STACK_INCR
723#define YY_START_STACK_INCR 25
724#endif
725
726/* Report a fatal error. */
727#ifndef YY_FATAL_ERROR
728#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
729#endif
730
731/* end tables serialization structures and prototypes */
732
733/* Default declaration of generated scanner - a define so the user can
734 * easily add parameters.
735 */
736#ifndef YY_DECL
737#define YY_DECL_IS_OURS 1
738
739extern int yylex (void);
740
741#define YY_DECL int yylex (void)
742#endif /* !YY_DECL */
743
744/* Code executed at the beginning of each rule, after yytext and yyleng
745 * have been set up.
746 */
747#ifndef YY_USER_ACTION
748#define YY_USER_ACTION
749#endif
750
751/* Code executed at the end of each rule. */
752#ifndef YY_BREAK
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700753#define YY_BREAK /*LINTED*/break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000754#endif
755
756#define YY_RULE_SETUP \
757 YY_USER_ACTION
758
759/** The main scanner function which does all the work.
760 */
761YY_DECL
762{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700763 yy_state_type yy_current_state;
764 char *yy_cp, *yy_bp;
765 int yy_act;
Patrick Georgi8d313682010-05-05 13:12:42 +0000766
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000767 if ( !(yy_init) )
768 {
769 (yy_init) = 1;
770
771#ifdef YY_USER_INIT
772 YY_USER_INIT;
773#endif
774
775 if ( ! (yy_start) )
776 (yy_start) = 1; /* first start state */
777
778 if ( ! yyin )
779 yyin = stdin;
780
781 if ( ! yyout )
782 yyout = stdout;
783
784 if ( ! YY_CURRENT_BUFFER ) {
785 yyensure_buffer_stack ();
786 YY_CURRENT_BUFFER_LVALUE =
787 yy_create_buffer(yyin,YY_BUF_SIZE );
788 }
789
790 yy_load_buffer_state( );
791 }
792
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700793 {
794
795 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000796 {
797 yy_cp = (yy_c_buf_p);
798
799 /* Support of yytext. */
800 *yy_cp = (yy_hold_char);
801
802 /* yy_bp points to the position in yy_ch_buf of the start of
803 * the current run.
804 */
805 yy_bp = yy_cp;
806
807 yy_current_state = (yy_start);
808yy_match:
809 do
810 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700811 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000812 if ( yy_accept[yy_current_state] )
813 {
814 (yy_last_accepting_state) = yy_current_state;
815 (yy_last_accepting_cpos) = yy_cp;
816 }
817 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
818 {
819 yy_current_state = (int) yy_def[yy_current_state];
Furquan Shaikhe6700292017-02-11 00:50:38 -0800820 if ( yy_current_state >= 132 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000821 yy_c = yy_meta[(unsigned int) yy_c];
822 }
823 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
824 ++yy_cp;
825 }
Furquan Shaikhe6700292017-02-11 00:50:38 -0800826 while ( yy_base[yy_current_state] != 203 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000827
828yy_find_action:
829 yy_act = yy_accept[yy_current_state];
830 if ( yy_act == 0 )
831 { /* have to back up */
832 yy_cp = (yy_last_accepting_cpos);
833 yy_current_state = (yy_last_accepting_state);
834 yy_act = yy_accept[yy_current_state];
835 }
836
837 YY_DO_BEFORE_ACTION;
838
839do_action: /* This label is used only to access EOF actions. */
840
841 switch ( yy_act )
842 { /* beginning of action switch */
843 case 0: /* must back up */
844 /* undo the effects of YY_DO_BEFORE_ACTION */
845 *yy_cp = (yy_hold_char);
846 yy_cp = (yy_last_accepting_cpos);
847 yy_current_state = (yy_last_accepting_state);
848 goto yy_find_action;
849
850case 1:
851YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000852{}
853 YY_BREAK
854case 2:
855/* rule 2 can match eol */
856YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000857{linenum++;}
858 YY_BREAK
859case 3:
860/* rule 3 can match eol */
861YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000862{linenum++;}
863 YY_BREAK
864case 4:
865YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000866{return(CHIP);}
867 YY_BREAK
868case 5:
869YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000870{return(DEVICE);}
871 YY_BREAK
872case 6:
873YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000874{return(REGISTER);}
875 YY_BREAK
876case 7:
877YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000878{yylval.number=1; return(BOOL);}
879 YY_BREAK
880case 8:
881YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000882{yylval.number=0; return(BOOL);}
883 YY_BREAK
884case 9:
885YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000886{yylval.number=PCI; return(BUS);}
887 YY_BREAK
888case 10:
889YY_RULE_SETUP
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200890{yylval.number=IOAPIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000891 YY_BREAK
892case 11:
893YY_RULE_SETUP
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200894{yylval.number=PNP; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000895 YY_BREAK
896case 12:
897YY_RULE_SETUP
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200898{yylval.number=I2C; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000899 YY_BREAK
900case 13:
901YY_RULE_SETUP
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200902{yylval.number=APIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000903 YY_BREAK
904case 14:
905YY_RULE_SETUP
Stefan Reinauer0aa37c42013-02-12 15:20:54 -0800906{yylval.number=CPU_CLUSTER; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000907 YY_BREAK
908case 15:
909YY_RULE_SETUP
Aaron Durbinffda804b2014-09-03 12:40:15 -0500910{yylval.number=CPU; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000911 YY_BREAK
912case 16:
913YY_RULE_SETUP
Aaron Durbinffda804b2014-09-03 12:40:15 -0500914{yylval.number=DOMAIN; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000915 YY_BREAK
916case 17:
917YY_RULE_SETUP
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700918{yylval.number=GENERIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000919 YY_BREAK
920case 18:
921YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800922{yylval.number=SPI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000923 YY_BREAK
924case 19:
925YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800926{yylval.number=IRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000927 YY_BREAK
928case 20:
929YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800930{yylval.number=DRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000931 YY_BREAK
932case 21:
933YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800934{yylval.number=IO; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000935 YY_BREAK
936case 22:
937YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800938{return(IOAPIC_IRQ);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000939 YY_BREAK
940case 23:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000941YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800942{return(INHERIT);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000943 YY_BREAK
944case 24:
945YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800946{return(SUBSYSTEMID);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000947 YY_BREAK
948case 25:
Sven Schnelle750edfd2011-03-01 21:43:57 +0000949YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800950{return(END);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000951 YY_BREAK
952case 26:
953YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800954{return(EQUALS);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000955 YY_BREAK
956case 27:
Patrick Georgi2b108a42012-07-13 12:02:44 +0200957YY_RULE_SETUP
Aaron Durbinffda804b2014-09-03 12:40:15 -0500958{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Patrick Georgi2b108a42012-07-13 12:02:44 +0200959 YY_BREAK
960case 28:
Aaron Durbinffda804b2014-09-03 12:40:15 -0500961YY_RULE_SETUP
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700962{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Aaron Durbinffda804b2014-09-03 12:40:15 -0500963 YY_BREAK
964case 29:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700965YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800966{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700967 YY_BREAK
968case 30:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200969YY_RULE_SETUP
Furquan Shaikhe6700292017-02-11 00:50:38 -0800970{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200971 YY_BREAK
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700972case 31:
973/* rule 31 can match eol */
974YY_RULE_SETUP
975{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
976 YY_BREAK
977case 32:
Furquan Shaikhe6700292017-02-11 00:50:38 -0800978/* rule 32 can match eol */
979YY_RULE_SETUP
980{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
981 YY_BREAK
982case 33:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200983YY_RULE_SETUP
984{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
985 YY_BREAK
Furquan Shaikhe6700292017-02-11 00:50:38 -0800986case 34:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000988ECHO;
989 YY_BREAK
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000990case YY_STATE_EOF(INITIAL):
991 yyterminate();
992
993 case YY_END_OF_BUFFER:
994 {
995 /* Amount of text matched not including the EOB char. */
996 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
997
998 /* Undo the effects of YY_DO_BEFORE_ACTION. */
999 *yy_cp = (yy_hold_char);
1000 YY_RESTORE_YY_MORE_OFFSET
1001
1002 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1003 {
1004 /* We're scanning a new file or input source. It's
1005 * possible that this happened because the user
1006 * just pointed yyin at a new source and called
1007 * yylex(). If so, then we have to assure
1008 * consistency between YY_CURRENT_BUFFER and our
1009 * globals. Here is the right place to do so, because
1010 * this is the first action (other than possibly a
1011 * back-up) that will match for the new input source.
1012 */
1013 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1014 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1015 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1016 }
1017
1018 /* Note that here we test for yy_c_buf_p "<=" to the position
1019 * of the first EOB in the buffer, since yy_c_buf_p will
1020 * already have been incremented past the NUL character
1021 * (since all states make transitions on EOB to the
1022 * end-of-buffer state). Contrast this with the test
1023 * in input().
1024 */
1025 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1026 { /* This was really a NUL. */
1027 yy_state_type yy_next_state;
1028
1029 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1030
1031 yy_current_state = yy_get_previous_state( );
1032
1033 /* Okay, we're now positioned to make the NUL
1034 * transition. We couldn't have
1035 * yy_get_previous_state() go ahead and do it
1036 * for us because it doesn't know how to deal
1037 * with the possibility of jamming (and we don't
1038 * want to build jamming into it because then it
1039 * will run more slowly).
1040 */
1041
1042 yy_next_state = yy_try_NUL_trans( yy_current_state );
1043
1044 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1045
1046 if ( yy_next_state )
1047 {
1048 /* Consume the NUL. */
1049 yy_cp = ++(yy_c_buf_p);
1050 yy_current_state = yy_next_state;
1051 goto yy_match;
1052 }
1053
1054 else
1055 {
1056 yy_cp = (yy_c_buf_p);
1057 goto yy_find_action;
1058 }
1059 }
1060
1061 else switch ( yy_get_next_buffer( ) )
1062 {
1063 case EOB_ACT_END_OF_FILE:
1064 {
1065 (yy_did_buffer_switch_on_eof) = 0;
1066
1067 if ( yywrap( ) )
1068 {
1069 /* Note: because we've taken care in
1070 * yy_get_next_buffer() to have set up
1071 * yytext, we can now set up
1072 * yy_c_buf_p so that if some total
1073 * hoser (like flex itself) wants to
1074 * call the scanner after we return the
1075 * YY_NULL, it'll still work - another
1076 * YY_NULL will get returned.
1077 */
1078 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1079
1080 yy_act = YY_STATE_EOF(YY_START);
1081 goto do_action;
1082 }
1083
1084 else
1085 {
1086 if ( ! (yy_did_buffer_switch_on_eof) )
1087 YY_NEW_FILE;
1088 }
1089 break;
1090 }
1091
1092 case EOB_ACT_CONTINUE_SCAN:
1093 (yy_c_buf_p) =
1094 (yytext_ptr) + yy_amount_of_matched_text;
1095
1096 yy_current_state = yy_get_previous_state( );
1097
1098 yy_cp = (yy_c_buf_p);
1099 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1100 goto yy_match;
1101
1102 case EOB_ACT_LAST_MATCH:
1103 (yy_c_buf_p) =
1104 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1105
1106 yy_current_state = yy_get_previous_state( );
1107
1108 yy_cp = (yy_c_buf_p);
1109 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1110 goto yy_find_action;
1111 }
1112 break;
1113 }
1114
1115 default:
1116 YY_FATAL_ERROR(
1117 "fatal flex scanner internal error--no action found" );
1118 } /* end of action switch */
1119 } /* end of scanning one token */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001120 } /* end of user's declarations */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001121} /* end of yylex */
1122
1123/* yy_get_next_buffer - try to read in a new buffer
1124 *
1125 * Returns a code representing an action:
1126 * EOB_ACT_LAST_MATCH -
1127 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1128 * EOB_ACT_END_OF_FILE - end of file
1129 */
1130static int yy_get_next_buffer (void)
1131{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001132 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1133 char *source = (yytext_ptr);
1134 yy_size_t number_to_move, i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001135 int ret_val;
1136
1137 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1138 YY_FATAL_ERROR(
1139 "fatal flex scanner internal error--end of buffer missed" );
1140
1141 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1142 { /* Don't try to fill the buffer, so this is an EOF. */
1143 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1144 {
1145 /* We matched a single character, the EOB, so
1146 * treat this as a final EOF.
1147 */
1148 return EOB_ACT_END_OF_FILE;
1149 }
1150
1151 else
1152 {
1153 /* We matched some text prior to the EOB, first
1154 * process it.
1155 */
1156 return EOB_ACT_LAST_MATCH;
1157 }
1158 }
1159
1160 /* Try to read more data. */
1161
1162 /* First move last chars to start of buffer. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001163 number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001164
1165 for ( i = 0; i < number_to_move; ++i )
1166 *(dest++) = *(source++);
1167
1168 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1169 /* don't do the read, it's not guaranteed to return an EOF,
1170 * just force an EOF
1171 */
1172 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1173
1174 else
1175 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001176 yy_size_t num_to_read =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001177 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1178
1179 while ( num_to_read <= 0 )
1180 { /* Not enough room in the buffer - grow it. */
1181
1182 /* just a shorter name for the current buffer */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001183 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001184
1185 int yy_c_buf_p_offset =
1186 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1187
1188 if ( b->yy_is_our_buffer )
1189 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001190 yy_size_t new_size = b->yy_buf_size * 2;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001191
1192 if ( new_size <= 0 )
1193 b->yy_buf_size += b->yy_buf_size / 8;
1194 else
1195 b->yy_buf_size *= 2;
1196
1197 b->yy_ch_buf = (char *)
1198 /* Include room in for 2 EOB chars. */
1199 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1200 }
1201 else
1202 /* Can't grow it, we don't own it. */
1203 b->yy_ch_buf = 0;
1204
1205 if ( ! b->yy_ch_buf )
1206 YY_FATAL_ERROR(
1207 "fatal error - scanner input buffer overflow" );
1208
1209 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1210
1211 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1212 number_to_move - 1;
1213
1214 }
1215
1216 if ( num_to_read > YY_READ_BUF_SIZE )
1217 num_to_read = YY_READ_BUF_SIZE;
1218
1219 /* Read in more data. */
1220 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001221 (yy_n_chars), num_to_read );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001222
1223 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1224 }
1225
1226 if ( (yy_n_chars) == 0 )
1227 {
1228 if ( number_to_move == YY_MORE_ADJ )
1229 {
1230 ret_val = EOB_ACT_END_OF_FILE;
1231 yyrestart(yyin );
1232 }
1233
1234 else
1235 {
1236 ret_val = EOB_ACT_LAST_MATCH;
1237 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1238 YY_BUFFER_EOF_PENDING;
1239 }
1240 }
1241
1242 else
1243 ret_val = EOB_ACT_CONTINUE_SCAN;
1244
Furquan Shaikhe6700292017-02-11 00:50:38 -08001245 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001246 /* Extend the array by 50%, plus the number we really need. */
Furquan Shaikhe6700292017-02-11 00:50:38 -08001247 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001248 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1249 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1250 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1251 }
1252
1253 (yy_n_chars) += number_to_move;
1254 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1255 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1256
1257 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1258
1259 return ret_val;
1260}
1261
1262/* yy_get_previous_state - get the state just before the EOB char was reached */
1263
1264 static yy_state_type yy_get_previous_state (void)
1265{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001266 yy_state_type yy_current_state;
1267 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001268
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001269 yy_current_state = (yy_start);
1270
1271 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1272 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001273 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001274 if ( yy_accept[yy_current_state] )
1275 {
1276 (yy_last_accepting_state) = yy_current_state;
1277 (yy_last_accepting_cpos) = yy_cp;
1278 }
1279 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1280 {
1281 yy_current_state = (int) yy_def[yy_current_state];
Furquan Shaikhe6700292017-02-11 00:50:38 -08001282 if ( yy_current_state >= 132 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001283 yy_c = yy_meta[(unsigned int) yy_c];
1284 }
1285 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1286 }
1287
1288 return yy_current_state;
1289}
1290
1291/* yy_try_NUL_trans - try to make a transition on the NUL character
1292 *
1293 * synopsis
1294 * next_state = yy_try_NUL_trans( current_state );
1295 */
1296 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1297{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001298 int yy_is_jam;
1299 char *yy_cp = (yy_c_buf_p);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001300
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001301 YY_CHAR yy_c = 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001302 if ( yy_accept[yy_current_state] )
1303 {
1304 (yy_last_accepting_state) = yy_current_state;
1305 (yy_last_accepting_cpos) = yy_cp;
1306 }
1307 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1308 {
1309 yy_current_state = (int) yy_def[yy_current_state];
Furquan Shaikhe6700292017-02-11 00:50:38 -08001310 if ( yy_current_state >= 132 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001311 yy_c = yy_meta[(unsigned int) yy_c];
1312 }
1313 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Furquan Shaikhe6700292017-02-11 00:50:38 -08001314 yy_is_jam = (yy_current_state == 131);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001315
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001316 return yy_is_jam ? 0 : yy_current_state;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001317}
1318
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001319#ifndef YY_NO_UNPUT
1320
1321 static void yyunput (int c, char * yy_bp )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001322{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001323 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001324
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001325 yy_cp = (yy_c_buf_p);
1326
1327 /* undo effects of setting up yytext */
1328 *yy_cp = (yy_hold_char);
1329
1330 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1331 { /* need to shift things up to make room */
1332 /* +2 for EOB chars. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001333 yy_size_t number_to_move = (yy_n_chars) + 2;
1334 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001335 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001336 char *source =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001337 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1338
1339 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1340 *--dest = *--source;
1341
1342 yy_cp += (int) (dest - source);
1343 yy_bp += (int) (dest - source);
1344 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1345 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1346
1347 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1348 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1349 }
1350
1351 *--yy_cp = (char) c;
1352
1353 (yytext_ptr) = yy_bp;
1354 (yy_hold_char) = *yy_cp;
1355 (yy_c_buf_p) = yy_cp;
1356}
1357
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001358#endif
1359
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001360#ifndef YY_NO_INPUT
1361#ifdef __cplusplus
1362 static int yyinput (void)
1363#else
1364 static int input (void)
1365#endif
1366
1367{
1368 int c;
Patrick Georgi8d313682010-05-05 13:12:42 +00001369
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001370 *(yy_c_buf_p) = (yy_hold_char);
1371
1372 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1373 {
1374 /* yy_c_buf_p now points to the character we want to return.
1375 * If this occurs *before* the EOB characters, then it's a
1376 * valid NUL; if not, then we've hit the end of the buffer.
1377 */
1378 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1379 /* This was really a NUL. */
1380 *(yy_c_buf_p) = '\0';
1381
1382 else
1383 { /* need more input */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001384 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001385 ++(yy_c_buf_p);
1386
1387 switch ( yy_get_next_buffer( ) )
1388 {
1389 case EOB_ACT_LAST_MATCH:
1390 /* This happens because yy_g_n_b()
1391 * sees that we've accumulated a
1392 * token and flags that we need to
1393 * try matching the token before
1394 * proceeding. But for input(),
1395 * there's no matching to consider.
1396 * So convert the EOB_ACT_LAST_MATCH
1397 * to EOB_ACT_END_OF_FILE.
1398 */
1399
1400 /* Reset buffer status. */
1401 yyrestart(yyin );
1402
1403 /*FALLTHROUGH*/
1404
1405 case EOB_ACT_END_OF_FILE:
1406 {
1407 if ( yywrap( ) )
1408 return EOF;
1409
1410 if ( ! (yy_did_buffer_switch_on_eof) )
1411 YY_NEW_FILE;
1412#ifdef __cplusplus
1413 return yyinput();
1414#else
1415 return input();
1416#endif
1417 }
1418
1419 case EOB_ACT_CONTINUE_SCAN:
1420 (yy_c_buf_p) = (yytext_ptr) + offset;
1421 break;
1422 }
1423 }
1424 }
1425
1426 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1427 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1428 (yy_hold_char) = *++(yy_c_buf_p);
1429
1430 return c;
1431}
1432#endif /* ifndef YY_NO_INPUT */
1433
1434/** Immediately switch to a different input stream.
1435 * @param input_file A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001436 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001437 * @note This function does not reset the start condition to @c INITIAL .
1438 */
1439 void yyrestart (FILE * input_file )
1440{
Patrick Georgi8d313682010-05-05 13:12:42 +00001441
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001442 if ( ! YY_CURRENT_BUFFER ){
1443 yyensure_buffer_stack ();
1444 YY_CURRENT_BUFFER_LVALUE =
1445 yy_create_buffer(yyin,YY_BUF_SIZE );
1446 }
1447
1448 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1449 yy_load_buffer_state( );
1450}
1451
1452/** Switch to a different input buffer.
1453 * @param new_buffer The new input buffer.
Patrick Georgi8d313682010-05-05 13:12:42 +00001454 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001455 */
1456 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1457{
Patrick Georgi8d313682010-05-05 13:12:42 +00001458
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001459 /* TODO. We should be able to replace this entire function body
1460 * with
1461 * yypop_buffer_state();
1462 * yypush_buffer_state(new_buffer);
1463 */
1464 yyensure_buffer_stack ();
1465 if ( YY_CURRENT_BUFFER == new_buffer )
1466 return;
1467
1468 if ( YY_CURRENT_BUFFER )
1469 {
1470 /* Flush out information for old buffer. */
1471 *(yy_c_buf_p) = (yy_hold_char);
1472 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1473 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1474 }
1475
1476 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1477 yy_load_buffer_state( );
1478
1479 /* We don't actually know whether we did this switch during
1480 * EOF (yywrap()) processing, but the only time this flag
1481 * is looked at is after yywrap() is called, so it's safe
1482 * to go ahead and always set it.
1483 */
1484 (yy_did_buffer_switch_on_eof) = 1;
1485}
1486
1487static void yy_load_buffer_state (void)
1488{
1489 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1490 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1491 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1492 (yy_hold_char) = *(yy_c_buf_p);
1493}
1494
1495/** Allocate and initialize an input buffer state.
1496 * @param file A readable stream.
1497 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Patrick Georgi8d313682010-05-05 13:12:42 +00001498 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001499 * @return the allocated buffer state.
1500 */
1501 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1502{
1503 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001504
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001505 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1506 if ( ! b )
1507 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1508
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001509 b->yy_buf_size = (yy_size_t)size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001510
1511 /* yy_ch_buf has to be 2 characters longer than the size given because
1512 * we need to put in 2 end-of-buffer characters.
1513 */
1514 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1515 if ( ! b->yy_ch_buf )
1516 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1517
1518 b->yy_is_our_buffer = 1;
1519
1520 yy_init_buffer(b,file );
1521
1522 return b;
1523}
1524
1525/** Destroy the buffer.
1526 * @param b a buffer created with yy_create_buffer()
Patrick Georgi8d313682010-05-05 13:12:42 +00001527 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001528 */
1529 void yy_delete_buffer (YY_BUFFER_STATE b )
1530{
Patrick Georgi8d313682010-05-05 13:12:42 +00001531
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001532 if ( ! b )
1533 return;
1534
1535 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1536 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1537
1538 if ( b->yy_is_our_buffer )
1539 yyfree((void *) b->yy_ch_buf );
1540
1541 yyfree((void *) b );
1542}
1543
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001544/* Initializes or reinitializes a buffer.
1545 * This function is sometimes called more than once on the same buffer,
1546 * such as during a yyrestart() or at EOF.
1547 */
1548 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1549
1550{
1551 int oerrno = errno;
Patrick Georgi8d313682010-05-05 13:12:42 +00001552
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001553 yy_flush_buffer(b );
1554
1555 b->yy_input_file = file;
1556 b->yy_fill_buffer = 1;
1557
1558 /* If b is the current buffer, then yy_init_buffer was _probably_
1559 * called from yyrestart() or through yy_get_next_buffer.
1560 * In that case, we don't want to reset the lineno or column.
1561 */
1562 if (b != YY_CURRENT_BUFFER){
1563 b->yy_bs_lineno = 1;
1564 b->yy_bs_column = 0;
1565 }
1566
1567 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Patrick Georgi8d313682010-05-05 13:12:42 +00001568
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001569 errno = oerrno;
1570}
1571
1572/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1573 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Patrick Georgi8d313682010-05-05 13:12:42 +00001574 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001575 */
1576 void yy_flush_buffer (YY_BUFFER_STATE b )
1577{
1578 if ( ! b )
1579 return;
1580
1581 b->yy_n_chars = 0;
1582
1583 /* We always need two end-of-buffer characters. The first causes
1584 * a transition to the end-of-buffer state. The second causes
1585 * a jam in that state.
1586 */
1587 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1588 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1589
1590 b->yy_buf_pos = &b->yy_ch_buf[0];
1591
1592 b->yy_at_bol = 1;
1593 b->yy_buffer_status = YY_BUFFER_NEW;
1594
1595 if ( b == YY_CURRENT_BUFFER )
1596 yy_load_buffer_state( );
1597}
1598
1599/** Pushes the new state onto the stack. The new state becomes
1600 * the current state. This function will allocate the stack
1601 * if necessary.
1602 * @param new_buffer The new state.
Patrick Georgi8d313682010-05-05 13:12:42 +00001603 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001604 */
1605void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1606{
1607 if (new_buffer == NULL)
1608 return;
1609
1610 yyensure_buffer_stack();
1611
1612 /* This block is copied from yy_switch_to_buffer. */
1613 if ( YY_CURRENT_BUFFER )
1614 {
1615 /* Flush out information for old buffer. */
1616 *(yy_c_buf_p) = (yy_hold_char);
1617 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1618 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1619 }
1620
1621 /* Only push if top exists. Otherwise, replace top. */
1622 if (YY_CURRENT_BUFFER)
1623 (yy_buffer_stack_top)++;
1624 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1625
1626 /* copied from yy_switch_to_buffer. */
1627 yy_load_buffer_state( );
1628 (yy_did_buffer_switch_on_eof) = 1;
1629}
1630
1631/** Removes and deletes the top of the stack, if present.
1632 * The next element becomes the new top.
Patrick Georgi8d313682010-05-05 13:12:42 +00001633 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001634 */
1635void yypop_buffer_state (void)
1636{
1637 if (!YY_CURRENT_BUFFER)
1638 return;
1639
1640 yy_delete_buffer(YY_CURRENT_BUFFER );
1641 YY_CURRENT_BUFFER_LVALUE = NULL;
1642 if ((yy_buffer_stack_top) > 0)
1643 --(yy_buffer_stack_top);
1644
1645 if (YY_CURRENT_BUFFER) {
1646 yy_load_buffer_state( );
1647 (yy_did_buffer_switch_on_eof) = 1;
1648 }
1649}
1650
1651/* Allocates the stack if it does not exist.
1652 * Guarantees space for at least one push.
1653 */
1654static void yyensure_buffer_stack (void)
1655{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001656 yy_size_t num_to_alloc;
Patrick Georgi8d313682010-05-05 13:12:42 +00001657
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001658 if (!(yy_buffer_stack)) {
1659
1660 /* First allocation is just for 2 elements, since we don't know if this
1661 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1662 * immediate realloc on the next call.
1663 */
Furquan Shaikhe6700292017-02-11 00:50:38 -08001664 num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001665 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1666 (num_to_alloc * sizeof(struct yy_buffer_state*)
1667 );
1668 if ( ! (yy_buffer_stack) )
1669 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Patrick Georgi8d313682010-05-05 13:12:42 +00001670
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001671 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Patrick Georgi8d313682010-05-05 13:12:42 +00001672
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001673 (yy_buffer_stack_max) = num_to_alloc;
1674 (yy_buffer_stack_top) = 0;
1675 return;
1676 }
1677
1678 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1679
1680 /* Increase the buffer to prepare for a possible push. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001681 yy_size_t grow_size = 8 /* arbitrary grow size */;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001682
1683 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1684 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1685 ((yy_buffer_stack),
1686 num_to_alloc * sizeof(struct yy_buffer_state*)
1687 );
1688 if ( ! (yy_buffer_stack) )
1689 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1690
1691 /* zero only the new slots.*/
1692 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1693 (yy_buffer_stack_max) = num_to_alloc;
1694 }
1695}
1696
1697/** Setup the input buffer state to scan directly from a user-specified character buffer.
1698 * @param base the character buffer
1699 * @param size the size in bytes of the character buffer
Patrick Georgi8d313682010-05-05 13:12:42 +00001700 *
1701 * @return the newly allocated buffer state object.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001702 */
1703YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1704{
1705 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001706
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001707 if ( size < 2 ||
1708 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1709 base[size-1] != YY_END_OF_BUFFER_CHAR )
1710 /* They forgot to leave room for the EOB's. */
1711 return 0;
1712
1713 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1714 if ( ! b )
1715 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1716
1717 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1718 b->yy_buf_pos = b->yy_ch_buf = base;
1719 b->yy_is_our_buffer = 0;
1720 b->yy_input_file = 0;
1721 b->yy_n_chars = b->yy_buf_size;
1722 b->yy_is_interactive = 0;
1723 b->yy_at_bol = 1;
1724 b->yy_fill_buffer = 0;
1725 b->yy_buffer_status = YY_BUFFER_NEW;
1726
1727 yy_switch_to_buffer(b );
1728
1729 return b;
1730}
1731
1732/** Setup the input buffer state to scan a string. The next call to yylex() will
1733 * scan from a @e copy of @a str.
1734 * @param yystr a NUL-terminated string to scan
Patrick Georgi8d313682010-05-05 13:12:42 +00001735 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001736 * @return the newly allocated buffer state object.
1737 * @note If you want to scan bytes that may contain NUL values, then use
1738 * yy_scan_bytes() instead.
1739 */
1740YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1741{
Patrick Georgi8d313682010-05-05 13:12:42 +00001742
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001743 return yy_scan_bytes(yystr,strlen(yystr) );
1744}
1745
1746/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1747 * scan from a @e copy of @a bytes.
Patrick Georgi8d313682010-05-05 13:12:42 +00001748 * @param yybytes the byte buffer to scan
1749 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1750 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001751 * @return the newly allocated buffer state object.
1752 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001753YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001754{
1755 YY_BUFFER_STATE b;
1756 char *buf;
1757 yy_size_t n;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001758 yy_size_t i;
Patrick Georgi8d313682010-05-05 13:12:42 +00001759
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001760 /* Get memory for full buffer, including space for trailing EOB's. */
1761 n = _yybytes_len + 2;
1762 buf = (char *) yyalloc(n );
1763 if ( ! buf )
1764 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1765
1766 for ( i = 0; i < _yybytes_len; ++i )
1767 buf[i] = yybytes[i];
1768
1769 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1770
1771 b = yy_scan_buffer(buf,n );
1772 if ( ! b )
1773 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1774
1775 /* It's okay to grow etc. this buffer, and we should throw it
1776 * away when we're done.
1777 */
1778 b->yy_is_our_buffer = 1;
1779
1780 return b;
1781}
1782
1783#ifndef YY_EXIT_FAILURE
1784#define YY_EXIT_FAILURE 2
1785#endif
1786
1787static void yy_fatal_error (yyconst char* msg )
1788{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001789 (void) fprintf( stderr, "%s\n", msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001790 exit( YY_EXIT_FAILURE );
1791}
1792
1793/* Redefine yyless() so it works in section 3 code. */
1794
1795#undef yyless
1796#define yyless(n) \
1797 do \
1798 { \
1799 /* Undo effects of setting up yytext. */ \
1800 int yyless_macro_arg = (n); \
1801 YY_LESS_LINENO(yyless_macro_arg);\
1802 yytext[yyleng] = (yy_hold_char); \
1803 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1804 (yy_hold_char) = *(yy_c_buf_p); \
1805 *(yy_c_buf_p) = '\0'; \
1806 yyleng = yyless_macro_arg; \
1807 } \
1808 while ( 0 )
1809
1810/* Accessor methods (get/set functions) to struct members. */
1811
1812/** Get the current line number.
Patrick Georgi8d313682010-05-05 13:12:42 +00001813 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001814 */
1815int yyget_lineno (void)
1816{
Patrick Georgi8d313682010-05-05 13:12:42 +00001817
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001818 return yylineno;
1819}
1820
1821/** Get the input stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001822 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001823 */
1824FILE *yyget_in (void)
1825{
1826 return yyin;
1827}
1828
1829/** Get the output stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001830 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001831 */
1832FILE *yyget_out (void)
1833{
1834 return yyout;
1835}
1836
1837/** Get the length of the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001838 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001839 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001840yy_size_t yyget_leng (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001841{
1842 return yyleng;
1843}
1844
1845/** Get the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001846 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001847 */
1848
1849char *yyget_text (void)
1850{
1851 return yytext;
1852}
1853
1854/** Set the current line number.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001855 * @param _line_number line number
Patrick Georgi8d313682010-05-05 13:12:42 +00001856 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001857 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001858void yyset_lineno (int _line_number )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001859{
Patrick Georgi8d313682010-05-05 13:12:42 +00001860
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001861 yylineno = _line_number;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001862}
1863
1864/** Set the input stream. This does not discard the current
1865 * input buffer.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001866 * @param _in_str A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001867 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001868 * @see yy_switch_to_buffer
1869 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001870void yyset_in (FILE * _in_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001871{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001872 yyin = _in_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001873}
1874
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001875void yyset_out (FILE * _out_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001876{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001877 yyout = _out_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001878}
1879
1880int yyget_debug (void)
1881{
1882 return yy_flex_debug;
1883}
1884
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001885void yyset_debug (int _bdebug )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001886{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001887 yy_flex_debug = _bdebug ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001888}
1889
1890static int yy_init_globals (void)
1891{
1892 /* Initialization is the same as for the non-reentrant scanner.
1893 * This function is called from yylex_destroy(), so don't allocate here.
1894 */
1895
1896 (yy_buffer_stack) = 0;
1897 (yy_buffer_stack_top) = 0;
1898 (yy_buffer_stack_max) = 0;
1899 (yy_c_buf_p) = (char *) 0;
1900 (yy_init) = 0;
1901 (yy_start) = 0;
1902
1903/* Defined in main.c */
1904#ifdef YY_STDINIT
1905 yyin = stdin;
1906 yyout = stdout;
1907#else
1908 yyin = (FILE *) 0;
1909 yyout = (FILE *) 0;
1910#endif
1911
1912 /* For future reference: Set errno on error, since we are called by
1913 * yylex_init()
1914 */
1915 return 0;
1916}
1917
1918/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1919int yylex_destroy (void)
1920{
Patrick Georgi8d313682010-05-05 13:12:42 +00001921
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001922 /* Pop the buffer stack, destroying each element. */
1923 while(YY_CURRENT_BUFFER){
1924 yy_delete_buffer(YY_CURRENT_BUFFER );
1925 YY_CURRENT_BUFFER_LVALUE = NULL;
1926 yypop_buffer_state();
1927 }
1928
1929 /* Destroy the stack itself. */
1930 yyfree((yy_buffer_stack) );
1931 (yy_buffer_stack) = NULL;
1932
1933 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1934 * yylex() is called, initialization will occur. */
1935 yy_init_globals( );
1936
1937 return 0;
1938}
1939
1940/*
1941 * Internal utility routines.
1942 */
1943
1944#ifndef yytext_ptr
1945static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1946{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001947
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001948 int i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001949 for ( i = 0; i < n; ++i )
1950 s1[i] = s2[i];
1951}
1952#endif
1953
1954#ifdef YY_NEED_STRLEN
1955static int yy_flex_strlen (yyconst char * s )
1956{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001957 int n;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001958 for ( n = 0; s[n]; ++n )
1959 ;
1960
1961 return n;
1962}
1963#endif
1964
1965void *yyalloc (yy_size_t size )
1966{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001967 return (void *) malloc( size );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001968}
1969
1970void *yyrealloc (void * ptr, yy_size_t size )
1971{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001972
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001973 /* The cast to (char *) in the following accommodates both
1974 * implementations that use char* generic pointers, and those
1975 * that use void* generic pointers. It works with the latter
1976 * because both ANSI C and C++ allow castless assignment from
1977 * any pointer type to void*, and deal with argument conversions
1978 * as though doing an assignment.
1979 */
1980 return (void *) realloc( (char *) ptr, size );
1981}
1982
1983void yyfree (void * ptr )
1984{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001985 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001986}
1987
1988#define YYTABLES_NAME "yytables"
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001989