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