| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1 | #line 2 "glsl_lexer.cpp" |
| 2 | |
| 3 | #line 4 "glsl_lexer.cpp" |
| 4 | |
| 5 | #define YY_INT_ALIGNED short int |
| 6 | |
| 7 | /* A lexical scanner generated by flex */ |
| 8 | |
| 9 | #define FLEX_SCANNER |
| 10 | #define YY_FLEX_MAJOR_VERSION 2 |
| 11 | #define YY_FLEX_MINOR_VERSION 5 |
| 12 | #define YY_FLEX_SUBMINOR_VERSION 35 |
| 13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
| 14 | #define FLEX_BETA |
| 15 | #endif |
| 16 | |
| 17 | /* First, we deal with platform-specific or compiler-specific issues. */ |
| 18 | |
| 19 | /* begin standard C headers. */ |
| 20 | #include <stdio.h> |
| 21 | #include <string.h> |
| 22 | #include <errno.h> |
| 23 | #include <stdlib.h> |
| 24 | |
| 25 | /* end standard C headers. */ |
| 26 | |
| 27 | /* flex integer type definitions */ |
| 28 | |
| 29 | #ifndef FLEXINT_H |
| 30 | #define FLEXINT_H |
| 31 | |
| 32 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
| 33 | |
| 34 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 35 | |
| 36 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
| 37 | * if you want the limit (max/min) macros for int types. |
| 38 | */ |
| 39 | #ifndef __STDC_LIMIT_MACROS |
| 40 | #define __STDC_LIMIT_MACROS 1 |
| 41 | #endif |
| 42 | |
| 43 | #include <inttypes.h> |
| 44 | typedef int8_t flex_int8_t; |
| 45 | typedef uint8_t flex_uint8_t; |
| 46 | typedef int16_t flex_int16_t; |
| 47 | typedef uint16_t flex_uint16_t; |
| 48 | typedef int32_t flex_int32_t; |
| 49 | typedef uint32_t flex_uint32_t; |
| 50 | #else |
| 51 | typedef signed char flex_int8_t; |
| 52 | typedef short int flex_int16_t; |
| 53 | typedef int flex_int32_t; |
| 54 | typedef unsigned char flex_uint8_t; |
| 55 | typedef unsigned short int flex_uint16_t; |
| 56 | typedef unsigned int flex_uint32_t; |
| 57 | |
| 58 | /* Limits of integral types. */ |
| 59 | #ifndef INT8_MIN |
| 60 | #define INT8_MIN (-128) |
| 61 | #endif |
| 62 | #ifndef INT16_MIN |
| 63 | #define INT16_MIN (-32767-1) |
| 64 | #endif |
| 65 | #ifndef INT32_MIN |
| 66 | #define INT32_MIN (-2147483647-1) |
| 67 | #endif |
| 68 | #ifndef INT8_MAX |
| 69 | #define INT8_MAX (127) |
| 70 | #endif |
| 71 | #ifndef INT16_MAX |
| 72 | #define INT16_MAX (32767) |
| 73 | #endif |
| 74 | #ifndef INT32_MAX |
| 75 | #define INT32_MAX (2147483647) |
| 76 | #endif |
| 77 | #ifndef UINT8_MAX |
| 78 | #define UINT8_MAX (255U) |
| 79 | #endif |
| 80 | #ifndef UINT16_MAX |
| 81 | #define UINT16_MAX (65535U) |
| 82 | #endif |
| 83 | #ifndef UINT32_MAX |
| 84 | #define UINT32_MAX (4294967295U) |
| 85 | #endif |
| 86 | |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 87 | #endif /* ! C99 */ |
| 88 | |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 89 | #endif /* ! FLEXINT_H */ |
| 90 | |
| 91 | #ifdef __cplusplus |
| 92 | |
| 93 | /* The "const" storage-class-modifier is valid. */ |
| 94 | #define YY_USE_CONST |
| 95 | |
| 96 | #else /* ! __cplusplus */ |
| 97 | |
| 98 | /* C99 requires __STDC__ to be defined as 1. */ |
| 99 | #if defined (__STDC__) |
| 100 | |
| 101 | #define YY_USE_CONST |
| 102 | |
| 103 | #endif /* defined (__STDC__) */ |
| 104 | #endif /* ! __cplusplus */ |
| 105 | |
| 106 | #ifdef YY_USE_CONST |
| 107 | #define yyconst const |
| 108 | #else |
| 109 | #define yyconst |
| 110 | #endif |
| 111 | |
| 112 | /* Returned upon end-of-file. */ |
| 113 | #define YY_NULL 0 |
| 114 | |
| 115 | /* Promotes a possibly negative, possibly signed char to an unsigned |
| 116 | * integer for use as an array index. If the signed char is negative, |
| 117 | * we want to instead treat it as an 8-bit unsigned char, hence the |
| 118 | * double cast. |
| 119 | */ |
| 120 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
| 121 | |
| 122 | /* An opaque pointer. */ |
| 123 | #ifndef YY_TYPEDEF_YY_SCANNER_T |
| 124 | #define YY_TYPEDEF_YY_SCANNER_T |
| 125 | typedef void* yyscan_t; |
| 126 | #endif |
| 127 | |
| 128 | /* For convenience, these vars (plus the bison vars far below) |
| 129 | are macros in the reentrant scanner. */ |
| 130 | #define yyin yyg->yyin_r |
| 131 | #define yyout yyg->yyout_r |
| 132 | #define yyextra yyg->yyextra_r |
| 133 | #define yyleng yyg->yyleng_r |
| 134 | #define yytext yyg->yytext_r |
| 135 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
| 136 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
| 137 | #define yy_flex_debug yyg->yy_flex_debug_r |
| 138 | |
| 139 | /* Enter a start condition. This macro really ought to take a parameter, |
| 140 | * but we do it the disgusting crufty way forced on us by the ()-less |
| 141 | * definition of BEGIN. |
| 142 | */ |
| 143 | #define BEGIN yyg->yy_start = 1 + 2 * |
| 144 | |
| 145 | /* Translate the current start state into a value that can be later handed |
| 146 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
| 147 | * compatibility. |
| 148 | */ |
| 149 | #define YY_START ((yyg->yy_start - 1) / 2) |
| 150 | #define YYSTATE YY_START |
| 151 | |
| 152 | /* Action number for EOF rule of a given start state. */ |
| 153 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| 154 | |
| 155 | /* Special action meaning "start processing a new file". */ |
| 156 | #define YY_NEW_FILE _mesa_glsl_restart(yyin ,yyscanner ) |
| 157 | |
| 158 | #define YY_END_OF_BUFFER_CHAR 0 |
| 159 | |
| 160 | /* Size of default input buffer. */ |
| 161 | #ifndef YY_BUF_SIZE |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 162 | #ifdef __ia64__ |
| 163 | /* On IA-64, the buffer size is 16k, not 8k. |
| 164 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
| 165 | * Ditto for the __ia64__ case accordingly. |
| 166 | */ |
| 167 | #define YY_BUF_SIZE 32768 |
| 168 | #else |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 169 | #define YY_BUF_SIZE 16384 |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 170 | #endif /* __ia64__ */ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 171 | #endif |
| 172 | |
| 173 | /* The state buf must be large enough to hold one state per character in the main buffer. |
| 174 | */ |
| 175 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
| 176 | |
| 177 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
| 178 | #define YY_TYPEDEF_YY_BUFFER_STATE |
| 179 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
| 180 | #endif |
| 181 | |
| 182 | #define EOB_ACT_CONTINUE_SCAN 0 |
| 183 | #define EOB_ACT_END_OF_FILE 1 |
| 184 | #define EOB_ACT_LAST_MATCH 2 |
| 185 | |
| 186 | #define YY_LESS_LINENO(n) |
| 187 | |
| 188 | /* Return all but the first "n" matched characters back to the input stream. */ |
| 189 | #define yyless(n) \ |
| 190 | do \ |
| 191 | { \ |
| 192 | /* Undo effects of setting up yytext. */ \ |
| 193 | int yyless_macro_arg = (n); \ |
| 194 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 195 | *yy_cp = yyg->yy_hold_char; \ |
| 196 | YY_RESTORE_YY_MORE_OFFSET \ |
| 197 | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
| 198 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
| 199 | } \ |
| 200 | while ( 0 ) |
| 201 | |
| 202 | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
| 203 | |
| 204 | #ifndef YY_TYPEDEF_YY_SIZE_T |
| 205 | #define YY_TYPEDEF_YY_SIZE_T |
| 206 | typedef size_t yy_size_t; |
| 207 | #endif |
| 208 | |
| 209 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
| 210 | #define YY_STRUCT_YY_BUFFER_STATE |
| 211 | struct yy_buffer_state |
| 212 | { |
| 213 | FILE *yy_input_file; |
| 214 | |
| 215 | char *yy_ch_buf; /* input buffer */ |
| 216 | char *yy_buf_pos; /* current position in input buffer */ |
| 217 | |
| 218 | /* Size of input buffer in bytes, not including room for EOB |
| 219 | * characters. |
| 220 | */ |
| 221 | yy_size_t yy_buf_size; |
| 222 | |
| 223 | /* Number of characters read into yy_ch_buf, not including EOB |
| 224 | * characters. |
| 225 | */ |
| 226 | int yy_n_chars; |
| 227 | |
| 228 | /* Whether we "own" the buffer - i.e., we know we created it, |
| 229 | * and can realloc() it to grow it, and should free() it to |
| 230 | * delete it. |
| 231 | */ |
| 232 | int yy_is_our_buffer; |
| 233 | |
| 234 | /* Whether this is an "interactive" input source; if so, and |
| 235 | * if we're using stdio for input, then we want to use getc() |
| 236 | * instead of fread(), to make sure we stop fetching input after |
| 237 | * each newline. |
| 238 | */ |
| 239 | int yy_is_interactive; |
| 240 | |
| 241 | /* Whether we're considered to be at the beginning of a line. |
| 242 | * If so, '^' rules will be active on the next match, otherwise |
| 243 | * not. |
| 244 | */ |
| 245 | int yy_at_bol; |
| 246 | |
| 247 | int yy_bs_lineno; /**< The line count. */ |
| 248 | int yy_bs_column; /**< The column count. */ |
| 249 | |
| 250 | /* Whether to try to fill the input buffer when we reach the |
| 251 | * end of it. |
| 252 | */ |
| 253 | int yy_fill_buffer; |
| 254 | |
| 255 | int yy_buffer_status; |
| 256 | |
| 257 | #define YY_BUFFER_NEW 0 |
| 258 | #define YY_BUFFER_NORMAL 1 |
| 259 | /* When an EOF's been seen but there's still some text to process |
| 260 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
| 261 | * shouldn't try reading from the input source any more. We might |
| 262 | * still have a bunch of tokens to match, though, because of |
| 263 | * possible backing-up. |
| 264 | * |
| 265 | * When we actually see the EOF, we change the status to "new" |
| 266 | * (via _mesa_glsl_restart()), so that the user can continue scanning by |
| 267 | * just pointing yyin at a new input file. |
| 268 | */ |
| 269 | #define YY_BUFFER_EOF_PENDING 2 |
| 270 | |
| 271 | }; |
| 272 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
| 273 | |
| 274 | /* We provide macros for accessing buffer states in case in the |
| 275 | * future we want to put the buffer states in a more general |
| 276 | * "scanner state". |
| 277 | * |
| 278 | * Returns the top of the stack, or NULL. |
| 279 | */ |
| 280 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
| 281 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
| 282 | : NULL) |
| 283 | |
| 284 | /* Same as previous macro, but useful when we know that the buffer stack is not |
| 285 | * NULL or when we need an lvalue. For internal use only. |
| 286 | */ |
| 287 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
| 288 | |
| 289 | void _mesa_glsl_restart (FILE *input_file ,yyscan_t yyscanner ); |
| 290 | void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
| 291 | YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); |
| 292 | void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
| 293 | void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
| 294 | void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
| 295 | void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner ); |
| 296 | |
| 297 | static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner ); |
| 298 | static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner ); |
| 299 | static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); |
| 300 | |
| 301 | #define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) |
| 302 | |
| 303 | YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); |
| 304 | YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); |
| 305 | YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); |
| 306 | |
| 307 | void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner ); |
| 308 | void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner ); |
| 309 | void _mesa_glsl_free (void * ,yyscan_t yyscanner ); |
| 310 | |
| 311 | #define yy_new_buffer _mesa_glsl__create_buffer |
| 312 | |
| 313 | #define yy_set_interactive(is_interactive) \ |
| 314 | { \ |
| 315 | if ( ! YY_CURRENT_BUFFER ){ \ |
| 316 | _mesa_glsl_ensure_buffer_stack (yyscanner); \ |
| 317 | YY_CURRENT_BUFFER_LVALUE = \ |
| 318 | _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
| 319 | } \ |
| 320 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
| 321 | } |
| 322 | |
| 323 | #define yy_set_bol(at_bol) \ |
| 324 | { \ |
| 325 | if ( ! YY_CURRENT_BUFFER ){\ |
| 326 | _mesa_glsl_ensure_buffer_stack (yyscanner); \ |
| 327 | YY_CURRENT_BUFFER_LVALUE = \ |
| 328 | _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
| 329 | } \ |
| 330 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
| 331 | } |
| 332 | |
| 333 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
| 334 | |
| 335 | /* Begin user sect3 */ |
| 336 | |
| 337 | #define _mesa_glsl_wrap(n) 1 |
| 338 | #define YY_SKIP_YYWRAP |
| 339 | |
| 340 | typedef unsigned char YY_CHAR; |
| 341 | |
| 342 | typedef int yy_state_type; |
| 343 | |
| 344 | #define yytext_ptr yytext_r |
| 345 | |
| 346 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); |
| 347 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); |
| 348 | static int yy_get_next_buffer (yyscan_t yyscanner ); |
| 349 | static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); |
| 350 | |
| 351 | /* Done after the current pattern has been matched and before the |
| 352 | * corresponding action - sets up yytext. |
| 353 | */ |
| 354 | #define YY_DO_BEFORE_ACTION \ |
| 355 | yyg->yytext_ptr = yy_bp; \ |
| 356 | yyleng = (size_t) (yy_cp - yy_bp); \ |
| 357 | yyg->yy_hold_char = *yy_cp; \ |
| 358 | *yy_cp = '\0'; \ |
| 359 | yyg->yy_c_buf_p = yy_cp; |
| 360 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 361 | #define YY_NUM_RULES 189 |
| 362 | #define YY_END_OF_BUFFER 190 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 363 | /* This struct is not used in this scanner, |
| 364 | but its presence is necessary. */ |
| 365 | struct yy_trans_info |
| 366 | { |
| 367 | flex_int32_t yy_verify; |
| 368 | flex_int32_t yy_nxt; |
| 369 | }; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 370 | static yyconst flex_int16_t yy_accept[716] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 371 | { 0, |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 372 | 0, 0, 15, 15, 0, 0, 190, 188, 1, 20, |
| 373 | 188, 188, 188, 188, 188, 188, 188, 188, 102, 100, |
| 374 | 188, 188, 188, 187, 188, 187, 187, 187, 187, 187, |
| 375 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 376 | 187, 187, 187, 187, 187, 188, 1, 188, 97, 189, |
| 377 | 15, 19, 189, 18, 16, 17, 13, 12, 1, 84, |
| 378 | 93, 85, 96, 90, 79, 92, 80, 99, 104, 91, |
| 379 | 105, 102, 0, 0, 107, 0, 100, 88, 81, 83, |
| 380 | 82, 89, 187, 87, 187, 187, 187, 187, 187, 187, |
| 381 | 187, 187, 187, 187, 187, 187, 29, 187, 187, 187, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 382 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 383 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 384 | 33, 187, 187, 60, 187, 187, 187, 187, 187, 187, |
| 385 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 386 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 387 | 187, 187, 187, 187, 187, 187, 98, 86, 1, 0, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 388 | 0, 2, 0, 0, 0, 0, 15, 14, 18, 17, |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 389 | 0, 104, 103, 0, 105, 0, 106, 101, 94, 95, |
| 390 | 187, 110, 187, 187, 187, 187, 187, 187, 187, 187, |
| 391 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 392 | 187, 187, 187, 32, 187, 187, 187, 187, 187, 187, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 393 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 394 | 187, 187, 187, 187, 25, 187, 187, 187, 187, 187, |
| 395 | 187, 187, 187, 187, 187, 61, 187, 187, 187, 187, |
| 396 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 397 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 398 | 187, 187, 187, 187, 187, 0, 0, 0, 0, 14, |
| 399 | 0, 104, 0, 103, 0, 105, 106, 187, 187, 23, |
| 400 | 187, 187, 150, 187, 187, 187, 187, 187, 187, 187, |
| 401 | 187, 187, 31, 113, 187, 187, 187, 187, 67, 187, |
| 402 | 187, 118, 132, 187, 187, 187, 187, 187, 187, 187, |
| 403 | 187, 187, 187, 187, 129, 153, 48, 49, 50, 187, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 404 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 405 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 406 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 116, |
| 407 | 108, 187, 187, 26, 187, 187, 187, 187, 187, 187, |
| 408 | 45, 46, 47, 77, 187, 187, 0, 0, 0, 0, |
| 409 | 0, 103, 187, 187, 27, 36, 37, 38, 187, 111, |
| 410 | 187, 22, 187, 187, 187, 187, 140, 141, 142, 187, |
| 411 | 109, 187, 133, 24, 143, 144, 145, 155, 137, 138, |
| 412 | 139, 187, 187, 187, 62, 135, 187, 187, 39, 40, |
| 413 | 41, 187, 187, 187, 187, 187, 187, 187, 187, 187, |
| 414 | 187, 187, 187, 187, 187, 187, 187, 130, 187, 187, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 415 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 416 | 187, 187, 187, 187, 187, 187, 187, 187, 112, 187, |
| 417 | 152, 42, 43, 44, 187, 187, 30, 0, 0, 0, |
| 418 | 0, 159, 187, 187, 157, 187, 187, 187, 131, 126, |
| 419 | 162, 187, 187, 187, 187, 187, 187, 121, 187, 187, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 420 | 78, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 421 | 187, 187, 187, 187, 136, 117, 187, 187, 124, 35, |
| 422 | 187, 187, 149, 68, 125, 76, 160, 119, 187, 187, |
| 423 | 187, 187, 187, 187, 187, 0, 0, 0, 0, 187, |
| 424 | 187, 187, 120, 34, 187, 187, 187, 187, 187, 187, |
| 425 | 163, 164, 165, 187, 187, 187, 187, 154, 187, 187, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 426 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 427 | 187, 187, 187, 187, 187, 187, 114, 187, 187, 187, |
| 428 | 187, 187, 63, 187, 64, 187, 0, 0, 0, 0, |
| 429 | 0, 187, 65, 28, 127, 167, 168, 169, 187, 187, |
| 430 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 122, |
| 431 | 187, 187, 187, 187, 187, 187, 187, 187, 187, 115, |
| 432 | 171, 172, 173, 187, 187, 134, 123, 0, 0, 6, |
| 433 | 0, 0, 0, 11, 3, 21, 187, 187, 187, 187, |
| 434 | 187, 187, 187, 187, 187, 166, 128, 66, 151, 187, |
| 435 | 158, 156, 186, 70, 71, 72, 187, 187, 187, 187, |
| 436 | 187, 187, 0, 0, 0, 0, 0, 0, 187, 187, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 437 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 438 | 187, 170, 187, 187, 187, 187, 187, 187, 187, 187, |
| 439 | 187, 187, 187, 187, 187, 187, 187, 174, 4, 0, |
| 440 | 5, 0, 0, 0, 0, 0, 187, 187, 187, 187, |
| 441 | 187, 187, 187, 183, 187, 187, 187, 187, 187, 187, |
| 442 | 73, 187, 187, 187, 0, 0, 0, 187, 187, 184, |
| 443 | 175, 187, 176, 187, 187, 187, 187, 187, 187, 187, |
| 444 | 187, 187, 185, 0, 0, 177, 178, 181, 182, 69, |
| 445 | 187, 146, 187, 147, 161, 179, 180, 0, 0, 187, |
| 446 | 187, 187, 0, 0, 0, 74, 187, 75, 0, 0, |
| 447 | 0, 187, 0, 0, 0, 187, 0, 0, 7, 0, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 448 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 449 | 0, 187, 0, 8, 0, 0, 148, 0, 0, 0, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 450 | 0, 9, 0, 10, 0 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 451 | } ; |
| 452 | |
| 453 | static yyconst flex_int32_t yy_ec[256] = |
| 454 | { 0, |
| 455 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
| 456 | 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, |
| 457 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 458 | 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, |
| 459 | 10, 11, 12, 1, 13, 14, 15, 16, 17, 18, |
| 460 | 19, 20, 21, 21, 21, 22, 22, 23, 1, 24, |
| 461 | 25, 26, 1, 1, 27, 28, 29, 30, 31, 32, |
| 462 | 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, |
| 463 | 33, 34, 35, 33, 33, 33, 33, 36, 33, 33, |
| 464 | 1, 1, 1, 37, 38, 1, 39, 40, 41, 42, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 465 | |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 466 | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 467 | 53, 54, 33, 55, 56, 57, 58, 59, 60, 61, |
| 468 | 62, 63, 1, 64, 1, 1, 1, 1, 1, 1, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 469 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 470 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 471 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 472 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 473 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 474 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 475 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 476 | |
| 477 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 478 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 479 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 480 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 481 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 482 | 1, 1, 1, 1, 1 |
| 483 | } ; |
| 484 | |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 485 | static yyconst flex_int32_t yy_meta[65] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 486 | { 0, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 487 | 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 488 | 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, |
| 489 | 4, 5, 1, 1, 1, 1, 6, 6, 6, 6, |
| 490 | 5, 5, 7, 7, 7, 8, 1, 7, 6, 6, |
| 491 | 6, 6, 5, 5, 7, 7, 7, 7, 7, 7, |
| 492 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
| 493 | 8, 7, 7, 1 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 494 | } ; |
| 495 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 496 | static yyconst flex_int16_t yy_base[727] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 497 | { 0, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 498 | 0, 63, 88, 0, 1084, 1083, 1085, 1088, 64, 1088, |
| 499 | 1059, 1058, 59, 1057, 58, 60, 58, 1056, 139, 187, |
| 500 | 47, 1055, 56, 0, 1042, 121, 110, 137, 138, 134, |
| 501 | 163, 1025, 173, 177, 115, 149, 140, 1019, 159, 121, |
| 502 | 187, 194, 194, 172, 1030, 171, 253, 240, 1050, 1088, |
| 503 | 250, 1088, 1059, 244, 1088, 0, 1088, 1088, 265, 1088, |
| 504 | 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 241, 1088, |
| 505 | 243, 187, 286, 303, 1088, 0, 0, 1048, 1088, 1088, |
| 506 | 1088, 1047, 0, 1088, 1014, 1019, 1012, 1015, 1024, 1023, |
| 507 | 1009, 1012, 1024, 35, 1018, 1005, 1002, 1016, 1002, 999, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 508 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 509 | 999, 1005, 218, 238, 999, 1010, 995, 1001, 1005, 1006, |
| 510 | 0, 997, 1008, 239, 1003, 983, 218, 987, 1001, 991, |
| 511 | 119, 984, 240, 997, 999, 981, 977, 985, 982, 971, |
| 512 | 980, 258, 978, 984, 979, 982, 970, 973, 258, 224, |
| 513 | 979, 982, 969, 982, 264, 975, 1088, 1088, 329, 324, |
| 514 | 334, 1088, 960, 973, 964, 975, 330, 0, 322, 0, |
| 515 | 333, 1088, 316, 378, 1088, 385, 392, 0, 1088, 1088, |
| 516 | 970, 0, 961, 965, 975, 972, 955, 954, 954, 958, |
| 517 | 300, 969, 966, 966, 964, 961, 952, 959, 945, 943, |
| 518 | 956, 941, 958, 0, 955, 942, 950, 947, 951, 952, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 519 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 520 | 945, 942, 930, 929, 943, 946, 943, 930, 937, 927, |
| 521 | 343, 933, 936, 926, 934, 922, 926, 917, 932, 922, |
| 522 | 913, 932, 915, 913, 924, 913, 908, 906, 920, 905, |
| 523 | 907, 904, 916, 915, 918, 899, 320, 908, 902, 912, |
| 524 | 890, 350, 909, 911, 899, 891, 895, 907, 890, 0, |
| 525 | 399, 409, 426, 1088, 438, 445, 1088, 885, 896, 0, |
| 526 | 893, 361, 0, 886, 884, 886, 881, 890, 878, 896, |
| 527 | 884, 367, 0, 0, 878, 889, 888, 888, 0, 872, |
| 528 | 414, 0, 0, 874, 431, 882, 883, 873, 867, 866, |
| 529 | 867, 866, 450, 862, 0, 0, 858, 857, 856, 858, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 530 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 531 | 859, 864, 858, 854, 868, 863, 862, 861, 852, 855, |
| 532 | 855, 847, 850, 845, 854, 859, 844, 857, 847, 0, |
| 533 | 0, 854, 850, 0, 841, 841, 847, 846, 453, 843, |
| 534 | 0, 0, 0, 0, 832, 845, 844, 843, 840, 828, |
| 535 | 462, 474, 840, 842, 0, 0, 0, 0, 828, 0, |
| 536 | 828, 0, 827, 828, 822, 833, 0, 0, 0, 823, |
| 537 | 0, 819, 0, 0, 0, 0, 0, 0, 0, 0, |
| 538 | 0, 830, 457, 829, 0, 0, 827, 823, 0, 0, |
| 539 | 0, 812, 479, 482, 485, 817, 813, 819, 809, 807, |
| 540 | 821, 805, 805, 819, 807, 819, 814, 0, 812, 809, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 541 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 542 | 813, 796, 798, 805, 811, 806, 805, 792, 0, 794, |
| 543 | 0, 0, 0, 0, 793, 797, 0, 791, 840, 790, |
| 544 | 793, 0, 781, 791, 0, 779, 779, 793, 0, 795, |
| 545 | 0, 491, 803, 802, 801, 772, 771, 0, 789, 788, |
| 546 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 547 | 772, 786, 772, 769, 0, 0, 775, 774, 0, 0, |
| 548 | 772, 764, 0, 0, 0, 0, 0, 0, 761, 773, |
| 549 | 494, 765, 772, 769, 763, 756, 512, 772, 757, 752, |
| 550 | 766, 764, 0, 0, 756, 775, 774, 773, 744, 743, |
| 551 | 331, 480, 0, 756, 759, 757, 745, 0, 755, 752, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 552 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 553 | 751, 740, 739, 738, 507, 747, 0, 759, 758, 757, |
| 554 | 728, 727, 0, 742, 0, 740, 735, 485, 535, 779, |
| 555 | 728, 736, 0, 0, 0, 751, 750, 0, 732, 735, |
| 556 | 719, 727, 717, 725, 726, 726, 725, 710, 723, 0, |
| 557 | 724, 712, 711, 707, 731, 730, 729, 700, 699, 0, |
| 558 | 729, 728, 0, 710, 713, 0, 0, 699, 542, 1088, |
| 559 | 563, 0, 569, 525, 1088, 0, 696, 695, 705, 705, |
| 560 | 692, 707, 690, 705, 700, 0, 0, 0, 0, 685, |
| 561 | 0, 0, 0, 706, 337, 706, 695, 698, 682, 681, |
| 562 | 691, 691, 681, 514, 590, 373, 689, 677, 675, 674, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 563 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 564 | 685, 0, 688, 684, 686, 682, 668, 675, 675, 677, |
| 565 | 673, 675, 673, 673, 660, 659, 670, 0, 1088, 420, |
| 566 | 1088, 597, 0, 617, 672, 654, 671, 670, 653, 645, |
| 567 | 653, 643, 651, 0, 640, 659, 656, 650, 647, 644, |
| 568 | 0, 639, 609, 592, 537, 588, 598, 582, 581, 0, |
| 569 | 0, 569, 0, 567, 583, 560, 544, 527, 491, 487, |
| 570 | 390, 378, 0, 392, 384, 0, 0, 0, 0, 0, |
| 571 | 339, 330, 275, 0, 0, 0, 0, 249, 265, 241, |
| 572 | 242, 222, 380, 541, 213, 0, 200, 0, 545, 497, |
| 573 | 184, 157, 150, 566, 568, 136, 593, 594, 1088, 619, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 574 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 575 | 571, 112, 595, 1088, 572, 578, 0, 123, 621, 630, |
| 576 | 639, 1088, 640, 1088, 1088, 650, 655, 660, 665, 667, |
| 577 | 669, 675, 682, 687, 692, 697 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 578 | } ; |
| 579 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 580 | static yyconst flex_int16_t yy_def[727] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 581 | { 0, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 582 | 715, 1, 715, 3, 716, 716, 715, 715, 715, 715, |
| 583 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 584 | 715, 715, 715, 717, 715, 717, 717, 717, 717, 717, |
| 585 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 586 | 717, 717, 717, 717, 717, 715, 715, 715, 715, 715, |
| 587 | 715, 715, 715, 715, 715, 718, 715, 715, 715, 715, |
| 588 | 715, 715, 715, 715, 715, 715, 715, 715, 719, 715, |
| 589 | 720, 19, 715, 715, 715, 721, 20, 715, 715, 715, |
| 590 | 715, 715, 717, 715, 717, 717, 717, 717, 717, 717, |
| 591 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 592 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 593 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 594 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 595 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 596 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 597 | 717, 717, 717, 717, 717, 717, 715, 715, 715, 715, |
| 598 | 715, 715, 715, 715, 715, 715, 715, 722, 715, 718, |
| 599 | 715, 715, 720, 715, 715, 715, 715, 721, 715, 715, |
| 600 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 601 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 602 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 603 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 604 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 605 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 606 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 607 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 608 | 717, 717, 717, 717, 717, 715, 715, 715, 715, 722, |
| 609 | 715, 715, 715, 715, 715, 715, 715, 717, 717, 717, |
| 610 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 611 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 612 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 613 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 614 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 615 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 616 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 617 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 618 | 717, 717, 717, 717, 717, 717, 715, 715, 715, 715, |
| 619 | 715, 715, 717, 717, 717, 717, 717, 717, 717, 717, |
| 620 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 621 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 622 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 623 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 624 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 625 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 626 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 627 | 717, 717, 717, 717, 717, 717, 717, 715, 715, 715, |
| 628 | 715, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 629 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 630 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 631 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 632 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 633 | 717, 717, 717, 717, 717, 715, 715, 715, 715, 717, |
| 634 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 635 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 636 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 637 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 638 | 717, 717, 717, 717, 717, 717, 715, 723, 715, 715, |
| 639 | 715, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 640 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 641 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 642 | 717, 717, 717, 717, 717, 717, 717, 715, 715, 715, |
| 643 | 715, 724, 715, 715, 715, 717, 717, 717, 717, 717, |
| 644 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 645 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 646 | 717, 717, 715, 725, 715, 724, 715, 715, 717, 717, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 647 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 648 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 649 | 717, 717, 717, 717, 717, 717, 717, 717, 715, 715, |
| 650 | 715, 715, 726, 715, 715, 715, 717, 717, 717, 717, |
| 651 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 652 | 717, 717, 717, 717, 726, 715, 715, 717, 717, 717, |
| 653 | 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, |
| 654 | 717, 717, 717, 715, 715, 717, 717, 717, 717, 717, |
| 655 | 717, 717, 717, 717, 717, 717, 717, 715, 715, 717, |
| 656 | 717, 717, 715, 715, 715, 717, 717, 717, 715, 715, |
| 657 | 715, 717, 715, 715, 715, 717, 715, 715, 715, 715, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 658 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 659 | 715, 717, 715, 715, 715, 715, 717, 715, 715, 715, |
| 660 | 715, 715, 715, 715, 0, 715, 715, 715, 715, 715, |
| 661 | 715, 715, 715, 715, 715, 715 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 662 | } ; |
| 663 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 664 | static yyconst flex_int16_t yy_nxt[1153] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 665 | { 0, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 666 | 8, 9, 10, 9, 11, 8, 12, 13, 8, 8, |
| 667 | 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, |
| 668 | 20, 20, 8, 21, 22, 23, 24, 24, 24, 24, |
| 669 | 24, 24, 24, 24, 24, 24, 25, 24, 26, 27, |
| 670 | 28, 29, 30, 31, 32, 33, 34, 24, 24, 35, |
| 671 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, |
| 672 | 24, 24, 24, 46, 47, 59, 62, 59, 48, 65, |
| 673 | 78, 79, 67, 69, 69, 69, 69, 69, 69, 69, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 674 | 81, 82, 66, 63, 68, 180, 181, 49, 50, 51, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 675 | 52, 51, 50, 50, 50, 50, 50, 50, 50, 50, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 676 | |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 677 | 50, 50, 53, 50, 54, 54, 54, 54, 54, 54, |
| 678 | 55, 50, 50, 50, 56, 56, 56, 56, 56, 56, |
| 679 | 56, 56, 56, 56, 50, 56, 56, 56, 56, 56, |
| 680 | 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, |
| 681 | 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, |
| 682 | 56, 50, 71, 116, 72, 72, 72, 72, 72, 72, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 683 | 73, 85, 88, 126, 89, 214, 710, 117, 90, 74, |
| 684 | 75, 707, 215, 127, 76, 91, 86, 87, 120, 92, |
| 685 | 95, 74, 75, 99, 96, 100, 93, 118, 702, 94, |
| 686 | 97, 119, 121, 697, 101, 147, 98, 123, 696, 76, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 687 | |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 688 | 71, 102, 77, 77, 77, 77, 77, 77, 77, 103, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 689 | 143, 108, 104, 124, 144, 105, 125, 74, 75, 109, |
| 690 | 111, 106, 715, 112, 145, 128, 695, 113, 114, 74, |
| 691 | 75, 110, 129, 130, 148, 115, 135, 131, 692, 136, |
| 692 | 139, 151, 152, 132, 133, 140, 134, 715, 137, 141, |
| 693 | 683, 157, 142, 157, 149, 138, 59, 684, 150, 159, |
| 694 | 159, 159, 159, 159, 159, 159, 59, 190, 59, 209, |
| 695 | 237, 161, 162, 164, 165, 691, 192, 210, 191, 238, |
| 696 | 217, 688, 153, 161, 162, 164, 165, 687, 202, 154, |
| 697 | 193, 203, 204, 155, 218, 205, 227, 206, 156, 71, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 698 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 699 | 686, 73, 73, 73, 73, 73, 73, 73, 235, 236, |
| 700 | 243, 685, 228, 244, 166, 166, 74, 75, 167, 167, |
| 701 | 167, 167, 167, 167, 167, 151, 152, 682, 74, 75, |
| 702 | 149, 157, 59, 157, 150, 151, 152, 159, 159, 159, |
| 703 | 159, 159, 159, 159, 251, 251, 253, 254, 252, 252, |
| 704 | 252, 252, 252, 252, 252, 267, 268, 531, 253, 254, |
| 705 | 297, 298, 299, 325, 681, 532, 153, 331, 332, 333, |
| 706 | 610, 611, 326, 154, 559, 560, 153, 155, 346, 347, |
| 707 | 348, 683, 156, 154, 357, 358, 359, 155, 684, 255, |
| 708 | 255, 680, 156, 256, 256, 256, 256, 256, 256, 256, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 709 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 710 | 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, |
| 711 | 167, 167, 167, 167, 252, 252, 252, 252, 252, 252, |
| 712 | 252, 620, 621, 257, 252, 252, 252, 252, 252, 252, |
| 713 | 252, 365, 366, 367, 679, 257, 678, 341, 341, 677, |
| 714 | 162, 342, 342, 342, 342, 342, 342, 342, 369, 370, |
| 715 | 371, 676, 162, 256, 256, 256, 256, 256, 256, 256, |
| 716 | 256, 256, 256, 256, 256, 256, 256, 379, 380, 381, |
| 717 | 412, 413, 414, 433, 434, 435, 165, 342, 342, 342, |
| 718 | 342, 342, 342, 342, 436, 437, 559, 560, 165, 342, |
| 719 | 342, 342, 342, 342, 342, 342, 442, 443, 444, 445, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 720 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 721 | 446, 447, 448, 449, 450, 254, 533, 486, 487, 488, |
| 722 | 508, 509, 510, 477, 534, 620, 621, 254, 489, 490, |
| 723 | 562, 511, 512, 545, 546, 547, 564, 518, 519, 519, |
| 724 | 519, 519, 519, 519, 548, 549, 559, 560, 620, 621, |
| 725 | 693, 675, 689, 559, 560, 562, 689, 674, 694, 623, |
| 726 | 563, 563, 563, 563, 563, 563, 563, 594, 595, 595, |
| 727 | 595, 595, 595, 595, 559, 560, 597, 698, 673, 700, |
| 728 | 559, 560, 705, 705, 623, 699, 701, 598, 561, 561, |
| 729 | 561, 561, 561, 561, 563, 563, 563, 563, 563, 563, |
| 730 | 563, 620, 621, 690, 703, 698, 703, 690, 620, 621, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 731 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 732 | 672, 671, 704, 699, 704, 624, 624, 624, 624, 624, |
| 733 | 624, 624, 622, 622, 622, 622, 622, 622, 620, 621, |
| 734 | 700, 708, 711, 706, 706, 670, 669, 701, 668, 709, |
| 735 | 712, 713, 624, 624, 624, 624, 624, 624, 624, 714, |
| 736 | 711, 713, 667, 666, 665, 664, 663, 662, 712, 714, |
| 737 | 57, 57, 57, 57, 57, 57, 57, 57, 83, 83, |
| 738 | 83, 83, 83, 160, 160, 160, 160, 160, 69, 69, |
| 739 | 163, 163, 168, 168, 168, 250, 250, 661, 250, 250, |
| 740 | 250, 250, 250, 561, 561, 561, 660, 659, 658, 561, |
| 741 | 596, 596, 596, 622, 622, 622, 657, 656, 655, 622, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 742 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 743 | 645, 645, 645, 654, 653, 652, 651, 650, 649, 648, |
| 744 | 647, 646, 644, 643, 642, 641, 640, 639, 638, 637, |
| 745 | 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, |
| 746 | 626, 625, 619, 618, 617, 616, 615, 614, 613, 612, |
| 747 | 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, |
| 748 | 599, 593, 592, 591, 590, 589, 588, 587, 586, 585, |
| 749 | 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, |
| 750 | 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, |
| 751 | 564, 558, 557, 556, 555, 554, 553, 552, 551, 550, |
| 752 | 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 753 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 754 | 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, |
| 755 | 520, 517, 516, 515, 514, 513, 507, 506, 505, 504, |
| 756 | 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, |
| 757 | 493, 492, 491, 485, 484, 483, 482, 481, 480, 479, |
| 758 | 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, |
| 759 | 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, |
| 760 | 458, 457, 456, 455, 454, 453, 452, 451, 441, 440, |
| 761 | 439, 438, 432, 431, 430, 429, 428, 427, 426, 425, |
| 762 | 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, |
| 763 | 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 764 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 765 | 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, |
| 766 | 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, |
| 767 | 378, 377, 376, 375, 374, 373, 372, 368, 364, 363, |
| 768 | 362, 361, 360, 356, 355, 354, 353, 352, 351, 350, |
| 769 | 349, 345, 344, 343, 340, 339, 338, 337, 336, 335, |
| 770 | 334, 330, 329, 328, 327, 324, 323, 322, 321, 320, |
| 771 | 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, |
| 772 | 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, |
| 773 | 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, |
| 774 | 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 775 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 776 | 276, 275, 274, 273, 272, 271, 270, 269, 266, 265, |
| 777 | 264, 263, 262, 261, 260, 259, 258, 249, 248, 247, |
| 778 | 246, 245, 242, 241, 240, 239, 234, 233, 232, 231, |
| 779 | 230, 229, 226, 225, 224, 223, 222, 221, 220, 219, |
| 780 | 216, 213, 212, 211, 208, 207, 201, 200, 199, 198, |
| 781 | 197, 196, 195, 194, 189, 188, 187, 186, 185, 184, |
| 782 | 183, 182, 179, 178, 177, 176, 175, 174, 173, 172, |
| 783 | 171, 170, 169, 158, 80, 146, 122, 107, 84, 80, |
| 784 | 70, 64, 61, 60, 715, 58, 58, 7, 715, 715, |
| 785 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 786 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 787 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 788 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 789 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 790 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 791 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 792 | 715, 715 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 793 | } ; |
| 794 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 795 | static yyconst flex_int16_t yy_chk[1153] = |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 796 | { 0, |
| 797 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 798 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 799 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 800 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 801 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 802 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 803 | 1, 1, 1, 1, 2, 9, 13, 9, 2, 15, |
| 804 | 21, 21, 16, 17, 17, 17, 17, 17, 17, 17, |
| 805 | 23, 23, 15, 13, 16, 94, 94, 2, 3, 3, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 806 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 807 | |
| 808 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 809 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 810 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 811 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 812 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 813 | 3, 3, 19, 35, 19, 19, 19, 19, 19, 19, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 814 | 19, 26, 27, 40, 27, 121, 708, 35, 27, 19, |
| 815 | 19, 702, 121, 40, 19, 28, 26, 26, 37, 28, |
| 816 | 29, 19, 19, 30, 29, 30, 28, 36, 696, 28, |
| 817 | 29, 36, 37, 693, 30, 46, 29, 39, 692, 19, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 818 | |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 819 | 20, 31, 20, 20, 20, 20, 20, 20, 20, 31, |
| 820 | 44, 33, 31, 39, 44, 31, 39, 20, 20, 33, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 821 | 34, 31, 72, 34, 44, 41, 691, 34, 34, 20, |
| 822 | 20, 33, 41, 41, 46, 34, 42, 41, 687, 42, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 823 | 43, 48, 48, 41, 41, 43, 41, 72, 42, 43, |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 824 | 678, 51, 43, 51, 47, 42, 47, 678, 47, 54, |
| 825 | 54, 54, 54, 54, 54, 54, 59, 103, 59, 117, |
| 826 | 140, 69, 69, 71, 71, 685, 104, 117, 103, 140, |
| 827 | 123, 682, 48, 69, 69, 71, 71, 681, 114, 48, |
| 828 | 104, 114, 114, 48, 123, 114, 132, 114, 48, 73, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 829 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 830 | 680, 73, 73, 73, 73, 73, 73, 73, 139, 139, |
| 831 | 145, 679, 132, 145, 74, 74, 73, 73, 74, 74, |
| 832 | 74, 74, 74, 74, 74, 150, 150, 673, 73, 73, |
| 833 | 149, 157, 149, 157, 149, 151, 151, 159, 159, 159, |
| 834 | 159, 159, 159, 159, 161, 161, 163, 163, 161, 161, |
| 835 | 161, 161, 161, 161, 161, 181, 181, 491, 163, 163, |
| 836 | 211, 211, 211, 237, 672, 491, 150, 242, 242, 242, |
| 837 | 585, 585, 237, 150, 596, 596, 151, 150, 262, 262, |
| 838 | 262, 683, 150, 151, 272, 272, 272, 151, 683, 164, |
| 839 | 164, 671, 151, 164, 164, 164, 164, 164, 164, 164, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 840 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 841 | 166, 166, 166, 166, 166, 166, 166, 167, 167, 167, |
| 842 | 167, 167, 167, 167, 251, 251, 251, 251, 251, 251, |
| 843 | 251, 620, 620, 167, 252, 252, 252, 252, 252, 252, |
| 844 | 252, 281, 281, 281, 665, 167, 664, 253, 253, 662, |
| 845 | 252, 253, 253, 253, 253, 253, 253, 253, 285, 285, |
| 846 | 285, 661, 252, 255, 255, 255, 255, 255, 255, 255, |
| 847 | 256, 256, 256, 256, 256, 256, 256, 293, 293, 293, |
| 848 | 329, 329, 329, 373, 373, 373, 256, 341, 341, 341, |
| 849 | 341, 341, 341, 341, 373, 373, 518, 518, 256, 342, |
| 850 | 342, 342, 342, 342, 342, 342, 383, 383, 383, 384, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 851 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 852 | 384, 384, 385, 385, 385, 342, 492, 432, 432, 432, |
| 853 | 471, 471, 471, 477, 492, 594, 594, 342, 432, 432, |
| 854 | 518, 471, 471, 505, 505, 505, 564, 477, 477, 477, |
| 855 | 477, 477, 477, 477, 505, 505, 519, 519, 645, 645, |
| 856 | 690, 660, 684, 559, 559, 518, 689, 659, 690, 594, |
| 857 | 519, 519, 519, 519, 519, 519, 519, 559, 559, 559, |
| 858 | 559, 559, 559, 559, 561, 561, 564, 694, 658, 695, |
| 859 | 563, 563, 701, 705, 594, 694, 695, 564, 561, 561, |
| 860 | 561, 561, 561, 561, 563, 563, 563, 563, 563, 563, |
| 861 | 563, 595, 595, 684, 697, 698, 703, 689, 622, 622, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 862 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 863 | 657, 656, 697, 698, 703, 595, 595, 595, 595, 595, |
| 864 | 595, 595, 622, 622, 622, 622, 622, 622, 624, 624, |
| 865 | 700, 706, 709, 701, 705, 655, 654, 700, 652, 706, |
| 866 | 709, 710, 624, 624, 624, 624, 624, 624, 624, 710, |
| 867 | 711, 713, 649, 648, 647, 646, 644, 643, 711, 713, |
| 868 | 716, 716, 716, 716, 716, 716, 716, 716, 717, 717, |
| 869 | 717, 717, 717, 718, 718, 718, 718, 718, 719, 719, |
| 870 | 720, 720, 721, 721, 721, 722, 722, 642, 722, 722, |
| 871 | 722, 722, 722, 723, 723, 723, 640, 639, 638, 723, |
| 872 | 724, 724, 724, 725, 725, 725, 637, 636, 635, 725, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 873 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 874 | 726, 726, 726, 633, 632, 631, 630, 629, 628, 627, |
| 875 | 626, 625, 617, 616, 615, 614, 613, 612, 611, 610, |
| 876 | 609, 608, 607, 606, 605, 604, 603, 601, 600, 599, |
| 877 | 598, 597, 593, 592, 591, 590, 589, 588, 587, 586, |
| 878 | 584, 580, 575, 574, 573, 572, 571, 570, 569, 568, |
| 879 | 567, 558, 555, 554, 552, 551, 549, 548, 547, 546, |
| 880 | 545, 544, 543, 542, 541, 539, 538, 537, 536, 535, |
| 881 | 534, 533, 532, 531, 530, 529, 527, 526, 522, 521, |
| 882 | 520, 517, 516, 514, 512, 511, 510, 509, 508, 506, |
| 883 | 504, 503, 502, 501, 500, 499, 497, 496, 495, 494, |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 884 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 885 | 490, 489, 488, 487, 486, 485, 482, 481, 480, 479, |
| 886 | 478, 476, 475, 474, 473, 472, 470, 469, 462, 461, |
| 887 | 458, 457, 454, 453, 452, 451, 440, 439, 437, 436, |
| 888 | 435, 434, 433, 430, 428, 427, 426, 424, 423, 421, |
| 889 | 420, 419, 418, 416, 415, 410, 408, 407, 406, 405, |
| 890 | 404, 403, 402, 401, 400, 399, 397, 396, 395, 394, |
| 891 | 393, 392, 391, 390, 389, 388, 387, 386, 382, 378, |
| 892 | 377, 374, 372, 362, 360, 356, 355, 354, 353, 351, |
| 893 | 349, 344, 343, 340, 339, 338, 337, 336, 335, 330, |
| 894 | 328, 327, 326, 325, 323, 322, 319, 318, 317, 316, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 895 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 896 | 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, |
| 897 | 305, 304, 303, 302, 301, 300, 299, 298, 297, 294, |
| 898 | 292, 291, 290, 289, 288, 287, 286, 284, 280, 278, |
| 899 | 277, 276, 275, 271, 270, 269, 268, 267, 266, 265, |
| 900 | 264, 261, 259, 258, 249, 248, 247, 246, 245, 244, |
| 901 | 243, 241, 240, 239, 238, 236, 235, 234, 233, 232, |
| 902 | 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, |
| 903 | 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, |
| 904 | 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, |
| 905 | 200, 199, 198, 197, 196, 195, 193, 192, 191, 190, |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 906 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 907 | 189, 188, 187, 186, 185, 184, 183, 182, 180, 179, |
| 908 | 178, 177, 176, 175, 174, 173, 171, 156, 155, 154, |
| 909 | 153, 146, 144, 143, 142, 141, 138, 137, 136, 135, |
| 910 | 134, 133, 131, 130, 129, 128, 127, 126, 125, 124, |
| 911 | 122, 120, 119, 118, 116, 115, 113, 112, 110, 109, |
| 912 | 108, 107, 106, 105, 102, 101, 100, 99, 98, 97, |
| 913 | 96, 95, 93, 92, 91, 90, 89, 88, 87, 86, |
| 914 | 85, 82, 78, 53, 49, 45, 38, 32, 25, 22, |
| 915 | 18, 14, 12, 11, 7, 6, 5, 715, 715, 715, |
| 916 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 917 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 918 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 919 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 920 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 921 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 922 | 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, |
| 923 | 715, 715 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 924 | } ; |
| 925 | |
| 926 | /* The intent behind this definition is that it'll catch |
| 927 | * any uses of REJECT which flex missed. |
| 928 | */ |
| 929 | #define REJECT reject_used_but_not_detected |
| 930 | #define yymore() yymore_used_but_not_detected |
| 931 | #define YY_MORE_ADJ 0 |
| 932 | #define YY_RESTORE_YY_MORE_OFFSET |
| 933 | #line 1 "glsl_lexer.lpp" |
| 934 | #line 2 "glsl_lexer.lpp" |
| 935 | /* |
| 936 | * Copyright © 2008, 2009 Intel Corporation |
| 937 | * |
| 938 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 939 | * copy of this software and associated documentation files (the "Software"), |
| 940 | * to deal in the Software without restriction, including without limitation |
| 941 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 942 | * and/or sell copies of the Software, and to permit persons to whom the |
| 943 | * Software is furnished to do so, subject to the following conditions: |
| 944 | * |
| 945 | * The above copyright notice and this permission notice (including the next |
| 946 | * paragraph) shall be included in all copies or substantial portions of the |
| 947 | * Software. |
| 948 | * |
| 949 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 950 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 951 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 952 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 953 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 954 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 955 | * DEALINGS IN THE SOFTWARE. |
| 956 | */ |
| 957 | #include <ctype.h> |
| 958 | #include "ast.h" |
| 959 | #include "glsl_parser_extras.h" |
| 960 | #include "glsl_parser.h" |
| 961 | |
| 962 | #define YY_USER_ACTION \ |
| 963 | do { \ |
| 964 | yylloc->source = 0; \ |
| 965 | yylloc->first_column = yycolumn + 1; \ |
| 966 | yylloc->first_line = yylineno + 1; \ |
| 967 | yycolumn += yyleng; \ |
| 968 | } while(0); |
| 969 | |
| 970 | #define YY_USER_INIT yylineno = 0; yycolumn = 0; |
| 971 | |
| Eric Anholt | 6a41626 | 2010-08-01 18:44:21 -0700 | [diff] [blame] | 972 | #define TOKEN_OR_IDENTIFIER(version, token) \ |
| 973 | do { \ |
| 974 | if (yyextra->language_version >= version) { \ |
| 975 | return token; \ |
| 976 | } else { \ |
| 977 | yylval->identifier = strdup(yytext); \ |
| 978 | return IDENTIFIER; \ |
| 979 | } \ |
| 980 | } while (0) |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 981 | |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 982 | /* Handle reserved words in GLSL ES (version 100) */ |
| 983 | #define TOKEN_OR_IDENTIFIER_ES(version, token) \ |
| 984 | do { \ |
| 985 | if (yyextra->es_shader) { \ |
| 986 | return token; \ |
| 987 | } else { \ |
| 988 | TOKEN_OR_IDENTIFIER(version, token); \ |
| 989 | } \ |
| 990 | } while (0) |
| 991 | |
| Ian Romanick | db36e88 | 2010-08-11 17:03:37 -0700 | [diff] [blame] | 992 | #define RESERVED_WORD(version, token) \ |
| 993 | do { \ |
| 994 | if (yyextra->language_version >= version) { \ |
| 995 | return token; \ |
| 996 | } else { \ |
| 997 | _mesa_glsl_error(yylloc, yyextra, \ |
| 998 | "Illegal use of reserved word `%s'", yytext); \ |
| 999 | return ERROR_TOK; \ |
| 1000 | } \ |
| 1001 | } while (0) |
| Eric Anholt | 6a41626 | 2010-08-01 18:44:21 -0700 | [diff] [blame] | 1002 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1003 | #line 1004 "glsl_lexer.cpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1004 | |
| 1005 | #define INITIAL 0 |
| 1006 | #define PP 1 |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1007 | #define PRAGMA 2 |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1008 | |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1009 | #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state * |
| 1010 | |
| 1011 | /* Holds the entire state of the reentrant scanner. */ |
| 1012 | struct yyguts_t |
| 1013 | { |
| 1014 | |
| 1015 | /* User-defined. Not touched by flex. */ |
| 1016 | YY_EXTRA_TYPE yyextra_r; |
| 1017 | |
| 1018 | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
| 1019 | FILE *yyin_r, *yyout_r; |
| 1020 | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
| 1021 | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
| 1022 | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
| 1023 | char yy_hold_char; |
| 1024 | int yy_n_chars; |
| 1025 | int yyleng_r; |
| 1026 | char *yy_c_buf_p; |
| 1027 | int yy_init; |
| 1028 | int yy_start; |
| 1029 | int yy_did_buffer_switch_on_eof; |
| 1030 | int yy_start_stack_ptr; |
| 1031 | int yy_start_stack_depth; |
| 1032 | int *yy_start_stack; |
| 1033 | yy_state_type yy_last_accepting_state; |
| 1034 | char* yy_last_accepting_cpos; |
| 1035 | |
| 1036 | int yylineno_r; |
| 1037 | int yy_flex_debug_r; |
| 1038 | |
| 1039 | char *yytext_r; |
| 1040 | int yy_more_flag; |
| 1041 | int yy_more_len; |
| 1042 | |
| 1043 | YYSTYPE * yylval_r; |
| 1044 | |
| 1045 | YYLTYPE * yylloc_r; |
| 1046 | |
| 1047 | }; /* end struct yyguts_t */ |
| 1048 | |
| 1049 | static int yy_init_globals (yyscan_t yyscanner ); |
| 1050 | |
| 1051 | /* This must go here because YYSTYPE and YYLTYPE are included |
| 1052 | * from bison output in section 1.*/ |
| 1053 | # define yylval yyg->yylval_r |
| 1054 | |
| 1055 | # define yylloc yyg->yylloc_r |
| 1056 | |
| 1057 | int _mesa_glsl_lex_init (yyscan_t* scanner); |
| 1058 | |
| 1059 | int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); |
| 1060 | |
| 1061 | /* Accessor methods to globals. |
| 1062 | These are made visible to non-reentrant scanners for convenience. */ |
| 1063 | |
| 1064 | int _mesa_glsl_lex_destroy (yyscan_t yyscanner ); |
| 1065 | |
| 1066 | int _mesa_glsl_get_debug (yyscan_t yyscanner ); |
| 1067 | |
| 1068 | void _mesa_glsl_set_debug (int debug_flag ,yyscan_t yyscanner ); |
| 1069 | |
| 1070 | YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner ); |
| 1071 | |
| 1072 | void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); |
| 1073 | |
| 1074 | FILE *_mesa_glsl_get_in (yyscan_t yyscanner ); |
| 1075 | |
| 1076 | void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner ); |
| 1077 | |
| 1078 | FILE *_mesa_glsl_get_out (yyscan_t yyscanner ); |
| 1079 | |
| 1080 | void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner ); |
| 1081 | |
| 1082 | int _mesa_glsl_get_leng (yyscan_t yyscanner ); |
| 1083 | |
| 1084 | char *_mesa_glsl_get_text (yyscan_t yyscanner ); |
| 1085 | |
| 1086 | int _mesa_glsl_get_lineno (yyscan_t yyscanner ); |
| 1087 | |
| 1088 | void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner ); |
| 1089 | |
| 1090 | YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner ); |
| 1091 | |
| 1092 | void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); |
| 1093 | |
| 1094 | YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner ); |
| 1095 | |
| 1096 | void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); |
| 1097 | |
| 1098 | /* Macros after this point can all be overridden by user definitions in |
| 1099 | * section 1. |
| 1100 | */ |
| 1101 | |
| 1102 | #ifndef YY_SKIP_YYWRAP |
| 1103 | #ifdef __cplusplus |
| 1104 | extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner ); |
| 1105 | #else |
| 1106 | extern int _mesa_glsl_wrap (yyscan_t yyscanner ); |
| 1107 | #endif |
| 1108 | #endif |
| 1109 | |
| 1110 | #ifndef yytext_ptr |
| 1111 | static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); |
| 1112 | #endif |
| 1113 | |
| 1114 | #ifdef YY_NEED_STRLEN |
| 1115 | static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); |
| 1116 | #endif |
| 1117 | |
| 1118 | #ifndef YY_NO_INPUT |
| 1119 | |
| 1120 | #ifdef __cplusplus |
| 1121 | static int yyinput (yyscan_t yyscanner ); |
| 1122 | #else |
| 1123 | static int input (yyscan_t yyscanner ); |
| 1124 | #endif |
| 1125 | |
| 1126 | #endif |
| 1127 | |
| 1128 | /* Amount of stuff to slurp up with each read. */ |
| 1129 | #ifndef YY_READ_BUF_SIZE |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 1130 | #ifdef __ia64__ |
| 1131 | /* On IA-64, the buffer size is 16k, not 8k */ |
| 1132 | #define YY_READ_BUF_SIZE 16384 |
| 1133 | #else |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1134 | #define YY_READ_BUF_SIZE 8192 |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 1135 | #endif /* __ia64__ */ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1136 | #endif |
| 1137 | |
| 1138 | /* Copy whatever the last rule matched to the standard output. */ |
| 1139 | #ifndef ECHO |
| 1140 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 1141 | * we now use fwrite(). |
| 1142 | */ |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 1143 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1144 | #endif |
| 1145 | |
| 1146 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
| 1147 | * is returned in "result". |
| 1148 | */ |
| 1149 | #ifndef YY_INPUT |
| 1150 | #define YY_INPUT(buf,result,max_size) \ |
| 1151 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
| 1152 | { \ |
| 1153 | int c = '*'; \ |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 1154 | size_t n; \ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1155 | for ( n = 0; n < max_size && \ |
| 1156 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
| 1157 | buf[n] = (char) c; \ |
| 1158 | if ( c == '\n' ) \ |
| 1159 | buf[n++] = (char) c; \ |
| 1160 | if ( c == EOF && ferror( yyin ) ) \ |
| 1161 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1162 | result = n; \ |
| 1163 | } \ |
| 1164 | else \ |
| 1165 | { \ |
| 1166 | errno=0; \ |
| 1167 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
| 1168 | { \ |
| 1169 | if( errno != EINTR) \ |
| 1170 | { \ |
| 1171 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1172 | break; \ |
| 1173 | } \ |
| 1174 | errno=0; \ |
| 1175 | clearerr(yyin); \ |
| 1176 | } \ |
| 1177 | }\ |
| 1178 | \ |
| 1179 | |
| 1180 | #endif |
| 1181 | |
| 1182 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
| 1183 | * we don't want an extra ';' after the "return" because that will cause |
| 1184 | * some compilers to complain about unreachable statements. |
| 1185 | */ |
| 1186 | #ifndef yyterminate |
| 1187 | #define yyterminate() return YY_NULL |
| 1188 | #endif |
| 1189 | |
| 1190 | /* Number of entries by which start-condition stack grows. */ |
| 1191 | #ifndef YY_START_STACK_INCR |
| 1192 | #define YY_START_STACK_INCR 25 |
| 1193 | #endif |
| 1194 | |
| 1195 | /* Report a fatal error. */ |
| 1196 | #ifndef YY_FATAL_ERROR |
| 1197 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
| 1198 | #endif |
| 1199 | |
| 1200 | /* end tables serialization structures and prototypes */ |
| 1201 | |
| 1202 | /* Default declaration of generated scanner - a define so the user can |
| 1203 | * easily add parameters. |
| 1204 | */ |
| 1205 | #ifndef YY_DECL |
| 1206 | #define YY_DECL_IS_OURS 1 |
| 1207 | |
| 1208 | extern int _mesa_glsl_lex \ |
| 1209 | (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); |
| 1210 | |
| 1211 | #define YY_DECL int _mesa_glsl_lex \ |
| 1212 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) |
| 1213 | #endif /* !YY_DECL */ |
| 1214 | |
| 1215 | /* Code executed at the beginning of each rule, after yytext and yyleng |
| 1216 | * have been set up. |
| 1217 | */ |
| 1218 | #ifndef YY_USER_ACTION |
| 1219 | #define YY_USER_ACTION |
| 1220 | #endif |
| 1221 | |
| 1222 | /* Code executed at the end of each rule. */ |
| 1223 | #ifndef YY_BREAK |
| 1224 | #define YY_BREAK break; |
| 1225 | #endif |
| 1226 | |
| 1227 | #define YY_RULE_SETUP \ |
| 1228 | if ( yyleng > 0 ) \ |
| 1229 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ |
| 1230 | (yytext[yyleng - 1] == '\n'); \ |
| 1231 | YY_USER_ACTION |
| 1232 | |
| 1233 | /** The main scanner function which does all the work. |
| 1234 | */ |
| 1235 | YY_DECL |
| 1236 | { |
| 1237 | register yy_state_type yy_current_state; |
| 1238 | register char *yy_cp, *yy_bp; |
| 1239 | register int yy_act; |
| 1240 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1241 | |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1242 | #line 86 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1243 | |
| 1244 | |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1245 | #line 1246 "glsl_lexer.cpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1246 | |
| 1247 | yylval = yylval_param; |
| 1248 | |
| 1249 | yylloc = yylloc_param; |
| 1250 | |
| 1251 | if ( !yyg->yy_init ) |
| 1252 | { |
| 1253 | yyg->yy_init = 1; |
| 1254 | |
| 1255 | #ifdef YY_USER_INIT |
| 1256 | YY_USER_INIT; |
| 1257 | #endif |
| 1258 | |
| 1259 | if ( ! yyg->yy_start ) |
| 1260 | yyg->yy_start = 1; /* first start state */ |
| 1261 | |
| 1262 | if ( ! yyin ) |
| 1263 | yyin = stdin; |
| 1264 | |
| 1265 | if ( ! yyout ) |
| 1266 | yyout = stdout; |
| 1267 | |
| 1268 | if ( ! YY_CURRENT_BUFFER ) { |
| 1269 | _mesa_glsl_ensure_buffer_stack (yyscanner); |
| 1270 | YY_CURRENT_BUFFER_LVALUE = |
| 1271 | _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
| 1272 | } |
| 1273 | |
| 1274 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 1275 | } |
| 1276 | |
| 1277 | while ( 1 ) /* loops until end-of-file is reached */ |
| 1278 | { |
| 1279 | yy_cp = yyg->yy_c_buf_p; |
| 1280 | |
| 1281 | /* Support of yytext. */ |
| 1282 | *yy_cp = yyg->yy_hold_char; |
| 1283 | |
| 1284 | /* yy_bp points to the position in yy_ch_buf of the start of |
| 1285 | * the current run. |
| 1286 | */ |
| 1287 | yy_bp = yy_cp; |
| 1288 | |
| 1289 | yy_current_state = yyg->yy_start; |
| 1290 | yy_current_state += YY_AT_BOL(); |
| 1291 | yy_match: |
| 1292 | do |
| 1293 | { |
| 1294 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
| 1295 | if ( yy_accept[yy_current_state] ) |
| 1296 | { |
| 1297 | yyg->yy_last_accepting_state = yy_current_state; |
| 1298 | yyg->yy_last_accepting_cpos = yy_cp; |
| 1299 | } |
| 1300 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1301 | { |
| 1302 | yy_current_state = (int) yy_def[yy_current_state]; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1303 | if ( yy_current_state >= 716 ) |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1304 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 1305 | } |
| 1306 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 1307 | ++yy_cp; |
| 1308 | } |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1309 | while ( yy_current_state != 715 ); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1310 | yy_cp = yyg->yy_last_accepting_cpos; |
| 1311 | yy_current_state = yyg->yy_last_accepting_state; |
| 1312 | |
| 1313 | yy_find_action: |
| 1314 | yy_act = yy_accept[yy_current_state]; |
| 1315 | |
| 1316 | YY_DO_BEFORE_ACTION; |
| 1317 | |
| 1318 | do_action: /* This label is used only to access EOF actions. */ |
| 1319 | |
| 1320 | switch ( yy_act ) |
| 1321 | { /* beginning of action switch */ |
| 1322 | case 0: /* must back up */ |
| 1323 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
| 1324 | *yy_cp = yyg->yy_hold_char; |
| 1325 | yy_cp = yyg->yy_last_accepting_cpos; |
| 1326 | yy_current_state = yyg->yy_last_accepting_state; |
| 1327 | goto yy_find_action; |
| 1328 | |
| 1329 | case 1: |
| 1330 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1331 | #line 88 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1332 | ; |
| 1333 | YY_BREAK |
| 1334 | /* Preprocessor tokens. */ |
| 1335 | case 2: |
| 1336 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
| 1337 | yyg->yy_c_buf_p = yy_cp -= 1; |
| 1338 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
| 1339 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1340 | #line 91 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1341 | ; |
| 1342 | YY_BREAK |
| 1343 | case 3: |
| 1344 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1345 | #line 92 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1346 | { BEGIN PP; return VERSION; } |
| 1347 | YY_BREAK |
| 1348 | case 4: |
| 1349 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1350 | #line 93 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1351 | { BEGIN PP; return EXTENSION; } |
| 1352 | YY_BREAK |
| 1353 | case 5: |
| 1354 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
| 1355 | yyg->yy_c_buf_p = yy_cp -= 1; |
| 1356 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
| 1357 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1358 | #line 94 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1359 | { |
| 1360 | /* Eat characters until the first digit is |
| 1361 | * encountered |
| 1362 | */ |
| 1363 | char *ptr = yytext; |
| 1364 | while (!isdigit(*ptr)) |
| 1365 | ptr++; |
| 1366 | |
| 1367 | /* Subtract one from the line number because |
| 1368 | * yylineno is zero-based instead of |
| 1369 | * one-based. |
| 1370 | */ |
| 1371 | yylineno = strtol(ptr, &ptr, 0) - 1; |
| 1372 | yylloc->source = strtol(ptr, NULL, 0); |
| 1373 | } |
| 1374 | YY_BREAK |
| 1375 | case 6: |
| 1376 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
| 1377 | yyg->yy_c_buf_p = yy_cp -= 1; |
| 1378 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
| 1379 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1380 | #line 109 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1381 | { |
| 1382 | /* Eat characters until the first digit is |
| 1383 | * encountered |
| 1384 | */ |
| 1385 | char *ptr = yytext; |
| 1386 | while (!isdigit(*ptr)) |
| 1387 | ptr++; |
| 1388 | |
| 1389 | /* Subtract one from the line number because |
| 1390 | * yylineno is zero-based instead of |
| 1391 | * one-based. |
| 1392 | */ |
| 1393 | yylineno = strtol(ptr, &ptr, 0) - 1; |
| 1394 | } |
| 1395 | YY_BREAK |
| 1396 | case 7: |
| 1397 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1398 | #line 123 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1399 | { |
| 1400 | BEGIN PP; |
| 1401 | return PRAGMA_DEBUG_ON; |
| 1402 | } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1403 | YY_BREAK |
| 1404 | case 8: |
| 1405 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1406 | #line 127 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1407 | { |
| 1408 | BEGIN PP; |
| 1409 | return PRAGMA_DEBUG_OFF; |
| 1410 | } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1411 | YY_BREAK |
| 1412 | case 9: |
| 1413 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1414 | #line 131 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1415 | { |
| 1416 | BEGIN PP; |
| 1417 | return PRAGMA_OPTIMIZE_ON; |
| 1418 | } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1419 | YY_BREAK |
| 1420 | case 10: |
| 1421 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1422 | #line 135 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1423 | { |
| 1424 | BEGIN PP; |
| 1425 | return PRAGMA_OPTIMIZE_OFF; |
| 1426 | } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1427 | YY_BREAK |
| 1428 | case 11: |
| 1429 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1430 | #line 139 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1431 | { BEGIN PRAGMA; } |
| 1432 | YY_BREAK |
| 1433 | case 12: |
| 1434 | /* rule 12 can match eol */ |
| 1435 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1436 | #line 141 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1437 | { BEGIN 0; yylineno++; yycolumn = 0; } |
| 1438 | YY_BREAK |
| 1439 | case 13: |
| 1440 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1441 | #line 142 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1442 | { } |
| 1443 | YY_BREAK |
| 1444 | case 14: |
| 1445 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1446 | #line 144 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1447 | { } |
| 1448 | YY_BREAK |
| 1449 | case 15: |
| 1450 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1451 | #line 145 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1452 | { } |
| 1453 | YY_BREAK |
| 1454 | case 16: |
| 1455 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1456 | #line 146 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1457 | return COLON; |
| 1458 | YY_BREAK |
| 1459 | case 17: |
| 1460 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1461 | #line 147 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1462 | { |
| 1463 | yylval->identifier = strdup(yytext); |
| 1464 | return IDENTIFIER; |
| 1465 | } |
| 1466 | YY_BREAK |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1467 | case 18: |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1468 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1469 | #line 151 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1470 | { |
| 1471 | yylval->n = strtol(yytext, NULL, 10); |
| 1472 | return INTCONSTANT; |
| 1473 | } |
| 1474 | YY_BREAK |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1475 | case 19: |
| 1476 | /* rule 19 can match eol */ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1477 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1478 | #line 155 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1479 | { BEGIN 0; yylineno++; yycolumn = 0; return EOL; } |
| 1480 | YY_BREAK |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1481 | case 20: |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1482 | /* rule 20 can match eol */ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1483 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1484 | #line 157 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1485 | { yylineno++; yycolumn = 0; } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1486 | YY_BREAK |
| 1487 | case 21: |
| 1488 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1489 | #line 159 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1490 | return ATTRIBUTE; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1491 | YY_BREAK |
| 1492 | case 22: |
| 1493 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1494 | #line 160 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1495 | return CONST_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1496 | YY_BREAK |
| 1497 | case 23: |
| 1498 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1499 | #line 161 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1500 | return BOOL_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1501 | YY_BREAK |
| 1502 | case 24: |
| 1503 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1504 | #line 162 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1505 | return FLOAT_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1506 | YY_BREAK |
| 1507 | case 25: |
| 1508 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1509 | #line 163 "glsl_lexer.lpp" |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1510 | return INT_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1511 | YY_BREAK |
| 1512 | case 26: |
| 1513 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1514 | #line 164 "glsl_lexer.lpp" |
| 1515 | TOKEN_OR_IDENTIFIER(130, UINT_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1516 | YY_BREAK |
| 1517 | case 27: |
| 1518 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1519 | #line 166 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1520 | return BREAK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1521 | YY_BREAK |
| 1522 | case 28: |
| 1523 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1524 | #line 167 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1525 | return CONTINUE; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1526 | YY_BREAK |
| 1527 | case 29: |
| 1528 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1529 | #line 168 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1530 | return DO; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1531 | YY_BREAK |
| 1532 | case 30: |
| 1533 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1534 | #line 169 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1535 | return WHILE; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1536 | YY_BREAK |
| 1537 | case 31: |
| 1538 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1539 | #line 170 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1540 | return ELSE; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1541 | YY_BREAK |
| 1542 | case 32: |
| 1543 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1544 | #line 171 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1545 | return FOR; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1546 | YY_BREAK |
| 1547 | case 33: |
| 1548 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1549 | #line 172 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1550 | return IF; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1551 | YY_BREAK |
| 1552 | case 34: |
| 1553 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1554 | #line 173 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1555 | return DISCARD; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1556 | YY_BREAK |
| 1557 | case 35: |
| 1558 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1559 | #line 174 "glsl_lexer.lpp" |
| 1560 | return RETURN; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1561 | YY_BREAK |
| 1562 | case 36: |
| 1563 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1564 | #line 176 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1565 | return BVEC2; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1566 | YY_BREAK |
| 1567 | case 37: |
| 1568 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1569 | #line 177 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1570 | return BVEC3; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1571 | YY_BREAK |
| 1572 | case 38: |
| 1573 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1574 | #line 178 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1575 | return BVEC4; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1576 | YY_BREAK |
| 1577 | case 39: |
| 1578 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1579 | #line 179 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1580 | return IVEC2; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1581 | YY_BREAK |
| 1582 | case 40: |
| 1583 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1584 | #line 180 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1585 | return IVEC3; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1586 | YY_BREAK |
| 1587 | case 41: |
| 1588 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1589 | #line 181 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1590 | return IVEC4; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1591 | YY_BREAK |
| 1592 | case 42: |
| 1593 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1594 | #line 182 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1595 | TOKEN_OR_IDENTIFIER(130, UVEC2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1596 | YY_BREAK |
| 1597 | case 43: |
| 1598 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1599 | #line 183 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1600 | TOKEN_OR_IDENTIFIER(130, UVEC3); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1601 | YY_BREAK |
| 1602 | case 44: |
| 1603 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1604 | #line 184 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1605 | TOKEN_OR_IDENTIFIER(130, UVEC4); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1606 | YY_BREAK |
| 1607 | case 45: |
| 1608 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1609 | #line 185 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1610 | return VEC2; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1611 | YY_BREAK |
| 1612 | case 46: |
| 1613 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1614 | #line 186 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1615 | return VEC3; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1616 | YY_BREAK |
| 1617 | case 47: |
| 1618 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1619 | #line 187 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1620 | return VEC4; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1621 | YY_BREAK |
| 1622 | case 48: |
| 1623 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1624 | #line 188 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1625 | return MAT2X2; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1626 | YY_BREAK |
| 1627 | case 49: |
| 1628 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1629 | #line 189 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1630 | return MAT3X3; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1631 | YY_BREAK |
| 1632 | case 50: |
| 1633 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1634 | #line 190 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1635 | return MAT4X4; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1636 | YY_BREAK |
| 1637 | case 51: |
| 1638 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1639 | #line 191 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1640 | TOKEN_OR_IDENTIFIER(120, MAT2X2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1641 | YY_BREAK |
| 1642 | case 52: |
| 1643 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1644 | #line 192 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1645 | TOKEN_OR_IDENTIFIER(120, MAT2X3); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1646 | YY_BREAK |
| 1647 | case 53: |
| 1648 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1649 | #line 193 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1650 | TOKEN_OR_IDENTIFIER(120, MAT2X4); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1651 | YY_BREAK |
| 1652 | case 54: |
| 1653 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1654 | #line 194 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1655 | TOKEN_OR_IDENTIFIER(120, MAT3X2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1656 | YY_BREAK |
| 1657 | case 55: |
| 1658 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1659 | #line 195 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1660 | TOKEN_OR_IDENTIFIER(120, MAT3X3); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1661 | YY_BREAK |
| 1662 | case 56: |
| 1663 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1664 | #line 196 "glsl_lexer.lpp" |
| 1665 | TOKEN_OR_IDENTIFIER(120, MAT3X4); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1666 | YY_BREAK |
| 1667 | case 57: |
| 1668 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1669 | #line 197 "glsl_lexer.lpp" |
| 1670 | TOKEN_OR_IDENTIFIER(120, MAT4X2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1671 | YY_BREAK |
| 1672 | case 58: |
| 1673 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1674 | #line 198 "glsl_lexer.lpp" |
| 1675 | TOKEN_OR_IDENTIFIER(120, MAT4X3); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1676 | YY_BREAK |
| 1677 | case 59: |
| 1678 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1679 | #line 199 "glsl_lexer.lpp" |
| 1680 | TOKEN_OR_IDENTIFIER(120, MAT4X4); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1681 | YY_BREAK |
| 1682 | case 60: |
| 1683 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1684 | #line 201 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1685 | return IN_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1686 | YY_BREAK |
| 1687 | case 61: |
| 1688 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1689 | #line 202 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1690 | return OUT_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1691 | YY_BREAK |
| 1692 | case 62: |
| 1693 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1694 | #line 203 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1695 | return INOUT_TOK; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1696 | YY_BREAK |
| 1697 | case 63: |
| 1698 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1699 | #line 204 "glsl_lexer.lpp" |
| 1700 | return UNIFORM; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1701 | YY_BREAK |
| 1702 | case 64: |
| 1703 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1704 | #line 205 "glsl_lexer.lpp" |
| 1705 | return VARYING; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1706 | YY_BREAK |
| 1707 | case 65: |
| 1708 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1709 | #line 206 "glsl_lexer.lpp" |
| 1710 | TOKEN_OR_IDENTIFIER(120, CENTROID); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1711 | YY_BREAK |
| 1712 | case 66: |
| 1713 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1714 | #line 207 "glsl_lexer.lpp" |
| 1715 | TOKEN_OR_IDENTIFIER_ES(120, INVARIANT); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1716 | YY_BREAK |
| 1717 | case 67: |
| 1718 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1719 | #line 209 "glsl_lexer.lpp" |
| 1720 | TOKEN_OR_IDENTIFIER_ES(130, FLAT); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1721 | YY_BREAK |
| 1722 | case 68: |
| 1723 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1724 | #line 210 "glsl_lexer.lpp" |
| 1725 | TOKEN_OR_IDENTIFIER(130, SMOOTH); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1726 | YY_BREAK |
| 1727 | case 69: |
| 1728 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1729 | #line 211 "glsl_lexer.lpp" |
| 1730 | TOKEN_OR_IDENTIFIER(130, NOPERSPECTIVE); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1731 | YY_BREAK |
| 1732 | case 70: |
| 1733 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1734 | #line 213 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1735 | return SAMPLER1D; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1736 | YY_BREAK |
| 1737 | case 71: |
| 1738 | YY_RULE_SETUP |
| Kenneth Graunke | c5e7487 | 2010-09-05 01:32:32 -0700 | [diff] [blame] | 1739 | #line 214 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1740 | return SAMPLER2D; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1741 | YY_BREAK |
| 1742 | case 72: |
| 1743 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1744 | #line 215 "glsl_lexer.lpp" |
| 1745 | return SAMPLER3D; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1746 | YY_BREAK |
| 1747 | case 73: |
| 1748 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1749 | #line 216 "glsl_lexer.lpp" |
| 1750 | return SAMPLERCUBE; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1751 | YY_BREAK |
| 1752 | case 74: |
| 1753 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1754 | #line 217 "glsl_lexer.lpp" |
| 1755 | return SAMPLER1DSHADOW; |
| 1756 | YY_BREAK |
| 1757 | case 75: |
| 1758 | YY_RULE_SETUP |
| 1759 | #line 218 "glsl_lexer.lpp" |
| 1760 | return SAMPLER2DSHADOW; |
| 1761 | YY_BREAK |
| 1762 | case 76: |
| 1763 | YY_RULE_SETUP |
| 1764 | #line 220 "glsl_lexer.lpp" |
| 1765 | return STRUCT; |
| 1766 | YY_BREAK |
| 1767 | case 77: |
| 1768 | YY_RULE_SETUP |
| 1769 | #line 221 "glsl_lexer.lpp" |
| 1770 | return VOID_TOK; |
| 1771 | YY_BREAK |
| 1772 | case 78: |
| 1773 | YY_RULE_SETUP |
| 1774 | #line 223 "glsl_lexer.lpp" |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 1775 | { |
| 1776 | if ((yyextra->language_version >= 140) |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1777 | || yyextra->ARB_explicit_attrib_location_enable |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 1778 | || (yyextra->ARB_fragment_coord_conventions_enable)){ |
| 1779 | return LAYOUT_TOK; |
| 1780 | } else { |
| 1781 | yylval->identifier = strdup(yytext); |
| 1782 | return IDENTIFIER; |
| 1783 | } |
| 1784 | } |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1785 | YY_BREAK |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1786 | case 79: |
| 1787 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1788 | #line 234 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1789 | return INC_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1790 | YY_BREAK |
| 1791 | case 80: |
| 1792 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1793 | #line 235 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1794 | return DEC_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1795 | YY_BREAK |
| 1796 | case 81: |
| 1797 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1798 | #line 236 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1799 | return LE_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1800 | YY_BREAK |
| 1801 | case 82: |
| 1802 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1803 | #line 237 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1804 | return GE_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1805 | YY_BREAK |
| 1806 | case 83: |
| 1807 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1808 | #line 238 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1809 | return EQ_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1810 | YY_BREAK |
| 1811 | case 84: |
| 1812 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1813 | #line 239 "glsl_lexer.lpp" |
| 1814 | return NE_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1815 | YY_BREAK |
| 1816 | case 85: |
| 1817 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1818 | #line 240 "glsl_lexer.lpp" |
| 1819 | return AND_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1820 | YY_BREAK |
| 1821 | case 86: |
| 1822 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1823 | #line 241 "glsl_lexer.lpp" |
| 1824 | return OR_OP; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1825 | YY_BREAK |
| 1826 | case 87: |
| 1827 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1828 | #line 242 "glsl_lexer.lpp" |
| 1829 | return XOR_OP; |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 1830 | YY_BREAK |
| 1831 | case 88: |
| 1832 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1833 | #line 243 "glsl_lexer.lpp" |
| 1834 | return LEFT_OP; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1835 | YY_BREAK |
| 1836 | case 89: |
| 1837 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1838 | #line 244 "glsl_lexer.lpp" |
| 1839 | return RIGHT_OP; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1840 | YY_BREAK |
| 1841 | case 90: |
| 1842 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1843 | #line 246 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1844 | return MUL_ASSIGN; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1845 | YY_BREAK |
| 1846 | case 91: |
| 1847 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1848 | #line 247 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1849 | return DIV_ASSIGN; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1850 | YY_BREAK |
| 1851 | case 92: |
| 1852 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1853 | #line 248 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1854 | return ADD_ASSIGN; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1855 | YY_BREAK |
| 1856 | case 93: |
| 1857 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1858 | #line 249 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1859 | return MOD_ASSIGN; |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 1860 | YY_BREAK |
| 1861 | case 94: |
| 1862 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1863 | #line 250 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1864 | return LEFT_ASSIGN; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1865 | YY_BREAK |
| 1866 | case 95: |
| 1867 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1868 | #line 251 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1869 | return RIGHT_ASSIGN; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1870 | YY_BREAK |
| 1871 | case 96: |
| 1872 | YY_RULE_SETUP |
| 1873 | #line 252 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1874 | return AND_ASSIGN; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1875 | YY_BREAK |
| 1876 | case 97: |
| 1877 | YY_RULE_SETUP |
| 1878 | #line 253 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1879 | return XOR_ASSIGN; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1880 | YY_BREAK |
| 1881 | case 98: |
| 1882 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1883 | #line 254 "glsl_lexer.lpp" |
| 1884 | return OR_ASSIGN; |
| 1885 | YY_BREAK |
| 1886 | case 99: |
| 1887 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1888 | #line 255 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1889 | return SUB_ASSIGN; |
| 1890 | YY_BREAK |
| 1891 | case 100: |
| 1892 | YY_RULE_SETUP |
| 1893 | #line 257 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1894 | { |
| 1895 | yylval->n = strtol(yytext, NULL, 10); |
| 1896 | return INTCONSTANT; |
| 1897 | } |
| 1898 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1899 | case 101: |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1900 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1901 | #line 261 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1902 | { |
| 1903 | yylval->n = strtol(yytext + 2, NULL, 16); |
| 1904 | return INTCONSTANT; |
| 1905 | } |
| 1906 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1907 | case 102: |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1908 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1909 | #line 265 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1910 | { |
| 1911 | yylval->n = strtol(yytext, NULL, 8); |
| 1912 | return INTCONSTANT; |
| 1913 | } |
| 1914 | YY_BREAK |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1915 | case 103: |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1916 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1917 | #line 270 "glsl_lexer.lpp" |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 1918 | { |
| 1919 | yylval->real = strtod(yytext, NULL); |
| 1920 | return FLOATCONSTANT; |
| 1921 | } |
| 1922 | YY_BREAK |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1923 | case 104: |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 1924 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1925 | #line 274 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1926 | { |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 1927 | yylval->real = strtod(yytext, NULL); |
| 1928 | return FLOATCONSTANT; |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1929 | } |
| 1930 | YY_BREAK |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1931 | case 105: |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1932 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1933 | #line 278 "glsl_lexer.lpp" |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 1934 | { |
| 1935 | yylval->real = strtod(yytext, NULL); |
| 1936 | return FLOATCONSTANT; |
| 1937 | } |
| 1938 | YY_BREAK |
| 1939 | case 106: |
| 1940 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1941 | #line 282 "glsl_lexer.lpp" |
| 1942 | { |
| 1943 | yylval->real = strtod(yytext, NULL); |
| 1944 | return FLOATCONSTANT; |
| 1945 | } |
| 1946 | YY_BREAK |
| 1947 | case 107: |
| 1948 | YY_RULE_SETUP |
| 1949 | #line 286 "glsl_lexer.lpp" |
| 1950 | { |
| 1951 | yylval->real = strtod(yytext, NULL); |
| 1952 | return FLOATCONSTANT; |
| 1953 | } |
| 1954 | YY_BREAK |
| 1955 | case 108: |
| 1956 | YY_RULE_SETUP |
| 1957 | #line 291 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1958 | { |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 1959 | yylval->n = 1; |
| 1960 | return BOOLCONSTANT; |
| 1961 | } |
| 1962 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1963 | case 109: |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 1964 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1965 | #line 295 "glsl_lexer.lpp" |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 1966 | { |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1967 | yylval->n = 0; |
| 1968 | return BOOLCONSTANT; |
| 1969 | } |
| 1970 | YY_BREAK |
| 1971 | /* Reserved words in GLSL 1.10. */ |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1972 | case 110: |
| 1973 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1974 | #line 302 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1975 | RESERVED_WORD(999, ASM); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1976 | YY_BREAK |
| 1977 | case 111: |
| 1978 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1979 | #line 303 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1980 | RESERVED_WORD(999, CLASS); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1981 | YY_BREAK |
| 1982 | case 112: |
| 1983 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1984 | #line 304 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1985 | RESERVED_WORD(999, UNION); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1986 | YY_BREAK |
| 1987 | case 113: |
| 1988 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1989 | #line 305 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1990 | RESERVED_WORD(999, ENUM); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1991 | YY_BREAK |
| 1992 | case 114: |
| 1993 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1994 | #line 306 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 1995 | RESERVED_WORD(999, TYPEDEF); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 1996 | YY_BREAK |
| 1997 | case 115: |
| 1998 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 1999 | #line 307 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2000 | RESERVED_WORD(999, TEMPLATE); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2001 | YY_BREAK |
| 2002 | case 116: |
| 2003 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2004 | #line 308 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2005 | RESERVED_WORD(999, THIS); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2006 | YY_BREAK |
| 2007 | case 117: |
| 2008 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2009 | #line 309 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2010 | RESERVED_WORD(999, PACKED_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2011 | YY_BREAK |
| 2012 | case 118: |
| 2013 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2014 | #line 310 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2015 | RESERVED_WORD(999, GOTO); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2016 | YY_BREAK |
| 2017 | case 119: |
| 2018 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2019 | #line 311 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2020 | RESERVED_WORD(130, SWITCH); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2021 | YY_BREAK |
| 2022 | case 120: |
| 2023 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2024 | #line 312 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2025 | RESERVED_WORD(130, DEFAULT); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2026 | YY_BREAK |
| 2027 | case 121: |
| 2028 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2029 | #line 313 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2030 | RESERVED_WORD(999, INLINE_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2031 | YY_BREAK |
| 2032 | case 122: |
| 2033 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2034 | #line 314 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2035 | RESERVED_WORD(999, NOINLINE); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2036 | YY_BREAK |
| 2037 | case 123: |
| 2038 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2039 | #line 315 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2040 | RESERVED_WORD(999, VOLATILE); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2041 | YY_BREAK |
| 2042 | case 124: |
| 2043 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2044 | #line 316 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2045 | RESERVED_WORD(999, PUBLIC_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2046 | YY_BREAK |
| 2047 | case 125: |
| 2048 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2049 | #line 317 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2050 | RESERVED_WORD(999, STATIC); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2051 | YY_BREAK |
| 2052 | case 126: |
| 2053 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2054 | #line 318 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2055 | RESERVED_WORD(999, EXTERN); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2056 | YY_BREAK |
| 2057 | case 127: |
| 2058 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2059 | #line 319 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2060 | RESERVED_WORD(999, EXTERNAL); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2061 | YY_BREAK |
| 2062 | case 128: |
| 2063 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2064 | #line 320 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2065 | RESERVED_WORD(999, INTERFACE); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2066 | YY_BREAK |
| 2067 | case 129: |
| 2068 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2069 | #line 321 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2070 | RESERVED_WORD(999, LONG_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2071 | YY_BREAK |
| 2072 | case 130: |
| 2073 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2074 | #line 322 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2075 | RESERVED_WORD(999, SHORT_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2076 | YY_BREAK |
| 2077 | case 131: |
| 2078 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2079 | #line 323 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2080 | RESERVED_WORD(999, DOUBLE_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2081 | YY_BREAK |
| 2082 | case 132: |
| 2083 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2084 | #line 324 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2085 | RESERVED_WORD(999, HALF); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2086 | YY_BREAK |
| 2087 | case 133: |
| 2088 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2089 | #line 325 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2090 | RESERVED_WORD(999, FIXED_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2091 | YY_BREAK |
| 2092 | case 134: |
| 2093 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2094 | #line 326 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2095 | RESERVED_WORD(999, UNSIGNED); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2096 | YY_BREAK |
| 2097 | case 135: |
| 2098 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2099 | #line 327 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2100 | RESERVED_WORD(999, INPUT_TOK); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2101 | YY_BREAK |
| 2102 | case 136: |
| 2103 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2104 | #line 328 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2105 | RESERVED_WORD(999, OUTPUT); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2106 | YY_BREAK |
| 2107 | case 137: |
| 2108 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2109 | #line 329 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2110 | RESERVED_WORD(999, HVEC2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2111 | YY_BREAK |
| 2112 | case 138: |
| 2113 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2114 | #line 330 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2115 | RESERVED_WORD(999, HVEC3); |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 2116 | YY_BREAK |
| 2117 | case 139: |
| 2118 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2119 | #line 331 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2120 | RESERVED_WORD(999, HVEC4); |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 2121 | YY_BREAK |
| 2122 | case 140: |
| 2123 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2124 | #line 332 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2125 | RESERVED_WORD(999, DVEC2); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2126 | YY_BREAK |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2127 | case 141: |
| 2128 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2129 | #line 333 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2130 | RESERVED_WORD(999, DVEC3); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2131 | YY_BREAK |
| 2132 | case 142: |
| 2133 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2134 | #line 334 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2135 | RESERVED_WORD(999, DVEC4); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2136 | YY_BREAK |
| 2137 | case 143: |
| 2138 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2139 | #line 335 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2140 | RESERVED_WORD(999, FVEC2); |
| Ian Romanick | f50f065 | 2010-06-30 17:30:03 -0700 | [diff] [blame] | 2141 | YY_BREAK |
| 2142 | case 144: |
| 2143 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2144 | #line 336 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2145 | RESERVED_WORD(999, FVEC3); |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 2146 | YY_BREAK |
| 2147 | case 145: |
| 2148 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2149 | #line 337 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2150 | RESERVED_WORD(999, FVEC4); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2151 | YY_BREAK |
| 2152 | case 146: |
| 2153 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2154 | #line 338 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2155 | return SAMPLER2DRECT; |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2156 | YY_BREAK |
| 2157 | case 147: |
| 2158 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2159 | #line 339 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2160 | RESERVED_WORD(999, SAMPLER3DRECT); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2161 | YY_BREAK |
| 2162 | case 148: |
| 2163 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2164 | #line 340 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2165 | return SAMPLER2DRECTSHADOW; |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2166 | YY_BREAK |
| 2167 | case 149: |
| 2168 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2169 | #line 341 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2170 | RESERVED_WORD(999, SIZEOF); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2171 | YY_BREAK |
| 2172 | case 150: |
| 2173 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2174 | #line 342 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2175 | RESERVED_WORD(999, CAST); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2176 | YY_BREAK |
| 2177 | case 151: |
| 2178 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2179 | #line 343 "glsl_lexer.lpp" |
| 2180 | RESERVED_WORD(999, NAMESPACE); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2181 | YY_BREAK |
| 2182 | case 152: |
| 2183 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2184 | #line 344 "glsl_lexer.lpp" |
| 2185 | RESERVED_WORD(999, USING); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2186 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2187 | /* Additional reserved words in GLSL 1.20. */ |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2188 | case 153: |
| 2189 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2190 | #line 347 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2191 | TOKEN_OR_IDENTIFIER_ES(120, LOWP); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2192 | YY_BREAK |
| 2193 | case 154: |
| 2194 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2195 | #line 348 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2196 | TOKEN_OR_IDENTIFIER_ES(120, MEDIUMP); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2197 | YY_BREAK |
| 2198 | case 155: |
| 2199 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2200 | #line 349 "glsl_lexer.lpp" |
| 2201 | TOKEN_OR_IDENTIFIER_ES(120, HIGHP); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2202 | YY_BREAK |
| 2203 | case 156: |
| 2204 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2205 | #line 350 "glsl_lexer.lpp" |
| 2206 | TOKEN_OR_IDENTIFIER_ES(120, PRECISION); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2207 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2208 | /* Additional reserved words in GLSL 1.30. */ |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2209 | case 157: |
| 2210 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2211 | #line 353 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2212 | TOKEN_OR_IDENTIFIER(130, COMMON); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2213 | YY_BREAK |
| 2214 | case 158: |
| 2215 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2216 | #line 354 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2217 | TOKEN_OR_IDENTIFIER(130, PARTITION); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2218 | YY_BREAK |
| 2219 | case 159: |
| 2220 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2221 | #line 355 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2222 | TOKEN_OR_IDENTIFIER(130, ACTIVE); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2223 | YY_BREAK |
| 2224 | case 160: |
| 2225 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2226 | #line 356 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2227 | TOKEN_OR_IDENTIFIER_ES(130, SUPERP); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2228 | YY_BREAK |
| 2229 | case 161: |
| 2230 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2231 | #line 357 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2232 | TOKEN_OR_IDENTIFIER(130, SAMPLERBUFFER); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2233 | YY_BREAK |
| 2234 | case 162: |
| 2235 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2236 | #line 358 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2237 | TOKEN_OR_IDENTIFIER(130, FILTER); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2238 | YY_BREAK |
| 2239 | case 163: |
| 2240 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2241 | #line 359 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2242 | TOKEN_OR_IDENTIFIER(130, IMAGE1D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2243 | YY_BREAK |
| 2244 | case 164: |
| 2245 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2246 | #line 360 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2247 | TOKEN_OR_IDENTIFIER(130, IMAGE2D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2248 | YY_BREAK |
| 2249 | case 165: |
| 2250 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2251 | #line 361 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2252 | TOKEN_OR_IDENTIFIER(130, IMAGE3D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2253 | YY_BREAK |
| 2254 | case 166: |
| 2255 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2256 | #line 362 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2257 | TOKEN_OR_IDENTIFIER(130, IMAGECUBE); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2258 | YY_BREAK |
| 2259 | case 167: |
| 2260 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2261 | #line 363 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2262 | TOKEN_OR_IDENTIFIER(130, IIMAGE1D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2263 | YY_BREAK |
| 2264 | case 168: |
| 2265 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2266 | #line 364 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2267 | TOKEN_OR_IDENTIFIER(130, IIMAGE2D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2268 | YY_BREAK |
| 2269 | case 169: |
| 2270 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2271 | #line 365 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2272 | TOKEN_OR_IDENTIFIER(130, IIMAGE3D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2273 | YY_BREAK |
| 2274 | case 170: |
| 2275 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2276 | #line 366 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2277 | TOKEN_OR_IDENTIFIER(130, IIMAGECUBE); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2278 | YY_BREAK |
| 2279 | case 171: |
| 2280 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2281 | #line 367 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2282 | TOKEN_OR_IDENTIFIER(130, UIMAGE1D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2283 | YY_BREAK |
| 2284 | case 172: |
| 2285 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2286 | #line 368 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2287 | TOKEN_OR_IDENTIFIER(130, UIMAGE2D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2288 | YY_BREAK |
| 2289 | case 173: |
| 2290 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2291 | #line 369 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2292 | TOKEN_OR_IDENTIFIER(130, UIMAGE3D); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2293 | YY_BREAK |
| 2294 | case 174: |
| 2295 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2296 | #line 370 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2297 | TOKEN_OR_IDENTIFIER(130, UIMAGECUBE); |
| Kenneth Graunke | b7e63c3 | 2010-08-07 00:50:08 -0700 | [diff] [blame] | 2298 | YY_BREAK |
| 2299 | case 175: |
| 2300 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2301 | #line 371 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2302 | TOKEN_OR_IDENTIFIER(130, IMAGE1DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2303 | YY_BREAK |
| 2304 | case 176: |
| 2305 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2306 | #line 372 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2307 | TOKEN_OR_IDENTIFIER(130, IMAGE2DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2308 | YY_BREAK |
| 2309 | case 177: |
| 2310 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2311 | #line 373 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2312 | TOKEN_OR_IDENTIFIER(130, IIMAGE1DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2313 | YY_BREAK |
| 2314 | case 178: |
| 2315 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2316 | #line 374 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2317 | TOKEN_OR_IDENTIFIER(130, IIMAGE2DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2318 | YY_BREAK |
| 2319 | case 179: |
| 2320 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2321 | #line 375 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2322 | TOKEN_OR_IDENTIFIER(130, UIMAGE1DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2323 | YY_BREAK |
| 2324 | case 180: |
| 2325 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2326 | #line 376 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2327 | TOKEN_OR_IDENTIFIER(130, UIMAGE2DARRAY); |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2328 | YY_BREAK |
| 2329 | case 181: |
| 2330 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2331 | #line 377 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2332 | TOKEN_OR_IDENTIFIER(130, IMAGE1DSHADOW); |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2333 | YY_BREAK |
| 2334 | case 182: |
| 2335 | YY_RULE_SETUP |
| Ian Romanick | 2b45ba8 | 2010-10-05 17:03:25 -0700 | [diff] [blame] | 2336 | #line 378 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2337 | TOKEN_OR_IDENTIFIER(130, IMAGE2DSHADOW); |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2338 | YY_BREAK |
| 2339 | case 183: |
| 2340 | YY_RULE_SETUP |
| 2341 | #line 379 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2342 | TOKEN_OR_IDENTIFIER(130, IMAGEBUFFER); |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2343 | YY_BREAK |
| 2344 | case 184: |
| 2345 | YY_RULE_SETUP |
| 2346 | #line 380 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2347 | TOKEN_OR_IDENTIFIER(130, IIMAGEBUFFER); |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2348 | YY_BREAK |
| 2349 | case 185: |
| 2350 | YY_RULE_SETUP |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2351 | #line 381 "glsl_lexer.lpp" |
| 2352 | TOKEN_OR_IDENTIFIER(130, UIMAGEBUFFER); |
| 2353 | YY_BREAK |
| 2354 | case 186: |
| 2355 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2356 | #line 382 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2357 | TOKEN_OR_IDENTIFIER(130, ROW_MAJOR); |
| 2358 | YY_BREAK |
| 2359 | case 187: |
| 2360 | YY_RULE_SETUP |
| 2361 | #line 384 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2362 | { |
| 2363 | struct _mesa_glsl_parse_state *state = yyextra; |
| 2364 | void *ctx = state; |
| 2365 | yylval->identifier = talloc_strdup(ctx, yytext); |
| 2366 | return IDENTIFIER; |
| 2367 | } |
| 2368 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2369 | case 188: |
| Eric Anholt | 47f3f22 | 2010-08-02 11:26:43 -0700 | [diff] [blame] | 2370 | YY_RULE_SETUP |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2371 | #line 391 "glsl_lexer.lpp" |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2372 | { return yytext[0]; } |
| 2373 | YY_BREAK |
| 2374 | case 189: |
| 2375 | YY_RULE_SETUP |
| 2376 | #line 393 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2377 | ECHO; |
| 2378 | YY_BREAK |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 2379 | #line 2380 "glsl_lexer.cpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2380 | case YY_STATE_EOF(INITIAL): |
| 2381 | case YY_STATE_EOF(PP): |
| Ian Romanick | 33fe364 | 2010-08-30 11:59:48 -0700 | [diff] [blame] | 2382 | case YY_STATE_EOF(PRAGMA): |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2383 | yyterminate(); |
| 2384 | |
| 2385 | case YY_END_OF_BUFFER: |
| 2386 | { |
| 2387 | /* Amount of text matched not including the EOB char. */ |
| 2388 | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
| 2389 | |
| 2390 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
| 2391 | *yy_cp = yyg->yy_hold_char; |
| 2392 | YY_RESTORE_YY_MORE_OFFSET |
| 2393 | |
| 2394 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
| 2395 | { |
| 2396 | /* We're scanning a new file or input source. It's |
| 2397 | * possible that this happened because the user |
| 2398 | * just pointed yyin at a new source and called |
| 2399 | * _mesa_glsl_lex(). If so, then we have to assure |
| 2400 | * consistency between YY_CURRENT_BUFFER and our |
| 2401 | * globals. Here is the right place to do so, because |
| 2402 | * this is the first action (other than possibly a |
| 2403 | * back-up) that will match for the new input source. |
| 2404 | */ |
| 2405 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 2406 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
| 2407 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
| 2408 | } |
| 2409 | |
| 2410 | /* Note that here we test for yy_c_buf_p "<=" to the position |
| 2411 | * of the first EOB in the buffer, since yy_c_buf_p will |
| 2412 | * already have been incremented past the NUL character |
| 2413 | * (since all states make transitions on EOB to the |
| 2414 | * end-of-buffer state). Contrast this with the test |
| 2415 | * in input(). |
| 2416 | */ |
| 2417 | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
| 2418 | { /* This was really a NUL. */ |
| 2419 | yy_state_type yy_next_state; |
| 2420 | |
| 2421 | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
| 2422 | |
| 2423 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2424 | |
| 2425 | /* Okay, we're now positioned to make the NUL |
| 2426 | * transition. We couldn't have |
| 2427 | * yy_get_previous_state() go ahead and do it |
| 2428 | * for us because it doesn't know how to deal |
| 2429 | * with the possibility of jamming (and we don't |
| 2430 | * want to build jamming into it because then it |
| 2431 | * will run more slowly). |
| 2432 | */ |
| 2433 | |
| 2434 | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
| 2435 | |
| 2436 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2437 | |
| 2438 | if ( yy_next_state ) |
| 2439 | { |
| 2440 | /* Consume the NUL. */ |
| 2441 | yy_cp = ++yyg->yy_c_buf_p; |
| 2442 | yy_current_state = yy_next_state; |
| 2443 | goto yy_match; |
| 2444 | } |
| 2445 | |
| 2446 | else |
| 2447 | { |
| 2448 | yy_cp = yyg->yy_last_accepting_cpos; |
| 2449 | yy_current_state = yyg->yy_last_accepting_state; |
| 2450 | goto yy_find_action; |
| 2451 | } |
| 2452 | } |
| 2453 | |
| 2454 | else switch ( yy_get_next_buffer( yyscanner ) ) |
| 2455 | { |
| 2456 | case EOB_ACT_END_OF_FILE: |
| 2457 | { |
| 2458 | yyg->yy_did_buffer_switch_on_eof = 0; |
| 2459 | |
| 2460 | if ( _mesa_glsl_wrap(yyscanner ) ) |
| 2461 | { |
| 2462 | /* Note: because we've taken care in |
| 2463 | * yy_get_next_buffer() to have set up |
| 2464 | * yytext, we can now set up |
| 2465 | * yy_c_buf_p so that if some total |
| 2466 | * hoser (like flex itself) wants to |
| 2467 | * call the scanner after we return the |
| 2468 | * YY_NULL, it'll still work - another |
| 2469 | * YY_NULL will get returned. |
| 2470 | */ |
| 2471 | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2472 | |
| 2473 | yy_act = YY_STATE_EOF(YY_START); |
| 2474 | goto do_action; |
| 2475 | } |
| 2476 | |
| 2477 | else |
| 2478 | { |
| 2479 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
| 2480 | YY_NEW_FILE; |
| 2481 | } |
| 2482 | break; |
| 2483 | } |
| 2484 | |
| 2485 | case EOB_ACT_CONTINUE_SCAN: |
| 2486 | yyg->yy_c_buf_p = |
| 2487 | yyg->yytext_ptr + yy_amount_of_matched_text; |
| 2488 | |
| 2489 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2490 | |
| 2491 | yy_cp = yyg->yy_c_buf_p; |
| 2492 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2493 | goto yy_match; |
| 2494 | |
| 2495 | case EOB_ACT_LAST_MATCH: |
| 2496 | yyg->yy_c_buf_p = |
| 2497 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
| 2498 | |
| 2499 | yy_current_state = yy_get_previous_state( yyscanner ); |
| 2500 | |
| 2501 | yy_cp = yyg->yy_c_buf_p; |
| 2502 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
| 2503 | goto yy_find_action; |
| 2504 | } |
| 2505 | break; |
| 2506 | } |
| 2507 | |
| 2508 | default: |
| 2509 | YY_FATAL_ERROR( |
| 2510 | "fatal flex scanner internal error--no action found" ); |
| 2511 | } /* end of action switch */ |
| 2512 | } /* end of scanning one token */ |
| 2513 | } /* end of _mesa_glsl_lex */ |
| 2514 | |
| 2515 | /* yy_get_next_buffer - try to read in a new buffer |
| 2516 | * |
| 2517 | * Returns a code representing an action: |
| 2518 | * EOB_ACT_LAST_MATCH - |
| 2519 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
| 2520 | * EOB_ACT_END_OF_FILE - end of file |
| 2521 | */ |
| 2522 | static int yy_get_next_buffer (yyscan_t yyscanner) |
| 2523 | { |
| 2524 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2525 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
| 2526 | register char *source = yyg->yytext_ptr; |
| 2527 | register int number_to_move, i; |
| 2528 | int ret_val; |
| 2529 | |
| 2530 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
| 2531 | YY_FATAL_ERROR( |
| 2532 | "fatal flex scanner internal error--end of buffer missed" ); |
| 2533 | |
| 2534 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
| 2535 | { /* Don't try to fill the buffer, so this is an EOF. */ |
| 2536 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
| 2537 | { |
| 2538 | /* We matched a single character, the EOB, so |
| 2539 | * treat this as a final EOF. |
| 2540 | */ |
| 2541 | return EOB_ACT_END_OF_FILE; |
| 2542 | } |
| 2543 | |
| 2544 | else |
| 2545 | { |
| 2546 | /* We matched some text prior to the EOB, first |
| 2547 | * process it. |
| 2548 | */ |
| 2549 | return EOB_ACT_LAST_MATCH; |
| 2550 | } |
| 2551 | } |
| 2552 | |
| 2553 | /* Try to read more data. */ |
| 2554 | |
| 2555 | /* First move last chars to start of buffer. */ |
| 2556 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; |
| 2557 | |
| 2558 | for ( i = 0; i < number_to_move; ++i ) |
| 2559 | *(dest++) = *(source++); |
| 2560 | |
| 2561 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
| 2562 | /* don't do the read, it's not guaranteed to return an EOF, |
| 2563 | * just force an EOF |
| 2564 | */ |
| 2565 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
| 2566 | |
| 2567 | else |
| 2568 | { |
| 2569 | int num_to_read = |
| 2570 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
| 2571 | |
| 2572 | while ( num_to_read <= 0 ) |
| 2573 | { /* Not enough room in the buffer - grow it. */ |
| 2574 | |
| 2575 | /* just a shorter name for the current buffer */ |
| 2576 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
| 2577 | |
| 2578 | int yy_c_buf_p_offset = |
| 2579 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
| 2580 | |
| 2581 | if ( b->yy_is_our_buffer ) |
| 2582 | { |
| 2583 | int new_size = b->yy_buf_size * 2; |
| 2584 | |
| 2585 | if ( new_size <= 0 ) |
| 2586 | b->yy_buf_size += b->yy_buf_size / 8; |
| 2587 | else |
| 2588 | b->yy_buf_size *= 2; |
| 2589 | |
| 2590 | b->yy_ch_buf = (char *) |
| 2591 | /* Include room in for 2 EOB chars. */ |
| 2592 | _mesa_glsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); |
| 2593 | } |
| 2594 | else |
| 2595 | /* Can't grow it, we don't own it. */ |
| 2596 | b->yy_ch_buf = 0; |
| 2597 | |
| 2598 | if ( ! b->yy_ch_buf ) |
| 2599 | YY_FATAL_ERROR( |
| 2600 | "fatal error - scanner input buffer overflow" ); |
| 2601 | |
| 2602 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
| 2603 | |
| 2604 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
| 2605 | number_to_move - 1; |
| 2606 | |
| 2607 | } |
| 2608 | |
| 2609 | if ( num_to_read > YY_READ_BUF_SIZE ) |
| 2610 | num_to_read = YY_READ_BUF_SIZE; |
| 2611 | |
| 2612 | /* Read in more data. */ |
| 2613 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
| 2614 | yyg->yy_n_chars, (size_t) num_to_read ); |
| 2615 | |
| 2616 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2617 | } |
| 2618 | |
| 2619 | if ( yyg->yy_n_chars == 0 ) |
| 2620 | { |
| 2621 | if ( number_to_move == YY_MORE_ADJ ) |
| 2622 | { |
| 2623 | ret_val = EOB_ACT_END_OF_FILE; |
| 2624 | _mesa_glsl_restart(yyin ,yyscanner); |
| 2625 | } |
| 2626 | |
| 2627 | else |
| 2628 | { |
| 2629 | ret_val = EOB_ACT_LAST_MATCH; |
| 2630 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
| 2631 | YY_BUFFER_EOF_PENDING; |
| 2632 | } |
| 2633 | } |
| 2634 | |
| 2635 | else |
| 2636 | ret_val = EOB_ACT_CONTINUE_SCAN; |
| 2637 | |
| 2638 | if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
| 2639 | /* Extend the array by 50%, plus the number we really need. */ |
| 2640 | yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
| 2641 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); |
| 2642 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
| 2643 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
| 2644 | } |
| 2645 | |
| 2646 | yyg->yy_n_chars += number_to_move; |
| 2647 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
| 2648 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
| 2649 | |
| 2650 | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
| 2651 | |
| 2652 | return ret_val; |
| 2653 | } |
| 2654 | |
| 2655 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
| 2656 | |
| 2657 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
| 2658 | { |
| 2659 | register yy_state_type yy_current_state; |
| 2660 | register char *yy_cp; |
| 2661 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2662 | |
| 2663 | yy_current_state = yyg->yy_start; |
| 2664 | yy_current_state += YY_AT_BOL(); |
| 2665 | |
| 2666 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
| 2667 | { |
| 2668 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
| 2669 | if ( yy_accept[yy_current_state] ) |
| 2670 | { |
| 2671 | yyg->yy_last_accepting_state = yy_current_state; |
| 2672 | yyg->yy_last_accepting_cpos = yy_cp; |
| 2673 | } |
| 2674 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2675 | { |
| 2676 | yy_current_state = (int) yy_def[yy_current_state]; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2677 | if ( yy_current_state >= 716 ) |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2678 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 2679 | } |
| 2680 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 2681 | } |
| 2682 | |
| 2683 | return yy_current_state; |
| 2684 | } |
| 2685 | |
| 2686 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
| 2687 | * |
| 2688 | * synopsis |
| 2689 | * next_state = yy_try_NUL_trans( current_state ); |
| 2690 | */ |
| 2691 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
| 2692 | { |
| 2693 | register int yy_is_jam; |
| 2694 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
| 2695 | register char *yy_cp = yyg->yy_c_buf_p; |
| 2696 | |
| 2697 | register YY_CHAR yy_c = 1; |
| 2698 | if ( yy_accept[yy_current_state] ) |
| 2699 | { |
| 2700 | yyg->yy_last_accepting_state = yy_current_state; |
| 2701 | yyg->yy_last_accepting_cpos = yy_cp; |
| 2702 | } |
| 2703 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2704 | { |
| 2705 | yy_current_state = (int) yy_def[yy_current_state]; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2706 | if ( yy_current_state >= 716 ) |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2707 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 2708 | } |
| 2709 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| Chad Versace | 41c2079 | 2010-10-08 12:05:02 -0700 | [diff] [blame] | 2710 | yy_is_jam = (yy_current_state == 715); |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 2711 | |
| 2712 | return yy_is_jam ? 0 : yy_current_state; |
| 2713 | } |
| 2714 | |
| 2715 | #ifndef YY_NO_INPUT |
| 2716 | #ifdef __cplusplus |
| 2717 | static int yyinput (yyscan_t yyscanner) |
| 2718 | #else |
| 2719 | static int input (yyscan_t yyscanner) |
| 2720 | #endif |
| 2721 | |
| 2722 | { |
| 2723 | int c; |
| 2724 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2725 | |
| 2726 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2727 | |
| 2728 | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
| 2729 | { |
| 2730 | /* yy_c_buf_p now points to the character we want to return. |
| 2731 | * If this occurs *before* the EOB characters, then it's a |
| 2732 | * valid NUL; if not, then we've hit the end of the buffer. |
| 2733 | */ |
| 2734 | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
| 2735 | /* This was really a NUL. */ |
| 2736 | *yyg->yy_c_buf_p = '\0'; |
| 2737 | |
| 2738 | else |
| 2739 | { /* need more input */ |
| 2740 | int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; |
| 2741 | ++yyg->yy_c_buf_p; |
| 2742 | |
| 2743 | switch ( yy_get_next_buffer( yyscanner ) ) |
| 2744 | { |
| 2745 | case EOB_ACT_LAST_MATCH: |
| 2746 | /* This happens because yy_g_n_b() |
| 2747 | * sees that we've accumulated a |
| 2748 | * token and flags that we need to |
| 2749 | * try matching the token before |
| 2750 | * proceeding. But for input(), |
| 2751 | * there's no matching to consider. |
| 2752 | * So convert the EOB_ACT_LAST_MATCH |
| 2753 | * to EOB_ACT_END_OF_FILE. |
| 2754 | */ |
| 2755 | |
| 2756 | /* Reset buffer status. */ |
| 2757 | _mesa_glsl_restart(yyin ,yyscanner); |
| 2758 | |
| 2759 | /*FALLTHROUGH*/ |
| 2760 | |
| 2761 | case EOB_ACT_END_OF_FILE: |
| 2762 | { |
| 2763 | if ( _mesa_glsl_wrap(yyscanner ) ) |
| 2764 | return EOF; |
| 2765 | |
| 2766 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
| 2767 | YY_NEW_FILE; |
| 2768 | #ifdef __cplusplus |
| 2769 | return yyinput(yyscanner); |
| 2770 | #else |
| 2771 | return input(yyscanner); |
| 2772 | #endif |
| 2773 | } |
| 2774 | |
| 2775 | case EOB_ACT_CONTINUE_SCAN: |
| 2776 | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
| 2777 | break; |
| 2778 | } |
| 2779 | } |
| 2780 | } |
| 2781 | |
| 2782 | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
| 2783 | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
| 2784 | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
| 2785 | |
| 2786 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); |
| 2787 | |
| 2788 | return c; |
| 2789 | } |
| 2790 | #endif /* ifndef YY_NO_INPUT */ |
| 2791 | |
| 2792 | /** Immediately switch to a different input stream. |
| 2793 | * @param input_file A readable stream. |
| 2794 | * @param yyscanner The scanner object. |
| 2795 | * @note This function does not reset the start condition to @c INITIAL . |
| 2796 | */ |
| 2797 | void _mesa_glsl_restart (FILE * input_file , yyscan_t yyscanner) |
| 2798 | { |
| 2799 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2800 | |
| 2801 | if ( ! YY_CURRENT_BUFFER ){ |
| 2802 | _mesa_glsl_ensure_buffer_stack (yyscanner); |
| 2803 | YY_CURRENT_BUFFER_LVALUE = |
| 2804 | _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
| 2805 | } |
| 2806 | |
| 2807 | _mesa_glsl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); |
| 2808 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 2809 | } |
| 2810 | |
| 2811 | /** Switch to a different input buffer. |
| 2812 | * @param new_buffer The new input buffer. |
| 2813 | * @param yyscanner The scanner object. |
| 2814 | */ |
| 2815 | void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 2816 | { |
| 2817 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2818 | |
| 2819 | /* TODO. We should be able to replace this entire function body |
| 2820 | * with |
| 2821 | * _mesa_glsl_pop_buffer_state(); |
| 2822 | * _mesa_glsl_push_buffer_state(new_buffer); |
| 2823 | */ |
| 2824 | _mesa_glsl_ensure_buffer_stack (yyscanner); |
| 2825 | if ( YY_CURRENT_BUFFER == new_buffer ) |
| 2826 | return; |
| 2827 | |
| 2828 | if ( YY_CURRENT_BUFFER ) |
| 2829 | { |
| 2830 | /* Flush out information for old buffer. */ |
| 2831 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2832 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 2833 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2834 | } |
| 2835 | |
| 2836 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2837 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 2838 | |
| 2839 | /* We don't actually know whether we did this switch during |
| 2840 | * EOF (_mesa_glsl_wrap()) processing, but the only time this flag |
| 2841 | * is looked at is after _mesa_glsl_wrap() is called, so it's safe |
| 2842 | * to go ahead and always set it. |
| 2843 | */ |
| 2844 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 2845 | } |
| 2846 | |
| 2847 | static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner) |
| 2848 | { |
| 2849 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2850 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 2851 | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
| 2852 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
| 2853 | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
| 2854 | } |
| 2855 | |
| 2856 | /** Allocate and initialize an input buffer state. |
| 2857 | * @param file A readable stream. |
| 2858 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
| 2859 | * @param yyscanner The scanner object. |
| 2860 | * @return the allocated buffer state. |
| 2861 | */ |
| 2862 | YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE * file, int size , yyscan_t yyscanner) |
| 2863 | { |
| 2864 | YY_BUFFER_STATE b; |
| 2865 | |
| 2866 | b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
| 2867 | if ( ! b ) |
| 2868 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); |
| 2869 | |
| 2870 | b->yy_buf_size = size; |
| 2871 | |
| 2872 | /* yy_ch_buf has to be 2 characters longer than the size given because |
| 2873 | * we need to put in 2 end-of-buffer characters. |
| 2874 | */ |
| 2875 | b->yy_ch_buf = (char *) _mesa_glsl_alloc(b->yy_buf_size + 2 ,yyscanner ); |
| 2876 | if ( ! b->yy_ch_buf ) |
| 2877 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); |
| 2878 | |
| 2879 | b->yy_is_our_buffer = 1; |
| 2880 | |
| 2881 | _mesa_glsl__init_buffer(b,file ,yyscanner); |
| 2882 | |
| 2883 | return b; |
| 2884 | } |
| 2885 | |
| 2886 | /** Destroy the buffer. |
| 2887 | * @param b a buffer created with _mesa_glsl__create_buffer() |
| 2888 | * @param yyscanner The scanner object. |
| 2889 | */ |
| 2890 | void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
| 2891 | { |
| 2892 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2893 | |
| 2894 | if ( ! b ) |
| 2895 | return; |
| 2896 | |
| 2897 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
| 2898 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
| 2899 | |
| 2900 | if ( b->yy_is_our_buffer ) |
| 2901 | _mesa_glsl_free((void *) b->yy_ch_buf ,yyscanner ); |
| 2902 | |
| 2903 | _mesa_glsl_free((void *) b ,yyscanner ); |
| 2904 | } |
| 2905 | |
| 2906 | /* Initializes or reinitializes a buffer. |
| 2907 | * This function is sometimes called more than once on the same buffer, |
| 2908 | * such as during a _mesa_glsl_restart() or at EOF. |
| 2909 | */ |
| 2910 | static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
| 2911 | |
| 2912 | { |
| 2913 | int oerrno = errno; |
| 2914 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2915 | |
| 2916 | _mesa_glsl__flush_buffer(b ,yyscanner); |
| 2917 | |
| 2918 | b->yy_input_file = file; |
| 2919 | b->yy_fill_buffer = 1; |
| 2920 | |
| 2921 | /* If b is the current buffer, then _mesa_glsl__init_buffer was _probably_ |
| 2922 | * called from _mesa_glsl_restart() or through yy_get_next_buffer. |
| 2923 | * In that case, we don't want to reset the lineno or column. |
| 2924 | */ |
| 2925 | if (b != YY_CURRENT_BUFFER){ |
| 2926 | b->yy_bs_lineno = 1; |
| 2927 | b->yy_bs_column = 0; |
| 2928 | } |
| 2929 | |
| 2930 | b->yy_is_interactive = 0; |
| 2931 | |
| 2932 | errno = oerrno; |
| 2933 | } |
| 2934 | |
| 2935 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 2936 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
| 2937 | * @param yyscanner The scanner object. |
| 2938 | */ |
| 2939 | void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
| 2940 | { |
| 2941 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2942 | if ( ! b ) |
| 2943 | return; |
| 2944 | |
| 2945 | b->yy_n_chars = 0; |
| 2946 | |
| 2947 | /* We always need two end-of-buffer characters. The first causes |
| 2948 | * a transition to the end-of-buffer state. The second causes |
| 2949 | * a jam in that state. |
| 2950 | */ |
| 2951 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
| 2952 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
| 2953 | |
| 2954 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
| 2955 | |
| 2956 | b->yy_at_bol = 1; |
| 2957 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 2958 | |
| 2959 | if ( b == YY_CURRENT_BUFFER ) |
| 2960 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 2961 | } |
| 2962 | |
| 2963 | /** Pushes the new state onto the stack. The new state becomes |
| 2964 | * the current state. This function will allocate the stack |
| 2965 | * if necessary. |
| 2966 | * @param new_buffer The new state. |
| 2967 | * @param yyscanner The scanner object. |
| 2968 | */ |
| 2969 | void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 2970 | { |
| 2971 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2972 | if (new_buffer == NULL) |
| 2973 | return; |
| 2974 | |
| 2975 | _mesa_glsl_ensure_buffer_stack(yyscanner); |
| 2976 | |
| 2977 | /* This block is copied from _mesa_glsl__switch_to_buffer. */ |
| 2978 | if ( YY_CURRENT_BUFFER ) |
| 2979 | { |
| 2980 | /* Flush out information for old buffer. */ |
| 2981 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2982 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 2983 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2984 | } |
| 2985 | |
| 2986 | /* Only push if top exists. Otherwise, replace top. */ |
| 2987 | if (YY_CURRENT_BUFFER) |
| 2988 | yyg->yy_buffer_stack_top++; |
| 2989 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2990 | |
| 2991 | /* copied from _mesa_glsl__switch_to_buffer. */ |
| 2992 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 2993 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 2994 | } |
| 2995 | |
| 2996 | /** Removes and deletes the top of the stack, if present. |
| 2997 | * The next element becomes the new top. |
| 2998 | * @param yyscanner The scanner object. |
| 2999 | */ |
| 3000 | void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner) |
| 3001 | { |
| 3002 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3003 | if (!YY_CURRENT_BUFFER) |
| 3004 | return; |
| 3005 | |
| 3006 | _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); |
| 3007 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 3008 | if (yyg->yy_buffer_stack_top > 0) |
| 3009 | --yyg->yy_buffer_stack_top; |
| 3010 | |
| 3011 | if (YY_CURRENT_BUFFER) { |
| 3012 | _mesa_glsl__load_buffer_state(yyscanner ); |
| 3013 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 3014 | } |
| 3015 | } |
| 3016 | |
| 3017 | /* Allocates the stack if it does not exist. |
| 3018 | * Guarantees space for at least one push. |
| 3019 | */ |
| 3020 | static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner) |
| 3021 | { |
| 3022 | int num_to_alloc; |
| 3023 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3024 | |
| 3025 | if (!yyg->yy_buffer_stack) { |
| 3026 | |
| 3027 | /* First allocation is just for 2 elements, since we don't know if this |
| 3028 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
| 3029 | * immediate realloc on the next call. |
| 3030 | */ |
| 3031 | num_to_alloc = 1; |
| 3032 | yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_alloc |
| 3033 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
| 3034 | , yyscanner); |
| 3035 | if ( ! yyg->yy_buffer_stack ) |
| 3036 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); |
| 3037 | |
| 3038 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
| 3039 | |
| 3040 | yyg->yy_buffer_stack_max = num_to_alloc; |
| 3041 | yyg->yy_buffer_stack_top = 0; |
| 3042 | return; |
| 3043 | } |
| 3044 | |
| 3045 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
| 3046 | |
| 3047 | /* Increase the buffer to prepare for a possible push. */ |
| 3048 | int grow_size = 8 /* arbitrary grow size */; |
| 3049 | |
| 3050 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
| 3051 | yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_realloc |
| 3052 | (yyg->yy_buffer_stack, |
| 3053 | num_to_alloc * sizeof(struct yy_buffer_state*) |
| 3054 | , yyscanner); |
| 3055 | if ( ! yyg->yy_buffer_stack ) |
| 3056 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); |
| 3057 | |
| 3058 | /* zero only the new slots.*/ |
| 3059 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
| 3060 | yyg->yy_buffer_stack_max = num_to_alloc; |
| 3061 | } |
| 3062 | } |
| 3063 | |
| 3064 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
| 3065 | * @param base the character buffer |
| 3066 | * @param size the size in bytes of the character buffer |
| 3067 | * @param yyscanner The scanner object. |
| 3068 | * @return the newly allocated buffer state object. |
| 3069 | */ |
| 3070 | YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
| 3071 | { |
| 3072 | YY_BUFFER_STATE b; |
| 3073 | |
| 3074 | if ( size < 2 || |
| 3075 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 3076 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| 3077 | /* They forgot to leave room for the EOB's. */ |
| 3078 | return 0; |
| 3079 | |
| 3080 | b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
| 3081 | if ( ! b ) |
| 3082 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" ); |
| 3083 | |
| 3084 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
| 3085 | b->yy_buf_pos = b->yy_ch_buf = base; |
| 3086 | b->yy_is_our_buffer = 0; |
| 3087 | b->yy_input_file = 0; |
| 3088 | b->yy_n_chars = b->yy_buf_size; |
| 3089 | b->yy_is_interactive = 0; |
| 3090 | b->yy_at_bol = 1; |
| 3091 | b->yy_fill_buffer = 0; |
| 3092 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 3093 | |
| 3094 | _mesa_glsl__switch_to_buffer(b ,yyscanner ); |
| 3095 | |
| 3096 | return b; |
| 3097 | } |
| 3098 | |
| 3099 | /** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will |
| 3100 | * scan from a @e copy of @a str. |
| 3101 | * @param yystr a NUL-terminated string to scan |
| 3102 | * @param yyscanner The scanner object. |
| 3103 | * @return the newly allocated buffer state object. |
| 3104 | * @note If you want to scan bytes that may contain NUL values, then use |
| 3105 | * _mesa_glsl__scan_bytes() instead. |
| 3106 | */ |
| 3107 | YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner) |
| 3108 | { |
| 3109 | |
| 3110 | return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner); |
| 3111 | } |
| 3112 | |
| 3113 | /** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will |
| 3114 | * scan from a @e copy of @a bytes. |
| Ian Romanick | 5ed6610 | 2010-10-05 16:40:00 -0700 | [diff] [blame] | 3115 | * @param yybytes the byte buffer to scan |
| 3116 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 3117 | * @param yyscanner The scanner object. |
| 3118 | * @return the newly allocated buffer state object. |
| 3119 | */ |
| 3120 | YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
| 3121 | { |
| 3122 | YY_BUFFER_STATE b; |
| 3123 | char *buf; |
| 3124 | yy_size_t n; |
| 3125 | int i; |
| 3126 | |
| 3127 | /* Get memory for full buffer, including space for trailing EOB's. */ |
| 3128 | n = _yybytes_len + 2; |
| 3129 | buf = (char *) _mesa_glsl_alloc(n ,yyscanner ); |
| 3130 | if ( ! buf ) |
| 3131 | YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" ); |
| 3132 | |
| 3133 | for ( i = 0; i < _yybytes_len; ++i ) |
| 3134 | buf[i] = yybytes[i]; |
| 3135 | |
| 3136 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
| 3137 | |
| 3138 | b = _mesa_glsl__scan_buffer(buf,n ,yyscanner); |
| 3139 | if ( ! b ) |
| 3140 | YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" ); |
| 3141 | |
| 3142 | /* It's okay to grow etc. this buffer, and we should throw it |
| 3143 | * away when we're done. |
| 3144 | */ |
| 3145 | b->yy_is_our_buffer = 1; |
| 3146 | |
| 3147 | return b; |
| 3148 | } |
| 3149 | |
| 3150 | #ifndef YY_EXIT_FAILURE |
| 3151 | #define YY_EXIT_FAILURE 2 |
| 3152 | #endif |
| 3153 | |
| 3154 | static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) |
| 3155 | { |
| 3156 | (void) fprintf( stderr, "%s\n", msg ); |
| 3157 | exit( YY_EXIT_FAILURE ); |
| 3158 | } |
| 3159 | |
| 3160 | /* Redefine yyless() so it works in section 3 code. */ |
| 3161 | |
| 3162 | #undef yyless |
| 3163 | #define yyless(n) \ |
| 3164 | do \ |
| 3165 | { \ |
| 3166 | /* Undo effects of setting up yytext. */ \ |
| 3167 | int yyless_macro_arg = (n); \ |
| 3168 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 3169 | yytext[yyleng] = yyg->yy_hold_char; \ |
| 3170 | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
| 3171 | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
| 3172 | *yyg->yy_c_buf_p = '\0'; \ |
| 3173 | yyleng = yyless_macro_arg; \ |
| 3174 | } \ |
| 3175 | while ( 0 ) |
| 3176 | |
| 3177 | /* Accessor methods (get/set functions) to struct members. */ |
| 3178 | |
| 3179 | /** Get the user-defined data for this scanner. |
| 3180 | * @param yyscanner The scanner object. |
| 3181 | */ |
| 3182 | YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner) |
| 3183 | { |
| 3184 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3185 | return yyextra; |
| 3186 | } |
| 3187 | |
| 3188 | /** Get the current line number. |
| 3189 | * @param yyscanner The scanner object. |
| 3190 | */ |
| 3191 | int _mesa_glsl_get_lineno (yyscan_t yyscanner) |
| 3192 | { |
| 3193 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3194 | |
| 3195 | if (! YY_CURRENT_BUFFER) |
| 3196 | return 0; |
| 3197 | |
| 3198 | return yylineno; |
| 3199 | } |
| 3200 | |
| 3201 | /** Get the current column number. |
| 3202 | * @param yyscanner The scanner object. |
| 3203 | */ |
| 3204 | int _mesa_glsl_get_column (yyscan_t yyscanner) |
| 3205 | { |
| 3206 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3207 | |
| 3208 | if (! YY_CURRENT_BUFFER) |
| 3209 | return 0; |
| 3210 | |
| 3211 | return yycolumn; |
| 3212 | } |
| 3213 | |
| 3214 | /** Get the input stream. |
| 3215 | * @param yyscanner The scanner object. |
| 3216 | */ |
| 3217 | FILE *_mesa_glsl_get_in (yyscan_t yyscanner) |
| 3218 | { |
| 3219 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3220 | return yyin; |
| 3221 | } |
| 3222 | |
| 3223 | /** Get the output stream. |
| 3224 | * @param yyscanner The scanner object. |
| 3225 | */ |
| 3226 | FILE *_mesa_glsl_get_out (yyscan_t yyscanner) |
| 3227 | { |
| 3228 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3229 | return yyout; |
| 3230 | } |
| 3231 | |
| 3232 | /** Get the length of the current token. |
| 3233 | * @param yyscanner The scanner object. |
| 3234 | */ |
| 3235 | int _mesa_glsl_get_leng (yyscan_t yyscanner) |
| 3236 | { |
| 3237 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3238 | return yyleng; |
| 3239 | } |
| 3240 | |
| 3241 | /** Get the current token. |
| 3242 | * @param yyscanner The scanner object. |
| 3243 | */ |
| 3244 | |
| 3245 | char *_mesa_glsl_get_text (yyscan_t yyscanner) |
| 3246 | { |
| 3247 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3248 | return yytext; |
| 3249 | } |
| 3250 | |
| 3251 | /** Set the user-defined data. This data is never touched by the scanner. |
| 3252 | * @param user_defined The data to be associated with this scanner. |
| 3253 | * @param yyscanner The scanner object. |
| 3254 | */ |
| 3255 | void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
| 3256 | { |
| 3257 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3258 | yyextra = user_defined ; |
| 3259 | } |
| 3260 | |
| 3261 | /** Set the current line number. |
| 3262 | * @param line_number |
| 3263 | * @param yyscanner The scanner object. |
| 3264 | */ |
| 3265 | void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner) |
| 3266 | { |
| 3267 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3268 | |
| 3269 | /* lineno is only valid if an input buffer exists. */ |
| 3270 | if (! YY_CURRENT_BUFFER ) |
| 3271 | yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner); |
| 3272 | |
| 3273 | yylineno = line_number; |
| 3274 | } |
| 3275 | |
| 3276 | /** Set the current column. |
| 3277 | * @param line_number |
| 3278 | * @param yyscanner The scanner object. |
| 3279 | */ |
| 3280 | void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner) |
| 3281 | { |
| 3282 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3283 | |
| 3284 | /* column is only valid if an input buffer exists. */ |
| 3285 | if (! YY_CURRENT_BUFFER ) |
| 3286 | yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner); |
| 3287 | |
| 3288 | yycolumn = column_no; |
| 3289 | } |
| 3290 | |
| 3291 | /** Set the input stream. This does not discard the current |
| 3292 | * input buffer. |
| 3293 | * @param in_str A readable stream. |
| 3294 | * @param yyscanner The scanner object. |
| 3295 | * @see _mesa_glsl__switch_to_buffer |
| 3296 | */ |
| 3297 | void _mesa_glsl_set_in (FILE * in_str , yyscan_t yyscanner) |
| 3298 | { |
| 3299 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3300 | yyin = in_str ; |
| 3301 | } |
| 3302 | |
| 3303 | void _mesa_glsl_set_out (FILE * out_str , yyscan_t yyscanner) |
| 3304 | { |
| 3305 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3306 | yyout = out_str ; |
| 3307 | } |
| 3308 | |
| 3309 | int _mesa_glsl_get_debug (yyscan_t yyscanner) |
| 3310 | { |
| 3311 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3312 | return yy_flex_debug; |
| 3313 | } |
| 3314 | |
| 3315 | void _mesa_glsl_set_debug (int bdebug , yyscan_t yyscanner) |
| 3316 | { |
| 3317 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3318 | yy_flex_debug = bdebug ; |
| 3319 | } |
| 3320 | |
| 3321 | /* Accessor methods for yylval and yylloc */ |
| 3322 | |
| 3323 | YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner) |
| 3324 | { |
| 3325 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3326 | return yylval; |
| 3327 | } |
| 3328 | |
| 3329 | void _mesa_glsl_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
| 3330 | { |
| 3331 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3332 | yylval = yylval_param; |
| 3333 | } |
| 3334 | |
| 3335 | YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner) |
| 3336 | { |
| 3337 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3338 | return yylloc; |
| 3339 | } |
| 3340 | |
| 3341 | void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
| 3342 | { |
| 3343 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3344 | yylloc = yylloc_param; |
| 3345 | } |
| 3346 | |
| 3347 | /* User-visible API */ |
| 3348 | |
| 3349 | /* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is |
| 3350 | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
| 3351 | * That's why we explicitly handle the declaration, instead of using our macros. |
| 3352 | */ |
| 3353 | |
| 3354 | int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals) |
| 3355 | |
| 3356 | { |
| 3357 | if (ptr_yy_globals == NULL){ |
| 3358 | errno = EINVAL; |
| 3359 | return 1; |
| 3360 | } |
| 3361 | |
| 3362 | *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), NULL ); |
| 3363 | |
| 3364 | if (*ptr_yy_globals == NULL){ |
| 3365 | errno = ENOMEM; |
| 3366 | return 1; |
| 3367 | } |
| 3368 | |
| 3369 | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
| 3370 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 3371 | |
| 3372 | return yy_init_globals ( *ptr_yy_globals ); |
| 3373 | } |
| 3374 | |
| 3375 | /* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the |
| 3376 | * convention of taking the scanner as the last argument. Note however, that |
| 3377 | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
| 3378 | * is the reason, too, why this function also must handle its own declaration). |
| 3379 | * The user defined value in the first argument will be available to _mesa_glsl_alloc in |
| 3380 | * the yyextra field. |
| 3381 | */ |
| 3382 | |
| 3383 | int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) |
| 3384 | |
| 3385 | { |
| 3386 | struct yyguts_t dummy_yyguts; |
| 3387 | |
| 3388 | _mesa_glsl_set_extra (yy_user_defined, &dummy_yyguts); |
| 3389 | |
| 3390 | if (ptr_yy_globals == NULL){ |
| 3391 | errno = EINVAL; |
| 3392 | return 1; |
| 3393 | } |
| 3394 | |
| 3395 | *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
| 3396 | |
| 3397 | if (*ptr_yy_globals == NULL){ |
| 3398 | errno = ENOMEM; |
| 3399 | return 1; |
| 3400 | } |
| 3401 | |
| 3402 | /* By setting to 0xAA, we expose bugs in |
| 3403 | yy_init_globals. Leave at 0x00 for releases. */ |
| 3404 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 3405 | |
| 3406 | _mesa_glsl_set_extra (yy_user_defined, *ptr_yy_globals); |
| 3407 | |
| 3408 | return yy_init_globals ( *ptr_yy_globals ); |
| 3409 | } |
| 3410 | |
| 3411 | static int yy_init_globals (yyscan_t yyscanner) |
| 3412 | { |
| 3413 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3414 | /* Initialization is the same as for the non-reentrant scanner. |
| 3415 | * This function is called from _mesa_glsl_lex_destroy(), so don't allocate here. |
| 3416 | */ |
| 3417 | |
| 3418 | yyg->yy_buffer_stack = 0; |
| 3419 | yyg->yy_buffer_stack_top = 0; |
| 3420 | yyg->yy_buffer_stack_max = 0; |
| 3421 | yyg->yy_c_buf_p = (char *) 0; |
| 3422 | yyg->yy_init = 0; |
| 3423 | yyg->yy_start = 0; |
| 3424 | |
| 3425 | yyg->yy_start_stack_ptr = 0; |
| 3426 | yyg->yy_start_stack_depth = 0; |
| 3427 | yyg->yy_start_stack = NULL; |
| 3428 | |
| 3429 | /* Defined in main.c */ |
| 3430 | #ifdef YY_STDINIT |
| 3431 | yyin = stdin; |
| 3432 | yyout = stdout; |
| 3433 | #else |
| 3434 | yyin = (FILE *) 0; |
| 3435 | yyout = (FILE *) 0; |
| 3436 | #endif |
| 3437 | |
| 3438 | /* For future reference: Set errno on error, since we are called by |
| 3439 | * _mesa_glsl_lex_init() |
| 3440 | */ |
| 3441 | return 0; |
| 3442 | } |
| 3443 | |
| 3444 | /* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */ |
| 3445 | int _mesa_glsl_lex_destroy (yyscan_t yyscanner) |
| 3446 | { |
| 3447 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 3448 | |
| 3449 | /* Pop the buffer stack, destroying each element. */ |
| 3450 | while(YY_CURRENT_BUFFER){ |
| 3451 | _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); |
| 3452 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 3453 | _mesa_glsl_pop_buffer_state(yyscanner); |
| 3454 | } |
| 3455 | |
| 3456 | /* Destroy the stack itself. */ |
| 3457 | _mesa_glsl_free(yyg->yy_buffer_stack ,yyscanner); |
| 3458 | yyg->yy_buffer_stack = NULL; |
| 3459 | |
| 3460 | /* Destroy the start condition stack. */ |
| 3461 | _mesa_glsl_free(yyg->yy_start_stack ,yyscanner ); |
| 3462 | yyg->yy_start_stack = NULL; |
| 3463 | |
| 3464 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
| 3465 | * _mesa_glsl_lex() is called, initialization will occur. */ |
| 3466 | yy_init_globals( yyscanner); |
| 3467 | |
| 3468 | /* Destroy the main struct (reentrant only). */ |
| 3469 | _mesa_glsl_free ( yyscanner , yyscanner ); |
| 3470 | yyscanner = NULL; |
| 3471 | return 0; |
| 3472 | } |
| 3473 | |
| 3474 | /* |
| 3475 | * Internal utility routines. |
| 3476 | */ |
| 3477 | |
| 3478 | #ifndef yytext_ptr |
| 3479 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) |
| 3480 | { |
| 3481 | register int i; |
| 3482 | for ( i = 0; i < n; ++i ) |
| 3483 | s1[i] = s2[i]; |
| 3484 | } |
| 3485 | #endif |
| 3486 | |
| 3487 | #ifdef YY_NEED_STRLEN |
| 3488 | static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) |
| 3489 | { |
| 3490 | register int n; |
| 3491 | for ( n = 0; s[n]; ++n ) |
| 3492 | ; |
| 3493 | |
| 3494 | return n; |
| 3495 | } |
| 3496 | #endif |
| 3497 | |
| 3498 | void *_mesa_glsl_alloc (yy_size_t size , yyscan_t yyscanner) |
| 3499 | { |
| 3500 | return (void *) malloc( size ); |
| 3501 | } |
| 3502 | |
| 3503 | void *_mesa_glsl_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
| 3504 | { |
| 3505 | /* The cast to (char *) in the following accommodates both |
| 3506 | * implementations that use char* generic pointers, and those |
| 3507 | * that use void* generic pointers. It works with the latter |
| 3508 | * because both ANSI C and C++ allow castless assignment from |
| 3509 | * any pointer type to void*, and deal with argument conversions |
| 3510 | * as though doing an assignment. |
| 3511 | */ |
| 3512 | return (void *) realloc( (char *) ptr, size ); |
| 3513 | } |
| 3514 | |
| 3515 | void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) |
| 3516 | { |
| 3517 | free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */ |
| 3518 | } |
| 3519 | |
| 3520 | #define YYTABLES_NAME "yytables" |
| 3521 | |
| Chad Versace | f88b4ea | 2010-10-08 16:12:56 -0700 | [diff] [blame^] | 3522 | #line 393 "glsl_lexer.lpp" |
| Carl Worth | e8a8f0f | 2010-07-28 12:27:33 -0700 | [diff] [blame] | 3523 | |
| 3524 | |
| 3525 | |
| 3526 | void |
| 3527 | _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string) |
| 3528 | { |
| 3529 | _mesa_glsl_lex_init_extra(state,& state->scanner); |
| 3530 | _mesa_glsl__scan_string(string,state->scanner); |
| 3531 | } |
| 3532 | |
| 3533 | void |
| 3534 | _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state) |
| 3535 | { |
| 3536 | _mesa_glsl_lex_destroy(state->scanner); |
| 3537 | } |
| 3538 | |