| 1 | #line 17 "./glslang.l" |
| 2 | // |
| 3 | // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style license that can be |
| 5 | // found in the LICENSE file. |
| 6 | // |
| 7 | |
| 8 | // This file is auto-generated by generate_parser.sh. DO NOT EDIT! |
| 9 | |
| 10 | /* clang-format off */ |
| 11 | |
| 12 | // Ignore errors in auto-generated code. |
| 13 | #if defined(__GNUC__) |
| 14 | #pragma GCC diagnostic ignored "-Wswitch-enum" |
| 15 | #pragma GCC diagnostic ignored "-Wunused-function" |
| 16 | #pragma GCC diagnostic ignored "-Wunused-variable" |
| 17 | #elif defined(_MSC_VER) |
| 18 | #pragma warning(disable: 4005) |
| 19 | #pragma warning(disable: 4065) |
| 20 | #pragma warning(disable: 4189) |
| 21 | #pragma warning(disable: 4244) |
| 22 | #pragma warning(disable: 4505) |
| 23 | #pragma warning(disable: 4701) |
| 24 | #pragma warning(disable: 4702) |
| 25 | #endif |
| 26 | #if defined(__clang__) |
| 27 | #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" |
| 28 | #endif |
| 29 | |
| 30 | |
| 31 | |
| 32 | #define YY_INT_ALIGNED short int |
| 33 | |
| 34 | /* A lexical scanner generated by flex */ |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | #define FLEX_SCANNER |
| 46 | #define YY_FLEX_MAJOR_VERSION 2 |
| 47 | #define YY_FLEX_MINOR_VERSION 6 |
| 48 | #define YY_FLEX_SUBMINOR_VERSION 4 |
| 49 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
| 50 | #define FLEX_BETA |
| 51 | #endif |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | #ifdef yyget_lval |
| 71 | #define yyget_lval_ALREADY_DEFINED |
| 72 | #else |
| 73 | #define yyget_lval yyget_lval |
| 74 | #endif |
| 75 | |
| 76 | |
| 77 | #ifdef yyset_lval |
| 78 | #define yyset_lval_ALREADY_DEFINED |
| 79 | #else |
| 80 | #define yyset_lval yyset_lval |
| 81 | #endif |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | #ifdef yyget_lloc |
| 88 | #define yyget_lloc_ALREADY_DEFINED |
| 89 | #else |
| 90 | #define yyget_lloc yyget_lloc |
| 91 | #endif |
| 92 | |
| 93 | |
| 94 | #ifdef yyset_lloc |
| 95 | #define yyset_lloc_ALREADY_DEFINED |
| 96 | #else |
| 97 | #define yyset_lloc yyset_lloc |
| 98 | #endif |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | /* First, we deal with platform-specific or compiler-specific issues. */ |
| 111 | |
| 112 | /* begin standard C headers. */ |
| 113 | #include <errno.h> |
| 114 | #include <stdio.h> |
| 115 | #include <stdlib.h> |
| 116 | #include <string.h> |
| 117 | |
| 118 | /* end standard C headers. */ |
| 119 | |
| 120 | /* flex integer type definitions */ |
| 121 | |
| 122 | #ifndef FLEXINT_H |
| 123 | #define FLEXINT_H |
| 124 | |
| 125 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
| 126 | |
| 127 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 128 | |
| 129 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
| 130 | * if you want the limit (max/min) macros for int types. |
| 131 | */ |
| 132 | #ifndef __STDC_LIMIT_MACROS |
| 133 | #define __STDC_LIMIT_MACROS 1 |
| 134 | #endif |
| 135 | |
| 136 | #include <inttypes.h> |
| 137 | typedef int8_t flex_int8_t; |
| 138 | typedef uint8_t flex_uint8_t; |
| 139 | typedef int16_t flex_int16_t; |
| 140 | typedef uint16_t flex_uint16_t; |
| 141 | typedef int32_t flex_int32_t; |
| 142 | typedef uint32_t flex_uint32_t; |
| 143 | #else |
| 144 | typedef signed char flex_int8_t; |
| 145 | typedef short int flex_int16_t; |
| 146 | typedef int flex_int32_t; |
| 147 | typedef unsigned char flex_uint8_t; |
| 148 | typedef unsigned short int flex_uint16_t; |
| 149 | typedef unsigned int flex_uint32_t; |
| 150 | |
| 151 | /* Limits of integral types. */ |
| 152 | #ifndef INT8_MIN |
| 153 | #define INT8_MIN (-128) |
| 154 | #endif |
| 155 | #ifndef INT16_MIN |
| 156 | #define INT16_MIN (-32767-1) |
| 157 | #endif |
| 158 | #ifndef INT32_MIN |
| 159 | #define INT32_MIN (-2147483647-1) |
| 160 | #endif |
| 161 | #ifndef INT8_MAX |
| 162 | #define INT8_MAX (127) |
| 163 | #endif |
| 164 | #ifndef INT16_MAX |
| 165 | #define INT16_MAX (32767) |
| 166 | #endif |
| 167 | #ifndef INT32_MAX |
| 168 | #define INT32_MAX (2147483647) |
| 169 | #endif |
| 170 | #ifndef UINT8_MAX |
| 171 | #define UINT8_MAX (255U) |
| 172 | #endif |
| 173 | #ifndef UINT16_MAX |
| 174 | #define UINT16_MAX (65535U) |
| 175 | #endif |
| 176 | #ifndef UINT32_MAX |
| 177 | #define UINT32_MAX (4294967295U) |
| 178 | #endif |
| 179 | |
| 180 | #ifndef SIZE_MAX |
| 181 | #define SIZE_MAX (~(size_t)0) |
| 182 | #endif |
| 183 | |
| 184 | #endif /* ! C99 */ |
| 185 | |
| 186 | #endif /* ! FLEXINT_H */ |
| 187 | |
| 188 | |
| 189 | /* begin standard C++ headers. */ |
| 190 | |
| 191 | /* TODO: this is always defined, so inline it */ |
| 192 | #define yyconst const |
| 193 | |
| 194 | #if defined(__GNUC__) && __GNUC__ >= 3 |
| 195 | #define yynoreturn __attribute__((__noreturn__)) |
| 196 | #else |
| 197 | #define yynoreturn |
| 198 | #endif |
| 199 | |
| 200 | /* Returned upon end-of-file. */ |
| 201 | #define YY_NULL 0 |
| 202 | |
| 203 | |
| 204 | /* Promotes a possibly negative, possibly signed char to an |
| 205 | * integer in range [0..255] for use as an array index. |
| 206 | */ |
| 207 | #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | /* An opaque pointer. */ |
| 214 | #ifndef YY_TYPEDEF_YY_SCANNER_T |
| 215 | #define YY_TYPEDEF_YY_SCANNER_T |
| 216 | typedef void* yyscan_t; |
| 217 | #endif |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | /* For convenience, these vars (plus the bison vars far below) |
| 236 | are macros in the reentrant scanner. */ |
| 237 | #define yyin yyg->yyin_r |
| 238 | #define yyout yyg->yyout_r |
| 239 | #define yyg->yyextra_r |
| 240 | #define yyleng yyg->yyleng_r |
| 241 | #define yytext yyg->yytext_r |
| 242 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
| 243 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
| 244 | #define yy_flex_debug yyg->yy_flex_debug_r |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | /* Enter a start condition. This macro really ought to take a parameter, |
| 259 | * but we do it the disgusting crufty way forced on us by the ()-less |
| 260 | * definition of BEGIN. |
| 261 | */ |
| 262 | #define BEGIN yyg->yy_start = 1 + 2 * |
| 263 | /* Translate the current start state into a value that can be later handed |
| 264 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
| 265 | * compatibility. |
| 266 | */ |
| 267 | #define YY_START ((yyg->yy_start - 1) / 2) |
| 268 | #define YYSTATE YY_START |
| 269 | /* Action number for EOF rule of a given start state. */ |
| 270 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| 271 | /* Special action meaning "start processing a new file". */ |
| 272 | #define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
| 273 | #define YY_END_OF_BUFFER_CHAR 0 |
| 274 | |
| 275 | |
| 276 | /* Size of default input buffer. */ |
| 277 | #ifndef YY_BUF_SIZE |
| 278 | #ifdef __ia64__ |
| 279 | /* On IA-64, the buffer size is 16k, not 8k. |
| 280 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
| 281 | * Ditto for the __ia64__ case accordingly. |
| 282 | */ |
| 283 | #define YY_BUF_SIZE 32768 |
| 284 | #else |
| 285 | #define YY_BUF_SIZE 16384 |
| 286 | #endif /* __ia64__ */ |
| 287 | #endif |
| 288 | |
| 289 | |
| 290 | /* The state buf must be large enough to hold one state per character in the main buffer. |
| 291 | */ |
| 292 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
| 293 | |
| 294 | |
| 295 | |
| 296 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
| 297 | #define YY_TYPEDEF_YY_BUFFER_STATE |
| 298 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
| 299 | #endif |
| 300 | |
| 301 | #ifndef YY_TYPEDEF_YY_SIZE_T |
| 302 | #define YY_TYPEDEF_YY_SIZE_T |
| 303 | typedef size_t yy_size_t; |
| 304 | #endif |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | #define EOB_ACT_CONTINUE_SCAN 0 |
| 310 | #define EOB_ACT_END_OF_FILE 1 |
| 311 | #define EOB_ACT_LAST_MATCH 2 |
| 312 | |
| 313 | /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
| 314 | * access to the local variable yy_act. Since yyless() is a macro, it would break |
| 315 | * existing scanners that call yyless() from OUTSIDE yylex. |
| 316 | * One obvious solution it to make yy_act a global. I tried that, and saw |
| 317 | * a 5% performance hit in a non-yylineno scanner, because yy_act is |
| 318 | * normally declared as a register variable-- so it is not worth it. |
| 319 | */ |
| 320 | #define YY_LESS_LINENO(n) \ |
| 321 | do { \ |
| 322 | int yyl;\ |
| 323 | for ( yyl = n; yyl < yyleng; ++yyl )\ |
| 324 | if ( yytext[yyl] == '\n' )\ |
| 325 | --yylineno;\ |
| 326 | }while(0) |
| 327 | #define YY_LINENO_REWIND_TO(dst) \ |
| 328 | do {\ |
| 329 | const char *p;\ |
| 330 | for ( p = yy_cp-1; p >= (dst); --p)\ |
| 331 | if ( *p == '\n' )\ |
| 332 | --yylineno;\ |
| 333 | }while(0) |
| 334 | |
| 335 | /* Return all but the first "n" matched characters back to the input stream. */ |
| 336 | #define yyless(n) \ |
| 337 | do \ |
| 338 | { \ |
| 339 | /* Undo effects of setting up yytext. */ \ |
| 340 | int yyless_macro_arg = (n); \ |
| 341 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 342 | *yy_cp = yyg->yy_hold_char; \ |
| 343 | YY_RESTORE_YY_MORE_OFFSET \ |
| 344 | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
| 345 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
| 346 | } \ |
| 347 | while ( 0 ) |
| 348 | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
| 349 | |
| 350 | |
| 351 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
| 352 | #define YY_STRUCT_YY_BUFFER_STATE |
| 353 | struct yy_buffer_state |
| 354 | { |
| 355 | FILE *yy_input_file; |
| 356 | |
| 357 | |
| 358 | |
| 359 | char *yy_ch_buf; /* input buffer */ |
| 360 | char *yy_buf_pos; /* current position in input buffer */ |
| 361 | |
| 362 | /* Size of input buffer in bytes, not including room for EOB |
| 363 | * characters. |
| 364 | */ |
| 365 | int yy_buf_size; |
| 366 | |
| 367 | /* Number of characters read into yy_ch_buf, not including EOB |
| 368 | * characters. |
| 369 | */ |
| 370 | int yy_n_chars; |
| 371 | |
| 372 | /* Whether we "own" the buffer - i.e., we know we created it, |
| 373 | * and can realloc() it to grow it, and should free() it to |
| 374 | * delete it. |
| 375 | */ |
| 376 | int yy_is_our_buffer; |
| 377 | |
| 378 | /* Whether this is an "interactive" input source; if so, and |
| 379 | * if we're using stdio for input, then we want to use getc() |
| 380 | * instead of fread(), to make sure we stop fetching input after |
| 381 | * each newline. |
| 382 | */ |
| 383 | int yy_is_interactive; |
| 384 | |
| 385 | /* Whether we're considered to be at the beginning of a line. |
| 386 | * If so, '^' rules will be active on the next match, otherwise |
| 387 | * not. |
| 388 | */ |
| 389 | int yy_at_bol; |
| 390 | |
| 391 | int yy_bs_lineno; /**< The line count. */ |
| 392 | int yy_bs_column; /**< The column count. */ |
| 393 | |
| 394 | |
| 395 | /* Whether to try to fill the input buffer when we reach the |
| 396 | * end of it. |
| 397 | */ |
| 398 | int yy_fill_buffer; |
| 399 | |
| 400 | int yy_buffer_status; |
| 401 | |
| 402 | #define YY_BUFFER_NEW 0 |
| 403 | #define YY_BUFFER_NORMAL 1 |
| 404 | /* When an EOF's been seen but there's still some text to process |
| 405 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
| 406 | * shouldn't try reading from the input source any more. We might |
| 407 | * still have a bunch of tokens to match, though, because of |
| 408 | * possible backing-up. |
| 409 | * |
| 410 | * When we actually see the EOF, we change the status to "new" |
| 411 | * (via yyrestart()), so that the user can continue scanning by |
| 412 | * just pointing yyin at a new input file. |
| 413 | */ |
| 414 | #define YY_BUFFER_EOF_PENDING 2 |
| 415 | |
| 416 | }; |
| 417 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | /* We provide macros for accessing buffer states in case in the |
| 423 | * future we want to put the buffer states in a more general |
| 424 | * "scanner state". |
| 425 | * |
| 426 | * Returns the top of the stack, or NULL. |
| 427 | */ |
| 428 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
| 429 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
| 430 | : NULL) |
| 431 | /* Same as previous macro, but useful when we know that the buffer stack is not |
| 432 | * NULL or when we need an lvalue. For internal use only. |
| 433 | */ |
| 434 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
| 441 | void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
| 442 | YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
| 443 | void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
| 444 | void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
| 445 | void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
| 446 | void yypop_buffer_state ( yyscan_t yyscanner ); |
| 447 | |
| 448 | |
| 449 | static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
| 450 | static void yy_load_buffer_state ( yyscan_t yyscanner ); |
| 451 | static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
| 452 | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
| 453 | |
| 454 | |
| 455 | YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
| 456 | YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
| 457 | YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
| 458 | |
| 459 | |
| 460 | void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
| 461 | void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
| 462 | void yyfree ( void * , yyscan_t yyscanner ); |
| 463 | |
| 464 | |
| 465 | #define yy_new_buffer yy_create_buffer |
| 466 | #define yy_set_interactive(is_interactive) \ |
| 467 | { \ |
| 468 | if ( ! YY_CURRENT_BUFFER ){ \ |
| 469 | yyensure_buffer_stack (yyscanner); \ |
| 470 | YY_CURRENT_BUFFER_LVALUE = \ |
| 471 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
| 472 | } \ |
| 473 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
| 474 | } |
| 475 | #define yy_set_bol(at_bol) \ |
| 476 | { \ |
| 477 | if ( ! YY_CURRENT_BUFFER ){\ |
| 478 | yyensure_buffer_stack (yyscanner); \ |
| 479 | YY_CURRENT_BUFFER_LVALUE = \ |
| 480 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
| 481 | } \ |
| 482 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
| 483 | } |
| 484 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
| 485 | |
| 486 | |
| 487 | /* Begin user sect3 */ |
| 488 | |
| 489 | #define yywrap(yyscanner) (/*CONSTCOND*/1) |
| 490 | #define YY_SKIP_YYWRAP |
| 491 | typedef flex_uint8_t YY_CHAR; |
| 492 | |
| 493 | |
| 494 | typedef int yy_state_type; |
| 495 | |
| 496 | #define yytext_ptr yytext_r |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
| 504 | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
| 505 | static int yy_get_next_buffer ( yyscan_t yyscanner ); |
| 506 | static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | /* Done after the current pattern has been matched and before the |
| 512 | * corresponding action - sets up yytext. |
| 513 | */ |
| 514 | #define YY_DO_BEFORE_ACTION \ |
| 515 | yyg->yytext_ptr = yy_bp; \ |
| 516 | yyleng = (int) (yy_cp - yy_bp); \ |
| 517 | yyg->yy_hold_char = *yy_cp; \ |
| 518 | *yy_cp = '\0'; \ |
| 519 | yyg->yy_c_buf_p = yy_cp; |
| 520 | #define YY_NUM_RULES 247 |
| 521 | #define YY_END_OF_BUFFER 248 |
| 522 | /* This struct is not used in this scanner, |
| 523 | but its presence is necessary. */ |
| 524 | struct yy_trans_info |
| 525 | { |
| 526 | flex_int32_t yy_verify; |
| 527 | flex_int32_t yy_nxt; |
| 528 | }; |
| 529 | static const flex_int16_t yy_accept[891] = |
| 530 | { 0, |
| 531 | 0, 0, 0, 0, 248, 246, 245, 245, 229, 235, |
| 532 | 240, 224, 225, 233, 232, 221, 230, 228, 234, 187, |
| 533 | 187, 222, 218, 236, 223, 237, 241, 184, 226, 227, |
| 534 | 239, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 535 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 536 | 184, 184, 184, 219, 238, 220, 231, 244, 243, 247, |
| 537 | 242, 215, 201, 220, 209, 204, 199, 207, 197, 208, |
| 538 | 198, 193, 200, 192, 186, 187, 0, 190, 0, 227, |
| 539 | 219, 226, 216, 212, 214, 213, 217, 184, 205, 211, |
| 540 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 541 | |
| 542 | 184, 184, 184, 184, 13, 184, 184, 184, 184, 184, |
| 543 | 184, 184, 184, 184, 184, 184, 184, 184, 16, 184, |
| 544 | 184, 24, 184, 184, 184, 184, 184, 184, 184, 184, |
| 545 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 546 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 547 | 184, 184, 184, 184, 184, 184, 184, 206, 210, 242, |
| 548 | 0, 196, 192, 0, 195, 189, 0, 191, 185, 202, |
| 549 | 203, 184, 184, 144, 184, 184, 184, 184, 184, 184, |
| 550 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 551 | 184, 184, 184, 184, 184, 184, 184, 184, 14, 184, |
| 552 | |
| 553 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 29, |
| 554 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 555 | 184, 184, 25, 184, 184, 184, 184, 184, 184, 184, |
| 556 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 557 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 558 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 0, |
| 559 | 193, 0, 192, 194, 188, 184, 184, 184, 184, 32, |
| 560 | 184, 184, 184, 19, 181, 184, 184, 184, 184, 184, |
| 561 | 184, 184, 184, 184, 184, 17, 147, 184, 184, 184, |
| 562 | 184, 22, 184, 184, 151, 162, 184, 184, 184, 184, |
| 563 | |
| 564 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 159, |
| 565 | 4, 37, 38, 39, 184, 184, 184, 184, 184, 184, |
| 566 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 567 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 150, |
| 568 | 33, 184, 184, 30, 184, 184, 184, 184, 184, 184, |
| 569 | 184, 49, 50, 51, 31, 184, 184, 184, 184, 184, |
| 570 | 184, 184, 184, 11, 184, 55, 56, 57, 184, 145, |
| 571 | 184, 184, 7, 184, 184, 184, 184, 171, 172, 173, |
| 572 | 184, 34, 184, 163, 28, 174, 175, 176, 2, 168, |
| 573 | 169, 170, 184, 184, 184, 26, 166, 184, 184, 184, |
| 574 | |
| 575 | 184, 184, 52, 53, 54, 184, 184, 184, 184, 184, |
| 576 | 184, 184, 184, 184, 184, 184, 112, 184, 184, 184, |
| 577 | 184, 184, 184, 184, 184, 160, 184, 184, 184, 184, |
| 578 | 184, 184, 184, 184, 184, 184, 184, 146, 184, 184, |
| 579 | 183, 58, 59, 60, 184, 184, 15, 184, 184, 184, |
| 580 | 117, 184, 184, 9, 184, 184, 115, 184, 184, 184, |
| 581 | 161, 156, 118, 184, 184, 184, 184, 184, 184, 152, |
| 582 | 184, 184, 184, 184, 184, 87, 40, 43, 45, 44, |
| 583 | 41, 47, 46, 48, 42, 184, 184, 184, 184, 167, |
| 584 | 143, 184, 184, 154, 184, 184, 184, 36, 113, 27, |
| 585 | |
| 586 | 180, 23, 155, 86, 184, 165, 18, 184, 184, 184, |
| 587 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 588 | 184, 184, 184, 20, 35, 184, 184, 184, 184, 184, |
| 589 | 184, 119, 92, 98, 184, 184, 184, 184, 184, 89, |
| 590 | 91, 3, 184, 184, 184, 184, 184, 184, 184, 184, |
| 591 | 184, 184, 184, 148, 184, 184, 184, 184, 184, 8, |
| 592 | 184, 184, 10, 184, 184, 184, 184, 184, 184, 21, |
| 593 | 106, 12, 157, 120, 93, 100, 184, 184, 184, 184, |
| 594 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 153, |
| 595 | 184, 184, 184, 104, 110, 107, 184, 184, 184, 184, |
| 596 | |
| 597 | 184, 184, 184, 149, 121, 94, 99, 184, 184, 164, |
| 598 | 184, 108, 184, 184, 184, 184, 6, 184, 184, 184, |
| 599 | 184, 184, 184, 184, 184, 184, 103, 158, 1, 184, |
| 600 | 184, 184, 184, 184, 184, 182, 184, 116, 5, 177, |
| 601 | 61, 64, 184, 184, 184, 184, 184, 184, 184, 184, |
| 602 | 184, 184, 184, 184, 184, 105, 184, 184, 184, 184, |
| 603 | 184, 184, 101, 184, 184, 184, 184, 184, 134, 69, |
| 604 | 70, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 605 | 184, 184, 184, 184, 184, 114, 184, 184, 184, 102, |
| 606 | 136, 74, 75, 184, 184, 184, 184, 109, 184, 184, |
| 607 | |
| 608 | 184, 184, 184, 184, 184, 129, 184, 184, 184, 184, |
| 609 | 184, 184, 184, 184, 184, 184, 184, 68, 184, 184, |
| 610 | 184, 184, 62, 184, 184, 184, 184, 184, 184, 184, |
| 611 | 184, 184, 184, 184, 184, 184, 184, 130, 122, 184, |
| 612 | 95, 184, 184, 184, 73, 184, 184, 71, 184, 184, |
| 613 | 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, |
| 614 | 184, 184, 131, 184, 184, 78, 184, 184, 76, 184, |
| 615 | 184, 123, 96, 184, 125, 184, 126, 184, 184, 184, |
| 616 | 184, 184, 184, 111, 184, 184, 184, 184, 66, 184, |
| 617 | 65, 140, 184, 184, 124, 97, 184, 184, 184, 184, |
| 618 | |
| 619 | 184, 184, 184, 184, 184, 184, 184, 184, 138, 141, |
| 620 | 184, 132, 184, 67, 184, 184, 184, 184, 184, 184, |
| 621 | 184, 184, 139, 142, 184, 184, 184, 184, 135, 72, |
| 622 | 184, 184, 184, 178, 184, 184, 184, 79, 184, 184, |
| 623 | 137, 77, 184, 184, 184, 184, 184, 184, 184, 184, |
| 624 | 184, 83, 184, 184, 184, 184, 184, 184, 184, 184, |
| 625 | 84, 184, 184, 184, 184, 80, 184, 85, 88, 184, |
| 626 | 127, 128, 90, 184, 184, 184, 63, 184, 184, 184, |
| 627 | 179, 184, 133, 81, 184, 184, 184, 184, 82, 0 |
| 628 | } ; |
| 629 | |
| 630 | static const YY_CHAR yy_ec[256] = |
| 631 | { 0, |
| 632 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
| 633 | 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, |
| 634 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 635 | 1, 2, 4, 1, 1, 1, 5, 6, 1, 7, |
| 636 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
| 637 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
| 638 | 28, 29, 30, 1, 31, 32, 33, 34, 35, 36, |
| 639 | 37, 37, 37, 37, 37, 37, 38, 37, 39, 37, |
| 640 | 37, 40, 41, 42, 43, 37, 37, 44, 45, 37, |
| 641 | 46, 1, 47, 48, 49, 1, 50, 51, 52, 53, |
| 642 | |
| 643 | 54, 55, 56, 57, 58, 37, 59, 60, 61, 62, |
| 644 | 63, 64, 37, 65, 66, 67, 68, 69, 70, 71, |
| 645 | 72, 73, 74, 75, 76, 77, 1, 1, 1, 1, |
| 646 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 647 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 648 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 649 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 650 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 651 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 652 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 653 | |
| 654 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 655 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 656 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 657 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 658 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 659 | 1, 1, 1, 1, 1 |
| 660 | } ; |
| 661 | |
| 662 | static const YY_CHAR yy_meta[78] = |
| 663 | { 0, |
| 664 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, |
| 665 | 1, 2, 3, 1, 4, 4, 4, 4, 4, 4, |
| 666 | 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, |
| 667 | 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, |
| 668 | 8, 8, 9, 8, 8, 1, 1, 1, 8, 5, |
| 669 | 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, |
| 670 | 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, |
| 671 | 8, 8, 8, 1, 1, 1, 1 |
| 672 | } ; |
| 673 | |
| 674 | static const flex_int16_t yy_base[900] = |
| 675 | { 0, |
| 676 | 0, 0, 77, 0, 1094, 1095, 1095, 1095, 1065, 127, |
| 677 | 151, 1095, 1095, 1064, 148, 1095, 147, 145, 1063, 167, |
| 678 | 158, 1061, 1095, 167, 1061, 145, 1095, 0, 1095, 1095, |
| 679 | 149, 1039, 147, 135, 155, 162, 146, 174, 1024, 172, |
| 680 | 178, 179, 169, 196, 1018, 198, 1031, 200, 197, 213, |
| 681 | 202, 113, 1016, 1095, 153, 1095, 1095, 1095, 1095, 1095, |
| 682 | 0, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, |
| 683 | 1095, 237, 1095, 241, 237, 271, 243, 1095, 0, 1095, |
| 684 | 1095, 1095, 1055, 1095, 1095, 1095, 1054, 0, 1095, 1095, |
| 685 | 1015, 1013, 1018, 197, 1015, 1023, 1021, 1021, 1008, 1011, |
| 686 | |
| 687 | 1022, 226, 1016, 1004, 1001, 1014, 1001, 998, 998, 1004, |
| 688 | 136, 235, 998, 1008, 994, 1000, 1003, 1004, 0, 996, |
| 689 | 1006, 230, 1005, 986, 999, 980, 216, 984, 997, 988, |
| 690 | 243, 981, 237, 993, 995, 250, 984, 259, 971, 980, |
| 691 | 253, 259, 984, 980, 982, 971, 974, 250, 255, 269, |
| 692 | 983, 971, 983, 266, 976, 975, 963, 1095, 1095, 0, |
| 693 | 318, 1095, 296, 323, 1095, 1095, 325, 324, 206, 1095, |
| 694 | 1095, 981, 972, 0, 968, 963, 967, 976, 970, 972, |
| 695 | 298, 956, 956, 967, 959, 271, 969, 966, 966, 964, |
| 696 | 961, 953, 959, 946, 944, 956, 942, 958, 0, 955, |
| 697 | |
| 698 | 943, 950, 947, 951, 952, 945, 942, 931, 930, 943, |
| 699 | 946, 934, 945, 941, 929, 935, 926, 336, 931, 934, |
| 700 | 925, 932, 921, 925, 916, 930, 929, 920, 926, 294, |
| 701 | 910, 913, 911, 910, 920, 910, 905, 903, 905, 915, |
| 702 | 901, 903, 900, 911, 910, 913, 895, 301, 903, 899, |
| 703 | 897, 906, 885, 349, 903, 905, 894, 886, 919, 354, |
| 704 | 370, 368, 383, 1095, 1095, 890, 881, 891, 890, 0, |
| 705 | 888, 892, 379, 0, 0, 880, 878, 878, 879, 874, |
| 706 | 882, 871, 888, 877, 382, 0, 0, 871, 881, 880, |
| 707 | 880, 0, 865, 385, 0, 0, 867, 390, 874, 875, |
| 708 | |
| 709 | 866, 860, 859, 860, 859, 859, 337, 393, 854, 0, |
| 710 | 0, 850, 849, 848, 850, 851, 856, 850, 846, 859, |
| 711 | 854, 854, 852, 851, 845, 839, 841, 840, 844, 849, |
| 712 | 835, 838, 833, 841, 846, 834, 831, 843, 834, 0, |
| 713 | 0, 840, 836, 0, 828, 828, 833, 824, 831, 396, |
| 714 | 828, 0, 0, 0, 0, 818, 830, 829, 816, 817, |
| 715 | 826, 827, 827, 0, 812, 0, 0, 0, 813, 0, |
| 716 | 821, 812, 0, 811, 812, 806, 816, 0, 0, 0, |
| 717 | 807, 0, 803, 0, 0, 0, 0, 0, 0, 0, |
| 718 | 0, 0, 813, 400, 812, 0, 0, 810, 806, 803, |
| 719 | |
| 720 | 847, 846, 0, 0, 0, 793, 403, 409, 412, 798, |
| 721 | 794, 799, 790, 788, 801, 786, 0, 786, 799, 788, |
| 722 | 784, 790, 785, 792, 792, 0, 789, 786, 790, 774, |
| 723 | 772, 775, 781, 787, 782, 781, 769, 0, 771, 772, |
| 724 | 0, 0, 0, 0, 769, 772, 0, 766, 776, 767, |
| 725 | 0, 777, 757, 0, 766, 761, 0, 754, 754, 767, |
| 726 | 0, 769, 0, 418, 784, 783, 782, 747, 746, 0, |
| 727 | 763, 762, 757, 794, 785, 0, 0, 0, 0, 0, |
| 728 | 0, 0, 0, 0, 0, 744, 757, 744, 741, 0, |
| 729 | 0, 746, 745, 0, 742, 749, 748, 0, 734, 0, |
| 730 | |
| 731 | 0, 0, 0, 0, 731, 0, 0, 730, 741, 423, |
| 732 | 734, 740, 739, 736, 731, 728, 748, 734, 719, 719, |
| 733 | 732, 717, 729, 0, 0, 722, 747, 746, 745, 710, |
| 734 | 709, 406, 411, 0, 721, 724, 722, 711, 707, 722, |
| 735 | 0, 0, 718, 715, 714, 704, 703, 693, 710, 696, |
| 736 | 427, 704, 707, 0, 726, 725, 724, 689, 688, 0, |
| 737 | 702, 689, 0, 699, 692, 684, 685, 691, 694, 0, |
| 738 | 0, 0, 0, 716, 715, 0, 690, 693, 678, 685, |
| 739 | 676, 683, 684, 684, 683, 669, 447, 680, 680, 0, |
| 740 | 681, 670, 669, 0, 0, 0, 696, 695, 694, 659, |
| 741 | |
| 742 | 658, 654, 662, 0, 692, 691, 0, 666, 669, 0, |
| 743 | 450, 0, 647, 668, 682, 654, 0, 650, 649, 658, |
| 744 | 658, 646, 660, 644, 658, 653, 0, 0, 0, 672, |
| 745 | 671, 670, 635, 634, 633, 0, 633, 0, 0, 417, |
| 746 | 446, 659, 643, 646, 629, 641, 629, 628, 637, 637, |
| 747 | 656, 655, 654, 619, 618, 0, 623, 613, 616, 617, |
| 748 | 616, 626, 0, 629, 625, 627, 623, 610, 643, 438, |
| 749 | 0, 618, 621, 611, 612, 604, 611, 602, 625, 611, |
| 750 | 607, 609, 607, 607, 606, 0, 594, 593, 603, 0, |
| 751 | 625, 450, 0, 600, 603, 600, 585, 0, 601, 600, |
| 752 | |
| 753 | 584, 576, 584, 574, 582, 0, 579, 578, 601, 587, |
| 754 | 585, 585, 578, 568, 571, 585, 569, 602, 580, 581, |
| 755 | 578, 575, 587, 562, 576, 575, 559, 558, 557, 580, |
| 756 | 566, 564, 564, 567, 562, 543, 542, 0, 572, 542, |
| 757 | 570, 540, 544, 543, 576, 554, 551, 0, 555, 548, |
| 758 | 549, 539, 538, 519, 502, 515, 499, 162, 258, 258, |
| 759 | 257, 290, 0, 298, 316, 363, 353, 369, 0, 359, |
| 760 | 381, 0, 0, 392, 0, 396, 0, 404, 407, 396, |
| 761 | 403, 406, 407, 0, 401, 411, 403, 420, 448, 428, |
| 762 | 0, 0, 442, 443, 0, 0, 444, 445, 431, 430, |
| 763 | |
| 764 | 433, 446, 438, 451, 452, 431, 432, 440, 0, 0, |
| 765 | 456, 466, 438, 468, 460, 454, 442, 460, 454, 443, |
| 766 | 444, 452, 0, 0, 483, 469, 467, 468, 0, 0, |
| 767 | 472, 461, 467, 0, 468, 454, 477, 0, 465, 490, |
| 768 | 0, 0, 480, 487, 472, 470, 471, 463, 480, 487, |
| 769 | 488, 0, 486, 470, 506, 470, 501, 527, 475, 476, |
| 770 | 0, 493, 495, 496, 487, 0, 510, 0, 0, 518, |
| 771 | 0, 0, 0, 490, 491, 485, 0, 511, 487, 488, |
| 772 | 0, 542, 0, 0, 515, 526, 518, 521, 0, 1095, |
| 773 | 561, 567, 573, 579, 583, 589, 590, 596, 599 |
| 774 | |
| 775 | } ; |
| 776 | |
| 777 | static const flex_int16_t yy_def[900] = |
| 778 | { 0, |
| 779 | 890, 1, 890, 3, 890, 890, 890, 890, 890, 890, |
| 780 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 781 | 891, 890, 890, 890, 890, 890, 890, 892, 890, 890, |
| 782 | 890, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 783 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 784 | 892, 892, 892, 890, 890, 890, 890, 890, 890, 890, |
| 785 | 893, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 786 | 890, 894, 890, 895, 20, 891, 896, 890, 897, 890, |
| 787 | 890, 890, 890, 890, 890, 890, 890, 892, 890, 890, |
| 788 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 789 | |
| 790 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 791 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 792 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 793 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 794 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 795 | 892, 892, 892, 892, 892, 892, 892, 890, 890, 893, |
| 796 | 898, 890, 895, 899, 890, 890, 890, 896, 897, 890, |
| 797 | 890, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 798 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 799 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 800 | |
| 801 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 802 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 803 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 804 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 805 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 806 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 890, |
| 807 | 898, 890, 899, 890, 890, 892, 892, 892, 892, 892, |
| 808 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 809 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 810 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 811 | |
| 812 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 813 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 814 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 815 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 816 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 817 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 818 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 819 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 820 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 821 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 822 | |
| 823 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 824 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 825 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 826 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 827 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 828 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 829 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 830 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 831 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 832 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 833 | |
| 834 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 835 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 836 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 837 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 838 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 839 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 840 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 841 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 842 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 843 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 844 | |
| 845 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 846 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 847 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 848 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 849 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 850 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 851 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 852 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 853 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 854 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 855 | |
| 856 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 857 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 858 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 859 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 860 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 861 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 862 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 863 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 864 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 865 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 866 | |
| 867 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 868 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 869 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 870 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 871 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 872 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 873 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 874 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, |
| 875 | 892, 892, 892, 892, 892, 892, 892, 892, 892, 0, |
| 876 | 890, 890, 890, 890, 890, 890, 890, 890, 890 |
| 877 | |
| 878 | } ; |
| 879 | |
| 880 | static const flex_int16_t yy_nxt[1173] = |
| 881 | { 0, |
| 882 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 883 | 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, |
| 884 | 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, |
| 885 | 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, |
| 886 | 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, |
| 887 | 34, 35, 36, 37, 38, 39, 40, 41, 28, 42, |
| 888 | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 889 | 28, 53, 28, 54, 55, 56, 57, 58, 59, 60, |
| 890 | 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, |
| 891 | 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, |
| 892 | |
| 893 | 58, 58, 58, 58, 58, 58, 58, 61, 61, 61, |
| 894 | 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, |
| 895 | 61, 61, 58, 58, 58, 61, 61, 61, 61, 61, |
| 896 | 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, |
| 897 | 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, |
| 898 | 58, 58, 58, 58, 63, 64, 65, 68, 70, 72, |
| 899 | 72, 72, 72, 72, 72, 72, 72, 72, 72, 155, |
| 900 | 74, 81, 86, 87, 71, 69, 89, 156, 66, 74, |
| 901 | 158, 75, 75, 75, 75, 75, 75, 75, 75, 76, |
| 902 | 76, 82, 77, 83, 84, 195, 90, 95, 92, 96, |
| 903 | |
| 904 | 78, 77, 97, 98, 99, 107, 196, 108, 100, 78, |
| 905 | 79, 77, 93, 94, 101, 103, 109, 102, 128, 104, |
| 906 | 77, 116, 129, 110, 105, 78, 792, 159, 126, 117, |
| 907 | 106, 111, 119, 112, 78, 120, 113, 79, 121, 122, |
| 908 | 118, 127, 114, 123, 124, 130, 125, 133, 265, 137, |
| 909 | 144, 152, 167, 145, 167, 153, 138, 139, 131, 175, |
| 910 | 140, 146, 134, 176, 154, 135, 141, 142, 147, 143, |
| 911 | 148, 161, 162, 265, 149, 164, 165, 216, 150, 166, |
| 912 | 890, 151, 184, 74, 197, 217, 185, 186, 224, 207, |
| 913 | 161, 162, 208, 209, 164, 165, 210, 198, 211, 229, |
| 914 | |
| 915 | 221, 225, 237, 226, 166, 77, 222, 890, 233, 239, |
| 916 | 246, 247, 248, 78, 793, 230, 231, 238, 250, 794, |
| 917 | 249, 234, 240, 255, 77, 256, 251, 260, 795, 260, |
| 918 | 164, 165, 262, 890, 262, 890, 280, 281, 78, 168, |
| 919 | 168, 168, 168, 168, 168, 168, 168, 168, 168, 164, |
| 920 | 165, 274, 312, 313, 314, 345, 326, 401, 402, 264, |
| 921 | 327, 796, 797, 346, 275, 352, 353, 354, 261, 261, |
| 922 | 261, 261, 261, 261, 261, 261, 261, 261, 264, 890, |
| 923 | 798, 890, 263, 263, 263, 263, 263, 263, 263, 263, |
| 924 | 263, 263, 890, 799, 890, 366, 367, 368, 378, 379, |
| 925 | |
| 926 | 380, 386, 387, 388, 800, 162, 390, 391, 392, 403, |
| 927 | 404, 405, 442, 443, 444, 465, 466, 467, 165, 477, |
| 928 | 478, 479, 801, 802, 162, 480, 481, 482, 483, 484, |
| 929 | 485, 468, 469, 527, 528, 529, 579, 165, 555, 556, |
| 930 | 557, 581, 597, 598, 599, 803, 580, 676, 804, 530, |
| 931 | 531, 582, 805, 806, 558, 559, 807, 677, 600, 601, |
| 932 | 808, 602, 630, 631, 632, 651, 652, 653, 708, 809, |
| 933 | 810, 811, 812, 813, 814, 709, 678, 710, 633, 634, |
| 934 | 729, 654, 655, 679, 815, 680, 681, 730, 816, 731, |
| 935 | 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, |
| 936 | |
| 937 | 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, |
| 938 | 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, |
| 939 | 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, |
| 940 | 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, |
| 941 | 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, |
| 942 | 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, |
| 943 | 887, 888, 889, 76, 76, 791, 76, 790, 789, 76, |
| 944 | 88, 88, 88, 88, 88, 88, 160, 160, 160, 160, |
| 945 | 160, 160, 72, 788, 72, 72, 163, 787, 163, 163, |
| 946 | 168, 786, 168, 169, 169, 169, 169, 261, 785, 261, |
| 947 | |
| 948 | 263, 784, 263, 783, 782, 781, 780, 779, 778, 777, |
| 949 | 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, |
| 950 | 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, |
| 951 | 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, |
| 952 | 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, |
| 953 | 736, 735, 734, 733, 732, 728, 727, 726, 725, 724, |
| 954 | 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, |
| 955 | 713, 712, 711, 707, 706, 705, 704, 703, 702, 701, |
| 956 | 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, |
| 957 | 690, 689, 688, 687, 686, 685, 684, 683, 682, 675, |
| 958 | |
| 959 | 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, |
| 960 | 664, 663, 662, 661, 660, 659, 658, 657, 656, 650, |
| 961 | 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, |
| 962 | 639, 638, 637, 636, 635, 629, 628, 627, 626, 625, |
| 963 | 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, |
| 964 | 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, |
| 965 | 604, 603, 596, 595, 594, 593, 592, 591, 590, 589, |
| 966 | 588, 587, 586, 585, 584, 583, 578, 577, 576, 575, |
| 967 | 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, |
| 968 | 564, 563, 562, 561, 560, 554, 553, 552, 551, 550, |
| 969 | |
| 970 | 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, |
| 971 | 539, 538, 537, 536, 535, 534, 533, 532, 526, 525, |
| 972 | 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, |
| 973 | 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, |
| 974 | 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, |
| 975 | 494, 493, 492, 491, 490, 489, 488, 487, 486, 476, |
| 976 | 475, 474, 473, 472, 471, 470, 464, 463, 462, 461, |
| 977 | 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, |
| 978 | 450, 449, 448, 447, 446, 445, 441, 440, 439, 438, |
| 979 | 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, |
| 980 | |
| 981 | 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, |
| 982 | 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, |
| 983 | 407, 406, 400, 399, 398, 397, 396, 395, 394, 393, |
| 984 | 389, 385, 384, 383, 382, 381, 377, 376, 375, 374, |
| 985 | 373, 372, 371, 370, 369, 365, 364, 363, 362, 361, |
| 986 | 360, 359, 358, 357, 356, 355, 351, 350, 349, 348, |
| 987 | 347, 344, 343, 342, 341, 340, 339, 338, 337, 336, |
| 988 | 335, 334, 333, 332, 331, 330, 329, 328, 325, 324, |
| 989 | 323, 322, 321, 320, 319, 318, 317, 316, 315, 311, |
| 990 | 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, |
| 991 | |
| 992 | 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, |
| 993 | 290, 289, 288, 287, 286, 285, 284, 283, 282, 279, |
| 994 | 278, 277, 276, 273, 272, 271, 270, 269, 268, 267, |
| 995 | 266, 259, 258, 257, 254, 253, 252, 245, 244, 243, |
| 996 | 242, 241, 236, 235, 232, 228, 227, 223, 220, 219, |
| 997 | 218, 215, 214, 213, 212, 206, 205, 204, 203, 202, |
| 998 | 201, 200, 199, 194, 193, 192, 191, 190, 189, 188, |
| 999 | 187, 183, 182, 181, 180, 179, 178, 177, 174, 173, |
| 1000 | 172, 171, 170, 157, 136, 132, 115, 91, 85, 80, |
| 1001 | 73, 67, 62, 890, 5, 890, 890, 890, 890, 890, |
| 1002 | |
| 1003 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1004 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1005 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1006 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1007 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1008 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1009 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1010 | 890, 890 |
| 1011 | } ; |
| 1012 | |
| 1013 | static const flex_int16_t yy_chk[1173] = |
| 1014 | { 0, |
| 1015 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1016 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1017 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1018 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1019 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1020 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1021 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1022 | 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, |
| 1023 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1024 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1025 | |
| 1026 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1027 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1028 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1029 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1030 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 1031 | 3, 3, 3, 3, 10, 10, 11, 15, 17, 18, |
| 1032 | 18, 18, 18, 18, 18, 18, 18, 18, 18, 52, |
| 1033 | 21, 24, 26, 26, 17, 15, 31, 52, 11, 20, |
| 1034 | 55, 20, 20, 20, 20, 20, 20, 20, 20, 20, |
| 1035 | 20, 24, 21, 24, 24, 111, 31, 34, 33, 34, |
| 1036 | |
| 1037 | 21, 20, 34, 34, 35, 37, 111, 37, 35, 20, |
| 1038 | 20, 21, 33, 33, 35, 36, 37, 35, 43, 36, |
| 1039 | 20, 40, 43, 38, 36, 21, 758, 55, 42, 40, |
| 1040 | 36, 38, 41, 38, 20, 41, 38, 20, 41, 41, |
| 1041 | 40, 42, 38, 41, 41, 44, 41, 46, 169, 48, |
| 1042 | 49, 51, 77, 49, 77, 51, 48, 48, 44, 94, |
| 1043 | 48, 49, 46, 94, 51, 46, 48, 48, 49, 48, |
| 1044 | 50, 72, 72, 169, 50, 74, 74, 127, 50, 75, |
| 1045 | 75, 50, 102, 76, 112, 127, 102, 102, 133, 122, |
| 1046 | 72, 72, 122, 122, 74, 74, 122, 112, 122, 136, |
| 1047 | |
| 1048 | 131, 133, 141, 133, 75, 76, 131, 75, 138, 142, |
| 1049 | 148, 148, 149, 76, 759, 136, 136, 141, 150, 760, |
| 1050 | 149, 138, 142, 154, 76, 154, 150, 161, 761, 161, |
| 1051 | 163, 163, 164, 168, 164, 168, 186, 186, 76, 167, |
| 1052 | 167, 167, 167, 167, 167, 167, 167, 167, 167, 163, |
| 1053 | 163, 181, 218, 218, 218, 248, 230, 307, 307, 168, |
| 1054 | 230, 762, 764, 248, 181, 254, 254, 254, 260, 260, |
| 1055 | 260, 260, 260, 260, 260, 260, 260, 260, 168, 261, |
| 1056 | 765, 261, 262, 262, 262, 262, 262, 262, 262, 262, |
| 1057 | 262, 262, 263, 766, 263, 273, 273, 273, 285, 285, |
| 1058 | |
| 1059 | 285, 294, 294, 294, 767, 261, 298, 298, 298, 308, |
| 1060 | 308, 308, 350, 350, 350, 394, 394, 394, 263, 407, |
| 1061 | 407, 407, 768, 770, 261, 408, 408, 408, 409, 409, |
| 1062 | 409, 394, 394, 464, 464, 464, 532, 263, 510, 510, |
| 1063 | 510, 533, 551, 551, 551, 771, 532, 640, 774, 464, |
| 1064 | 464, 533, 776, 778, 510, 510, 779, 640, 551, 551, |
| 1065 | 780, 551, 587, 587, 587, 611, 611, 611, 670, 781, |
| 1066 | 782, 783, 785, 786, 787, 670, 641, 670, 587, 587, |
| 1067 | 692, 611, 611, 641, 788, 641, 641, 692, 789, 692, |
| 1068 | 790, 793, 794, 797, 798, 799, 800, 801, 802, 803, |
| 1069 | |
| 1070 | 804, 805, 806, 807, 808, 811, 812, 813, 814, 815, |
| 1071 | 816, 817, 818, 819, 820, 821, 822, 825, 826, 827, |
| 1072 | 828, 831, 832, 833, 835, 836, 837, 839, 840, 843, |
| 1073 | 844, 845, 846, 847, 848, 849, 850, 851, 853, 854, |
| 1074 | 855, 856, 857, 858, 859, 860, 862, 863, 864, 865, |
| 1075 | 867, 870, 874, 875, 876, 878, 879, 880, 882, 885, |
| 1076 | 886, 887, 888, 891, 891, 757, 891, 756, 755, 891, |
| 1077 | 892, 892, 892, 892, 892, 892, 893, 893, 893, 893, |
| 1078 | 893, 893, 894, 754, 894, 894, 895, 753, 895, 895, |
| 1079 | 896, 752, 896, 897, 897, 897, 897, 898, 751, 898, |
| 1080 | |
| 1081 | 899, 750, 899, 749, 747, 746, 745, 744, 743, 742, |
| 1082 | 741, 740, 739, 737, 736, 735, 734, 733, 732, 731, |
| 1083 | 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, |
| 1084 | 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, |
| 1085 | 710, 709, 708, 707, 705, 704, 703, 702, 701, 700, |
| 1086 | 699, 697, 696, 695, 694, 691, 689, 688, 687, 685, |
| 1087 | 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, |
| 1088 | 674, 673, 672, 669, 668, 667, 666, 665, 664, 662, |
| 1089 | 661, 660, 659, 658, 657, 655, 654, 653, 652, 651, |
| 1090 | 650, 649, 648, 647, 646, 645, 644, 643, 642, 637, |
| 1091 | |
| 1092 | 635, 634, 633, 632, 631, 630, 626, 625, 624, 623, |
| 1093 | 622, 621, 620, 619, 618, 616, 615, 614, 613, 609, |
| 1094 | 608, 606, 605, 603, 602, 601, 600, 599, 598, 597, |
| 1095 | 593, 592, 591, 589, 588, 586, 585, 584, 583, 582, |
| 1096 | 581, 580, 579, 578, 577, 575, 574, 569, 568, 567, |
| 1097 | 566, 565, 564, 562, 561, 559, 558, 557, 556, 555, |
| 1098 | 553, 552, 550, 549, 548, 547, 546, 545, 544, 543, |
| 1099 | 540, 539, 538, 537, 536, 535, 531, 530, 529, 528, |
| 1100 | 527, 526, 523, 522, 521, 520, 519, 518, 517, 516, |
| 1101 | 515, 514, 513, 512, 511, 509, 508, 505, 499, 497, |
| 1102 | |
| 1103 | 496, 495, 493, 492, 489, 488, 487, 486, 475, 474, |
| 1104 | 473, 472, 471, 469, 468, 467, 466, 465, 462, 460, |
| 1105 | 459, 458, 456, 455, 453, 452, 450, 449, 448, 446, |
| 1106 | 445, 440, 439, 437, 436, 435, 434, 433, 432, 431, |
| 1107 | 430, 429, 428, 427, 425, 424, 423, 422, 421, 420, |
| 1108 | 419, 418, 416, 415, 414, 413, 412, 411, 410, 406, |
| 1109 | 402, 401, 400, 399, 398, 395, 393, 383, 381, 377, |
| 1110 | 376, 375, 374, 372, 371, 369, 365, 363, 362, 361, |
| 1111 | 360, 359, 358, 357, 356, 351, 349, 348, 347, 346, |
| 1112 | 345, 343, 342, 339, 338, 337, 336, 335, 334, 333, |
| 1113 | |
| 1114 | 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, |
| 1115 | 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, |
| 1116 | 312, 309, 306, 305, 304, 303, 302, 301, 300, 299, |
| 1117 | 297, 293, 291, 290, 289, 288, 284, 283, 282, 281, |
| 1118 | 280, 279, 278, 277, 276, 272, 271, 269, 268, 267, |
| 1119 | 266, 259, 258, 257, 256, 255, 253, 252, 251, 250, |
| 1120 | 249, 247, 246, 245, 244, 243, 242, 241, 240, 239, |
| 1121 | 238, 237, 236, 235, 234, 233, 232, 231, 229, 228, |
| 1122 | 227, 226, 225, 224, 223, 222, 221, 220, 219, 217, |
| 1123 | 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, |
| 1124 | |
| 1125 | 206, 205, 204, 203, 202, 201, 200, 198, 197, 196, |
| 1126 | 195, 194, 193, 192, 191, 190, 189, 188, 187, 185, |
| 1127 | 184, 183, 182, 180, 179, 178, 177, 176, 175, 173, |
| 1128 | 172, 157, 156, 155, 153, 152, 151, 147, 146, 145, |
| 1129 | 144, 143, 140, 139, 137, 135, 134, 132, 130, 129, |
| 1130 | 128, 126, 125, 124, 123, 121, 120, 118, 117, 116, |
| 1131 | 115, 114, 113, 110, 109, 108, 107, 106, 105, 104, |
| 1132 | 103, 101, 100, 99, 98, 97, 96, 95, 93, 92, |
| 1133 | 91, 87, 83, 53, 47, 45, 39, 32, 25, 22, |
| 1134 | 19, 14, 9, 5, 890, 890, 890, 890, 890, 890, |
| 1135 | |
| 1136 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1137 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1138 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1139 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1140 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1141 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1142 | 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, |
| 1143 | 890, 890 |
| 1144 | } ; |
| 1145 | |
| 1146 | |
| 1147 | /* Table of booleans, true if rule could match eol. */ |
| 1148 | static const flex_int32_t yy_rule_can_match_eol[248] = |
| 1149 | { 0, |
| 1150 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1151 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1152 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1153 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1154 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1155 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1156 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1157 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1158 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1159 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1160 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1161 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1162 | 0, 0, 0, 0, 0, 1, 0, 0, }; |
| 1163 | |
| 1164 | /* The intent behind this definition is that it'll catch |
| 1165 | * any uses of REJECT which flex missed. |
| 1166 | */ |
| 1167 | #define REJECT reject_used_but_not_detected |
| 1168 | #define yymore() yymore_used_but_not_detected |
| 1169 | #define YY_MORE_ADJ 0 |
| 1170 | #define YY_RESTORE_YY_MORE_OFFSET |
| 1171 | /* |
| 1172 | // |
| 1173 | // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. |
| 1174 | // Use of this source code is governed by a BSD-style license that can be |
| 1175 | // found in the LICENSE file. |
| 1176 | // |
| 1177 | |
| 1178 | This file contains the Lex specification for GLSL ES. |
| 1179 | Based on ANSI C grammar, Lex specification: |
| 1180 | http://www.lysator.liu.se/c/ANSI-C-grammar-l.html |
| 1181 | |
| 1182 | IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh, |
| 1183 | WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). |
| 1184 | */ |
| 1185 | |
| 1186 | #include "compiler/preprocessor/Token.h" |
| 1187 | #include "compiler/translator/ParseContext.h" |
| 1188 | #include "compiler/translator/glslang.h" |
| 1189 | #include "compiler/translator/length_limits.h" |
| 1190 | #include "compiler/translator/util.h" |
| 1191 | |
| 1192 | using namespace sh; |
| 1193 | |
| 1194 | #include "glslang_tab.h" |
| 1195 | |
| 1196 | /* windows only pragma */ |
| 1197 | #ifdef _MSC_VER |
| 1198 | #pragma warning(disable : 4102) |
| 1199 | #endif |
| 1200 | |
| 1201 | // Workaround for flex using the register keyword, deprecated in C++11. |
| 1202 | #ifdef __cplusplus |
| 1203 | #if __cplusplus > 199711L |
| 1204 | #define register |
| 1205 | #endif |
| 1206 | #endif |
| 1207 | |
| 1208 | #define YY_NO_INPUT |
| 1209 | #define YY_USER_ACTION \ |
| 1210 | yylloc->first_file = yylloc->last_file = yycolumn; \ |
| 1211 | yylloc->first_line = yylloc->last_line = yylineno; |
| 1212 | |
| 1213 | #define YY_INPUT(buf, result, max_size) \ |
| 1214 | result = string_input(buf, max_size, yyscanner); |
| 1215 | |
| 1216 | static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner); |
| 1217 | static int check_type(yyscan_t yyscanner); |
| 1218 | static int reserved_word(yyscan_t yyscanner); |
| 1219 | static int ES2_reserved_ES3_keyword(TParseContext *context, int token); |
| 1220 | static int ES2_keyword_ES3_reserved(TParseContext *context, int token); |
| 1221 | static int ES2_ident_ES3_keyword(TParseContext *context, int token); |
| 1222 | static int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token); |
| 1223 | static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); |
| 1224 | static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); |
| 1225 | static int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token); |
| 1226 | static int ES3_extension_keyword_else_ident(TParseContext *context, TExtension extension, int token); |
| 1227 | static int ES2_ident_ES3_reserved_ES3_1_extension_keyword(TParseContext *context, TExtension extension, int token); |
| 1228 | static int ES3_extension_and_ES3_1_keyword_ES3_reserved_else_ident(TParseContext *context, TExtension extension, int token); |
| 1229 | static int uint_constant(TParseContext *context); |
| 1230 | static int int_constant(TParseContext *context); |
| 1231 | static int float_constant(yyscan_t yyscanner); |
| 1232 | static int floatsuffix_check(TParseContext* context); |
| 1233 | static int yuvcscstandardext_constant(TParseContext *context); |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | #define INITIAL 0 |
| 1239 | #define FIELDS 1 |
| 1240 | |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | #define TParseContext* |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | /* Holds the entire state of the reentrant scanner. */ |
| 1252 | struct yyguts_t |
| 1253 | { |
| 1254 | |
| 1255 | /* User-defined. Not touched by flex. */ |
| 1256 | YY_EXTRA_TYPE ; |
| 1257 | |
| 1258 | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
| 1259 | FILE *yyin_r, *yyout_r; |
| 1260 | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
| 1261 | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
| 1262 | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
| 1263 | char yy_hold_char; |
| 1264 | int yy_n_chars; |
| 1265 | int yyleng_r; |
| 1266 | char *yy_c_buf_p; |
| 1267 | int yy_init; |
| 1268 | int yy_start; |
| 1269 | int yy_did_buffer_switch_on_eof; |
| 1270 | int yy_start_stack_ptr; |
| 1271 | int yy_start_stack_depth; |
| 1272 | int *yy_start_stack; |
| 1273 | yy_state_type yy_last_accepting_state; |
| 1274 | char* yy_last_accepting_cpos; |
| 1275 | |
| 1276 | int yylineno_r; |
| 1277 | int yy_flex_debug_r; |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | char *yytext_r; |
| 1283 | int yy_more_flag; |
| 1284 | int yy_more_len; |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | YYSTYPE * yylval_r; |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | YYLTYPE * yylloc_r; |
| 1293 | |
| 1294 | |
| 1295 | }; /* end struct yyguts_t */ |
| 1296 | |
| 1297 | |
| 1298 | |
| 1299 | |
| 1300 | static int yy_init_globals ( yyscan_t yyscanner ); |
| 1301 | |
| 1302 | |
| 1303 | |
| 1304 | |
| 1305 | |
| 1306 | /* This must go here because YYSTYPE and YYLTYPE are included |
| 1307 | * from bison output in section 1.*/ |
| 1308 | # define yylval yyg->yylval_r |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | # define yylloc yyg->yylloc_r |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | int yylex_init (yyscan_t* scanner); |
| 1317 | |
| 1318 | int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | /* Accessor methods to globals. |
| 1323 | These are made visible to non-reentrant scanners for convenience. */ |
| 1324 | |
| 1325 | |
| 1326 | int yylex_destroy ( yyscan_t yyscanner ); |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | int yyget_debug ( yyscan_t yyscanner ); |
| 1331 | |
| 1332 | |
| 1333 | |
| 1334 | void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
| 1335 | |
| 1336 | |
| 1337 | |
| 1338 | YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | FILE *yyget_in ( yyscan_t yyscanner ); |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | FILE *yyget_out ( yyscan_t yyscanner ); |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | int yyget_leng ( yyscan_t yyscanner ); |
| 1363 | |
| 1364 | |
| 1365 | |
| 1366 | char *yyget_text ( yyscan_t yyscanner ); |
| 1367 | |
| 1368 | |
| 1369 | |
| 1370 | int yyget_lineno ( yyscan_t yyscanner ); |
| 1371 | |
| 1372 | |
| 1373 | |
| 1374 | void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | int yyget_column ( yyscan_t yyscanner ); |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | void yyset_column ( int _column_no , yyscan_t yyscanner ); |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | |
| 1390 | YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
| 1391 | |
| 1392 | |
| 1393 | void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); |
| 1398 | |
| 1399 | |
| 1400 | |
| 1401 | void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); |
| 1402 | |
| 1403 | |
| 1404 | |
| 1405 | /* Macros after this point can all be overridden by user definitions in |
| 1406 | * section 1. |
| 1407 | */ |
| 1408 | |
| 1409 | #ifndef YY_SKIP_YYWRAP |
| 1410 | #ifdef __cplusplus |
| 1411 | extern "C" int yywrap ( yyscan_t yyscanner ); |
| 1412 | #else |
| 1413 | extern int yywrap ( yyscan_t yyscanner ); |
| 1414 | #endif |
| 1415 | #endif |
| 1416 | |
| 1417 | #ifndef YY_NO_UNPUT |
| 1418 | |
| 1419 | #endif |
| 1420 | |
| 1421 | |
| 1422 | #ifndef yytext_ptr |
| 1423 | static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
| 1424 | #endif |
| 1425 | |
| 1426 | #ifdef YY_NEED_STRLEN |
| 1427 | static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
| 1428 | #endif |
| 1429 | |
| 1430 | #ifndef YY_NO_INPUT |
| 1431 | #ifdef __cplusplus |
| 1432 | static int yyinput ( yyscan_t yyscanner ); |
| 1433 | #else |
| 1434 | static int input ( yyscan_t yyscanner ); |
| 1435 | #endif |
| 1436 | |
| 1437 | #endif |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | /* Amount of stuff to slurp up with each read. */ |
| 1447 | #ifndef YY_READ_BUF_SIZE |
| 1448 | #ifdef __ia64__ |
| 1449 | /* On IA-64, the buffer size is 16k, not 8k */ |
| 1450 | #define YY_READ_BUF_SIZE 16384 |
| 1451 | #else |
| 1452 | #define YY_READ_BUF_SIZE 8192 |
| 1453 | #endif /* __ia64__ */ |
| 1454 | #endif |
| 1455 | |
| 1456 | |
| 1457 | /* Copy whatever the last rule matched to the standard output. */ |
| 1458 | #ifndef ECHO |
| 1459 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 1460 | * we now use fwrite(). |
| 1461 | */ |
| 1462 | #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
| 1463 | #endif |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
| 1468 | * is returned in "result". |
| 1469 | */ |
| 1470 | #ifndef YY_INPUT |
| 1471 | #define YY_INPUT(buf,result,max_size) \ |
| 1472 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
| 1473 | { \ |
| 1474 | int c = '*'; \ |
| 1475 | int n; \ |
| 1476 | for ( n = 0; n < max_size && \ |
| 1477 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
| 1478 | buf[n] = (char) c; \ |
| 1479 | if ( c == '\n' ) \ |
| 1480 | buf[n++] = (char) c; \ |
| 1481 | if ( c == EOF && ferror( yyin ) ) \ |
| 1482 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1483 | result = n; \ |
| 1484 | } \ |
| 1485 | else \ |
| 1486 | { \ |
| 1487 | errno=0; \ |
| 1488 | while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
| 1489 | { \ |
| 1490 | if( errno != EINTR) \ |
| 1491 | { \ |
| 1492 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1493 | break; \ |
| 1494 | } \ |
| 1495 | errno=0; \ |
| 1496 | clearerr(yyin); \ |
| 1497 | } \ |
| 1498 | }\ |
| 1499 | \ |
| 1500 | |
| 1501 | #endif |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
| 1506 | * we don't want an extra ';' after the "return" because that will cause |
| 1507 | * some compilers to complain about unreachable statements. |
| 1508 | */ |
| 1509 | #ifndef yyterminate |
| 1510 | #define yyterminate() return YY_NULL |
| 1511 | #endif |
| 1512 | |
| 1513 | |
| 1514 | /* Number of entries by which start-condition stack grows. */ |
| 1515 | #ifndef YY_START_STACK_INCR |
| 1516 | #define YY_START_STACK_INCR 25 |
| 1517 | #endif |
| 1518 | |
| 1519 | |
| 1520 | /* Report a fatal error. */ |
| 1521 | #ifndef YY_FATAL_ERROR |
| 1522 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
| 1523 | #endif |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | /* end tables serialization structures and prototypes */ |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | /* Default declaration of generated scanner - a define so the user can |
| 1532 | * easily add parameters. |
| 1533 | */ |
| 1534 | #ifndef YY_DECL |
| 1535 | #define YY_DECL_IS_OURS 1 |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | extern int yylex \ |
| 1554 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); |
| 1555 | |
| 1556 | #define YY_DECL int yylex \ |
| 1557 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) |
| 1558 | #endif /* !YY_DECL */ |
| 1559 | |
| 1560 | |
| 1561 | /* Code executed at the beginning of each rule, after yytext and yyleng |
| 1562 | * have been set up. |
| 1563 | */ |
| 1564 | #ifndef YY_USER_ACTION |
| 1565 | #define YY_USER_ACTION |
| 1566 | #endif |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | /* Code executed at the end of each rule. */ |
| 1571 | #ifndef YY_BREAK |
| 1572 | #define YY_BREAK /*LINTED*/break; |
| 1573 | #endif |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | #define YY_RULE_SETUP \ |
| 1578 | YY_USER_ACTION |
| 1579 | |
| 1580 | |
| 1581 | /** The main scanner function which does all the work. |
| 1582 | */ |
| 1583 | YY_DECL |
| 1584 | { |
| 1585 | yy_state_type yy_current_state; |
| 1586 | char *yy_cp, *yy_bp; |
| 1587 | int yy_act; |
| 1588 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | |
| 1593 | yylval = yylval_param; |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | yylloc = yylloc_param; |
| 1598 | |
| 1599 | |
| 1600 | if ( !yyg->yy_init ) |
| 1601 | { |
| 1602 | yyg->yy_init = 1; |
| 1603 | |
| 1604 | #ifdef YY_USER_INIT |
| 1605 | YY_USER_INIT; |
| 1606 | #endif |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 | if ( ! yyg->yy_start ) |
| 1611 | yyg->yy_start = 1; /* first start state */ |
| 1612 | |
| 1613 | if ( ! yyin ) |
| 1614 | yyin = stdin; |
| 1615 | |
| 1616 | if ( ! yyout ) |
| 1617 | yyout = stdout; |
| 1618 | |
| 1619 | if ( ! YY_CURRENT_BUFFER ) { |
| 1620 | yyensure_buffer_stack (yyscanner); |
| 1621 | YY_CURRENT_BUFFER_LVALUE = |
| 1622 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
| 1623 | } |
| 1624 | |
| 1625 | yy_load_buffer_state( yyscanner ); |
| 1626 | } |
| 1627 | |
| 1628 | { |
| 1629 | |
| 1630 | |
| 1631 | |
| 1632 | TParseContext* context = yyextra; |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
| 1637 | { |
| 1638 | yy_cp = yyg->yy_c_buf_p; |
| 1639 | |
| 1640 | /* Support of yytext. */ |
| 1641 | *yy_cp = yyg->yy_hold_char; |
| 1642 | |
| 1643 | /* yy_bp points to the position in yy_ch_buf of the start of |
| 1644 | * the current run. |
| 1645 | */ |
| 1646 | yy_bp = yy_cp; |
| 1647 | |
| 1648 | yy_current_state = yyg->yy_start; |
| 1649 | yy_match: |
| 1650 | do |
| 1651 | { |
| 1652 | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
| 1653 | if ( yy_accept[yy_current_state] ) |
| 1654 | { |
| 1655 | yyg->yy_last_accepting_state = yy_current_state; |
| 1656 | yyg->yy_last_accepting_cpos = yy_cp; |
| 1657 | } |
| 1658 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1659 | { |
| 1660 | yy_current_state = (int) yy_def[yy_current_state]; |
| 1661 | if ( yy_current_state >= 891 ) |
| 1662 | yy_c = yy_meta[yy_c]; |
| 1663 | } |
| 1664 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
| 1665 | ++yy_cp; |
| 1666 | } |
| 1667 | while ( yy_current_state != 890 ); |
| 1668 | yy_cp = yyg->yy_last_accepting_cpos; |
| 1669 | yy_current_state = yyg->yy_last_accepting_state; |
| 1670 | |
| 1671 | yy_find_action: |
| 1672 | yy_act = yy_accept[yy_current_state]; |
| 1673 | |
| 1674 | YY_DO_BEFORE_ACTION; |
| 1675 | |
| 1676 | |
| 1677 | if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
| 1678 | { |
| 1679 | int yyl; |
| 1680 | for ( yyl = 0; yyl < yyleng; ++yyl ) |
| 1681 | if ( yytext[yyl] == '\n' ) |
| 1682 | |
| 1683 | do{ yylineno++; |
| 1684 | yycolumn=0; |
| 1685 | }while(0) |
| 1686 | ; |
| 1687 | } |
| 1688 | |
| 1689 | |
| 1690 | do_action: /* This label is used only to access EOF actions. */ |
| 1691 | |
| 1692 | |
| 1693 | switch ( yy_act ) |
| 1694 | { /* beginning of action switch */ |
| 1695 | case 0: /* must back up */ |
| 1696 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
| 1697 | *yy_cp = yyg->yy_hold_char; |
| 1698 | yy_cp = yyg->yy_last_accepting_cpos; |
| 1699 | yy_current_state = yyg->yy_last_accepting_state; |
| 1700 | goto yy_find_action; |
| 1701 | |
| 1702 | case 1: |
| 1703 | YY_RULE_SETUP |
| 1704 | { return INVARIANT; } |
| 1705 | YY_BREAK |
| 1706 | case 2: |
| 1707 | YY_RULE_SETUP |
| 1708 | { return HIGH_PRECISION; } |
| 1709 | YY_BREAK |
| 1710 | case 3: |
| 1711 | YY_RULE_SETUP |
| 1712 | { return MEDIUM_PRECISION; } |
| 1713 | YY_BREAK |
| 1714 | case 4: |
| 1715 | YY_RULE_SETUP |
| 1716 | { return LOW_PRECISION; } |
| 1717 | YY_BREAK |
| 1718 | case 5: |
| 1719 | YY_RULE_SETUP |
| 1720 | { return PRECISION; } |
| 1721 | YY_BREAK |
| 1722 | case 6: |
| 1723 | YY_RULE_SETUP |
| 1724 | { return ES2_keyword_ES3_reserved(context, ATTRIBUTE); } |
| 1725 | YY_BREAK |
| 1726 | case 7: |
| 1727 | YY_RULE_SETUP |
| 1728 | { return CONST_QUAL; } |
| 1729 | YY_BREAK |
| 1730 | case 8: |
| 1731 | YY_RULE_SETUP |
| 1732 | { return UNIFORM; } |
| 1733 | YY_BREAK |
| 1734 | case 9: |
| 1735 | YY_RULE_SETUP |
| 1736 | { return ES2_and_ES3_ident_ES3_1_keyword(context, BUFFER); } |
| 1737 | YY_BREAK |
| 1738 | case 10: |
| 1739 | YY_RULE_SETUP |
| 1740 | { return ES2_keyword_ES3_reserved(context, VARYING); } |
| 1741 | YY_BREAK |
| 1742 | case 11: |
| 1743 | YY_RULE_SETUP |
| 1744 | { return BREAK; } |
| 1745 | YY_BREAK |
| 1746 | case 12: |
| 1747 | YY_RULE_SETUP |
| 1748 | { return CONTINUE; } |
| 1749 | YY_BREAK |
| 1750 | case 13: |
| 1751 | YY_RULE_SETUP |
| 1752 | { return DO; } |
| 1753 | YY_BREAK |
| 1754 | case 14: |
| 1755 | YY_RULE_SETUP |
| 1756 | { return FOR; } |
| 1757 | YY_BREAK |
| 1758 | case 15: |
| 1759 | YY_RULE_SETUP |
| 1760 | { return WHILE; } |
| 1761 | YY_BREAK |
| 1762 | case 16: |
| 1763 | YY_RULE_SETUP |
| 1764 | { return IF; } |
| 1765 | YY_BREAK |
| 1766 | case 17: |
| 1767 | YY_RULE_SETUP |
| 1768 | { return ELSE; } |
| 1769 | YY_BREAK |
| 1770 | case 18: |
| 1771 | YY_RULE_SETUP |
| 1772 | { return ES2_reserved_ES3_keyword(context, SWITCH); } |
| 1773 | YY_BREAK |
| 1774 | case 19: |
| 1775 | YY_RULE_SETUP |
| 1776 | { return ES2_ident_ES3_keyword(context, CASE); } |
| 1777 | YY_BREAK |
| 1778 | case 20: |
| 1779 | YY_RULE_SETUP |
| 1780 | { return ES2_reserved_ES3_keyword(context, DEFAULT); } |
| 1781 | YY_BREAK |
| 1782 | case 21: |
| 1783 | YY_RULE_SETUP |
| 1784 | { return ES2_ident_ES3_keyword(context, CENTROID); } |
| 1785 | YY_BREAK |
| 1786 | case 22: |
| 1787 | YY_RULE_SETUP |
| 1788 | { return ES2_reserved_ES3_keyword(context, FLAT); } |
| 1789 | YY_BREAK |
| 1790 | case 23: |
| 1791 | YY_RULE_SETUP |
| 1792 | { return ES2_ident_ES3_keyword(context, SMOOTH); } |
| 1793 | YY_BREAK |
| 1794 | case 24: |
| 1795 | YY_RULE_SETUP |
| 1796 | { return IN_QUAL; } |
| 1797 | YY_BREAK |
| 1798 | case 25: |
| 1799 | YY_RULE_SETUP |
| 1800 | { return OUT_QUAL; } |
| 1801 | YY_BREAK |
| 1802 | case 26: |
| 1803 | YY_RULE_SETUP |
| 1804 | { return INOUT_QUAL; } |
| 1805 | YY_BREAK |
| 1806 | case 27: |
| 1807 | YY_RULE_SETUP |
| 1808 | { return ES2_and_ES3_ident_ES3_1_keyword(context, SHARED); } |
| 1809 | YY_BREAK |
| 1810 | case 28: |
| 1811 | YY_RULE_SETUP |
| 1812 | { return FLOAT_TYPE; } |
| 1813 | YY_BREAK |
| 1814 | case 29: |
| 1815 | YY_RULE_SETUP |
| 1816 | { return INT_TYPE; } |
| 1817 | YY_BREAK |
| 1818 | case 30: |
| 1819 | YY_RULE_SETUP |
| 1820 | { return ES2_ident_ES3_keyword(context, UINT_TYPE); } |
| 1821 | YY_BREAK |
| 1822 | case 31: |
| 1823 | YY_RULE_SETUP |
| 1824 | { return VOID_TYPE; } |
| 1825 | YY_BREAK |
| 1826 | case 32: |
| 1827 | YY_RULE_SETUP |
| 1828 | { return BOOL_TYPE; } |
| 1829 | YY_BREAK |
| 1830 | case 33: |
| 1831 | YY_RULE_SETUP |
| 1832 | { yylval->lex.b = true; return BOOLCONSTANT; } |
| 1833 | YY_BREAK |
| 1834 | case 34: |
| 1835 | YY_RULE_SETUP |
| 1836 | { yylval->lex.b = false; return BOOLCONSTANT; } |
| 1837 | YY_BREAK |
| 1838 | case 35: |
| 1839 | YY_RULE_SETUP |
| 1840 | { return DISCARD; } |
| 1841 | YY_BREAK |
| 1842 | case 36: |
| 1843 | YY_RULE_SETUP |
| 1844 | { return RETURN; } |
| 1845 | YY_BREAK |
| 1846 | case 37: |
| 1847 | YY_RULE_SETUP |
| 1848 | { return MATRIX2; } |
| 1849 | YY_BREAK |
| 1850 | case 38: |
| 1851 | YY_RULE_SETUP |
| 1852 | { return MATRIX3; } |
| 1853 | YY_BREAK |
| 1854 | case 39: |
| 1855 | YY_RULE_SETUP |
| 1856 | { return MATRIX4; } |
| 1857 | YY_BREAK |
| 1858 | case 40: |
| 1859 | YY_RULE_SETUP |
| 1860 | { return ES2_ident_ES3_keyword(context, MATRIX2); } |
| 1861 | YY_BREAK |
| 1862 | case 41: |
| 1863 | YY_RULE_SETUP |
| 1864 | { return ES2_ident_ES3_keyword(context, MATRIX3); } |
| 1865 | YY_BREAK |
| 1866 | case 42: |
| 1867 | YY_RULE_SETUP |
| 1868 | { return ES2_ident_ES3_keyword(context, MATRIX4); } |
| 1869 | YY_BREAK |
| 1870 | case 43: |
| 1871 | YY_RULE_SETUP |
| 1872 | { return ES2_ident_ES3_keyword(context, MATRIX2x3); } |
| 1873 | YY_BREAK |
| 1874 | case 44: |
| 1875 | YY_RULE_SETUP |
| 1876 | { return ES2_ident_ES3_keyword(context, MATRIX3x2); } |
| 1877 | YY_BREAK |
| 1878 | case 45: |
| 1879 | YY_RULE_SETUP |
| 1880 | { return ES2_ident_ES3_keyword(context, MATRIX2x4); } |
| 1881 | YY_BREAK |
| 1882 | case 46: |
| 1883 | YY_RULE_SETUP |
| 1884 | { return ES2_ident_ES3_keyword(context, MATRIX4x2); } |
| 1885 | YY_BREAK |
| 1886 | case 47: |
| 1887 | YY_RULE_SETUP |
| 1888 | { return ES2_ident_ES3_keyword(context, MATRIX3x4); } |
| 1889 | YY_BREAK |
| 1890 | case 48: |
| 1891 | YY_RULE_SETUP |
| 1892 | { return ES2_ident_ES3_keyword(context, MATRIX4x3); } |
| 1893 | YY_BREAK |
| 1894 | case 49: |
| 1895 | YY_RULE_SETUP |
| 1896 | { return VEC2; } |
| 1897 | YY_BREAK |
| 1898 | case 50: |
| 1899 | YY_RULE_SETUP |
| 1900 | { return VEC3; } |
| 1901 | YY_BREAK |
| 1902 | case 51: |
| 1903 | YY_RULE_SETUP |
| 1904 | { return VEC4; } |
| 1905 | YY_BREAK |
| 1906 | case 52: |
| 1907 | YY_RULE_SETUP |
| 1908 | { return IVEC2; } |
| 1909 | YY_BREAK |
| 1910 | case 53: |
| 1911 | YY_RULE_SETUP |
| 1912 | { return IVEC3; } |
| 1913 | YY_BREAK |
| 1914 | case 54: |
| 1915 | YY_RULE_SETUP |
| 1916 | { return IVEC4; } |
| 1917 | YY_BREAK |
| 1918 | case 55: |
| 1919 | YY_RULE_SETUP |
| 1920 | { return BVEC2; } |
| 1921 | YY_BREAK |
| 1922 | case 56: |
| 1923 | YY_RULE_SETUP |
| 1924 | { return BVEC3; } |
| 1925 | YY_BREAK |
| 1926 | case 57: |
| 1927 | YY_RULE_SETUP |
| 1928 | { return BVEC4; } |
| 1929 | YY_BREAK |
| 1930 | case 58: |
| 1931 | YY_RULE_SETUP |
| 1932 | { return ES2_ident_ES3_keyword(context, UVEC2); } |
| 1933 | YY_BREAK |
| 1934 | case 59: |
| 1935 | YY_RULE_SETUP |
| 1936 | { return ES2_ident_ES3_keyword(context, UVEC3); } |
| 1937 | YY_BREAK |
| 1938 | case 60: |
| 1939 | YY_RULE_SETUP |
| 1940 | { return ES2_ident_ES3_keyword(context, UVEC4); } |
| 1941 | YY_BREAK |
| 1942 | case 61: |
| 1943 | YY_RULE_SETUP |
| 1944 | { return SAMPLER2D; } |
| 1945 | YY_BREAK |
| 1946 | case 62: |
| 1947 | YY_RULE_SETUP |
| 1948 | { return SAMPLERCUBE; } |
| 1949 | YY_BREAK |
| 1950 | case 63: |
| 1951 | YY_RULE_SETUP |
| 1952 | { return SAMPLER_EXTERNAL_OES; } |
| 1953 | YY_BREAK |
| 1954 | case 64: |
| 1955 | YY_RULE_SETUP |
| 1956 | { return ES2_reserved_ES3_keyword(context, SAMPLER3D); } |
| 1957 | YY_BREAK |
| 1958 | case 65: |
| 1959 | YY_RULE_SETUP |
| 1960 | { return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); } |
| 1961 | YY_BREAK |
| 1962 | case 66: |
| 1963 | YY_RULE_SETUP |
| 1964 | { return SAMPLER2DRECT; } |
| 1965 | YY_BREAK |
| 1966 | case 67: |
| 1967 | YY_RULE_SETUP |
| 1968 | { return ES2_ident_ES3_keyword(context, SAMPLER2DARRAY); } |
| 1969 | YY_BREAK |
| 1970 | case 68: |
| 1971 | YY_RULE_SETUP |
| 1972 | { return ES3_extension_and_ES3_1_keyword_ES3_reserved_else_ident(context, TExtension::ANGLE_texture_multisample, SAMPLER2DMS); } |
| 1973 | YY_BREAK |
| 1974 | case 69: |
| 1975 | YY_RULE_SETUP |
| 1976 | { return ES2_ident_ES3_keyword(context, ISAMPLER2D); } |
| 1977 | YY_BREAK |
| 1978 | case 70: |
| 1979 | YY_RULE_SETUP |
| 1980 | { return ES2_ident_ES3_keyword(context, ISAMPLER3D); } |
| 1981 | YY_BREAK |
| 1982 | case 71: |
| 1983 | YY_RULE_SETUP |
| 1984 | { return ES2_ident_ES3_keyword(context, ISAMPLERCUBE); } |
| 1985 | YY_BREAK |
| 1986 | case 72: |
| 1987 | YY_RULE_SETUP |
| 1988 | { return ES2_ident_ES3_keyword(context, ISAMPLER2DARRAY); } |
| 1989 | YY_BREAK |
| 1990 | case 73: |
| 1991 | YY_RULE_SETUP |
| 1992 | { return ES3_extension_and_ES3_1_keyword_ES3_reserved_else_ident(context, TExtension::ANGLE_texture_multisample, ISAMPLER2DMS); } |
| 1993 | YY_BREAK |
| 1994 | case 74: |
| 1995 | YY_RULE_SETUP |
| 1996 | { return ES2_ident_ES3_keyword(context, USAMPLER2D); } |
| 1997 | YY_BREAK |
| 1998 | case 75: |
| 1999 | YY_RULE_SETUP |
| 2000 | { return ES2_ident_ES3_keyword(context, USAMPLER3D); } |
| 2001 | YY_BREAK |
| 2002 | case 76: |
| 2003 | YY_RULE_SETUP |
| 2004 | { return ES2_ident_ES3_keyword(context, USAMPLERCUBE); } |
| 2005 | YY_BREAK |
| 2006 | case 77: |
| 2007 | YY_RULE_SETUP |
| 2008 | { return ES2_ident_ES3_keyword(context, USAMPLER2DARRAY); } |
| 2009 | YY_BREAK |
| 2010 | case 78: |
| 2011 | YY_RULE_SETUP |
| 2012 | { return ES3_extension_and_ES3_1_keyword_ES3_reserved_else_ident(context, TExtension::ANGLE_texture_multisample, USAMPLER2DMS); } |
| 2013 | YY_BREAK |
| 2014 | case 79: |
| 2015 | YY_RULE_SETUP |
| 2016 | { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); } |
| 2017 | YY_BREAK |
| 2018 | case 80: |
| 2019 | YY_RULE_SETUP |
| 2020 | { return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); } |
| 2021 | YY_BREAK |
| 2022 | case 81: |
| 2023 | YY_RULE_SETUP |
| 2024 | { return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); } |
| 2025 | YY_BREAK |
| 2026 | case 82: |
| 2027 | YY_RULE_SETUP |
| 2028 | { return ES3_extension_keyword_else_ident(context, TExtension::EXT_YUV_target, SAMPLEREXTERNAL2DY2YEXT); } |
| 2029 | YY_BREAK |
| 2030 | case 83: |
| 2031 | YY_RULE_SETUP |
| 2032 | { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, SAMPLER2DMSARRAY); } |
| 2033 | YY_BREAK |
| 2034 | case 84: |
| 2035 | YY_RULE_SETUP |
| 2036 | { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, ISAMPLER2DMSARRAY); } |
| 2037 | YY_BREAK |
| 2038 | case 85: |
| 2039 | YY_RULE_SETUP |
| 2040 | { return ES2_ident_ES3_reserved_ES3_1_extension_keyword(context, TExtension::OES_texture_storage_multisample_2d_array, USAMPLER2DMSARRAY); } |
| 2041 | YY_BREAK |
| 2042 | case 86: |
| 2043 | YY_RULE_SETUP |
| 2044 | { return STRUCT; } |
| 2045 | YY_BREAK |
| 2046 | case 87: |
| 2047 | YY_RULE_SETUP |
| 2048 | { return ES2_ident_ES3_keyword_multiview_keyword(context, LAYOUT); } |
| 2049 | YY_BREAK |
| 2050 | case 88: |
| 2051 | YY_RULE_SETUP |
| 2052 | { return ES3_extension_keyword_else_ident(context, TExtension::EXT_YUV_target, YUVCSCSTANDARDEXT); } |
| 2053 | YY_BREAK |
| 2054 | case 89: |
| 2055 | YY_RULE_SETUP |
| 2056 | { return yuvcscstandardext_constant(context); } |
| 2057 | YY_BREAK |
| 2058 | case 90: |
| 2059 | YY_RULE_SETUP |
| 2060 | { return yuvcscstandardext_constant(context); } |
| 2061 | YY_BREAK |
| 2062 | case 91: |
| 2063 | YY_RULE_SETUP |
| 2064 | { return yuvcscstandardext_constant(context); } |
| 2065 | YY_BREAK |
| 2066 | case 92: |
| 2067 | YY_RULE_SETUP |
| 2068 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); } |
| 2069 | YY_BREAK |
| 2070 | case 93: |
| 2071 | YY_RULE_SETUP |
| 2072 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); } |
| 2073 | YY_BREAK |
| 2074 | case 94: |
| 2075 | YY_RULE_SETUP |
| 2076 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); } |
| 2077 | YY_BREAK |
| 2078 | case 95: |
| 2079 | YY_RULE_SETUP |
| 2080 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); } |
| 2081 | YY_BREAK |
| 2082 | case 96: |
| 2083 | YY_RULE_SETUP |
| 2084 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); } |
| 2085 | YY_BREAK |
| 2086 | case 97: |
| 2087 | YY_RULE_SETUP |
| 2088 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); } |
| 2089 | YY_BREAK |
| 2090 | case 98: |
| 2091 | YY_RULE_SETUP |
| 2092 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); } |
| 2093 | YY_BREAK |
| 2094 | case 99: |
| 2095 | YY_RULE_SETUP |
| 2096 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); } |
| 2097 | YY_BREAK |
| 2098 | case 100: |
| 2099 | YY_RULE_SETUP |
| 2100 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); } |
| 2101 | YY_BREAK |
| 2102 | case 101: |
| 2103 | YY_RULE_SETUP |
| 2104 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); } |
| 2105 | YY_BREAK |
| 2106 | case 102: |
| 2107 | YY_RULE_SETUP |
| 2108 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); } |
| 2109 | YY_BREAK |
| 2110 | case 103: |
| 2111 | YY_RULE_SETUP |
| 2112 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); } |
| 2113 | YY_BREAK |
| 2114 | case 104: |
| 2115 | YY_RULE_SETUP |
| 2116 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); } |
| 2117 | YY_BREAK |
| 2118 | case 105: |
| 2119 | YY_RULE_SETUP |
| 2120 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); } |
| 2121 | YY_BREAK |
| 2122 | case 106: |
| 2123 | YY_RULE_SETUP |
| 2124 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); } |
| 2125 | YY_BREAK |
| 2126 | case 107: |
| 2127 | YY_RULE_SETUP |
| 2128 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); } |
| 2129 | YY_BREAK |
| 2130 | case 108: |
| 2131 | YY_RULE_SETUP |
| 2132 | { return ES2_and_ES3_reserved_ES3_1_keyword(context, VOLATILE); } |
| 2133 | YY_BREAK |
| 2134 | case 109: |
| 2135 | YY_RULE_SETUP |
| 2136 | { return ES2_ident_ES3_reserved_ES3_1_keyword(context, ATOMICUINT); } |
| 2137 | YY_BREAK |
| 2138 | /* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */ |
| 2139 | case 110: |
| 2140 | case 111: |
| 2141 | case 112: |
| 2142 | case 113: |
| 2143 | case 114: |
| 2144 | case 115: |
| 2145 | case 116: |
| 2146 | case 117: |
| 2147 | case 118: |
| 2148 | case 119: |
| 2149 | case 120: |
| 2150 | case 121: |
| 2151 | case 122: |
| 2152 | case 123: |
| 2153 | case 124: |
| 2154 | case 125: |
| 2155 | case 126: |
| 2156 | case 127: |
| 2157 | case 128: |
| 2158 | case 129: |
| 2159 | case 130: |
| 2160 | case 131: |
| 2161 | case 132: |
| 2162 | case 133: |
| 2163 | case 134: |
| 2164 | case 135: |
| 2165 | case 136: |
| 2166 | case 137: |
| 2167 | case 138: |
| 2168 | case 139: |
| 2169 | case 140: |
| 2170 | case 141: |
| 2171 | case 142: |
| 2172 | YY_RULE_SETUP |
| 2173 | { |
| 2174 | if (context->getShaderVersion() < 300) { |
| 2175 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 2176 | return check_type(yyscanner); |
| 2177 | } |
| 2178 | return reserved_word(yyscanner); |
| 2179 | } |
| 2180 | YY_BREAK |
| 2181 | /* Reserved keywords in GLSL ES 1.00 that are not reserved in GLSL ES 3.00 */ |
| 2182 | case 143: |
| 2183 | YY_RULE_SETUP |
| 2184 | { |
| 2185 | if (context->getShaderVersion() >= 300) |
| 2186 | { |
| 2187 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 2188 | return check_type(yyscanner); |
| 2189 | } |
| 2190 | |
| 2191 | return reserved_word(yyscanner); |
| 2192 | } |
| 2193 | YY_BREAK |
| 2194 | /* Reserved keywords */ |
| 2195 | case 144: |
| 2196 | case 145: |
| 2197 | case 146: |
| 2198 | case 147: |
| 2199 | case 148: |
| 2200 | case 149: |
| 2201 | case 150: |
| 2202 | case 151: |
| 2203 | case 152: |
| 2204 | case 153: |
| 2205 | case 154: |
| 2206 | case 155: |
| 2207 | case 156: |
| 2208 | case 157: |
| 2209 | case 158: |
| 2210 | case 159: |
| 2211 | case 160: |
| 2212 | case 161: |
| 2213 | case 162: |
| 2214 | case 163: |
| 2215 | case 164: |
| 2216 | case 165: |
| 2217 | case 166: |
| 2218 | case 167: |
| 2219 | case 168: |
| 2220 | case 169: |
| 2221 | case 170: |
| 2222 | case 171: |
| 2223 | case 172: |
| 2224 | case 173: |
| 2225 | case 174: |
| 2226 | case 175: |
| 2227 | case 176: |
| 2228 | case 177: |
| 2229 | case 178: |
| 2230 | case 179: |
| 2231 | case 180: |
| 2232 | case 181: |
| 2233 | case 182: |
| 2234 | case 183: |
| 2235 | YY_RULE_SETUP |
| 2236 | { return reserved_word(yyscanner); } |
| 2237 | YY_BREAK |
| 2238 | case 184: |
| 2239 | YY_RULE_SETUP |
| 2240 | { |
| 2241 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 2242 | return check_type(yyscanner); |
| 2243 | } |
| 2244 | YY_BREAK |
| 2245 | case 185: |
| 2246 | YY_RULE_SETUP |
| 2247 | { return int_constant(context); } |
| 2248 | YY_BREAK |
| 2249 | case 186: |
| 2250 | YY_RULE_SETUP |
| 2251 | { return int_constant(context); } |
| 2252 | YY_BREAK |
| 2253 | case 187: |
| 2254 | YY_RULE_SETUP |
| 2255 | { return int_constant(context); } |
| 2256 | YY_BREAK |
| 2257 | case 188: |
| 2258 | YY_RULE_SETUP |
| 2259 | { return uint_constant(context); } |
| 2260 | YY_BREAK |
| 2261 | case 189: |
| 2262 | YY_RULE_SETUP |
| 2263 | { return uint_constant(context); } |
| 2264 | YY_BREAK |
| 2265 | case 190: |
| 2266 | YY_RULE_SETUP |
| 2267 | { return uint_constant(context); } |
| 2268 | YY_BREAK |
| 2269 | case 191: |
| 2270 | YY_RULE_SETUP |
| 2271 | { return float_constant(yyscanner); } |
| 2272 | YY_BREAK |
| 2273 | case 192: |
| 2274 | YY_RULE_SETUP |
| 2275 | { return float_constant(yyscanner); } |
| 2276 | YY_BREAK |
| 2277 | case 193: |
| 2278 | YY_RULE_SETUP |
| 2279 | { return float_constant(yyscanner); } |
| 2280 | YY_BREAK |
| 2281 | case 194: |
| 2282 | YY_RULE_SETUP |
| 2283 | { return floatsuffix_check(context); } |
| 2284 | YY_BREAK |
| 2285 | case 195: |
| 2286 | YY_RULE_SETUP |
| 2287 | { return floatsuffix_check(context); } |
| 2288 | YY_BREAK |
| 2289 | case 196: |
| 2290 | YY_RULE_SETUP |
| 2291 | { return floatsuffix_check(context); } |
| 2292 | YY_BREAK |
| 2293 | case 197: |
| 2294 | YY_RULE_SETUP |
| 2295 | { return ADD_ASSIGN; } |
| 2296 | YY_BREAK |
| 2297 | case 198: |
| 2298 | YY_RULE_SETUP |
| 2299 | { return SUB_ASSIGN; } |
| 2300 | YY_BREAK |
| 2301 | case 199: |
| 2302 | YY_RULE_SETUP |
| 2303 | { return MUL_ASSIGN; } |
| 2304 | YY_BREAK |
| 2305 | case 200: |
| 2306 | YY_RULE_SETUP |
| 2307 | { return DIV_ASSIGN; } |
| 2308 | YY_BREAK |
| 2309 | case 201: |
| 2310 | YY_RULE_SETUP |
| 2311 | { return MOD_ASSIGN; } |
| 2312 | YY_BREAK |
| 2313 | case 202: |
| 2314 | YY_RULE_SETUP |
| 2315 | { return LEFT_ASSIGN; } |
| 2316 | YY_BREAK |
| 2317 | case 203: |
| 2318 | YY_RULE_SETUP |
| 2319 | { return RIGHT_ASSIGN; } |
| 2320 | YY_BREAK |
| 2321 | case 204: |
| 2322 | YY_RULE_SETUP |
| 2323 | { return AND_ASSIGN; } |
| 2324 | YY_BREAK |
| 2325 | case 205: |
| 2326 | YY_RULE_SETUP |
| 2327 | { return XOR_ASSIGN; } |
| 2328 | YY_BREAK |
| 2329 | case 206: |
| 2330 | YY_RULE_SETUP |
| 2331 | { return OR_ASSIGN; } |
| 2332 | YY_BREAK |
| 2333 | case 207: |
| 2334 | YY_RULE_SETUP |
| 2335 | { return INC_OP; } |
| 2336 | YY_BREAK |
| 2337 | case 208: |
| 2338 | YY_RULE_SETUP |
| 2339 | { return DEC_OP; } |
| 2340 | YY_BREAK |
| 2341 | case 209: |
| 2342 | YY_RULE_SETUP |
| 2343 | { return AND_OP; } |
| 2344 | YY_BREAK |
| 2345 | case 210: |
| 2346 | YY_RULE_SETUP |
| 2347 | { return OR_OP; } |
| 2348 | YY_BREAK |
| 2349 | case 211: |
| 2350 | YY_RULE_SETUP |
| 2351 | { return XOR_OP; } |
| 2352 | YY_BREAK |
| 2353 | case 212: |
| 2354 | YY_RULE_SETUP |
| 2355 | { return LE_OP; } |
| 2356 | YY_BREAK |
| 2357 | case 213: |
| 2358 | YY_RULE_SETUP |
| 2359 | { return GE_OP; } |
| 2360 | YY_BREAK |
| 2361 | case 214: |
| 2362 | YY_RULE_SETUP |
| 2363 | { return EQ_OP; } |
| 2364 | YY_BREAK |
| 2365 | case 215: |
| 2366 | YY_RULE_SETUP |
| 2367 | { return NE_OP; } |
| 2368 | YY_BREAK |
| 2369 | case 216: |
| 2370 | YY_RULE_SETUP |
| 2371 | { return LEFT_OP; } |
| 2372 | YY_BREAK |
| 2373 | case 217: |
| 2374 | YY_RULE_SETUP |
| 2375 | { return RIGHT_OP; } |
| 2376 | YY_BREAK |
| 2377 | case 218: |
| 2378 | YY_RULE_SETUP |
| 2379 | { return SEMICOLON; } |
| 2380 | YY_BREAK |
| 2381 | case 219: |
| 2382 | YY_RULE_SETUP |
| 2383 | { return LEFT_BRACE; } |
| 2384 | YY_BREAK |
| 2385 | case 220: |
| 2386 | YY_RULE_SETUP |
| 2387 | { return RIGHT_BRACE; } |
| 2388 | YY_BREAK |
| 2389 | case 221: |
| 2390 | YY_RULE_SETUP |
| 2391 | { return COMMA; } |
| 2392 | YY_BREAK |
| 2393 | case 222: |
| 2394 | YY_RULE_SETUP |
| 2395 | { return COLON; } |
| 2396 | YY_BREAK |
| 2397 | case 223: |
| 2398 | YY_RULE_SETUP |
| 2399 | { return EQUAL; } |
| 2400 | YY_BREAK |
| 2401 | case 224: |
| 2402 | YY_RULE_SETUP |
| 2403 | { return LEFT_PAREN; } |
| 2404 | YY_BREAK |
| 2405 | case 225: |
| 2406 | YY_RULE_SETUP |
| 2407 | { return RIGHT_PAREN; } |
| 2408 | YY_BREAK |
| 2409 | case 226: |
| 2410 | YY_RULE_SETUP |
| 2411 | { return LEFT_BRACKET; } |
| 2412 | YY_BREAK |
| 2413 | case 227: |
| 2414 | YY_RULE_SETUP |
| 2415 | { return RIGHT_BRACKET; } |
| 2416 | YY_BREAK |
| 2417 | case 228: |
| 2418 | YY_RULE_SETUP |
| 2419 | { BEGIN(FIELDS); return DOT; } |
| 2420 | YY_BREAK |
| 2421 | case 229: |
| 2422 | YY_RULE_SETUP |
| 2423 | { return BANG; } |
| 2424 | YY_BREAK |
| 2425 | case 230: |
| 2426 | YY_RULE_SETUP |
| 2427 | { return DASH; } |
| 2428 | YY_BREAK |
| 2429 | case 231: |
| 2430 | YY_RULE_SETUP |
| 2431 | { return TILDE; } |
| 2432 | YY_BREAK |
| 2433 | case 232: |
| 2434 | YY_RULE_SETUP |
| 2435 | { return PLUS; } |
| 2436 | YY_BREAK |
| 2437 | case 233: |
| 2438 | YY_RULE_SETUP |
| 2439 | { return STAR; } |
| 2440 | YY_BREAK |
| 2441 | case 234: |
| 2442 | YY_RULE_SETUP |
| 2443 | { return SLASH; } |
| 2444 | YY_BREAK |
| 2445 | case 235: |
| 2446 | YY_RULE_SETUP |
| 2447 | { return PERCENT; } |
| 2448 | YY_BREAK |
| 2449 | case 236: |
| 2450 | YY_RULE_SETUP |
| 2451 | { return LEFT_ANGLE; } |
| 2452 | YY_BREAK |
| 2453 | case 237: |
| 2454 | YY_RULE_SETUP |
| 2455 | { return RIGHT_ANGLE; } |
| 2456 | YY_BREAK |
| 2457 | case 238: |
| 2458 | YY_RULE_SETUP |
| 2459 | { return VERTICAL_BAR; } |
| 2460 | YY_BREAK |
| 2461 | case 239: |
| 2462 | YY_RULE_SETUP |
| 2463 | { return CARET; } |
| 2464 | YY_BREAK |
| 2465 | case 240: |
| 2466 | YY_RULE_SETUP |
| 2467 | { return AMPERSAND; } |
| 2468 | YY_BREAK |
| 2469 | case 241: |
| 2470 | YY_RULE_SETUP |
| 2471 | { return QUESTION; } |
| 2472 | YY_BREAK |
| 2473 | case 242: |
| 2474 | YY_RULE_SETUP |
| 2475 | { |
| 2476 | BEGIN(INITIAL); |
| 2477 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 2478 | return FIELD_SELECTION; |
| 2479 | } |
| 2480 | YY_BREAK |
| 2481 | case 243: |
| 2482 | YY_RULE_SETUP |
| 2483 | {} |
| 2484 | YY_BREAK |
| 2485 | case 244: |
| 2486 | YY_RULE_SETUP |
| 2487 | { |
| 2488 | yyextra->error(*yylloc, "Illegal character at fieldname start" , yytext); |
| 2489 | return 0; |
| 2490 | } |
| 2491 | YY_BREAK |
| 2492 | case 245: |
| 2493 | /* rule 245 can match eol */ |
| 2494 | YY_RULE_SETUP |
| 2495 | { } |
| 2496 | YY_BREAK |
| 2497 | case YY_STATE_EOF(INITIAL): |
| 2498 | case YY_STATE_EOF(FIELDS): |
| 2499 | { yyterminate(); } |
| 2500 | YY_BREAK |
| 2501 | case 246: |
| 2502 | YY_RULE_SETUP |
| 2503 | { assert(false); return 0; } |
| 2504 | YY_BREAK |
| 2505 | case 247: |
| 2506 | YY_RULE_SETUP |
| 2507 | ECHO; |
| 2508 | YY_BREAK |
| 2509 | |
| 2510 | case YY_END_OF_BUFFER: |
| 2511 | { |
| 2512 | /* Amount of text matched not including the EOB char. */ |
| 2513 | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
| 2514 | |
| 2515 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
| 2516 | *yy_cp = yyg->yy_hold_char; |
| 2517 | YY_RESTORE_YY_MORE_OFFSET |
| 2518 | |
| 2519 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
| 2520 | { |
| 2521 | /* We're scanning a new file or input source. It's |
| 2522 | * possible that this happened because the user |
| 2523 | * just pointed yyin at a new source and called |
| 2524 | * yylex(). If so, then we have to assure |
| 2525 | * consistency between YY_CURRENT_BUFFER and our |
| 2526 | * globals. Here is the right place to do so, because |
| 2527 | * this is the first action (other than possibly a |
| 2528 | * back-up) that will match for the new input source. |
| 2529 | */ |
| 2530 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 2531 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
| 2532 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
| 2533 | } |
| 2534 | |
| 2535 | /* Note that here we test for yy_c_buf_p "<=" to the position |
| 2536 | * of the first EOB in the buffer, since yy_c_buf_p will |
| 2537 | * already have been incremented past the NUL character |
| 2538 | * (since all states make transitions on EOB to the |
| 2539 | * end-of-buffer state). Contrast this with the test |
| 2540 | * in input(). |
| 2541 | */ |
| 2542 | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
| 2543 | { /* This was really a NUL. */ |
| 2544 | yy_state_type yy_next_state; |
| 2545 | |
| 2546 | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
| 2547 | |
| 2548 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2549 | |
| 2550 | /* Okay, we're now positioned to make the NUL |
| 2551 | * transition. We couldn't have |
| 2552 | * yy_get_previous_state() go ahead and do it |
| 2553 | * for us because it doesn't know how to deal |
| 2554 | * with the possibility of jamming (and we don't |
| 2555 | * want to build jamming into it because then it |
| 2556 | * will run more slowly). |
| 2557 | */ |
| 2558 | |
| 2559 | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
| 2560 | |
| 2561 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2562 | |
| 2563 | if ( yy_next_state ) |
| 2564 | { |
| 2565 | /* Consume the NUL. */ |
| 2566 | yy_cp = ++yyg->yy_c_buf_p; |
| 2567 | yy_current_state = yy_next_state; |
| 2568 | goto yy_match; |
| 2569 | } |
| 2570 | |
| 2571 | else |
| 2572 | { |
| 2573 | yy_cp = yyg->yy_last_accepting_cpos; |
| 2574 | yy_current_state = yyg->yy_last_accepting_state; |
| 2575 | goto yy_find_action; |
| 2576 | } |
| 2577 | } |
| 2578 | |
| 2579 | else switch ( yy_get_next_buffer( yyscanner ) ) |
| 2580 | { |
| 2581 | case EOB_ACT_END_OF_FILE: |
| 2582 | { |
| 2583 | yyg->yy_did_buffer_switch_on_eof = 0; |
| 2584 | |
| 2585 | if ( yywrap( yyscanner ) ) |
| 2586 | { |
| 2587 | /* Note: because we've taken care in |
| 2588 | * yy_get_next_buffer() to have set up |
| 2589 | * yytext, we can now set up |
| 2590 | * yy_c_buf_p so that if some total |
| 2591 | * hoser (like flex itself) wants to |
| 2592 | * call the scanner after we return the |
| 2593 | * YY_NULL, it'll still work - another |
| 2594 | * YY_NULL will get returned. |
| 2595 | */ |
| 2596 | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2597 | |
| 2598 | yy_act = YY_STATE_EOF(YY_START); |
| 2599 | goto do_action; |
| 2600 | } |
| 2601 | |
| 2602 | else |
| 2603 | { |
| 2604 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
| 2605 | YY_NEW_FILE; |
| 2606 | } |
| 2607 | break; |
| 2608 | } |
| 2609 | |
| 2610 | case EOB_ACT_CONTINUE_SCAN: |
| 2611 | yyg->yy_c_buf_p = |
| 2612 | yyg->yytext_ptr + yy_amount_of_matched_text; |
| 2613 | |
| 2614 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2615 | |
| 2616 | yy_cp = yyg->yy_c_buf_p; |
| 2617 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2618 | goto yy_match; |
| 2619 | |
| 2620 | case EOB_ACT_LAST_MATCH: |
| 2621 | yyg->yy_c_buf_p = |
| 2622 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
| 2623 | |
| 2624 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2625 | |
| 2626 | yy_cp = yyg->yy_c_buf_p; |
| 2627 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2628 | goto yy_find_action; |
| 2629 | } |
| 2630 | break; |
| 2631 | } |
| 2632 | |
| 2633 | default: |
| 2634 | YY_FATAL_ERROR( |
| 2635 | "fatal flex scanner internal error--no action found" ); |
| 2636 | } /* end of action switch */ |
| 2637 | } /* end of scanning one token */ |
| 2638 | } /* end of user's declarations */ |
| 2639 | } /* end of yylex */ |
| 2640 | |
| 2641 | |
| 2642 | |
| 2643 | |
| 2644 | |
| 2645 | /* yy_get_next_buffer - try to read in a new buffer |
| 2646 | * |
| 2647 | * Returns a code representing an action: |
| 2648 | * EOB_ACT_LAST_MATCH - |
| 2649 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
| 2650 | * EOB_ACT_END_OF_FILE - end of file |
| 2651 | */ |
| 2652 | static int yy_get_next_buffer (yyscan_t yyscanner) |
| 2653 | { |
| 2654 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2655 | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
| 2656 | char *source = yyg->yytext_ptr; |
| 2657 | int number_to_move, i; |
| 2658 | int ret_val; |
| 2659 | |
| 2660 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
| 2661 | YY_FATAL_ERROR( |
| 2662 | "fatal flex scanner internal error--end of buffer missed" ); |
| 2663 | |
| 2664 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
| 2665 | { /* Don't try to fill the buffer, so this is an EOF. */ |
| 2666 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
| 2667 | { |
| 2668 | /* We matched a single character, the EOB, so |
| 2669 | * treat this as a final EOF. |
| 2670 | */ |
| 2671 | return EOB_ACT_END_OF_FILE; |
| 2672 | } |
| 2673 | |
| 2674 | else |
| 2675 | { |
| 2676 | /* We matched some text prior to the EOB, first |
| 2677 | * process it. |
| 2678 | */ |
| 2679 | return EOB_ACT_LAST_MATCH; |
| 2680 | } |
| 2681 | } |
| 2682 | |
| 2683 | /* Try to read more data. */ |
| 2684 | |
| 2685 | /* First move last chars to start of buffer. */ |
| 2686 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
| 2687 | |
| 2688 | for ( i = 0; i < number_to_move; ++i ) |
| 2689 | *(dest++) = *(source++); |
| 2690 | |
| 2691 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
| 2692 | /* don't do the read, it's not guaranteed to return an EOF, |
| 2693 | * just force an EOF |
| 2694 | */ |
| 2695 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
| 2696 | |
| 2697 | else |
| 2698 | { |
| 2699 | int num_to_read = |
| 2700 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
| 2701 | |
| 2702 | while ( num_to_read <= 0 ) |
| 2703 | { /* Not enough room in the buffer - grow it. */ |
| 2704 | |
| 2705 | /* just a shorter name for the current buffer */ |
| 2706 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
| 2707 | |
| 2708 | int yy_c_buf_p_offset = |
| 2709 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
| 2710 | |
| 2711 | if ( b->yy_is_our_buffer ) |
| 2712 | { |
| 2713 | int new_size = b->yy_buf_size * 2; |
| 2714 | |
| 2715 | if ( new_size <= 0 ) |
| 2716 | b->yy_buf_size += b->yy_buf_size / 8; |
| 2717 | else |
| 2718 | b->yy_buf_size *= 2; |
| 2719 | |
| 2720 | b->yy_ch_buf = (char *) |
| 2721 | /* Include room in for 2 EOB chars. */ |
| 2722 | yyrealloc( (void *) b->yy_ch_buf, |
| 2723 | (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
| 2724 | } |
| 2725 | else |
| 2726 | /* Can't grow it, we don't own it. */ |
| 2727 | b->yy_ch_buf = NULL; |
| 2728 | |
| 2729 | if ( ! b->yy_ch_buf ) |
| 2730 | YY_FATAL_ERROR( |
| 2731 | "fatal error - scanner input buffer overflow" ); |
| 2732 | |
| 2733 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
| 2734 | |
| 2735 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
| 2736 | number_to_move - 1; |
| 2737 | |
| 2738 | } |
| 2739 | |
| 2740 | if ( num_to_read > YY_READ_BUF_SIZE ) |
| 2741 | num_to_read = YY_READ_BUF_SIZE; |
| 2742 | |
| 2743 | /* Read in more data. */ |
| 2744 | size_t result = 0; |
| 2745 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
| 2746 | result, num_to_read ); |
| 2747 | yyg->yy_n_chars = static_cast<int>(result); |
| 2748 | |
| 2749 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2750 | } |
| 2751 | |
| 2752 | if ( yyg->yy_n_chars == 0 ) |
| 2753 | { |
| 2754 | if ( number_to_move == YY_MORE_ADJ ) |
| 2755 | { |
| 2756 | ret_val = EOB_ACT_END_OF_FILE; |
| 2757 | yyrestart( yyin , yyscanner); |
| 2758 | } |
| 2759 | |
| 2760 | else |
| 2761 | { |
| 2762 | ret_val = EOB_ACT_LAST_MATCH; |
| 2763 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
| 2764 | YY_BUFFER_EOF_PENDING; |
| 2765 | } |
| 2766 | } |
| 2767 | |
| 2768 | else |
| 2769 | ret_val = EOB_ACT_CONTINUE_SCAN; |
| 2770 | |
| 2771 | if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
| 2772 | /* Extend the array by 50%, plus the number we really need. */ |
| 2773 | int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
| 2774 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
| 2775 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
| 2776 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
| 2777 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
| 2778 | /* "- 2" to take care of EOB's */ |
| 2779 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
| 2780 | } |
| 2781 | |
| 2782 | yyg->yy_n_chars += number_to_move; |
| 2783 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
| 2784 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
| 2785 | |
| 2786 | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
| 2787 | |
| 2788 | return ret_val; |
| 2789 | } |
| 2790 | |
| 2791 | |
| 2792 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
| 2793 | |
| 2794 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
| 2795 | { |
| 2796 | yy_state_type yy_current_state; |
| 2797 | char *yy_cp; |
| 2798 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2799 | |
| 2800 | yy_current_state = yyg->yy_start; |
| 2801 | |
| 2802 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
| 2803 | { |
| 2804 | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
| 2805 | if ( yy_accept[yy_current_state] ) |
| 2806 | { |
| 2807 | yyg->yy_last_accepting_state = yy_current_state; |
| 2808 | yyg->yy_last_accepting_cpos = yy_cp; |
| 2809 | } |
| 2810 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2811 | { |
| 2812 | yy_current_state = (int) yy_def[yy_current_state]; |
| 2813 | if ( yy_current_state >= 891 ) |
| 2814 | yy_c = yy_meta[yy_c]; |
| 2815 | } |
| 2816 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
| 2817 | } |
| 2818 | |
| 2819 | return yy_current_state; |
| 2820 | } |
| 2821 | |
| 2822 | |
| 2823 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
| 2824 | * |
| 2825 | * synopsis |
| 2826 | * next_state = yy_try_NUL_trans( current_state ); |
| 2827 | */ |
| 2828 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
| 2829 | { |
| 2830 | int yy_is_jam; |
| 2831 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
| 2832 | char *yy_cp = yyg->yy_c_buf_p; |
| 2833 | |
| 2834 | YY_CHAR yy_c = 1; |
| 2835 | if ( yy_accept[yy_current_state] ) |
| 2836 | { |
| 2837 | yyg->yy_last_accepting_state = yy_current_state; |
| 2838 | yyg->yy_last_accepting_cpos = yy_cp; |
| 2839 | } |
| 2840 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2841 | { |
| 2842 | yy_current_state = (int) yy_def[yy_current_state]; |
| 2843 | if ( yy_current_state >= 891 ) |
| 2844 | yy_c = yy_meta[yy_c]; |
| 2845 | } |
| 2846 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
| 2847 | yy_is_jam = (yy_current_state == 890); |
| 2848 | |
| 2849 | (void)yyg; |
| 2850 | return yy_is_jam ? 0 : yy_current_state; |
| 2851 | } |
| 2852 | |
| 2853 | |
| 2854 | #ifndef YY_NO_UNPUT |
| 2855 | |
| 2856 | #endif |
| 2857 | |
| 2858 | #ifndef YY_NO_INPUT |
| 2859 | #ifdef __cplusplus |
| 2860 | static int yyinput (yyscan_t yyscanner) |
| 2861 | #else |
| 2862 | static int input (yyscan_t yyscanner) |
| 2863 | #endif |
| 2864 | |
| 2865 | { |
| 2866 | int c; |
| 2867 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2868 | |
| 2869 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2870 | |
| 2871 | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
| 2872 | { |
| 2873 | /* yy_c_buf_p now points to the character we want to return. |
| 2874 | * If this occurs *before* the EOB characters, then it's a |
| 2875 | * valid NUL; if not, then we've hit the end of the buffer. |
| 2876 | */ |
| 2877 | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
| 2878 | /* This was really a NUL. */ |
| 2879 | *yyg->yy_c_buf_p = '\0'; |
| 2880 | |
| 2881 | else |
| 2882 | { /* need more input */ |
| 2883 | int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
| 2884 | ++yyg->yy_c_buf_p; |
| 2885 | |
| 2886 | switch ( yy_get_next_buffer( yyscanner ) ) |
| 2887 | { |
| 2888 | case EOB_ACT_LAST_MATCH: |
| 2889 | /* This happens because yy_g_n_b() |
| 2890 | * sees that we've accumulated a |
| 2891 | * token and flags that we need to |
| 2892 | * try matching the token before |
| 2893 | * proceeding. But for input(), |
| 2894 | * there's no matching to consider. |
| 2895 | * So convert the EOB_ACT_LAST_MATCH |
| 2896 | * to EOB_ACT_END_OF_FILE. |
| 2897 | */ |
| 2898 | |
| 2899 | /* Reset buffer status. */ |
| 2900 | yyrestart( yyin , yyscanner); |
| 2901 | |
| 2902 | /*FALLTHROUGH*/ |
| 2903 | |
| 2904 | case EOB_ACT_END_OF_FILE: |
| 2905 | { |
| 2906 | if ( yywrap( yyscanner ) ) |
| 2907 | return 0; |
| 2908 | |
| 2909 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
| 2910 | YY_NEW_FILE; |
| 2911 | #ifdef __cplusplus |
| 2912 | return yyinput(yyscanner); |
| 2913 | #else |
| 2914 | return input(yyscanner); |
| 2915 | #endif |
| 2916 | } |
| 2917 | |
| 2918 | case EOB_ACT_CONTINUE_SCAN: |
| 2919 | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
| 2920 | break; |
| 2921 | } |
| 2922 | } |
| 2923 | } |
| 2924 | |
| 2925 | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
| 2926 | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
| 2927 | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
| 2928 | |
| 2929 | if ( c == '\n' ) |
| 2930 | |
| 2931 | do{ yylineno++; |
| 2932 | yycolumn=0; |
| 2933 | }while(0) |
| 2934 | ; |
| 2935 | |
| 2936 | return c; |
| 2937 | } |
| 2938 | #endif /* ifndef YY_NO_INPUT */ |
| 2939 | |
| 2940 | /** Immediately switch to a different input stream. |
| 2941 | * @param input_file A readable stream. |
| 2942 | * @param yyscanner The scanner object. |
| 2943 | * @note This function does not reset the start condition to @c INITIAL . |
| 2944 | */ |
| 2945 | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
| 2946 | { |
| 2947 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2948 | |
| 2949 | if ( ! YY_CURRENT_BUFFER ){ |
| 2950 | yyensure_buffer_stack (yyscanner); |
| 2951 | YY_CURRENT_BUFFER_LVALUE = |
| 2952 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
| 2953 | } |
| 2954 | |
| 2955 | yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
| 2956 | yy_load_buffer_state( yyscanner ); |
| 2957 | } |
| 2958 | |
| 2959 | |
| 2960 | /** Switch to a different input buffer. |
| 2961 | * @param new_buffer The new input buffer. |
| 2962 | * @param yyscanner The scanner object. |
| 2963 | */ |
| 2964 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 2965 | { |
| 2966 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2967 | |
| 2968 | /* TODO. We should be able to replace this entire function body |
| 2969 | * with |
| 2970 | * yypop_buffer_state(); |
| 2971 | * yypush_buffer_state(new_buffer); |
| 2972 | */ |
| 2973 | yyensure_buffer_stack (yyscanner); |
| 2974 | if ( YY_CURRENT_BUFFER == new_buffer ) |
| 2975 | return; |
| 2976 | |
| 2977 | if ( YY_CURRENT_BUFFER ) |
| 2978 | { |
| 2979 | /* Flush out information for old buffer. */ |
| 2980 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2981 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 2982 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2983 | } |
| 2984 | |
| 2985 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2986 | yy_load_buffer_state( yyscanner ); |
| 2987 | |
| 2988 | /* We don't actually know whether we did this switch during |
| 2989 | * EOF (yywrap()) processing, but the only time this flag |
| 2990 | * is looked at is after yywrap() is called, so it's safe |
| 2991 | * to go ahead and always set it. |
| 2992 | */ |
| 2993 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 2994 | } |
| 2995 | |
| 2996 | |
| 2997 | static void yy_load_buffer_state (yyscan_t yyscanner) |
| 2998 | { |
| 2999 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3000 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 3001 | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
| 3002 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
| 3003 | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
| 3004 | } |
| 3005 | |
| 3006 | /** Allocate and initialize an input buffer state. |
| 3007 | * @param file A readable stream. |
| 3008 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
| 3009 | * @param yyscanner The scanner object. |
| 3010 | * @return the allocated buffer state. |
| 3011 | */ |
| 3012 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
| 3013 | { |
| 3014 | YY_BUFFER_STATE b; |
| 3015 | |
| 3016 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
| 3017 | if ( ! b ) |
| 3018 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
| 3019 | |
| 3020 | b->yy_buf_size = size; |
| 3021 | |
| 3022 | /* yy_ch_buf has to be 2 characters longer than the size given because |
| 3023 | * we need to put in 2 end-of-buffer characters. |
| 3024 | */ |
| 3025 | b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
| 3026 | if ( ! b->yy_ch_buf ) |
| 3027 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
| 3028 | |
| 3029 | b->yy_is_our_buffer = 1; |
| 3030 | |
| 3031 | yy_init_buffer( b, file , yyscanner); |
| 3032 | |
| 3033 | return b; |
| 3034 | } |
| 3035 | |
| 3036 | |
| 3037 | /** Destroy the buffer. |
| 3038 | * @param b a buffer created with yy_create_buffer() |
| 3039 | * @param yyscanner The scanner object. |
| 3040 | */ |
| 3041 | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
| 3042 | { |
| 3043 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3044 | |
| 3045 | if ( ! b ) |
| 3046 | return; |
| 3047 | |
| 3048 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
| 3049 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
| 3050 | |
| 3051 | if ( b->yy_is_our_buffer ) |
| 3052 | yyfree( (void *) b->yy_ch_buf , yyscanner ); |
| 3053 | |
| 3054 | yyfree( (void *) b , yyscanner ); |
| 3055 | } |
| 3056 | |
| 3057 | |
| 3058 | /* Initializes or reinitializes a buffer. |
| 3059 | * This function is sometimes called more than once on the same buffer, |
| 3060 | * such as during a yyrestart() or at EOF. |
| 3061 | */ |
| 3062 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 3063 | |
| 3064 | { |
| 3065 | int oerrno = errno; |
| 3066 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3067 | |
| 3068 | yy_flush_buffer( b , yyscanner); |
| 3069 | |
| 3070 | b->yy_input_file = file; |
| 3071 | b->yy_fill_buffer = 1; |
| 3072 | |
| 3073 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
| 3074 | * called from yyrestart() or through yy_get_next_buffer. |
| 3075 | * In that case, we don't want to reset the lineno or column. |
| 3076 | */ |
| 3077 | if (b != YY_CURRENT_BUFFER){ |
| 3078 | b->yy_bs_lineno = 1; |
| 3079 | b->yy_bs_column = 0; |
| 3080 | } |
| 3081 | |
| 3082 | |
| 3083 | |
| 3084 | b->yy_is_interactive = 0; |
| 3085 | |
| 3086 | |
| 3087 | errno = oerrno; |
| 3088 | } |
| 3089 | |
| 3090 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 3091 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
| 3092 | * @param yyscanner The scanner object. |
| 3093 | */ |
| 3094 | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
| 3095 | { |
| 3096 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3097 | if ( ! b ) |
| 3098 | return; |
| 3099 | |
| 3100 | b->yy_n_chars = 0; |
| 3101 | |
| 3102 | /* We always need two end-of-buffer characters. The first causes |
| 3103 | * a transition to the end-of-buffer state. The second causes |
| 3104 | * a jam in that state. |
| 3105 | */ |
| 3106 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
| 3107 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
| 3108 | |
| 3109 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
| 3110 | |
| 3111 | b->yy_at_bol = 1; |
| 3112 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 3113 | |
| 3114 | if ( b == YY_CURRENT_BUFFER ) |
| 3115 | yy_load_buffer_state( yyscanner ); |
| 3116 | } |
| 3117 | |
| 3118 | /** Pushes the new state onto the stack. The new state becomes |
| 3119 | * the current state. This function will allocate the stack |
| 3120 | * if necessary. |
| 3121 | * @param new_buffer The new state. |
| 3122 | * @param yyscanner The scanner object. |
| 3123 | */ |
| 3124 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 3125 | { |
| 3126 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3127 | if (new_buffer == NULL) |
| 3128 | return; |
| 3129 | |
| 3130 | yyensure_buffer_stack(yyscanner); |
| 3131 | |
| 3132 | /* This block is copied from yy_switch_to_buffer. */ |
| 3133 | if ( YY_CURRENT_BUFFER ) |
| 3134 | { |
| 3135 | /* Flush out information for old buffer. */ |
| 3136 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 3137 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 3138 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 3139 | } |
| 3140 | |
| 3141 | /* Only push if top exists. Otherwise, replace top. */ |
| 3142 | if (YY_CURRENT_BUFFER) |
| 3143 | yyg->yy_buffer_stack_top++; |
| 3144 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 3145 | |
| 3146 | /* copied from yy_switch_to_buffer. */ |
| 3147 | yy_load_buffer_state( yyscanner ); |
| 3148 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 3149 | } |
| 3150 | |
| 3151 | |
| 3152 | /** Removes and deletes the top of the stack, if present. |
| 3153 | * The next element becomes the new top. |
| 3154 | * @param yyscanner The scanner object. |
| 3155 | */ |
| 3156 | void yypop_buffer_state (yyscan_t yyscanner) |
| 3157 | { |
| 3158 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3159 | if (!YY_CURRENT_BUFFER) |
| 3160 | return; |
| 3161 | |
| 3162 | yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
| 3163 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 3164 | if (yyg->yy_buffer_stack_top > 0) |
| 3165 | --yyg->yy_buffer_stack_top; |
| 3166 | |
| 3167 | if (YY_CURRENT_BUFFER) { |
| 3168 | yy_load_buffer_state( yyscanner ); |
| 3169 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 3170 | } |
| 3171 | } |
| 3172 | |
| 3173 | |
| 3174 | /* Allocates the stack if it does not exist. |
| 3175 | * Guarantees space for at least one push. |
| 3176 | */ |
| 3177 | static void yyensure_buffer_stack (yyscan_t yyscanner) |
| 3178 | { |
| 3179 | yy_size_t num_to_alloc; |
| 3180 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3181 | |
| 3182 | if (!yyg->yy_buffer_stack) { |
| 3183 | |
| 3184 | /* First allocation is just for 2 elements, since we don't know if this |
| 3185 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
| 3186 | * immediate realloc on the next call. |
| 3187 | */ |
| 3188 | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
| 3189 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
| 3190 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
| 3191 | , yyscanner); |
| 3192 | if ( ! yyg->yy_buffer_stack ) |
| 3193 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
| 3194 | |
| 3195 | |
| 3196 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
| 3197 | |
| 3198 | yyg->yy_buffer_stack_max = num_to_alloc; |
| 3199 | yyg->yy_buffer_stack_top = 0; |
| 3200 | return; |
| 3201 | } |
| 3202 | |
| 3203 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
| 3204 | |
| 3205 | /* Increase the buffer to prepare for a possible push. */ |
| 3206 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
| 3207 | |
| 3208 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
| 3209 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
| 3210 | (yyg->yy_buffer_stack, |
| 3211 | num_to_alloc * sizeof(struct yy_buffer_state*) |
| 3212 | , yyscanner); |
| 3213 | if ( ! yyg->yy_buffer_stack ) |
| 3214 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
| 3215 | |
| 3216 | /* zero only the new slots.*/ |
| 3217 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
| 3218 | yyg->yy_buffer_stack_max = num_to_alloc; |
| 3219 | } |
| 3220 | } |
| 3221 | |
| 3222 | |
| 3223 | |
| 3224 | |
| 3225 | |
| 3226 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
| 3227 | * @param base the character buffer |
| 3228 | * @param size the size in bytes of the character buffer |
| 3229 | * @param yyscanner The scanner object. |
| 3230 | * @return the newly allocated buffer state object. |
| 3231 | */ |
| 3232 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
| 3233 | { |
| 3234 | YY_BUFFER_STATE b; |
| 3235 | |
| 3236 | if ( size < 2 || |
| 3237 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 3238 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| 3239 | /* They forgot to leave room for the EOB's. */ |
| 3240 | return NULL; |
| 3241 | |
| 3242 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
| 3243 | if ( ! b ) |
| 3244 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
| 3245 | |
| 3246 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
| 3247 | b->yy_buf_pos = b->yy_ch_buf = base; |
| 3248 | b->yy_is_our_buffer = 0; |
| 3249 | b->yy_input_file = NULL; |
| 3250 | b->yy_n_chars = b->yy_buf_size; |
| 3251 | b->yy_is_interactive = 0; |
| 3252 | b->yy_at_bol = 1; |
| 3253 | b->yy_fill_buffer = 0; |
| 3254 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 3255 | |
| 3256 | yy_switch_to_buffer( b , yyscanner ); |
| 3257 | |
| 3258 | return b; |
| 3259 | } |
| 3260 | |
| 3261 | |
| 3262 | |
| 3263 | |
| 3264 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
| 3265 | * scan from a @e copy of @a str. |
| 3266 | * @param yystr a NUL-terminated string to scan |
| 3267 | * @param yyscanner The scanner object. |
| 3268 | * @return the newly allocated buffer state object. |
| 3269 | * @note If you want to scan bytes that may contain NUL values, then use |
| 3270 | * yy_scan_bytes() instead. |
| 3271 | */ |
| 3272 | YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
| 3273 | { |
| 3274 | |
| 3275 | return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
| 3276 | } |
| 3277 | |
| 3278 | |
| 3279 | |
| 3280 | |
| 3281 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
| 3282 | * scan from a @e copy of @a bytes. |
| 3283 | * @param yybytes the byte buffer to scan |
| 3284 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
| 3285 | * @param yyscanner The scanner object. |
| 3286 | * @return the newly allocated buffer state object. |
| 3287 | */ |
| 3288 | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
| 3289 | { |
| 3290 | YY_BUFFER_STATE b; |
| 3291 | char *buf; |
| 3292 | yy_size_t n; |
| 3293 | int i; |
| 3294 | |
| 3295 | /* Get memory for full buffer, including space for trailing EOB's. */ |
| 3296 | n = (yy_size_t) (_yybytes_len + 2); |
| 3297 | buf = (char *) yyalloc( n , yyscanner ); |
| 3298 | if ( ! buf ) |
| 3299 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
| 3300 | |
| 3301 | for ( i = 0; i < _yybytes_len; ++i ) |
| 3302 | buf[i] = yybytes[i]; |
| 3303 | |
| 3304 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
| 3305 | |
| 3306 | b = yy_scan_buffer( buf, n , yyscanner); |
| 3307 | if ( ! b ) |
| 3308 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
| 3309 | |
| 3310 | /* It's okay to grow etc. this buffer, and we should throw it |
| 3311 | * away when we're done. |
| 3312 | */ |
| 3313 | b->yy_is_our_buffer = 1; |
| 3314 | |
| 3315 | return b; |
| 3316 | } |
| 3317 | |
| 3318 | |
| 3319 | |
| 3320 | |
| 3321 | |
| 3322 | |
| 3323 | |
| 3324 | |
| 3325 | |
| 3326 | |
| 3327 | |
| 3328 | #ifndef YY_EXIT_FAILURE |
| 3329 | #define YY_EXIT_FAILURE 2 |
| 3330 | #endif |
| 3331 | |
| 3332 | static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
| 3333 | { |
| 3334 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3335 | (void)yyg; |
| 3336 | fprintf( stderr, "%s\n" , msg ); |
| 3337 | exit( YY_EXIT_FAILURE ); |
| 3338 | } |
| 3339 | |
| 3340 | /* Redefine yyless() so it works in section 3 code. */ |
| 3341 | |
| 3342 | #undef yyless |
| 3343 | #define yyless(n) \ |
| 3344 | do \ |
| 3345 | { \ |
| 3346 | /* Undo effects of setting up yytext. */ \ |
| 3347 | int yyless_macro_arg = (n); \ |
| 3348 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 3349 | yytext[yyleng] = yyg->yy_hold_char; \ |
| 3350 | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
| 3351 | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
| 3352 | *yyg->yy_c_buf_p = '\0'; \ |
| 3353 | yyleng = yyless_macro_arg; \ |
| 3354 | } \ |
| 3355 | while ( 0 ) |
| 3356 | |
| 3357 | |
| 3358 | |
| 3359 | /* Accessor methods (get/set functions) to struct members. */ |
| 3360 | |
| 3361 | |
| 3362 | /** Get the user-defined data for this scanner. |
| 3363 | * @param yyscanner The scanner object. |
| 3364 | */ |
| 3365 | YY_EXTRA_TYPE (yyscan_t yyscanner) |
| 3366 | { |
| 3367 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3368 | return yyextra; |
| 3369 | } |
| 3370 | |
| 3371 | |
| 3372 | |
| 3373 | /** Get the current line number. |
| 3374 | * @param yyscanner The scanner object. |
| 3375 | */ |
| 3376 | int yyget_lineno (yyscan_t yyscanner) |
| 3377 | { |
| 3378 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3379 | |
| 3380 | |
| 3381 | if (! YY_CURRENT_BUFFER) |
| 3382 | return 0; |
| 3383 | |
| 3384 | return yylineno; |
| 3385 | } |
| 3386 | |
| 3387 | |
| 3388 | |
| 3389 | |
| 3390 | /** Get the current column number. |
| 3391 | * @param yyscanner The scanner object. |
| 3392 | */ |
| 3393 | int yyget_column (yyscan_t yyscanner) |
| 3394 | { |
| 3395 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3396 | |
| 3397 | |
| 3398 | if (! YY_CURRENT_BUFFER) |
| 3399 | return 0; |
| 3400 | |
| 3401 | return yycolumn; |
| 3402 | } |
| 3403 | |
| 3404 | |
| 3405 | |
| 3406 | |
| 3407 | /** Get the input stream. |
| 3408 | * @param yyscanner The scanner object. |
| 3409 | */ |
| 3410 | FILE *yyget_in (yyscan_t yyscanner) |
| 3411 | { |
| 3412 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3413 | return yyin; |
| 3414 | } |
| 3415 | |
| 3416 | |
| 3417 | |
| 3418 | /** Get the output stream. |
| 3419 | * @param yyscanner The scanner object. |
| 3420 | */ |
| 3421 | FILE *yyget_out (yyscan_t yyscanner) |
| 3422 | { |
| 3423 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3424 | return yyout; |
| 3425 | } |
| 3426 | |
| 3427 | |
| 3428 | |
| 3429 | /** Get the length of the current token. |
| 3430 | * @param yyscanner The scanner object. |
| 3431 | */ |
| 3432 | int yyget_leng (yyscan_t yyscanner) |
| 3433 | { |
| 3434 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3435 | return yyleng; |
| 3436 | } |
| 3437 | |
| 3438 | |
| 3439 | /** Get the current token. |
| 3440 | * @param yyscanner The scanner object. |
| 3441 | */ |
| 3442 | |
| 3443 | char *yyget_text (yyscan_t yyscanner) |
| 3444 | { |
| 3445 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3446 | return yytext; |
| 3447 | } |
| 3448 | |
| 3449 | |
| 3450 | |
| 3451 | /** Set the user-defined data. This data is never touched by the scanner. |
| 3452 | * @param user_defined The data to be associated with this scanner. |
| 3453 | * @param yyscanner The scanner object. |
| 3454 | */ |
| 3455 | void (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
| 3456 | { |
| 3457 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3458 | yyextra = user_defined ; |
| 3459 | } |
| 3460 | |
| 3461 | |
| 3462 | |
| 3463 | /** Set the current line number. |
| 3464 | * @param _line_number line number |
| 3465 | * @param yyscanner The scanner object. |
| 3466 | */ |
| 3467 | void yyset_lineno (int _line_number , yyscan_t yyscanner) |
| 3468 | { |
| 3469 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3470 | |
| 3471 | |
| 3472 | /* lineno is only valid if an input buffer exists. */ |
| 3473 | if (! YY_CURRENT_BUFFER ) |
| 3474 | YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
| 3475 | |
| 3476 | yylineno = _line_number; |
| 3477 | } |
| 3478 | |
| 3479 | |
| 3480 | |
| 3481 | |
| 3482 | /** Set the current column. |
| 3483 | * @param _column_no column number |
| 3484 | * @param yyscanner The scanner object. |
| 3485 | */ |
| 3486 | void yyset_column (int _column_no , yyscan_t yyscanner) |
| 3487 | { |
| 3488 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3489 | |
| 3490 | |
| 3491 | /* column is only valid if an input buffer exists. */ |
| 3492 | if (! YY_CURRENT_BUFFER ) |
| 3493 | YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
| 3494 | |
| 3495 | yycolumn = _column_no; |
| 3496 | } |
| 3497 | |
| 3498 | |
| 3499 | |
| 3500 | |
| 3501 | |
| 3502 | /** Set the input stream. This does not discard the current |
| 3503 | * input buffer. |
| 3504 | * @param _in_str A readable stream. |
| 3505 | * @param yyscanner The scanner object. |
| 3506 | * @see yy_switch_to_buffer |
| 3507 | */ |
| 3508 | void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
| 3509 | { |
| 3510 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3511 | yyin = _in_str ; |
| 3512 | } |
| 3513 | |
| 3514 | |
| 3515 | |
| 3516 | void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
| 3517 | { |
| 3518 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3519 | yyout = _out_str ; |
| 3520 | } |
| 3521 | |
| 3522 | |
| 3523 | |
| 3524 | |
| 3525 | int yyget_debug (yyscan_t yyscanner) |
| 3526 | { |
| 3527 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3528 | return yy_flex_debug; |
| 3529 | } |
| 3530 | |
| 3531 | |
| 3532 | |
| 3533 | void yyset_debug (int _bdebug , yyscan_t yyscanner) |
| 3534 | { |
| 3535 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3536 | yy_flex_debug = _bdebug ; |
| 3537 | } |
| 3538 | |
| 3539 | |
| 3540 | /* Accessor methods for yylval and yylloc */ |
| 3541 | |
| 3542 | |
| 3543 | YYSTYPE * yyget_lval (yyscan_t yyscanner) |
| 3544 | { |
| 3545 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3546 | return yylval; |
| 3547 | } |
| 3548 | |
| 3549 | |
| 3550 | |
| 3551 | void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
| 3552 | { |
| 3553 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3554 | yylval = yylval_param; |
| 3555 | } |
| 3556 | |
| 3557 | |
| 3558 | |
| 3559 | |
| 3560 | YYLTYPE *yyget_lloc (yyscan_t yyscanner) |
| 3561 | { |
| 3562 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3563 | return yylloc; |
| 3564 | } |
| 3565 | |
| 3566 | |
| 3567 | |
| 3568 | void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
| 3569 | { |
| 3570 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3571 | yylloc = yylloc_param; |
| 3572 | } |
| 3573 | |
| 3574 | |
| 3575 | |
| 3576 | |
| 3577 | |
| 3578 | /* User-visible API */ |
| 3579 | |
| 3580 | /* yylex_init is special because it creates the scanner itself, so it is |
| 3581 | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
| 3582 | * That's why we explicitly handle the declaration, instead of using our macros. |
| 3583 | */ |
| 3584 | int yylex_init(yyscan_t* ptr_yy_globals) |
| 3585 | { |
| 3586 | if (ptr_yy_globals == NULL){ |
| 3587 | errno = EINVAL; |
| 3588 | return 1; |
| 3589 | } |
| 3590 | |
| 3591 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
| 3592 | |
| 3593 | if (*ptr_yy_globals == NULL){ |
| 3594 | errno = ENOMEM; |
| 3595 | return 1; |
| 3596 | } |
| 3597 | |
| 3598 | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
| 3599 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 3600 | |
| 3601 | return yy_init_globals ( *ptr_yy_globals ); |
| 3602 | } |
| 3603 | |
| 3604 | |
| 3605 | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
| 3606 | * convention of taking the scanner as the last argument. Note however, that |
| 3607 | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
| 3608 | * is the reason, too, why this function also must handle its own declaration). |
| 3609 | * The user defined value in the first argument will be available to yyalloc in |
| 3610 | * the yyextra field. |
| 3611 | */ |
| 3612 | int ( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
| 3613 | { |
| 3614 | struct yyguts_t dummy_yyguts; |
| 3615 | |
| 3616 | yyset_extra (yy_user_defined, &dummy_yyguts); |
| 3617 | |
| 3618 | if (ptr_yy_globals == NULL){ |
| 3619 | errno = EINVAL; |
| 3620 | return 1; |
| 3621 | } |
| 3622 | |
| 3623 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
| 3624 | |
| 3625 | if (*ptr_yy_globals == NULL){ |
| 3626 | errno = ENOMEM; |
| 3627 | return 1; |
| 3628 | } |
| 3629 | |
| 3630 | /* By setting to 0xAA, we expose bugs in |
| 3631 | yy_init_globals. Leave at 0x00 for releases. */ |
| 3632 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 3633 | |
| 3634 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
| 3635 | |
| 3636 | return yy_init_globals ( *ptr_yy_globals ); |
| 3637 | } |
| 3638 | |
| 3639 | |
| 3640 | static int yy_init_globals (yyscan_t yyscanner) |
| 3641 | { |
| 3642 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3643 | /* Initialization is the same as for the non-reentrant scanner. |
| 3644 | * This function is called from yylex_destroy(), so don't allocate here. |
| 3645 | */ |
| 3646 | |
| 3647 | |
| 3648 | |
| 3649 | |
| 3650 | yyg->yy_buffer_stack = NULL; |
| 3651 | yyg->yy_buffer_stack_top = 0; |
| 3652 | yyg->yy_buffer_stack_max = 0; |
| 3653 | yyg->yy_c_buf_p = NULL; |
| 3654 | yyg->yy_init = 0; |
| 3655 | yyg->yy_start = 0; |
| 3656 | |
| 3657 | |
| 3658 | yyg->yy_start_stack_ptr = 0; |
| 3659 | yyg->yy_start_stack_depth = 0; |
| 3660 | yyg->yy_start_stack = NULL; |
| 3661 | |
| 3662 | |
| 3663 | |
| 3664 | |
| 3665 | |
| 3666 | |
| 3667 | /* Defined in main.c */ |
| 3668 | #ifdef YY_STDINIT |
| 3669 | yyin = stdin; |
| 3670 | yyout = stdout; |
| 3671 | #else |
| 3672 | yyin = NULL; |
| 3673 | yyout = NULL; |
| 3674 | #endif |
| 3675 | |
| 3676 | /* For future reference: Set errno on error, since we are called by |
| 3677 | * yylex_init() |
| 3678 | */ |
| 3679 | return 0; |
| 3680 | } |
| 3681 | |
| 3682 | |
| 3683 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
| 3684 | int yylex_destroy (yyscan_t yyscanner) |
| 3685 | { |
| 3686 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3687 | |
| 3688 | /* Pop the buffer stack, destroying each element. */ |
| 3689 | while(YY_CURRENT_BUFFER){ |
| 3690 | yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
| 3691 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 3692 | yypop_buffer_state(yyscanner); |
| 3693 | } |
| 3694 | |
| 3695 | /* Destroy the stack itself. */ |
| 3696 | yyfree(yyg->yy_buffer_stack , yyscanner); |
| 3697 | yyg->yy_buffer_stack = NULL; |
| 3698 | |
| 3699 | |
| 3700 | /* Destroy the start condition stack. */ |
| 3701 | yyfree( yyg->yy_start_stack , yyscanner ); |
| 3702 | yyg->yy_start_stack = NULL; |
| 3703 | |
| 3704 | |
| 3705 | |
| 3706 | |
| 3707 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
| 3708 | * yylex() is called, initialization will occur. */ |
| 3709 | yy_init_globals( yyscanner); |
| 3710 | |
| 3711 | /* Destroy the main struct (reentrant only). */ |
| 3712 | yyfree ( yyscanner , yyscanner ); |
| 3713 | yyscanner = NULL; |
| 3714 | return 0; |
| 3715 | } |
| 3716 | |
| 3717 | |
| 3718 | |
| 3719 | /* |
| 3720 | * Internal utility routines. |
| 3721 | */ |
| 3722 | |
| 3723 | |
| 3724 | |
| 3725 | #ifndef yytext_ptr |
| 3726 | static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
| 3727 | { |
| 3728 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3729 | (void)yyg; |
| 3730 | |
| 3731 | int i; |
| 3732 | for ( i = 0; i < n; ++i ) |
| 3733 | s1[i] = s2[i]; |
| 3734 | } |
| 3735 | #endif |
| 3736 | |
| 3737 | |
| 3738 | |
| 3739 | #ifdef YY_NEED_STRLEN |
| 3740 | static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
| 3741 | { |
| 3742 | int n; |
| 3743 | for ( n = 0; s[n]; ++n ) |
| 3744 | ; |
| 3745 | |
| 3746 | return n; |
| 3747 | } |
| 3748 | #endif |
| 3749 | |
| 3750 | |
| 3751 | |
| 3752 | void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
| 3753 | { |
| 3754 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3755 | (void)yyg; |
| 3756 | return malloc(size); |
| 3757 | } |
| 3758 | |
| 3759 | |
| 3760 | |
| 3761 | void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
| 3762 | { |
| 3763 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3764 | (void)yyg; |
| 3765 | |
| 3766 | /* The cast to (char *) in the following accommodates both |
| 3767 | * implementations that use char* generic pointers, and those |
| 3768 | * that use void* generic pointers. It works with the latter |
| 3769 | * because both ANSI C and C++ allow castless assignment from |
| 3770 | * any pointer type to void*, and deal with argument conversions |
| 3771 | * as though doing an assignment. |
| 3772 | */ |
| 3773 | return realloc(ptr, size); |
| 3774 | } |
| 3775 | |
| 3776 | |
| 3777 | |
| 3778 | void yyfree (void * ptr , yyscan_t yyscanner) |
| 3779 | { |
| 3780 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3781 | (void)yyg; |
| 3782 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
| 3783 | } |
| 3784 | |
| 3785 | |
| 3786 | #define YYTABLES_NAME "yytables" |
| 3787 | |
| 3788 | |
| 3789 | |
| 3790 | |
| 3791 | |
| 3792 | |
| 3793 | |
| 3794 | |
| 3795 | yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) { |
| 3796 | angle::pp::Token token; |
| 3797 | yyget_extra(yyscanner)->getPreprocessor().lex(&token); |
| 3798 | yy_size_t len = token.type == angle::pp::Token::LAST ? 0 : token.text.size(); |
| 3799 | if (len < max_size) |
| 3800 | memcpy(buf, token.text.c_str(), len); |
| 3801 | yyset_column(token.location.file, yyscanner); |
| 3802 | yyset_lineno(token.location.line, yyscanner); |
| 3803 | |
| 3804 | if (len >= max_size) |
| 3805 | YY_FATAL_ERROR("Input buffer overflow" ); |
| 3806 | else if (len > 0) |
| 3807 | buf[len++] = ' '; |
| 3808 | return len; |
| 3809 | } |
| 3810 | |
| 3811 | int check_type(yyscan_t yyscanner) { |
| 3812 | struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; |
| 3813 | |
| 3814 | int token = IDENTIFIER; |
| 3815 | // Note that the ImmutableString used here isn't static or pool allocated - but it's fine since yytext is valid for the duration of its use. |
| 3816 | const TSymbol* symbol = yyextra->symbolTable.find(ImmutableString(yytext, yyleng), yyextra->getShaderVersion()); |
| 3817 | if (symbol && symbol->isStruct()) |
| 3818 | { |
| 3819 | token = TYPE_NAME; |
| 3820 | } |
| 3821 | yylval->lex.symbol = symbol; |
| 3822 | return token; |
| 3823 | } |
| 3824 | |
| 3825 | int reserved_word(yyscan_t yyscanner) { |
| 3826 | struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; |
| 3827 | |
| 3828 | yyextra->error(*yylloc, "Illegal use of reserved word" , yytext); |
| 3829 | return 0; |
| 3830 | } |
| 3831 | |
| 3832 | int ES2_reserved_ES3_keyword(TParseContext *context, int token) |
| 3833 | { |
| 3834 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3835 | |
| 3836 | if (context->getShaderVersion() < 300) |
| 3837 | { |
| 3838 | return reserved_word(yyscanner); |
| 3839 | } |
| 3840 | |
| 3841 | return token; |
| 3842 | } |
| 3843 | |
| 3844 | int ES2_keyword_ES3_reserved(TParseContext *context, int token) |
| 3845 | { |
| 3846 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3847 | |
| 3848 | if (context->getShaderVersion() >= 300) |
| 3849 | { |
| 3850 | return reserved_word(yyscanner); |
| 3851 | } |
| 3852 | |
| 3853 | return token; |
| 3854 | } |
| 3855 | |
| 3856 | int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) |
| 3857 | { |
| 3858 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3859 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3860 | |
| 3861 | if (context->getShaderVersion() < 300) |
| 3862 | { |
| 3863 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3864 | return check_type(yyscanner); |
| 3865 | } |
| 3866 | else if (context->getShaderVersion() == 300) |
| 3867 | { |
| 3868 | return reserved_word(yyscanner); |
| 3869 | } |
| 3870 | |
| 3871 | return token; |
| 3872 | } |
| 3873 | |
| 3874 | int ES2_ident_ES3_keyword(TParseContext *context, int token) |
| 3875 | { |
| 3876 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3877 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3878 | |
| 3879 | // not a reserved word in GLSL ES 1.00, so could be used as an identifier/type name |
| 3880 | if (context->getShaderVersion() < 300) |
| 3881 | { |
| 3882 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3883 | return check_type(yyscanner); |
| 3884 | } |
| 3885 | |
| 3886 | return token; |
| 3887 | } |
| 3888 | |
| 3889 | int ES2_ident_ES3_keyword_multiview_keyword(TParseContext *context, int token) |
| 3890 | { |
| 3891 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3892 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3893 | |
| 3894 | // not a reserved word in GLSL ES 1.00, so could be used as an identifier/type name |
| 3895 | // except when multiview extension is enabled |
| 3896 | if (context->getShaderVersion() < 300 && !context->isExtensionEnabled(TExtension::OVR_multiview2)) |
| 3897 | { |
| 3898 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3899 | return check_type(yyscanner); |
| 3900 | } |
| 3901 | |
| 3902 | return token; |
| 3903 | } |
| 3904 | |
| 3905 | int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) |
| 3906 | { |
| 3907 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3908 | |
| 3909 | if (context->getShaderVersion() < 310) |
| 3910 | { |
| 3911 | return reserved_word(yyscanner); |
| 3912 | } |
| 3913 | |
| 3914 | return token; |
| 3915 | } |
| 3916 | |
| 3917 | int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token) |
| 3918 | { |
| 3919 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3920 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3921 | |
| 3922 | // not a reserved word in GLSL ES 1.00 and GLSL ES 3.00, so could be used as an identifier/type name |
| 3923 | if (context->getShaderVersion() < 310) |
| 3924 | { |
| 3925 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3926 | return check_type(yyscanner); |
| 3927 | } |
| 3928 | |
| 3929 | return token; |
| 3930 | } |
| 3931 | |
| 3932 | int ES3_extension_keyword_else_ident(TParseContext *context, TExtension extension, int token) |
| 3933 | { |
| 3934 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3935 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3936 | |
| 3937 | // a reserved word in GLSL ES 3.00 with enabled extension, otherwise could be used as an identifier/type name |
| 3938 | if (context->getShaderVersion() >= 300 && context->isExtensionEnabled(extension)) |
| 3939 | { |
| 3940 | return token; |
| 3941 | } |
| 3942 | |
| 3943 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3944 | return check_type(yyscanner); |
| 3945 | } |
| 3946 | |
| 3947 | int ES2_ident_ES3_reserved_ES3_1_extension_keyword(TParseContext *context, TExtension extension, int token) |
| 3948 | { |
| 3949 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3950 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3951 | |
| 3952 | // a keyword in GLSL ES 3.10 with enabled extension |
| 3953 | if (context->getShaderVersion() >= 310 && context->isExtensionEnabled(extension)) |
| 3954 | { |
| 3955 | return token; |
| 3956 | } |
| 3957 | // a reserved word in GLSL ES 3.00+ |
| 3958 | if (context->getShaderVersion() >= 300) |
| 3959 | { |
| 3960 | return reserved_word(yyscanner); |
| 3961 | } |
| 3962 | |
| 3963 | // Otherwise can be used as an identifier/type name |
| 3964 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3965 | return check_type(yyscanner); |
| 3966 | } |
| 3967 | |
| 3968 | int ES3_extension_and_ES3_1_keyword_ES3_reserved_else_ident(TParseContext *context, TExtension extension, int token) |
| 3969 | { |
| 3970 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3971 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 3972 | |
| 3973 | // A keyword in GLSL ES 3.00 with enabled extension or in GLSL ES 3.10 |
| 3974 | if (context->getShaderVersion() >= 310 || (context->getShaderVersion() == 300 && context->isExtensionEnabled(extension))) |
| 3975 | { |
| 3976 | return token; |
| 3977 | } |
| 3978 | |
| 3979 | if(context->getShaderVersion() == 300) |
| 3980 | { |
| 3981 | return reserved_word(yyscanner); |
| 3982 | } |
| 3983 | |
| 3984 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 3985 | return check_type(yyscanner); |
| 3986 | } |
| 3987 | |
| 3988 | int uint_constant(TParseContext *context) |
| 3989 | { |
| 3990 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 3991 | |
| 3992 | if (context->getShaderVersion() < 300) |
| 3993 | { |
| 3994 | context->error(*yylloc, "Unsigned integers are unsupported prior to GLSL ES 3.00" , yytext); |
| 3995 | return 0; |
| 3996 | } |
| 3997 | |
| 3998 | if (!atoi_clamp(yytext, &(yylval->lex.u))) |
| 3999 | yyextra->error(*yylloc, "Integer overflow" , yytext); |
| 4000 | |
| 4001 | return UINTCONSTANT; |
| 4002 | } |
| 4003 | |
| 4004 | int floatsuffix_check(TParseContext* context) |
| 4005 | { |
| 4006 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 4007 | |
| 4008 | if (context->getShaderVersion() < 300) |
| 4009 | { |
| 4010 | context->error(*yylloc, "Floating-point suffix unsupported prior to GLSL ES 3.00" , yytext); |
| 4011 | return 0; |
| 4012 | } |
| 4013 | |
| 4014 | std::string text = yytext; |
| 4015 | text.resize(text.size() - 1); |
| 4016 | if (!strtof_clamp(text, &(yylval->lex.f))) |
| 4017 | yyextra->warning(*yylloc, "Float overflow" , yytext); |
| 4018 | |
| 4019 | return(FLOATCONSTANT); |
| 4020 | } |
| 4021 | |
| 4022 | void yyerror(YYLTYPE* lloc, TParseContext* context, void *scanner, const char* reason) { |
| 4023 | context->error(*lloc, reason, yyget_text(scanner)); |
| 4024 | } |
| 4025 | |
| 4026 | int int_constant(TParseContext *context) { |
| 4027 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 4028 | |
| 4029 | unsigned int u; |
| 4030 | if (!atoi_clamp(yytext, &u)) |
| 4031 | { |
| 4032 | if (context->getShaderVersion() >= 300) |
| 4033 | yyextra->error(*yylloc, "Integer overflow" , yytext); |
| 4034 | else |
| 4035 | yyextra->warning(*yylloc, "Integer overflow" , yytext); |
| 4036 | } |
| 4037 | yylval->lex.i = static_cast<int>(u); |
| 4038 | return INTCONSTANT; |
| 4039 | } |
| 4040 | |
| 4041 | int float_constant(yyscan_t yyscanner) { |
| 4042 | struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; |
| 4043 | |
| 4044 | if (!strtof_clamp(yytext, &(yylval->lex.f))) |
| 4045 | yyextra->warning(*yylloc, "Float overflow" , yytext); |
| 4046 | return FLOATCONSTANT; |
| 4047 | } |
| 4048 | |
| 4049 | int yuvcscstandardext_constant(TParseContext *context) |
| 4050 | { |
| 4051 | struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); |
| 4052 | yyscan_t yyscanner = (yyscan_t) context->getScanner(); |
| 4053 | |
| 4054 | // a reserved word in GLSL ES 3.00 with enabled extension, otherwise could be used as an identifier/type name |
| 4055 | if (context->getShaderVersion() >= 300 && context->isExtensionEnabled(TExtension::EXT_YUV_target)) |
| 4056 | { |
| 4057 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 4058 | return YUVCSCSTANDARDEXTCONSTANT; |
| 4059 | } |
| 4060 | |
| 4061 | yylval->lex.string = AllocatePoolCharArray(yytext, yyleng); |
| 4062 | return check_type(yyscanner); |
| 4063 | } |
| 4064 | |
| 4065 | int glslang_initialize(TParseContext* context) { |
| 4066 | yyscan_t scanner = NULL; |
| 4067 | if (yylex_init_extra(context, &scanner)) |
| 4068 | return 1; |
| 4069 | |
| 4070 | context->setScanner(scanner); |
| 4071 | return 0; |
| 4072 | } |
| 4073 | |
| 4074 | int glslang_finalize(TParseContext* context) { |
| 4075 | yyscan_t scanner = context->getScanner(); |
| 4076 | if (scanner == NULL) return 0; |
| 4077 | |
| 4078 | context->setScanner(NULL); |
| 4079 | yylex_destroy(scanner); |
| 4080 | |
| 4081 | return 0; |
| 4082 | } |
| 4083 | |
| 4084 | int glslang_scan(size_t count, const char* const string[], const int length[], |
| 4085 | TParseContext* context) { |
| 4086 | yyrestart(NULL, context->getScanner()); |
| 4087 | yyset_column(0, context->getScanner()); |
| 4088 | yyset_lineno(1, context->getScanner()); |
| 4089 | |
| 4090 | // Initialize preprocessor. |
| 4091 | angle::pp::Preprocessor *preprocessor = &context->getPreprocessor(); |
| 4092 | |
| 4093 | if (!preprocessor->init(count, string, length)) |
| 4094 | return 1; |
| 4095 | |
| 4096 | // Define extension macros. |
| 4097 | const TExtensionBehavior& extBehavior = context->extensionBehavior(); |
| 4098 | for (TExtensionBehavior::const_iterator iter = extBehavior.begin(); |
| 4099 | iter != extBehavior.end(); ++iter) { |
| 4100 | preprocessor->predefineMacro(GetExtensionNameString(iter->first), 1); |
| 4101 | } |
| 4102 | if (context->getFragmentPrecisionHigh()) |
| 4103 | preprocessor->predefineMacro("GL_FRAGMENT_PRECISION_HIGH" , 1); |
| 4104 | |
| 4105 | preprocessor->setMaxTokenSize(sh::GetGlobalMaxTokenSize(context->getShaderSpec())); |
| 4106 | |
| 4107 | return 0; |
| 4108 | } |
| 4109 | |
| 4110 | |
| 4111 | |