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