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