blob: 14ffeff9a2b4df0571f97f0d2c48a0938d087763 [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
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08009#define YY_FLEX_SUBMINOR_VERSION 1
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
Justin TerAvestca2ed9f2018-01-17 16:36:30 -080088/* TODO: this is always defined, so inline it */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000089#define yyconst const
Justin TerAvestca2ed9f2018-01-17 16:36:30 -080090
91#if defined(__GNUC__) && __GNUC__ >= 3
92#define yynoreturn __attribute__((__noreturn__))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000093#else
Justin TerAvestca2ed9f2018-01-17 16:36:30 -080094#define yynoreturn
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000095#endif
96
97/* Returned upon end-of-file. */
98#define YY_NULL 0
99
100/* Promotes a possibly negative, possibly signed char to an unsigned
101 * integer for use as an array index. If the signed char is negative,
102 * we want to instead treat it as an 8-bit unsigned char, hence the
103 * double cast.
104 */
105#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
106
107/* Enter a start condition. This macro really ought to take a parameter,
108 * but we do it the disgusting crufty way forced on us by the ()-less
109 * definition of BEGIN.
110 */
111#define BEGIN (yy_start) = 1 + 2 *
112
113/* Translate the current start state into a value that can be later handed
114 * to BEGIN to return to the state. The YYSTATE alias is for lex
115 * compatibility.
116 */
117#define YY_START (((yy_start) - 1) / 2)
118#define YYSTATE YY_START
119
120/* Action number for EOF rule of a given start state. */
121#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
122
123/* Special action meaning "start processing a new file". */
124#define YY_NEW_FILE yyrestart(yyin )
125
126#define YY_END_OF_BUFFER_CHAR 0
127
128/* Size of default input buffer. */
129#ifndef YY_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000130#ifdef __ia64__
131/* On IA-64, the buffer size is 16k, not 8k.
132 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
133 * Ditto for the __ia64__ case accordingly.
134 */
135#define YY_BUF_SIZE 32768
136#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000137#define YY_BUF_SIZE 16384
Patrick Georgi8d313682010-05-05 13:12:42 +0000138#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000139#endif
140
141/* The state buf must be large enough to hold one state per character in the main buffer.
142 */
143#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
144
145#ifndef YY_TYPEDEF_YY_BUFFER_STATE
146#define YY_TYPEDEF_YY_BUFFER_STATE
147typedef struct yy_buffer_state *YY_BUFFER_STATE;
148#endif
149
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700150#ifndef YY_TYPEDEF_YY_SIZE_T
151#define YY_TYPEDEF_YY_SIZE_T
152typedef size_t yy_size_t;
153#endif
154
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800155extern int yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000156
157extern FILE *yyin, *yyout;
158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
163 #define YY_LESS_LINENO(n)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700164 #define YY_LINENO_REWIND_TO(ptr)
Patrick Georgi8d313682010-05-05 13:12:42 +0000165
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000166/* Return all but the first "n" matched characters back to the input stream. */
167#define yyless(n) \
168 do \
169 { \
170 /* Undo effects of setting up yytext. */ \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200171 yy_size_t yyless_macro_arg = (n); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000172 YY_LESS_LINENO(yyless_macro_arg);\
173 *yy_cp = (yy_hold_char); \
174 YY_RESTORE_YY_MORE_OFFSET \
175 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
176 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
177 } \
178 while ( 0 )
179
180#define unput(c) yyunput( c, (yytext_ptr) )
181
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000182#ifndef YY_STRUCT_YY_BUFFER_STATE
183#define YY_STRUCT_YY_BUFFER_STATE
184struct yy_buffer_state
185 {
186 FILE *yy_input_file;
187
188 char *yy_ch_buf; /* input buffer */
189 char *yy_buf_pos; /* current position in input buffer */
190
191 /* Size of input buffer in bytes, not including room for EOB
192 * characters.
193 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800194 int yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000195
196 /* Number of characters read into yy_ch_buf, not including EOB
197 * characters.
198 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800199 int yy_n_chars;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000200
201 /* Whether we "own" the buffer - i.e., we know we created it,
202 * and can realloc() it to grow it, and should free() it to
203 * delete it.
204 */
205 int yy_is_our_buffer;
206
207 /* Whether this is an "interactive" input source; if so, and
208 * if we're using stdio for input, then we want to use getc()
209 * instead of fread(), to make sure we stop fetching input after
210 * each newline.
211 */
212 int yy_is_interactive;
213
214 /* Whether we're considered to be at the beginning of a line.
215 * If so, '^' rules will be active on the next match, otherwise
216 * not.
217 */
218 int yy_at_bol;
219
220 int yy_bs_lineno; /**< The line count. */
221 int yy_bs_column; /**< The column count. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800222
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000223 /* Whether to try to fill the input buffer when we reach the
224 * end of it.
225 */
226 int yy_fill_buffer;
227
228 int yy_buffer_status;
229
230#define YY_BUFFER_NEW 0
231#define YY_BUFFER_NORMAL 1
232 /* When an EOF's been seen but there's still some text to process
233 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
234 * shouldn't try reading from the input source any more. We might
235 * still have a bunch of tokens to match, though, because of
236 * possible backing-up.
237 *
238 * When we actually see the EOF, we change the status to "new"
239 * (via yyrestart()), so that the user can continue scanning by
240 * just pointing yyin at a new input file.
241 */
242#define YY_BUFFER_EOF_PENDING 2
243
244 };
245#endif /* !YY_STRUCT_YY_BUFFER_STATE */
246
247/* Stack of input buffers. */
248static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
249static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800250static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000251
252/* We provide macros for accessing buffer states in case in the
253 * future we want to put the buffer states in a more general
254 * "scanner state".
255 *
256 * Returns the top of the stack, or NULL.
257 */
258#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
259 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
260 : NULL)
261
262/* Same as previous macro, but useful when we know that the buffer stack is not
263 * NULL or when we need an lvalue. For internal use only.
264 */
265#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
266
267/* yy_hold_char holds the character lost when yytext is formed. */
268static char yy_hold_char;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800269static int yy_n_chars; /* number of characters read into yy_ch_buf */
270int yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000271
272/* Points to current character in buffer. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800273static char *yy_c_buf_p = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000274static int yy_init = 0; /* whether we need to initialize */
275static int yy_start = 0; /* start state number */
276
277/* Flag which is used to allow yywrap()'s to do buffer switches
278 * instead of setting up a fresh yyin. A bit of a hack ...
279 */
280static int yy_did_buffer_switch_on_eof;
281
282void yyrestart (FILE *input_file );
283void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
284YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
285void yy_delete_buffer (YY_BUFFER_STATE b );
286void yy_flush_buffer (YY_BUFFER_STATE b );
287void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
288void yypop_buffer_state (void );
289
290static void yyensure_buffer_stack (void );
291static void yy_load_buffer_state (void );
292static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
293
294#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
295
296YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
297YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800298YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000299
300void *yyalloc (yy_size_t );
301void *yyrealloc (void *,yy_size_t );
302void yyfree (void * );
303
304#define yy_new_buffer yy_create_buffer
305
306#define yy_set_interactive(is_interactive) \
307 { \
308 if ( ! YY_CURRENT_BUFFER ){ \
309 yyensure_buffer_stack (); \
310 YY_CURRENT_BUFFER_LVALUE = \
311 yy_create_buffer(yyin,YY_BUF_SIZE ); \
312 } \
313 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
314 }
315
316#define yy_set_bol(at_bol) \
317 { \
318 if ( ! YY_CURRENT_BUFFER ){\
319 yyensure_buffer_stack (); \
320 YY_CURRENT_BUFFER_LVALUE = \
321 yy_create_buffer(yyin,YY_BUF_SIZE ); \
322 } \
323 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
324 }
325
326#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
327
328/* Begin user sect3 */
329
330typedef unsigned char YY_CHAR;
331
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800332FILE *yyin = NULL, *yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000333
334typedef int yy_state_type;
335
336extern int yylineno;
337
338int yylineno = 1;
339
340extern char *yytext;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700341#ifdef yytext_ptr
342#undef yytext_ptr
343#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000344#define yytext_ptr yytext
345
346static yy_state_type yy_get_previous_state (void );
347static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
348static int yy_get_next_buffer (void );
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800349static void yynoreturn yy_fatal_error (yyconst char* msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000350
351/* Done after the current pattern has been matched and before the
352 * corresponding action - sets up yytext.
353 */
354#define YY_DO_BEFORE_ACTION \
355 (yytext_ptr) = yy_bp; \
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800356 yyleng = (int) (yy_cp - yy_bp); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000357 (yy_hold_char) = *yy_cp; \
358 *yy_cp = '\0'; \
359 (yy_c_buf_p) = yy_cp;
360
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200361#define YY_NUM_RULES 38
362#define YY_END_OF_BUFFER 39
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000363/* This struct is not used in this scanner,
364 but its presence is necessary. */
365struct yy_trans_info
366 {
367 flex_int32_t yy_verify;
368 flex_int32_t yy_nxt;
369 };
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200370static yyconst flex_int16_t yy_accept[160] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000371 { 0,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200372 0, 0, 39, 37, 1, 3, 37, 37, 37, 32,
373 32, 30, 33, 37, 33, 33, 33, 37, 37, 37,
374 37, 37, 37, 37, 37, 37, 37, 37, 1, 3,
375 37, 0, 37, 37, 0, 2, 32, 33, 37, 37,
376 37, 37, 33, 37, 37, 37, 37, 37, 37, 37,
377 24, 37, 37, 37, 37, 7, 37, 37, 37, 37,
378 37, 37, 37, 36, 36, 37, 0, 31, 37, 37,
379 16, 37, 37, 23, 28, 37, 37, 13, 37, 37,
380 22, 37, 37, 8, 10, 12, 37, 37, 20, 37,
381 21, 37, 0, 34, 4, 37, 37, 37, 37, 37,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000382
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200383 37, 37, 37, 19, 37, 37, 37, 35, 35, 37,
384 37, 37, 37, 37, 37, 37, 14, 37, 37, 37,
385 37, 5, 17, 37, 9, 37, 11, 37, 37, 37,
386 37, 18, 26, 37, 37, 37, 37, 37, 37, 6,
387 37, 37, 37, 37, 37, 37, 37, 25, 37, 37,
388 15, 37, 27, 37, 37, 37, 37, 29, 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000389 } ;
390
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700391static yyconst YY_CHAR yy_ec[256] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000392 { 0,
393 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
394 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 7, 1, 8, 7, 9,
398 7, 7, 7, 7, 7, 7, 7, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200399 10, 1, 1, 1, 11, 11, 11, 11, 12, 12,
400 1, 1, 13, 1, 1, 1, 1, 14, 1, 1,
401 1, 1, 1, 15, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000403
Patrick Georgi2b108a42012-07-13 12:02:44 +0200404 21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
405 29, 30, 31, 32, 33, 34, 35, 36, 1, 37,
406 38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
421 } ;
422
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700423static yyconst YY_CHAR yy_meta[39] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000424 { 0,
425 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200428 1, 1, 1, 1, 1, 1, 1, 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000429 } ;
430
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200431static yyconst flex_uint16_t yy_base[167] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000432 { 0,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200433 0, 0, 227, 0, 224, 228, 222, 37, 41, 38,
434 187, 0, 44, 209, 54, 78, 60, 201, 196, 45,
435 203, 192, 42, 47, 197, 62, 184, 0, 214, 228,
436 77, 210, 88, 69, 211, 228, 0, 87, 104, 198,
437 187, 176, 93, 183, 178, 188, 179, 186, 186, 180,
438 186, 171, 171, 175, 177, 0, 173, 167, 173, 177,
439 169, 175, 174, 0, 228, 101, 186, 0, 179, 159,
440 172, 162, 169, 0, 0, 164, 164, 0, 162, 152,
441 0, 156, 151, 0, 0, 0, 154, 153, 0, 144,
442 0, 171, 170, 0, 0, 155, 154, 147, 139, 149,
Patrick Georgi8d313682010-05-05 13:12:42 +0000443
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200444 137, 143, 148, 0, 133, 136, 126, 0, 228, 137,
445 141, 133, 135, 131, 133, 138, 0, 122, 122, 121,
446 118, 0, 0, 133, 0, 117, 134, 128, 132, 113,
447 113, 0, 0, 120, 112, 110, 121, 94, 95, 0,
448 94, 92, 97, 86, 85, 84, 76, 0, 71, 78,
449 0, 67, 0, 61, 55, 32, 29, 0, 228, 40,
450 129, 131, 133, 135, 137, 139
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000451 } ;
452
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200453static yyconst flex_int16_t yy_def[167] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000454 { 0,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200455 159, 1, 159, 160, 159, 159, 160, 161, 162, 160,
456 10, 160, 10, 160, 10, 10, 10, 160, 160, 160,
457 160, 160, 160, 160, 160, 160, 160, 160, 159, 159,
458 161, 163, 164, 162, 165, 159, 10, 10, 10, 160,
459 160, 160, 10, 160, 160, 160, 160, 160, 160, 160,
460 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
461 160, 160, 160, 160, 159, 164, 166, 39, 160, 160,
462 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
463 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
464 160, 160, 159, 160, 160, 160, 160, 160, 160, 160,
Patrick Georgi8d313682010-05-05 13:12:42 +0000465
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200466 160, 160, 160, 160, 160, 160, 160, 160, 159, 160,
467 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
468 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
469 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
470 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
471 160, 160, 160, 160, 160, 160, 160, 160, 0, 159,
472 159, 159, 159, 159, 159, 159
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000473 } ;
474
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200475static yyconst flex_uint16_t yy_nxt[267] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000476 { 0,
477 4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200478 13, 13, 14, 4, 4, 4, 13, 13, 15, 16,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800479 17, 13, 18, 19, 20, 21, 22, 4, 23, 24,
480 4, 25, 26, 4, 27, 4, 4, 4, 32, 32,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200481 28, 33, 35, 36, 37, 37, 37, 158, 38, 38,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800482 38, 38, 38, 49, 38, 38, 38, 38, 38, 38,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200483 38, 38, 38, 55, 157, 57, 38, 38, 38, 56,
484 35, 36, 50, 51, 58, 156, 52, 41, 32, 32,
485 155, 64, 154, 42, 38, 38, 38, 46, 60, 67,
486 67, 61, 28, 38, 38, 38, 62, 153, 43, 38,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000487
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200488 38, 38, 67, 67, 152, 92, 44, 151, 150, 45,
489 68, 68, 68, 149, 68, 68, 148, 147, 146, 145,
490 68, 68, 68, 68, 68, 68, 144, 143, 72, 31,
491 31, 34, 34, 32, 32, 66, 66, 35, 35, 67,
492 67, 142, 141, 140, 139, 138, 137, 136, 135, 134,
493 133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
494 123, 122, 121, 120, 119, 118, 117, 116, 115, 114,
495 113, 112, 111, 110, 109, 108, 107, 106, 105, 104,
496 103, 102, 101, 100, 99, 98, 97, 96, 95, 94,
497 93, 91, 90, 89, 88, 87, 86, 85, 84, 83,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000498
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200499 82, 81, 80, 79, 78, 77, 76, 75, 74, 73,
500 71, 70, 69, 36, 65, 29, 63, 59, 54, 53,
501 48, 47, 40, 39, 30, 29, 159, 3, 159, 159,
502 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
503 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
504 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
505 159, 159, 159, 159, 159, 159
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000506 } ;
507
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200508static yyconst flex_int16_t yy_chk[267] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000509 { 0,
510 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
511 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
512 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200513 1, 1, 1, 1, 1, 1, 1, 1, 8, 8,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200514 160, 8, 9, 9, 10, 10, 10, 157, 10, 10,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800515 13, 13, 13, 20, 10, 10, 10, 10, 10, 10,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200516 15, 15, 15, 23, 156, 24, 17, 17, 17, 23,
517 34, 34, 20, 20, 24, 155, 20, 15, 31, 31,
518 154, 31, 152, 15, 16, 16, 16, 17, 26, 33,
519 33, 26, 33, 38, 38, 38, 26, 150, 16, 43,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000520
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200521 43, 43, 66, 66, 149, 66, 16, 147, 146, 16,
522 39, 39, 39, 145, 39, 39, 144, 143, 142, 141,
523 39, 39, 39, 39, 39, 39, 139, 138, 43, 161,
524 161, 162, 162, 163, 163, 164, 164, 165, 165, 166,
525 166, 137, 136, 135, 134, 131, 130, 129, 128, 127,
526 126, 124, 121, 120, 119, 118, 116, 115, 114, 113,
527 112, 111, 110, 107, 106, 105, 103, 102, 101, 100,
528 99, 98, 97, 96, 93, 92, 90, 88, 87, 83,
529 82, 80, 79, 77, 76, 73, 72, 71, 70, 69,
530 67, 63, 62, 61, 60, 59, 58, 57, 55, 54,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000531
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200532 53, 52, 51, 50, 49, 48, 47, 46, 45, 44,
533 42, 41, 40, 35, 32, 29, 27, 25, 22, 21,
534 19, 18, 14, 11, 7, 5, 3, 159, 159, 159,
535 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
536 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
537 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
538 159, 159, 159, 159, 159, 159
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000539 } ;
540
541static yy_state_type yy_last_accepting_state;
542static char *yy_last_accepting_cpos;
543
544extern int yy_flex_debug;
545int yy_flex_debug = 0;
546
547/* The intent behind this definition is that it'll catch
548 * any uses of REJECT which flex missed.
549 */
550#define REJECT reject_used_but_not_detected
551#define yymore() yymore_used_but_not_detected
552#define YY_MORE_ADJ 0
553#define YY_RESTORE_YY_MORE_OFFSET
554char *yytext;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000555/*
556 * sconfig, coreboot device tree compiler
557 *
558 * Copyright (C) 2010 coresystems GmbH
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700559 * written by Patrick Georgi <patrick@georgi-clan.de>
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000560 *
561 * This program is free software; you can redistribute it and/or modify
562 * it under the terms of the GNU General Public License as published by
563 * the Free Software Foundation; version 2 of the License.
564 *
565 * This program is distributed in the hope that it will be useful,
566 * but WITHOUT ANY WARRANTY; without even the implied warranty of
567 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
568 * GNU General Public License for more details.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000569 */
570
571#include "sconfig.tab.h"
572
573int linenum = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000574
575#define INITIAL 0
576
577#ifndef YY_NO_UNISTD_H
578/* Special case for "unistd.h", since it is non-ANSI. We include it way
579 * down here because we want the user's section 1 to have been scanned first.
580 * The user has a chance to override it with an option.
581 */
582#include <unistd.h>
583#endif
584
585#ifndef YY_EXTRA_TYPE
586#define YY_EXTRA_TYPE void *
587#endif
588
589static int yy_init_globals (void );
590
591/* Accessor methods to globals.
592 These are made visible to non-reentrant scanners for convenience. */
593
594int yylex_destroy (void );
595
596int yyget_debug (void );
597
598void yyset_debug (int debug_flag );
599
600YY_EXTRA_TYPE yyget_extra (void );
601
602void yyset_extra (YY_EXTRA_TYPE user_defined );
603
604FILE *yyget_in (void );
605
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700606void yyset_in (FILE * _in_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000607
608FILE *yyget_out (void );
609
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700610void yyset_out (FILE * _out_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000611
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800612 int yyget_leng (void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000613
614char *yyget_text (void );
615
616int yyget_lineno (void );
617
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700618void yyset_lineno (int _line_number );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000619
620/* Macros after this point can all be overridden by user definitions in
621 * section 1.
622 */
623
624#ifndef YY_SKIP_YYWRAP
625#ifdef __cplusplus
626extern "C" int yywrap (void );
627#else
628extern int yywrap (void );
629#endif
630#endif
631
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700632#ifndef YY_NO_UNPUT
Furquan Shaikhe6700292017-02-11 00:50:38 -0800633
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000634 static void yyunput (int c,char *buf_ptr );
Patrick Georgi8d313682010-05-05 13:12:42 +0000635
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700636#endif
637
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000638#ifndef yytext_ptr
639static void yy_flex_strncpy (char *,yyconst char *,int );
640#endif
641
642#ifdef YY_NEED_STRLEN
643static int yy_flex_strlen (yyconst char * );
644#endif
645
646#ifndef YY_NO_INPUT
647
648#ifdef __cplusplus
649static int yyinput (void );
650#else
651static int input (void );
652#endif
653
654#endif
655
656/* Amount of stuff to slurp up with each read. */
657#ifndef YY_READ_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000658#ifdef __ia64__
659/* On IA-64, the buffer size is 16k, not 8k */
660#define YY_READ_BUF_SIZE 16384
661#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000662#define YY_READ_BUF_SIZE 8192
Patrick Georgi8d313682010-05-05 13:12:42 +0000663#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000664#endif
665
666/* Copy whatever the last rule matched to the standard output. */
667#ifndef ECHO
668/* This used to be an fputs(), but since the string might contain NUL's,
669 * we now use fwrite().
670 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800671#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000672#endif
673
674/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
675 * is returned in "result".
676 */
677#ifndef YY_INPUT
678#define YY_INPUT(buf,result,max_size) \
679 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
680 { \
681 int c = '*'; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200682 int n; \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000683 for ( n = 0; n < max_size && \
684 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
685 buf[n] = (char) c; \
686 if ( c == '\n' ) \
687 buf[n++] = (char) c; \
688 if ( c == EOF && ferror( yyin ) ) \
689 YY_FATAL_ERROR( "input in flex scanner failed" ); \
690 result = n; \
691 } \
692 else \
693 { \
694 errno=0; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200695 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000696 { \
697 if( errno != EINTR) \
698 { \
699 YY_FATAL_ERROR( "input in flex scanner failed" ); \
700 break; \
701 } \
702 errno=0; \
703 clearerr(yyin); \
704 } \
705 }\
706\
707
708#endif
709
710/* No semi-colon after return; correct usage is to write "yyterminate();" -
711 * we don't want an extra ';' after the "return" because that will cause
712 * some compilers to complain about unreachable statements.
713 */
714#ifndef yyterminate
715#define yyterminate() return YY_NULL
716#endif
717
718/* Number of entries by which start-condition stack grows. */
719#ifndef YY_START_STACK_INCR
720#define YY_START_STACK_INCR 25
721#endif
722
723/* Report a fatal error. */
724#ifndef YY_FATAL_ERROR
725#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
726#endif
727
728/* end tables serialization structures and prototypes */
729
730/* Default declaration of generated scanner - a define so the user can
731 * easily add parameters.
732 */
733#ifndef YY_DECL
734#define YY_DECL_IS_OURS 1
735
736extern int yylex (void);
737
738#define YY_DECL int yylex (void)
739#endif /* !YY_DECL */
740
741/* Code executed at the beginning of each rule, after yytext and yyleng
742 * have been set up.
743 */
744#ifndef YY_USER_ACTION
745#define YY_USER_ACTION
746#endif
747
748/* Code executed at the end of each rule. */
749#ifndef YY_BREAK
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700750#define YY_BREAK /*LINTED*/break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000751#endif
752
753#define YY_RULE_SETUP \
754 YY_USER_ACTION
755
756/** The main scanner function which does all the work.
757 */
758YY_DECL
759{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700760 yy_state_type yy_current_state;
761 char *yy_cp, *yy_bp;
762 int yy_act;
Patrick Georgi8d313682010-05-05 13:12:42 +0000763
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000764 if ( !(yy_init) )
765 {
766 (yy_init) = 1;
767
768#ifdef YY_USER_INIT
769 YY_USER_INIT;
770#endif
771
772 if ( ! (yy_start) )
773 (yy_start) = 1; /* first start state */
774
775 if ( ! yyin )
776 yyin = stdin;
777
778 if ( ! yyout )
779 yyout = stdout;
780
781 if ( ! YY_CURRENT_BUFFER ) {
782 yyensure_buffer_stack ();
783 YY_CURRENT_BUFFER_LVALUE =
784 yy_create_buffer(yyin,YY_BUF_SIZE );
785 }
786
787 yy_load_buffer_state( );
788 }
789
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700790 {
791
792 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000793 {
794 yy_cp = (yy_c_buf_p);
795
796 /* Support of yytext. */
797 *yy_cp = (yy_hold_char);
798
799 /* yy_bp points to the position in yy_ch_buf of the start of
800 * the current run.
801 */
802 yy_bp = yy_cp;
803
804 yy_current_state = (yy_start);
805yy_match:
806 do
807 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700808 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000809 if ( yy_accept[yy_current_state] )
810 {
811 (yy_last_accepting_state) = yy_current_state;
812 (yy_last_accepting_cpos) = yy_cp;
813 }
814 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
815 {
816 yy_current_state = (int) yy_def[yy_current_state];
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200817 if ( yy_current_state >= 160 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000818 yy_c = yy_meta[(unsigned int) yy_c];
819 }
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800820 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000821 ++yy_cp;
822 }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200823 while ( yy_base[yy_current_state] != 228 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000824
825yy_find_action:
826 yy_act = yy_accept[yy_current_state];
827 if ( yy_act == 0 )
828 { /* have to back up */
829 yy_cp = (yy_last_accepting_cpos);
830 yy_current_state = (yy_last_accepting_state);
831 yy_act = yy_accept[yy_current_state];
832 }
833
834 YY_DO_BEFORE_ACTION;
835
836do_action: /* This label is used only to access EOF actions. */
837
838 switch ( yy_act )
839 { /* beginning of action switch */
840 case 0: /* must back up */
841 /* undo the effects of YY_DO_BEFORE_ACTION */
842 *yy_cp = (yy_hold_char);
843 yy_cp = (yy_last_accepting_cpos);
844 yy_current_state = (yy_last_accepting_state);
845 goto yy_find_action;
846
847case 1:
848YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000849{}
850 YY_BREAK
851case 2:
852/* rule 2 can match eol */
853YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000854{linenum++;}
855 YY_BREAK
856case 3:
857/* rule 3 can match eol */
858YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000859{linenum++;}
860 YY_BREAK
861case 4:
862YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000863{return(CHIP);}
864 YY_BREAK
865case 5:
866YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000867{return(DEVICE);}
868 YY_BREAK
869case 6:
870YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000871{return(REGISTER);}
872 YY_BREAK
873case 7:
874YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000875{yylval.number=1; return(BOOL);}
876 YY_BREAK
877case 8:
878YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000879{yylval.number=0; return(BOOL);}
880 YY_BREAK
881case 9:
882YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800883{yylval.number=3; return(HIDDEN);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000884 YY_BREAK
885case 10:
886YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800887{yylval.number=PCI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000888 YY_BREAK
889case 11:
890YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800891{yylval.number=IOAPIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000892 YY_BREAK
893case 12:
894YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800895{yylval.number=PNP; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000896 YY_BREAK
897case 13:
898YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800899{yylval.number=I2C; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000900 YY_BREAK
901case 14:
902YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800903{yylval.number=APIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000904 YY_BREAK
905case 15:
906YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800907{yylval.number=CPU_CLUSTER; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000908 YY_BREAK
909case 16:
910YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800911{yylval.number=CPU; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000912 YY_BREAK
913case 17:
914YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800915{yylval.number=DOMAIN; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000916 YY_BREAK
917case 18:
918YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800919{yylval.number=GENERIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000920 YY_BREAK
921case 19:
922YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800923{yylval.number=MMIO; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000924 YY_BREAK
925case 20:
926YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800927{yylval.number=SPI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000928 YY_BREAK
929case 21:
930YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800931{yylval.number=USB; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000932 YY_BREAK
933case 22:
934YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800935{yylval.number=IRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000936 YY_BREAK
937case 23:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000938YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800939{yylval.number=DRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000940 YY_BREAK
941case 24:
942YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800943{yylval.number=IO; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000944 YY_BREAK
945case 25:
Sven Schnelle750edfd2011-03-01 21:43:57 +0000946YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800947{return(IOAPIC_IRQ);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000948 YY_BREAK
949case 26:
950YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800951{return(INHERIT);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000952 YY_BREAK
953case 27:
Patrick Georgi2b108a42012-07-13 12:02:44 +0200954YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800955{return(SUBSYSTEMID);}
Patrick Georgi2b108a42012-07-13 12:02:44 +0200956 YY_BREAK
957case 28:
Aaron Durbinffda804b2014-09-03 12:40:15 -0500958YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800959{return(END);}
Aaron Durbinffda804b2014-09-03 12:40:15 -0500960 YY_BREAK
961case 29:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700962YY_RULE_SETUP
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200963{return(SLOT_DESC);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700964 YY_BREAK
965case 30:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200966YY_RULE_SETUP
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200967{return(EQUALS);}
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200968 YY_BREAK
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700969case 31:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700970YY_RULE_SETUP
Duncan Lauriebae9f852018-05-07 14:18:13 -0700971{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700972 YY_BREAK
973case 32:
Furquan Shaikhe6700292017-02-11 00:50:38 -0800974YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800975{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Furquan Shaikhe6700292017-02-11 00:50:38 -0800976 YY_BREAK
977case 33:
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800978YY_RULE_SETUP
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200979{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800980 YY_BREAK
981case 34:
Duncan Lauriebae9f852018-05-07 14:18:13 -0700982YY_RULE_SETUP
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200983{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
Duncan Lauriebae9f852018-05-07 14:18:13 -0700984 YY_BREAK
985case 35:
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800986/* rule 35 can match eol */
987YY_RULE_SETUP
988{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
989 YY_BREAK
990case 36:
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200991/* rule 36 can match eol */
992YY_RULE_SETUP
993{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
994 YY_BREAK
995case 37:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200996YY_RULE_SETUP
997{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
998 YY_BREAK
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200999case 38:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001000YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001001ECHO;
1002 YY_BREAK
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001003case YY_STATE_EOF(INITIAL):
1004 yyterminate();
1005
1006 case YY_END_OF_BUFFER:
1007 {
1008 /* Amount of text matched not including the EOB char. */
1009 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1010
1011 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1012 *yy_cp = (yy_hold_char);
1013 YY_RESTORE_YY_MORE_OFFSET
1014
1015 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1016 {
1017 /* We're scanning a new file or input source. It's
1018 * possible that this happened because the user
1019 * just pointed yyin at a new source and called
1020 * yylex(). If so, then we have to assure
1021 * consistency between YY_CURRENT_BUFFER and our
1022 * globals. Here is the right place to do so, because
1023 * this is the first action (other than possibly a
1024 * back-up) that will match for the new input source.
1025 */
1026 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1027 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1028 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1029 }
1030
1031 /* Note that here we test for yy_c_buf_p "<=" to the position
1032 * of the first EOB in the buffer, since yy_c_buf_p will
1033 * already have been incremented past the NUL character
1034 * (since all states make transitions on EOB to the
1035 * end-of-buffer state). Contrast this with the test
1036 * in input().
1037 */
1038 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1039 { /* This was really a NUL. */
1040 yy_state_type yy_next_state;
1041
1042 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1043
1044 yy_current_state = yy_get_previous_state( );
1045
1046 /* Okay, we're now positioned to make the NUL
1047 * transition. We couldn't have
1048 * yy_get_previous_state() go ahead and do it
1049 * for us because it doesn't know how to deal
1050 * with the possibility of jamming (and we don't
1051 * want to build jamming into it because then it
1052 * will run more slowly).
1053 */
1054
1055 yy_next_state = yy_try_NUL_trans( yy_current_state );
1056
1057 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1058
1059 if ( yy_next_state )
1060 {
1061 /* Consume the NUL. */
1062 yy_cp = ++(yy_c_buf_p);
1063 yy_current_state = yy_next_state;
1064 goto yy_match;
1065 }
1066
1067 else
1068 {
1069 yy_cp = (yy_c_buf_p);
1070 goto yy_find_action;
1071 }
1072 }
1073
1074 else switch ( yy_get_next_buffer( ) )
1075 {
1076 case EOB_ACT_END_OF_FILE:
1077 {
1078 (yy_did_buffer_switch_on_eof) = 0;
1079
1080 if ( yywrap( ) )
1081 {
1082 /* Note: because we've taken care in
1083 * yy_get_next_buffer() to have set up
1084 * yytext, we can now set up
1085 * yy_c_buf_p so that if some total
1086 * hoser (like flex itself) wants to
1087 * call the scanner after we return the
1088 * YY_NULL, it'll still work - another
1089 * YY_NULL will get returned.
1090 */
1091 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1092
1093 yy_act = YY_STATE_EOF(YY_START);
1094 goto do_action;
1095 }
1096
1097 else
1098 {
1099 if ( ! (yy_did_buffer_switch_on_eof) )
1100 YY_NEW_FILE;
1101 }
1102 break;
1103 }
1104
1105 case EOB_ACT_CONTINUE_SCAN:
1106 (yy_c_buf_p) =
1107 (yytext_ptr) + yy_amount_of_matched_text;
1108
1109 yy_current_state = yy_get_previous_state( );
1110
1111 yy_cp = (yy_c_buf_p);
1112 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1113 goto yy_match;
1114
1115 case EOB_ACT_LAST_MATCH:
1116 (yy_c_buf_p) =
1117 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1118
1119 yy_current_state = yy_get_previous_state( );
1120
1121 yy_cp = (yy_c_buf_p);
1122 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1123 goto yy_find_action;
1124 }
1125 break;
1126 }
1127
1128 default:
1129 YY_FATAL_ERROR(
1130 "fatal flex scanner internal error--no action found" );
1131 } /* end of action switch */
1132 } /* end of scanning one token */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001133 } /* end of user's declarations */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001134} /* end of yylex */
1135
1136/* yy_get_next_buffer - try to read in a new buffer
1137 *
1138 * Returns a code representing an action:
1139 * EOB_ACT_LAST_MATCH -
1140 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1141 * EOB_ACT_END_OF_FILE - end of file
1142 */
1143static int yy_get_next_buffer (void)
1144{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001145 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1146 char *source = (yytext_ptr);
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001147 yy_size_t number_to_move, i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001148 int ret_val;
1149
1150 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1151 YY_FATAL_ERROR(
1152 "fatal flex scanner internal error--end of buffer missed" );
1153
1154 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1155 { /* Don't try to fill the buffer, so this is an EOF. */
1156 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1157 {
1158 /* We matched a single character, the EOB, so
1159 * treat this as a final EOF.
1160 */
1161 return EOB_ACT_END_OF_FILE;
1162 }
1163
1164 else
1165 {
1166 /* We matched some text prior to the EOB, first
1167 * process it.
1168 */
1169 return EOB_ACT_LAST_MATCH;
1170 }
1171 }
1172
1173 /* Try to read more data. */
1174
1175 /* First move last chars to start of buffer. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001176 number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001177
1178 for ( i = 0; i < number_to_move; ++i )
1179 *(dest++) = *(source++);
1180
1181 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1182 /* don't do the read, it's not guaranteed to return an EOF,
1183 * just force an EOF
1184 */
1185 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1186
1187 else
1188 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001189 int num_to_read =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001190 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1191
1192 while ( num_to_read <= 0 )
1193 { /* Not enough room in the buffer - grow it. */
1194
1195 /* just a shorter name for the current buffer */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001196 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001197
1198 int yy_c_buf_p_offset =
1199 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1200
1201 if ( b->yy_is_our_buffer )
1202 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001203 int new_size = b->yy_buf_size * 2;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001204
1205 if ( new_size <= 0 )
1206 b->yy_buf_size += b->yy_buf_size / 8;
1207 else
1208 b->yy_buf_size *= 2;
1209
1210 b->yy_ch_buf = (char *)
1211 /* Include room in for 2 EOB chars. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001212 yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001213 }
1214 else
1215 /* Can't grow it, we don't own it. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001216 b->yy_ch_buf = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001217
1218 if ( ! b->yy_ch_buf )
1219 YY_FATAL_ERROR(
1220 "fatal error - scanner input buffer overflow" );
1221
1222 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1223
1224 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1225 number_to_move - 1;
1226
1227 }
1228
1229 if ( num_to_read > YY_READ_BUF_SIZE )
1230 num_to_read = YY_READ_BUF_SIZE;
1231
1232 /* Read in more data. */
1233 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001234 (yy_n_chars), num_to_read );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001235
1236 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1237 }
1238
1239 if ( (yy_n_chars) == 0 )
1240 {
1241 if ( number_to_move == YY_MORE_ADJ )
1242 {
1243 ret_val = EOB_ACT_END_OF_FILE;
1244 yyrestart(yyin );
1245 }
1246
1247 else
1248 {
1249 ret_val = EOB_ACT_LAST_MATCH;
1250 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1251 YY_BUFFER_EOF_PENDING;
1252 }
1253 }
1254
1255 else
1256 ret_val = EOB_ACT_CONTINUE_SCAN;
1257
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001258 if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001259 /* Extend the array by 50%, plus the number we really need. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001260 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001261 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001262 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1263 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1264 }
1265
1266 (yy_n_chars) += number_to_move;
1267 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1268 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1269
1270 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1271
1272 return ret_val;
1273}
1274
1275/* yy_get_previous_state - get the state just before the EOB char was reached */
1276
1277 static yy_state_type yy_get_previous_state (void)
1278{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001279 yy_state_type yy_current_state;
1280 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001281
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001282 yy_current_state = (yy_start);
1283
1284 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1285 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001286 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001287 if ( yy_accept[yy_current_state] )
1288 {
1289 (yy_last_accepting_state) = yy_current_state;
1290 (yy_last_accepting_cpos) = yy_cp;
1291 }
1292 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1293 {
1294 yy_current_state = (int) yy_def[yy_current_state];
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001295 if ( yy_current_state >= 160 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001296 yy_c = yy_meta[(unsigned int) yy_c];
1297 }
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001298 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001299 }
1300
1301 return yy_current_state;
1302}
1303
1304/* yy_try_NUL_trans - try to make a transition on the NUL character
1305 *
1306 * synopsis
1307 * next_state = yy_try_NUL_trans( current_state );
1308 */
1309 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1310{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001311 int yy_is_jam;
1312 char *yy_cp = (yy_c_buf_p);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001313
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001314 YY_CHAR yy_c = 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001315 if ( yy_accept[yy_current_state] )
1316 {
1317 (yy_last_accepting_state) = yy_current_state;
1318 (yy_last_accepting_cpos) = yy_cp;
1319 }
1320 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1321 {
1322 yy_current_state = (int) yy_def[yy_current_state];
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001323 if ( yy_current_state >= 160 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001324 yy_c = yy_meta[(unsigned int) yy_c];
1325 }
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001326 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001327 yy_is_jam = (yy_current_state == 159);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001328
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001329 return yy_is_jam ? 0 : yy_current_state;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001330}
1331
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001332#ifndef YY_NO_UNPUT
1333
1334 static void yyunput (int c, char * yy_bp )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001335{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001336 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001337
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001338 yy_cp = (yy_c_buf_p);
1339
1340 /* undo effects of setting up yytext */
1341 *yy_cp = (yy_hold_char);
1342
1343 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1344 { /* need to shift things up to make room */
1345 /* +2 for EOB chars. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001346 int number_to_move = (yy_n_chars) + 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001347 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001348 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001349 char *source =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001350 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1351
1352 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1353 *--dest = *--source;
1354
1355 yy_cp += (int) (dest - source);
1356 yy_bp += (int) (dest - source);
1357 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001358 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001359
1360 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1361 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1362 }
1363
1364 *--yy_cp = (char) c;
1365
1366 (yytext_ptr) = yy_bp;
1367 (yy_hold_char) = *yy_cp;
1368 (yy_c_buf_p) = yy_cp;
1369}
1370
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001371#endif
1372
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001373#ifndef YY_NO_INPUT
1374#ifdef __cplusplus
1375 static int yyinput (void)
1376#else
1377 static int input (void)
1378#endif
1379
1380{
1381 int c;
Patrick Georgi8d313682010-05-05 13:12:42 +00001382
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001383 *(yy_c_buf_p) = (yy_hold_char);
1384
1385 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1386 {
1387 /* yy_c_buf_p now points to the character we want to return.
1388 * If this occurs *before* the EOB characters, then it's a
1389 * valid NUL; if not, then we've hit the end of the buffer.
1390 */
1391 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1392 /* This was really a NUL. */
1393 *(yy_c_buf_p) = '\0';
1394
1395 else
1396 { /* need more input */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001397 int offset = (yy_c_buf_p) - (yytext_ptr);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001398 ++(yy_c_buf_p);
1399
1400 switch ( yy_get_next_buffer( ) )
1401 {
1402 case EOB_ACT_LAST_MATCH:
1403 /* This happens because yy_g_n_b()
1404 * sees that we've accumulated a
1405 * token and flags that we need to
1406 * try matching the token before
1407 * proceeding. But for input(),
1408 * there's no matching to consider.
1409 * So convert the EOB_ACT_LAST_MATCH
1410 * to EOB_ACT_END_OF_FILE.
1411 */
1412
1413 /* Reset buffer status. */
1414 yyrestart(yyin );
1415
1416 /*FALLTHROUGH*/
1417
1418 case EOB_ACT_END_OF_FILE:
1419 {
1420 if ( yywrap( ) )
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001421 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001422
1423 if ( ! (yy_did_buffer_switch_on_eof) )
1424 YY_NEW_FILE;
1425#ifdef __cplusplus
1426 return yyinput();
1427#else
1428 return input();
1429#endif
1430 }
1431
1432 case EOB_ACT_CONTINUE_SCAN:
1433 (yy_c_buf_p) = (yytext_ptr) + offset;
1434 break;
1435 }
1436 }
1437 }
1438
1439 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1440 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1441 (yy_hold_char) = *++(yy_c_buf_p);
1442
1443 return c;
1444}
1445#endif /* ifndef YY_NO_INPUT */
1446
1447/** Immediately switch to a different input stream.
1448 * @param input_file A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001449 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001450 * @note This function does not reset the start condition to @c INITIAL .
1451 */
1452 void yyrestart (FILE * input_file )
1453{
Patrick Georgi8d313682010-05-05 13:12:42 +00001454
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001455 if ( ! YY_CURRENT_BUFFER ){
1456 yyensure_buffer_stack ();
1457 YY_CURRENT_BUFFER_LVALUE =
1458 yy_create_buffer(yyin,YY_BUF_SIZE );
1459 }
1460
1461 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1462 yy_load_buffer_state( );
1463}
1464
1465/** Switch to a different input buffer.
1466 * @param new_buffer The new input buffer.
Patrick Georgi8d313682010-05-05 13:12:42 +00001467 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001468 */
1469 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1470{
Patrick Georgi8d313682010-05-05 13:12:42 +00001471
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001472 /* TODO. We should be able to replace this entire function body
1473 * with
1474 * yypop_buffer_state();
1475 * yypush_buffer_state(new_buffer);
1476 */
1477 yyensure_buffer_stack ();
1478 if ( YY_CURRENT_BUFFER == new_buffer )
1479 return;
1480
1481 if ( YY_CURRENT_BUFFER )
1482 {
1483 /* Flush out information for old buffer. */
1484 *(yy_c_buf_p) = (yy_hold_char);
1485 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1486 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1487 }
1488
1489 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1490 yy_load_buffer_state( );
1491
1492 /* We don't actually know whether we did this switch during
1493 * EOF (yywrap()) processing, but the only time this flag
1494 * is looked at is after yywrap() is called, so it's safe
1495 * to go ahead and always set it.
1496 */
1497 (yy_did_buffer_switch_on_eof) = 1;
1498}
1499
1500static void yy_load_buffer_state (void)
1501{
1502 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1503 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1504 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1505 (yy_hold_char) = *(yy_c_buf_p);
1506}
1507
1508/** Allocate and initialize an input buffer state.
1509 * @param file A readable stream.
1510 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Patrick Georgi8d313682010-05-05 13:12:42 +00001511 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001512 * @return the allocated buffer state.
1513 */
1514 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1515{
1516 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001517
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001518 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1519 if ( ! b )
1520 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1521
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001522 b->yy_buf_size = size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001523
1524 /* yy_ch_buf has to be 2 characters longer than the size given because
1525 * we need to put in 2 end-of-buffer characters.
1526 */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001527 b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001528 if ( ! b->yy_ch_buf )
1529 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1530
1531 b->yy_is_our_buffer = 1;
1532
1533 yy_init_buffer(b,file );
1534
1535 return b;
1536}
1537
1538/** Destroy the buffer.
1539 * @param b a buffer created with yy_create_buffer()
Patrick Georgi8d313682010-05-05 13:12:42 +00001540 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001541 */
1542 void yy_delete_buffer (YY_BUFFER_STATE b )
1543{
Patrick Georgi8d313682010-05-05 13:12:42 +00001544
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001545 if ( ! b )
1546 return;
1547
1548 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1549 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1550
1551 if ( b->yy_is_our_buffer )
1552 yyfree((void *) b->yy_ch_buf );
1553
1554 yyfree((void *) b );
1555}
1556
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001557/* Initializes or reinitializes a buffer.
1558 * This function is sometimes called more than once on the same buffer,
1559 * such as during a yyrestart() or at EOF.
1560 */
1561 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1562
1563{
1564 int oerrno = errno;
Patrick Georgi8d313682010-05-05 13:12:42 +00001565
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001566 yy_flush_buffer(b );
1567
1568 b->yy_input_file = file;
1569 b->yy_fill_buffer = 1;
1570
1571 /* If b is the current buffer, then yy_init_buffer was _probably_
1572 * called from yyrestart() or through yy_get_next_buffer.
1573 * In that case, we don't want to reset the lineno or column.
1574 */
1575 if (b != YY_CURRENT_BUFFER){
1576 b->yy_bs_lineno = 1;
1577 b->yy_bs_column = 0;
1578 }
1579
1580 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Patrick Georgi8d313682010-05-05 13:12:42 +00001581
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001582 errno = oerrno;
1583}
1584
1585/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1586 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Patrick Georgi8d313682010-05-05 13:12:42 +00001587 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001588 */
1589 void yy_flush_buffer (YY_BUFFER_STATE b )
1590{
1591 if ( ! b )
1592 return;
1593
1594 b->yy_n_chars = 0;
1595
1596 /* We always need two end-of-buffer characters. The first causes
1597 * a transition to the end-of-buffer state. The second causes
1598 * a jam in that state.
1599 */
1600 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1601 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1602
1603 b->yy_buf_pos = &b->yy_ch_buf[0];
1604
1605 b->yy_at_bol = 1;
1606 b->yy_buffer_status = YY_BUFFER_NEW;
1607
1608 if ( b == YY_CURRENT_BUFFER )
1609 yy_load_buffer_state( );
1610}
1611
1612/** Pushes the new state onto the stack. The new state becomes
1613 * the current state. This function will allocate the stack
1614 * if necessary.
1615 * @param new_buffer The new state.
Patrick Georgi8d313682010-05-05 13:12:42 +00001616 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001617 */
1618void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1619{
1620 if (new_buffer == NULL)
1621 return;
1622
1623 yyensure_buffer_stack();
1624
1625 /* This block is copied from yy_switch_to_buffer. */
1626 if ( YY_CURRENT_BUFFER )
1627 {
1628 /* Flush out information for old buffer. */
1629 *(yy_c_buf_p) = (yy_hold_char);
1630 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1631 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1632 }
1633
1634 /* Only push if top exists. Otherwise, replace top. */
1635 if (YY_CURRENT_BUFFER)
1636 (yy_buffer_stack_top)++;
1637 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1638
1639 /* copied from yy_switch_to_buffer. */
1640 yy_load_buffer_state( );
1641 (yy_did_buffer_switch_on_eof) = 1;
1642}
1643
1644/** Removes and deletes the top of the stack, if present.
1645 * The next element becomes the new top.
Patrick Georgi8d313682010-05-05 13:12:42 +00001646 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001647 */
1648void yypop_buffer_state (void)
1649{
1650 if (!YY_CURRENT_BUFFER)
1651 return;
1652
1653 yy_delete_buffer(YY_CURRENT_BUFFER );
1654 YY_CURRENT_BUFFER_LVALUE = NULL;
1655 if ((yy_buffer_stack_top) > 0)
1656 --(yy_buffer_stack_top);
1657
1658 if (YY_CURRENT_BUFFER) {
1659 yy_load_buffer_state( );
1660 (yy_did_buffer_switch_on_eof) = 1;
1661 }
1662}
1663
1664/* Allocates the stack if it does not exist.
1665 * Guarantees space for at least one push.
1666 */
1667static void yyensure_buffer_stack (void)
1668{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001669 int num_to_alloc;
Patrick Georgi8d313682010-05-05 13:12:42 +00001670
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001671 if (!(yy_buffer_stack)) {
1672
1673 /* First allocation is just for 2 elements, since we don't know if this
1674 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1675 * immediate realloc on the next call.
1676 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001677 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001678 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1679 (num_to_alloc * sizeof(struct yy_buffer_state*)
1680 );
1681 if ( ! (yy_buffer_stack) )
1682 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001683
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001684 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001685
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001686 (yy_buffer_stack_max) = num_to_alloc;
1687 (yy_buffer_stack_top) = 0;
1688 return;
1689 }
1690
1691 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1692
1693 /* Increase the buffer to prepare for a possible push. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001694 yy_size_t grow_size = 8 /* arbitrary grow size */;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001695
1696 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1697 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1698 ((yy_buffer_stack),
1699 num_to_alloc * sizeof(struct yy_buffer_state*)
1700 );
1701 if ( ! (yy_buffer_stack) )
1702 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1703
1704 /* zero only the new slots.*/
1705 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1706 (yy_buffer_stack_max) = num_to_alloc;
1707 }
1708}
1709
1710/** Setup the input buffer state to scan directly from a user-specified character buffer.
1711 * @param base the character buffer
1712 * @param size the size in bytes of the character buffer
Patrick Georgi8d313682010-05-05 13:12:42 +00001713 *
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001714 * @return the newly allocated buffer state object.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001715 */
1716YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1717{
1718 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001719
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001720 if ( size < 2 ||
1721 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1722 base[size-1] != YY_END_OF_BUFFER_CHAR )
1723 /* They forgot to leave room for the EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001724 return NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001725
1726 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1727 if ( ! b )
1728 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1729
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001730 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001731 b->yy_buf_pos = b->yy_ch_buf = base;
1732 b->yy_is_our_buffer = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001733 b->yy_input_file = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001734 b->yy_n_chars = b->yy_buf_size;
1735 b->yy_is_interactive = 0;
1736 b->yy_at_bol = 1;
1737 b->yy_fill_buffer = 0;
1738 b->yy_buffer_status = YY_BUFFER_NEW;
1739
1740 yy_switch_to_buffer(b );
1741
1742 return b;
1743}
1744
1745/** Setup the input buffer state to scan a string. The next call to yylex() will
1746 * scan from a @e copy of @a str.
1747 * @param yystr a NUL-terminated string to scan
Patrick Georgi8d313682010-05-05 13:12:42 +00001748 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001749 * @return the newly allocated buffer state object.
1750 * @note If you want to scan bytes that may contain NUL values, then use
1751 * yy_scan_bytes() instead.
1752 */
1753YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1754{
Patrick Georgi8d313682010-05-05 13:12:42 +00001755
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001756 return yy_scan_bytes(yystr,(int) strlen(yystr) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001757}
1758
1759/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1760 * scan from a @e copy of @a bytes.
Patrick Georgi8d313682010-05-05 13:12:42 +00001761 * @param yybytes the byte buffer to scan
1762 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1763 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001764 * @return the newly allocated buffer state object.
1765 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001766YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001767{
1768 YY_BUFFER_STATE b;
1769 char *buf;
1770 yy_size_t n;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001771 int i;
Patrick Georgi8d313682010-05-05 13:12:42 +00001772
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001773 /* Get memory for full buffer, including space for trailing EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001774 n = (yy_size_t) (_yybytes_len + 2);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001775 buf = (char *) yyalloc(n );
1776 if ( ! buf )
1777 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1778
1779 for ( i = 0; i < _yybytes_len; ++i )
1780 buf[i] = yybytes[i];
1781
1782 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1783
1784 b = yy_scan_buffer(buf,n );
1785 if ( ! b )
1786 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1787
1788 /* It's okay to grow etc. this buffer, and we should throw it
1789 * away when we're done.
1790 */
1791 b->yy_is_our_buffer = 1;
1792
1793 return b;
1794}
1795
1796#ifndef YY_EXIT_FAILURE
1797#define YY_EXIT_FAILURE 2
1798#endif
1799
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001800static void yynoreturn yy_fatal_error (yyconst char* msg )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001801{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001802 (void) fprintf( stderr, "%s\n", msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001803 exit( YY_EXIT_FAILURE );
1804}
1805
1806/* Redefine yyless() so it works in section 3 code. */
1807
1808#undef yyless
1809#define yyless(n) \
1810 do \
1811 { \
1812 /* Undo effects of setting up yytext. */ \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001813 yy_size_t yyless_macro_arg = (n); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001814 YY_LESS_LINENO(yyless_macro_arg);\
1815 yytext[yyleng] = (yy_hold_char); \
1816 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1817 (yy_hold_char) = *(yy_c_buf_p); \
1818 *(yy_c_buf_p) = '\0'; \
1819 yyleng = yyless_macro_arg; \
1820 } \
1821 while ( 0 )
1822
1823/* Accessor methods (get/set functions) to struct members. */
1824
1825/** Get the current line number.
Patrick Georgi8d313682010-05-05 13:12:42 +00001826 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001827 */
1828int yyget_lineno (void)
1829{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001830
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001831 return yylineno;
1832}
1833
1834/** Get the input stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001835 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001836 */
1837FILE *yyget_in (void)
1838{
1839 return yyin;
1840}
1841
1842/** Get the output stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001843 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001844 */
1845FILE *yyget_out (void)
1846{
1847 return yyout;
1848}
1849
1850/** Get the length of the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001851 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001852 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001853int yyget_leng (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001854{
1855 return yyleng;
1856}
1857
1858/** Get the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001859 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001860 */
1861
1862char *yyget_text (void)
1863{
1864 return yytext;
1865}
1866
1867/** Set the current line number.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001868 * @param _line_number line number
Patrick Georgi8d313682010-05-05 13:12:42 +00001869 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001870 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001871void yyset_lineno (int _line_number )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001872{
Patrick Georgi8d313682010-05-05 13:12:42 +00001873
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001874 yylineno = _line_number;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001875}
1876
1877/** Set the input stream. This does not discard the current
1878 * input buffer.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001879 * @param _in_str A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001880 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001881 * @see yy_switch_to_buffer
1882 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001883void yyset_in (FILE * _in_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001884{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001885 yyin = _in_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001886}
1887
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001888void yyset_out (FILE * _out_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001889{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001890 yyout = _out_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001891}
1892
1893int yyget_debug (void)
1894{
1895 return yy_flex_debug;
1896}
1897
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001898void yyset_debug (int _bdebug )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001899{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001900 yy_flex_debug = _bdebug ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001901}
1902
1903static int yy_init_globals (void)
1904{
1905 /* Initialization is the same as for the non-reentrant scanner.
1906 * This function is called from yylex_destroy(), so don't allocate here.
1907 */
1908
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001909 (yy_buffer_stack) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001910 (yy_buffer_stack_top) = 0;
1911 (yy_buffer_stack_max) = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001912 (yy_c_buf_p) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001913 (yy_init) = 0;
1914 (yy_start) = 0;
1915
1916/* Defined in main.c */
1917#ifdef YY_STDINIT
1918 yyin = stdin;
1919 yyout = stdout;
1920#else
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001921 yyin = NULL;
1922 yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001923#endif
1924
1925 /* For future reference: Set errno on error, since we are called by
1926 * yylex_init()
1927 */
1928 return 0;
1929}
1930
1931/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1932int yylex_destroy (void)
1933{
Patrick Georgi8d313682010-05-05 13:12:42 +00001934
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001935 /* Pop the buffer stack, destroying each element. */
1936 while(YY_CURRENT_BUFFER){
1937 yy_delete_buffer(YY_CURRENT_BUFFER );
1938 YY_CURRENT_BUFFER_LVALUE = NULL;
1939 yypop_buffer_state();
1940 }
1941
1942 /* Destroy the stack itself. */
1943 yyfree((yy_buffer_stack) );
1944 (yy_buffer_stack) = NULL;
1945
1946 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1947 * yylex() is called, initialization will occur. */
1948 yy_init_globals( );
1949
1950 return 0;
1951}
1952
1953/*
1954 * Internal utility routines.
1955 */
1956
1957#ifndef yytext_ptr
1958static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1959{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001960
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001961 int i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001962 for ( i = 0; i < n; ++i )
1963 s1[i] = s2[i];
1964}
1965#endif
1966
1967#ifdef YY_NEED_STRLEN
1968static int yy_flex_strlen (yyconst char * s )
1969{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001970 int n;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001971 for ( n = 0; s[n]; ++n )
1972 ;
1973
1974 return n;
1975}
1976#endif
1977
1978void *yyalloc (yy_size_t size )
1979{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001980 return malloc(size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001981}
1982
1983void *yyrealloc (void * ptr, yy_size_t size )
1984{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001985
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001986 /* The cast to (char *) in the following accommodates both
1987 * implementations that use char* generic pointers, and those
1988 * that use void* generic pointers. It works with the latter
1989 * because both ANSI C and C++ allow castless assignment from
1990 * any pointer type to void*, and deal with argument conversions
1991 * as though doing an assignment.
1992 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001993 return realloc(ptr, size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001994}
1995
1996void yyfree (void * ptr )
1997{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001998 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001999}
2000
2001#define YYTABLES_NAME "yytables"
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07002002