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