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