blob: 63297732faafbd94441a67a5094392a682ef40f8 [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
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00009#define YY_FLEX_SUBMINOR_VERSION 4
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
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +000084#ifndef SIZE_MAX
85#define SIZE_MAX (~(size_t)0)
86#endif
87
Patrick Georgi8d313682010-05-05 13:12:42 +000088#endif /* ! C99 */
89
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000090#endif /* ! FLEXINT_H */
91
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +000092/* begin standard C++ headers. */
93
Justin TerAvestca2ed9f2018-01-17 16:36:30 -080094/* TODO: this is always defined, so inline it */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000095#define yyconst const
Justin TerAvestca2ed9f2018-01-17 16:36:30 -080096
97#if defined(__GNUC__) && __GNUC__ >= 3
98#define yynoreturn __attribute__((__noreturn__))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000099#else
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800100#define yynoreturn
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000101#endif
102
103/* Returned upon end-of-file. */
104#define YY_NULL 0
105
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000106/* Promotes a possibly negative, possibly signed char to an
107 * integer in range [0..255] for use as an array index.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000108 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000109#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000110
111/* Enter a start condition. This macro really ought to take a parameter,
112 * but we do it the disgusting crufty way forced on us by the ()-less
113 * definition of BEGIN.
114 */
115#define BEGIN (yy_start) = 1 + 2 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000116/* Translate the current start state into a value that can be later handed
117 * to BEGIN to return to the state. The YYSTATE alias is for lex
118 * compatibility.
119 */
120#define YY_START (((yy_start) - 1) / 2)
121#define YYSTATE YY_START
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000122/* Action number for EOF rule of a given start state. */
123#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000124/* Special action meaning "start processing a new file". */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000125#define YY_NEW_FILE yyrestart( yyin )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000126#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
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000162 #define YY_LESS_LINENO(n)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700163 #define YY_LINENO_REWIND_TO(ptr)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000164/* Return all but the first "n" matched characters back to the input stream. */
165#define yyless(n) \
166 do \
167 { \
168 /* Undo effects of setting up yytext. */ \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000169 int yyless_macro_arg = (n); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000170 YY_LESS_LINENO(yyless_macro_arg);\
171 *yy_cp = (yy_hold_char); \
172 YY_RESTORE_YY_MORE_OFFSET \
173 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
174 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
175 } \
176 while ( 0 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000177#define unput(c) yyunput( c, (yytext_ptr) )
178
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000179#ifndef YY_STRUCT_YY_BUFFER_STATE
180#define YY_STRUCT_YY_BUFFER_STATE
181struct yy_buffer_state
182 {
183 FILE *yy_input_file;
184
185 char *yy_ch_buf; /* input buffer */
186 char *yy_buf_pos; /* current position in input buffer */
187
188 /* Size of input buffer in bytes, not including room for EOB
189 * characters.
190 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800191 int yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000192
193 /* Number of characters read into yy_ch_buf, not including EOB
194 * characters.
195 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800196 int yy_n_chars;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000197
198 /* Whether we "own" the buffer - i.e., we know we created it,
199 * and can realloc() it to grow it, and should free() it to
200 * delete it.
201 */
202 int yy_is_our_buffer;
203
204 /* Whether this is an "interactive" input source; if so, and
205 * if we're using stdio for input, then we want to use getc()
206 * instead of fread(), to make sure we stop fetching input after
207 * each newline.
208 */
209 int yy_is_interactive;
210
211 /* Whether we're considered to be at the beginning of a line.
212 * If so, '^' rules will be active on the next match, otherwise
213 * not.
214 */
215 int yy_at_bol;
216
217 int yy_bs_lineno; /**< The line count. */
218 int yy_bs_column; /**< The column count. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800219
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000220 /* Whether to try to fill the input buffer when we reach the
221 * end of it.
222 */
223 int yy_fill_buffer;
224
225 int yy_buffer_status;
226
227#define YY_BUFFER_NEW 0
228#define YY_BUFFER_NORMAL 1
229 /* When an EOF's been seen but there's still some text to process
230 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
231 * shouldn't try reading from the input source any more. We might
232 * still have a bunch of tokens to match, though, because of
233 * possible backing-up.
234 *
235 * When we actually see the EOF, we change the status to "new"
236 * (via yyrestart()), so that the user can continue scanning by
237 * just pointing yyin at a new input file.
238 */
239#define YY_BUFFER_EOF_PENDING 2
240
241 };
242#endif /* !YY_STRUCT_YY_BUFFER_STATE */
243
244/* Stack of input buffers. */
245static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
246static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800247static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000248
249/* We provide macros for accessing buffer states in case in the
250 * future we want to put the buffer states in a more general
251 * "scanner state".
252 *
253 * Returns the top of the stack, or NULL.
254 */
255#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
256 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
257 : NULL)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000258/* Same as previous macro, but useful when we know that the buffer stack is not
259 * NULL or when we need an lvalue. For internal use only.
260 */
261#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
262
263/* yy_hold_char holds the character lost when yytext is formed. */
264static char yy_hold_char;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800265static int yy_n_chars; /* number of characters read into yy_ch_buf */
266int yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000267
268/* Points to current character in buffer. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800269static char *yy_c_buf_p = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000270static int yy_init = 0; /* whether we need to initialize */
271static int yy_start = 0; /* start state number */
272
273/* Flag which is used to allow yywrap()'s to do buffer switches
274 * instead of setting up a fresh yyin. A bit of a hack ...
275 */
276static int yy_did_buffer_switch_on_eof;
277
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000278void yyrestart ( FILE *input_file );
279void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
280YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
281void yy_delete_buffer ( YY_BUFFER_STATE b );
282void yy_flush_buffer ( YY_BUFFER_STATE b );
283void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
284void yypop_buffer_state ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000285
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000286static void yyensure_buffer_stack ( void );
287static void yy_load_buffer_state ( void );
288static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
289#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000290
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000291YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
292YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
293YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000294
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000295void *yyalloc ( yy_size_t );
296void *yyrealloc ( void *, yy_size_t );
297void yyfree ( void * );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000298
299#define yy_new_buffer yy_create_buffer
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000300#define yy_set_interactive(is_interactive) \
301 { \
302 if ( ! YY_CURRENT_BUFFER ){ \
303 yyensure_buffer_stack (); \
304 YY_CURRENT_BUFFER_LVALUE = \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000305 yy_create_buffer( yyin, YY_BUF_SIZE ); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000306 } \
307 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
308 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000309#define yy_set_bol(at_bol) \
310 { \
311 if ( ! YY_CURRENT_BUFFER ){\
312 yyensure_buffer_stack (); \
313 YY_CURRENT_BUFFER_LVALUE = \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000314 yy_create_buffer( yyin, YY_BUF_SIZE ); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000315 } \
316 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
317 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000318#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
319
320/* Begin user sect3 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000321typedef flex_uint8_t YY_CHAR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000322
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800323FILE *yyin = NULL, *yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000324
325typedef int yy_state_type;
326
327extern int yylineno;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000328int yylineno = 1;
329
330extern char *yytext;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700331#ifdef yytext_ptr
332#undef yytext_ptr
333#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000334#define yytext_ptr yytext
335
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000336static yy_state_type yy_get_previous_state ( void );
337static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
338static int yy_get_next_buffer ( void );
339static void yynoreturn yy_fatal_error ( const char* msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000340
341/* Done after the current pattern has been matched and before the
342 * corresponding action - sets up yytext.
343 */
344#define YY_DO_BEFORE_ACTION \
345 (yytext_ptr) = yy_bp; \
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800346 yyleng = (int) (yy_cp - yy_bp); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000347 (yy_hold_char) = *yy_cp; \
348 *yy_cp = '\0'; \
349 (yy_c_buf_p) = yy_cp;
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000350#define YY_NUM_RULES 39
351#define YY_END_OF_BUFFER 40
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000352/* This struct is not used in this scanner,
353 but its presence is necessary. */
354struct yy_trans_info
355 {
356 flex_int32_t yy_verify;
357 flex_int32_t yy_nxt;
358 };
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000359static const flex_int16_t yy_accept[168] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000360 { 0,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000361 0, 0, 40, 38, 1, 3, 38, 38, 38, 33,
362 33, 31, 34, 38, 34, 34, 34, 38, 38, 38,
363 38, 38, 38, 38, 38, 38, 38, 38, 1, 3,
364 38, 0, 38, 38, 0, 2, 33, 34, 38, 38,
365 38, 38, 34, 38, 38, 38, 38, 38, 38, 38,
366 25, 38, 38, 38, 38, 38, 7, 38, 38, 38,
367 38, 38, 38, 38, 37, 37, 38, 0, 32, 38,
368 38, 17, 38, 38, 24, 29, 38, 38, 14, 38,
369 38, 23, 38, 38, 38, 8, 11, 13, 38, 38,
370 21, 38, 22, 38, 0, 35, 4, 38, 38, 38,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000371
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000372 38, 38, 38, 38, 38, 38, 20, 38, 38, 38,
373 36, 36, 38, 38, 38, 38, 38, 38, 38, 15,
374 38, 38, 38, 38, 38, 5, 18, 38, 9, 38,
375 12, 38, 38, 38, 38, 38, 19, 27, 38, 38,
376 38, 38, 38, 38, 38, 38, 6, 38, 38, 38,
377 38, 10, 38, 38, 38, 26, 38, 38, 16, 38,
378 28, 38, 38, 38, 38, 30, 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000379 } ;
380
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000381static const YY_CHAR yy_ec[256] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000382 { 0,
383 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
384 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 7, 1, 8, 7, 9,
388 7, 7, 7, 7, 7, 7, 7, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200389 10, 1, 1, 1, 11, 11, 11, 11, 12, 12,
390 1, 1, 13, 1, 1, 1, 1, 14, 1, 1,
391 1, 1, 1, 15, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000393
Patrick Georgi2b108a42012-07-13 12:02:44 +0200394 21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
395 29, 30, 31, 32, 33, 34, 35, 36, 1, 37,
396 38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 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
411 } ;
412
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000413static const YY_CHAR yy_meta[39] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000414 { 0,
415 1, 2, 2, 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,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200418 1, 1, 1, 1, 1, 1, 1, 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000419 } ;
420
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000421static const flex_int16_t yy_base[175] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000422 { 0,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000423 0, 0, 235, 0, 232, 236, 230, 37, 41, 38,
424 195, 0, 44, 217, 54, 78, 60, 209, 204, 45,
425 211, 48, 42, 52, 206, 62, 193, 0, 223, 236,
426 88, 219, 93, 79, 220, 236, 0, 93, 104, 207,
427 196, 185, 96, 192, 187, 197, 188, 195, 195, 189,
428 195, 180, 180, 181, 183, 185, 0, 181, 175, 181,
429 185, 177, 183, 182, 0, 236, 115, 194, 0, 187,
430 167, 180, 170, 177, 0, 0, 172, 172, 0, 170,
431 160, 0, 164, 168, 158, 0, 0, 0, 161, 160,
432 0, 151, 0, 178, 177, 0, 0, 162, 161, 154,
Patrick Georgi8d313682010-05-05 13:12:42 +0000433
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000434 146, 156, 144, 150, 155, 156, 0, 139, 142, 132,
435 0, 236, 143, 147, 139, 141, 137, 139, 144, 0,
436 128, 127, 127, 126, 123, 0, 0, 138, 0, 122,
437 139, 125, 132, 136, 117, 117, 0, 0, 124, 116,
438 115, 113, 124, 97, 98, 91, 0, 102, 100, 98,
439 83, 0, 80, 83, 74, 0, 60, 63, 0, 63,
440 0, 56, 51, 33, 29, 0, 236, 40, 132, 134,
441 136, 138, 140, 142
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000442 } ;
443
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000444static const flex_int16_t yy_def[175] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445 { 0,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000446 167, 1, 167, 168, 167, 167, 168, 169, 170, 168,
447 10, 168, 10, 168, 10, 10, 10, 168, 168, 168,
448 168, 168, 168, 168, 168, 168, 168, 168, 167, 167,
449 169, 171, 172, 170, 173, 167, 10, 10, 10, 168,
450 168, 168, 10, 168, 168, 168, 168, 168, 168, 168,
451 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
452 168, 168, 168, 168, 168, 167, 172, 174, 39, 168,
453 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
454 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
455 168, 168, 168, 168, 167, 168, 168, 168, 168, 168,
Patrick Georgi8d313682010-05-05 13:12:42 +0000456
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000457 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
458 168, 167, 168, 168, 168, 168, 168, 168, 168, 168,
459 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
460 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
461 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
462 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
463 168, 168, 168, 168, 168, 168, 0, 167, 167, 167,
464 167, 167, 167, 167
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000465 } ;
466
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000467static const flex_int16_t yy_nxt[275] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000468 { 0,
469 4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200470 13, 13, 14, 4, 4, 4, 13, 13, 15, 16,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800471 17, 13, 18, 19, 20, 21, 22, 4, 23, 24,
472 4, 25, 26, 4, 27, 4, 4, 4, 32, 32,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000473 28, 33, 35, 36, 37, 37, 37, 166, 38, 38,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800474 38, 38, 38, 49, 38, 38, 38, 38, 38, 38,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000475 38, 38, 38, 56, 54, 165, 38, 38, 38, 57,
476 58, 164, 50, 51, 55, 163, 52, 41, 162, 59,
477 35, 36, 161, 42, 38, 38, 38, 46, 61, 32,
478 32, 62, 65, 160, 68, 68, 63, 28, 43, 38,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000479
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000480 38, 38, 38, 38, 38, 159, 44, 158, 157, 45,
481 69, 69, 69, 156, 69, 69, 68, 68, 155, 94,
482 69, 69, 69, 69, 69, 69, 154, 153, 152, 151,
483 150, 73, 31, 31, 34, 34, 32, 32, 67, 67,
484 35, 35, 68, 68, 149, 148, 147, 146, 145, 144,
485 143, 142, 141, 140, 139, 138, 137, 136, 135, 134,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200486 133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
487 123, 122, 121, 120, 119, 118, 117, 116, 115, 114,
488 113, 112, 111, 110, 109, 108, 107, 106, 105, 104,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000489 103, 102, 101, 100, 99, 98, 97, 96, 95, 93,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000490
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000491 92, 91, 90, 89, 88, 87, 86, 85, 84, 83,
492 82, 81, 80, 79, 78, 77, 76, 75, 74, 72,
493 71, 70, 36, 66, 29, 64, 60, 53, 48, 47,
494 40, 39, 30, 29, 167, 3, 167, 167, 167, 167,
495 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
496 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
497 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
498 167, 167, 167, 167
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000499 } ;
500
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000501static const flex_int16_t yy_chk[275] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000502 { 0,
503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
504 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
505 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200506 1, 1, 1, 1, 1, 1, 1, 1, 8, 8,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000507 168, 8, 9, 9, 10, 10, 10, 165, 10, 10,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800508 13, 13, 13, 20, 10, 10, 10, 10, 10, 10,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000509 15, 15, 15, 23, 22, 164, 17, 17, 17, 23,
510 24, 163, 20, 20, 22, 162, 20, 15, 160, 24,
511 34, 34, 158, 15, 16, 16, 16, 17, 26, 31,
512 31, 26, 31, 157, 33, 33, 26, 33, 16, 38,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000513
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000514 38, 38, 43, 43, 43, 155, 16, 154, 153, 16,
515 39, 39, 39, 151, 39, 39, 67, 67, 150, 67,
516 39, 39, 39, 39, 39, 39, 149, 148, 146, 145,
517 144, 43, 169, 169, 170, 170, 171, 171, 172, 172,
518 173, 173, 174, 174, 143, 142, 141, 140, 139, 136,
519 135, 134, 133, 132, 131, 130, 128, 125, 124, 123,
520 122, 121, 119, 118, 117, 116, 115, 114, 113, 110,
521 109, 108, 106, 105, 104, 103, 102, 101, 100, 99,
522 98, 95, 94, 92, 90, 89, 85, 84, 83, 81,
523 80, 78, 77, 74, 73, 72, 71, 70, 68, 64,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000524
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000525 63, 62, 61, 60, 59, 58, 56, 55, 54, 53,
526 52, 51, 50, 49, 48, 47, 46, 45, 44, 42,
527 41, 40, 35, 32, 29, 27, 25, 21, 19, 18,
528 14, 11, 7, 5, 3, 167, 167, 167, 167, 167,
529 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
530 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
531 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
532 167, 167, 167, 167
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000533 } ;
534
535static yy_state_type yy_last_accepting_state;
536static char *yy_last_accepting_cpos;
537
538extern int yy_flex_debug;
539int yy_flex_debug = 0;
540
541/* The intent behind this definition is that it'll catch
542 * any uses of REJECT which flex missed.
543 */
544#define REJECT reject_used_but_not_detected
545#define yymore() yymore_used_but_not_detected
546#define YY_MORE_ADJ 0
547#define YY_RESTORE_YY_MORE_OFFSET
548char *yytext;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000549/*
550 * sconfig, coreboot device tree compiler
551 *
552 * Copyright (C) 2010 coresystems GmbH
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700553 * written by Patrick Georgi <patrick@georgi-clan.de>
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000554 *
555 * This program is free software; you can redistribute it and/or modify
556 * it under the terms of the GNU General Public License as published by
557 * the Free Software Foundation; version 2 of the License.
558 *
559 * This program is distributed in the hope that it will be useful,
560 * but WITHOUT ANY WARRANTY; without even the implied warranty of
561 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
562 * GNU General Public License for more details.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000563 */
564
565#include "sconfig.tab.h"
566
567int linenum = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000568
569#define INITIAL 0
570
571#ifndef YY_NO_UNISTD_H
572/* Special case for "unistd.h", since it is non-ANSI. We include it way
573 * down here because we want the user's section 1 to have been scanned first.
574 * The user has a chance to override it with an option.
575 */
576#include <unistd.h>
577#endif
578
579#ifndef YY_EXTRA_TYPE
580#define YY_EXTRA_TYPE void *
581#endif
582
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000583static int yy_init_globals ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000584
585/* Accessor methods to globals.
586 These are made visible to non-reentrant scanners for convenience. */
587
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000588int yylex_destroy ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000589
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000590int yyget_debug ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000591
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000592void yyset_debug ( int debug_flag );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000593
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000594YY_EXTRA_TYPE yyget_extra ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000595
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000596void yyset_extra ( YY_EXTRA_TYPE user_defined );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000597
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000598FILE *yyget_in ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000599
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000600void yyset_in ( FILE * _in_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000601
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000602FILE *yyget_out ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000603
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000604void yyset_out ( FILE * _out_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000605
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000606 int yyget_leng ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000607
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000608char *yyget_text ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000609
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000610int yyget_lineno ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000611
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000612void yyset_lineno ( int _line_number );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000613
614/* Macros after this point can all be overridden by user definitions in
615 * section 1.
616 */
617
618#ifndef YY_SKIP_YYWRAP
619#ifdef __cplusplus
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000620extern "C" int yywrap ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000621#else
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000622extern int yywrap ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000623#endif
624#endif
625
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700626#ifndef YY_NO_UNPUT
Furquan Shaikhe6700292017-02-11 00:50:38 -0800627
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000628 static void yyunput ( int c, char *buf_ptr );
Patrick Georgi8d313682010-05-05 13:12:42 +0000629
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700630#endif
631
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000632#ifndef yytext_ptr
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000633static void yy_flex_strncpy ( char *, const char *, int );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000634#endif
635
636#ifdef YY_NEED_STRLEN
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000637static int yy_flex_strlen ( const char * );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000638#endif
639
640#ifndef YY_NO_INPUT
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000641#ifdef __cplusplus
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000642static int yyinput ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000643#else
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000644static int input ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000645#endif
646
647#endif
648
649/* Amount of stuff to slurp up with each read. */
650#ifndef YY_READ_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000651#ifdef __ia64__
652/* On IA-64, the buffer size is 16k, not 8k */
653#define YY_READ_BUF_SIZE 16384
654#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000655#define YY_READ_BUF_SIZE 8192
Patrick Georgi8d313682010-05-05 13:12:42 +0000656#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000657#endif
658
659/* Copy whatever the last rule matched to the standard output. */
660#ifndef ECHO
661/* This used to be an fputs(), but since the string might contain NUL's,
662 * we now use fwrite().
663 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800664#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000665#endif
666
667/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
668 * is returned in "result".
669 */
670#ifndef YY_INPUT
671#define YY_INPUT(buf,result,max_size) \
672 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
673 { \
674 int c = '*'; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200675 int n; \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000676 for ( n = 0; n < max_size && \
677 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
678 buf[n] = (char) c; \
679 if ( c == '\n' ) \
680 buf[n++] = (char) c; \
681 if ( c == EOF && ferror( yyin ) ) \
682 YY_FATAL_ERROR( "input in flex scanner failed" ); \
683 result = n; \
684 } \
685 else \
686 { \
687 errno=0; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200688 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000689 { \
690 if( errno != EINTR) \
691 { \
692 YY_FATAL_ERROR( "input in flex scanner failed" ); \
693 break; \
694 } \
695 errno=0; \
696 clearerr(yyin); \
697 } \
698 }\
699\
700
701#endif
702
703/* No semi-colon after return; correct usage is to write "yyterminate();" -
704 * we don't want an extra ';' after the "return" because that will cause
705 * some compilers to complain about unreachable statements.
706 */
707#ifndef yyterminate
708#define yyterminate() return YY_NULL
709#endif
710
711/* Number of entries by which start-condition stack grows. */
712#ifndef YY_START_STACK_INCR
713#define YY_START_STACK_INCR 25
714#endif
715
716/* Report a fatal error. */
717#ifndef YY_FATAL_ERROR
718#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
719#endif
720
721/* end tables serialization structures and prototypes */
722
723/* Default declaration of generated scanner - a define so the user can
724 * easily add parameters.
725 */
726#ifndef YY_DECL
727#define YY_DECL_IS_OURS 1
728
729extern int yylex (void);
730
731#define YY_DECL int yylex (void)
732#endif /* !YY_DECL */
733
734/* Code executed at the beginning of each rule, after yytext and yyleng
735 * have been set up.
736 */
737#ifndef YY_USER_ACTION
738#define YY_USER_ACTION
739#endif
740
741/* Code executed at the end of each rule. */
742#ifndef YY_BREAK
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700743#define YY_BREAK /*LINTED*/break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000744#endif
745
746#define YY_RULE_SETUP \
747 YY_USER_ACTION
748
749/** The main scanner function which does all the work.
750 */
751YY_DECL
752{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700753 yy_state_type yy_current_state;
754 char *yy_cp, *yy_bp;
755 int yy_act;
Patrick Georgi8d313682010-05-05 13:12:42 +0000756
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000757 if ( !(yy_init) )
758 {
759 (yy_init) = 1;
760
761#ifdef YY_USER_INIT
762 YY_USER_INIT;
763#endif
764
765 if ( ! (yy_start) )
766 (yy_start) = 1; /* first start state */
767
768 if ( ! yyin )
769 yyin = stdin;
770
771 if ( ! yyout )
772 yyout = stdout;
773
774 if ( ! YY_CURRENT_BUFFER ) {
775 yyensure_buffer_stack ();
776 YY_CURRENT_BUFFER_LVALUE =
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000777 yy_create_buffer( yyin, YY_BUF_SIZE );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000778 }
779
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000780 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000781 }
782
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700783 {
784
785 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000786 {
787 yy_cp = (yy_c_buf_p);
788
789 /* Support of yytext. */
790 *yy_cp = (yy_hold_char);
791
792 /* yy_bp points to the position in yy_ch_buf of the start of
793 * the current run.
794 */
795 yy_bp = yy_cp;
796
797 yy_current_state = (yy_start);
798yy_match:
799 do
800 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700801 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000802 if ( yy_accept[yy_current_state] )
803 {
804 (yy_last_accepting_state) = yy_current_state;
805 (yy_last_accepting_cpos) = yy_cp;
806 }
807 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
808 {
809 yy_current_state = (int) yy_def[yy_current_state];
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000810 if ( yy_current_state >= 168 )
811 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000812 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000813 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000814 ++yy_cp;
815 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000816 while ( yy_base[yy_current_state] != 236 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000817
818yy_find_action:
819 yy_act = yy_accept[yy_current_state];
820 if ( yy_act == 0 )
821 { /* have to back up */
822 yy_cp = (yy_last_accepting_cpos);
823 yy_current_state = (yy_last_accepting_state);
824 yy_act = yy_accept[yy_current_state];
825 }
826
827 YY_DO_BEFORE_ACTION;
828
829do_action: /* This label is used only to access EOF actions. */
830
831 switch ( yy_act )
832 { /* beginning of action switch */
833 case 0: /* must back up */
834 /* undo the effects of YY_DO_BEFORE_ACTION */
835 *yy_cp = (yy_hold_char);
836 yy_cp = (yy_last_accepting_cpos);
837 yy_current_state = (yy_last_accepting_state);
838 goto yy_find_action;
839
840case 1:
841YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000842{}
843 YY_BREAK
844case 2:
845/* rule 2 can match eol */
846YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000847{linenum++;}
848 YY_BREAK
849case 3:
850/* rule 3 can match eol */
851YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000852{linenum++;}
853 YY_BREAK
854case 4:
855YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000856{return(CHIP);}
857 YY_BREAK
858case 5:
859YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000860{return(DEVICE);}
861 YY_BREAK
862case 6:
863YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000864{return(REGISTER);}
865 YY_BREAK
866case 7:
867YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000868{yylval.number=1; return(BOOL);}
869 YY_BREAK
870case 8:
871YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000872{yylval.number=0; return(BOOL);}
873 YY_BREAK
874case 9:
875YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000876{yylval.number=3; return(STATUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000877 YY_BREAK
878case 10:
879YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000880{yylval.number=5; return(STATUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000881 YY_BREAK
882case 11:
883YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000884{yylval.number=PCI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000885 YY_BREAK
886case 12:
887YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000888{yylval.number=IOAPIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000889 YY_BREAK
890case 13:
891YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000892{yylval.number=PNP; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000893 YY_BREAK
894case 14:
895YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000896{yylval.number=I2C; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000897 YY_BREAK
898case 15:
899YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000900{yylval.number=APIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000901 YY_BREAK
902case 16:
903YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000904{yylval.number=CPU_CLUSTER; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000905 YY_BREAK
906case 17:
907YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000908{yylval.number=CPU; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000909 YY_BREAK
910case 18:
911YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000912{yylval.number=DOMAIN; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000913 YY_BREAK
914case 19:
915YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000916{yylval.number=GENERIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000917 YY_BREAK
918case 20:
919YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000920{yylval.number=MMIO; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000921 YY_BREAK
922case 21:
923YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000924{yylval.number=SPI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000925 YY_BREAK
926case 22:
927YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000928{yylval.number=USB; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000929 YY_BREAK
930case 23:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000931YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000932{yylval.number=IRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000933 YY_BREAK
934case 24:
935YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000936{yylval.number=DRQ; return(RESOURCE);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000937 YY_BREAK
938case 25:
Sven Schnelle750edfd2011-03-01 21:43:57 +0000939YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000940{yylval.number=IO; return(RESOURCE);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000941 YY_BREAK
942case 26:
943YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000944{return(IOAPIC_IRQ);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000945 YY_BREAK
946case 27:
Patrick Georgi2b108a42012-07-13 12:02:44 +0200947YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000948{return(INHERIT);}
Patrick Georgi2b108a42012-07-13 12:02:44 +0200949 YY_BREAK
950case 28:
Aaron Durbinffda804b2014-09-03 12:40:15 -0500951YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000952{return(SUBSYSTEMID);}
Aaron Durbinffda804b2014-09-03 12:40:15 -0500953 YY_BREAK
954case 29:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700955YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000956{return(END);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700957 YY_BREAK
958case 30:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200959YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000960{return(SLOT_DESC);}
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200961 YY_BREAK
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700962case 31:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700963YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000964{return(EQUALS);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700965 YY_BREAK
966case 32:
Furquan Shaikhe6700292017-02-11 00:50:38 -0800967YY_RULE_SETUP
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800968{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Furquan Shaikhe6700292017-02-11 00:50:38 -0800969 YY_BREAK
970case 33:
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800971YY_RULE_SETUP
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200972{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800973 YY_BREAK
974case 34:
Duncan Lauriebae9f852018-05-07 14:18:13 -0700975YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000976{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Duncan Lauriebae9f852018-05-07 14:18:13 -0700977 YY_BREAK
978case 35:
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800979YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000980{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800981 YY_BREAK
982case 36:
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200983/* rule 36 can match eol */
984YY_RULE_SETUP
985{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
986 YY_BREAK
987case 37:
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000988/* rule 37 can match eol */
989YY_RULE_SETUP
990{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
991 YY_BREAK
992case 38:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200993YY_RULE_SETUP
994{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
995 YY_BREAK
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000996case 39:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000997YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000998ECHO;
999 YY_BREAK
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001000case YY_STATE_EOF(INITIAL):
1001 yyterminate();
1002
1003 case YY_END_OF_BUFFER:
1004 {
1005 /* Amount of text matched not including the EOB char. */
1006 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1007
1008 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1009 *yy_cp = (yy_hold_char);
1010 YY_RESTORE_YY_MORE_OFFSET
1011
1012 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1013 {
1014 /* We're scanning a new file or input source. It's
1015 * possible that this happened because the user
1016 * just pointed yyin at a new source and called
1017 * yylex(). If so, then we have to assure
1018 * consistency between YY_CURRENT_BUFFER and our
1019 * globals. Here is the right place to do so, because
1020 * this is the first action (other than possibly a
1021 * back-up) that will match for the new input source.
1022 */
1023 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1024 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1025 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1026 }
1027
1028 /* Note that here we test for yy_c_buf_p "<=" to the position
1029 * of the first EOB in the buffer, since yy_c_buf_p will
1030 * already have been incremented past the NUL character
1031 * (since all states make transitions on EOB to the
1032 * end-of-buffer state). Contrast this with the test
1033 * in input().
1034 */
1035 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1036 { /* This was really a NUL. */
1037 yy_state_type yy_next_state;
1038
1039 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1040
1041 yy_current_state = yy_get_previous_state( );
1042
1043 /* Okay, we're now positioned to make the NUL
1044 * transition. We couldn't have
1045 * yy_get_previous_state() go ahead and do it
1046 * for us because it doesn't know how to deal
1047 * with the possibility of jamming (and we don't
1048 * want to build jamming into it because then it
1049 * will run more slowly).
1050 */
1051
1052 yy_next_state = yy_try_NUL_trans( yy_current_state );
1053
1054 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1055
1056 if ( yy_next_state )
1057 {
1058 /* Consume the NUL. */
1059 yy_cp = ++(yy_c_buf_p);
1060 yy_current_state = yy_next_state;
1061 goto yy_match;
1062 }
1063
1064 else
1065 {
1066 yy_cp = (yy_c_buf_p);
1067 goto yy_find_action;
1068 }
1069 }
1070
1071 else switch ( yy_get_next_buffer( ) )
1072 {
1073 case EOB_ACT_END_OF_FILE:
1074 {
1075 (yy_did_buffer_switch_on_eof) = 0;
1076
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001077 if ( yywrap( ) )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001078 {
1079 /* Note: because we've taken care in
1080 * yy_get_next_buffer() to have set up
1081 * yytext, we can now set up
1082 * yy_c_buf_p so that if some total
1083 * hoser (like flex itself) wants to
1084 * call the scanner after we return the
1085 * YY_NULL, it'll still work - another
1086 * YY_NULL will get returned.
1087 */
1088 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1089
1090 yy_act = YY_STATE_EOF(YY_START);
1091 goto do_action;
1092 }
1093
1094 else
1095 {
1096 if ( ! (yy_did_buffer_switch_on_eof) )
1097 YY_NEW_FILE;
1098 }
1099 break;
1100 }
1101
1102 case EOB_ACT_CONTINUE_SCAN:
1103 (yy_c_buf_p) =
1104 (yytext_ptr) + yy_amount_of_matched_text;
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_match;
1111
1112 case EOB_ACT_LAST_MATCH:
1113 (yy_c_buf_p) =
1114 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1115
1116 yy_current_state = yy_get_previous_state( );
1117
1118 yy_cp = (yy_c_buf_p);
1119 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1120 goto yy_find_action;
1121 }
1122 break;
1123 }
1124
1125 default:
1126 YY_FATAL_ERROR(
1127 "fatal flex scanner internal error--no action found" );
1128 } /* end of action switch */
1129 } /* end of scanning one token */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001130 } /* end of user's declarations */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001131} /* end of yylex */
1132
1133/* yy_get_next_buffer - try to read in a new buffer
1134 *
1135 * Returns a code representing an action:
1136 * EOB_ACT_LAST_MATCH -
1137 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1138 * EOB_ACT_END_OF_FILE - end of file
1139 */
1140static int yy_get_next_buffer (void)
1141{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001142 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1143 char *source = (yytext_ptr);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001144 int number_to_move, i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001145 int ret_val;
1146
1147 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1148 YY_FATAL_ERROR(
1149 "fatal flex scanner internal error--end of buffer missed" );
1150
1151 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1152 { /* Don't try to fill the buffer, so this is an EOF. */
1153 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1154 {
1155 /* We matched a single character, the EOB, so
1156 * treat this as a final EOF.
1157 */
1158 return EOB_ACT_END_OF_FILE;
1159 }
1160
1161 else
1162 {
1163 /* We matched some text prior to the EOB, first
1164 * process it.
1165 */
1166 return EOB_ACT_LAST_MATCH;
1167 }
1168 }
1169
1170 /* Try to read more data. */
1171
1172 /* First move last chars to start of buffer. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001173 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001174
1175 for ( i = 0; i < number_to_move; ++i )
1176 *(dest++) = *(source++);
1177
1178 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1179 /* don't do the read, it's not guaranteed to return an EOF,
1180 * just force an EOF
1181 */
1182 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1183
1184 else
1185 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001186 int num_to_read =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001187 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1188
1189 while ( num_to_read <= 0 )
1190 { /* Not enough room in the buffer - grow it. */
1191
1192 /* just a shorter name for the current buffer */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001193 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001194
1195 int yy_c_buf_p_offset =
1196 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1197
1198 if ( b->yy_is_our_buffer )
1199 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001200 int new_size = b->yy_buf_size * 2;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001201
1202 if ( new_size <= 0 )
1203 b->yy_buf_size += b->yy_buf_size / 8;
1204 else
1205 b->yy_buf_size *= 2;
1206
1207 b->yy_ch_buf = (char *)
1208 /* Include room in for 2 EOB chars. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001209 yyrealloc( (void *) b->yy_ch_buf,
1210 (yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001211 }
1212 else
1213 /* Can't grow it, we don't own it. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001214 b->yy_ch_buf = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001215
1216 if ( ! b->yy_ch_buf )
1217 YY_FATAL_ERROR(
1218 "fatal error - scanner input buffer overflow" );
1219
1220 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1221
1222 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1223 number_to_move - 1;
1224
1225 }
1226
1227 if ( num_to_read > YY_READ_BUF_SIZE )
1228 num_to_read = YY_READ_BUF_SIZE;
1229
1230 /* Read in more data. */
1231 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001232 (yy_n_chars), num_to_read );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001233
1234 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1235 }
1236
1237 if ( (yy_n_chars) == 0 )
1238 {
1239 if ( number_to_move == YY_MORE_ADJ )
1240 {
1241 ret_val = EOB_ACT_END_OF_FILE;
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001242 yyrestart( yyin );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001243 }
1244
1245 else
1246 {
1247 ret_val = EOB_ACT_LAST_MATCH;
1248 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1249 YY_BUFFER_EOF_PENDING;
1250 }
1251 }
1252
1253 else
1254 ret_val = EOB_ACT_CONTINUE_SCAN;
1255
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001256 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001257 /* Extend the array by 50%, plus the number we really need. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001258 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001259 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1260 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001261 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1262 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001263 /* "- 2" to take care of EOB's */
1264 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001265 }
1266
1267 (yy_n_chars) += number_to_move;
1268 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1269 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1270
1271 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1272
1273 return ret_val;
1274}
1275
1276/* yy_get_previous_state - get the state just before the EOB char was reached */
1277
1278 static yy_state_type yy_get_previous_state (void)
1279{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001280 yy_state_type yy_current_state;
1281 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001282
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001283 yy_current_state = (yy_start);
1284
1285 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1286 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001287 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001288 if ( yy_accept[yy_current_state] )
1289 {
1290 (yy_last_accepting_state) = yy_current_state;
1291 (yy_last_accepting_cpos) = yy_cp;
1292 }
1293 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1294 {
1295 yy_current_state = (int) yy_def[yy_current_state];
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001296 if ( yy_current_state >= 168 )
1297 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001298 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001299 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001300 }
1301
1302 return yy_current_state;
1303}
1304
1305/* yy_try_NUL_trans - try to make a transition on the NUL character
1306 *
1307 * synopsis
1308 * next_state = yy_try_NUL_trans( current_state );
1309 */
1310 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1311{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001312 int yy_is_jam;
1313 char *yy_cp = (yy_c_buf_p);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001314
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001315 YY_CHAR yy_c = 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001316 if ( yy_accept[yy_current_state] )
1317 {
1318 (yy_last_accepting_state) = yy_current_state;
1319 (yy_last_accepting_cpos) = yy_cp;
1320 }
1321 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1322 {
1323 yy_current_state = (int) yy_def[yy_current_state];
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001324 if ( yy_current_state >= 168 )
1325 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001326 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001327 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1328 yy_is_jam = (yy_current_state == 167);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001329
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001330 return yy_is_jam ? 0 : yy_current_state;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001331}
1332
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001333#ifndef YY_NO_UNPUT
1334
1335 static void yyunput (int c, char * yy_bp )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001336{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001337 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001338
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001339 yy_cp = (yy_c_buf_p);
1340
1341 /* undo effects of setting up yytext */
1342 *yy_cp = (yy_hold_char);
1343
1344 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1345 { /* need to shift things up to make room */
1346 /* +2 for EOB chars. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001347 int number_to_move = (yy_n_chars) + 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001348 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001349 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001350 char *source =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001351 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1352
1353 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1354 *--dest = *--source;
1355
1356 yy_cp += (int) (dest - source);
1357 yy_bp += (int) (dest - source);
1358 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001359 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001360
1361 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1362 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1363 }
1364
1365 *--yy_cp = (char) c;
1366
1367 (yytext_ptr) = yy_bp;
1368 (yy_hold_char) = *yy_cp;
1369 (yy_c_buf_p) = yy_cp;
1370}
1371
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001372#endif
1373
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001374#ifndef YY_NO_INPUT
1375#ifdef __cplusplus
1376 static int yyinput (void)
1377#else
1378 static int input (void)
1379#endif
1380
1381{
1382 int c;
Patrick Georgi8d313682010-05-05 13:12:42 +00001383
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001384 *(yy_c_buf_p) = (yy_hold_char);
1385
1386 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1387 {
1388 /* yy_c_buf_p now points to the character we want to return.
1389 * If this occurs *before* the EOB characters, then it's a
1390 * valid NUL; if not, then we've hit the end of the buffer.
1391 */
1392 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1393 /* This was really a NUL. */
1394 *(yy_c_buf_p) = '\0';
1395
1396 else
1397 { /* need more input */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001398 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001399 ++(yy_c_buf_p);
1400
1401 switch ( yy_get_next_buffer( ) )
1402 {
1403 case EOB_ACT_LAST_MATCH:
1404 /* This happens because yy_g_n_b()
1405 * sees that we've accumulated a
1406 * token and flags that we need to
1407 * try matching the token before
1408 * proceeding. But for input(),
1409 * there's no matching to consider.
1410 * So convert the EOB_ACT_LAST_MATCH
1411 * to EOB_ACT_END_OF_FILE.
1412 */
1413
1414 /* Reset buffer status. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001415 yyrestart( yyin );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001416
1417 /*FALLTHROUGH*/
1418
1419 case EOB_ACT_END_OF_FILE:
1420 {
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001421 if ( yywrap( ) )
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001422 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001423
1424 if ( ! (yy_did_buffer_switch_on_eof) )
1425 YY_NEW_FILE;
1426#ifdef __cplusplus
1427 return yyinput();
1428#else
1429 return input();
1430#endif
1431 }
1432
1433 case EOB_ACT_CONTINUE_SCAN:
1434 (yy_c_buf_p) = (yytext_ptr) + offset;
1435 break;
1436 }
1437 }
1438 }
1439
1440 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1441 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1442 (yy_hold_char) = *++(yy_c_buf_p);
1443
1444 return c;
1445}
1446#endif /* ifndef YY_NO_INPUT */
1447
1448/** Immediately switch to a different input stream.
1449 * @param input_file A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001450 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001451 * @note This function does not reset the start condition to @c INITIAL .
1452 */
1453 void yyrestart (FILE * input_file )
1454{
Patrick Georgi8d313682010-05-05 13:12:42 +00001455
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001456 if ( ! YY_CURRENT_BUFFER ){
1457 yyensure_buffer_stack ();
1458 YY_CURRENT_BUFFER_LVALUE =
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001459 yy_create_buffer( yyin, YY_BUF_SIZE );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001460 }
1461
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001462 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1463 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001464}
1465
1466/** Switch to a different input buffer.
1467 * @param new_buffer The new input buffer.
Patrick Georgi8d313682010-05-05 13:12:42 +00001468 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001469 */
1470 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1471{
Patrick Georgi8d313682010-05-05 13:12:42 +00001472
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001473 /* TODO. We should be able to replace this entire function body
1474 * with
1475 * yypop_buffer_state();
1476 * yypush_buffer_state(new_buffer);
1477 */
1478 yyensure_buffer_stack ();
1479 if ( YY_CURRENT_BUFFER == new_buffer )
1480 return;
1481
1482 if ( YY_CURRENT_BUFFER )
1483 {
1484 /* Flush out information for old buffer. */
1485 *(yy_c_buf_p) = (yy_hold_char);
1486 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1487 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1488 }
1489
1490 YY_CURRENT_BUFFER_LVALUE = new_buffer;
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001491 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001492
1493 /* We don't actually know whether we did this switch during
1494 * EOF (yywrap()) processing, but the only time this flag
1495 * is looked at is after yywrap() is called, so it's safe
1496 * to go ahead and always set it.
1497 */
1498 (yy_did_buffer_switch_on_eof) = 1;
1499}
1500
1501static void yy_load_buffer_state (void)
1502{
1503 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1504 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1505 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1506 (yy_hold_char) = *(yy_c_buf_p);
1507}
1508
1509/** Allocate and initialize an input buffer state.
1510 * @param file A readable stream.
1511 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Patrick Georgi8d313682010-05-05 13:12:42 +00001512 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001513 * @return the allocated buffer state.
1514 */
1515 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1516{
1517 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001518
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001519 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001520 if ( ! b )
1521 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1522
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001523 b->yy_buf_size = size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001524
1525 /* yy_ch_buf has to be 2 characters longer than the size given because
1526 * we need to put in 2 end-of-buffer characters.
1527 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001528 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001529 if ( ! b->yy_ch_buf )
1530 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1531
1532 b->yy_is_our_buffer = 1;
1533
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001534 yy_init_buffer( b, file );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001535
1536 return b;
1537}
1538
1539/** Destroy the buffer.
1540 * @param b a buffer created with yy_create_buffer()
Patrick Georgi8d313682010-05-05 13:12:42 +00001541 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001542 */
1543 void yy_delete_buffer (YY_BUFFER_STATE b )
1544{
Patrick Georgi8d313682010-05-05 13:12:42 +00001545
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001546 if ( ! b )
1547 return;
1548
1549 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1550 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1551
1552 if ( b->yy_is_our_buffer )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001553 yyfree( (void *) b->yy_ch_buf );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001554
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001555 yyfree( (void *) b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001556}
1557
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001558/* Initializes or reinitializes a buffer.
1559 * This function is sometimes called more than once on the same buffer,
1560 * such as during a yyrestart() or at EOF.
1561 */
1562 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1563
1564{
1565 int oerrno = errno;
Patrick Georgi8d313682010-05-05 13:12:42 +00001566
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001567 yy_flush_buffer( b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001568
1569 b->yy_input_file = file;
1570 b->yy_fill_buffer = 1;
1571
1572 /* If b is the current buffer, then yy_init_buffer was _probably_
1573 * called from yyrestart() or through yy_get_next_buffer.
1574 * In that case, we don't want to reset the lineno or column.
1575 */
1576 if (b != YY_CURRENT_BUFFER){
1577 b->yy_bs_lineno = 1;
1578 b->yy_bs_column = 0;
1579 }
1580
1581 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Patrick Georgi8d313682010-05-05 13:12:42 +00001582
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001583 errno = oerrno;
1584}
1585
1586/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1587 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Patrick Georgi8d313682010-05-05 13:12:42 +00001588 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001589 */
1590 void yy_flush_buffer (YY_BUFFER_STATE b )
1591{
1592 if ( ! b )
1593 return;
1594
1595 b->yy_n_chars = 0;
1596
1597 /* We always need two end-of-buffer characters. The first causes
1598 * a transition to the end-of-buffer state. The second causes
1599 * a jam in that state.
1600 */
1601 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1602 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1603
1604 b->yy_buf_pos = &b->yy_ch_buf[0];
1605
1606 b->yy_at_bol = 1;
1607 b->yy_buffer_status = YY_BUFFER_NEW;
1608
1609 if ( b == YY_CURRENT_BUFFER )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001610 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001611}
1612
1613/** Pushes the new state onto the stack. The new state becomes
1614 * the current state. This function will allocate the stack
1615 * if necessary.
1616 * @param new_buffer The new state.
Patrick Georgi8d313682010-05-05 13:12:42 +00001617 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001618 */
1619void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1620{
1621 if (new_buffer == NULL)
1622 return;
1623
1624 yyensure_buffer_stack();
1625
1626 /* This block is copied from yy_switch_to_buffer. */
1627 if ( YY_CURRENT_BUFFER )
1628 {
1629 /* Flush out information for old buffer. */
1630 *(yy_c_buf_p) = (yy_hold_char);
1631 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1632 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1633 }
1634
1635 /* Only push if top exists. Otherwise, replace top. */
1636 if (YY_CURRENT_BUFFER)
1637 (yy_buffer_stack_top)++;
1638 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1639
1640 /* copied from yy_switch_to_buffer. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001641 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001642 (yy_did_buffer_switch_on_eof) = 1;
1643}
1644
1645/** Removes and deletes the top of the stack, if present.
1646 * The next element becomes the new top.
Patrick Georgi8d313682010-05-05 13:12:42 +00001647 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001648 */
1649void yypop_buffer_state (void)
1650{
1651 if (!YY_CURRENT_BUFFER)
1652 return;
1653
1654 yy_delete_buffer(YY_CURRENT_BUFFER );
1655 YY_CURRENT_BUFFER_LVALUE = NULL;
1656 if ((yy_buffer_stack_top) > 0)
1657 --(yy_buffer_stack_top);
1658
1659 if (YY_CURRENT_BUFFER) {
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001660 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001661 (yy_did_buffer_switch_on_eof) = 1;
1662 }
1663}
1664
1665/* Allocates the stack if it does not exist.
1666 * Guarantees space for at least one push.
1667 */
1668static void yyensure_buffer_stack (void)
1669{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001670 yy_size_t num_to_alloc;
Patrick Georgi8d313682010-05-05 13:12:42 +00001671
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001672 if (!(yy_buffer_stack)) {
1673
1674 /* First allocation is just for 2 elements, since we don't know if this
1675 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1676 * immediate realloc on the next call.
1677 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001678 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001679 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1680 (num_to_alloc * sizeof(struct yy_buffer_state*)
1681 );
1682 if ( ! (yy_buffer_stack) )
1683 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001684
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001685 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001686
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001687 (yy_buffer_stack_max) = num_to_alloc;
1688 (yy_buffer_stack_top) = 0;
1689 return;
1690 }
1691
1692 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1693
1694 /* Increase the buffer to prepare for a possible push. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001695 yy_size_t grow_size = 8 /* arbitrary grow size */;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001696
1697 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1698 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1699 ((yy_buffer_stack),
1700 num_to_alloc * sizeof(struct yy_buffer_state*)
1701 );
1702 if ( ! (yy_buffer_stack) )
1703 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1704
1705 /* zero only the new slots.*/
1706 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1707 (yy_buffer_stack_max) = num_to_alloc;
1708 }
1709}
1710
1711/** Setup the input buffer state to scan directly from a user-specified character buffer.
1712 * @param base the character buffer
1713 * @param size the size in bytes of the character buffer
Patrick Georgi8d313682010-05-05 13:12:42 +00001714 *
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001715 * @return the newly allocated buffer state object.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001716 */
1717YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1718{
1719 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001720
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001721 if ( size < 2 ||
1722 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1723 base[size-1] != YY_END_OF_BUFFER_CHAR )
1724 /* They forgot to leave room for the EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001725 return NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001726
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001727 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001728 if ( ! b )
1729 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1730
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001731 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001732 b->yy_buf_pos = b->yy_ch_buf = base;
1733 b->yy_is_our_buffer = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001734 b->yy_input_file = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001735 b->yy_n_chars = b->yy_buf_size;
1736 b->yy_is_interactive = 0;
1737 b->yy_at_bol = 1;
1738 b->yy_fill_buffer = 0;
1739 b->yy_buffer_status = YY_BUFFER_NEW;
1740
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001741 yy_switch_to_buffer( b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001742
1743 return b;
1744}
1745
1746/** Setup the input buffer state to scan a string. The next call to yylex() will
1747 * scan from a @e copy of @a str.
1748 * @param yystr a NUL-terminated string to scan
Patrick Georgi8d313682010-05-05 13:12:42 +00001749 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001750 * @return the newly allocated buffer state object.
1751 * @note If you want to scan bytes that may contain NUL values, then use
1752 * yy_scan_bytes() instead.
1753 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001754YY_BUFFER_STATE yy_scan_string (const char * yystr )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001755{
Patrick Georgi8d313682010-05-05 13:12:42 +00001756
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001757 return yy_scan_bytes( yystr, (int) strlen(yystr) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001758}
1759
1760/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1761 * scan from a @e copy of @a bytes.
Patrick Georgi8d313682010-05-05 13:12:42 +00001762 * @param yybytes the byte buffer to scan
1763 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1764 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001765 * @return the newly allocated buffer state object.
1766 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001767YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001768{
1769 YY_BUFFER_STATE b;
1770 char *buf;
1771 yy_size_t n;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001772 int i;
Patrick Georgi8d313682010-05-05 13:12:42 +00001773
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001774 /* Get memory for full buffer, including space for trailing EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001775 n = (yy_size_t) (_yybytes_len + 2);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001776 buf = (char *) yyalloc( n );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001777 if ( ! buf )
1778 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1779
1780 for ( i = 0; i < _yybytes_len; ++i )
1781 buf[i] = yybytes[i];
1782
1783 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1784
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001785 b = yy_scan_buffer( buf, n );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001786 if ( ! b )
1787 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1788
1789 /* It's okay to grow etc. this buffer, and we should throw it
1790 * away when we're done.
1791 */
1792 b->yy_is_our_buffer = 1;
1793
1794 return b;
1795}
1796
1797#ifndef YY_EXIT_FAILURE
1798#define YY_EXIT_FAILURE 2
1799#endif
1800
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001801static void yynoreturn yy_fatal_error (const char* msg )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001802{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001803 fprintf( stderr, "%s\n", msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001804 exit( YY_EXIT_FAILURE );
1805}
1806
1807/* Redefine yyless() so it works in section 3 code. */
1808
1809#undef yyless
1810#define yyless(n) \
1811 do \
1812 { \
1813 /* Undo effects of setting up yytext. */ \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001814 int yyless_macro_arg = (n); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001815 YY_LESS_LINENO(yyless_macro_arg);\
1816 yytext[yyleng] = (yy_hold_char); \
1817 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1818 (yy_hold_char) = *(yy_c_buf_p); \
1819 *(yy_c_buf_p) = '\0'; \
1820 yyleng = yyless_macro_arg; \
1821 } \
1822 while ( 0 )
1823
1824/* Accessor methods (get/set functions) to struct members. */
1825
1826/** Get the current line number.
Patrick Georgi8d313682010-05-05 13:12:42 +00001827 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001828 */
1829int yyget_lineno (void)
1830{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001831
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001832 return yylineno;
1833}
1834
1835/** Get the input stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001836 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001837 */
1838FILE *yyget_in (void)
1839{
1840 return yyin;
1841}
1842
1843/** Get the output stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001844 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001845 */
1846FILE *yyget_out (void)
1847{
1848 return yyout;
1849}
1850
1851/** Get the length of the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001852 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001853 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001854int yyget_leng (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001855{
1856 return yyleng;
1857}
1858
1859/** Get the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001860 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001861 */
1862
1863char *yyget_text (void)
1864{
1865 return yytext;
1866}
1867
1868/** Set the current line number.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001869 * @param _line_number line number
Patrick Georgi8d313682010-05-05 13:12:42 +00001870 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001871 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001872void yyset_lineno (int _line_number )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001873{
Patrick Georgi8d313682010-05-05 13:12:42 +00001874
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001875 yylineno = _line_number;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001876}
1877
1878/** Set the input stream. This does not discard the current
1879 * input buffer.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001880 * @param _in_str A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001881 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001882 * @see yy_switch_to_buffer
1883 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001884void yyset_in (FILE * _in_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001885{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001886 yyin = _in_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001887}
1888
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001889void yyset_out (FILE * _out_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001890{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001891 yyout = _out_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001892}
1893
1894int yyget_debug (void)
1895{
1896 return yy_flex_debug;
1897}
1898
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001899void yyset_debug (int _bdebug )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001900{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001901 yy_flex_debug = _bdebug ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001902}
1903
1904static int yy_init_globals (void)
1905{
1906 /* Initialization is the same as for the non-reentrant scanner.
1907 * This function is called from yylex_destroy(), so don't allocate here.
1908 */
1909
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001910 (yy_buffer_stack) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001911 (yy_buffer_stack_top) = 0;
1912 (yy_buffer_stack_max) = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001913 (yy_c_buf_p) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001914 (yy_init) = 0;
1915 (yy_start) = 0;
1916
1917/* Defined in main.c */
1918#ifdef YY_STDINIT
1919 yyin = stdin;
1920 yyout = stdout;
1921#else
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001922 yyin = NULL;
1923 yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001924#endif
1925
1926 /* For future reference: Set errno on error, since we are called by
1927 * yylex_init()
1928 */
1929 return 0;
1930}
1931
1932/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1933int yylex_destroy (void)
1934{
Patrick Georgi8d313682010-05-05 13:12:42 +00001935
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001936 /* Pop the buffer stack, destroying each element. */
1937 while(YY_CURRENT_BUFFER){
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001938 yy_delete_buffer( YY_CURRENT_BUFFER );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001939 YY_CURRENT_BUFFER_LVALUE = NULL;
1940 yypop_buffer_state();
1941 }
1942
1943 /* Destroy the stack itself. */
1944 yyfree((yy_buffer_stack) );
1945 (yy_buffer_stack) = NULL;
1946
1947 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1948 * yylex() is called, initialization will occur. */
1949 yy_init_globals( );
1950
1951 return 0;
1952}
1953
1954/*
1955 * Internal utility routines.
1956 */
1957
1958#ifndef yytext_ptr
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001959static void yy_flex_strncpy (char* s1, const char * s2, int n )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001960{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001961
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001962 int i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001963 for ( i = 0; i < n; ++i )
1964 s1[i] = s2[i];
1965}
1966#endif
1967
1968#ifdef YY_NEED_STRLEN
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001969static int yy_flex_strlen (const char * s )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001970{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001971 int n;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001972 for ( n = 0; s[n]; ++n )
1973 ;
1974
1975 return n;
1976}
1977#endif
1978
1979void *yyalloc (yy_size_t size )
1980{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001981 return malloc(size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001982}
1983
1984void *yyrealloc (void * ptr, yy_size_t size )
1985{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001986
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001987 /* The cast to (char *) in the following accommodates both
1988 * implementations that use char* generic pointers, and those
1989 * that use void* generic pointers. It works with the latter
1990 * because both ANSI C and C++ allow castless assignment from
1991 * any pointer type to void*, and deal with argument conversions
1992 * as though doing an assignment.
1993 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001994 return realloc(ptr, size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001995}
1996
1997void yyfree (void * ptr )
1998{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001999 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002000}
2001
2002#define YYTABLES_NAME "yytables"
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07002003