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