Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | #line 17 "./glslang.l" |
michael@0 | 2 | // |
michael@0 | 3 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 4 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | // found in the LICENSE file. |
michael@0 | 6 | // |
michael@0 | 7 | |
michael@0 | 8 | // This file is auto-generated by generate_parser.sh. DO NOT EDIT! |
michael@0 | 9 | |
michael@0 | 10 | // Ignore errors in auto-generated code. |
michael@0 | 11 | #if defined(__GNUC__) |
michael@0 | 12 | #pragma GCC diagnostic ignored "-Wunused-function" |
michael@0 | 13 | #pragma GCC diagnostic ignored "-Wunused-variable" |
michael@0 | 14 | #pragma GCC diagnostic ignored "-Wswitch-enum" |
michael@0 | 15 | #elif defined(_MSC_VER) |
michael@0 | 16 | #pragma warning(disable: 4065) |
michael@0 | 17 | #pragma warning(disable: 4189) |
michael@0 | 18 | #pragma warning(disable: 4505) |
michael@0 | 19 | #pragma warning(disable: 4701) |
michael@0 | 20 | #endif |
michael@0 | 21 | |
michael@0 | 22 | |
michael@0 | 23 | |
michael@0 | 24 | #line 25 "./glslang_lex.cpp" |
michael@0 | 25 | |
michael@0 | 26 | #define YY_INT_ALIGNED short int |
michael@0 | 27 | |
michael@0 | 28 | /* A lexical scanner generated by flex */ |
michael@0 | 29 | |
michael@0 | 30 | #define FLEX_SCANNER |
michael@0 | 31 | #define YY_FLEX_MAJOR_VERSION 2 |
michael@0 | 32 | #define YY_FLEX_MINOR_VERSION 5 |
michael@0 | 33 | #define YY_FLEX_SUBMINOR_VERSION 35 |
michael@0 | 34 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
michael@0 | 35 | #define FLEX_BETA |
michael@0 | 36 | #endif |
michael@0 | 37 | |
michael@0 | 38 | /* First, we deal with platform-specific or compiler-specific issues. */ |
michael@0 | 39 | |
michael@0 | 40 | /* begin standard C headers. */ |
michael@0 | 41 | #include <stdio.h> |
michael@0 | 42 | #include <string.h> |
michael@0 | 43 | #include <errno.h> |
michael@0 | 44 | #include <stdlib.h> |
michael@0 | 45 | |
michael@0 | 46 | /* end standard C headers. */ |
michael@0 | 47 | |
michael@0 | 48 | /* flex integer type definitions */ |
michael@0 | 49 | |
michael@0 | 50 | #ifndef FLEXINT_H |
michael@0 | 51 | #define FLEXINT_H |
michael@0 | 52 | |
michael@0 | 53 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
michael@0 | 54 | |
michael@0 | 55 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
michael@0 | 56 | |
michael@0 | 57 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
michael@0 | 58 | * if you want the limit (max/min) macros for int types. |
michael@0 | 59 | */ |
michael@0 | 60 | #ifndef __STDC_LIMIT_MACROS |
michael@0 | 61 | #define __STDC_LIMIT_MACROS 1 |
michael@0 | 62 | #endif |
michael@0 | 63 | |
michael@0 | 64 | #include <inttypes.h> |
michael@0 | 65 | typedef int8_t flex_int8_t; |
michael@0 | 66 | typedef uint8_t flex_uint8_t; |
michael@0 | 67 | typedef int16_t flex_int16_t; |
michael@0 | 68 | typedef uint16_t flex_uint16_t; |
michael@0 | 69 | typedef int32_t flex_int32_t; |
michael@0 | 70 | typedef uint32_t flex_uint32_t; |
michael@0 | 71 | typedef uint64_t flex_uint64_t; |
michael@0 | 72 | #else |
michael@0 | 73 | typedef signed char flex_int8_t; |
michael@0 | 74 | typedef short int flex_int16_t; |
michael@0 | 75 | typedef int flex_int32_t; |
michael@0 | 76 | typedef unsigned char flex_uint8_t; |
michael@0 | 77 | typedef unsigned short int flex_uint16_t; |
michael@0 | 78 | typedef unsigned int flex_uint32_t; |
michael@0 | 79 | #endif /* ! C99 */ |
michael@0 | 80 | |
michael@0 | 81 | /* Limits of integral types. */ |
michael@0 | 82 | #ifndef INT8_MIN |
michael@0 | 83 | #define INT8_MIN (-128) |
michael@0 | 84 | #endif |
michael@0 | 85 | #ifndef INT16_MIN |
michael@0 | 86 | #define INT16_MIN (-32767-1) |
michael@0 | 87 | #endif |
michael@0 | 88 | #ifndef INT32_MIN |
michael@0 | 89 | #define INT32_MIN (-2147483647-1) |
michael@0 | 90 | #endif |
michael@0 | 91 | #ifndef INT8_MAX |
michael@0 | 92 | #define INT8_MAX (127) |
michael@0 | 93 | #endif |
michael@0 | 94 | #ifndef INT16_MAX |
michael@0 | 95 | #define INT16_MAX (32767) |
michael@0 | 96 | #endif |
michael@0 | 97 | #ifndef INT32_MAX |
michael@0 | 98 | #define INT32_MAX (2147483647) |
michael@0 | 99 | #endif |
michael@0 | 100 | #ifndef UINT8_MAX |
michael@0 | 101 | #define UINT8_MAX (255U) |
michael@0 | 102 | #endif |
michael@0 | 103 | #ifndef UINT16_MAX |
michael@0 | 104 | #define UINT16_MAX (65535U) |
michael@0 | 105 | #endif |
michael@0 | 106 | #ifndef UINT32_MAX |
michael@0 | 107 | #define UINT32_MAX (4294967295U) |
michael@0 | 108 | #endif |
michael@0 | 109 | |
michael@0 | 110 | #endif /* ! FLEXINT_H */ |
michael@0 | 111 | |
michael@0 | 112 | #ifdef __cplusplus |
michael@0 | 113 | |
michael@0 | 114 | /* The "const" storage-class-modifier is valid. */ |
michael@0 | 115 | #define YY_USE_CONST |
michael@0 | 116 | |
michael@0 | 117 | #else /* ! __cplusplus */ |
michael@0 | 118 | |
michael@0 | 119 | /* C99 requires __STDC__ to be defined as 1. */ |
michael@0 | 120 | #if defined (__STDC__) |
michael@0 | 121 | |
michael@0 | 122 | #define YY_USE_CONST |
michael@0 | 123 | |
michael@0 | 124 | #endif /* defined (__STDC__) */ |
michael@0 | 125 | #endif /* ! __cplusplus */ |
michael@0 | 126 | |
michael@0 | 127 | #ifdef YY_USE_CONST |
michael@0 | 128 | #define yyconst const |
michael@0 | 129 | #else |
michael@0 | 130 | #define yyconst |
michael@0 | 131 | #endif |
michael@0 | 132 | |
michael@0 | 133 | /* Returned upon end-of-file. */ |
michael@0 | 134 | #define YY_NULL 0 |
michael@0 | 135 | |
michael@0 | 136 | /* Promotes a possibly negative, possibly signed char to an unsigned |
michael@0 | 137 | * integer for use as an array index. If the signed char is negative, |
michael@0 | 138 | * we want to instead treat it as an 8-bit unsigned char, hence the |
michael@0 | 139 | * double cast. |
michael@0 | 140 | */ |
michael@0 | 141 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
michael@0 | 142 | |
michael@0 | 143 | /* An opaque pointer. */ |
michael@0 | 144 | #ifndef YY_TYPEDEF_YY_SCANNER_T |
michael@0 | 145 | #define YY_TYPEDEF_YY_SCANNER_T |
michael@0 | 146 | typedef void* yyscan_t; |
michael@0 | 147 | #endif |
michael@0 | 148 | |
michael@0 | 149 | /* For convenience, these vars (plus the bison vars far below) |
michael@0 | 150 | are macros in the reentrant scanner. */ |
michael@0 | 151 | #define yyin yyg->yyin_r |
michael@0 | 152 | #define yyout yyg->yyout_r |
michael@0 | 153 | #define yyextra yyg->yyextra_r |
michael@0 | 154 | #define yyleng yyg->yyleng_r |
michael@0 | 155 | #define yytext yyg->yytext_r |
michael@0 | 156 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
michael@0 | 157 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
michael@0 | 158 | #define yy_flex_debug yyg->yy_flex_debug_r |
michael@0 | 159 | |
michael@0 | 160 | /* Enter a start condition. This macro really ought to take a parameter, |
michael@0 | 161 | * but we do it the disgusting crufty way forced on us by the ()-less |
michael@0 | 162 | * definition of BEGIN. |
michael@0 | 163 | */ |
michael@0 | 164 | #define BEGIN yyg->yy_start = 1 + 2 * |
michael@0 | 165 | |
michael@0 | 166 | /* Translate the current start state into a value that can be later handed |
michael@0 | 167 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
michael@0 | 168 | * compatibility. |
michael@0 | 169 | */ |
michael@0 | 170 | #define YY_START ((yyg->yy_start - 1) / 2) |
michael@0 | 171 | #define YYSTATE YY_START |
michael@0 | 172 | |
michael@0 | 173 | /* Action number for EOF rule of a given start state. */ |
michael@0 | 174 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
michael@0 | 175 | |
michael@0 | 176 | /* Special action meaning "start processing a new file". */ |
michael@0 | 177 | #define YY_NEW_FILE yyrestart(yyin ,yyscanner ) |
michael@0 | 178 | |
michael@0 | 179 | #define YY_END_OF_BUFFER_CHAR 0 |
michael@0 | 180 | |
michael@0 | 181 | /* Size of default input buffer. */ |
michael@0 | 182 | #ifndef YY_BUF_SIZE |
michael@0 | 183 | #define YY_BUF_SIZE 16384 |
michael@0 | 184 | #endif |
michael@0 | 185 | |
michael@0 | 186 | /* The state buf must be large enough to hold one state per character in the main buffer. |
michael@0 | 187 | */ |
michael@0 | 188 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
michael@0 | 189 | |
michael@0 | 190 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
michael@0 | 191 | #define YY_TYPEDEF_YY_BUFFER_STATE |
michael@0 | 192 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
michael@0 | 193 | #endif |
michael@0 | 194 | |
michael@0 | 195 | #ifndef YY_TYPEDEF_YY_SIZE_T |
michael@0 | 196 | #define YY_TYPEDEF_YY_SIZE_T |
michael@0 | 197 | typedef size_t yy_size_t; |
michael@0 | 198 | #endif |
michael@0 | 199 | |
michael@0 | 200 | #define EOB_ACT_CONTINUE_SCAN 0 |
michael@0 | 201 | #define EOB_ACT_END_OF_FILE 1 |
michael@0 | 202 | #define EOB_ACT_LAST_MATCH 2 |
michael@0 | 203 | |
michael@0 | 204 | /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
michael@0 | 205 | * access to the local variable yy_act. Since yyless() is a macro, it would break |
michael@0 | 206 | * existing scanners that call yyless() from OUTSIDE yylex. |
michael@0 | 207 | * One obvious solution it to make yy_act a global. I tried that, and saw |
michael@0 | 208 | * a 5% performance hit in a non-yylineno scanner, because yy_act is |
michael@0 | 209 | * normally declared as a register variable-- so it is not worth it. |
michael@0 | 210 | */ |
michael@0 | 211 | #define YY_LESS_LINENO(n) \ |
michael@0 | 212 | do { \ |
michael@0 | 213 | yy_size_t yyl;\ |
michael@0 | 214 | for ( yyl = n; yyl < yyleng; ++yyl )\ |
michael@0 | 215 | if ( yytext[yyl] == '\n' )\ |
michael@0 | 216 | --yylineno;\ |
michael@0 | 217 | }while(0) |
michael@0 | 218 | |
michael@0 | 219 | /* Return all but the first "n" matched characters back to the input stream. */ |
michael@0 | 220 | #define yyless(n) \ |
michael@0 | 221 | do \ |
michael@0 | 222 | { \ |
michael@0 | 223 | /* Undo effects of setting up yytext. */ \ |
michael@0 | 224 | int yyless_macro_arg = (n); \ |
michael@0 | 225 | YY_LESS_LINENO(yyless_macro_arg);\ |
michael@0 | 226 | *yy_cp = yyg->yy_hold_char; \ |
michael@0 | 227 | YY_RESTORE_YY_MORE_OFFSET \ |
michael@0 | 228 | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
michael@0 | 229 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
michael@0 | 230 | } \ |
michael@0 | 231 | while ( 0 ) |
michael@0 | 232 | |
michael@0 | 233 | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
michael@0 | 234 | |
michael@0 | 235 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
michael@0 | 236 | #define YY_STRUCT_YY_BUFFER_STATE |
michael@0 | 237 | struct yy_buffer_state |
michael@0 | 238 | { |
michael@0 | 239 | FILE *yy_input_file; |
michael@0 | 240 | |
michael@0 | 241 | char *yy_ch_buf; /* input buffer */ |
michael@0 | 242 | char *yy_buf_pos; /* current position in input buffer */ |
michael@0 | 243 | |
michael@0 | 244 | /* Size of input buffer in bytes, not including room for EOB |
michael@0 | 245 | * characters. |
michael@0 | 246 | */ |
michael@0 | 247 | yy_size_t yy_buf_size; |
michael@0 | 248 | |
michael@0 | 249 | /* Number of characters read into yy_ch_buf, not including EOB |
michael@0 | 250 | * characters. |
michael@0 | 251 | */ |
michael@0 | 252 | yy_size_t yy_n_chars; |
michael@0 | 253 | |
michael@0 | 254 | /* Whether we "own" the buffer - i.e., we know we created it, |
michael@0 | 255 | * and can realloc() it to grow it, and should free() it to |
michael@0 | 256 | * delete it. |
michael@0 | 257 | */ |
michael@0 | 258 | int yy_is_our_buffer; |
michael@0 | 259 | |
michael@0 | 260 | /* Whether this is an "interactive" input source; if so, and |
michael@0 | 261 | * if we're using stdio for input, then we want to use getc() |
michael@0 | 262 | * instead of fread(), to make sure we stop fetching input after |
michael@0 | 263 | * each newline. |
michael@0 | 264 | */ |
michael@0 | 265 | int yy_is_interactive; |
michael@0 | 266 | |
michael@0 | 267 | /* Whether we're considered to be at the beginning of a line. |
michael@0 | 268 | * If so, '^' rules will be active on the next match, otherwise |
michael@0 | 269 | * not. |
michael@0 | 270 | */ |
michael@0 | 271 | int yy_at_bol; |
michael@0 | 272 | |
michael@0 | 273 | int yy_bs_lineno; /**< The line count. */ |
michael@0 | 274 | int yy_bs_column; /**< The column count. */ |
michael@0 | 275 | |
michael@0 | 276 | /* Whether to try to fill the input buffer when we reach the |
michael@0 | 277 | * end of it. |
michael@0 | 278 | */ |
michael@0 | 279 | int yy_fill_buffer; |
michael@0 | 280 | |
michael@0 | 281 | int yy_buffer_status; |
michael@0 | 282 | |
michael@0 | 283 | #define YY_BUFFER_NEW 0 |
michael@0 | 284 | #define YY_BUFFER_NORMAL 1 |
michael@0 | 285 | /* When an EOF's been seen but there's still some text to process |
michael@0 | 286 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
michael@0 | 287 | * shouldn't try reading from the input source any more. We might |
michael@0 | 288 | * still have a bunch of tokens to match, though, because of |
michael@0 | 289 | * possible backing-up. |
michael@0 | 290 | * |
michael@0 | 291 | * When we actually see the EOF, we change the status to "new" |
michael@0 | 292 | * (via yyrestart()), so that the user can continue scanning by |
michael@0 | 293 | * just pointing yyin at a new input file. |
michael@0 | 294 | */ |
michael@0 | 295 | #define YY_BUFFER_EOF_PENDING 2 |
michael@0 | 296 | |
michael@0 | 297 | }; |
michael@0 | 298 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
michael@0 | 299 | |
michael@0 | 300 | /* We provide macros for accessing buffer states in case in the |
michael@0 | 301 | * future we want to put the buffer states in a more general |
michael@0 | 302 | * "scanner state". |
michael@0 | 303 | * |
michael@0 | 304 | * Returns the top of the stack, or NULL. |
michael@0 | 305 | */ |
michael@0 | 306 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
michael@0 | 307 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
michael@0 | 308 | : NULL) |
michael@0 | 309 | |
michael@0 | 310 | /* Same as previous macro, but useful when we know that the buffer stack is not |
michael@0 | 311 | * NULL or when we need an lvalue. For internal use only. |
michael@0 | 312 | */ |
michael@0 | 313 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
michael@0 | 314 | |
michael@0 | 315 | void yyrestart (FILE *input_file ,yyscan_t yyscanner ); |
michael@0 | 316 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
michael@0 | 317 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); |
michael@0 | 318 | void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
michael@0 | 319 | void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
michael@0 | 320 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
michael@0 | 321 | void yypop_buffer_state (yyscan_t yyscanner ); |
michael@0 | 322 | |
michael@0 | 323 | static void yyensure_buffer_stack (yyscan_t yyscanner ); |
michael@0 | 324 | static void yy_load_buffer_state (yyscan_t yyscanner ); |
michael@0 | 325 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); |
michael@0 | 326 | |
michael@0 | 327 | #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) |
michael@0 | 328 | |
michael@0 | 329 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); |
michael@0 | 330 | YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); |
michael@0 | 331 | YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); |
michael@0 | 332 | |
michael@0 | 333 | void *yyalloc (yy_size_t ,yyscan_t yyscanner ); |
michael@0 | 334 | void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); |
michael@0 | 335 | void yyfree (void * ,yyscan_t yyscanner ); |
michael@0 | 336 | |
michael@0 | 337 | #define yy_new_buffer yy_create_buffer |
michael@0 | 338 | |
michael@0 | 339 | #define yy_set_interactive(is_interactive) \ |
michael@0 | 340 | { \ |
michael@0 | 341 | if ( ! YY_CURRENT_BUFFER ){ \ |
michael@0 | 342 | yyensure_buffer_stack (yyscanner); \ |
michael@0 | 343 | YY_CURRENT_BUFFER_LVALUE = \ |
michael@0 | 344 | yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
michael@0 | 345 | } \ |
michael@0 | 346 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
michael@0 | 347 | } |
michael@0 | 348 | |
michael@0 | 349 | #define yy_set_bol(at_bol) \ |
michael@0 | 350 | { \ |
michael@0 | 351 | if ( ! YY_CURRENT_BUFFER ){\ |
michael@0 | 352 | yyensure_buffer_stack (yyscanner); \ |
michael@0 | 353 | YY_CURRENT_BUFFER_LVALUE = \ |
michael@0 | 354 | yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
michael@0 | 355 | } \ |
michael@0 | 356 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
michael@0 | 357 | } |
michael@0 | 358 | |
michael@0 | 359 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
michael@0 | 360 | |
michael@0 | 361 | /* Begin user sect3 */ |
michael@0 | 362 | |
michael@0 | 363 | #define yywrap(n) 1 |
michael@0 | 364 | #define YY_SKIP_YYWRAP |
michael@0 | 365 | |
michael@0 | 366 | typedef unsigned char YY_CHAR; |
michael@0 | 367 | |
michael@0 | 368 | typedef int yy_state_type; |
michael@0 | 369 | |
michael@0 | 370 | #define yytext_ptr yytext_r |
michael@0 | 371 | |
michael@0 | 372 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); |
michael@0 | 373 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); |
michael@0 | 374 | static int yy_get_next_buffer (yyscan_t yyscanner ); |
michael@0 | 375 | static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); |
michael@0 | 376 | |
michael@0 | 377 | /* Done after the current pattern has been matched and before the |
michael@0 | 378 | * corresponding action - sets up yytext. |
michael@0 | 379 | */ |
michael@0 | 380 | #define YY_DO_BEFORE_ACTION \ |
michael@0 | 381 | yyg->yytext_ptr = yy_bp; \ |
michael@0 | 382 | yyleng = (yy_size_t) (yy_cp - yy_bp); \ |
michael@0 | 383 | yyg->yy_hold_char = *yy_cp; \ |
michael@0 | 384 | *yy_cp = '\0'; \ |
michael@0 | 385 | yyg->yy_c_buf_p = yy_cp; |
michael@0 | 386 | |
michael@0 | 387 | #define YY_NUM_RULES 147 |
michael@0 | 388 | #define YY_END_OF_BUFFER 148 |
michael@0 | 389 | /* This struct is not used in this scanner, |
michael@0 | 390 | but its presence is necessary. */ |
michael@0 | 391 | struct yy_trans_info |
michael@0 | 392 | { |
michael@0 | 393 | flex_int32_t yy_verify; |
michael@0 | 394 | flex_int32_t yy_nxt; |
michael@0 | 395 | }; |
michael@0 | 396 | static yyconst flex_int16_t yy_accept[443] = |
michael@0 | 397 | { 0, |
michael@0 | 398 | 0, 0, 148, 146, 145, 145, 132, 138, 143, 127, |
michael@0 | 399 | 128, 136, 135, 124, 133, 131, 137, 96, 96, 125, |
michael@0 | 400 | 121, 139, 126, 140, 144, 93, 129, 130, 142, 93, |
michael@0 | 401 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 402 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 122, |
michael@0 | 403 | 141, 123, 134, 118, 104, 123, 112, 107, 102, 110, |
michael@0 | 404 | 100, 111, 101, 99, 103, 98, 95, 96, 0, 0, |
michael@0 | 405 | 130, 122, 129, 119, 115, 117, 116, 120, 93, 108, |
michael@0 | 406 | 114, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 407 | 93, 12, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 408 | |
michael@0 | 409 | 93, 93, 93, 93, 93, 15, 17, 93, 93, 93, |
michael@0 | 410 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 411 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 412 | 93, 93, 93, 93, 109, 113, 0, 98, 0, 0, |
michael@0 | 413 | 97, 94, 105, 106, 45, 93, 93, 93, 93, 93, |
michael@0 | 414 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 415 | 93, 93, 93, 13, 93, 93, 93, 93, 93, 93, |
michael@0 | 416 | 93, 93, 21, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 417 | 93, 18, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 418 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 419 | |
michael@0 | 420 | 93, 93, 93, 93, 93, 0, 99, 0, 98, 93, |
michael@0 | 421 | 23, 93, 93, 90, 93, 93, 93, 93, 93, 93, |
michael@0 | 422 | 93, 16, 48, 93, 93, 93, 64, 93, 93, 53, |
michael@0 | 423 | 68, 93, 93, 93, 93, 93, 93, 93, 93, 65, |
michael@0 | 424 | 4, 28, 29, 30, 93, 93, 93, 93, 93, 93, |
michael@0 | 425 | 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 426 | 51, 24, 93, 93, 93, 93, 93, 93, 31, 32, |
michael@0 | 427 | 33, 22, 93, 93, 93, 10, 37, 38, 39, 46, |
michael@0 | 428 | 7, 93, 93, 93, 93, 77, 78, 79, 93, 25, |
michael@0 | 429 | 69, 20, 80, 81, 82, 2, 74, 75, 76, 93, |
michael@0 | 430 | |
michael@0 | 431 | 19, 72, 93, 93, 34, 35, 36, 93, 93, 93, |
michael@0 | 432 | 93, 93, 93, 93, 93, 93, 66, 93, 93, 93, |
michael@0 | 433 | 93, 93, 93, 93, 93, 47, 93, 92, 93, 93, |
michael@0 | 434 | 14, 93, 93, 93, 93, 67, 61, 56, 93, 93, |
michael@0 | 435 | 93, 93, 93, 73, 52, 93, 59, 27, 93, 89, |
michael@0 | 436 | 60, 44, 71, 54, 93, 93, 93, 93, 93, 93, |
michael@0 | 437 | 93, 93, 55, 26, 93, 93, 93, 3, 93, 93, |
michael@0 | 438 | 93, 93, 93, 49, 8, 93, 9, 93, 93, 11, |
michael@0 | 439 | 62, 93, 93, 93, 57, 93, 93, 93, 93, 93, |
michael@0 | 440 | 93, 50, 70, 58, 6, 63, 1, 91, 5, 83, |
michael@0 | 441 | |
michael@0 | 442 | 40, 84, 93, 93, 93, 93, 93, 93, 93, 93, |
michael@0 | 443 | 93, 93, 93, 93, 41, 93, 93, 93, 93, 93, |
michael@0 | 444 | 93, 93, 43, 93, 87, 93, 93, 93, 93, 93, |
michael@0 | 445 | 85, 93, 86, 93, 93, 93, 93, 93, 93, 42, |
michael@0 | 446 | 88, 0 |
michael@0 | 447 | } ; |
michael@0 | 448 | |
michael@0 | 449 | static yyconst flex_int32_t yy_ec[256] = |
michael@0 | 450 | { 0, |
michael@0 | 451 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
michael@0 | 452 | 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 453 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 454 | 1, 2, 4, 1, 1, 1, 5, 6, 1, 7, |
michael@0 | 455 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
michael@0 | 456 | 18, 19, 20, 20, 20, 21, 21, 22, 23, 24, |
michael@0 | 457 | 25, 26, 27, 1, 28, 28, 29, 30, 31, 28, |
michael@0 | 458 | 32, 32, 32, 32, 32, 32, 32, 32, 33, 32, |
michael@0 | 459 | 32, 34, 35, 32, 32, 32, 32, 36, 32, 32, |
michael@0 | 460 | 37, 1, 38, 39, 32, 1, 40, 41, 42, 43, |
michael@0 | 461 | |
michael@0 | 462 | 44, 45, 46, 47, 48, 32, 49, 50, 51, 52, |
michael@0 | 463 | 53, 54, 32, 55, 56, 57, 58, 59, 60, 61, |
michael@0 | 464 | 62, 63, 64, 65, 66, 67, 1, 1, 1, 1, |
michael@0 | 465 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 466 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 467 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 468 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 469 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 470 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 471 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 472 | |
michael@0 | 473 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 474 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 475 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 476 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 477 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 478 | 1, 1, 1, 1, 1 |
michael@0 | 479 | } ; |
michael@0 | 480 | |
michael@0 | 481 | static yyconst flex_int32_t yy_meta[68] = |
michael@0 | 482 | { 0, |
michael@0 | 483 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 484 | 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, |
michael@0 | 485 | 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, |
michael@0 | 486 | 2, 3, 3, 3, 3, 3, 1, 1, 1, 2, |
michael@0 | 487 | 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, |
michael@0 | 488 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
michael@0 | 489 | 3, 3, 3, 1, 1, 1, 1 |
michael@0 | 490 | } ; |
michael@0 | 491 | |
michael@0 | 492 | static yyconst flex_int16_t yy_base[445] = |
michael@0 | 493 | { 0, |
michael@0 | 494 | 0, 0, 587, 588, 588, 588, 561, 43, 64, 588, |
michael@0 | 495 | 588, 560, 61, 588, 60, 58, 559, 77, 86, 557, |
michael@0 | 496 | 588, 104, 557, 55, 588, 0, 588, 588, 75, 26, |
michael@0 | 497 | 57, 82, 83, 73, 93, 528, 97, 95, 527, 44, |
michael@0 | 498 | 71, 521, 104, 534, 110, 116, 35, 111, 530, 588, |
michael@0 | 499 | 114, 588, 588, 588, 588, 588, 588, 588, 588, 588, |
michael@0 | 500 | 588, 588, 588, 165, 588, 172, 202, 211, 233, 0, |
michael@0 | 501 | 588, 588, 588, 551, 588, 588, 588, 550, 0, 588, |
michael@0 | 502 | 588, 523, 516, 519, 527, 526, 513, 528, 515, 521, |
michael@0 | 503 | 509, 506, 519, 506, 503, 503, 509, 497, 108, 502, |
michael@0 | 504 | |
michael@0 | 505 | 512, 498, 504, 507, 508, 0, 145, 507, 113, 493, |
michael@0 | 506 | 506, 497, 499, 489, 503, 500, 502, 485, 490, 487, |
michael@0 | 507 | 476, 157, 484, 489, 485, 487, 476, 479, 118, 484, |
michael@0 | 508 | 476, 488, 70, 481, 588, 588, 246, 253, 270, 219, |
michael@0 | 509 | 283, 0, 588, 588, 0, 473, 477, 486, 483, 467, |
michael@0 | 510 | 467, 119, 482, 479, 479, 477, 474, 466, 472, 459, |
michael@0 | 511 | 470, 456, 472, 0, 469, 457, 464, 461, 465, 458, |
michael@0 | 512 | 447, 446, 459, 462, 459, 454, 445, 188, 450, 453, |
michael@0 | 513 | 444, 441, 445, 451, 442, 433, 436, 434, 444, 430, |
michael@0 | 514 | 428, 441, 427, 429, 426, 437, 436, 124, 431, 426, |
michael@0 | 515 | |
michael@0 | 516 | 415, 258, 433, 435, 424, 290, 297, 304, 311, 425, |
michael@0 | 517 | 0, 423, 275, 0, 415, 413, 421, 410, 427, 416, |
michael@0 | 518 | 316, 0, 0, 410, 420, 420, 0, 405, 319, 0, |
michael@0 | 519 | 0, 407, 322, 408, 402, 401, 402, 401, 325, 0, |
michael@0 | 520 | 0, 0, 0, 0, 397, 398, 403, 394, 407, 402, |
michael@0 | 521 | 401, 393, 397, 389, 392, 396, 401, 387, 399, 390, |
michael@0 | 522 | 0, 0, 396, 385, 385, 390, 389, 386, 0, 0, |
michael@0 | 523 | 0, 0, 376, 388, 390, 0, 0, 0, 0, 0, |
michael@0 | 524 | 0, 378, 379, 373, 383, 0, 0, 0, 374, 0, |
michael@0 | 525 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, |
michael@0 | 526 | |
michael@0 | 527 | 0, 0, 379, 375, 0, 0, 0, 371, 367, 372, |
michael@0 | 528 | 362, 375, 361, 374, 363, 370, 0, 368, 370, 354, |
michael@0 | 529 | 356, 362, 368, 363, 351, 0, 353, 0, 352, 355, |
michael@0 | 530 | 0, 344, 343, 343, 356, 0, 358, 0, 357, 356, |
michael@0 | 531 | 341, 354, 341, 0, 0, 344, 0, 0, 336, 0, |
michael@0 | 532 | 0, 0, 0, 0, 333, 344, 337, 343, 340, 335, |
michael@0 | 533 | 327, 339, 0, 0, 332, 339, 328, 0, 337, 334, |
michael@0 | 534 | 324, 329, 332, 0, 0, 332, 0, 330, 329, 0, |
michael@0 | 535 | 0, 328, 314, 326, 0, 317, 338, 337, 336, 307, |
michael@0 | 536 | 303, 0, 0, 0, 0, 0, 0, 0, 0, 328, |
michael@0 | 537 | |
michael@0 | 538 | 166, 325, 316, 299, 308, 310, 306, 308, 307, 306, |
michael@0 | 539 | 309, 306, 256, 253, 0, 228, 238, 222, 235, 203, |
michael@0 | 540 | 207, 204, 212, 191, 0, 201, 165, 167, 153, 161, |
michael@0 | 541 | 0, 170, 0, 175, 151, 141, 100, 114, 59, 0, |
michael@0 | 542 | 0, 588, 359, 113 |
michael@0 | 543 | } ; |
michael@0 | 544 | |
michael@0 | 545 | static yyconst flex_int16_t yy_def[445] = |
michael@0 | 546 | { 0, |
michael@0 | 547 | 442, 1, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 548 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 549 | 442, 442, 442, 442, 442, 443, 442, 442, 442, 443, |
michael@0 | 550 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 551 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 442, |
michael@0 | 552 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 553 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 444, |
michael@0 | 554 | 442, 442, 442, 442, 442, 442, 442, 442, 443, 442, |
michael@0 | 555 | 442, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 556 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 557 | |
michael@0 | 558 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 559 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 560 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 561 | 443, 443, 443, 443, 442, 442, 442, 442, 442, 442, |
michael@0 | 562 | 442, 444, 442, 442, 443, 443, 443, 443, 443, 443, |
michael@0 | 563 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 564 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 565 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 566 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 567 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 568 | |
michael@0 | 569 | 443, 443, 443, 443, 443, 442, 442, 442, 442, 443, |
michael@0 | 570 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 571 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 572 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 573 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 574 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 575 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 576 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 577 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 578 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 579 | |
michael@0 | 580 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 581 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 582 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 583 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 584 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 585 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 586 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 587 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 588 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 589 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 590 | |
michael@0 | 591 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 592 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 593 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 594 | 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, |
michael@0 | 595 | 443, 0, 442, 442 |
michael@0 | 596 | } ; |
michael@0 | 597 | |
michael@0 | 598 | static yyconst flex_int16_t yy_nxt[656] = |
michael@0 | 599 | { 0, |
michael@0 | 600 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
michael@0 | 601 | 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, |
michael@0 | 602 | 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, |
michael@0 | 603 | 26, 26, 26, 26, 26, 26, 27, 28, 29, 30, |
michael@0 | 604 | 31, 32, 33, 34, 35, 36, 37, 38, 26, 39, |
michael@0 | 605 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, |
michael@0 | 606 | 26, 26, 26, 50, 51, 52, 53, 55, 56, 57, |
michael@0 | 607 | 60, 62, 64, 64, 64, 64, 64, 64, 64, 77, |
michael@0 | 608 | 78, 82, 83, 110, 63, 61, 129, 111, 58, 66, |
michael@0 | 609 | 130, 67, 67, 67, 67, 67, 67, 68, 66, 80, |
michael@0 | 610 | |
michael@0 | 611 | 68, 68, 68, 68, 68, 68, 68, 69, 72, 84, |
michael@0 | 612 | 112, 85, 70, 81, 142, 86, 69, 203, 441, 204, |
michael@0 | 613 | 69, 87, 94, 113, 95, 73, 90, 74, 75, 69, |
michael@0 | 614 | 91, 88, 97, 96, 89, 92, 103, 70, 135, 106, |
michael@0 | 615 | 98, 93, 99, 115, 104, 100, 107, 162, 440, 119, |
michael@0 | 616 | 131, 101, 439, 108, 132, 105, 120, 121, 116, 125, |
michael@0 | 617 | 163, 117, 126, 133, 176, 198, 122, 123, 264, 124, |
michael@0 | 618 | 127, 438, 177, 199, 216, 217, 265, 128, 136, 64, |
michael@0 | 619 | 64, 64, 64, 64, 64, 64, 138, 138, 138, 138, |
michael@0 | 620 | 138, 138, 138, 437, 170, 137, 190, 171, 172, 406, |
michael@0 | 621 | |
michael@0 | 622 | 407, 173, 139, 174, 242, 243, 244, 436, 137, 435, |
michael@0 | 623 | 434, 191, 433, 432, 66, 139, 67, 67, 67, 67, |
michael@0 | 624 | 67, 67, 68, 66, 431, 68, 68, 68, 68, 68, |
michael@0 | 625 | 68, 68, 69, 141, 141, 141, 141, 141, 141, 141, |
michael@0 | 626 | 430, 69, 140, 429, 140, 69, 428, 141, 141, 141, |
michael@0 | 627 | 141, 141, 141, 141, 69, 206, 427, 206, 426, 425, |
michael@0 | 628 | 207, 207, 207, 207, 207, 207, 207, 138, 138, 138, |
michael@0 | 629 | 138, 138, 138, 138, 269, 270, 271, 424, 423, 208, |
michael@0 | 630 | 422, 208, 421, 139, 209, 209, 209, 209, 209, 209, |
michael@0 | 631 | 209, 277, 278, 279, 420, 419, 139, 141, 141, 141, |
michael@0 | 632 | |
michael@0 | 633 | 141, 141, 141, 141, 207, 207, 207, 207, 207, 207, |
michael@0 | 634 | 207, 207, 207, 207, 207, 207, 207, 207, 209, 209, |
michael@0 | 635 | 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, |
michael@0 | 636 | 209, 209, 286, 287, 288, 293, 294, 295, 297, 298, |
michael@0 | 637 | 299, 305, 306, 307, 387, 388, 389, 418, 417, 416, |
michael@0 | 638 | 415, 414, 413, 412, 411, 410, 409, 390, 408, 391, |
michael@0 | 639 | 79, 79, 405, 404, 403, 402, 401, 400, 399, 398, |
michael@0 | 640 | 397, 396, 395, 394, 393, 392, 386, 385, 384, 383, |
michael@0 | 641 | 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, |
michael@0 | 642 | 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, |
michael@0 | 643 | |
michael@0 | 644 | 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, |
michael@0 | 645 | 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, |
michael@0 | 646 | 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, |
michael@0 | 647 | 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, |
michael@0 | 648 | 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, |
michael@0 | 649 | 312, 311, 310, 309, 308, 304, 303, 302, 301, 300, |
michael@0 | 650 | 296, 292, 291, 290, 289, 285, 284, 283, 282, 281, |
michael@0 | 651 | 280, 276, 275, 274, 273, 272, 268, 267, 266, 263, |
michael@0 | 652 | 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, |
michael@0 | 653 | 252, 251, 250, 249, 248, 247, 246, 245, 241, 240, |
michael@0 | 654 | |
michael@0 | 655 | 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, |
michael@0 | 656 | 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, |
michael@0 | 657 | 219, 218, 215, 214, 213, 212, 211, 210, 205, 202, |
michael@0 | 658 | 201, 200, 197, 196, 195, 194, 193, 192, 189, 188, |
michael@0 | 659 | 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, |
michael@0 | 660 | 175, 169, 168, 167, 166, 165, 164, 161, 160, 159, |
michael@0 | 661 | 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, |
michael@0 | 662 | 148, 147, 146, 145, 144, 143, 134, 118, 114, 109, |
michael@0 | 663 | 102, 76, 71, 65, 59, 54, 442, 3, 442, 442, |
michael@0 | 664 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 665 | |
michael@0 | 666 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 667 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 668 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 669 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 670 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 671 | 442, 442, 442, 442, 442 |
michael@0 | 672 | } ; |
michael@0 | 673 | |
michael@0 | 674 | static yyconst flex_int16_t yy_chk[656] = |
michael@0 | 675 | { 0, |
michael@0 | 676 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 677 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 678 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 679 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 680 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 681 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
michael@0 | 682 | 1, 1, 1, 1, 1, 1, 1, 8, 8, 9, |
michael@0 | 683 | 13, 15, 16, 16, 16, 16, 16, 16, 16, 24, |
michael@0 | 684 | 24, 30, 30, 40, 15, 13, 47, 40, 9, 18, |
michael@0 | 685 | 47, 18, 18, 18, 18, 18, 18, 18, 19, 29, |
michael@0 | 686 | |
michael@0 | 687 | 19, 19, 19, 19, 19, 19, 19, 18, 22, 31, |
michael@0 | 688 | 41, 31, 18, 29, 444, 31, 19, 133, 439, 133, |
michael@0 | 689 | 18, 32, 34, 41, 34, 22, 33, 22, 22, 19, |
michael@0 | 690 | 33, 32, 35, 34, 32, 33, 37, 18, 51, 38, |
michael@0 | 691 | 35, 33, 35, 43, 37, 35, 38, 99, 438, 45, |
michael@0 | 692 | 48, 35, 437, 38, 48, 37, 45, 45, 43, 46, |
michael@0 | 693 | 99, 43, 46, 48, 109, 129, 45, 45, 198, 45, |
michael@0 | 694 | 46, 436, 109, 129, 152, 152, 198, 46, 51, 64, |
michael@0 | 695 | 64, 64, 64, 64, 64, 64, 66, 66, 66, 66, |
michael@0 | 696 | 66, 66, 66, 435, 107, 64, 122, 107, 107, 401, |
michael@0 | 697 | |
michael@0 | 698 | 401, 107, 66, 107, 178, 178, 178, 434, 64, 432, |
michael@0 | 699 | 430, 122, 429, 428, 67, 66, 67, 67, 67, 67, |
michael@0 | 700 | 67, 67, 67, 68, 427, 68, 68, 68, 68, 68, |
michael@0 | 701 | 68, 68, 67, 140, 140, 140, 140, 140, 140, 140, |
michael@0 | 702 | 426, 68, 69, 424, 69, 67, 423, 69, 69, 69, |
michael@0 | 703 | 69, 69, 69, 69, 68, 137, 422, 137, 421, 420, |
michael@0 | 704 | 137, 137, 137, 137, 137, 137, 137, 138, 138, 138, |
michael@0 | 705 | 138, 138, 138, 138, 202, 202, 202, 419, 418, 139, |
michael@0 | 706 | 417, 139, 416, 138, 139, 139, 139, 139, 139, 139, |
michael@0 | 707 | 139, 213, 213, 213, 414, 413, 138, 141, 141, 141, |
michael@0 | 708 | |
michael@0 | 709 | 141, 141, 141, 141, 206, 206, 206, 206, 206, 206, |
michael@0 | 710 | 206, 207, 207, 207, 207, 207, 207, 207, 208, 208, |
michael@0 | 711 | 208, 208, 208, 208, 208, 209, 209, 209, 209, 209, |
michael@0 | 712 | 209, 209, 221, 221, 221, 229, 229, 229, 233, 233, |
michael@0 | 713 | 233, 239, 239, 239, 372, 372, 372, 412, 411, 410, |
michael@0 | 714 | 409, 408, 407, 406, 405, 404, 403, 372, 402, 372, |
michael@0 | 715 | 443, 443, 400, 391, 390, 389, 388, 387, 386, 384, |
michael@0 | 716 | 383, 382, 379, 378, 376, 373, 371, 370, 369, 367, |
michael@0 | 717 | 366, 365, 362, 361, 360, 359, 358, 357, 356, 355, |
michael@0 | 718 | 349, 346, 343, 342, 341, 340, 339, 337, 335, 334, |
michael@0 | 719 | |
michael@0 | 720 | 333, 332, 330, 329, 327, 325, 324, 323, 322, 321, |
michael@0 | 721 | 320, 319, 318, 316, 315, 314, 313, 312, 311, 310, |
michael@0 | 722 | 309, 308, 304, 303, 300, 289, 285, 284, 283, 282, |
michael@0 | 723 | 275, 274, 273, 268, 267, 266, 265, 264, 263, 260, |
michael@0 | 724 | 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, |
michael@0 | 725 | 249, 248, 247, 246, 245, 238, 237, 236, 235, 234, |
michael@0 | 726 | 232, 228, 226, 225, 224, 220, 219, 218, 217, 216, |
michael@0 | 727 | 215, 212, 210, 205, 204, 203, 201, 200, 199, 197, |
michael@0 | 728 | 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, |
michael@0 | 729 | 186, 185, 184, 183, 182, 181, 180, 179, 177, 176, |
michael@0 | 730 | |
michael@0 | 731 | 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, |
michael@0 | 732 | 165, 163, 162, 161, 160, 159, 158, 157, 156, 155, |
michael@0 | 733 | 154, 153, 151, 150, 149, 148, 147, 146, 134, 132, |
michael@0 | 734 | 131, 130, 128, 127, 126, 125, 124, 123, 121, 120, |
michael@0 | 735 | 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, |
michael@0 | 736 | 108, 105, 104, 103, 102, 101, 100, 98, 97, 96, |
michael@0 | 737 | 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, |
michael@0 | 738 | 85, 84, 83, 82, 78, 74, 49, 44, 42, 39, |
michael@0 | 739 | 36, 23, 20, 17, 12, 7, 3, 442, 442, 442, |
michael@0 | 740 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 741 | |
michael@0 | 742 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 743 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 744 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 745 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 746 | 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, |
michael@0 | 747 | 442, 442, 442, 442, 442 |
michael@0 | 748 | } ; |
michael@0 | 749 | |
michael@0 | 750 | /* Table of booleans, true if rule could match eol. */ |
michael@0 | 751 | static yyconst flex_int32_t yy_rule_can_match_eol[148] = |
michael@0 | 752 | { 0, |
michael@0 | 753 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 754 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 755 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 756 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 757 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 758 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 759 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
michael@0 | 760 | 0, 0, 0, 0, 0, 1, 0, 0, }; |
michael@0 | 761 | |
michael@0 | 762 | /* The intent behind this definition is that it'll catch |
michael@0 | 763 | * any uses of REJECT which flex missed. |
michael@0 | 764 | */ |
michael@0 | 765 | #define REJECT reject_used_but_not_detected |
michael@0 | 766 | #define yymore() yymore_used_but_not_detected |
michael@0 | 767 | #define YY_MORE_ADJ 0 |
michael@0 | 768 | #define YY_RESTORE_YY_MORE_OFFSET |
michael@0 | 769 | /* |
michael@0 | 770 | // |
michael@0 | 771 | // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 772 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 773 | // found in the LICENSE file. |
michael@0 | 774 | // |
michael@0 | 775 | |
michael@0 | 776 | This file contains the Lex specification for GLSL ES. |
michael@0 | 777 | Based on ANSI C grammar, Lex specification: |
michael@0 | 778 | http://www.lysator.liu.se/c/ANSI-C-grammar-l.html |
michael@0 | 779 | |
michael@0 | 780 | IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh, |
michael@0 | 781 | WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). |
michael@0 | 782 | */ |
michael@0 | 783 | |
michael@0 | 784 | #include "compiler/glslang.h" |
michael@0 | 785 | #include "compiler/ParseHelper.h" |
michael@0 | 786 | #include "compiler/preprocessor/Token.h" |
michael@0 | 787 | #include "compiler/util.h" |
michael@0 | 788 | #include "glslang_tab.h" |
michael@0 | 789 | |
michael@0 | 790 | /* windows only pragma */ |
michael@0 | 791 | #ifdef _MSC_VER |
michael@0 | 792 | #pragma warning(disable : 4102) |
michael@0 | 793 | #endif |
michael@0 | 794 | |
michael@0 | 795 | #define YY_USER_ACTION \ |
michael@0 | 796 | yylloc->first_file = yylloc->last_file = yycolumn; \ |
michael@0 | 797 | yylloc->first_line = yylloc->last_line = yylineno; |
michael@0 | 798 | |
michael@0 | 799 | #define YY_INPUT(buf, result, max_size) \ |
michael@0 | 800 | result = string_input(buf, max_size, yyscanner); |
michael@0 | 801 | |
michael@0 | 802 | static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner); |
michael@0 | 803 | static int check_type(yyscan_t yyscanner); |
michael@0 | 804 | static int reserved_word(yyscan_t yyscanner); |
michael@0 | 805 | |
michael@0 | 806 | #define INITIAL 0 |
michael@0 | 807 | |
michael@0 | 808 | #define YY_EXTRA_TYPE TParseContext* |
michael@0 | 809 | |
michael@0 | 810 | /* Holds the entire state of the reentrant scanner. */ |
michael@0 | 811 | struct yyguts_t |
michael@0 | 812 | { |
michael@0 | 813 | |
michael@0 | 814 | /* User-defined. Not touched by flex. */ |
michael@0 | 815 | YY_EXTRA_TYPE yyextra_r; |
michael@0 | 816 | |
michael@0 | 817 | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
michael@0 | 818 | FILE *yyin_r, *yyout_r; |
michael@0 | 819 | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
michael@0 | 820 | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
michael@0 | 821 | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
michael@0 | 822 | char yy_hold_char; |
michael@0 | 823 | yy_size_t yy_n_chars; |
michael@0 | 824 | yy_size_t yyleng_r; |
michael@0 | 825 | char *yy_c_buf_p; |
michael@0 | 826 | int yy_init; |
michael@0 | 827 | int yy_start; |
michael@0 | 828 | int yy_did_buffer_switch_on_eof; |
michael@0 | 829 | int yy_start_stack_ptr; |
michael@0 | 830 | int yy_start_stack_depth; |
michael@0 | 831 | int *yy_start_stack; |
michael@0 | 832 | yy_state_type yy_last_accepting_state; |
michael@0 | 833 | char* yy_last_accepting_cpos; |
michael@0 | 834 | |
michael@0 | 835 | int yylineno_r; |
michael@0 | 836 | int yy_flex_debug_r; |
michael@0 | 837 | |
michael@0 | 838 | char *yytext_r; |
michael@0 | 839 | int yy_more_flag; |
michael@0 | 840 | int yy_more_len; |
michael@0 | 841 | |
michael@0 | 842 | YYSTYPE * yylval_r; |
michael@0 | 843 | |
michael@0 | 844 | YYLTYPE * yylloc_r; |
michael@0 | 845 | |
michael@0 | 846 | }; /* end struct yyguts_t */ |
michael@0 | 847 | |
michael@0 | 848 | static int yy_init_globals (yyscan_t yyscanner ); |
michael@0 | 849 | |
michael@0 | 850 | /* This must go here because YYSTYPE and YYLTYPE are included |
michael@0 | 851 | * from bison output in section 1.*/ |
michael@0 | 852 | # define yylval yyg->yylval_r |
michael@0 | 853 | |
michael@0 | 854 | # define yylloc yyg->yylloc_r |
michael@0 | 855 | |
michael@0 | 856 | int yylex_init (yyscan_t* scanner); |
michael@0 | 857 | |
michael@0 | 858 | int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); |
michael@0 | 859 | |
michael@0 | 860 | /* Accessor methods to globals. |
michael@0 | 861 | These are made visible to non-reentrant scanners for convenience. */ |
michael@0 | 862 | |
michael@0 | 863 | int yylex_destroy (yyscan_t yyscanner ); |
michael@0 | 864 | |
michael@0 | 865 | int yyget_debug (yyscan_t yyscanner ); |
michael@0 | 866 | |
michael@0 | 867 | void yyset_debug (int debug_flag ,yyscan_t yyscanner ); |
michael@0 | 868 | |
michael@0 | 869 | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); |
michael@0 | 870 | |
michael@0 | 871 | void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); |
michael@0 | 872 | |
michael@0 | 873 | FILE *yyget_in (yyscan_t yyscanner ); |
michael@0 | 874 | |
michael@0 | 875 | void yyset_in (FILE * in_str ,yyscan_t yyscanner ); |
michael@0 | 876 | |
michael@0 | 877 | FILE *yyget_out (yyscan_t yyscanner ); |
michael@0 | 878 | |
michael@0 | 879 | void yyset_out (FILE * out_str ,yyscan_t yyscanner ); |
michael@0 | 880 | |
michael@0 | 881 | yy_size_t yyget_leng (yyscan_t yyscanner ); |
michael@0 | 882 | |
michael@0 | 883 | char *yyget_text (yyscan_t yyscanner ); |
michael@0 | 884 | |
michael@0 | 885 | int yyget_lineno (yyscan_t yyscanner ); |
michael@0 | 886 | |
michael@0 | 887 | void yyset_lineno (int line_number ,yyscan_t yyscanner ); |
michael@0 | 888 | |
michael@0 | 889 | YYSTYPE * yyget_lval (yyscan_t yyscanner ); |
michael@0 | 890 | |
michael@0 | 891 | void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); |
michael@0 | 892 | |
michael@0 | 893 | YYLTYPE *yyget_lloc (yyscan_t yyscanner ); |
michael@0 | 894 | |
michael@0 | 895 | void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); |
michael@0 | 896 | |
michael@0 | 897 | /* Macros after this point can all be overridden by user definitions in |
michael@0 | 898 | * section 1. |
michael@0 | 899 | */ |
michael@0 | 900 | |
michael@0 | 901 | #ifndef YY_SKIP_YYWRAP |
michael@0 | 902 | #ifdef __cplusplus |
michael@0 | 903 | extern "C" int yywrap (yyscan_t yyscanner ); |
michael@0 | 904 | #else |
michael@0 | 905 | extern int yywrap (yyscan_t yyscanner ); |
michael@0 | 906 | #endif |
michael@0 | 907 | #endif |
michael@0 | 908 | |
michael@0 | 909 | #ifndef yytext_ptr |
michael@0 | 910 | static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); |
michael@0 | 911 | #endif |
michael@0 | 912 | |
michael@0 | 913 | #ifdef YY_NEED_STRLEN |
michael@0 | 914 | static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); |
michael@0 | 915 | #endif |
michael@0 | 916 | |
michael@0 | 917 | #ifndef YY_NO_INPUT |
michael@0 | 918 | |
michael@0 | 919 | #ifdef __cplusplus |
michael@0 | 920 | static int yyinput (yyscan_t yyscanner ); |
michael@0 | 921 | #else |
michael@0 | 922 | static int input (yyscan_t yyscanner ); |
michael@0 | 923 | #endif |
michael@0 | 924 | |
michael@0 | 925 | #endif |
michael@0 | 926 | |
michael@0 | 927 | /* Amount of stuff to slurp up with each read. */ |
michael@0 | 928 | #ifndef YY_READ_BUF_SIZE |
michael@0 | 929 | #define YY_READ_BUF_SIZE 8192 |
michael@0 | 930 | #endif |
michael@0 | 931 | |
michael@0 | 932 | /* Copy whatever the last rule matched to the standard output. */ |
michael@0 | 933 | #ifndef ECHO |
michael@0 | 934 | /* This used to be an fputs(), but since the string might contain NUL's, |
michael@0 | 935 | * we now use fwrite(). |
michael@0 | 936 | */ |
michael@0 | 937 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) |
michael@0 | 938 | #endif |
michael@0 | 939 | |
michael@0 | 940 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
michael@0 | 941 | * is returned in "result". |
michael@0 | 942 | */ |
michael@0 | 943 | #ifndef YY_INPUT |
michael@0 | 944 | #define YY_INPUT(buf,result,max_size) \ |
michael@0 | 945 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
michael@0 | 946 | { \ |
michael@0 | 947 | int c = '*'; \ |
michael@0 | 948 | yy_size_t n; \ |
michael@0 | 949 | for ( n = 0; n < max_size && \ |
michael@0 | 950 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
michael@0 | 951 | buf[n] = (char) c; \ |
michael@0 | 952 | if ( c == '\n' ) \ |
michael@0 | 953 | buf[n++] = (char) c; \ |
michael@0 | 954 | if ( c == EOF && ferror( yyin ) ) \ |
michael@0 | 955 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
michael@0 | 956 | result = n; \ |
michael@0 | 957 | } \ |
michael@0 | 958 | else \ |
michael@0 | 959 | { \ |
michael@0 | 960 | errno=0; \ |
michael@0 | 961 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
michael@0 | 962 | { \ |
michael@0 | 963 | if( errno != EINTR) \ |
michael@0 | 964 | { \ |
michael@0 | 965 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
michael@0 | 966 | break; \ |
michael@0 | 967 | } \ |
michael@0 | 968 | errno=0; \ |
michael@0 | 969 | clearerr(yyin); \ |
michael@0 | 970 | } \ |
michael@0 | 971 | }\ |
michael@0 | 972 | \ |
michael@0 | 973 | |
michael@0 | 974 | #endif |
michael@0 | 975 | |
michael@0 | 976 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
michael@0 | 977 | * we don't want an extra ';' after the "return" because that will cause |
michael@0 | 978 | * some compilers to complain about unreachable statements. |
michael@0 | 979 | */ |
michael@0 | 980 | #ifndef yyterminate |
michael@0 | 981 | #define yyterminate() return YY_NULL |
michael@0 | 982 | #endif |
michael@0 | 983 | |
michael@0 | 984 | /* Number of entries by which start-condition stack grows. */ |
michael@0 | 985 | #ifndef YY_START_STACK_INCR |
michael@0 | 986 | #define YY_START_STACK_INCR 25 |
michael@0 | 987 | #endif |
michael@0 | 988 | |
michael@0 | 989 | /* Report a fatal error. */ |
michael@0 | 990 | #ifndef YY_FATAL_ERROR |
michael@0 | 991 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
michael@0 | 992 | #endif |
michael@0 | 993 | |
michael@0 | 994 | /* end tables serialization structures and prototypes */ |
michael@0 | 995 | |
michael@0 | 996 | /* Default declaration of generated scanner - a define so the user can |
michael@0 | 997 | * easily add parameters. |
michael@0 | 998 | */ |
michael@0 | 999 | #ifndef YY_DECL |
michael@0 | 1000 | #define YY_DECL_IS_OURS 1 |
michael@0 | 1001 | |
michael@0 | 1002 | extern int yylex \ |
michael@0 | 1003 | (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); |
michael@0 | 1004 | |
michael@0 | 1005 | #define YY_DECL int yylex \ |
michael@0 | 1006 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) |
michael@0 | 1007 | #endif /* !YY_DECL */ |
michael@0 | 1008 | |
michael@0 | 1009 | /* Code executed at the beginning of each rule, after yytext and yyleng |
michael@0 | 1010 | * have been set up. |
michael@0 | 1011 | */ |
michael@0 | 1012 | #ifndef YY_USER_ACTION |
michael@0 | 1013 | #define YY_USER_ACTION |
michael@0 | 1014 | #endif |
michael@0 | 1015 | |
michael@0 | 1016 | /* Code executed at the end of each rule. */ |
michael@0 | 1017 | #ifndef YY_BREAK |
michael@0 | 1018 | #define YY_BREAK break; |
michael@0 | 1019 | #endif |
michael@0 | 1020 | |
michael@0 | 1021 | #define YY_RULE_SETUP \ |
michael@0 | 1022 | YY_USER_ACTION |
michael@0 | 1023 | |
michael@0 | 1024 | /** The main scanner function which does all the work. |
michael@0 | 1025 | */ |
michael@0 | 1026 | YY_DECL |
michael@0 | 1027 | { |
michael@0 | 1028 | register yy_state_type yy_current_state; |
michael@0 | 1029 | register char *yy_cp, *yy_bp; |
michael@0 | 1030 | register int yy_act; |
michael@0 | 1031 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 1032 | |
michael@0 | 1033 | yylval = yylval_param; |
michael@0 | 1034 | |
michael@0 | 1035 | yylloc = yylloc_param; |
michael@0 | 1036 | |
michael@0 | 1037 | if ( !yyg->yy_init ) |
michael@0 | 1038 | { |
michael@0 | 1039 | yyg->yy_init = 1; |
michael@0 | 1040 | |
michael@0 | 1041 | #ifdef YY_USER_INIT |
michael@0 | 1042 | YY_USER_INIT; |
michael@0 | 1043 | #endif |
michael@0 | 1044 | |
michael@0 | 1045 | if ( ! yyg->yy_start ) |
michael@0 | 1046 | yyg->yy_start = 1; /* first start state */ |
michael@0 | 1047 | |
michael@0 | 1048 | if ( ! yyin ) |
michael@0 | 1049 | yyin = stdin; |
michael@0 | 1050 | |
michael@0 | 1051 | if ( ! yyout ) |
michael@0 | 1052 | yyout = stdout; |
michael@0 | 1053 | |
michael@0 | 1054 | if ( ! YY_CURRENT_BUFFER ) { |
michael@0 | 1055 | yyensure_buffer_stack (yyscanner); |
michael@0 | 1056 | YY_CURRENT_BUFFER_LVALUE = |
michael@0 | 1057 | yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
michael@0 | 1058 | } |
michael@0 | 1059 | |
michael@0 | 1060 | yy_load_buffer_state(yyscanner ); |
michael@0 | 1061 | } |
michael@0 | 1062 | |
michael@0 | 1063 | while ( 1 ) /* loops until end-of-file is reached */ |
michael@0 | 1064 | { |
michael@0 | 1065 | yy_cp = yyg->yy_c_buf_p; |
michael@0 | 1066 | |
michael@0 | 1067 | /* Support of yytext. */ |
michael@0 | 1068 | *yy_cp = yyg->yy_hold_char; |
michael@0 | 1069 | |
michael@0 | 1070 | /* yy_bp points to the position in yy_ch_buf of the start of |
michael@0 | 1071 | * the current run. |
michael@0 | 1072 | */ |
michael@0 | 1073 | yy_bp = yy_cp; |
michael@0 | 1074 | |
michael@0 | 1075 | yy_current_state = yyg->yy_start; |
michael@0 | 1076 | yy_match: |
michael@0 | 1077 | do |
michael@0 | 1078 | { |
michael@0 | 1079 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
michael@0 | 1080 | if ( yy_accept[yy_current_state] ) |
michael@0 | 1081 | { |
michael@0 | 1082 | yyg->yy_last_accepting_state = yy_current_state; |
michael@0 | 1083 | yyg->yy_last_accepting_cpos = yy_cp; |
michael@0 | 1084 | } |
michael@0 | 1085 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
michael@0 | 1086 | { |
michael@0 | 1087 | yy_current_state = (int) yy_def[yy_current_state]; |
michael@0 | 1088 | if ( yy_current_state >= 443 ) |
michael@0 | 1089 | yy_c = yy_meta[(unsigned int) yy_c]; |
michael@0 | 1090 | } |
michael@0 | 1091 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
michael@0 | 1092 | ++yy_cp; |
michael@0 | 1093 | } |
michael@0 | 1094 | while ( yy_current_state != 442 ); |
michael@0 | 1095 | yy_cp = yyg->yy_last_accepting_cpos; |
michael@0 | 1096 | yy_current_state = yyg->yy_last_accepting_state; |
michael@0 | 1097 | |
michael@0 | 1098 | yy_find_action: |
michael@0 | 1099 | yy_act = yy_accept[yy_current_state]; |
michael@0 | 1100 | |
michael@0 | 1101 | YY_DO_BEFORE_ACTION; |
michael@0 | 1102 | |
michael@0 | 1103 | if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
michael@0 | 1104 | { |
michael@0 | 1105 | yy_size_t yyl; |
michael@0 | 1106 | for ( yyl = 0; yyl < yyleng; ++yyl ) |
michael@0 | 1107 | if ( yytext[yyl] == '\n' ) |
michael@0 | 1108 | |
michael@0 | 1109 | do{ yylineno++; |
michael@0 | 1110 | yycolumn=0; |
michael@0 | 1111 | }while(0) |
michael@0 | 1112 | ; |
michael@0 | 1113 | } |
michael@0 | 1114 | |
michael@0 | 1115 | do_action: /* This label is used only to access EOF actions. */ |
michael@0 | 1116 | |
michael@0 | 1117 | switch ( yy_act ) |
michael@0 | 1118 | { /* beginning of action switch */ |
michael@0 | 1119 | case 0: /* must back up */ |
michael@0 | 1120 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
michael@0 | 1121 | *yy_cp = yyg->yy_hold_char; |
michael@0 | 1122 | yy_cp = yyg->yy_last_accepting_cpos; |
michael@0 | 1123 | yy_current_state = yyg->yy_last_accepting_state; |
michael@0 | 1124 | goto yy_find_action; |
michael@0 | 1125 | |
michael@0 | 1126 | case 1: |
michael@0 | 1127 | YY_RULE_SETUP |
michael@0 | 1128 | { return INVARIANT; } |
michael@0 | 1129 | YY_BREAK |
michael@0 | 1130 | case 2: |
michael@0 | 1131 | YY_RULE_SETUP |
michael@0 | 1132 | { return HIGH_PRECISION; } |
michael@0 | 1133 | YY_BREAK |
michael@0 | 1134 | case 3: |
michael@0 | 1135 | YY_RULE_SETUP |
michael@0 | 1136 | { return MEDIUM_PRECISION; } |
michael@0 | 1137 | YY_BREAK |
michael@0 | 1138 | case 4: |
michael@0 | 1139 | YY_RULE_SETUP |
michael@0 | 1140 | { return LOW_PRECISION; } |
michael@0 | 1141 | YY_BREAK |
michael@0 | 1142 | case 5: |
michael@0 | 1143 | YY_RULE_SETUP |
michael@0 | 1144 | { return PRECISION; } |
michael@0 | 1145 | YY_BREAK |
michael@0 | 1146 | case 6: |
michael@0 | 1147 | YY_RULE_SETUP |
michael@0 | 1148 | { return ATTRIBUTE; } |
michael@0 | 1149 | YY_BREAK |
michael@0 | 1150 | case 7: |
michael@0 | 1151 | YY_RULE_SETUP |
michael@0 | 1152 | { return CONST_QUAL; } |
michael@0 | 1153 | YY_BREAK |
michael@0 | 1154 | case 8: |
michael@0 | 1155 | YY_RULE_SETUP |
michael@0 | 1156 | { return UNIFORM; } |
michael@0 | 1157 | YY_BREAK |
michael@0 | 1158 | case 9: |
michael@0 | 1159 | YY_RULE_SETUP |
michael@0 | 1160 | { return VARYING; } |
michael@0 | 1161 | YY_BREAK |
michael@0 | 1162 | case 10: |
michael@0 | 1163 | YY_RULE_SETUP |
michael@0 | 1164 | { return BREAK; } |
michael@0 | 1165 | YY_BREAK |
michael@0 | 1166 | case 11: |
michael@0 | 1167 | YY_RULE_SETUP |
michael@0 | 1168 | { return CONTINUE; } |
michael@0 | 1169 | YY_BREAK |
michael@0 | 1170 | case 12: |
michael@0 | 1171 | YY_RULE_SETUP |
michael@0 | 1172 | { return DO; } |
michael@0 | 1173 | YY_BREAK |
michael@0 | 1174 | case 13: |
michael@0 | 1175 | YY_RULE_SETUP |
michael@0 | 1176 | { return FOR; } |
michael@0 | 1177 | YY_BREAK |
michael@0 | 1178 | case 14: |
michael@0 | 1179 | YY_RULE_SETUP |
michael@0 | 1180 | { return WHILE; } |
michael@0 | 1181 | YY_BREAK |
michael@0 | 1182 | case 15: |
michael@0 | 1183 | YY_RULE_SETUP |
michael@0 | 1184 | { return IF; } |
michael@0 | 1185 | YY_BREAK |
michael@0 | 1186 | case 16: |
michael@0 | 1187 | YY_RULE_SETUP |
michael@0 | 1188 | { return ELSE; } |
michael@0 | 1189 | YY_BREAK |
michael@0 | 1190 | case 17: |
michael@0 | 1191 | YY_RULE_SETUP |
michael@0 | 1192 | { return IN_QUAL; } |
michael@0 | 1193 | YY_BREAK |
michael@0 | 1194 | case 18: |
michael@0 | 1195 | YY_RULE_SETUP |
michael@0 | 1196 | { return OUT_QUAL; } |
michael@0 | 1197 | YY_BREAK |
michael@0 | 1198 | case 19: |
michael@0 | 1199 | YY_RULE_SETUP |
michael@0 | 1200 | { return INOUT_QUAL; } |
michael@0 | 1201 | YY_BREAK |
michael@0 | 1202 | case 20: |
michael@0 | 1203 | YY_RULE_SETUP |
michael@0 | 1204 | { return FLOAT_TYPE; } |
michael@0 | 1205 | YY_BREAK |
michael@0 | 1206 | case 21: |
michael@0 | 1207 | YY_RULE_SETUP |
michael@0 | 1208 | { return INT_TYPE; } |
michael@0 | 1209 | YY_BREAK |
michael@0 | 1210 | case 22: |
michael@0 | 1211 | YY_RULE_SETUP |
michael@0 | 1212 | { return VOID_TYPE; } |
michael@0 | 1213 | YY_BREAK |
michael@0 | 1214 | case 23: |
michael@0 | 1215 | YY_RULE_SETUP |
michael@0 | 1216 | { return BOOL_TYPE; } |
michael@0 | 1217 | YY_BREAK |
michael@0 | 1218 | case 24: |
michael@0 | 1219 | YY_RULE_SETUP |
michael@0 | 1220 | { yylval->lex.b = true; return BOOLCONSTANT; } |
michael@0 | 1221 | YY_BREAK |
michael@0 | 1222 | case 25: |
michael@0 | 1223 | YY_RULE_SETUP |
michael@0 | 1224 | { yylval->lex.b = false; return BOOLCONSTANT; } |
michael@0 | 1225 | YY_BREAK |
michael@0 | 1226 | case 26: |
michael@0 | 1227 | YY_RULE_SETUP |
michael@0 | 1228 | { return DISCARD; } |
michael@0 | 1229 | YY_BREAK |
michael@0 | 1230 | case 27: |
michael@0 | 1231 | YY_RULE_SETUP |
michael@0 | 1232 | { return RETURN; } |
michael@0 | 1233 | YY_BREAK |
michael@0 | 1234 | case 28: |
michael@0 | 1235 | YY_RULE_SETUP |
michael@0 | 1236 | { return MATRIX2; } |
michael@0 | 1237 | YY_BREAK |
michael@0 | 1238 | case 29: |
michael@0 | 1239 | YY_RULE_SETUP |
michael@0 | 1240 | { return MATRIX3; } |
michael@0 | 1241 | YY_BREAK |
michael@0 | 1242 | case 30: |
michael@0 | 1243 | YY_RULE_SETUP |
michael@0 | 1244 | { return MATRIX4; } |
michael@0 | 1245 | YY_BREAK |
michael@0 | 1246 | case 31: |
michael@0 | 1247 | YY_RULE_SETUP |
michael@0 | 1248 | { return VEC2; } |
michael@0 | 1249 | YY_BREAK |
michael@0 | 1250 | case 32: |
michael@0 | 1251 | YY_RULE_SETUP |
michael@0 | 1252 | { return VEC3; } |
michael@0 | 1253 | YY_BREAK |
michael@0 | 1254 | case 33: |
michael@0 | 1255 | YY_RULE_SETUP |
michael@0 | 1256 | { return VEC4; } |
michael@0 | 1257 | YY_BREAK |
michael@0 | 1258 | case 34: |
michael@0 | 1259 | YY_RULE_SETUP |
michael@0 | 1260 | { return IVEC2; } |
michael@0 | 1261 | YY_BREAK |
michael@0 | 1262 | case 35: |
michael@0 | 1263 | YY_RULE_SETUP |
michael@0 | 1264 | { return IVEC3; } |
michael@0 | 1265 | YY_BREAK |
michael@0 | 1266 | case 36: |
michael@0 | 1267 | YY_RULE_SETUP |
michael@0 | 1268 | { return IVEC4; } |
michael@0 | 1269 | YY_BREAK |
michael@0 | 1270 | case 37: |
michael@0 | 1271 | YY_RULE_SETUP |
michael@0 | 1272 | { return BVEC2; } |
michael@0 | 1273 | YY_BREAK |
michael@0 | 1274 | case 38: |
michael@0 | 1275 | YY_RULE_SETUP |
michael@0 | 1276 | { return BVEC3; } |
michael@0 | 1277 | YY_BREAK |
michael@0 | 1278 | case 39: |
michael@0 | 1279 | YY_RULE_SETUP |
michael@0 | 1280 | { return BVEC4; } |
michael@0 | 1281 | YY_BREAK |
michael@0 | 1282 | case 40: |
michael@0 | 1283 | YY_RULE_SETUP |
michael@0 | 1284 | { return SAMPLER2D; } |
michael@0 | 1285 | YY_BREAK |
michael@0 | 1286 | case 41: |
michael@0 | 1287 | YY_RULE_SETUP |
michael@0 | 1288 | { return SAMPLERCUBE; } |
michael@0 | 1289 | YY_BREAK |
michael@0 | 1290 | case 42: |
michael@0 | 1291 | YY_RULE_SETUP |
michael@0 | 1292 | { return SAMPLER_EXTERNAL_OES; } |
michael@0 | 1293 | YY_BREAK |
michael@0 | 1294 | case 43: |
michael@0 | 1295 | YY_RULE_SETUP |
michael@0 | 1296 | { return SAMPLER2DRECT; } |
michael@0 | 1297 | YY_BREAK |
michael@0 | 1298 | case 44: |
michael@0 | 1299 | YY_RULE_SETUP |
michael@0 | 1300 | { return STRUCT; } |
michael@0 | 1301 | YY_BREAK |
michael@0 | 1302 | case 45: |
michael@0 | 1303 | YY_RULE_SETUP |
michael@0 | 1304 | { return reserved_word(yyscanner); } |
michael@0 | 1305 | YY_BREAK |
michael@0 | 1306 | case 46: |
michael@0 | 1307 | YY_RULE_SETUP |
michael@0 | 1308 | { return reserved_word(yyscanner); } |
michael@0 | 1309 | YY_BREAK |
michael@0 | 1310 | case 47: |
michael@0 | 1311 | YY_RULE_SETUP |
michael@0 | 1312 | { return reserved_word(yyscanner); } |
michael@0 | 1313 | YY_BREAK |
michael@0 | 1314 | case 48: |
michael@0 | 1315 | YY_RULE_SETUP |
michael@0 | 1316 | { return reserved_word(yyscanner); } |
michael@0 | 1317 | YY_BREAK |
michael@0 | 1318 | case 49: |
michael@0 | 1319 | YY_RULE_SETUP |
michael@0 | 1320 | { return reserved_word(yyscanner); } |
michael@0 | 1321 | YY_BREAK |
michael@0 | 1322 | case 50: |
michael@0 | 1323 | YY_RULE_SETUP |
michael@0 | 1324 | { return reserved_word(yyscanner); } |
michael@0 | 1325 | YY_BREAK |
michael@0 | 1326 | case 51: |
michael@0 | 1327 | YY_RULE_SETUP |
michael@0 | 1328 | { return reserved_word(yyscanner); } |
michael@0 | 1329 | YY_BREAK |
michael@0 | 1330 | case 52: |
michael@0 | 1331 | YY_RULE_SETUP |
michael@0 | 1332 | { return reserved_word(yyscanner); } |
michael@0 | 1333 | YY_BREAK |
michael@0 | 1334 | case 53: |
michael@0 | 1335 | YY_RULE_SETUP |
michael@0 | 1336 | { return reserved_word(yyscanner); } |
michael@0 | 1337 | YY_BREAK |
michael@0 | 1338 | case 54: |
michael@0 | 1339 | YY_RULE_SETUP |
michael@0 | 1340 | { return reserved_word(yyscanner); } |
michael@0 | 1341 | YY_BREAK |
michael@0 | 1342 | case 55: |
michael@0 | 1343 | YY_RULE_SETUP |
michael@0 | 1344 | { return reserved_word(yyscanner); } |
michael@0 | 1345 | YY_BREAK |
michael@0 | 1346 | case 56: |
michael@0 | 1347 | YY_RULE_SETUP |
michael@0 | 1348 | { return reserved_word(yyscanner); } |
michael@0 | 1349 | YY_BREAK |
michael@0 | 1350 | case 57: |
michael@0 | 1351 | YY_RULE_SETUP |
michael@0 | 1352 | { return reserved_word(yyscanner); } |
michael@0 | 1353 | YY_BREAK |
michael@0 | 1354 | case 58: |
michael@0 | 1355 | YY_RULE_SETUP |
michael@0 | 1356 | { return reserved_word(yyscanner); } |
michael@0 | 1357 | YY_BREAK |
michael@0 | 1358 | case 59: |
michael@0 | 1359 | YY_RULE_SETUP |
michael@0 | 1360 | { return reserved_word(yyscanner); } |
michael@0 | 1361 | YY_BREAK |
michael@0 | 1362 | case 60: |
michael@0 | 1363 | YY_RULE_SETUP |
michael@0 | 1364 | { return reserved_word(yyscanner); } |
michael@0 | 1365 | YY_BREAK |
michael@0 | 1366 | case 61: |
michael@0 | 1367 | YY_RULE_SETUP |
michael@0 | 1368 | { return reserved_word(yyscanner); } |
michael@0 | 1369 | YY_BREAK |
michael@0 | 1370 | case 62: |
michael@0 | 1371 | YY_RULE_SETUP |
michael@0 | 1372 | { return reserved_word(yyscanner); } |
michael@0 | 1373 | YY_BREAK |
michael@0 | 1374 | case 63: |
michael@0 | 1375 | YY_RULE_SETUP |
michael@0 | 1376 | { return reserved_word(yyscanner); } |
michael@0 | 1377 | YY_BREAK |
michael@0 | 1378 | case 64: |
michael@0 | 1379 | YY_RULE_SETUP |
michael@0 | 1380 | { return reserved_word(yyscanner); } |
michael@0 | 1381 | YY_BREAK |
michael@0 | 1382 | case 65: |
michael@0 | 1383 | YY_RULE_SETUP |
michael@0 | 1384 | { return reserved_word(yyscanner); } |
michael@0 | 1385 | YY_BREAK |
michael@0 | 1386 | case 66: |
michael@0 | 1387 | YY_RULE_SETUP |
michael@0 | 1388 | { return reserved_word(yyscanner); } |
michael@0 | 1389 | YY_BREAK |
michael@0 | 1390 | case 67: |
michael@0 | 1391 | YY_RULE_SETUP |
michael@0 | 1392 | { return reserved_word(yyscanner); } |
michael@0 | 1393 | YY_BREAK |
michael@0 | 1394 | case 68: |
michael@0 | 1395 | YY_RULE_SETUP |
michael@0 | 1396 | { return reserved_word(yyscanner); } |
michael@0 | 1397 | YY_BREAK |
michael@0 | 1398 | case 69: |
michael@0 | 1399 | YY_RULE_SETUP |
michael@0 | 1400 | { return reserved_word(yyscanner); } |
michael@0 | 1401 | YY_BREAK |
michael@0 | 1402 | case 70: |
michael@0 | 1403 | YY_RULE_SETUP |
michael@0 | 1404 | { return reserved_word(yyscanner); } |
michael@0 | 1405 | YY_BREAK |
michael@0 | 1406 | case 71: |
michael@0 | 1407 | YY_RULE_SETUP |
michael@0 | 1408 | { return reserved_word(yyscanner); } |
michael@0 | 1409 | YY_BREAK |
michael@0 | 1410 | case 72: |
michael@0 | 1411 | YY_RULE_SETUP |
michael@0 | 1412 | { return reserved_word(yyscanner); } |
michael@0 | 1413 | YY_BREAK |
michael@0 | 1414 | case 73: |
michael@0 | 1415 | YY_RULE_SETUP |
michael@0 | 1416 | { return reserved_word(yyscanner); } |
michael@0 | 1417 | YY_BREAK |
michael@0 | 1418 | case 74: |
michael@0 | 1419 | YY_RULE_SETUP |
michael@0 | 1420 | { return reserved_word(yyscanner); } |
michael@0 | 1421 | YY_BREAK |
michael@0 | 1422 | case 75: |
michael@0 | 1423 | YY_RULE_SETUP |
michael@0 | 1424 | { return reserved_word(yyscanner); } |
michael@0 | 1425 | YY_BREAK |
michael@0 | 1426 | case 76: |
michael@0 | 1427 | YY_RULE_SETUP |
michael@0 | 1428 | { return reserved_word(yyscanner); } |
michael@0 | 1429 | YY_BREAK |
michael@0 | 1430 | case 77: |
michael@0 | 1431 | YY_RULE_SETUP |
michael@0 | 1432 | { return reserved_word(yyscanner); } |
michael@0 | 1433 | YY_BREAK |
michael@0 | 1434 | case 78: |
michael@0 | 1435 | YY_RULE_SETUP |
michael@0 | 1436 | { return reserved_word(yyscanner); } |
michael@0 | 1437 | YY_BREAK |
michael@0 | 1438 | case 79: |
michael@0 | 1439 | YY_RULE_SETUP |
michael@0 | 1440 | { return reserved_word(yyscanner); } |
michael@0 | 1441 | YY_BREAK |
michael@0 | 1442 | case 80: |
michael@0 | 1443 | YY_RULE_SETUP |
michael@0 | 1444 | { return reserved_word(yyscanner); } |
michael@0 | 1445 | YY_BREAK |
michael@0 | 1446 | case 81: |
michael@0 | 1447 | YY_RULE_SETUP |
michael@0 | 1448 | { return reserved_word(yyscanner); } |
michael@0 | 1449 | YY_BREAK |
michael@0 | 1450 | case 82: |
michael@0 | 1451 | YY_RULE_SETUP |
michael@0 | 1452 | { return reserved_word(yyscanner); } |
michael@0 | 1453 | YY_BREAK |
michael@0 | 1454 | case 83: |
michael@0 | 1455 | YY_RULE_SETUP |
michael@0 | 1456 | { return reserved_word(yyscanner); } |
michael@0 | 1457 | YY_BREAK |
michael@0 | 1458 | case 84: |
michael@0 | 1459 | YY_RULE_SETUP |
michael@0 | 1460 | { return reserved_word(yyscanner); } |
michael@0 | 1461 | YY_BREAK |
michael@0 | 1462 | case 85: |
michael@0 | 1463 | YY_RULE_SETUP |
michael@0 | 1464 | { return reserved_word(yyscanner); } |
michael@0 | 1465 | YY_BREAK |
michael@0 | 1466 | case 86: |
michael@0 | 1467 | YY_RULE_SETUP |
michael@0 | 1468 | { return reserved_word(yyscanner); } |
michael@0 | 1469 | YY_BREAK |
michael@0 | 1470 | case 87: |
michael@0 | 1471 | YY_RULE_SETUP |
michael@0 | 1472 | { return reserved_word(yyscanner); } |
michael@0 | 1473 | YY_BREAK |
michael@0 | 1474 | case 88: |
michael@0 | 1475 | YY_RULE_SETUP |
michael@0 | 1476 | { return reserved_word(yyscanner); } |
michael@0 | 1477 | YY_BREAK |
michael@0 | 1478 | case 89: |
michael@0 | 1479 | YY_RULE_SETUP |
michael@0 | 1480 | { return reserved_word(yyscanner); } |
michael@0 | 1481 | YY_BREAK |
michael@0 | 1482 | case 90: |
michael@0 | 1483 | YY_RULE_SETUP |
michael@0 | 1484 | { return reserved_word(yyscanner); } |
michael@0 | 1485 | YY_BREAK |
michael@0 | 1486 | case 91: |
michael@0 | 1487 | YY_RULE_SETUP |
michael@0 | 1488 | { return reserved_word(yyscanner); } |
michael@0 | 1489 | YY_BREAK |
michael@0 | 1490 | case 92: |
michael@0 | 1491 | YY_RULE_SETUP |
michael@0 | 1492 | { return reserved_word(yyscanner); } |
michael@0 | 1493 | YY_BREAK |
michael@0 | 1494 | case 93: |
michael@0 | 1495 | YY_RULE_SETUP |
michael@0 | 1496 | { |
michael@0 | 1497 | yylval->lex.string = NewPoolTString(yytext); |
michael@0 | 1498 | return check_type(yyscanner); |
michael@0 | 1499 | } |
michael@0 | 1500 | YY_BREAK |
michael@0 | 1501 | case 94: |
michael@0 | 1502 | YY_RULE_SETUP |
michael@0 | 1503 | { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } |
michael@0 | 1504 | YY_BREAK |
michael@0 | 1505 | case 95: |
michael@0 | 1506 | YY_RULE_SETUP |
michael@0 | 1507 | { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } |
michael@0 | 1508 | YY_BREAK |
michael@0 | 1509 | case 96: |
michael@0 | 1510 | YY_RULE_SETUP |
michael@0 | 1511 | { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } |
michael@0 | 1512 | YY_BREAK |
michael@0 | 1513 | case 97: |
michael@0 | 1514 | YY_RULE_SETUP |
michael@0 | 1515 | { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } |
michael@0 | 1516 | YY_BREAK |
michael@0 | 1517 | case 98: |
michael@0 | 1518 | YY_RULE_SETUP |
michael@0 | 1519 | { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } |
michael@0 | 1520 | YY_BREAK |
michael@0 | 1521 | case 99: |
michael@0 | 1522 | YY_RULE_SETUP |
michael@0 | 1523 | { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } |
michael@0 | 1524 | YY_BREAK |
michael@0 | 1525 | case 100: |
michael@0 | 1526 | YY_RULE_SETUP |
michael@0 | 1527 | { return ADD_ASSIGN; } |
michael@0 | 1528 | YY_BREAK |
michael@0 | 1529 | case 101: |
michael@0 | 1530 | YY_RULE_SETUP |
michael@0 | 1531 | { return SUB_ASSIGN; } |
michael@0 | 1532 | YY_BREAK |
michael@0 | 1533 | case 102: |
michael@0 | 1534 | YY_RULE_SETUP |
michael@0 | 1535 | { return MUL_ASSIGN; } |
michael@0 | 1536 | YY_BREAK |
michael@0 | 1537 | case 103: |
michael@0 | 1538 | YY_RULE_SETUP |
michael@0 | 1539 | { return DIV_ASSIGN; } |
michael@0 | 1540 | YY_BREAK |
michael@0 | 1541 | case 104: |
michael@0 | 1542 | YY_RULE_SETUP |
michael@0 | 1543 | { return MOD_ASSIGN; } |
michael@0 | 1544 | YY_BREAK |
michael@0 | 1545 | case 105: |
michael@0 | 1546 | YY_RULE_SETUP |
michael@0 | 1547 | { return LEFT_ASSIGN; } |
michael@0 | 1548 | YY_BREAK |
michael@0 | 1549 | case 106: |
michael@0 | 1550 | YY_RULE_SETUP |
michael@0 | 1551 | { return RIGHT_ASSIGN; } |
michael@0 | 1552 | YY_BREAK |
michael@0 | 1553 | case 107: |
michael@0 | 1554 | YY_RULE_SETUP |
michael@0 | 1555 | { return AND_ASSIGN; } |
michael@0 | 1556 | YY_BREAK |
michael@0 | 1557 | case 108: |
michael@0 | 1558 | YY_RULE_SETUP |
michael@0 | 1559 | { return XOR_ASSIGN; } |
michael@0 | 1560 | YY_BREAK |
michael@0 | 1561 | case 109: |
michael@0 | 1562 | YY_RULE_SETUP |
michael@0 | 1563 | { return OR_ASSIGN; } |
michael@0 | 1564 | YY_BREAK |
michael@0 | 1565 | case 110: |
michael@0 | 1566 | YY_RULE_SETUP |
michael@0 | 1567 | { return INC_OP; } |
michael@0 | 1568 | YY_BREAK |
michael@0 | 1569 | case 111: |
michael@0 | 1570 | YY_RULE_SETUP |
michael@0 | 1571 | { return DEC_OP; } |
michael@0 | 1572 | YY_BREAK |
michael@0 | 1573 | case 112: |
michael@0 | 1574 | YY_RULE_SETUP |
michael@0 | 1575 | { return AND_OP; } |
michael@0 | 1576 | YY_BREAK |
michael@0 | 1577 | case 113: |
michael@0 | 1578 | YY_RULE_SETUP |
michael@0 | 1579 | { return OR_OP; } |
michael@0 | 1580 | YY_BREAK |
michael@0 | 1581 | case 114: |
michael@0 | 1582 | YY_RULE_SETUP |
michael@0 | 1583 | { return XOR_OP; } |
michael@0 | 1584 | YY_BREAK |
michael@0 | 1585 | case 115: |
michael@0 | 1586 | YY_RULE_SETUP |
michael@0 | 1587 | { return LE_OP; } |
michael@0 | 1588 | YY_BREAK |
michael@0 | 1589 | case 116: |
michael@0 | 1590 | YY_RULE_SETUP |
michael@0 | 1591 | { return GE_OP; } |
michael@0 | 1592 | YY_BREAK |
michael@0 | 1593 | case 117: |
michael@0 | 1594 | YY_RULE_SETUP |
michael@0 | 1595 | { return EQ_OP; } |
michael@0 | 1596 | YY_BREAK |
michael@0 | 1597 | case 118: |
michael@0 | 1598 | YY_RULE_SETUP |
michael@0 | 1599 | { return NE_OP; } |
michael@0 | 1600 | YY_BREAK |
michael@0 | 1601 | case 119: |
michael@0 | 1602 | YY_RULE_SETUP |
michael@0 | 1603 | { return LEFT_OP; } |
michael@0 | 1604 | YY_BREAK |
michael@0 | 1605 | case 120: |
michael@0 | 1606 | YY_RULE_SETUP |
michael@0 | 1607 | { return RIGHT_OP; } |
michael@0 | 1608 | YY_BREAK |
michael@0 | 1609 | case 121: |
michael@0 | 1610 | YY_RULE_SETUP |
michael@0 | 1611 | { return SEMICOLON; } |
michael@0 | 1612 | YY_BREAK |
michael@0 | 1613 | case 122: |
michael@0 | 1614 | YY_RULE_SETUP |
michael@0 | 1615 | { return LEFT_BRACE; } |
michael@0 | 1616 | YY_BREAK |
michael@0 | 1617 | case 123: |
michael@0 | 1618 | YY_RULE_SETUP |
michael@0 | 1619 | { return RIGHT_BRACE; } |
michael@0 | 1620 | YY_BREAK |
michael@0 | 1621 | case 124: |
michael@0 | 1622 | YY_RULE_SETUP |
michael@0 | 1623 | { return COMMA; } |
michael@0 | 1624 | YY_BREAK |
michael@0 | 1625 | case 125: |
michael@0 | 1626 | YY_RULE_SETUP |
michael@0 | 1627 | { return COLON; } |
michael@0 | 1628 | YY_BREAK |
michael@0 | 1629 | case 126: |
michael@0 | 1630 | YY_RULE_SETUP |
michael@0 | 1631 | { return EQUAL; } |
michael@0 | 1632 | YY_BREAK |
michael@0 | 1633 | case 127: |
michael@0 | 1634 | YY_RULE_SETUP |
michael@0 | 1635 | { return LEFT_PAREN; } |
michael@0 | 1636 | YY_BREAK |
michael@0 | 1637 | case 128: |
michael@0 | 1638 | YY_RULE_SETUP |
michael@0 | 1639 | { return RIGHT_PAREN; } |
michael@0 | 1640 | YY_BREAK |
michael@0 | 1641 | case 129: |
michael@0 | 1642 | YY_RULE_SETUP |
michael@0 | 1643 | { return LEFT_BRACKET; } |
michael@0 | 1644 | YY_BREAK |
michael@0 | 1645 | case 130: |
michael@0 | 1646 | YY_RULE_SETUP |
michael@0 | 1647 | { return RIGHT_BRACKET; } |
michael@0 | 1648 | YY_BREAK |
michael@0 | 1649 | case 131: |
michael@0 | 1650 | YY_RULE_SETUP |
michael@0 | 1651 | { return DOT; } |
michael@0 | 1652 | YY_BREAK |
michael@0 | 1653 | case 132: |
michael@0 | 1654 | YY_RULE_SETUP |
michael@0 | 1655 | { return BANG; } |
michael@0 | 1656 | YY_BREAK |
michael@0 | 1657 | case 133: |
michael@0 | 1658 | YY_RULE_SETUP |
michael@0 | 1659 | { return DASH; } |
michael@0 | 1660 | YY_BREAK |
michael@0 | 1661 | case 134: |
michael@0 | 1662 | YY_RULE_SETUP |
michael@0 | 1663 | { return TILDE; } |
michael@0 | 1664 | YY_BREAK |
michael@0 | 1665 | case 135: |
michael@0 | 1666 | YY_RULE_SETUP |
michael@0 | 1667 | { return PLUS; } |
michael@0 | 1668 | YY_BREAK |
michael@0 | 1669 | case 136: |
michael@0 | 1670 | YY_RULE_SETUP |
michael@0 | 1671 | { return STAR; } |
michael@0 | 1672 | YY_BREAK |
michael@0 | 1673 | case 137: |
michael@0 | 1674 | YY_RULE_SETUP |
michael@0 | 1675 | { return SLASH; } |
michael@0 | 1676 | YY_BREAK |
michael@0 | 1677 | case 138: |
michael@0 | 1678 | YY_RULE_SETUP |
michael@0 | 1679 | { return PERCENT; } |
michael@0 | 1680 | YY_BREAK |
michael@0 | 1681 | case 139: |
michael@0 | 1682 | YY_RULE_SETUP |
michael@0 | 1683 | { return LEFT_ANGLE; } |
michael@0 | 1684 | YY_BREAK |
michael@0 | 1685 | case 140: |
michael@0 | 1686 | YY_RULE_SETUP |
michael@0 | 1687 | { return RIGHT_ANGLE; } |
michael@0 | 1688 | YY_BREAK |
michael@0 | 1689 | case 141: |
michael@0 | 1690 | YY_RULE_SETUP |
michael@0 | 1691 | { return VERTICAL_BAR; } |
michael@0 | 1692 | YY_BREAK |
michael@0 | 1693 | case 142: |
michael@0 | 1694 | YY_RULE_SETUP |
michael@0 | 1695 | { return CARET; } |
michael@0 | 1696 | YY_BREAK |
michael@0 | 1697 | case 143: |
michael@0 | 1698 | YY_RULE_SETUP |
michael@0 | 1699 | { return AMPERSAND; } |
michael@0 | 1700 | YY_BREAK |
michael@0 | 1701 | case 144: |
michael@0 | 1702 | YY_RULE_SETUP |
michael@0 | 1703 | { return QUESTION; } |
michael@0 | 1704 | YY_BREAK |
michael@0 | 1705 | case 145: |
michael@0 | 1706 | /* rule 145 can match eol */ |
michael@0 | 1707 | YY_RULE_SETUP |
michael@0 | 1708 | { } |
michael@0 | 1709 | YY_BREAK |
michael@0 | 1710 | case YY_STATE_EOF(INITIAL): |
michael@0 | 1711 | { yyterminate(); } |
michael@0 | 1712 | YY_BREAK |
michael@0 | 1713 | case 146: |
michael@0 | 1714 | YY_RULE_SETUP |
michael@0 | 1715 | { assert(false); return 0; } |
michael@0 | 1716 | YY_BREAK |
michael@0 | 1717 | case 147: |
michael@0 | 1718 | YY_RULE_SETUP |
michael@0 | 1719 | ECHO; |
michael@0 | 1720 | YY_BREAK |
michael@0 | 1721 | |
michael@0 | 1722 | case YY_END_OF_BUFFER: |
michael@0 | 1723 | { |
michael@0 | 1724 | /* Amount of text matched not including the EOB char. */ |
michael@0 | 1725 | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
michael@0 | 1726 | |
michael@0 | 1727 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
michael@0 | 1728 | *yy_cp = yyg->yy_hold_char; |
michael@0 | 1729 | YY_RESTORE_YY_MORE_OFFSET |
michael@0 | 1730 | |
michael@0 | 1731 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
michael@0 | 1732 | { |
michael@0 | 1733 | /* We're scanning a new file or input source. It's |
michael@0 | 1734 | * possible that this happened because the user |
michael@0 | 1735 | * just pointed yyin at a new source and called |
michael@0 | 1736 | * yylex(). If so, then we have to assure |
michael@0 | 1737 | * consistency between YY_CURRENT_BUFFER and our |
michael@0 | 1738 | * globals. Here is the right place to do so, because |
michael@0 | 1739 | * this is the first action (other than possibly a |
michael@0 | 1740 | * back-up) that will match for the new input source. |
michael@0 | 1741 | */ |
michael@0 | 1742 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
michael@0 | 1743 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
michael@0 | 1744 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
michael@0 | 1745 | } |
michael@0 | 1746 | |
michael@0 | 1747 | /* Note that here we test for yy_c_buf_p "<=" to the position |
michael@0 | 1748 | * of the first EOB in the buffer, since yy_c_buf_p will |
michael@0 | 1749 | * already have been incremented past the NUL character |
michael@0 | 1750 | * (since all states make transitions on EOB to the |
michael@0 | 1751 | * end-of-buffer state). Contrast this with the test |
michael@0 | 1752 | * in input(). |
michael@0 | 1753 | */ |
michael@0 | 1754 | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
michael@0 | 1755 | { /* This was really a NUL. */ |
michael@0 | 1756 | yy_state_type yy_next_state; |
michael@0 | 1757 | |
michael@0 | 1758 | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
michael@0 | 1759 | |
michael@0 | 1760 | yy_current_state = yy_get_previous_state( yyscanner ); |
michael@0 | 1761 | |
michael@0 | 1762 | /* Okay, we're now positioned to make the NUL |
michael@0 | 1763 | * transition. We couldn't have |
michael@0 | 1764 | * yy_get_previous_state() go ahead and do it |
michael@0 | 1765 | * for us because it doesn't know how to deal |
michael@0 | 1766 | * with the possibility of jamming (and we don't |
michael@0 | 1767 | * want to build jamming into it because then it |
michael@0 | 1768 | * will run more slowly). |
michael@0 | 1769 | */ |
michael@0 | 1770 | |
michael@0 | 1771 | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
michael@0 | 1772 | |
michael@0 | 1773 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
michael@0 | 1774 | |
michael@0 | 1775 | if ( yy_next_state ) |
michael@0 | 1776 | { |
michael@0 | 1777 | /* Consume the NUL. */ |
michael@0 | 1778 | yy_cp = ++yyg->yy_c_buf_p; |
michael@0 | 1779 | yy_current_state = yy_next_state; |
michael@0 | 1780 | goto yy_match; |
michael@0 | 1781 | } |
michael@0 | 1782 | |
michael@0 | 1783 | else |
michael@0 | 1784 | { |
michael@0 | 1785 | yy_cp = yyg->yy_last_accepting_cpos; |
michael@0 | 1786 | yy_current_state = yyg->yy_last_accepting_state; |
michael@0 | 1787 | goto yy_find_action; |
michael@0 | 1788 | } |
michael@0 | 1789 | } |
michael@0 | 1790 | |
michael@0 | 1791 | else switch ( yy_get_next_buffer( yyscanner ) ) |
michael@0 | 1792 | { |
michael@0 | 1793 | case EOB_ACT_END_OF_FILE: |
michael@0 | 1794 | { |
michael@0 | 1795 | yyg->yy_did_buffer_switch_on_eof = 0; |
michael@0 | 1796 | |
michael@0 | 1797 | if ( yywrap(yyscanner ) ) |
michael@0 | 1798 | { |
michael@0 | 1799 | /* Note: because we've taken care in |
michael@0 | 1800 | * yy_get_next_buffer() to have set up |
michael@0 | 1801 | * yytext, we can now set up |
michael@0 | 1802 | * yy_c_buf_p so that if some total |
michael@0 | 1803 | * hoser (like flex itself) wants to |
michael@0 | 1804 | * call the scanner after we return the |
michael@0 | 1805 | * YY_NULL, it'll still work - another |
michael@0 | 1806 | * YY_NULL will get returned. |
michael@0 | 1807 | */ |
michael@0 | 1808 | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
michael@0 | 1809 | |
michael@0 | 1810 | yy_act = YY_STATE_EOF(YY_START); |
michael@0 | 1811 | goto do_action; |
michael@0 | 1812 | } |
michael@0 | 1813 | |
michael@0 | 1814 | else |
michael@0 | 1815 | { |
michael@0 | 1816 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
michael@0 | 1817 | YY_NEW_FILE; |
michael@0 | 1818 | } |
michael@0 | 1819 | break; |
michael@0 | 1820 | } |
michael@0 | 1821 | |
michael@0 | 1822 | case EOB_ACT_CONTINUE_SCAN: |
michael@0 | 1823 | yyg->yy_c_buf_p = |
michael@0 | 1824 | yyg->yytext_ptr + yy_amount_of_matched_text; |
michael@0 | 1825 | |
michael@0 | 1826 | yy_current_state = yy_get_previous_state( yyscanner ); |
michael@0 | 1827 | |
michael@0 | 1828 | yy_cp = yyg->yy_c_buf_p; |
michael@0 | 1829 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
michael@0 | 1830 | goto yy_match; |
michael@0 | 1831 | |
michael@0 | 1832 | case EOB_ACT_LAST_MATCH: |
michael@0 | 1833 | yyg->yy_c_buf_p = |
michael@0 | 1834 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
michael@0 | 1835 | |
michael@0 | 1836 | yy_current_state = yy_get_previous_state( yyscanner ); |
michael@0 | 1837 | |
michael@0 | 1838 | yy_cp = yyg->yy_c_buf_p; |
michael@0 | 1839 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
michael@0 | 1840 | goto yy_find_action; |
michael@0 | 1841 | } |
michael@0 | 1842 | break; |
michael@0 | 1843 | } |
michael@0 | 1844 | |
michael@0 | 1845 | default: |
michael@0 | 1846 | YY_FATAL_ERROR( |
michael@0 | 1847 | "fatal flex scanner internal error--no action found" ); |
michael@0 | 1848 | } /* end of action switch */ |
michael@0 | 1849 | } /* end of scanning one token */ |
michael@0 | 1850 | } /* end of yylex */ |
michael@0 | 1851 | |
michael@0 | 1852 | /* yy_get_next_buffer - try to read in a new buffer |
michael@0 | 1853 | * |
michael@0 | 1854 | * Returns a code representing an action: |
michael@0 | 1855 | * EOB_ACT_LAST_MATCH - |
michael@0 | 1856 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
michael@0 | 1857 | * EOB_ACT_END_OF_FILE - end of file |
michael@0 | 1858 | */ |
michael@0 | 1859 | static int yy_get_next_buffer (yyscan_t yyscanner) |
michael@0 | 1860 | { |
michael@0 | 1861 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 1862 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
michael@0 | 1863 | register char *source = yyg->yytext_ptr; |
michael@0 | 1864 | register int number_to_move, i; |
michael@0 | 1865 | int ret_val; |
michael@0 | 1866 | |
michael@0 | 1867 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
michael@0 | 1868 | YY_FATAL_ERROR( |
michael@0 | 1869 | "fatal flex scanner internal error--end of buffer missed" ); |
michael@0 | 1870 | |
michael@0 | 1871 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
michael@0 | 1872 | { /* Don't try to fill the buffer, so this is an EOF. */ |
michael@0 | 1873 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
michael@0 | 1874 | { |
michael@0 | 1875 | /* We matched a single character, the EOB, so |
michael@0 | 1876 | * treat this as a final EOF. |
michael@0 | 1877 | */ |
michael@0 | 1878 | return EOB_ACT_END_OF_FILE; |
michael@0 | 1879 | } |
michael@0 | 1880 | |
michael@0 | 1881 | else |
michael@0 | 1882 | { |
michael@0 | 1883 | /* We matched some text prior to the EOB, first |
michael@0 | 1884 | * process it. |
michael@0 | 1885 | */ |
michael@0 | 1886 | return EOB_ACT_LAST_MATCH; |
michael@0 | 1887 | } |
michael@0 | 1888 | } |
michael@0 | 1889 | |
michael@0 | 1890 | /* Try to read more data. */ |
michael@0 | 1891 | |
michael@0 | 1892 | /* First move last chars to start of buffer. */ |
michael@0 | 1893 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; |
michael@0 | 1894 | |
michael@0 | 1895 | for ( i = 0; i < number_to_move; ++i ) |
michael@0 | 1896 | *(dest++) = *(source++); |
michael@0 | 1897 | |
michael@0 | 1898 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
michael@0 | 1899 | /* don't do the read, it's not guaranteed to return an EOF, |
michael@0 | 1900 | * just force an EOF |
michael@0 | 1901 | */ |
michael@0 | 1902 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
michael@0 | 1903 | |
michael@0 | 1904 | else |
michael@0 | 1905 | { |
michael@0 | 1906 | yy_size_t num_to_read = |
michael@0 | 1907 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
michael@0 | 1908 | |
michael@0 | 1909 | while ( num_to_read <= 0 ) |
michael@0 | 1910 | { /* Not enough room in the buffer - grow it. */ |
michael@0 | 1911 | |
michael@0 | 1912 | /* just a shorter name for the current buffer */ |
michael@0 | 1913 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
michael@0 | 1914 | |
michael@0 | 1915 | int yy_c_buf_p_offset = |
michael@0 | 1916 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
michael@0 | 1917 | |
michael@0 | 1918 | if ( b->yy_is_our_buffer ) |
michael@0 | 1919 | { |
michael@0 | 1920 | yy_size_t new_size = b->yy_buf_size * 2; |
michael@0 | 1921 | |
michael@0 | 1922 | if ( new_size <= 0 ) |
michael@0 | 1923 | b->yy_buf_size += b->yy_buf_size / 8; |
michael@0 | 1924 | else |
michael@0 | 1925 | b->yy_buf_size *= 2; |
michael@0 | 1926 | |
michael@0 | 1927 | b->yy_ch_buf = (char *) |
michael@0 | 1928 | /* Include room in for 2 EOB chars. */ |
michael@0 | 1929 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); |
michael@0 | 1930 | } |
michael@0 | 1931 | else |
michael@0 | 1932 | /* Can't grow it, we don't own it. */ |
michael@0 | 1933 | b->yy_ch_buf = 0; |
michael@0 | 1934 | |
michael@0 | 1935 | if ( ! b->yy_ch_buf ) |
michael@0 | 1936 | YY_FATAL_ERROR( |
michael@0 | 1937 | "fatal error - scanner input buffer overflow" ); |
michael@0 | 1938 | |
michael@0 | 1939 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
michael@0 | 1940 | |
michael@0 | 1941 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
michael@0 | 1942 | number_to_move - 1; |
michael@0 | 1943 | |
michael@0 | 1944 | } |
michael@0 | 1945 | |
michael@0 | 1946 | if ( num_to_read > YY_READ_BUF_SIZE ) |
michael@0 | 1947 | num_to_read = YY_READ_BUF_SIZE; |
michael@0 | 1948 | |
michael@0 | 1949 | /* Read in more data. */ |
michael@0 | 1950 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
michael@0 | 1951 | yyg->yy_n_chars, num_to_read ); |
michael@0 | 1952 | |
michael@0 | 1953 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
michael@0 | 1954 | } |
michael@0 | 1955 | |
michael@0 | 1956 | if ( yyg->yy_n_chars == 0 ) |
michael@0 | 1957 | { |
michael@0 | 1958 | if ( number_to_move == YY_MORE_ADJ ) |
michael@0 | 1959 | { |
michael@0 | 1960 | ret_val = EOB_ACT_END_OF_FILE; |
michael@0 | 1961 | yyrestart(yyin ,yyscanner); |
michael@0 | 1962 | } |
michael@0 | 1963 | |
michael@0 | 1964 | else |
michael@0 | 1965 | { |
michael@0 | 1966 | ret_val = EOB_ACT_LAST_MATCH; |
michael@0 | 1967 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
michael@0 | 1968 | YY_BUFFER_EOF_PENDING; |
michael@0 | 1969 | } |
michael@0 | 1970 | } |
michael@0 | 1971 | |
michael@0 | 1972 | else |
michael@0 | 1973 | ret_val = EOB_ACT_CONTINUE_SCAN; |
michael@0 | 1974 | |
michael@0 | 1975 | if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
michael@0 | 1976 | /* Extend the array by 50%, plus the number we really need. */ |
michael@0 | 1977 | yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
michael@0 | 1978 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); |
michael@0 | 1979 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
michael@0 | 1980 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
michael@0 | 1981 | } |
michael@0 | 1982 | |
michael@0 | 1983 | yyg->yy_n_chars += number_to_move; |
michael@0 | 1984 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
michael@0 | 1985 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
michael@0 | 1986 | |
michael@0 | 1987 | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
michael@0 | 1988 | |
michael@0 | 1989 | return ret_val; |
michael@0 | 1990 | } |
michael@0 | 1991 | |
michael@0 | 1992 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
michael@0 | 1993 | |
michael@0 | 1994 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
michael@0 | 1995 | { |
michael@0 | 1996 | register yy_state_type yy_current_state; |
michael@0 | 1997 | register char *yy_cp; |
michael@0 | 1998 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 1999 | |
michael@0 | 2000 | yy_current_state = yyg->yy_start; |
michael@0 | 2001 | |
michael@0 | 2002 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
michael@0 | 2003 | { |
michael@0 | 2004 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
michael@0 | 2005 | if ( yy_accept[yy_current_state] ) |
michael@0 | 2006 | { |
michael@0 | 2007 | yyg->yy_last_accepting_state = yy_current_state; |
michael@0 | 2008 | yyg->yy_last_accepting_cpos = yy_cp; |
michael@0 | 2009 | } |
michael@0 | 2010 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
michael@0 | 2011 | { |
michael@0 | 2012 | yy_current_state = (int) yy_def[yy_current_state]; |
michael@0 | 2013 | if ( yy_current_state >= 443 ) |
michael@0 | 2014 | yy_c = yy_meta[(unsigned int) yy_c]; |
michael@0 | 2015 | } |
michael@0 | 2016 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
michael@0 | 2017 | } |
michael@0 | 2018 | |
michael@0 | 2019 | return yy_current_state; |
michael@0 | 2020 | } |
michael@0 | 2021 | |
michael@0 | 2022 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
michael@0 | 2023 | * |
michael@0 | 2024 | * synopsis |
michael@0 | 2025 | * next_state = yy_try_NUL_trans( current_state ); |
michael@0 | 2026 | */ |
michael@0 | 2027 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
michael@0 | 2028 | { |
michael@0 | 2029 | register int yy_is_jam; |
michael@0 | 2030 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
michael@0 | 2031 | register char *yy_cp = yyg->yy_c_buf_p; |
michael@0 | 2032 | |
michael@0 | 2033 | register YY_CHAR yy_c = 1; |
michael@0 | 2034 | if ( yy_accept[yy_current_state] ) |
michael@0 | 2035 | { |
michael@0 | 2036 | yyg->yy_last_accepting_state = yy_current_state; |
michael@0 | 2037 | yyg->yy_last_accepting_cpos = yy_cp; |
michael@0 | 2038 | } |
michael@0 | 2039 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
michael@0 | 2040 | { |
michael@0 | 2041 | yy_current_state = (int) yy_def[yy_current_state]; |
michael@0 | 2042 | if ( yy_current_state >= 443 ) |
michael@0 | 2043 | yy_c = yy_meta[(unsigned int) yy_c]; |
michael@0 | 2044 | } |
michael@0 | 2045 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
michael@0 | 2046 | yy_is_jam = (yy_current_state == 442); |
michael@0 | 2047 | |
michael@0 | 2048 | return yy_is_jam ? 0 : yy_current_state; |
michael@0 | 2049 | } |
michael@0 | 2050 | |
michael@0 | 2051 | #ifndef YY_NO_INPUT |
michael@0 | 2052 | #ifdef __cplusplus |
michael@0 | 2053 | static int yyinput (yyscan_t yyscanner) |
michael@0 | 2054 | #else |
michael@0 | 2055 | static int input (yyscan_t yyscanner) |
michael@0 | 2056 | #endif |
michael@0 | 2057 | |
michael@0 | 2058 | { |
michael@0 | 2059 | int c; |
michael@0 | 2060 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2061 | |
michael@0 | 2062 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
michael@0 | 2063 | |
michael@0 | 2064 | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
michael@0 | 2065 | { |
michael@0 | 2066 | /* yy_c_buf_p now points to the character we want to return. |
michael@0 | 2067 | * If this occurs *before* the EOB characters, then it's a |
michael@0 | 2068 | * valid NUL; if not, then we've hit the end of the buffer. |
michael@0 | 2069 | */ |
michael@0 | 2070 | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
michael@0 | 2071 | /* This was really a NUL. */ |
michael@0 | 2072 | *yyg->yy_c_buf_p = '\0'; |
michael@0 | 2073 | |
michael@0 | 2074 | else |
michael@0 | 2075 | { /* need more input */ |
michael@0 | 2076 | yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; |
michael@0 | 2077 | ++yyg->yy_c_buf_p; |
michael@0 | 2078 | |
michael@0 | 2079 | switch ( yy_get_next_buffer( yyscanner ) ) |
michael@0 | 2080 | { |
michael@0 | 2081 | case EOB_ACT_LAST_MATCH: |
michael@0 | 2082 | /* This happens because yy_g_n_b() |
michael@0 | 2083 | * sees that we've accumulated a |
michael@0 | 2084 | * token and flags that we need to |
michael@0 | 2085 | * try matching the token before |
michael@0 | 2086 | * proceeding. But for input(), |
michael@0 | 2087 | * there's no matching to consider. |
michael@0 | 2088 | * So convert the EOB_ACT_LAST_MATCH |
michael@0 | 2089 | * to EOB_ACT_END_OF_FILE. |
michael@0 | 2090 | */ |
michael@0 | 2091 | |
michael@0 | 2092 | /* Reset buffer status. */ |
michael@0 | 2093 | yyrestart(yyin ,yyscanner); |
michael@0 | 2094 | |
michael@0 | 2095 | /*FALLTHROUGH*/ |
michael@0 | 2096 | |
michael@0 | 2097 | case EOB_ACT_END_OF_FILE: |
michael@0 | 2098 | { |
michael@0 | 2099 | if ( yywrap(yyscanner ) ) |
michael@0 | 2100 | return EOF; |
michael@0 | 2101 | |
michael@0 | 2102 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
michael@0 | 2103 | YY_NEW_FILE; |
michael@0 | 2104 | #ifdef __cplusplus |
michael@0 | 2105 | return yyinput(yyscanner); |
michael@0 | 2106 | #else |
michael@0 | 2107 | return input(yyscanner); |
michael@0 | 2108 | #endif |
michael@0 | 2109 | } |
michael@0 | 2110 | |
michael@0 | 2111 | case EOB_ACT_CONTINUE_SCAN: |
michael@0 | 2112 | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
michael@0 | 2113 | break; |
michael@0 | 2114 | } |
michael@0 | 2115 | } |
michael@0 | 2116 | } |
michael@0 | 2117 | |
michael@0 | 2118 | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
michael@0 | 2119 | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
michael@0 | 2120 | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
michael@0 | 2121 | |
michael@0 | 2122 | if ( c == '\n' ) |
michael@0 | 2123 | |
michael@0 | 2124 | do{ yylineno++; |
michael@0 | 2125 | yycolumn=0; |
michael@0 | 2126 | }while(0) |
michael@0 | 2127 | ; |
michael@0 | 2128 | |
michael@0 | 2129 | return c; |
michael@0 | 2130 | } |
michael@0 | 2131 | #endif /* ifndef YY_NO_INPUT */ |
michael@0 | 2132 | |
michael@0 | 2133 | /** Immediately switch to a different input stream. |
michael@0 | 2134 | * @param input_file A readable stream. |
michael@0 | 2135 | * @param yyscanner The scanner object. |
michael@0 | 2136 | * @note This function does not reset the start condition to @c INITIAL . |
michael@0 | 2137 | */ |
michael@0 | 2138 | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
michael@0 | 2139 | { |
michael@0 | 2140 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2141 | |
michael@0 | 2142 | if ( ! YY_CURRENT_BUFFER ){ |
michael@0 | 2143 | yyensure_buffer_stack (yyscanner); |
michael@0 | 2144 | YY_CURRENT_BUFFER_LVALUE = |
michael@0 | 2145 | yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
michael@0 | 2146 | } |
michael@0 | 2147 | |
michael@0 | 2148 | yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); |
michael@0 | 2149 | yy_load_buffer_state(yyscanner ); |
michael@0 | 2150 | } |
michael@0 | 2151 | |
michael@0 | 2152 | /** Switch to a different input buffer. |
michael@0 | 2153 | * @param new_buffer The new input buffer. |
michael@0 | 2154 | * @param yyscanner The scanner object. |
michael@0 | 2155 | */ |
michael@0 | 2156 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
michael@0 | 2157 | { |
michael@0 | 2158 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2159 | |
michael@0 | 2160 | /* TODO. We should be able to replace this entire function body |
michael@0 | 2161 | * with |
michael@0 | 2162 | * yypop_buffer_state(); |
michael@0 | 2163 | * yypush_buffer_state(new_buffer); |
michael@0 | 2164 | */ |
michael@0 | 2165 | yyensure_buffer_stack (yyscanner); |
michael@0 | 2166 | if ( YY_CURRENT_BUFFER == new_buffer ) |
michael@0 | 2167 | return; |
michael@0 | 2168 | |
michael@0 | 2169 | if ( YY_CURRENT_BUFFER ) |
michael@0 | 2170 | { |
michael@0 | 2171 | /* Flush out information for old buffer. */ |
michael@0 | 2172 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
michael@0 | 2173 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
michael@0 | 2174 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
michael@0 | 2175 | } |
michael@0 | 2176 | |
michael@0 | 2177 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
michael@0 | 2178 | yy_load_buffer_state(yyscanner ); |
michael@0 | 2179 | |
michael@0 | 2180 | /* We don't actually know whether we did this switch during |
michael@0 | 2181 | * EOF (yywrap()) processing, but the only time this flag |
michael@0 | 2182 | * is looked at is after yywrap() is called, so it's safe |
michael@0 | 2183 | * to go ahead and always set it. |
michael@0 | 2184 | */ |
michael@0 | 2185 | yyg->yy_did_buffer_switch_on_eof = 1; |
michael@0 | 2186 | } |
michael@0 | 2187 | |
michael@0 | 2188 | static void yy_load_buffer_state (yyscan_t yyscanner) |
michael@0 | 2189 | { |
michael@0 | 2190 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2191 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
michael@0 | 2192 | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
michael@0 | 2193 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
michael@0 | 2194 | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
michael@0 | 2195 | } |
michael@0 | 2196 | |
michael@0 | 2197 | /** Allocate and initialize an input buffer state. |
michael@0 | 2198 | * @param file A readable stream. |
michael@0 | 2199 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
michael@0 | 2200 | * @param yyscanner The scanner object. |
michael@0 | 2201 | * @return the allocated buffer state. |
michael@0 | 2202 | */ |
michael@0 | 2203 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
michael@0 | 2204 | { |
michael@0 | 2205 | YY_BUFFER_STATE b; |
michael@0 | 2206 | |
michael@0 | 2207 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
michael@0 | 2208 | if ( ! b ) |
michael@0 | 2209 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
michael@0 | 2210 | |
michael@0 | 2211 | b->yy_buf_size = size; |
michael@0 | 2212 | |
michael@0 | 2213 | /* yy_ch_buf has to be 2 characters longer than the size given because |
michael@0 | 2214 | * we need to put in 2 end-of-buffer characters. |
michael@0 | 2215 | */ |
michael@0 | 2216 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); |
michael@0 | 2217 | if ( ! b->yy_ch_buf ) |
michael@0 | 2218 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
michael@0 | 2219 | |
michael@0 | 2220 | b->yy_is_our_buffer = 1; |
michael@0 | 2221 | |
michael@0 | 2222 | yy_init_buffer(b,file ,yyscanner); |
michael@0 | 2223 | |
michael@0 | 2224 | return b; |
michael@0 | 2225 | } |
michael@0 | 2226 | |
michael@0 | 2227 | /** Destroy the buffer. |
michael@0 | 2228 | * @param b a buffer created with yy_create_buffer() |
michael@0 | 2229 | * @param yyscanner The scanner object. |
michael@0 | 2230 | */ |
michael@0 | 2231 | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
michael@0 | 2232 | { |
michael@0 | 2233 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2234 | |
michael@0 | 2235 | if ( ! b ) |
michael@0 | 2236 | return; |
michael@0 | 2237 | |
michael@0 | 2238 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
michael@0 | 2239 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
michael@0 | 2240 | |
michael@0 | 2241 | if ( b->yy_is_our_buffer ) |
michael@0 | 2242 | yyfree((void *) b->yy_ch_buf ,yyscanner ); |
michael@0 | 2243 | |
michael@0 | 2244 | yyfree((void *) b ,yyscanner ); |
michael@0 | 2245 | } |
michael@0 | 2246 | |
michael@0 | 2247 | /* Initializes or reinitializes a buffer. |
michael@0 | 2248 | * This function is sometimes called more than once on the same buffer, |
michael@0 | 2249 | * such as during a yyrestart() or at EOF. |
michael@0 | 2250 | */ |
michael@0 | 2251 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
michael@0 | 2252 | |
michael@0 | 2253 | { |
michael@0 | 2254 | int oerrno = errno; |
michael@0 | 2255 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2256 | |
michael@0 | 2257 | yy_flush_buffer(b ,yyscanner); |
michael@0 | 2258 | |
michael@0 | 2259 | b->yy_input_file = file; |
michael@0 | 2260 | b->yy_fill_buffer = 1; |
michael@0 | 2261 | |
michael@0 | 2262 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
michael@0 | 2263 | * called from yyrestart() or through yy_get_next_buffer. |
michael@0 | 2264 | * In that case, we don't want to reset the lineno or column. |
michael@0 | 2265 | */ |
michael@0 | 2266 | if (b != YY_CURRENT_BUFFER){ |
michael@0 | 2267 | b->yy_bs_lineno = 1; |
michael@0 | 2268 | b->yy_bs_column = 0; |
michael@0 | 2269 | } |
michael@0 | 2270 | |
michael@0 | 2271 | b->yy_is_interactive = 0; |
michael@0 | 2272 | |
michael@0 | 2273 | errno = oerrno; |
michael@0 | 2274 | } |
michael@0 | 2275 | |
michael@0 | 2276 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
michael@0 | 2277 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
michael@0 | 2278 | * @param yyscanner The scanner object. |
michael@0 | 2279 | */ |
michael@0 | 2280 | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
michael@0 | 2281 | { |
michael@0 | 2282 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2283 | if ( ! b ) |
michael@0 | 2284 | return; |
michael@0 | 2285 | |
michael@0 | 2286 | b->yy_n_chars = 0; |
michael@0 | 2287 | |
michael@0 | 2288 | /* We always need two end-of-buffer characters. The first causes |
michael@0 | 2289 | * a transition to the end-of-buffer state. The second causes |
michael@0 | 2290 | * a jam in that state. |
michael@0 | 2291 | */ |
michael@0 | 2292 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
michael@0 | 2293 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
michael@0 | 2294 | |
michael@0 | 2295 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
michael@0 | 2296 | |
michael@0 | 2297 | b->yy_at_bol = 1; |
michael@0 | 2298 | b->yy_buffer_status = YY_BUFFER_NEW; |
michael@0 | 2299 | |
michael@0 | 2300 | if ( b == YY_CURRENT_BUFFER ) |
michael@0 | 2301 | yy_load_buffer_state(yyscanner ); |
michael@0 | 2302 | } |
michael@0 | 2303 | |
michael@0 | 2304 | /** Pushes the new state onto the stack. The new state becomes |
michael@0 | 2305 | * the current state. This function will allocate the stack |
michael@0 | 2306 | * if necessary. |
michael@0 | 2307 | * @param new_buffer The new state. |
michael@0 | 2308 | * @param yyscanner The scanner object. |
michael@0 | 2309 | */ |
michael@0 | 2310 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
michael@0 | 2311 | { |
michael@0 | 2312 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2313 | if (new_buffer == NULL) |
michael@0 | 2314 | return; |
michael@0 | 2315 | |
michael@0 | 2316 | yyensure_buffer_stack(yyscanner); |
michael@0 | 2317 | |
michael@0 | 2318 | /* This block is copied from yy_switch_to_buffer. */ |
michael@0 | 2319 | if ( YY_CURRENT_BUFFER ) |
michael@0 | 2320 | { |
michael@0 | 2321 | /* Flush out information for old buffer. */ |
michael@0 | 2322 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
michael@0 | 2323 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
michael@0 | 2324 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
michael@0 | 2325 | } |
michael@0 | 2326 | |
michael@0 | 2327 | /* Only push if top exists. Otherwise, replace top. */ |
michael@0 | 2328 | if (YY_CURRENT_BUFFER) |
michael@0 | 2329 | yyg->yy_buffer_stack_top++; |
michael@0 | 2330 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
michael@0 | 2331 | |
michael@0 | 2332 | /* copied from yy_switch_to_buffer. */ |
michael@0 | 2333 | yy_load_buffer_state(yyscanner ); |
michael@0 | 2334 | yyg->yy_did_buffer_switch_on_eof = 1; |
michael@0 | 2335 | } |
michael@0 | 2336 | |
michael@0 | 2337 | /** Removes and deletes the top of the stack, if present. |
michael@0 | 2338 | * The next element becomes the new top. |
michael@0 | 2339 | * @param yyscanner The scanner object. |
michael@0 | 2340 | */ |
michael@0 | 2341 | void yypop_buffer_state (yyscan_t yyscanner) |
michael@0 | 2342 | { |
michael@0 | 2343 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2344 | if (!YY_CURRENT_BUFFER) |
michael@0 | 2345 | return; |
michael@0 | 2346 | |
michael@0 | 2347 | yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); |
michael@0 | 2348 | YY_CURRENT_BUFFER_LVALUE = NULL; |
michael@0 | 2349 | if (yyg->yy_buffer_stack_top > 0) |
michael@0 | 2350 | --yyg->yy_buffer_stack_top; |
michael@0 | 2351 | |
michael@0 | 2352 | if (YY_CURRENT_BUFFER) { |
michael@0 | 2353 | yy_load_buffer_state(yyscanner ); |
michael@0 | 2354 | yyg->yy_did_buffer_switch_on_eof = 1; |
michael@0 | 2355 | } |
michael@0 | 2356 | } |
michael@0 | 2357 | |
michael@0 | 2358 | /* Allocates the stack if it does not exist. |
michael@0 | 2359 | * Guarantees space for at least one push. |
michael@0 | 2360 | */ |
michael@0 | 2361 | static void yyensure_buffer_stack (yyscan_t yyscanner) |
michael@0 | 2362 | { |
michael@0 | 2363 | yy_size_t num_to_alloc; |
michael@0 | 2364 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2365 | |
michael@0 | 2366 | if (!yyg->yy_buffer_stack) { |
michael@0 | 2367 | |
michael@0 | 2368 | /* First allocation is just for 2 elements, since we don't know if this |
michael@0 | 2369 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
michael@0 | 2370 | * immediate realloc on the next call. |
michael@0 | 2371 | */ |
michael@0 | 2372 | num_to_alloc = 1; |
michael@0 | 2373 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
michael@0 | 2374 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
michael@0 | 2375 | , yyscanner); |
michael@0 | 2376 | if ( ! yyg->yy_buffer_stack ) |
michael@0 | 2377 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
michael@0 | 2378 | |
michael@0 | 2379 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
michael@0 | 2380 | |
michael@0 | 2381 | yyg->yy_buffer_stack_max = num_to_alloc; |
michael@0 | 2382 | yyg->yy_buffer_stack_top = 0; |
michael@0 | 2383 | return; |
michael@0 | 2384 | } |
michael@0 | 2385 | |
michael@0 | 2386 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
michael@0 | 2387 | |
michael@0 | 2388 | /* Increase the buffer to prepare for a possible push. */ |
michael@0 | 2389 | int grow_size = 8 /* arbitrary grow size */; |
michael@0 | 2390 | |
michael@0 | 2391 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
michael@0 | 2392 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
michael@0 | 2393 | (yyg->yy_buffer_stack, |
michael@0 | 2394 | num_to_alloc * sizeof(struct yy_buffer_state*) |
michael@0 | 2395 | , yyscanner); |
michael@0 | 2396 | if ( ! yyg->yy_buffer_stack ) |
michael@0 | 2397 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
michael@0 | 2398 | |
michael@0 | 2399 | /* zero only the new slots.*/ |
michael@0 | 2400 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
michael@0 | 2401 | yyg->yy_buffer_stack_max = num_to_alloc; |
michael@0 | 2402 | } |
michael@0 | 2403 | } |
michael@0 | 2404 | |
michael@0 | 2405 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
michael@0 | 2406 | * @param base the character buffer |
michael@0 | 2407 | * @param size the size in bytes of the character buffer |
michael@0 | 2408 | * @param yyscanner The scanner object. |
michael@0 | 2409 | * @return the newly allocated buffer state object. |
michael@0 | 2410 | */ |
michael@0 | 2411 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
michael@0 | 2412 | { |
michael@0 | 2413 | YY_BUFFER_STATE b; |
michael@0 | 2414 | |
michael@0 | 2415 | if ( size < 2 || |
michael@0 | 2416 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
michael@0 | 2417 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
michael@0 | 2418 | /* They forgot to leave room for the EOB's. */ |
michael@0 | 2419 | return 0; |
michael@0 | 2420 | |
michael@0 | 2421 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
michael@0 | 2422 | if ( ! b ) |
michael@0 | 2423 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
michael@0 | 2424 | |
michael@0 | 2425 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
michael@0 | 2426 | b->yy_buf_pos = b->yy_ch_buf = base; |
michael@0 | 2427 | b->yy_is_our_buffer = 0; |
michael@0 | 2428 | b->yy_input_file = 0; |
michael@0 | 2429 | b->yy_n_chars = b->yy_buf_size; |
michael@0 | 2430 | b->yy_is_interactive = 0; |
michael@0 | 2431 | b->yy_at_bol = 1; |
michael@0 | 2432 | b->yy_fill_buffer = 0; |
michael@0 | 2433 | b->yy_buffer_status = YY_BUFFER_NEW; |
michael@0 | 2434 | |
michael@0 | 2435 | yy_switch_to_buffer(b ,yyscanner ); |
michael@0 | 2436 | |
michael@0 | 2437 | return b; |
michael@0 | 2438 | } |
michael@0 | 2439 | |
michael@0 | 2440 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
michael@0 | 2441 | * scan from a @e copy of @a str. |
michael@0 | 2442 | * @param yystr a NUL-terminated string to scan |
michael@0 | 2443 | * @param yyscanner The scanner object. |
michael@0 | 2444 | * @return the newly allocated buffer state object. |
michael@0 | 2445 | * @note If you want to scan bytes that may contain NUL values, then use |
michael@0 | 2446 | * yy_scan_bytes() instead. |
michael@0 | 2447 | */ |
michael@0 | 2448 | YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) |
michael@0 | 2449 | { |
michael@0 | 2450 | |
michael@0 | 2451 | return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); |
michael@0 | 2452 | } |
michael@0 | 2453 | |
michael@0 | 2454 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
michael@0 | 2455 | * scan from a @e copy of @a bytes. |
michael@0 | 2456 | * @param bytes the byte buffer to scan |
michael@0 | 2457 | * @param len the number of bytes in the buffer pointed to by @a bytes. |
michael@0 | 2458 | * @param yyscanner The scanner object. |
michael@0 | 2459 | * @return the newly allocated buffer state object. |
michael@0 | 2460 | */ |
michael@0 | 2461 | YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) |
michael@0 | 2462 | { |
michael@0 | 2463 | YY_BUFFER_STATE b; |
michael@0 | 2464 | char *buf; |
michael@0 | 2465 | yy_size_t n, i; |
michael@0 | 2466 | |
michael@0 | 2467 | /* Get memory for full buffer, including space for trailing EOB's. */ |
michael@0 | 2468 | n = _yybytes_len + 2; |
michael@0 | 2469 | buf = (char *) yyalloc(n ,yyscanner ); |
michael@0 | 2470 | if ( ! buf ) |
michael@0 | 2471 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
michael@0 | 2472 | |
michael@0 | 2473 | for ( i = 0; i < _yybytes_len; ++i ) |
michael@0 | 2474 | buf[i] = yybytes[i]; |
michael@0 | 2475 | |
michael@0 | 2476 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
michael@0 | 2477 | |
michael@0 | 2478 | b = yy_scan_buffer(buf,n ,yyscanner); |
michael@0 | 2479 | if ( ! b ) |
michael@0 | 2480 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
michael@0 | 2481 | |
michael@0 | 2482 | /* It's okay to grow etc. this buffer, and we should throw it |
michael@0 | 2483 | * away when we're done. |
michael@0 | 2484 | */ |
michael@0 | 2485 | b->yy_is_our_buffer = 1; |
michael@0 | 2486 | |
michael@0 | 2487 | return b; |
michael@0 | 2488 | } |
michael@0 | 2489 | |
michael@0 | 2490 | #ifndef YY_EXIT_FAILURE |
michael@0 | 2491 | #define YY_EXIT_FAILURE 2 |
michael@0 | 2492 | #endif |
michael@0 | 2493 | |
michael@0 | 2494 | static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) |
michael@0 | 2495 | { |
michael@0 | 2496 | (void) fprintf( stderr, "%s\n", msg ); |
michael@0 | 2497 | exit( YY_EXIT_FAILURE ); |
michael@0 | 2498 | } |
michael@0 | 2499 | |
michael@0 | 2500 | /* Redefine yyless() so it works in section 3 code. */ |
michael@0 | 2501 | |
michael@0 | 2502 | #undef yyless |
michael@0 | 2503 | #define yyless(n) \ |
michael@0 | 2504 | do \ |
michael@0 | 2505 | { \ |
michael@0 | 2506 | /* Undo effects of setting up yytext. */ \ |
michael@0 | 2507 | int yyless_macro_arg = (n); \ |
michael@0 | 2508 | YY_LESS_LINENO(yyless_macro_arg);\ |
michael@0 | 2509 | yytext[yyleng] = yyg->yy_hold_char; \ |
michael@0 | 2510 | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
michael@0 | 2511 | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
michael@0 | 2512 | *yyg->yy_c_buf_p = '\0'; \ |
michael@0 | 2513 | yyleng = yyless_macro_arg; \ |
michael@0 | 2514 | } \ |
michael@0 | 2515 | while ( 0 ) |
michael@0 | 2516 | |
michael@0 | 2517 | /* Accessor methods (get/set functions) to struct members. */ |
michael@0 | 2518 | |
michael@0 | 2519 | /** Get the user-defined data for this scanner. |
michael@0 | 2520 | * @param yyscanner The scanner object. |
michael@0 | 2521 | */ |
michael@0 | 2522 | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
michael@0 | 2523 | { |
michael@0 | 2524 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2525 | return yyextra; |
michael@0 | 2526 | } |
michael@0 | 2527 | |
michael@0 | 2528 | /** Get the current line number. |
michael@0 | 2529 | * @param yyscanner The scanner object. |
michael@0 | 2530 | */ |
michael@0 | 2531 | int yyget_lineno (yyscan_t yyscanner) |
michael@0 | 2532 | { |
michael@0 | 2533 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2534 | |
michael@0 | 2535 | if (! YY_CURRENT_BUFFER) |
michael@0 | 2536 | return 0; |
michael@0 | 2537 | |
michael@0 | 2538 | return yylineno; |
michael@0 | 2539 | } |
michael@0 | 2540 | |
michael@0 | 2541 | /** Get the current column number. |
michael@0 | 2542 | * @param yyscanner The scanner object. |
michael@0 | 2543 | */ |
michael@0 | 2544 | int yyget_column (yyscan_t yyscanner) |
michael@0 | 2545 | { |
michael@0 | 2546 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2547 | |
michael@0 | 2548 | if (! YY_CURRENT_BUFFER) |
michael@0 | 2549 | return 0; |
michael@0 | 2550 | |
michael@0 | 2551 | return yycolumn; |
michael@0 | 2552 | } |
michael@0 | 2553 | |
michael@0 | 2554 | /** Get the input stream. |
michael@0 | 2555 | * @param yyscanner The scanner object. |
michael@0 | 2556 | */ |
michael@0 | 2557 | FILE *yyget_in (yyscan_t yyscanner) |
michael@0 | 2558 | { |
michael@0 | 2559 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2560 | return yyin; |
michael@0 | 2561 | } |
michael@0 | 2562 | |
michael@0 | 2563 | /** Get the output stream. |
michael@0 | 2564 | * @param yyscanner The scanner object. |
michael@0 | 2565 | */ |
michael@0 | 2566 | FILE *yyget_out (yyscan_t yyscanner) |
michael@0 | 2567 | { |
michael@0 | 2568 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2569 | return yyout; |
michael@0 | 2570 | } |
michael@0 | 2571 | |
michael@0 | 2572 | /** Get the length of the current token. |
michael@0 | 2573 | * @param yyscanner The scanner object. |
michael@0 | 2574 | */ |
michael@0 | 2575 | yy_size_t yyget_leng (yyscan_t yyscanner) |
michael@0 | 2576 | { |
michael@0 | 2577 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2578 | return yyleng; |
michael@0 | 2579 | } |
michael@0 | 2580 | |
michael@0 | 2581 | /** Get the current token. |
michael@0 | 2582 | * @param yyscanner The scanner object. |
michael@0 | 2583 | */ |
michael@0 | 2584 | |
michael@0 | 2585 | char *yyget_text (yyscan_t yyscanner) |
michael@0 | 2586 | { |
michael@0 | 2587 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2588 | return yytext; |
michael@0 | 2589 | } |
michael@0 | 2590 | |
michael@0 | 2591 | /** Set the user-defined data. This data is never touched by the scanner. |
michael@0 | 2592 | * @param user_defined The data to be associated with this scanner. |
michael@0 | 2593 | * @param yyscanner The scanner object. |
michael@0 | 2594 | */ |
michael@0 | 2595 | void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
michael@0 | 2596 | { |
michael@0 | 2597 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2598 | yyextra = user_defined ; |
michael@0 | 2599 | } |
michael@0 | 2600 | |
michael@0 | 2601 | /** Set the current line number. |
michael@0 | 2602 | * @param line_number |
michael@0 | 2603 | * @param yyscanner The scanner object. |
michael@0 | 2604 | */ |
michael@0 | 2605 | void yyset_lineno (int line_number , yyscan_t yyscanner) |
michael@0 | 2606 | { |
michael@0 | 2607 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2608 | |
michael@0 | 2609 | /* lineno is only valid if an input buffer exists. */ |
michael@0 | 2610 | if (! YY_CURRENT_BUFFER ) |
michael@0 | 2611 | yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); |
michael@0 | 2612 | |
michael@0 | 2613 | yylineno = line_number; |
michael@0 | 2614 | } |
michael@0 | 2615 | |
michael@0 | 2616 | /** Set the current column. |
michael@0 | 2617 | * @param line_number |
michael@0 | 2618 | * @param yyscanner The scanner object. |
michael@0 | 2619 | */ |
michael@0 | 2620 | void yyset_column (int column_no , yyscan_t yyscanner) |
michael@0 | 2621 | { |
michael@0 | 2622 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2623 | |
michael@0 | 2624 | /* column is only valid if an input buffer exists. */ |
michael@0 | 2625 | if (! YY_CURRENT_BUFFER ) |
michael@0 | 2626 | yy_fatal_error( "yyset_column called with no buffer" , yyscanner); |
michael@0 | 2627 | |
michael@0 | 2628 | yycolumn = column_no; |
michael@0 | 2629 | } |
michael@0 | 2630 | |
michael@0 | 2631 | /** Set the input stream. This does not discard the current |
michael@0 | 2632 | * input buffer. |
michael@0 | 2633 | * @param in_str A readable stream. |
michael@0 | 2634 | * @param yyscanner The scanner object. |
michael@0 | 2635 | * @see yy_switch_to_buffer |
michael@0 | 2636 | */ |
michael@0 | 2637 | void yyset_in (FILE * in_str , yyscan_t yyscanner) |
michael@0 | 2638 | { |
michael@0 | 2639 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2640 | yyin = in_str ; |
michael@0 | 2641 | } |
michael@0 | 2642 | |
michael@0 | 2643 | void yyset_out (FILE * out_str , yyscan_t yyscanner) |
michael@0 | 2644 | { |
michael@0 | 2645 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2646 | yyout = out_str ; |
michael@0 | 2647 | } |
michael@0 | 2648 | |
michael@0 | 2649 | int yyget_debug (yyscan_t yyscanner) |
michael@0 | 2650 | { |
michael@0 | 2651 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2652 | return yy_flex_debug; |
michael@0 | 2653 | } |
michael@0 | 2654 | |
michael@0 | 2655 | void yyset_debug (int bdebug , yyscan_t yyscanner) |
michael@0 | 2656 | { |
michael@0 | 2657 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2658 | yy_flex_debug = bdebug ; |
michael@0 | 2659 | } |
michael@0 | 2660 | |
michael@0 | 2661 | /* Accessor methods for yylval and yylloc */ |
michael@0 | 2662 | |
michael@0 | 2663 | YYSTYPE * yyget_lval (yyscan_t yyscanner) |
michael@0 | 2664 | { |
michael@0 | 2665 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2666 | return yylval; |
michael@0 | 2667 | } |
michael@0 | 2668 | |
michael@0 | 2669 | void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
michael@0 | 2670 | { |
michael@0 | 2671 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2672 | yylval = yylval_param; |
michael@0 | 2673 | } |
michael@0 | 2674 | |
michael@0 | 2675 | YYLTYPE *yyget_lloc (yyscan_t yyscanner) |
michael@0 | 2676 | { |
michael@0 | 2677 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2678 | return yylloc; |
michael@0 | 2679 | } |
michael@0 | 2680 | |
michael@0 | 2681 | void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
michael@0 | 2682 | { |
michael@0 | 2683 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2684 | yylloc = yylloc_param; |
michael@0 | 2685 | } |
michael@0 | 2686 | |
michael@0 | 2687 | /* User-visible API */ |
michael@0 | 2688 | |
michael@0 | 2689 | /* yylex_init is special because it creates the scanner itself, so it is |
michael@0 | 2690 | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
michael@0 | 2691 | * That's why we explicitly handle the declaration, instead of using our macros. |
michael@0 | 2692 | */ |
michael@0 | 2693 | |
michael@0 | 2694 | int yylex_init(yyscan_t* ptr_yy_globals) |
michael@0 | 2695 | |
michael@0 | 2696 | { |
michael@0 | 2697 | if (ptr_yy_globals == NULL){ |
michael@0 | 2698 | errno = EINVAL; |
michael@0 | 2699 | return 1; |
michael@0 | 2700 | } |
michael@0 | 2701 | |
michael@0 | 2702 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
michael@0 | 2703 | |
michael@0 | 2704 | if (*ptr_yy_globals == NULL){ |
michael@0 | 2705 | errno = ENOMEM; |
michael@0 | 2706 | return 1; |
michael@0 | 2707 | } |
michael@0 | 2708 | |
michael@0 | 2709 | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
michael@0 | 2710 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
michael@0 | 2711 | |
michael@0 | 2712 | return yy_init_globals ( *ptr_yy_globals ); |
michael@0 | 2713 | } |
michael@0 | 2714 | |
michael@0 | 2715 | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
michael@0 | 2716 | * convention of taking the scanner as the last argument. Note however, that |
michael@0 | 2717 | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
michael@0 | 2718 | * is the reason, too, why this function also must handle its own declaration). |
michael@0 | 2719 | * The user defined value in the first argument will be available to yyalloc in |
michael@0 | 2720 | * the yyextra field. |
michael@0 | 2721 | */ |
michael@0 | 2722 | |
michael@0 | 2723 | int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) |
michael@0 | 2724 | |
michael@0 | 2725 | { |
michael@0 | 2726 | struct yyguts_t dummy_yyguts; |
michael@0 | 2727 | |
michael@0 | 2728 | yyset_extra (yy_user_defined, &dummy_yyguts); |
michael@0 | 2729 | |
michael@0 | 2730 | if (ptr_yy_globals == NULL){ |
michael@0 | 2731 | errno = EINVAL; |
michael@0 | 2732 | return 1; |
michael@0 | 2733 | } |
michael@0 | 2734 | |
michael@0 | 2735 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
michael@0 | 2736 | |
michael@0 | 2737 | if (*ptr_yy_globals == NULL){ |
michael@0 | 2738 | errno = ENOMEM; |
michael@0 | 2739 | return 1; |
michael@0 | 2740 | } |
michael@0 | 2741 | |
michael@0 | 2742 | /* By setting to 0xAA, we expose bugs in |
michael@0 | 2743 | yy_init_globals. Leave at 0x00 for releases. */ |
michael@0 | 2744 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
michael@0 | 2745 | |
michael@0 | 2746 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
michael@0 | 2747 | |
michael@0 | 2748 | return yy_init_globals ( *ptr_yy_globals ); |
michael@0 | 2749 | } |
michael@0 | 2750 | |
michael@0 | 2751 | static int yy_init_globals (yyscan_t yyscanner) |
michael@0 | 2752 | { |
michael@0 | 2753 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2754 | /* Initialization is the same as for the non-reentrant scanner. |
michael@0 | 2755 | * This function is called from yylex_destroy(), so don't allocate here. |
michael@0 | 2756 | */ |
michael@0 | 2757 | |
michael@0 | 2758 | yyg->yy_buffer_stack = 0; |
michael@0 | 2759 | yyg->yy_buffer_stack_top = 0; |
michael@0 | 2760 | yyg->yy_buffer_stack_max = 0; |
michael@0 | 2761 | yyg->yy_c_buf_p = (char *) 0; |
michael@0 | 2762 | yyg->yy_init = 0; |
michael@0 | 2763 | yyg->yy_start = 0; |
michael@0 | 2764 | |
michael@0 | 2765 | yyg->yy_start_stack_ptr = 0; |
michael@0 | 2766 | yyg->yy_start_stack_depth = 0; |
michael@0 | 2767 | yyg->yy_start_stack = NULL; |
michael@0 | 2768 | |
michael@0 | 2769 | /* Defined in main.c */ |
michael@0 | 2770 | #ifdef YY_STDINIT |
michael@0 | 2771 | yyin = stdin; |
michael@0 | 2772 | yyout = stdout; |
michael@0 | 2773 | #else |
michael@0 | 2774 | yyin = (FILE *) 0; |
michael@0 | 2775 | yyout = (FILE *) 0; |
michael@0 | 2776 | #endif |
michael@0 | 2777 | |
michael@0 | 2778 | /* For future reference: Set errno on error, since we are called by |
michael@0 | 2779 | * yylex_init() |
michael@0 | 2780 | */ |
michael@0 | 2781 | return 0; |
michael@0 | 2782 | } |
michael@0 | 2783 | |
michael@0 | 2784 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
michael@0 | 2785 | int yylex_destroy (yyscan_t yyscanner) |
michael@0 | 2786 | { |
michael@0 | 2787 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
michael@0 | 2788 | |
michael@0 | 2789 | /* Pop the buffer stack, destroying each element. */ |
michael@0 | 2790 | while(YY_CURRENT_BUFFER){ |
michael@0 | 2791 | yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); |
michael@0 | 2792 | YY_CURRENT_BUFFER_LVALUE = NULL; |
michael@0 | 2793 | yypop_buffer_state(yyscanner); |
michael@0 | 2794 | } |
michael@0 | 2795 | |
michael@0 | 2796 | /* Destroy the stack itself. */ |
michael@0 | 2797 | yyfree(yyg->yy_buffer_stack ,yyscanner); |
michael@0 | 2798 | yyg->yy_buffer_stack = NULL; |
michael@0 | 2799 | |
michael@0 | 2800 | /* Destroy the start condition stack. */ |
michael@0 | 2801 | yyfree(yyg->yy_start_stack ,yyscanner ); |
michael@0 | 2802 | yyg->yy_start_stack = NULL; |
michael@0 | 2803 | |
michael@0 | 2804 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
michael@0 | 2805 | * yylex() is called, initialization will occur. */ |
michael@0 | 2806 | yy_init_globals( yyscanner); |
michael@0 | 2807 | |
michael@0 | 2808 | /* Destroy the main struct (reentrant only). */ |
michael@0 | 2809 | yyfree ( yyscanner , yyscanner ); |
michael@0 | 2810 | yyscanner = NULL; |
michael@0 | 2811 | return 0; |
michael@0 | 2812 | } |
michael@0 | 2813 | |
michael@0 | 2814 | /* |
michael@0 | 2815 | * Internal utility routines. |
michael@0 | 2816 | */ |
michael@0 | 2817 | |
michael@0 | 2818 | #ifndef yytext_ptr |
michael@0 | 2819 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) |
michael@0 | 2820 | { |
michael@0 | 2821 | register int i; |
michael@0 | 2822 | for ( i = 0; i < n; ++i ) |
michael@0 | 2823 | s1[i] = s2[i]; |
michael@0 | 2824 | } |
michael@0 | 2825 | #endif |
michael@0 | 2826 | |
michael@0 | 2827 | #ifdef YY_NEED_STRLEN |
michael@0 | 2828 | static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) |
michael@0 | 2829 | { |
michael@0 | 2830 | register int n; |
michael@0 | 2831 | for ( n = 0; s[n]; ++n ) |
michael@0 | 2832 | ; |
michael@0 | 2833 | |
michael@0 | 2834 | return n; |
michael@0 | 2835 | } |
michael@0 | 2836 | #endif |
michael@0 | 2837 | |
michael@0 | 2838 | void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
michael@0 | 2839 | { |
michael@0 | 2840 | return (void *) malloc( size ); |
michael@0 | 2841 | } |
michael@0 | 2842 | |
michael@0 | 2843 | void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
michael@0 | 2844 | { |
michael@0 | 2845 | /* The cast to (char *) in the following accommodates both |
michael@0 | 2846 | * implementations that use char* generic pointers, and those |
michael@0 | 2847 | * that use void* generic pointers. It works with the latter |
michael@0 | 2848 | * because both ANSI C and C++ allow castless assignment from |
michael@0 | 2849 | * any pointer type to void*, and deal with argument conversions |
michael@0 | 2850 | * as though doing an assignment. |
michael@0 | 2851 | */ |
michael@0 | 2852 | return (void *) realloc( (char *) ptr, size ); |
michael@0 | 2853 | } |
michael@0 | 2854 | |
michael@0 | 2855 | void yyfree (void * ptr , yyscan_t yyscanner) |
michael@0 | 2856 | { |
michael@0 | 2857 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
michael@0 | 2858 | } |
michael@0 | 2859 | |
michael@0 | 2860 | #define YYTABLES_NAME "yytables" |
michael@0 | 2861 | |
michael@0 | 2862 | yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) { |
michael@0 | 2863 | pp::Token token; |
michael@0 | 2864 | yyget_extra(yyscanner)->preprocessor.lex(&token); |
michael@0 | 2865 | yy_size_t len = token.type == pp::Token::LAST ? 0 : token.text.size(); |
michael@0 | 2866 | if (len < max_size) |
michael@0 | 2867 | memcpy(buf, token.text.c_str(), len); |
michael@0 | 2868 | yyset_column(token.location.file,yyscanner); |
michael@0 | 2869 | yyset_lineno(token.location.line,yyscanner); |
michael@0 | 2870 | |
michael@0 | 2871 | if (len >= max_size) |
michael@0 | 2872 | YY_FATAL_ERROR("Input buffer overflow"); |
michael@0 | 2873 | else if (len > 0) |
michael@0 | 2874 | buf[len++] = ' '; |
michael@0 | 2875 | return len; |
michael@0 | 2876 | } |
michael@0 | 2877 | |
michael@0 | 2878 | int check_type(yyscan_t yyscanner) { |
michael@0 | 2879 | struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; |
michael@0 | 2880 | |
michael@0 | 2881 | int token = IDENTIFIER; |
michael@0 | 2882 | TSymbol* symbol = yyextra->symbolTable.find(yytext); |
michael@0 | 2883 | if (symbol && symbol->isVariable()) { |
michael@0 | 2884 | TVariable* variable = static_cast<TVariable*>(symbol); |
michael@0 | 2885 | if (variable->isUserType()) |
michael@0 | 2886 | token = TYPE_NAME; |
michael@0 | 2887 | } |
michael@0 | 2888 | yylval->lex.symbol = symbol; |
michael@0 | 2889 | return token; |
michael@0 | 2890 | } |
michael@0 | 2891 | |
michael@0 | 2892 | int reserved_word(yyscan_t yyscanner) { |
michael@0 | 2893 | struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; |
michael@0 | 2894 | |
michael@0 | 2895 | yyextra->error(*yylloc, "Illegal use of reserved word", yytext, ""); |
michael@0 | 2896 | yyextra->recover(); |
michael@0 | 2897 | return 0; |
michael@0 | 2898 | } |
michael@0 | 2899 | |
michael@0 | 2900 | int glslang_initialize(TParseContext* context) { |
michael@0 | 2901 | yyscan_t scanner = NULL; |
michael@0 | 2902 | if (yylex_init_extra(context,&scanner)) |
michael@0 | 2903 | return 1; |
michael@0 | 2904 | |
michael@0 | 2905 | context->scanner = scanner; |
michael@0 | 2906 | return 0; |
michael@0 | 2907 | } |
michael@0 | 2908 | |
michael@0 | 2909 | int glslang_finalize(TParseContext* context) { |
michael@0 | 2910 | yyscan_t scanner = context->scanner; |
michael@0 | 2911 | if (scanner == NULL) return 0; |
michael@0 | 2912 | |
michael@0 | 2913 | context->scanner = NULL; |
michael@0 | 2914 | yylex_destroy(scanner); |
michael@0 | 2915 | |
michael@0 | 2916 | return 0; |
michael@0 | 2917 | } |
michael@0 | 2918 | |
michael@0 | 2919 | int glslang_scan(size_t count, const char* const string[], const int length[], |
michael@0 | 2920 | TParseContext* context) { |
michael@0 | 2921 | yyrestart(NULL,context->scanner); |
michael@0 | 2922 | yyset_column(0,context->scanner); |
michael@0 | 2923 | yyset_lineno(1,context->scanner); |
michael@0 | 2924 | |
michael@0 | 2925 | // Initialize preprocessor. |
michael@0 | 2926 | if (!context->preprocessor.init(count, string, length)) |
michael@0 | 2927 | return 1; |
michael@0 | 2928 | |
michael@0 | 2929 | // Define extension macros. |
michael@0 | 2930 | const TExtensionBehavior& extBehavior = context->extensionBehavior(); |
michael@0 | 2931 | for (TExtensionBehavior::const_iterator iter = extBehavior.begin(); |
michael@0 | 2932 | iter != extBehavior.end(); ++iter) { |
michael@0 | 2933 | context->preprocessor.predefineMacro(iter->first.c_str(), 1); |
michael@0 | 2934 | } |
michael@0 | 2935 | if (context->fragmentPrecisionHigh) |
michael@0 | 2936 | context->preprocessor.predefineMacro("GL_FRAGMENT_PRECISION_HIGH", 1); |
michael@0 | 2937 | |
michael@0 | 2938 | return 0; |
michael@0 | 2939 | } |
michael@0 | 2940 |