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