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