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