blob: 61928e63972d761895acecf4f485c266f711f72b [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
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600162
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000163 #define YY_LESS_LINENO(n)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700164 #define YY_LINENO_REWIND_TO(ptr)
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600165
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. */ \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000171 int 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 )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000179#define unput(c) yyunput( c, (yytext_ptr) )
180
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000181#ifndef YY_STRUCT_YY_BUFFER_STATE
182#define YY_STRUCT_YY_BUFFER_STATE
183struct yy_buffer_state
184 {
185 FILE *yy_input_file;
186
187 char *yy_ch_buf; /* input buffer */
188 char *yy_buf_pos; /* current position in input buffer */
189
190 /* Size of input buffer in bytes, not including room for EOB
191 * characters.
192 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800193 int yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000194
195 /* Number of characters read into yy_ch_buf, not including EOB
196 * characters.
197 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800198 int yy_n_chars;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000199
200 /* Whether we "own" the buffer - i.e., we know we created it,
201 * and can realloc() it to grow it, and should free() it to
202 * delete it.
203 */
204 int yy_is_our_buffer;
205
206 /* Whether this is an "interactive" input source; if so, and
207 * if we're using stdio for input, then we want to use getc()
208 * instead of fread(), to make sure we stop fetching input after
209 * each newline.
210 */
211 int yy_is_interactive;
212
213 /* Whether we're considered to be at the beginning of a line.
214 * If so, '^' rules will be active on the next match, otherwise
215 * not.
216 */
217 int yy_at_bol;
218
219 int yy_bs_lineno; /**< The line count. */
220 int yy_bs_column; /**< The column count. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800221
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000222 /* Whether to try to fill the input buffer when we reach the
223 * end of it.
224 */
225 int yy_fill_buffer;
226
227 int yy_buffer_status;
228
229#define YY_BUFFER_NEW 0
230#define YY_BUFFER_NORMAL 1
231 /* When an EOF's been seen but there's still some text to process
232 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
233 * shouldn't try reading from the input source any more. We might
234 * still have a bunch of tokens to match, though, because of
235 * possible backing-up.
236 *
237 * When we actually see the EOF, we change the status to "new"
238 * (via yyrestart()), so that the user can continue scanning by
239 * just pointing yyin at a new input file.
240 */
241#define YY_BUFFER_EOF_PENDING 2
242
243 };
244#endif /* !YY_STRUCT_YY_BUFFER_STATE */
245
246/* Stack of input buffers. */
247static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
248static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800249static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000250
251/* We provide macros for accessing buffer states in case in the
252 * future we want to put the buffer states in a more general
253 * "scanner state".
254 *
255 * Returns the top of the stack, or NULL.
256 */
257#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
258 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
259 : NULL)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000260/* Same as previous macro, but useful when we know that the buffer stack is not
261 * NULL or when we need an lvalue. For internal use only.
262 */
263#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
264
265/* yy_hold_char holds the character lost when yytext is formed. */
266static char yy_hold_char;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800267static int yy_n_chars; /* number of characters read into yy_ch_buf */
268int yyleng;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000269
270/* Points to current character in buffer. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800271static char *yy_c_buf_p = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000272static int yy_init = 0; /* whether we need to initialize */
273static int yy_start = 0; /* start state number */
274
275/* Flag which is used to allow yywrap()'s to do buffer switches
276 * instead of setting up a fresh yyin. A bit of a hack ...
277 */
278static int yy_did_buffer_switch_on_eof;
279
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000280void yyrestart ( FILE *input_file );
281void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
282YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
283void yy_delete_buffer ( YY_BUFFER_STATE b );
284void yy_flush_buffer ( YY_BUFFER_STATE b );
285void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
286void yypop_buffer_state ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000287
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000288static void yyensure_buffer_stack ( void );
289static void yy_load_buffer_state ( void );
290static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
291#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000292
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000293YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
294YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
295YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000296
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000297void *yyalloc ( yy_size_t );
298void *yyrealloc ( void *, yy_size_t );
299void yyfree ( void * );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000300
301#define yy_new_buffer yy_create_buffer
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000302#define yy_set_interactive(is_interactive) \
303 { \
304 if ( ! YY_CURRENT_BUFFER ){ \
305 yyensure_buffer_stack (); \
306 YY_CURRENT_BUFFER_LVALUE = \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000307 yy_create_buffer( yyin, YY_BUF_SIZE ); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000308 } \
309 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
310 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000311#define yy_set_bol(at_bol) \
312 { \
313 if ( ! YY_CURRENT_BUFFER ){\
314 yyensure_buffer_stack (); \
315 YY_CURRENT_BUFFER_LVALUE = \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000316 yy_create_buffer( yyin, YY_BUF_SIZE ); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000317 } \
318 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
319 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000320#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
321
322/* Begin user sect3 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000323typedef flex_uint8_t YY_CHAR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000324
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800325FILE *yyin = NULL, *yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000326
327typedef int yy_state_type;
328
329extern int yylineno;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000330int yylineno = 1;
331
332extern char *yytext;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700333#ifdef yytext_ptr
334#undef yytext_ptr
335#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000336#define yytext_ptr yytext
337
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000338static yy_state_type yy_get_previous_state ( void );
339static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
340static int yy_get_next_buffer ( void );
341static void yynoreturn yy_fatal_error ( const char* msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000342
343/* Done after the current pattern has been matched and before the
344 * corresponding action - sets up yytext.
345 */
346#define YY_DO_BEFORE_ACTION \
347 (yytext_ptr) = yy_bp; \
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800348 yyleng = (int) (yy_cp - yy_bp); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000349 (yy_hold_char) = *yy_cp; \
350 *yy_cp = '\0'; \
351 (yy_c_buf_p) = yy_cp;
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600352#define YY_NUM_RULES 41
353#define YY_END_OF_BUFFER 42
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000354/* This struct is not used in this scanner,
355 but its presence is necessary. */
356struct yy_trans_info
357 {
358 flex_int32_t yy_verify;
359 flex_int32_t yy_nxt;
360 };
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600361static const flex_int16_t yy_accept[173] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000362 { 0,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600363 0, 0, 42, 40, 1, 3, 40, 40, 40, 35,
364 35, 33, 36, 40, 36, 36, 36, 40, 40, 40,
365 40, 40, 40, 40, 40, 40, 40, 40, 1, 3,
366 40, 0, 40, 40, 0, 2, 35, 36, 40, 40,
367 40, 40, 36, 40, 40, 40, 40, 40, 40, 40,
368 40, 27, 40, 40, 40, 40, 40, 40, 7, 40,
369 40, 40, 40, 40, 40, 40, 39, 39, 40, 0,
370 34, 40, 40, 17, 40, 40, 26, 31, 40, 40,
371 40, 14, 40, 40, 25, 40, 23, 40, 40, 8,
372 11, 13, 40, 40, 21, 40, 22, 40, 0, 37,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000373
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600374 4, 40, 40, 40, 24, 40, 40, 40, 40, 40,
375 40, 20, 40, 40, 40, 38, 38, 40, 40, 40,
376 40, 40, 40, 40, 15, 40, 40, 40, 40, 40,
377 5, 18, 40, 9, 40, 12, 40, 40, 40, 40,
378 40, 19, 29, 40, 40, 40, 40, 40, 40, 40,
379 40, 6, 40, 40, 40, 40, 10, 40, 40, 40,
380 28, 40, 40, 16, 40, 30, 40, 40, 40, 40,
381 32, 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000382 } ;
383
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000384static const YY_CHAR yy_ec[256] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000385 { 0,
386 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
387 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 7, 1, 8, 7, 9,
391 7, 7, 7, 7, 7, 7, 7, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200392 10, 1, 1, 1, 11, 11, 11, 11, 12, 12,
393 1, 1, 13, 1, 1, 1, 1, 14, 1, 1,
394 1, 1, 1, 15, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000396
Patrick Georgi2b108a42012-07-13 12:02:44 +0200397 21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
398 29, 30, 31, 32, 33, 34, 35, 36, 1, 37,
399 38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000400 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407
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
414 } ;
415
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000416static const YY_CHAR yy_meta[39] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000417 { 0,
418 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200421 1, 1, 1, 1, 1, 1, 1, 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000422 } ;
423
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600424static const flex_int16_t yy_base[180] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000425 { 0,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600426 0, 0, 240, 0, 237, 241, 235, 37, 41, 38,
427 200, 0, 44, 222, 54, 78, 60, 214, 209, 45,
428 49, 48, 42, 52, 212, 62, 199, 0, 229, 241,
429 93, 225, 98, 79, 226, 241, 0, 97, 104, 213,
430 202, 191, 110, 198, 193, 203, 192, 193, 200, 200,
431 194, 200, 185, 185, 195, 185, 187, 189, 0, 185,
432 179, 185, 189, 181, 187, 186, 0, 241, 125, 198,
433 0, 191, 171, 184, 174, 181, 0, 0, 172, 175,
434 175, 0, 173, 163, 0, 167, 0, 171, 161, 0,
435 0, 0, 164, 163, 0, 154, 0, 181, 180, 0,
Patrick Georgi8d313682010-05-05 13:12:42 +0000436
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600437 0, 165, 164, 157, 0, 149, 159, 147, 153, 158,
438 159, 0, 142, 145, 135, 0, 241, 146, 150, 142,
439 144, 140, 142, 147, 0, 131, 130, 130, 129, 126,
440 0, 0, 141, 0, 125, 129, 115, 122, 126, 107,
441 107, 0, 0, 114, 106, 105, 103, 114, 100, 101,
442 94, 0, 105, 102, 99, 83, 0, 80, 83, 70,
443 0, 60, 71, 0, 74, 0, 63, 55, 39, 29,
444 0, 241, 40, 146, 148, 150, 152, 154, 156
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445 } ;
446
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600447static const flex_int16_t yy_def[180] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000448 { 0,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600449 172, 1, 172, 173, 172, 172, 173, 174, 175, 173,
450 10, 173, 10, 173, 10, 10, 10, 173, 173, 173,
451 173, 173, 173, 173, 173, 173, 173, 173, 172, 172,
452 174, 176, 177, 175, 178, 172, 10, 10, 10, 173,
453 173, 173, 10, 173, 173, 173, 173, 173, 173, 173,
454 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
455 173, 173, 173, 173, 173, 173, 173, 172, 177, 179,
456 39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
457 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
458 173, 173, 173, 173, 173, 173, 173, 173, 172, 173,
Patrick Georgi8d313682010-05-05 13:12:42 +0000459
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600460 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
461 173, 173, 173, 173, 173, 173, 172, 173, 173, 173,
462 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
463 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
464 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
465 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
466 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
467 173, 0, 172, 172, 172, 172, 172, 172, 172
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000468 } ;
469
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600470static const flex_int16_t yy_nxt[280] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000471 { 0,
472 4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200473 13, 13, 14, 4, 4, 4, 13, 13, 15, 16,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800474 17, 13, 18, 19, 20, 21, 22, 4, 23, 24,
475 4, 25, 26, 4, 27, 4, 4, 4, 32, 32,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600476 28, 33, 35, 36, 37, 37, 37, 171, 38, 38,
477 38, 38, 38, 50, 38, 38, 38, 38, 38, 38,
478 38, 38, 38, 58, 56, 54, 38, 38, 38, 59,
479 60, 170, 51, 52, 57, 169, 53, 41, 55, 61,
480 35, 36, 168, 42, 38, 38, 38, 46, 63, 167,
481 166, 64, 47, 165, 32, 32, 65, 67, 43, 70,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000482
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600483 70, 164, 28, 38, 38, 38, 44, 163, 162, 45,
484 71, 71, 71, 161, 71, 71, 38, 38, 38, 160,
485 71, 71, 71, 71, 71, 71, 70, 70, 159, 98,
486 158, 157, 156, 155, 154, 153, 152, 151, 150, 149,
487 148, 147, 146, 145, 144, 75, 31, 31, 34, 34,
488 32, 32, 69, 69, 35, 35, 70, 70, 143, 142,
489 141, 140, 139, 138, 137, 136, 135, 134, 133, 132,
490 131, 130, 129, 128, 127, 126, 125, 124, 123, 122,
491 121, 120, 119, 118, 117, 116, 115, 114, 113, 112,
492 111, 110, 109, 108, 107, 106, 105, 104, 103, 102,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000493
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600494 101, 100, 99, 97, 96, 95, 94, 93, 92, 91,
495 90, 89, 88, 87, 86, 85, 84, 83, 82, 81,
496 80, 79, 78, 77, 76, 74, 73, 72, 36, 68,
497 29, 66, 62, 49, 48, 40, 39, 30, 29, 172,
498 3, 172, 172, 172, 172, 172, 172, 172, 172, 172,
499 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
500 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
501 172, 172, 172, 172, 172, 172, 172, 172, 172
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000502 } ;
503
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600504static const flex_int16_t yy_chk[280] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000505 { 0,
506 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
507 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
508 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Patrick Georgi2b108a42012-07-13 12:02:44 +0200509 1, 1, 1, 1, 1, 1, 1, 1, 8, 8,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600510 173, 8, 9, 9, 10, 10, 10, 170, 10, 10,
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800511 13, 13, 13, 20, 10, 10, 10, 10, 10, 10,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600512 15, 15, 15, 23, 22, 21, 17, 17, 17, 23,
513 24, 169, 20, 20, 22, 168, 20, 15, 21, 24,
514 34, 34, 167, 15, 16, 16, 16, 17, 26, 165,
515 163, 26, 17, 162, 31, 31, 26, 31, 16, 33,
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000516
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600517 33, 160, 33, 38, 38, 38, 16, 159, 158, 16,
518 39, 39, 39, 156, 39, 39, 43, 43, 43, 155,
519 39, 39, 39, 39, 39, 39, 69, 69, 154, 69,
520 153, 151, 150, 149, 148, 147, 146, 145, 144, 141,
521 140, 139, 138, 137, 136, 43, 174, 174, 175, 175,
522 176, 176, 177, 177, 178, 178, 179, 179, 135, 133,
523 130, 129, 128, 127, 126, 124, 123, 122, 121, 120,
524 119, 118, 115, 114, 113, 111, 110, 109, 108, 107,
525 106, 104, 103, 102, 99, 98, 96, 94, 93, 89,
526 88, 86, 84, 83, 81, 80, 79, 76, 75, 74,
Sven Schnelle750edfd2011-03-01 21:43:57 +0000527
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600528 73, 72, 70, 66, 65, 64, 63, 62, 61, 60,
529 58, 57, 56, 55, 54, 53, 52, 51, 50, 49,
530 48, 47, 46, 45, 44, 42, 41, 40, 35, 32,
531 29, 27, 25, 19, 18, 14, 11, 7, 5, 3,
532 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
533 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
534 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
535 172, 172, 172, 172, 172, 172, 172, 172, 172
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000536 } ;
537
538static yy_state_type yy_last_accepting_state;
539static char *yy_last_accepting_cpos;
540
541extern int yy_flex_debug;
542int yy_flex_debug = 0;
543
544/* The intent behind this definition is that it'll catch
545 * any uses of REJECT which flex missed.
546 */
547#define REJECT reject_used_but_not_detected
548#define yymore() yymore_used_but_not_detected
549#define YY_MORE_ADJ 0
550#define YY_RESTORE_YY_MORE_OFFSET
551char *yytext;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000552/*
553 * sconfig, coreboot device tree compiler
554 *
555 * Copyright (C) 2010 coresystems GmbH
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700556 * written by Patrick Georgi <patrick@georgi-clan.de>
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000557 *
558 * This program is free software; you can redistribute it and/or modify
559 * it under the terms of the GNU General Public License as published by
560 * the Free Software Foundation; version 2 of the License.
561 *
562 * This program is distributed in the hope that it will be useful,
563 * but WITHOUT ANY WARRANTY; without even the implied warranty of
564 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
565 * GNU General Public License for more details.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000566 */
567
568#include "sconfig.tab.h"
569
570int linenum = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000571
572#define INITIAL 0
573
574#ifndef YY_NO_UNISTD_H
575/* Special case for "unistd.h", since it is non-ANSI. We include it way
576 * down here because we want the user's section 1 to have been scanned first.
577 * The user has a chance to override it with an option.
578 */
579#include <unistd.h>
580#endif
581
582#ifndef YY_EXTRA_TYPE
583#define YY_EXTRA_TYPE void *
584#endif
585
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000586static int yy_init_globals ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000587
588/* Accessor methods to globals.
589 These are made visible to non-reentrant scanners for convenience. */
590
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000591int yylex_destroy ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000592
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000593int yyget_debug ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000594
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000595void yyset_debug ( int debug_flag );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000596
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000597YY_EXTRA_TYPE yyget_extra ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000598
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000599void yyset_extra ( YY_EXTRA_TYPE user_defined );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000600
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000601FILE *yyget_in ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000602
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000603void yyset_in ( FILE * _in_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000604
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000605FILE *yyget_out ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000606
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000607void yyset_out ( FILE * _out_str );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000608
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000609 int yyget_leng ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000610
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000611char *yyget_text ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000612
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000613int yyget_lineno ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000614
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000615void yyset_lineno ( int _line_number );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000616
617/* Macros after this point can all be overridden by user definitions in
618 * section 1.
619 */
620
621#ifndef YY_SKIP_YYWRAP
622#ifdef __cplusplus
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000623extern "C" int yywrap ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000624#else
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000625extern int yywrap ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000626#endif
627#endif
628
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700629#ifndef YY_NO_UNPUT
Furquan Shaikhe6700292017-02-11 00:50:38 -0800630
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000631 static void yyunput ( int c, char *buf_ptr );
Patrick Georgi8d313682010-05-05 13:12:42 +0000632
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700633#endif
634
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000635#ifndef yytext_ptr
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000636static void yy_flex_strncpy ( char *, const char *, int );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000637#endif
638
639#ifdef YY_NEED_STRLEN
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000640static int yy_flex_strlen ( const char * );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000641#endif
642
643#ifndef YY_NO_INPUT
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000644#ifdef __cplusplus
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000645static int yyinput ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000646#else
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000647static int input ( void );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000648#endif
649
650#endif
651
652/* Amount of stuff to slurp up with each read. */
653#ifndef YY_READ_BUF_SIZE
Patrick Georgi8d313682010-05-05 13:12:42 +0000654#ifdef __ia64__
655/* On IA-64, the buffer size is 16k, not 8k */
656#define YY_READ_BUF_SIZE 16384
657#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000658#define YY_READ_BUF_SIZE 8192
Patrick Georgi8d313682010-05-05 13:12:42 +0000659#endif /* __ia64__ */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000660#endif
661
662/* Copy whatever the last rule matched to the standard output. */
663#ifndef ECHO
664/* This used to be an fputs(), but since the string might contain NUL's,
665 * we now use fwrite().
666 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800667#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000668#endif
669
670/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
671 * is returned in "result".
672 */
673#ifndef YY_INPUT
674#define YY_INPUT(buf,result,max_size) \
675 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
676 { \
677 int c = '*'; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200678 int n; \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000679 for ( n = 0; n < max_size && \
680 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
681 buf[n] = (char) c; \
682 if ( c == '\n' ) \
683 buf[n++] = (char) c; \
684 if ( c == EOF && ferror( yyin ) ) \
685 YY_FATAL_ERROR( "input in flex scanner failed" ); \
686 result = n; \
687 } \
688 else \
689 { \
690 errno=0; \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200691 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000692 { \
693 if( errno != EINTR) \
694 { \
695 YY_FATAL_ERROR( "input in flex scanner failed" ); \
696 break; \
697 } \
698 errno=0; \
699 clearerr(yyin); \
700 } \
701 }\
702\
703
704#endif
705
706/* No semi-colon after return; correct usage is to write "yyterminate();" -
707 * we don't want an extra ';' after the "return" because that will cause
708 * some compilers to complain about unreachable statements.
709 */
710#ifndef yyterminate
711#define yyterminate() return YY_NULL
712#endif
713
714/* Number of entries by which start-condition stack grows. */
715#ifndef YY_START_STACK_INCR
716#define YY_START_STACK_INCR 25
717#endif
718
719/* Report a fatal error. */
720#ifndef YY_FATAL_ERROR
721#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
722#endif
723
724/* end tables serialization structures and prototypes */
725
726/* Default declaration of generated scanner - a define so the user can
727 * easily add parameters.
728 */
729#ifndef YY_DECL
730#define YY_DECL_IS_OURS 1
731
732extern int yylex (void);
733
734#define YY_DECL int yylex (void)
735#endif /* !YY_DECL */
736
737/* Code executed at the beginning of each rule, after yytext and yyleng
738 * have been set up.
739 */
740#ifndef YY_USER_ACTION
741#define YY_USER_ACTION
742#endif
743
744/* Code executed at the end of each rule. */
745#ifndef YY_BREAK
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700746#define YY_BREAK /*LINTED*/break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000747#endif
748
749#define YY_RULE_SETUP \
750 YY_USER_ACTION
751
752/** The main scanner function which does all the work.
753 */
754YY_DECL
755{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700756 yy_state_type yy_current_state;
757 char *yy_cp, *yy_bp;
758 int yy_act;
Patrick Georgi8d313682010-05-05 13:12:42 +0000759
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000760 if ( !(yy_init) )
761 {
762 (yy_init) = 1;
763
764#ifdef YY_USER_INIT
765 YY_USER_INIT;
766#endif
767
768 if ( ! (yy_start) )
769 (yy_start) = 1; /* first start state */
770
771 if ( ! yyin )
772 yyin = stdin;
773
774 if ( ! yyout )
775 yyout = stdout;
776
777 if ( ! YY_CURRENT_BUFFER ) {
778 yyensure_buffer_stack ();
779 YY_CURRENT_BUFFER_LVALUE =
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000780 yy_create_buffer( yyin, YY_BUF_SIZE );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000781 }
782
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000783 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000784 }
785
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700786 {
787
788 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000789 {
790 yy_cp = (yy_c_buf_p);
791
792 /* Support of yytext. */
793 *yy_cp = (yy_hold_char);
794
795 /* yy_bp points to the position in yy_ch_buf of the start of
796 * the current run.
797 */
798 yy_bp = yy_cp;
799
800 yy_current_state = (yy_start);
801yy_match:
802 do
803 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700804 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000805 if ( yy_accept[yy_current_state] )
806 {
807 (yy_last_accepting_state) = yy_current_state;
808 (yy_last_accepting_cpos) = yy_cp;
809 }
810 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
811 {
812 yy_current_state = (int) yy_def[yy_current_state];
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600813 if ( yy_current_state >= 173 )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000814 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000815 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000816 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000817 ++yy_cp;
818 }
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600819 while ( yy_base[yy_current_state] != 241 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000820
821yy_find_action:
822 yy_act = yy_accept[yy_current_state];
823 if ( yy_act == 0 )
824 { /* have to back up */
825 yy_cp = (yy_last_accepting_cpos);
826 yy_current_state = (yy_last_accepting_state);
827 yy_act = yy_accept[yy_current_state];
828 }
829
830 YY_DO_BEFORE_ACTION;
831
832do_action: /* This label is used only to access EOF actions. */
833
834 switch ( yy_act )
835 { /* beginning of action switch */
836 case 0: /* must back up */
837 /* undo the effects of YY_DO_BEFORE_ACTION */
838 *yy_cp = (yy_hold_char);
839 yy_cp = (yy_last_accepting_cpos);
840 yy_current_state = (yy_last_accepting_state);
841 goto yy_find_action;
842
843case 1:
844YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000845{}
846 YY_BREAK
847case 2:
848/* rule 2 can match eol */
849YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000850{linenum++;}
851 YY_BREAK
852case 3:
853/* rule 3 can match eol */
854YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000855{linenum++;}
856 YY_BREAK
857case 4:
858YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000859{return(CHIP);}
860 YY_BREAK
861case 5:
862YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000863{return(DEVICE);}
864 YY_BREAK
865case 6:
866YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000867{return(REGISTER);}
868 YY_BREAK
869case 7:
870YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000871{yylval.number=1; return(BOOL);}
872 YY_BREAK
873case 8:
874YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000875{yylval.number=0; return(BOOL);}
876 YY_BREAK
877case 9:
878YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000879{yylval.number=3; return(STATUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000880 YY_BREAK
881case 10:
882YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000883{yylval.number=5; return(STATUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000884 YY_BREAK
885case 11:
886YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000887{yylval.number=PCI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000888 YY_BREAK
889case 12:
890YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000891{yylval.number=IOAPIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000892 YY_BREAK
893case 13:
894YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000895{yylval.number=PNP; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000896 YY_BREAK
897case 14:
898YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000899{yylval.number=I2C; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000900 YY_BREAK
901case 15:
902YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000903{yylval.number=APIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000904 YY_BREAK
905case 16:
906YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000907{yylval.number=CPU_CLUSTER; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000908 YY_BREAK
909case 17:
910YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000911{yylval.number=CPU; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000912 YY_BREAK
913case 18:
914YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000915{yylval.number=DOMAIN; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000916 YY_BREAK
917case 19:
918YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000919{yylval.number=GENERIC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000920 YY_BREAK
921case 20:
922YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000923{yylval.number=MMIO; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000924 YY_BREAK
925case 21:
926YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000927{yylval.number=SPI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000928 YY_BREAK
929case 22:
930YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000931{yylval.number=USB; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000932 YY_BREAK
933case 23:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000934YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600935{yylval.number=LPC; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000936 YY_BREAK
937case 24:
938YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600939{yylval.number=ESPI; return(BUS);}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000940 YY_BREAK
941case 25:
Sven Schnelle750edfd2011-03-01 21:43:57 +0000942YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600943{yylval.number=IRQ; return(RESOURCE);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000944 YY_BREAK
945case 26:
946YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600947{yylval.number=DRQ; return(RESOURCE);}
Sven Schnelle750edfd2011-03-01 21:43:57 +0000948 YY_BREAK
949case 27:
Patrick Georgi2b108a42012-07-13 12:02:44 +0200950YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600951{yylval.number=IO; return(RESOURCE);}
Patrick Georgi2b108a42012-07-13 12:02:44 +0200952 YY_BREAK
953case 28:
Aaron Durbinffda804b2014-09-03 12:40:15 -0500954YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600955{return(IOAPIC_IRQ);}
Aaron Durbinffda804b2014-09-03 12:40:15 -0500956 YY_BREAK
957case 29:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700958YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600959{return(INHERIT);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700960 YY_BREAK
961case 30:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200962YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600963{return(SUBSYSTEMID);}
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200964 YY_BREAK
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700965case 31:
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700966YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600967{return(END);}
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700968 YY_BREAK
969case 32:
Furquan Shaikhe6700292017-02-11 00:50:38 -0800970YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600971{return(SLOT_DESC);}
Furquan Shaikhe6700292017-02-11 00:50:38 -0800972 YY_BREAK
973case 33:
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800974YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600975{return(EQUALS);}
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800976 YY_BREAK
977case 34:
Duncan Lauriebae9f852018-05-07 14:18:13 -0700978YY_RULE_SETUP
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000979{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Duncan Lauriebae9f852018-05-07 14:18:13 -0700980 YY_BREAK
981case 35:
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800982YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600983{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800984 YY_BREAK
985case 36:
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200986YY_RULE_SETUP
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600987{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200988 YY_BREAK
989case 37:
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600990YY_RULE_SETUP
991{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
992 YY_BREAK
993case 38:
994/* rule 38 can match eol */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000995YY_RULE_SETUP
996{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
997 YY_BREAK
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600998case 39:
999/* rule 39 can match eol */
1000YY_RULE_SETUP
1001{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
1002 YY_BREAK
1003case 40:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001004YY_RULE_SETUP
1005{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
1006 YY_BREAK
Raul E Rangel3f3f53c2020-05-06 11:47:04 -06001007case 41:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001008YY_RULE_SETUP
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001009ECHO;
1010 YY_BREAK
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001011case YY_STATE_EOF(INITIAL):
1012 yyterminate();
1013
1014 case YY_END_OF_BUFFER:
1015 {
1016 /* Amount of text matched not including the EOB char. */
1017 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1018
1019 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1020 *yy_cp = (yy_hold_char);
1021 YY_RESTORE_YY_MORE_OFFSET
1022
1023 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1024 {
1025 /* We're scanning a new file or input source. It's
1026 * possible that this happened because the user
1027 * just pointed yyin at a new source and called
1028 * yylex(). If so, then we have to assure
1029 * consistency between YY_CURRENT_BUFFER and our
1030 * globals. Here is the right place to do so, because
1031 * this is the first action (other than possibly a
1032 * back-up) that will match for the new input source.
1033 */
1034 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1035 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1036 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1037 }
1038
1039 /* Note that here we test for yy_c_buf_p "<=" to the position
1040 * of the first EOB in the buffer, since yy_c_buf_p will
1041 * already have been incremented past the NUL character
1042 * (since all states make transitions on EOB to the
1043 * end-of-buffer state). Contrast this with the test
1044 * in input().
1045 */
1046 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1047 { /* This was really a NUL. */
1048 yy_state_type yy_next_state;
1049
1050 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1051
1052 yy_current_state = yy_get_previous_state( );
1053
1054 /* Okay, we're now positioned to make the NUL
1055 * transition. We couldn't have
1056 * yy_get_previous_state() go ahead and do it
1057 * for us because it doesn't know how to deal
1058 * with the possibility of jamming (and we don't
1059 * want to build jamming into it because then it
1060 * will run more slowly).
1061 */
1062
1063 yy_next_state = yy_try_NUL_trans( yy_current_state );
1064
1065 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1066
1067 if ( yy_next_state )
1068 {
1069 /* Consume the NUL. */
1070 yy_cp = ++(yy_c_buf_p);
1071 yy_current_state = yy_next_state;
1072 goto yy_match;
1073 }
1074
1075 else
1076 {
1077 yy_cp = (yy_c_buf_p);
1078 goto yy_find_action;
1079 }
1080 }
1081
1082 else switch ( yy_get_next_buffer( ) )
1083 {
1084 case EOB_ACT_END_OF_FILE:
1085 {
1086 (yy_did_buffer_switch_on_eof) = 0;
1087
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001088 if ( yywrap( ) )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001089 {
1090 /* Note: because we've taken care in
1091 * yy_get_next_buffer() to have set up
1092 * yytext, we can now set up
1093 * yy_c_buf_p so that if some total
1094 * hoser (like flex itself) wants to
1095 * call the scanner after we return the
1096 * YY_NULL, it'll still work - another
1097 * YY_NULL will get returned.
1098 */
1099 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1100
1101 yy_act = YY_STATE_EOF(YY_START);
1102 goto do_action;
1103 }
1104
1105 else
1106 {
1107 if ( ! (yy_did_buffer_switch_on_eof) )
1108 YY_NEW_FILE;
1109 }
1110 break;
1111 }
1112
1113 case EOB_ACT_CONTINUE_SCAN:
1114 (yy_c_buf_p) =
1115 (yytext_ptr) + yy_amount_of_matched_text;
1116
1117 yy_current_state = yy_get_previous_state( );
1118
1119 yy_cp = (yy_c_buf_p);
1120 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1121 goto yy_match;
1122
1123 case EOB_ACT_LAST_MATCH:
1124 (yy_c_buf_p) =
1125 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1126
1127 yy_current_state = yy_get_previous_state( );
1128
1129 yy_cp = (yy_c_buf_p);
1130 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1131 goto yy_find_action;
1132 }
1133 break;
1134 }
1135
1136 default:
1137 YY_FATAL_ERROR(
1138 "fatal flex scanner internal error--no action found" );
1139 } /* end of action switch */
1140 } /* end of scanning one token */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001141 } /* end of user's declarations */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001142} /* end of yylex */
1143
1144/* yy_get_next_buffer - try to read in a new buffer
1145 *
1146 * Returns a code representing an action:
1147 * EOB_ACT_LAST_MATCH -
1148 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1149 * EOB_ACT_END_OF_FILE - end of file
1150 */
1151static int yy_get_next_buffer (void)
1152{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001153 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1154 char *source = (yytext_ptr);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001155 int number_to_move, i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001156 int ret_val;
1157
1158 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1159 YY_FATAL_ERROR(
1160 "fatal flex scanner internal error--end of buffer missed" );
1161
1162 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1163 { /* Don't try to fill the buffer, so this is an EOF. */
1164 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1165 {
1166 /* We matched a single character, the EOB, so
1167 * treat this as a final EOF.
1168 */
1169 return EOB_ACT_END_OF_FILE;
1170 }
1171
1172 else
1173 {
1174 /* We matched some text prior to the EOB, first
1175 * process it.
1176 */
1177 return EOB_ACT_LAST_MATCH;
1178 }
1179 }
1180
1181 /* Try to read more data. */
1182
1183 /* First move last chars to start of buffer. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001184 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001185
1186 for ( i = 0; i < number_to_move; ++i )
1187 *(dest++) = *(source++);
1188
1189 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1190 /* don't do the read, it's not guaranteed to return an EOF,
1191 * just force an EOF
1192 */
1193 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1194
1195 else
1196 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001197 int num_to_read =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001198 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1199
1200 while ( num_to_read <= 0 )
1201 { /* Not enough room in the buffer - grow it. */
1202
1203 /* just a shorter name for the current buffer */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001204 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001205
1206 int yy_c_buf_p_offset =
1207 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1208
1209 if ( b->yy_is_our_buffer )
1210 {
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001211 int new_size = b->yy_buf_size * 2;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001212
1213 if ( new_size <= 0 )
1214 b->yy_buf_size += b->yy_buf_size / 8;
1215 else
1216 b->yy_buf_size *= 2;
1217
1218 b->yy_ch_buf = (char *)
1219 /* Include room in for 2 EOB chars. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001220 yyrealloc( (void *) b->yy_ch_buf,
1221 (yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001222 }
1223 else
1224 /* Can't grow it, we don't own it. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001225 b->yy_ch_buf = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001226
1227 if ( ! b->yy_ch_buf )
1228 YY_FATAL_ERROR(
1229 "fatal error - scanner input buffer overflow" );
1230
1231 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1232
1233 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1234 number_to_move - 1;
1235
1236 }
1237
1238 if ( num_to_read > YY_READ_BUF_SIZE )
1239 num_to_read = YY_READ_BUF_SIZE;
1240
1241 /* Read in more data. */
1242 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001243 (yy_n_chars), num_to_read );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001244
1245 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1246 }
1247
1248 if ( (yy_n_chars) == 0 )
1249 {
1250 if ( number_to_move == YY_MORE_ADJ )
1251 {
1252 ret_val = EOB_ACT_END_OF_FILE;
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001253 yyrestart( yyin );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001254 }
1255
1256 else
1257 {
1258 ret_val = EOB_ACT_LAST_MATCH;
1259 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1260 YY_BUFFER_EOF_PENDING;
1261 }
1262 }
1263
1264 else
1265 ret_val = EOB_ACT_CONTINUE_SCAN;
1266
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001267 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001268 /* Extend the array by 50%, plus the number we really need. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001269 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001270 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1271 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001272 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1273 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001274 /* "- 2" to take care of EOB's */
1275 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001276 }
1277
1278 (yy_n_chars) += number_to_move;
1279 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1280 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1281
1282 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1283
1284 return ret_val;
1285}
1286
1287/* yy_get_previous_state - get the state just before the EOB char was reached */
1288
1289 static yy_state_type yy_get_previous_state (void)
1290{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001291 yy_state_type yy_current_state;
1292 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001293
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001294 yy_current_state = (yy_start);
1295
1296 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1297 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001298 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001299 if ( yy_accept[yy_current_state] )
1300 {
1301 (yy_last_accepting_state) = yy_current_state;
1302 (yy_last_accepting_cpos) = yy_cp;
1303 }
1304 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1305 {
1306 yy_current_state = (int) yy_def[yy_current_state];
Raul E Rangel3f3f53c2020-05-06 11:47:04 -06001307 if ( yy_current_state >= 173 )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001308 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001309 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001310 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001311 }
1312
1313 return yy_current_state;
1314}
1315
1316/* yy_try_NUL_trans - try to make a transition on the NUL character
1317 *
1318 * synopsis
1319 * next_state = yy_try_NUL_trans( current_state );
1320 */
1321 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1322{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001323 int yy_is_jam;
1324 char *yy_cp = (yy_c_buf_p);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001325
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001326 YY_CHAR yy_c = 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001327 if ( yy_accept[yy_current_state] )
1328 {
1329 (yy_last_accepting_state) = yy_current_state;
1330 (yy_last_accepting_cpos) = yy_cp;
1331 }
1332 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1333 {
1334 yy_current_state = (int) yy_def[yy_current_state];
Raul E Rangel3f3f53c2020-05-06 11:47:04 -06001335 if ( yy_current_state >= 173 )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001336 yy_c = yy_meta[yy_c];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001337 }
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001338 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
Raul E Rangel3f3f53c2020-05-06 11:47:04 -06001339 yy_is_jam = (yy_current_state == 172);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001340
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001341 return yy_is_jam ? 0 : yy_current_state;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001342}
1343
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001344#ifndef YY_NO_UNPUT
1345
1346 static void yyunput (int c, char * yy_bp )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001347{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001348 char *yy_cp;
Patrick Georgi8d313682010-05-05 13:12:42 +00001349
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001350 yy_cp = (yy_c_buf_p);
1351
1352 /* undo effects of setting up yytext */
1353 *yy_cp = (yy_hold_char);
1354
1355 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1356 { /* need to shift things up to make room */
1357 /* +2 for EOB chars. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001358 int number_to_move = (yy_n_chars) + 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001359 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001360 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001361 char *source =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001362 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1363
1364 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1365 *--dest = *--source;
1366
1367 yy_cp += (int) (dest - source);
1368 yy_bp += (int) (dest - source);
1369 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001370 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001371
1372 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1373 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1374 }
1375
1376 *--yy_cp = (char) c;
1377
1378 (yytext_ptr) = yy_bp;
1379 (yy_hold_char) = *yy_cp;
1380 (yy_c_buf_p) = yy_cp;
1381}
1382
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001383#endif
1384
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001385#ifndef YY_NO_INPUT
1386#ifdef __cplusplus
1387 static int yyinput (void)
1388#else
1389 static int input (void)
1390#endif
1391
1392{
1393 int c;
Patrick Georgi8d313682010-05-05 13:12:42 +00001394
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001395 *(yy_c_buf_p) = (yy_hold_char);
1396
1397 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1398 {
1399 /* yy_c_buf_p now points to the character we want to return.
1400 * If this occurs *before* the EOB characters, then it's a
1401 * valid NUL; if not, then we've hit the end of the buffer.
1402 */
1403 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1404 /* This was really a NUL. */
1405 *(yy_c_buf_p) = '\0';
1406
1407 else
1408 { /* need more input */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001409 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001410 ++(yy_c_buf_p);
1411
1412 switch ( yy_get_next_buffer( ) )
1413 {
1414 case EOB_ACT_LAST_MATCH:
1415 /* This happens because yy_g_n_b()
1416 * sees that we've accumulated a
1417 * token and flags that we need to
1418 * try matching the token before
1419 * proceeding. But for input(),
1420 * there's no matching to consider.
1421 * So convert the EOB_ACT_LAST_MATCH
1422 * to EOB_ACT_END_OF_FILE.
1423 */
1424
1425 /* Reset buffer status. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001426 yyrestart( yyin );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001427
1428 /*FALLTHROUGH*/
1429
1430 case EOB_ACT_END_OF_FILE:
1431 {
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001432 if ( yywrap( ) )
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001433 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001434
1435 if ( ! (yy_did_buffer_switch_on_eof) )
1436 YY_NEW_FILE;
1437#ifdef __cplusplus
1438 return yyinput();
1439#else
1440 return input();
1441#endif
1442 }
1443
1444 case EOB_ACT_CONTINUE_SCAN:
1445 (yy_c_buf_p) = (yytext_ptr) + offset;
1446 break;
1447 }
1448 }
1449 }
1450
1451 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1452 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1453 (yy_hold_char) = *++(yy_c_buf_p);
1454
1455 return c;
1456}
1457#endif /* ifndef YY_NO_INPUT */
1458
1459/** Immediately switch to a different input stream.
1460 * @param input_file A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001461 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001462 * @note This function does not reset the start condition to @c INITIAL .
1463 */
1464 void yyrestart (FILE * input_file )
1465{
Patrick Georgi8d313682010-05-05 13:12:42 +00001466
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001467 if ( ! YY_CURRENT_BUFFER ){
1468 yyensure_buffer_stack ();
1469 YY_CURRENT_BUFFER_LVALUE =
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001470 yy_create_buffer( yyin, YY_BUF_SIZE );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001471 }
1472
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001473 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1474 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001475}
1476
1477/** Switch to a different input buffer.
1478 * @param new_buffer The new input buffer.
Patrick Georgi8d313682010-05-05 13:12:42 +00001479 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001480 */
1481 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1482{
Patrick Georgi8d313682010-05-05 13:12:42 +00001483
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001484 /* TODO. We should be able to replace this entire function body
1485 * with
1486 * yypop_buffer_state();
1487 * yypush_buffer_state(new_buffer);
1488 */
1489 yyensure_buffer_stack ();
1490 if ( YY_CURRENT_BUFFER == new_buffer )
1491 return;
1492
1493 if ( YY_CURRENT_BUFFER )
1494 {
1495 /* Flush out information for old buffer. */
1496 *(yy_c_buf_p) = (yy_hold_char);
1497 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1498 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1499 }
1500
1501 YY_CURRENT_BUFFER_LVALUE = new_buffer;
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001502 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001503
1504 /* We don't actually know whether we did this switch during
1505 * EOF (yywrap()) processing, but the only time this flag
1506 * is looked at is after yywrap() is called, so it's safe
1507 * to go ahead and always set it.
1508 */
1509 (yy_did_buffer_switch_on_eof) = 1;
1510}
1511
1512static void yy_load_buffer_state (void)
1513{
1514 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1515 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1516 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1517 (yy_hold_char) = *(yy_c_buf_p);
1518}
1519
1520/** Allocate and initialize an input buffer state.
1521 * @param file A readable stream.
1522 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Patrick Georgi8d313682010-05-05 13:12:42 +00001523 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001524 * @return the allocated buffer state.
1525 */
1526 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1527{
1528 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001529
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001530 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001531 if ( ! b )
1532 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1533
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001534 b->yy_buf_size = size;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001535
1536 /* yy_ch_buf has to be 2 characters longer than the size given because
1537 * we need to put in 2 end-of-buffer characters.
1538 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001539 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001540 if ( ! b->yy_ch_buf )
1541 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1542
1543 b->yy_is_our_buffer = 1;
1544
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001545 yy_init_buffer( b, file );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001546
1547 return b;
1548}
1549
1550/** Destroy the buffer.
1551 * @param b a buffer created with yy_create_buffer()
Patrick Georgi8d313682010-05-05 13:12:42 +00001552 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001553 */
1554 void yy_delete_buffer (YY_BUFFER_STATE b )
1555{
Patrick Georgi8d313682010-05-05 13:12:42 +00001556
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001557 if ( ! b )
1558 return;
1559
1560 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1561 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1562
1563 if ( b->yy_is_our_buffer )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001564 yyfree( (void *) b->yy_ch_buf );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001565
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001566 yyfree( (void *) b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001567}
1568
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001569/* Initializes or reinitializes a buffer.
1570 * This function is sometimes called more than once on the same buffer,
1571 * such as during a yyrestart() or at EOF.
1572 */
1573 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1574
1575{
1576 int oerrno = errno;
Patrick Georgi8d313682010-05-05 13:12:42 +00001577
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001578 yy_flush_buffer( b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001579
1580 b->yy_input_file = file;
1581 b->yy_fill_buffer = 1;
1582
1583 /* If b is the current buffer, then yy_init_buffer was _probably_
1584 * called from yyrestart() or through yy_get_next_buffer.
1585 * In that case, we don't want to reset the lineno or column.
1586 */
1587 if (b != YY_CURRENT_BUFFER){
1588 b->yy_bs_lineno = 1;
1589 b->yy_bs_column = 0;
1590 }
1591
1592 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Patrick Georgi8d313682010-05-05 13:12:42 +00001593
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001594 errno = oerrno;
1595}
1596
1597/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1598 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Patrick Georgi8d313682010-05-05 13:12:42 +00001599 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001600 */
1601 void yy_flush_buffer (YY_BUFFER_STATE b )
1602{
1603 if ( ! b )
1604 return;
1605
1606 b->yy_n_chars = 0;
1607
1608 /* We always need two end-of-buffer characters. The first causes
1609 * a transition to the end-of-buffer state. The second causes
1610 * a jam in that state.
1611 */
1612 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1613 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1614
1615 b->yy_buf_pos = &b->yy_ch_buf[0];
1616
1617 b->yy_at_bol = 1;
1618 b->yy_buffer_status = YY_BUFFER_NEW;
1619
1620 if ( b == YY_CURRENT_BUFFER )
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001621 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001622}
1623
1624/** Pushes the new state onto the stack. The new state becomes
1625 * the current state. This function will allocate the stack
1626 * if necessary.
1627 * @param new_buffer The new state.
Patrick Georgi8d313682010-05-05 13:12:42 +00001628 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001629 */
1630void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1631{
1632 if (new_buffer == NULL)
1633 return;
1634
1635 yyensure_buffer_stack();
1636
1637 /* This block is copied from yy_switch_to_buffer. */
1638 if ( YY_CURRENT_BUFFER )
1639 {
1640 /* Flush out information for old buffer. */
1641 *(yy_c_buf_p) = (yy_hold_char);
1642 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1643 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1644 }
1645
1646 /* Only push if top exists. Otherwise, replace top. */
1647 if (YY_CURRENT_BUFFER)
1648 (yy_buffer_stack_top)++;
1649 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1650
1651 /* copied from yy_switch_to_buffer. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001652 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001653 (yy_did_buffer_switch_on_eof) = 1;
1654}
1655
1656/** Removes and deletes the top of the stack, if present.
1657 * The next element becomes the new top.
Patrick Georgi8d313682010-05-05 13:12:42 +00001658 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001659 */
1660void yypop_buffer_state (void)
1661{
1662 if (!YY_CURRENT_BUFFER)
1663 return;
1664
1665 yy_delete_buffer(YY_CURRENT_BUFFER );
1666 YY_CURRENT_BUFFER_LVALUE = NULL;
1667 if ((yy_buffer_stack_top) > 0)
1668 --(yy_buffer_stack_top);
1669
1670 if (YY_CURRENT_BUFFER) {
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001671 yy_load_buffer_state( );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001672 (yy_did_buffer_switch_on_eof) = 1;
1673 }
1674}
1675
1676/* Allocates the stack if it does not exist.
1677 * Guarantees space for at least one push.
1678 */
1679static void yyensure_buffer_stack (void)
1680{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001681 yy_size_t num_to_alloc;
Patrick Georgi8d313682010-05-05 13:12:42 +00001682
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001683 if (!(yy_buffer_stack)) {
1684
1685 /* First allocation is just for 2 elements, since we don't know if this
1686 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1687 * immediate realloc on the next call.
1688 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001689 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001690 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1691 (num_to_alloc * sizeof(struct yy_buffer_state*)
1692 );
1693 if ( ! (yy_buffer_stack) )
1694 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001695
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001696 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001697
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001698 (yy_buffer_stack_max) = num_to_alloc;
1699 (yy_buffer_stack_top) = 0;
1700 return;
1701 }
1702
1703 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1704
1705 /* Increase the buffer to prepare for a possible push. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001706 yy_size_t grow_size = 8 /* arbitrary grow size */;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001707
1708 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1709 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1710 ((yy_buffer_stack),
1711 num_to_alloc * sizeof(struct yy_buffer_state*)
1712 );
1713 if ( ! (yy_buffer_stack) )
1714 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1715
1716 /* zero only the new slots.*/
1717 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1718 (yy_buffer_stack_max) = num_to_alloc;
1719 }
1720}
1721
1722/** Setup the input buffer state to scan directly from a user-specified character buffer.
1723 * @param base the character buffer
1724 * @param size the size in bytes of the character buffer
Patrick Georgi8d313682010-05-05 13:12:42 +00001725 *
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001726 * @return the newly allocated buffer state object.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001727 */
1728YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1729{
1730 YY_BUFFER_STATE b;
Patrick Georgi8d313682010-05-05 13:12:42 +00001731
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001732 if ( size < 2 ||
1733 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1734 base[size-1] != YY_END_OF_BUFFER_CHAR )
1735 /* They forgot to leave room for the EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001736 return NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001737
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001738 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001739 if ( ! b )
1740 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1741
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001742 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001743 b->yy_buf_pos = b->yy_ch_buf = base;
1744 b->yy_is_our_buffer = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001745 b->yy_input_file = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001746 b->yy_n_chars = b->yy_buf_size;
1747 b->yy_is_interactive = 0;
1748 b->yy_at_bol = 1;
1749 b->yy_fill_buffer = 0;
1750 b->yy_buffer_status = YY_BUFFER_NEW;
1751
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001752 yy_switch_to_buffer( b );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001753
1754 return b;
1755}
1756
1757/** Setup the input buffer state to scan a string. The next call to yylex() will
1758 * scan from a @e copy of @a str.
1759 * @param yystr a NUL-terminated string to scan
Patrick Georgi8d313682010-05-05 13:12:42 +00001760 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001761 * @return the newly allocated buffer state object.
1762 * @note If you want to scan bytes that may contain NUL values, then use
1763 * yy_scan_bytes() instead.
1764 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001765YY_BUFFER_STATE yy_scan_string (const char * yystr )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001766{
Patrick Georgi8d313682010-05-05 13:12:42 +00001767
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001768 return yy_scan_bytes( yystr, (int) strlen(yystr) );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001769}
1770
1771/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1772 * scan from a @e copy of @a bytes.
Patrick Georgi8d313682010-05-05 13:12:42 +00001773 * @param yybytes the byte buffer to scan
1774 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1775 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001776 * @return the newly allocated buffer state object.
1777 */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001778YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001779{
1780 YY_BUFFER_STATE b;
1781 char *buf;
1782 yy_size_t n;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001783 int i;
Patrick Georgi8d313682010-05-05 13:12:42 +00001784
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001785 /* Get memory for full buffer, including space for trailing EOB's. */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001786 n = (yy_size_t) (_yybytes_len + 2);
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001787 buf = (char *) yyalloc( n );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001788 if ( ! buf )
1789 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1790
1791 for ( i = 0; i < _yybytes_len; ++i )
1792 buf[i] = yybytes[i];
1793
1794 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1795
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001796 b = yy_scan_buffer( buf, n );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001797 if ( ! b )
1798 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1799
1800 /* It's okay to grow etc. this buffer, and we should throw it
1801 * away when we're done.
1802 */
1803 b->yy_is_our_buffer = 1;
1804
1805 return b;
1806}
1807
1808#ifndef YY_EXIT_FAILURE
1809#define YY_EXIT_FAILURE 2
1810#endif
1811
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001812static void yynoreturn yy_fatal_error (const char* msg )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001813{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001814 fprintf( stderr, "%s\n", msg );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001815 exit( YY_EXIT_FAILURE );
1816}
1817
1818/* Redefine yyless() so it works in section 3 code. */
1819
1820#undef yyless
1821#define yyless(n) \
1822 do \
1823 { \
1824 /* Undo effects of setting up yytext. */ \
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001825 int yyless_macro_arg = (n); \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001826 YY_LESS_LINENO(yyless_macro_arg);\
1827 yytext[yyleng] = (yy_hold_char); \
1828 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1829 (yy_hold_char) = *(yy_c_buf_p); \
1830 *(yy_c_buf_p) = '\0'; \
1831 yyleng = yyless_macro_arg; \
1832 } \
1833 while ( 0 )
1834
1835/* Accessor methods (get/set functions) to struct members. */
1836
1837/** Get the current line number.
Patrick Georgi8d313682010-05-05 13:12:42 +00001838 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001839 */
1840int yyget_lineno (void)
1841{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001842
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001843 return yylineno;
1844}
1845
1846/** Get the input stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001847 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001848 */
1849FILE *yyget_in (void)
1850{
1851 return yyin;
1852}
1853
1854/** Get the output stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001855 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001856 */
1857FILE *yyget_out (void)
1858{
1859 return yyout;
1860}
1861
1862/** Get the length of the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001863 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001864 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001865int yyget_leng (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001866{
1867 return yyleng;
1868}
1869
1870/** Get the current token.
Patrick Georgi8d313682010-05-05 13:12:42 +00001871 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001872 */
1873
1874char *yyget_text (void)
1875{
1876 return yytext;
1877}
1878
1879/** Set the current line number.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001880 * @param _line_number line number
Patrick Georgi8d313682010-05-05 13:12:42 +00001881 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001882 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001883void yyset_lineno (int _line_number )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001884{
Patrick Georgi8d313682010-05-05 13:12:42 +00001885
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001886 yylineno = _line_number;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001887}
1888
1889/** Set the input stream. This does not discard the current
1890 * input buffer.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001891 * @param _in_str A readable stream.
Patrick Georgi8d313682010-05-05 13:12:42 +00001892 *
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001893 * @see yy_switch_to_buffer
1894 */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001895void yyset_in (FILE * _in_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001896{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001897 yyin = _in_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001898}
1899
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001900void yyset_out (FILE * _out_str )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001901{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001902 yyout = _out_str ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001903}
1904
1905int yyget_debug (void)
1906{
1907 return yy_flex_debug;
1908}
1909
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001910void yyset_debug (int _bdebug )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001911{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001912 yy_flex_debug = _bdebug ;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001913}
1914
1915static int yy_init_globals (void)
1916{
1917 /* Initialization is the same as for the non-reentrant scanner.
1918 * This function is called from yylex_destroy(), so don't allocate here.
1919 */
1920
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001921 (yy_buffer_stack) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001922 (yy_buffer_stack_top) = 0;
1923 (yy_buffer_stack_max) = 0;
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001924 (yy_c_buf_p) = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001925 (yy_init) = 0;
1926 (yy_start) = 0;
1927
1928/* Defined in main.c */
1929#ifdef YY_STDINIT
1930 yyin = stdin;
1931 yyout = stdout;
1932#else
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001933 yyin = NULL;
1934 yyout = NULL;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001935#endif
1936
1937 /* For future reference: Set errno on error, since we are called by
1938 * yylex_init()
1939 */
1940 return 0;
1941}
1942
1943/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1944int yylex_destroy (void)
1945{
Patrick Georgi8d313682010-05-05 13:12:42 +00001946
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001947 /* Pop the buffer stack, destroying each element. */
1948 while(YY_CURRENT_BUFFER){
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001949 yy_delete_buffer( YY_CURRENT_BUFFER );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001950 YY_CURRENT_BUFFER_LVALUE = NULL;
1951 yypop_buffer_state();
1952 }
1953
1954 /* Destroy the stack itself. */
1955 yyfree((yy_buffer_stack) );
1956 (yy_buffer_stack) = NULL;
1957
1958 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1959 * yylex() is called, initialization will occur. */
1960 yy_init_globals( );
1961
1962 return 0;
1963}
1964
1965/*
1966 * Internal utility routines.
1967 */
1968
1969#ifndef yytext_ptr
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001970static void yy_flex_strncpy (char* s1, const char * s2, int n )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001971{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001972
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001973 int i;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001974 for ( i = 0; i < n; ++i )
1975 s1[i] = s2[i];
1976}
1977#endif
1978
1979#ifdef YY_NEED_STRLEN
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001980static int yy_flex_strlen (const char * s )
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001981{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001982 int n;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001983 for ( n = 0; s[n]; ++n )
1984 ;
1985
1986 return n;
1987}
1988#endif
1989
1990void *yyalloc (yy_size_t size )
1991{
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08001992 return malloc(size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001993}
1994
1995void *yyrealloc (void * ptr, yy_size_t size )
1996{
Furquan Shaikhe6700292017-02-11 00:50:38 -08001997
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001998 /* The cast to (char *) in the following accommodates both
1999 * implementations that use char* generic pointers, and those
2000 * that use void* generic pointers. It works with the latter
2001 * because both ANSI C and C++ allow castless assignment from
2002 * any pointer type to void*, and deal with argument conversions
2003 * as though doing an assignment.
2004 */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -08002005 return realloc(ptr, size);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002006}
2007
2008void yyfree (void * ptr )
2009{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07002010 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002011}
2012
2013#define YYTABLES_NAME "yytables"
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07002014