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