1 #line 2 "glsl_lexer.cpp"
3 #line 4 "glsl_lexer.cpp"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
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
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
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
;
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
;
59 /* Limits of integral types. */
61 #define INT8_MIN (-128)
64 #define INT16_MIN (-32767-1)
67 #define INT32_MIN (-2147483647-1)
70 #define INT8_MAX (127)
73 #define INT16_MAX (32767)
76 #define INT32_MAX (2147483647)
79 #define UINT8_MAX (255U)
82 #define UINT16_MAX (65535U)
85 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
106 #define yyconst const
111 /* Returned upon end-of-file. */
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115 * integer for use as an array index. If the signed char is negative,
116 * we want to instead treat it as an 8-bit unsigned char, hence the
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 /* An opaque pointer. */
122 #ifndef YY_TYPEDEF_YY_SCANNER_T
123 #define YY_TYPEDEF_YY_SCANNER_T
124 typedef void* yyscan_t
;
127 /* For convenience, these vars (plus the bison vars far below)
128 are macros in the reentrant scanner. */
129 #define yyin yyg->yyin_r
130 #define yyout yyg->yyout_r
131 #define yyextra yyg->yyextra_r
132 #define yyleng yyg->yyleng_r
133 #define yytext yyg->yytext_r
134 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
135 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
136 #define yy_flex_debug yyg->yy_flex_debug_r
138 /* Enter a start condition. This macro really ought to take a parameter,
139 * but we do it the disgusting crufty way forced on us by the ()-less
140 * definition of BEGIN.
142 #define BEGIN yyg->yy_start = 1 + 2 *
144 /* Translate the current start state into a value that can be later handed
145 * to BEGIN to return to the state. The YYSTATE alias is for lex
148 #define YY_START ((yyg->yy_start - 1) / 2)
149 #define YYSTATE YY_START
151 /* Action number for EOF rule of a given start state. */
152 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154 /* Special action meaning "start processing a new file". */
155 #define YY_NEW_FILE _mesa_glsl_restart(yyin ,yyscanner )
157 #define YY_END_OF_BUFFER_CHAR 0
159 /* Size of default input buffer. */
161 #define YY_BUF_SIZE 16384
164 /* The state buf must be large enough to hold one state per character in the main buffer.
166 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
168 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
169 #define YY_TYPEDEF_YY_BUFFER_STATE
170 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
173 #define EOB_ACT_CONTINUE_SCAN 0
174 #define EOB_ACT_END_OF_FILE 1
175 #define EOB_ACT_LAST_MATCH 2
177 #define YY_LESS_LINENO(n)
179 /* Return all but the first "n" matched characters back to the input stream. */
183 /* Undo effects of setting up yytext. */ \
184 int yyless_macro_arg = (n); \
185 YY_LESS_LINENO(yyless_macro_arg);\
186 *yy_cp = yyg->yy_hold_char; \
187 YY_RESTORE_YY_MORE_OFFSET \
188 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
189 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
193 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
195 #ifndef YY_TYPEDEF_YY_SIZE_T
196 #define YY_TYPEDEF_YY_SIZE_T
197 typedef size_t yy_size_t
;
200 #ifndef YY_STRUCT_YY_BUFFER_STATE
201 #define YY_STRUCT_YY_BUFFER_STATE
202 struct yy_buffer_state
206 char *yy_ch_buf
; /* input buffer */
207 char *yy_buf_pos
; /* current position in input buffer */
209 /* Size of input buffer in bytes, not including room for EOB
212 yy_size_t yy_buf_size
;
214 /* Number of characters read into yy_ch_buf, not including EOB
219 /* Whether we "own" the buffer - i.e., we know we created it,
220 * and can realloc() it to grow it, and should free() it to
223 int yy_is_our_buffer
;
225 /* Whether this is an "interactive" input source; if so, and
226 * if we're using stdio for input, then we want to use getc()
227 * instead of fread(), to make sure we stop fetching input after
230 int yy_is_interactive
;
232 /* Whether we're considered to be at the beginning of a line.
233 * If so, '^' rules will be active on the next match, otherwise
238 int yy_bs_lineno
; /**< The line count. */
239 int yy_bs_column
; /**< The column count. */
241 /* Whether to try to fill the input buffer when we reach the
246 int yy_buffer_status
;
248 #define YY_BUFFER_NEW 0
249 #define YY_BUFFER_NORMAL 1
250 /* When an EOF's been seen but there's still some text to process
251 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
252 * shouldn't try reading from the input source any more. We might
253 * still have a bunch of tokens to match, though, because of
254 * possible backing-up.
256 * When we actually see the EOF, we change the status to "new"
257 * (via _mesa_glsl_restart()), so that the user can continue scanning by
258 * just pointing yyin at a new input file.
260 #define YY_BUFFER_EOF_PENDING 2
263 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
265 /* We provide macros for accessing buffer states in case in the
266 * future we want to put the buffer states in a more general
269 * Returns the top of the stack, or NULL.
271 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
272 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
275 /* Same as previous macro, but useful when we know that the buffer stack is not
276 * NULL or when we need an lvalue. For internal use only.
278 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
280 void _mesa_glsl_restart (FILE *input_file
,yyscan_t yyscanner
);
281 void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer
,yyscan_t yyscanner
);
282 YY_BUFFER_STATE
_mesa_glsl__create_buffer (FILE *file
,int size
,yyscan_t yyscanner
);
283 void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b
,yyscan_t yyscanner
);
284 void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b
,yyscan_t yyscanner
);
285 void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer
,yyscan_t yyscanner
);
286 void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner
);
288 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner
);
289 static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner
);
290 static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b
,FILE *file
,yyscan_t yyscanner
);
292 #define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
294 YY_BUFFER_STATE
_mesa_glsl__scan_buffer (char *base
,yy_size_t size
,yyscan_t yyscanner
);
295 YY_BUFFER_STATE
_mesa_glsl__scan_string (yyconst
char *yy_str
,yyscan_t yyscanner
);
296 YY_BUFFER_STATE
_mesa_glsl__scan_bytes (yyconst
char *bytes
,int len
,yyscan_t yyscanner
);
298 void *_mesa_glsl_alloc (yy_size_t
,yyscan_t yyscanner
);
299 void *_mesa_glsl_realloc (void *,yy_size_t
,yyscan_t yyscanner
);
300 void _mesa_glsl_free (void * ,yyscan_t yyscanner
);
302 #define yy_new_buffer _mesa_glsl__create_buffer
304 #define yy_set_interactive(is_interactive) \
306 if ( ! YY_CURRENT_BUFFER ){ \
307 _mesa_glsl_ensure_buffer_stack (yyscanner); \
308 YY_CURRENT_BUFFER_LVALUE = \
309 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
314 #define yy_set_bol(at_bol) \
316 if ( ! YY_CURRENT_BUFFER ){\
317 _mesa_glsl_ensure_buffer_stack (yyscanner); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
321 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
324 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
326 /* Begin user sect3 */
328 #define _mesa_glsl_wrap(n) 1
329 #define YY_SKIP_YYWRAP
331 typedef unsigned char YY_CHAR
;
333 typedef int yy_state_type
;
335 #define yytext_ptr yytext_r
337 static yy_state_type
yy_get_previous_state (yyscan_t yyscanner
);
338 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
,yyscan_t yyscanner
);
339 static int yy_get_next_buffer (yyscan_t yyscanner
);
340 static void yy_fatal_error (yyconst
char msg
[] ,yyscan_t yyscanner
);
342 /* Done after the current pattern has been matched and before the
343 * corresponding action - sets up yytext.
345 #define YY_DO_BEFORE_ACTION \
346 yyg->yytext_ptr = yy_bp; \
347 yyleng = (size_t) (yy_cp - yy_bp); \
348 yyg->yy_hold_char = *yy_cp; \
350 yyg->yy_c_buf_p = yy_cp;
352 #define YY_NUM_RULES 183
353 #define YY_END_OF_BUFFER 184
354 /* This struct is not used in this scanner,
355 but its presence is necessary. */
358 flex_int32_t yy_verify
;
361 static yyconst flex_int16_t yy_accept
[708] =
363 0, 0, 15, 15, 0, 0, 184, 182, 1, 20,
364 182, 182, 182, 182, 182, 182, 182, 182, 96, 94,
365 182, 182, 182, 181, 182, 181, 181, 181, 181, 181,
366 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
367 181, 181, 181, 181, 181, 182, 1, 182, 91, 183,
368 15, 19, 183, 18, 16, 17, 13, 12, 1, 80,
369 87, 81, 90, 84, 75, 86, 76, 93, 98, 85,
370 99, 96, 0, 0, 101, 0, 94, 0, 77, 79,
371 78, 0, 181, 83, 181, 181, 181, 181, 181, 181,
372 181, 181, 181, 181, 181, 181, 28, 181, 181, 181,
374 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
375 32, 181, 181, 56, 181, 181, 181, 181, 181, 181,
376 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
377 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
378 181, 181, 181, 181, 181, 92, 82, 1, 0, 0,
379 2, 0, 0, 0, 0, 15, 14, 18, 17, 0,
380 98, 97, 0, 99, 0, 100, 95, 88, 89, 181,
381 104, 181, 181, 181, 181, 181, 181, 181, 181, 181,
382 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
383 181, 181, 31, 181, 181, 181, 181, 181, 181, 181,
385 181, 181, 181, 25, 181, 181, 181, 181, 181, 181,
386 181, 181, 181, 181, 57, 181, 181, 181, 181, 181,
387 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
388 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
389 181, 181, 0, 0, 0, 0, 14, 0, 98, 0,
390 97, 0, 99, 100, 181, 181, 23, 181, 181, 144,
391 181, 181, 181, 181, 181, 181, 181, 181, 181, 30,
392 107, 181, 181, 181, 181, 63, 181, 181, 112, 126,
393 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
394 181, 123, 147, 44, 45, 46, 181, 181, 181, 181,
396 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
397 181, 181, 181, 181, 181, 181, 110, 102, 181, 181,
398 181, 181, 181, 181, 181, 41, 42, 43, 73, 181,
399 181, 0, 0, 0, 0, 0, 97, 181, 181, 26,
400 35, 36, 37, 181, 105, 181, 22, 181, 181, 181,
401 181, 134, 135, 136, 181, 103, 181, 127, 24, 137,
402 138, 139, 149, 131, 132, 133, 181, 181, 181, 58,
403 129, 181, 181, 38, 39, 40, 181, 181, 181, 181,
404 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
405 181, 181, 124, 181, 181, 181, 181, 181, 181, 181,
407 181, 181, 181, 106, 181, 146, 181, 181, 29, 0,
408 0, 0, 0, 153, 181, 181, 151, 181, 181, 181,
409 125, 120, 156, 181, 181, 181, 181, 181, 181, 115,
410 181, 181, 74, 47, 48, 49, 50, 51, 52, 53,
411 54, 55, 181, 181, 181, 181, 130, 111, 181, 181,
412 118, 34, 181, 181, 143, 64, 119, 72, 154, 113,
413 181, 181, 181, 181, 181, 181, 181, 0, 0, 0,
414 0, 181, 181, 181, 114, 33, 181, 181, 181, 181,
415 181, 181, 157, 158, 159, 181, 181, 181, 181, 148,
416 181, 181, 181, 181, 181, 181, 181, 181, 108, 181,
418 181, 181, 181, 181, 59, 181, 60, 181, 0, 0,
419 0, 0, 0, 181, 61, 27, 121, 161, 162, 163,
420 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
421 181, 116, 181, 181, 181, 181, 181, 181, 181, 181,
422 181, 109, 165, 166, 167, 181, 181, 128, 117, 0,
423 0, 6, 0, 0, 0, 11, 3, 21, 181, 181,
424 181, 181, 181, 181, 181, 181, 181, 160, 122, 62,
425 145, 181, 152, 150, 180, 66, 67, 68, 181, 181,
426 181, 181, 181, 181, 0, 0, 0, 0, 0, 0,
427 181, 181, 181, 164, 181, 181, 181, 181, 181, 181,
429 181, 181, 181, 181, 181, 181, 181, 181, 181, 168,
430 4, 0, 5, 0, 0, 0, 0, 0, 181, 181,
431 181, 181, 181, 181, 181, 177, 181, 181, 181, 181,
432 181, 181, 69, 181, 181, 181, 0, 0, 0, 181,
433 181, 178, 169, 181, 170, 181, 181, 181, 181, 181,
434 181, 181, 181, 181, 179, 0, 0, 171, 172, 175,
435 176, 65, 181, 140, 181, 141, 155, 173, 174, 0,
436 0, 181, 181, 181, 0, 0, 0, 70, 181, 71,
437 0, 0, 0, 181, 0, 0, 0, 181, 0, 0,
438 7, 0, 0, 181, 0, 8, 0, 0, 142, 0,
443 static yyconst flex_int32_t yy_ec
[256] =
445 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
446 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 2, 5, 1, 6, 1, 7, 8, 1, 9,
449 10, 11, 12, 1, 13, 14, 15, 16, 17, 18,
450 19, 20, 21, 21, 21, 22, 22, 23, 1, 24,
451 25, 26, 1, 1, 27, 28, 29, 30, 31, 32,
452 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
453 33, 34, 35, 33, 33, 33, 33, 36, 33, 33,
454 1, 1, 1, 37, 38, 1, 39, 40, 41, 42,
456 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
457 53, 54, 33, 55, 56, 57, 58, 59, 60, 61,
458 62, 63, 1, 64, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 static yyconst flex_int32_t yy_meta
[65] =
477 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 4, 4, 4, 4, 4,
479 4, 5, 1, 1, 1, 1, 6, 6, 6, 6,
480 5, 5, 7, 7, 7, 8, 1, 7, 6, 6,
481 6, 6, 5, 5, 7, 7, 7, 7, 7, 7,
482 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
486 static yyconst flex_int16_t yy_base
[719] =
488 0, 63, 88, 0, 1076, 1075, 1077, 1080, 64, 1080,
489 1051, 1050, 59, 1049, 58, 60, 58, 1048, 139, 187,
490 47, 1047, 56, 0, 1034, 121, 110, 137, 138, 134,
491 163, 1017, 173, 177, 115, 149, 140, 1011, 159, 121,
492 187, 194, 194, 172, 1022, 171, 249, 240, 1042, 1080,
493 250, 1080, 1051, 241, 1080, 0, 1080, 1080, 262, 1080,
494 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 236, 1080,
495 238, 187, 286, 303, 1080, 0, 0, 1040, 1080, 1080,
496 1080, 1039, 0, 1080, 1006, 1011, 1004, 1007, 1016, 1015,
497 1001, 1004, 1016, 35, 1010, 997, 994, 1008, 994, 991,
499 991, 997, 215, 232, 991, 1002, 987, 993, 997, 998,
500 0, 989, 1000, 234, 995, 975, 226, 979, 993, 983,
501 119, 976, 234, 989, 991, 973, 969, 977, 974, 963,
502 972, 256, 970, 976, 971, 974, 962, 965, 967, 245,
503 970, 961, 974, 227, 967, 1080, 1080, 308, 294, 324,
504 1080, 952, 965, 956, 967, 329, 0, 338, 0, 368,
505 1080, 303, 379, 1080, 386, 393, 0, 1080, 1080, 962,
506 0, 953, 957, 967, 964, 947, 946, 946, 950, 216,
507 961, 958, 958, 956, 953, 944, 951, 937, 935, 948,
508 933, 950, 0, 947, 934, 942, 939, 943, 944, 937,
510 934, 922, 921, 935, 938, 935, 922, 929, 919, 320,
511 925, 928, 918, 926, 914, 918, 909, 924, 914, 905,
512 924, 907, 905, 916, 905, 900, 898, 912, 897, 899,
513 896, 908, 907, 910, 288, 901, 895, 884, 331, 903,
514 905, 893, 885, 889, 901, 884, 0, 400, 410, 427,
515 1080, 439, 446, 1080, 879, 890, 0, 887, 343, 0,
516 880, 878, 880, 875, 884, 872, 890, 878, 346, 0,
517 0, 872, 883, 882, 882, 0, 866, 350, 0, 0,
518 868, 353, 876, 877, 867, 861, 860, 861, 860, 357,
519 856, 0, 0, 852, 851, 850, 852, 853, 858, 852,
521 848, 862, 857, 856, 855, 846, 849, 849, 841, 844,
522 839, 848, 853, 838, 851, 841, 0, 0, 848, 844,
523 835, 835, 841, 840, 837, 0, 0, 0, 0, 826,
524 839, 838, 837, 834, 822, 453, 463, 834, 836, 0,
525 0, 0, 0, 822, 0, 822, 0, 821, 822, 816,
526 827, 0, 0, 0, 817, 0, 813, 0, 0, 0,
527 0, 0, 0, 0, 0, 0, 824, 469, 823, 0,
528 0, 821, 817, 0, 0, 0, 806, 415, 432, 473,
529 811, 807, 813, 803, 801, 815, 799, 799, 813, 801,
530 813, 808, 0, 806, 803, 807, 790, 792, 799, 805,
532 800, 799, 786, 0, 788, 0, 787, 791, 0, 785,
533 834, 784, 787, 0, 775, 785, 0, 773, 773, 787,
534 0, 789, 0, 482, 797, 796, 795, 766, 765, 0,
535 783, 782, 0, 0, 0, 0, 0, 0, 0, 0,
536 0, 0, 766, 780, 766, 763, 0, 0, 769, 768,
537 0, 0, 766, 758, 0, 0, 0, 0, 0, 0,
538 755, 767, 485, 759, 766, 763, 757, 750, 503, 766,
539 751, 746, 760, 758, 0, 0, 750, 769, 768, 767,
540 738, 737, 301, 481, 0, 750, 753, 751, 739, 0,
541 749, 746, 745, 734, 733, 732, 509, 741, 0, 753,
543 752, 751, 722, 721, 0, 736, 0, 734, 729, 515,
544 527, 773, 722, 730, 0, 0, 0, 745, 744, 0,
545 726, 729, 713, 721, 711, 719, 720, 720, 719, 704,
546 717, 0, 718, 706, 705, 701, 725, 724, 723, 694,
547 693, 0, 723, 722, 0, 704, 707, 0, 0, 693,
548 537, 1080, 561, 0, 567, 340, 1080, 0, 690, 689,
549 699, 699, 686, 701, 684, 699, 694, 0, 0, 0,
550 0, 679, 0, 0, 0, 700, 389, 700, 689, 692,
551 676, 675, 685, 685, 675, 529, 589, 474, 683, 671,
552 669, 668, 679, 0, 682, 678, 680, 676, 662, 669,
554 669, 671, 667, 669, 667, 667, 654, 653, 664, 0,
555 1080, 531, 1080, 596, 0, 616, 666, 648, 665, 664,
556 647, 635, 643, 633, 634, 0, 627, 646, 635, 607,
557 604, 601, 0, 604, 603, 586, 533, 572, 580, 564,
558 563, 0, 0, 564, 0, 540, 554, 552, 516, 530,
559 505, 486, 453, 450, 0, 461, 443, 0, 0, 0,
560 0, 0, 400, 406, 385, 0, 0, 0, 0, 343,
561 389, 319, 267, 249, 487, 341, 235, 0, 200, 0,
562 507, 498, 184, 157, 150, 564, 559, 136, 565, 591,
563 1080, 593, 550, 112, 594, 1080, 569, 576, 0, 123,
565 619, 621, 637, 1080, 638, 1080, 1080, 648, 653, 658,
566 663, 665, 667, 673, 680, 685, 690, 695
569 static yyconst flex_int16_t yy_def
[719] =
571 707, 1, 707, 3, 708, 708, 707, 707, 707, 707,
572 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
573 707, 707, 707, 709, 707, 709, 709, 709, 709, 709,
574 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
575 709, 709, 709, 709, 709, 707, 707, 707, 707, 707,
576 707, 707, 707, 707, 707, 710, 707, 707, 707, 707,
577 707, 707, 707, 707, 707, 707, 707, 707, 711, 707,
578 712, 19, 707, 707, 707, 713, 20, 707, 707, 707,
579 707, 707, 709, 707, 709, 709, 709, 709, 709, 709,
580 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
582 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
583 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
584 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
585 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
586 709, 709, 709, 709, 709, 707, 707, 707, 707, 707,
587 707, 707, 707, 707, 707, 707, 714, 707, 710, 707,
588 707, 712, 707, 707, 707, 707, 713, 707, 707, 709,
589 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
590 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
591 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
593 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
594 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
595 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
596 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
597 709, 709, 707, 707, 707, 707, 714, 707, 707, 707,
598 707, 707, 707, 707, 709, 709, 709, 709, 709, 709,
599 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
600 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
601 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
602 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
604 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
605 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
606 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
607 709, 707, 707, 707, 707, 707, 707, 709, 709, 709,
608 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
609 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
610 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
611 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
612 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
613 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
615 709, 709, 709, 709, 709, 709, 709, 709, 709, 707,
616 707, 707, 707, 709, 709, 709, 709, 709, 709, 709,
617 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
618 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
619 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
620 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
621 709, 709, 709, 709, 709, 709, 709, 707, 707, 707,
622 707, 709, 709, 709, 709, 709, 709, 709, 709, 709,
623 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
624 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
626 709, 709, 709, 709, 709, 709, 709, 709, 707, 715,
627 707, 707, 707, 709, 709, 709, 709, 709, 709, 709,
628 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
629 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
630 709, 709, 709, 709, 709, 709, 709, 709, 709, 707,
631 707, 707, 707, 716, 707, 707, 707, 709, 709, 709,
632 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
633 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
634 709, 709, 709, 709, 707, 717, 707, 716, 707, 707,
635 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
637 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
638 707, 707, 707, 707, 718, 707, 707, 707, 709, 709,
639 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
640 709, 709, 709, 709, 709, 709, 718, 707, 707, 709,
641 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
642 709, 709, 709, 709, 709, 707, 707, 709, 709, 709,
643 709, 709, 709, 709, 709, 709, 709, 709, 709, 707,
644 707, 709, 709, 709, 707, 707, 707, 709, 709, 709,
645 707, 707, 707, 709, 707, 707, 707, 709, 707, 707,
646 707, 707, 707, 709, 707, 707, 707, 707, 709, 707,
648 707, 707, 707, 707, 707, 707, 0, 707, 707, 707,
649 707, 707, 707, 707, 707, 707, 707, 707
652 static yyconst flex_int16_t yy_nxt
[1145] =
654 8, 9, 10, 9, 11, 8, 12, 13, 8, 8,
655 14, 15, 16, 17, 18, 19, 20, 20, 20, 20,
656 20, 20, 8, 21, 22, 23, 24, 24, 24, 24,
657 24, 24, 24, 24, 24, 24, 25, 24, 26, 27,
658 28, 29, 30, 31, 32, 33, 34, 24, 24, 35,
659 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
660 24, 24, 24, 46, 47, 59, 62, 59, 48, 65,
661 78, 79, 67, 69, 69, 69, 69, 69, 69, 69,
662 81, 82, 66, 63, 68, 179, 180, 49, 50, 51,
663 52, 51, 50, 50, 50, 50, 50, 50, 50, 50,
665 50, 50, 53, 50, 54, 54, 54, 54, 54, 54,
666 55, 50, 50, 50, 56, 56, 56, 56, 56, 56,
667 56, 56, 56, 56, 50, 56, 56, 56, 56, 56,
668 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
669 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
670 56, 50, 71, 116, 72, 72, 72, 72, 72, 72,
671 73, 85, 88, 126, 89, 213, 702, 117, 90, 74,
672 75, 699, 214, 127, 76, 91, 86, 87, 120, 92,
673 95, 74, 75, 99, 96, 100, 93, 118, 694, 94,
674 97, 119, 121, 689, 101, 146, 98, 123, 688, 76,
676 71, 102, 77, 77, 77, 77, 77, 77, 77, 103,
677 142, 108, 104, 124, 143, 105, 125, 74, 75, 109,
678 111, 106, 707, 112, 144, 128, 687, 113, 114, 74,
679 75, 110, 129, 130, 147, 115, 135, 131, 684, 136,
680 139, 150, 151, 132, 133, 140, 134, 707, 137, 141,
681 148, 156, 59, 156, 149, 138, 158, 158, 158, 158,
682 158, 158, 158, 59, 189, 59, 160, 161, 163, 164,
683 191, 264, 265, 240, 216, 190, 241, 208, 160, 161,
684 163, 164, 152, 201, 192, 209, 202, 203, 217, 153,
685 204, 235, 205, 154, 226, 150, 151, 683, 155, 71,
687 236, 73, 73, 73, 73, 73, 73, 73, 680, 148,
688 227, 59, 679, 149, 165, 165, 74, 75, 166, 166,
689 166, 166, 166, 166, 166, 150, 151, 523, 74, 75,
690 156, 321, 156, 250, 251, 524, 152, 294, 295, 296,
691 322, 556, 681, 153, 675, 250, 251, 154, 326, 327,
692 328, 676, 155, 158, 158, 158, 158, 158, 158, 158,
693 341, 342, 343, 352, 353, 354, 152, 360, 361, 362,
694 364, 365, 366, 153, 374, 375, 376, 154, 678, 248,
695 248, 589, 155, 249, 249, 249, 249, 249, 249, 249,
696 252, 252, 590, 682, 253, 253, 253, 253, 253, 253,
698 253, 166, 166, 166, 166, 166, 166, 166, 166, 166,
699 166, 166, 166, 166, 166, 249, 249, 249, 249, 249,
700 249, 249, 602, 603, 254, 249, 249, 249, 249, 249,
701 249, 249, 434, 435, 436, 677, 254, 674, 336, 336,
702 673, 161, 337, 337, 337, 337, 337, 337, 337, 437,
703 438, 439, 672, 161, 253, 253, 253, 253, 253, 253,
704 253, 253, 253, 253, 253, 253, 253, 253, 337, 337,
705 337, 337, 337, 337, 337, 551, 552, 164, 337, 337,
706 337, 337, 337, 337, 337, 425, 426, 427, 675, 164,
707 440, 441, 442, 671, 251, 676, 428, 429, 478, 479,
709 480, 500, 501, 502, 469, 670, 251, 525, 681, 481,
710 482, 669, 503, 504, 668, 526, 551, 552, 510, 511,
711 511, 511, 511, 511, 511, 537, 538, 539, 551, 552,
712 612, 613, 612, 613, 612, 613, 540, 541, 551, 552,
713 667, 685, 555, 555, 555, 555, 555, 555, 555, 686,
714 554, 697, 586, 587, 587, 587, 587, 587, 587, 682,
715 692, 666, 551, 552, 615, 690, 695, 693, 551, 552,
716 697, 665, 664, 691, 696, 554, 553, 553, 553, 553,
717 553, 553, 555, 555, 555, 555, 555, 555, 555, 615,
718 612, 613, 690, 663, 692, 695, 662, 612, 613, 661,
720 691, 693, 698, 696, 616, 616, 616, 616, 616, 616,
721 616, 614, 614, 614, 614, 614, 614, 612, 613, 700,
722 703, 698, 705, 660, 659, 658, 657, 701, 704, 656,
723 706, 616, 616, 616, 616, 616, 616, 616, 703, 705,
724 655, 654, 653, 652, 651, 650, 704, 706, 57, 57,
725 57, 57, 57, 57, 57, 57, 83, 83, 83, 83,
726 83, 159, 159, 159, 159, 159, 69, 69, 162, 162,
727 167, 167, 167, 247, 247, 649, 247, 247, 247, 247,
728 247, 553, 553, 553, 648, 647, 646, 553, 588, 588,
729 588, 614, 614, 614, 645, 644, 643, 614, 637, 637,
731 637, 642, 641, 640, 639, 638, 636, 635, 634, 633,
732 632, 631, 630, 629, 628, 627, 626, 625, 624, 623,
733 622, 621, 620, 619, 618, 617, 611, 610, 609, 608,
734 607, 606, 605, 604, 601, 600, 599, 598, 597, 596,
735 595, 594, 593, 592, 591, 585, 584, 583, 582, 581,
736 580, 579, 578, 577, 576, 575, 574, 573, 572, 571,
737 570, 569, 568, 567, 566, 565, 564, 563, 562, 561,
738 560, 559, 558, 557, 556, 550, 549, 548, 547, 546,
739 545, 544, 543, 542, 536, 535, 534, 533, 532, 531,
740 530, 529, 528, 527, 522, 521, 520, 519, 518, 517,
742 516, 515, 514, 513, 512, 509, 508, 507, 506, 505,
743 499, 498, 497, 496, 495, 494, 493, 492, 491, 490,
744 489, 488, 487, 486, 485, 484, 483, 477, 476, 475,
745 474, 473, 472, 471, 470, 469, 468, 467, 466, 465,
746 464, 463, 462, 461, 460, 459, 458, 457, 456, 455,
747 454, 453, 452, 451, 450, 449, 448, 447, 446, 445,
748 444, 443, 433, 432, 431, 430, 424, 423, 422, 421,
749 420, 419, 418, 417, 416, 415, 414, 413, 412, 411,
750 410, 409, 408, 407, 406, 405, 404, 403, 402, 401,
751 400, 399, 398, 397, 396, 395, 394, 393, 392, 391,
753 390, 389, 388, 387, 386, 385, 384, 383, 382, 381,
754 380, 379, 378, 377, 373, 372, 371, 370, 369, 368,
755 367, 363, 359, 358, 357, 356, 355, 351, 350, 349,
756 348, 347, 346, 345, 344, 340, 339, 338, 335, 334,
757 333, 332, 331, 330, 329, 325, 324, 323, 320, 319,
758 318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
759 308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
760 298, 297, 293, 292, 291, 290, 289, 288, 287, 286,
761 285, 284, 283, 282, 281, 280, 279, 278, 277, 276,
762 275, 274, 273, 272, 271, 270, 269, 268, 267, 266,
764 263, 262, 261, 260, 259, 258, 257, 256, 255, 246,
765 245, 244, 243, 242, 239, 238, 237, 234, 233, 232,
766 231, 230, 229, 228, 225, 224, 223, 222, 221, 220,
767 219, 218, 215, 212, 211, 210, 207, 206, 200, 199,
768 198, 197, 196, 195, 194, 193, 188, 187, 186, 185,
769 184, 183, 182, 181, 178, 177, 176, 175, 174, 173,
770 172, 171, 170, 169, 168, 157, 80, 145, 122, 107,
771 84, 80, 70, 64, 61, 60, 707, 58, 58, 7,
772 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
773 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
775 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
776 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
777 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
778 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
782 static yyconst flex_int16_t yy_chk
[1145] =
784 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
785 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
786 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
787 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
788 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
789 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
790 1, 1, 1, 1, 2, 9, 13, 9, 2, 15,
791 21, 21, 16, 17, 17, 17, 17, 17, 17, 17,
792 23, 23, 15, 13, 16, 94, 94, 2, 3, 3,
793 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
795 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
796 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
797 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
798 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
799 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
800 3, 3, 19, 35, 19, 19, 19, 19, 19, 19,
801 19, 26, 27, 40, 27, 121, 700, 35, 27, 19,
802 19, 694, 121, 40, 19, 28, 26, 26, 37, 28,
803 29, 19, 19, 30, 29, 30, 28, 36, 688, 28,
804 29, 36, 37, 685, 30, 46, 29, 39, 684, 19,
806 20, 31, 20, 20, 20, 20, 20, 20, 20, 31,
807 44, 33, 31, 39, 44, 31, 39, 20, 20, 33,
808 34, 31, 72, 34, 44, 41, 683, 34, 34, 20,
809 20, 33, 41, 41, 46, 34, 42, 41, 679, 42,
810 43, 48, 48, 41, 41, 43, 41, 72, 42, 43,
811 47, 51, 47, 51, 47, 42, 54, 54, 54, 54,
812 54, 54, 54, 59, 103, 59, 69, 69, 71, 71,
813 104, 180, 180, 144, 123, 103, 144, 117, 69, 69,
814 71, 71, 48, 114, 104, 117, 114, 114, 123, 48,
815 114, 140, 114, 48, 132, 149, 149, 677, 48, 73,
817 140, 73, 73, 73, 73, 73, 73, 73, 674, 148,
818 132, 148, 673, 148, 74, 74, 73, 73, 74, 74,
819 74, 74, 74, 74, 74, 150, 150, 483, 73, 73,
820 156, 235, 156, 162, 162, 483, 149, 210, 210, 210,
821 235, 556, 676, 149, 670, 162, 162, 149, 239, 239,
822 239, 670, 149, 158, 158, 158, 158, 158, 158, 158,
823 259, 259, 259, 269, 269, 269, 150, 278, 278, 278,
824 282, 282, 282, 150, 290, 290, 290, 150, 672, 160,
825 160, 556, 150, 160, 160, 160, 160, 160, 160, 160,
826 163, 163, 556, 676, 163, 163, 163, 163, 163, 163,
828 163, 165, 165, 165, 165, 165, 165, 165, 166, 166,
829 166, 166, 166, 166, 166, 248, 248, 248, 248, 248,
830 248, 248, 577, 577, 166, 249, 249, 249, 249, 249,
831 249, 249, 378, 378, 378, 671, 166, 665, 250, 250,
832 664, 249, 250, 250, 250, 250, 250, 250, 250, 379,
833 379, 379, 663, 249, 252, 252, 252, 252, 252, 252,
834 252, 253, 253, 253, 253, 253, 253, 253, 336, 336,
835 336, 336, 336, 336, 336, 588, 588, 253, 337, 337,
836 337, 337, 337, 337, 337, 368, 368, 368, 675, 253,
837 380, 380, 380, 657, 337, 675, 368, 368, 424, 424,
839 424, 463, 463, 463, 469, 656, 337, 484, 681, 424,
840 424, 654, 463, 463, 653, 484, 510, 510, 469, 469,
841 469, 469, 469, 469, 469, 497, 497, 497, 511, 511,
842 586, 586, 612, 612, 637, 637, 497, 497, 551, 551,
843 652, 682, 511, 511, 511, 511, 511, 511, 511, 682,
844 510, 693, 551, 551, 551, 551, 551, 551, 551, 681,
845 687, 651, 553, 553, 586, 686, 689, 687, 555, 555,
846 697, 650, 649, 686, 689, 510, 553, 553, 553, 553,
847 553, 553, 555, 555, 555, 555, 555, 555, 555, 586,
848 587, 587, 690, 648, 692, 695, 647, 614, 614, 646,
850 690, 692, 693, 695, 587, 587, 587, 587, 587, 587,
851 587, 614, 614, 614, 614, 614, 614, 616, 616, 698,
852 701, 697, 702, 644, 641, 640, 639, 698, 701, 638,
853 702, 616, 616, 616, 616, 616, 616, 616, 703, 705,
854 636, 635, 634, 632, 631, 630, 703, 705, 708, 708,
855 708, 708, 708, 708, 708, 708, 709, 709, 709, 709,
856 709, 710, 710, 710, 710, 710, 711, 711, 712, 712,
857 713, 713, 713, 714, 714, 629, 714, 714, 714, 714,
858 714, 715, 715, 715, 628, 627, 625, 715, 716, 716,
859 716, 717, 717, 717, 624, 623, 622, 717, 718, 718,
861 718, 621, 620, 619, 618, 617, 609, 608, 607, 606,
862 605, 604, 603, 602, 601, 600, 599, 598, 597, 596,
863 595, 593, 592, 591, 590, 589, 585, 584, 583, 582,
864 581, 580, 579, 578, 576, 572, 567, 566, 565, 564,
865 563, 562, 561, 560, 559, 550, 547, 546, 544, 543,
866 541, 540, 539, 538, 537, 536, 535, 534, 533, 531,
867 530, 529, 528, 527, 526, 525, 524, 523, 522, 521,
868 519, 518, 514, 513, 512, 509, 508, 506, 504, 503,
869 502, 501, 500, 498, 496, 495, 494, 493, 492, 491,
870 489, 488, 487, 486, 482, 481, 480, 479, 478, 477,
872 474, 473, 472, 471, 470, 468, 467, 466, 465, 464,
873 462, 461, 454, 453, 450, 449, 446, 445, 444, 443,
874 432, 431, 429, 428, 427, 426, 425, 422, 420, 419,
875 418, 416, 415, 413, 412, 411, 410, 408, 407, 405,
876 403, 402, 401, 400, 399, 398, 397, 396, 395, 394,
877 392, 391, 390, 389, 388, 387, 386, 385, 384, 383,
878 382, 381, 377, 373, 372, 369, 367, 357, 355, 351,
879 350, 349, 348, 346, 344, 339, 338, 335, 334, 333,
880 332, 331, 330, 325, 324, 323, 322, 321, 320, 319,
881 316, 315, 314, 313, 312, 311, 310, 309, 308, 307,
883 306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
884 296, 295, 294, 291, 289, 288, 287, 286, 285, 284,
885 283, 281, 277, 275, 274, 273, 272, 268, 267, 266,
886 265, 264, 263, 262, 261, 258, 256, 255, 246, 245,
887 244, 243, 242, 241, 240, 238, 237, 236, 234, 233,
888 232, 231, 230, 229, 228, 227, 226, 225, 224, 223,
889 222, 221, 220, 219, 218, 217, 216, 215, 214, 213,
890 212, 211, 209, 208, 207, 206, 205, 204, 203, 202,
891 201, 200, 199, 198, 197, 196, 195, 194, 192, 191,
892 190, 189, 188, 187, 186, 185, 184, 183, 182, 181,
894 179, 178, 177, 176, 175, 174, 173, 172, 170, 155,
895 154, 153, 152, 145, 143, 142, 141, 139, 138, 137,
896 136, 135, 134, 133, 131, 130, 129, 128, 127, 126,
897 125, 124, 122, 120, 119, 118, 116, 115, 113, 112,
898 110, 109, 108, 107, 106, 105, 102, 101, 100, 99,
899 98, 97, 96, 95, 93, 92, 91, 90, 89, 88,
900 87, 86, 85, 82, 78, 53, 49, 45, 38, 32,
901 25, 22, 18, 14, 12, 11, 7, 6, 5, 707,
902 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
903 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
905 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
906 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
907 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
908 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
912 /* The intent behind this definition is that it'll catch
913 * any uses of REJECT which flex missed.
915 #define REJECT reject_used_but_not_detected
916 #define yymore() yymore_used_but_not_detected
917 #define YY_MORE_ADJ 0
918 #define YY_RESTORE_YY_MORE_OFFSET
919 #line 1 "glsl_lexer.lpp"
920 #line 2 "glsl_lexer.lpp"
922 * Copyright © 2008, 2009 Intel Corporation
924 * Permission is hereby granted, free of charge, to any person obtaining a
925 * copy of this software and associated documentation files (the "Software"),
926 * to deal in the Software without restriction, including without limitation
927 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
928 * and/or sell copies of the Software, and to permit persons to whom the
929 * Software is furnished to do so, subject to the following conditions:
931 * The above copyright notice and this permission notice (including the next
932 * paragraph) shall be included in all copies or substantial portions of the
935 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
936 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
937 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
938 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
939 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
940 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
941 * DEALINGS IN THE SOFTWARE.
945 #include "glsl_parser_extras.h"
946 #include "glsl_parser.h"
948 #define YY_USER_ACTION \
950 yylloc->source = 0; \
951 yylloc->first_column = yycolumn + 1; \
952 yylloc->first_line = yylineno + 1; \
953 yycolumn += yyleng; \
956 #define YY_USER_INIT yylineno = 0; yycolumn = 0;
958 #define TOKEN_OR_IDENTIFIER(version, token) \
960 if (yyextra->language_version >= version) { \
963 yylval->identifier = strdup(yytext); \
968 /* Handle reserved words in GLSL ES (version 100) */
969 #define TOKEN_OR_IDENTIFIER_ES(version, token) \
971 if (yyextra->es_shader) { \
974 TOKEN_OR_IDENTIFIER(version, token); \
978 #define RESERVED_WORD(version, token) \
980 if (yyextra->language_version >= version) { \
983 _mesa_glsl_error(yylloc, yyextra, \
984 "Illegal use of reserved word `%s'", yytext); \
989 #line 990 "glsl_lexer.cpp"
995 #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
997 /* Holds the entire state of the reentrant scanner. */
1001 /* User-defined. Not touched by flex. */
1002 YY_EXTRA_TYPE yyextra_r
;
1004 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1005 FILE *yyin_r
, *yyout_r
;
1006 size_t yy_buffer_stack_top
; /**< index of top of stack. */
1007 size_t yy_buffer_stack_max
; /**< capacity of stack. */
1008 YY_BUFFER_STATE
* yy_buffer_stack
; /**< Stack as an array. */
1015 int yy_did_buffer_switch_on_eof
;
1016 int yy_start_stack_ptr
;
1017 int yy_start_stack_depth
;
1018 int *yy_start_stack
;
1019 yy_state_type yy_last_accepting_state
;
1020 char* yy_last_accepting_cpos
;
1023 int yy_flex_debug_r
;
1033 }; /* end struct yyguts_t */
1035 static int yy_init_globals (yyscan_t yyscanner
);
1037 /* This must go here because YYSTYPE and YYLTYPE are included
1038 * from bison output in section 1.*/
1039 # define yylval yyg->yylval_r
1041 # define yylloc yyg->yylloc_r
1043 int _mesa_glsl_lex_init (yyscan_t
* scanner
);
1045 int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined
,yyscan_t
* scanner
);
1047 /* Accessor methods to globals.
1048 These are made visible to non-reentrant scanners for convenience. */
1050 int _mesa_glsl_lex_destroy (yyscan_t yyscanner
);
1052 int _mesa_glsl_get_debug (yyscan_t yyscanner
);
1054 void _mesa_glsl_set_debug (int debug_flag
,yyscan_t yyscanner
);
1056 YY_EXTRA_TYPE
_mesa_glsl_get_extra (yyscan_t yyscanner
);
1058 void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined
,yyscan_t yyscanner
);
1060 FILE *_mesa_glsl_get_in (yyscan_t yyscanner
);
1062 void _mesa_glsl_set_in (FILE * in_str
,yyscan_t yyscanner
);
1064 FILE *_mesa_glsl_get_out (yyscan_t yyscanner
);
1066 void _mesa_glsl_set_out (FILE * out_str
,yyscan_t yyscanner
);
1068 int _mesa_glsl_get_leng (yyscan_t yyscanner
);
1070 char *_mesa_glsl_get_text (yyscan_t yyscanner
);
1072 int _mesa_glsl_get_lineno (yyscan_t yyscanner
);
1074 void _mesa_glsl_set_lineno (int line_number
,yyscan_t yyscanner
);
1076 YYSTYPE
* _mesa_glsl_get_lval (yyscan_t yyscanner
);
1078 void _mesa_glsl_set_lval (YYSTYPE
* yylval_param
,yyscan_t yyscanner
);
1080 YYLTYPE
*_mesa_glsl_get_lloc (yyscan_t yyscanner
);
1082 void _mesa_glsl_set_lloc (YYLTYPE
* yylloc_param
,yyscan_t yyscanner
);
1084 /* Macros after this point can all be overridden by user definitions in
1088 #ifndef YY_SKIP_YYWRAP
1090 extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner
);
1092 extern int _mesa_glsl_wrap (yyscan_t yyscanner
);
1097 static void yy_flex_strncpy (char *,yyconst
char *,int ,yyscan_t yyscanner
);
1100 #ifdef YY_NEED_STRLEN
1101 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner
);
1107 static int yyinput (yyscan_t yyscanner
);
1109 static int input (yyscan_t yyscanner
);
1114 /* Amount of stuff to slurp up with each read. */
1115 #ifndef YY_READ_BUF_SIZE
1116 #define YY_READ_BUF_SIZE 8192
1119 /* Copy whatever the last rule matched to the standard output. */
1121 /* This used to be an fputs(), but since the string might contain NUL's,
1122 * we now use fwrite().
1124 #define ECHO fwrite( yytext, yyleng, 1, yyout )
1127 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1128 * is returned in "result".
1131 #define YY_INPUT(buf,result,max_size) \
1132 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1136 for ( n = 0; n < max_size && \
1137 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1138 buf[n] = (char) c; \
1140 buf[n++] = (char) c; \
1141 if ( c == EOF && ferror( yyin ) ) \
1142 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1148 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1150 if( errno != EINTR) \
1152 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1163 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1164 * we don't want an extra ';' after the "return" because that will cause
1165 * some compilers to complain about unreachable statements.
1168 #define yyterminate() return YY_NULL
1171 /* Number of entries by which start-condition stack grows. */
1172 #ifndef YY_START_STACK_INCR
1173 #define YY_START_STACK_INCR 25
1176 /* Report a fatal error. */
1177 #ifndef YY_FATAL_ERROR
1178 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1181 /* end tables serialization structures and prototypes */
1183 /* Default declaration of generated scanner - a define so the user can
1184 * easily add parameters.
1187 #define YY_DECL_IS_OURS 1
1189 extern int _mesa_glsl_lex \
1190 (YYSTYPE
* yylval_param
,YYLTYPE
* yylloc_param
,yyscan_t yyscanner
);
1192 #define YY_DECL int _mesa_glsl_lex \
1193 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1194 #endif /* !YY_DECL */
1196 /* Code executed at the beginning of each rule, after yytext and yyleng
1199 #ifndef YY_USER_ACTION
1200 #define YY_USER_ACTION
1203 /* Code executed at the end of each rule. */
1205 #define YY_BREAK break;
1208 #define YY_RULE_SETUP \
1210 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1211 (yytext[yyleng - 1] == '\n'); \
1214 /** The main scanner function which does all the work.
1218 register yy_state_type yy_current_state
;
1219 register char *yy_cp
, *yy_bp
;
1220 register int yy_act
;
1221 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1223 #line 86 "glsl_lexer.lpp"
1226 #line 1227 "glsl_lexer.cpp"
1228 yylval
= yylval_param
;
1230 yylloc
= yylloc_param
;
1232 if ( !yyg
->yy_init
)
1240 if ( ! yyg
->yy_start
)
1241 yyg
->yy_start
= 1; /* first start state */
1249 if ( ! YY_CURRENT_BUFFER
) {
1250 _mesa_glsl_ensure_buffer_stack (yyscanner
);
1251 YY_CURRENT_BUFFER_LVALUE
=
1252 _mesa_glsl__create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
1255 _mesa_glsl__load_buffer_state(yyscanner
);
1258 while ( 1 ) /* loops until end-of-file is reached */
1260 yy_cp
= yyg
->yy_c_buf_p
;
1262 /* Support of yytext. */
1263 *yy_cp
= yyg
->yy_hold_char
;
1265 /* yy_bp points to the position in yy_ch_buf of the start of
1270 yy_current_state
= yyg
->yy_start
;
1271 yy_current_state
+= YY_AT_BOL();
1275 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1276 if ( yy_accept
[yy_current_state
] )
1278 yyg
->yy_last_accepting_state
= yy_current_state
;
1279 yyg
->yy_last_accepting_cpos
= yy_cp
;
1281 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1283 yy_current_state
= (int) yy_def
[yy_current_state
];
1284 if ( yy_current_state
>= 708 )
1285 yy_c
= yy_meta
[(unsigned int) yy_c
];
1287 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1290 while ( yy_current_state
!= 707 );
1291 yy_cp
= yyg
->yy_last_accepting_cpos
;
1292 yy_current_state
= yyg
->yy_last_accepting_state
;
1295 yy_act
= yy_accept
[yy_current_state
];
1297 YY_DO_BEFORE_ACTION
;
1299 do_action
: /* This label is used only to access EOF actions. */
1302 { /* beginning of action switch */
1303 case 0: /* must back up */
1304 /* undo the effects of YY_DO_BEFORE_ACTION */
1305 *yy_cp
= yyg
->yy_hold_char
;
1306 yy_cp
= yyg
->yy_last_accepting_cpos
;
1307 yy_current_state
= yyg
->yy_last_accepting_state
;
1308 goto yy_find_action
;
1312 #line 88 "glsl_lexer.lpp"
1315 /* Preprocessor tokens. */
1317 *yy_cp
= yyg
->yy_hold_char
; /* undo effects of setting up yytext */
1318 yyg
->yy_c_buf_p
= yy_cp
-= 1;
1319 YY_DO_BEFORE_ACTION
; /* set up yytext again */
1321 #line 91 "glsl_lexer.lpp"
1326 #line 92 "glsl_lexer.lpp"
1327 { BEGIN PP
; return VERSION
; }
1331 #line 93 "glsl_lexer.lpp"
1332 { BEGIN PP
; return EXTENSION
; }
1335 *yy_cp
= yyg
->yy_hold_char
; /* undo effects of setting up yytext */
1336 yyg
->yy_c_buf_p
= yy_cp
-= 1;
1337 YY_DO_BEFORE_ACTION
; /* set up yytext again */
1339 #line 94 "glsl_lexer.lpp"
1341 /* Eat characters until the first digit is
1345 while (!isdigit(*ptr
))
1348 /* Subtract one from the line number because
1349 * yylineno is zero-based instead of
1352 yylineno
= strtol(ptr
, &ptr
, 0) - 1;
1353 yylloc
->source
= strtol(ptr
, NULL
, 0);
1357 *yy_cp
= yyg
->yy_hold_char
; /* undo effects of setting up yytext */
1358 yyg
->yy_c_buf_p
= yy_cp
-= 1;
1359 YY_DO_BEFORE_ACTION
; /* set up yytext again */
1361 #line 109 "glsl_lexer.lpp"
1363 /* Eat characters until the first digit is
1367 while (!isdigit(*ptr
))
1370 /* Subtract one from the line number because
1371 * yylineno is zero-based instead of
1374 yylineno
= strtol(ptr
, &ptr
, 0) - 1;
1379 #line 123 "glsl_lexer.lpp"
1382 return PRAGMA_DEBUG_ON
;
1387 #line 127 "glsl_lexer.lpp"
1390 return PRAGMA_DEBUG_OFF
;
1395 #line 131 "glsl_lexer.lpp"
1398 return PRAGMA_OPTIMIZE_ON
;
1403 #line 135 "glsl_lexer.lpp"
1406 return PRAGMA_OPTIMIZE_OFF
;
1411 #line 139 "glsl_lexer.lpp"
1415 /* rule 12 can match eol */
1417 #line 141 "glsl_lexer.lpp"
1418 { BEGIN
0; yylineno
++; yycolumn
= 0; }
1422 #line 142 "glsl_lexer.lpp"
1427 #line 144 "glsl_lexer.lpp"
1432 #line 145 "glsl_lexer.lpp"
1437 #line 146 "glsl_lexer.lpp"
1442 #line 147 "glsl_lexer.lpp"
1444 yylval
->identifier
= strdup(yytext
);
1450 #line 151 "glsl_lexer.lpp"
1452 yylval
->n
= strtol(yytext
, NULL
, 10);
1457 /* rule 19 can match eol */
1459 #line 155 "glsl_lexer.lpp"
1460 { BEGIN
0; yylineno
++; yycolumn
= 0; return EOL
; }
1463 /* rule 20 can match eol */
1465 #line 157 "glsl_lexer.lpp"
1466 { yylineno
++; yycolumn
= 0; }
1470 #line 159 "glsl_lexer.lpp"
1475 #line 160 "glsl_lexer.lpp"
1480 #line 161 "glsl_lexer.lpp"
1485 #line 162 "glsl_lexer.lpp"
1490 #line 163 "glsl_lexer.lpp"
1495 #line 165 "glsl_lexer.lpp"
1500 #line 166 "glsl_lexer.lpp"
1505 #line 167 "glsl_lexer.lpp"
1510 #line 168 "glsl_lexer.lpp"
1515 #line 169 "glsl_lexer.lpp"
1520 #line 170 "glsl_lexer.lpp"
1525 #line 171 "glsl_lexer.lpp"
1530 #line 172 "glsl_lexer.lpp"
1535 #line 173 "glsl_lexer.lpp"
1540 #line 175 "glsl_lexer.lpp"
1545 #line 176 "glsl_lexer.lpp"
1550 #line 177 "glsl_lexer.lpp"
1555 #line 178 "glsl_lexer.lpp"
1560 #line 179 "glsl_lexer.lpp"
1565 #line 180 "glsl_lexer.lpp"
1570 #line 181 "glsl_lexer.lpp"
1575 #line 182 "glsl_lexer.lpp"
1580 #line 183 "glsl_lexer.lpp"
1585 #line 184 "glsl_lexer.lpp"
1590 #line 185 "glsl_lexer.lpp"
1595 #line 186 "glsl_lexer.lpp"
1600 #line 187 "glsl_lexer.lpp"
1601 TOKEN_OR_IDENTIFIER(120, MAT2X2
);
1605 #line 188 "glsl_lexer.lpp"
1606 TOKEN_OR_IDENTIFIER(120, MAT2X3
);
1610 #line 189 "glsl_lexer.lpp"
1611 TOKEN_OR_IDENTIFIER(120, MAT2X4
);
1615 #line 190 "glsl_lexer.lpp"
1616 TOKEN_OR_IDENTIFIER(120, MAT3X2
);
1620 #line 191 "glsl_lexer.lpp"
1621 TOKEN_OR_IDENTIFIER(120, MAT3X3
);
1625 #line 192 "glsl_lexer.lpp"
1626 TOKEN_OR_IDENTIFIER(120, MAT3X4
);
1630 #line 193 "glsl_lexer.lpp"
1631 TOKEN_OR_IDENTIFIER(120, MAT4X2
);
1635 #line 194 "glsl_lexer.lpp"
1636 TOKEN_OR_IDENTIFIER(120, MAT4X3
);
1640 #line 195 "glsl_lexer.lpp"
1641 TOKEN_OR_IDENTIFIER(120, MAT4X4
);
1645 #line 197 "glsl_lexer.lpp"
1650 #line 198 "glsl_lexer.lpp"
1655 #line 199 "glsl_lexer.lpp"
1660 #line 200 "glsl_lexer.lpp"
1665 #line 201 "glsl_lexer.lpp"
1670 #line 202 "glsl_lexer.lpp"
1671 TOKEN_OR_IDENTIFIER(120, CENTROID
);
1675 #line 203 "glsl_lexer.lpp"
1676 TOKEN_OR_IDENTIFIER_ES(120, INVARIANT
);
1680 #line 205 "glsl_lexer.lpp"
1681 TOKEN_OR_IDENTIFIER_ES(130, FLAT
);
1685 #line 206 "glsl_lexer.lpp"
1686 TOKEN_OR_IDENTIFIER(130, SMOOTH
);
1690 #line 207 "glsl_lexer.lpp"
1691 TOKEN_OR_IDENTIFIER(130, NOPERSPECTIVE
);
1695 #line 209 "glsl_lexer.lpp"
1700 #line 210 "glsl_lexer.lpp"
1705 #line 211 "glsl_lexer.lpp"
1710 #line 212 "glsl_lexer.lpp"
1715 #line 213 "glsl_lexer.lpp"
1716 return SAMPLER1DSHADOW
;
1720 #line 214 "glsl_lexer.lpp"
1721 return SAMPLER2DSHADOW
;
1725 #line 216 "glsl_lexer.lpp"
1730 #line 217 "glsl_lexer.lpp"
1735 #line 219 "glsl_lexer.lpp"
1737 if ((yyextra
->language_version
>= 140)
1738 || (yyextra
->ARB_fragment_coord_conventions_enable
)){
1741 yylval
->identifier
= strdup(yytext
);
1748 #line 229 "glsl_lexer.lpp"
1753 #line 230 "glsl_lexer.lpp"
1758 #line 231 "glsl_lexer.lpp"
1763 #line 232 "glsl_lexer.lpp"
1768 #line 233 "glsl_lexer.lpp"
1773 #line 234 "glsl_lexer.lpp"
1778 #line 235 "glsl_lexer.lpp"
1783 #line 236 "glsl_lexer.lpp"
1788 #line 237 "glsl_lexer.lpp"
1793 #line 239 "glsl_lexer.lpp"
1798 #line 240 "glsl_lexer.lpp"
1803 #line 241 "glsl_lexer.lpp"
1808 #line 242 "glsl_lexer.lpp"
1813 #line 243 "glsl_lexer.lpp"
1818 #line 244 "glsl_lexer.lpp"
1819 return RIGHT_ASSIGN
;
1823 #line 245 "glsl_lexer.lpp"
1828 #line 246 "glsl_lexer.lpp"
1833 #line 247 "glsl_lexer.lpp"
1838 #line 248 "glsl_lexer.lpp"
1843 #line 250 "glsl_lexer.lpp"
1845 yylval
->n
= strtol(yytext
, NULL
, 10);
1851 #line 254 "glsl_lexer.lpp"
1853 yylval
->n
= strtol(yytext
+ 2, NULL
, 16);
1859 #line 258 "glsl_lexer.lpp"
1861 yylval
->n
= strtol(yytext
, NULL
, 8);
1867 #line 263 "glsl_lexer.lpp"
1869 yylval
->real
= strtod(yytext
, NULL
);
1870 return FLOATCONSTANT
;
1875 #line 267 "glsl_lexer.lpp"
1877 yylval
->real
= strtod(yytext
, NULL
);
1878 return FLOATCONSTANT
;
1883 #line 271 "glsl_lexer.lpp"
1885 yylval
->real
= strtod(yytext
, NULL
);
1886 return FLOATCONSTANT
;
1891 #line 275 "glsl_lexer.lpp"
1893 yylval
->real
= strtod(yytext
, NULL
);
1894 return FLOATCONSTANT
;
1899 #line 279 "glsl_lexer.lpp"
1901 yylval
->real
= strtod(yytext
, NULL
);
1902 return FLOATCONSTANT
;
1907 #line 284 "glsl_lexer.lpp"
1910 return BOOLCONSTANT
;
1915 #line 288 "glsl_lexer.lpp"
1918 return BOOLCONSTANT
;
1921 /* Reserved words in GLSL 1.10. */
1924 #line 295 "glsl_lexer.lpp"
1925 RESERVED_WORD(999, ASM
);
1929 #line 296 "glsl_lexer.lpp"
1930 RESERVED_WORD(999, CLASS
);
1934 #line 297 "glsl_lexer.lpp"
1935 RESERVED_WORD(999, UNION
);
1939 #line 298 "glsl_lexer.lpp"
1940 RESERVED_WORD(999, ENUM
);
1944 #line 299 "glsl_lexer.lpp"
1945 RESERVED_WORD(999, TYPEDEF
);
1949 #line 300 "glsl_lexer.lpp"
1950 RESERVED_WORD(999, TEMPLATE
);
1954 #line 301 "glsl_lexer.lpp"
1955 RESERVED_WORD(999, THIS
);
1959 #line 302 "glsl_lexer.lpp"
1960 RESERVED_WORD(999, PACKED_TOK
);
1964 #line 303 "glsl_lexer.lpp"
1965 RESERVED_WORD(999, GOTO
);
1969 #line 304 "glsl_lexer.lpp"
1970 RESERVED_WORD(130, SWITCH
);
1974 #line 305 "glsl_lexer.lpp"
1975 RESERVED_WORD(130, DEFAULT
);
1979 #line 306 "glsl_lexer.lpp"
1980 RESERVED_WORD(999, INLINE_TOK
);
1984 #line 307 "glsl_lexer.lpp"
1985 RESERVED_WORD(999, NOINLINE
);
1989 #line 308 "glsl_lexer.lpp"
1990 RESERVED_WORD(999, VOLATILE
);
1994 #line 309 "glsl_lexer.lpp"
1995 RESERVED_WORD(999, PUBLIC_TOK
);
1999 #line 310 "glsl_lexer.lpp"
2000 RESERVED_WORD(999, STATIC
);
2004 #line 311 "glsl_lexer.lpp"
2005 RESERVED_WORD(999, EXTERN
);
2009 #line 312 "glsl_lexer.lpp"
2010 RESERVED_WORD(999, EXTERNAL
);
2014 #line 313 "glsl_lexer.lpp"
2015 RESERVED_WORD(999, INTERFACE
);
2019 #line 314 "glsl_lexer.lpp"
2020 RESERVED_WORD(999, LONG_TOK
);
2024 #line 315 "glsl_lexer.lpp"
2025 RESERVED_WORD(999, SHORT_TOK
);
2029 #line 316 "glsl_lexer.lpp"
2030 RESERVED_WORD(999, DOUBLE_TOK
);
2034 #line 317 "glsl_lexer.lpp"
2035 RESERVED_WORD(999, HALF
);
2039 #line 318 "glsl_lexer.lpp"
2040 RESERVED_WORD(999, FIXED_TOK
);
2044 #line 319 "glsl_lexer.lpp"
2045 RESERVED_WORD(999, UNSIGNED
);
2049 #line 320 "glsl_lexer.lpp"
2050 RESERVED_WORD(999, INPUT_TOK
);
2054 #line 321 "glsl_lexer.lpp"
2055 RESERVED_WORD(999, OUTPUT
);
2059 #line 322 "glsl_lexer.lpp"
2060 RESERVED_WORD(999, HVEC2
);
2064 #line 323 "glsl_lexer.lpp"
2065 RESERVED_WORD(999, HVEC3
);
2069 #line 324 "glsl_lexer.lpp"
2070 RESERVED_WORD(999, HVEC4
);
2074 #line 325 "glsl_lexer.lpp"
2075 RESERVED_WORD(999, DVEC2
);
2079 #line 326 "glsl_lexer.lpp"
2080 RESERVED_WORD(999, DVEC3
);
2084 #line 327 "glsl_lexer.lpp"
2085 RESERVED_WORD(999, DVEC4
);
2089 #line 328 "glsl_lexer.lpp"
2090 RESERVED_WORD(999, FVEC2
);
2094 #line 329 "glsl_lexer.lpp"
2095 RESERVED_WORD(999, FVEC3
);
2099 #line 330 "glsl_lexer.lpp"
2100 RESERVED_WORD(999, FVEC4
);
2104 #line 331 "glsl_lexer.lpp"
2105 return SAMPLER2DRECT
;
2109 #line 332 "glsl_lexer.lpp"
2110 RESERVED_WORD(999, SAMPLER3DRECT
);
2114 #line 333 "glsl_lexer.lpp"
2115 return SAMPLER2DRECTSHADOW
;
2119 #line 334 "glsl_lexer.lpp"
2120 RESERVED_WORD(999, SIZEOF
);
2124 #line 335 "glsl_lexer.lpp"
2125 RESERVED_WORD(999, CAST
);
2129 #line 336 "glsl_lexer.lpp"
2130 RESERVED_WORD(999, NAMESPACE
);
2134 #line 337 "glsl_lexer.lpp"
2135 RESERVED_WORD(999, USING
);
2137 /* Additional reserved words in GLSL 1.20. */
2140 #line 340 "glsl_lexer.lpp"
2141 TOKEN_OR_IDENTIFIER_ES(120, LOWP
);
2145 #line 341 "glsl_lexer.lpp"
2146 TOKEN_OR_IDENTIFIER_ES(120, MEDIUMP
);
2150 #line 342 "glsl_lexer.lpp"
2151 TOKEN_OR_IDENTIFIER_ES(120, HIGHP
);
2155 #line 343 "glsl_lexer.lpp"
2156 TOKEN_OR_IDENTIFIER_ES(120, PRECISION
);
2158 /* Additional reserved words in GLSL 1.30. */
2161 #line 346 "glsl_lexer.lpp"
2162 TOKEN_OR_IDENTIFIER(130, COMMON
);
2166 #line 347 "glsl_lexer.lpp"
2167 TOKEN_OR_IDENTIFIER(130, PARTITION
);
2171 #line 348 "glsl_lexer.lpp"
2172 TOKEN_OR_IDENTIFIER(130, ACTIVE
);
2176 #line 349 "glsl_lexer.lpp"
2177 TOKEN_OR_IDENTIFIER_ES(130, SUPERP
);
2181 #line 350 "glsl_lexer.lpp"
2182 TOKEN_OR_IDENTIFIER(130, SAMPLERBUFFER
);
2186 #line 351 "glsl_lexer.lpp"
2187 TOKEN_OR_IDENTIFIER(130, FILTER
);
2191 #line 352 "glsl_lexer.lpp"
2192 TOKEN_OR_IDENTIFIER(130, IMAGE1D
);
2196 #line 353 "glsl_lexer.lpp"
2197 TOKEN_OR_IDENTIFIER(130, IMAGE2D
);
2201 #line 354 "glsl_lexer.lpp"
2202 TOKEN_OR_IDENTIFIER(130, IMAGE3D
);
2206 #line 355 "glsl_lexer.lpp"
2207 TOKEN_OR_IDENTIFIER(130, IMAGECUBE
);
2211 #line 356 "glsl_lexer.lpp"
2212 TOKEN_OR_IDENTIFIER(130, IIMAGE1D
);
2216 #line 357 "glsl_lexer.lpp"
2217 TOKEN_OR_IDENTIFIER(130, IIMAGE2D
);
2221 #line 358 "glsl_lexer.lpp"
2222 TOKEN_OR_IDENTIFIER(130, IIMAGE3D
);
2226 #line 359 "glsl_lexer.lpp"
2227 TOKEN_OR_IDENTIFIER(130, IIMAGECUBE
);
2231 #line 360 "glsl_lexer.lpp"
2232 TOKEN_OR_IDENTIFIER(130, UIMAGE1D
);
2236 #line 361 "glsl_lexer.lpp"
2237 TOKEN_OR_IDENTIFIER(130, UIMAGE2D
);
2241 #line 362 "glsl_lexer.lpp"
2242 TOKEN_OR_IDENTIFIER(130, UIMAGE3D
);
2246 #line 363 "glsl_lexer.lpp"
2247 TOKEN_OR_IDENTIFIER(130, UIMAGECUBE
);
2251 #line 364 "glsl_lexer.lpp"
2252 TOKEN_OR_IDENTIFIER(130, IMAGE1DARRAY
);
2256 #line 365 "glsl_lexer.lpp"
2257 TOKEN_OR_IDENTIFIER(130, IMAGE2DARRAY
);
2261 #line 366 "glsl_lexer.lpp"
2262 TOKEN_OR_IDENTIFIER(130, IIMAGE1DARRAY
);
2266 #line 367 "glsl_lexer.lpp"
2267 TOKEN_OR_IDENTIFIER(130, IIMAGE2DARRAY
);
2271 #line 368 "glsl_lexer.lpp"
2272 TOKEN_OR_IDENTIFIER(130, UIMAGE1DARRAY
);
2276 #line 369 "glsl_lexer.lpp"
2277 TOKEN_OR_IDENTIFIER(130, UIMAGE2DARRAY
);
2281 #line 370 "glsl_lexer.lpp"
2282 TOKEN_OR_IDENTIFIER(130, IMAGE1DSHADOW
);
2286 #line 371 "glsl_lexer.lpp"
2287 TOKEN_OR_IDENTIFIER(130, IMAGE2DSHADOW
);
2291 #line 372 "glsl_lexer.lpp"
2292 TOKEN_OR_IDENTIFIER(130, IMAGEBUFFER
);
2296 #line 373 "glsl_lexer.lpp"
2297 TOKEN_OR_IDENTIFIER(130, IIMAGEBUFFER
);
2301 #line 374 "glsl_lexer.lpp"
2302 TOKEN_OR_IDENTIFIER(130, UIMAGEBUFFER
);
2306 #line 375 "glsl_lexer.lpp"
2307 TOKEN_OR_IDENTIFIER(130, ROW_MAJOR
);
2311 #line 377 "glsl_lexer.lpp"
2313 struct _mesa_glsl_parse_state
*state
= yyextra
;
2315 yylval
->identifier
= talloc_strdup(ctx
, yytext
);
2321 #line 384 "glsl_lexer.lpp"
2322 { return yytext
[0]; }
2326 #line 386 "glsl_lexer.lpp"
2329 #line 2330 "glsl_lexer.cpp"
2330 case YY_STATE_EOF(INITIAL
):
2331 case YY_STATE_EOF(PP
):
2332 case YY_STATE_EOF(PRAGMA
):
2335 case YY_END_OF_BUFFER
:
2337 /* Amount of text matched not including the EOB char. */
2338 int yy_amount_of_matched_text
= (int) (yy_cp
- yyg
->yytext_ptr
) - 1;
2340 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2341 *yy_cp
= yyg
->yy_hold_char
;
2342 YY_RESTORE_YY_MORE_OFFSET
2344 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2346 /* We're scanning a new file or input source. It's
2347 * possible that this happened because the user
2348 * just pointed yyin at a new source and called
2349 * _mesa_glsl_lex(). If so, then we have to assure
2350 * consistency between YY_CURRENT_BUFFER and our
2351 * globals. Here is the right place to do so, because
2352 * this is the first action (other than possibly a
2353 * back-up) that will match for the new input source.
2355 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2356 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
2357 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2360 /* Note that here we test for yy_c_buf_p "<=" to the position
2361 * of the first EOB in the buffer, since yy_c_buf_p will
2362 * already have been incremented past the NUL character
2363 * (since all states make transitions on EOB to the
2364 * end-of-buffer state). Contrast this with the test
2367 if ( yyg
->yy_c_buf_p
<= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
2368 { /* This was really a NUL. */
2369 yy_state_type yy_next_state
;
2371 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
2373 yy_current_state
= yy_get_previous_state( yyscanner
);
2375 /* Okay, we're now positioned to make the NUL
2376 * transition. We couldn't have
2377 * yy_get_previous_state() go ahead and do it
2378 * for us because it doesn't know how to deal
2379 * with the possibility of jamming (and we don't
2380 * want to build jamming into it because then it
2381 * will run more slowly).
2384 yy_next_state
= yy_try_NUL_trans( yy_current_state
, yyscanner
);
2386 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2388 if ( yy_next_state
)
2390 /* Consume the NUL. */
2391 yy_cp
= ++yyg
->yy_c_buf_p
;
2392 yy_current_state
= yy_next_state
;
2398 yy_cp
= yyg
->yy_last_accepting_cpos
;
2399 yy_current_state
= yyg
->yy_last_accepting_state
;
2400 goto yy_find_action
;
2404 else switch ( yy_get_next_buffer( yyscanner
) )
2406 case EOB_ACT_END_OF_FILE
:
2408 yyg
->yy_did_buffer_switch_on_eof
= 0;
2410 if ( _mesa_glsl_wrap(yyscanner
) )
2412 /* Note: because we've taken care in
2413 * yy_get_next_buffer() to have set up
2414 * yytext, we can now set up
2415 * yy_c_buf_p so that if some total
2416 * hoser (like flex itself) wants to
2417 * call the scanner after we return the
2418 * YY_NULL, it'll still work - another
2419 * YY_NULL will get returned.
2421 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2423 yy_act
= YY_STATE_EOF(YY_START
);
2429 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
2435 case EOB_ACT_CONTINUE_SCAN
:
2437 yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
2439 yy_current_state
= yy_get_previous_state( yyscanner
);
2441 yy_cp
= yyg
->yy_c_buf_p
;
2442 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2445 case EOB_ACT_LAST_MATCH
:
2447 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
];
2449 yy_current_state
= yy_get_previous_state( yyscanner
);
2451 yy_cp
= yyg
->yy_c_buf_p
;
2452 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2453 goto yy_find_action
;
2460 "fatal flex scanner internal error--no action found" );
2461 } /* end of action switch */
2462 } /* end of scanning one token */
2463 } /* end of _mesa_glsl_lex */
2465 /* yy_get_next_buffer - try to read in a new buffer
2467 * Returns a code representing an action:
2468 * EOB_ACT_LAST_MATCH -
2469 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2470 * EOB_ACT_END_OF_FILE - end of file
2472 static int yy_get_next_buffer (yyscan_t yyscanner
)
2474 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2475 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2476 register char *source
= yyg
->yytext_ptr
;
2477 register int number_to_move
, i
;
2480 if ( yyg
->yy_c_buf_p
> &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] )
2482 "fatal flex scanner internal error--end of buffer missed" );
2484 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
2485 { /* Don't try to fill the buffer, so this is an EOF. */
2486 if ( yyg
->yy_c_buf_p
- yyg
->yytext_ptr
- YY_MORE_ADJ
== 1 )
2488 /* We matched a single character, the EOB, so
2489 * treat this as a final EOF.
2491 return EOB_ACT_END_OF_FILE
;
2496 /* We matched some text prior to the EOB, first
2499 return EOB_ACT_LAST_MATCH
;
2503 /* Try to read more data. */
2505 /* First move last chars to start of buffer. */
2506 number_to_move
= (int) (yyg
->yy_c_buf_p
- yyg
->yytext_ptr
) - 1;
2508 for ( i
= 0; i
< number_to_move
; ++i
)
2509 *(dest
++) = *(source
++);
2511 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
2512 /* don't do the read, it's not guaranteed to return an EOF,
2515 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
= 0;
2520 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
2522 while ( num_to_read
<= 0 )
2523 { /* Not enough room in the buffer - grow it. */
2525 /* just a shorter name for the current buffer */
2526 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2528 int yy_c_buf_p_offset
=
2529 (int) (yyg
->yy_c_buf_p
- b
->yy_ch_buf
);
2531 if ( b
->yy_is_our_buffer
)
2533 int new_size
= b
->yy_buf_size
* 2;
2535 if ( new_size
<= 0 )
2536 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2538 b
->yy_buf_size
*= 2;
2540 b
->yy_ch_buf
= (char *)
2541 /* Include room in for 2 EOB chars. */
2542 _mesa_glsl_realloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 ,yyscanner
);
2545 /* Can't grow it, we don't own it. */
2548 if ( ! b
->yy_ch_buf
)
2550 "fatal error - scanner input buffer overflow" );
2552 yyg
->yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2554 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2559 if ( num_to_read
> YY_READ_BUF_SIZE
)
2560 num_to_read
= YY_READ_BUF_SIZE
;
2562 /* Read in more data. */
2563 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2564 yyg
->yy_n_chars
, (size_t) num_to_read
);
2566 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
2569 if ( yyg
->yy_n_chars
== 0 )
2571 if ( number_to_move
== YY_MORE_ADJ
)
2573 ret_val
= EOB_ACT_END_OF_FILE
;
2574 _mesa_glsl_restart(yyin
,yyscanner
);
2579 ret_val
= EOB_ACT_LAST_MATCH
;
2580 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2581 YY_BUFFER_EOF_PENDING
;
2586 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2588 if ((yy_size_t
) (yyg
->yy_n_chars
+ number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
2589 /* Extend the array by 50%, plus the number we really need. */
2590 yy_size_t new_size
= yyg
->yy_n_chars
+ number_to_move
+ (yyg
->yy_n_chars
>> 1);
2591 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) _mesa_glsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
,yyscanner
);
2592 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2593 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2596 yyg
->yy_n_chars
+= number_to_move
;
2597 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
2598 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
2600 yyg
->yytext_ptr
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2605 /* yy_get_previous_state - get the state just before the EOB char was reached */
2607 static yy_state_type
yy_get_previous_state (yyscan_t yyscanner
)
2609 register yy_state_type yy_current_state
;
2610 register char *yy_cp
;
2611 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2613 yy_current_state
= yyg
->yy_start
;
2614 yy_current_state
+= YY_AT_BOL();
2616 for ( yy_cp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yyg
->yy_c_buf_p
; ++yy_cp
)
2618 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2619 if ( yy_accept
[yy_current_state
] )
2621 yyg
->yy_last_accepting_state
= yy_current_state
;
2622 yyg
->yy_last_accepting_cpos
= yy_cp
;
2624 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2626 yy_current_state
= (int) yy_def
[yy_current_state
];
2627 if ( yy_current_state
>= 708 )
2628 yy_c
= yy_meta
[(unsigned int) yy_c
];
2630 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2633 return yy_current_state
;
2636 /* yy_try_NUL_trans - try to make a transition on the NUL character
2639 * next_state = yy_try_NUL_trans( current_state );
2641 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
, yyscan_t yyscanner
)
2643 register int yy_is_jam
;
2644 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
; /* This var may be unused depending upon options. */
2645 register char *yy_cp
= yyg
->yy_c_buf_p
;
2647 register YY_CHAR yy_c
= 1;
2648 if ( yy_accept
[yy_current_state
] )
2650 yyg
->yy_last_accepting_state
= yy_current_state
;
2651 yyg
->yy_last_accepting_cpos
= yy_cp
;
2653 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2655 yy_current_state
= (int) yy_def
[yy_current_state
];
2656 if ( yy_current_state
>= 708 )
2657 yy_c
= yy_meta
[(unsigned int) yy_c
];
2659 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2660 yy_is_jam
= (yy_current_state
== 707);
2662 return yy_is_jam
? 0 : yy_current_state
;
2667 static int yyinput (yyscan_t yyscanner
)
2669 static int input (yyscan_t yyscanner
)
2674 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2676 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
2678 if ( *yyg
->yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
2680 /* yy_c_buf_p now points to the character we want to return.
2681 * If this occurs *before* the EOB characters, then it's a
2682 * valid NUL; if not, then we've hit the end of the buffer.
2684 if ( yyg
->yy_c_buf_p
< &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
2685 /* This was really a NUL. */
2686 *yyg
->yy_c_buf_p
= '\0';
2689 { /* need more input */
2690 int offset
= yyg
->yy_c_buf_p
- yyg
->yytext_ptr
;
2693 switch ( yy_get_next_buffer( yyscanner
) )
2695 case EOB_ACT_LAST_MATCH
:
2696 /* This happens because yy_g_n_b()
2697 * sees that we've accumulated a
2698 * token and flags that we need to
2699 * try matching the token before
2700 * proceeding. But for input(),
2701 * there's no matching to consider.
2702 * So convert the EOB_ACT_LAST_MATCH
2703 * to EOB_ACT_END_OF_FILE.
2706 /* Reset buffer status. */
2707 _mesa_glsl_restart(yyin
,yyscanner
);
2711 case EOB_ACT_END_OF_FILE
:
2713 if ( _mesa_glsl_wrap(yyscanner
) )
2716 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
2719 return yyinput(yyscanner
);
2721 return input(yyscanner
);
2725 case EOB_ACT_CONTINUE_SCAN
:
2726 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ offset
;
2732 c
= *(unsigned char *) yyg
->yy_c_buf_p
; /* cast for 8-bit char's */
2733 *yyg
->yy_c_buf_p
= '\0'; /* preserve yytext */
2734 yyg
->yy_hold_char
= *++yyg
->yy_c_buf_p
;
2736 YY_CURRENT_BUFFER_LVALUE
->yy_at_bol
= (c
== '\n');
2740 #endif /* ifndef YY_NO_INPUT */
2742 /** Immediately switch to a different input stream.
2743 * @param input_file A readable stream.
2744 * @param yyscanner The scanner object.
2745 * @note This function does not reset the start condition to @c INITIAL .
2747 void _mesa_glsl_restart (FILE * input_file
, yyscan_t yyscanner
)
2749 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2751 if ( ! YY_CURRENT_BUFFER
){
2752 _mesa_glsl_ensure_buffer_stack (yyscanner
);
2753 YY_CURRENT_BUFFER_LVALUE
=
2754 _mesa_glsl__create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
2757 _mesa_glsl__init_buffer(YY_CURRENT_BUFFER
,input_file
,yyscanner
);
2758 _mesa_glsl__load_buffer_state(yyscanner
);
2761 /** Switch to a different input buffer.
2762 * @param new_buffer The new input buffer.
2763 * @param yyscanner The scanner object.
2765 void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
2767 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2769 /* TODO. We should be able to replace this entire function body
2771 * _mesa_glsl_pop_buffer_state();
2772 * _mesa_glsl_push_buffer_state(new_buffer);
2774 _mesa_glsl_ensure_buffer_stack (yyscanner
);
2775 if ( YY_CURRENT_BUFFER
== new_buffer
)
2778 if ( YY_CURRENT_BUFFER
)
2780 /* Flush out information for old buffer. */
2781 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
2782 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
2783 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
2786 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2787 _mesa_glsl__load_buffer_state(yyscanner
);
2789 /* We don't actually know whether we did this switch during
2790 * EOF (_mesa_glsl_wrap()) processing, but the only time this flag
2791 * is looked at is after _mesa_glsl_wrap() is called, so it's safe
2792 * to go ahead and always set it.
2794 yyg
->yy_did_buffer_switch_on_eof
= 1;
2797 static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner
)
2799 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2800 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2801 yyg
->yytext_ptr
= yyg
->yy_c_buf_p
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2802 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2803 yyg
->yy_hold_char
= *yyg
->yy_c_buf_p
;
2806 /** Allocate and initialize an input buffer state.
2807 * @param file A readable stream.
2808 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2809 * @param yyscanner The scanner object.
2810 * @return the allocated buffer state.
2812 YY_BUFFER_STATE
_mesa_glsl__create_buffer (FILE * file
, int size
, yyscan_t yyscanner
)
2816 b
= (YY_BUFFER_STATE
) _mesa_glsl_alloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
2818 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
2820 b
->yy_buf_size
= size
;
2822 /* yy_ch_buf has to be 2 characters longer than the size given because
2823 * we need to put in 2 end-of-buffer characters.
2825 b
->yy_ch_buf
= (char *) _mesa_glsl_alloc(b
->yy_buf_size
+ 2 ,yyscanner
);
2826 if ( ! b
->yy_ch_buf
)
2827 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
2829 b
->yy_is_our_buffer
= 1;
2831 _mesa_glsl__init_buffer(b
,file
,yyscanner
);
2836 /** Destroy the buffer.
2837 * @param b a buffer created with _mesa_glsl__create_buffer()
2838 * @param yyscanner The scanner object.
2840 void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
2842 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2847 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2848 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2850 if ( b
->yy_is_our_buffer
)
2851 _mesa_glsl_free((void *) b
->yy_ch_buf
,yyscanner
);
2853 _mesa_glsl_free((void *) b
,yyscanner
);
2856 /* Initializes or reinitializes a buffer.
2857 * This function is sometimes called more than once on the same buffer,
2858 * such as during a _mesa_glsl_restart() or at EOF.
2860 static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b
, FILE * file
, yyscan_t yyscanner
)
2864 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2866 _mesa_glsl__flush_buffer(b
,yyscanner
);
2868 b
->yy_input_file
= file
;
2869 b
->yy_fill_buffer
= 1;
2871 /* If b is the current buffer, then _mesa_glsl__init_buffer was _probably_
2872 * called from _mesa_glsl_restart() or through yy_get_next_buffer.
2873 * In that case, we don't want to reset the lineno or column.
2875 if (b
!= YY_CURRENT_BUFFER
){
2876 b
->yy_bs_lineno
= 1;
2877 b
->yy_bs_column
= 0;
2880 b
->yy_is_interactive
= 0;
2885 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2886 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2887 * @param yyscanner The scanner object.
2889 void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
2891 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2897 /* We always need two end-of-buffer characters. The first causes
2898 * a transition to the end-of-buffer state. The second causes
2899 * a jam in that state.
2901 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2902 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2904 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2907 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2909 if ( b
== YY_CURRENT_BUFFER
)
2910 _mesa_glsl__load_buffer_state(yyscanner
);
2913 /** Pushes the new state onto the stack. The new state becomes
2914 * the current state. This function will allocate the stack
2916 * @param new_buffer The new state.
2917 * @param yyscanner The scanner object.
2919 void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
2921 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2922 if (new_buffer
== NULL
)
2925 _mesa_glsl_ensure_buffer_stack(yyscanner
);
2927 /* This block is copied from _mesa_glsl__switch_to_buffer. */
2928 if ( YY_CURRENT_BUFFER
)
2930 /* Flush out information for old buffer. */
2931 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
2932 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
2933 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
2936 /* Only push if top exists. Otherwise, replace top. */
2937 if (YY_CURRENT_BUFFER
)
2938 yyg
->yy_buffer_stack_top
++;
2939 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2941 /* copied from _mesa_glsl__switch_to_buffer. */
2942 _mesa_glsl__load_buffer_state(yyscanner
);
2943 yyg
->yy_did_buffer_switch_on_eof
= 1;
2946 /** Removes and deletes the top of the stack, if present.
2947 * The next element becomes the new top.
2948 * @param yyscanner The scanner object.
2950 void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner
)
2952 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2953 if (!YY_CURRENT_BUFFER
)
2956 _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
2957 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2958 if (yyg
->yy_buffer_stack_top
> 0)
2959 --yyg
->yy_buffer_stack_top
;
2961 if (YY_CURRENT_BUFFER
) {
2962 _mesa_glsl__load_buffer_state(yyscanner
);
2963 yyg
->yy_did_buffer_switch_on_eof
= 1;
2967 /* Allocates the stack if it does not exist.
2968 * Guarantees space for at least one push.
2970 static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner
)
2973 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2975 if (!yyg
->yy_buffer_stack
) {
2977 /* First allocation is just for 2 elements, since we don't know if this
2978 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2979 * immediate realloc on the next call.
2982 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)_mesa_glsl_alloc
2983 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2985 if ( ! yyg
->yy_buffer_stack
)
2986 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" );
2988 memset(yyg
->yy_buffer_stack
, 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2990 yyg
->yy_buffer_stack_max
= num_to_alloc
;
2991 yyg
->yy_buffer_stack_top
= 0;
2995 if (yyg
->yy_buffer_stack_top
>= (yyg
->yy_buffer_stack_max
) - 1){
2997 /* Increase the buffer to prepare for a possible push. */
2998 int grow_size
= 8 /* arbitrary grow size */;
3000 num_to_alloc
= yyg
->yy_buffer_stack_max
+ grow_size
;
3001 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)_mesa_glsl_realloc
3002 (yyg
->yy_buffer_stack
,
3003 num_to_alloc
* sizeof(struct yy_buffer_state
*)
3005 if ( ! yyg
->yy_buffer_stack
)
3006 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" );
3008 /* zero only the new slots.*/
3009 memset(yyg
->yy_buffer_stack
+ yyg
->yy_buffer_stack_max
, 0, grow_size
* sizeof(struct yy_buffer_state
*));
3010 yyg
->yy_buffer_stack_max
= num_to_alloc
;
3014 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3015 * @param base the character buffer
3016 * @param size the size in bytes of the character buffer
3017 * @param yyscanner The scanner object.
3018 * @return the newly allocated buffer state object.
3020 YY_BUFFER_STATE
_mesa_glsl__scan_buffer (char * base
, yy_size_t size
, yyscan_t yyscanner
)
3025 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
3026 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
3027 /* They forgot to leave room for the EOB's. */
3030 b
= (YY_BUFFER_STATE
) _mesa_glsl_alloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
3032 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" );
3034 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
3035 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
3036 b
->yy_is_our_buffer
= 0;
3037 b
->yy_input_file
= 0;
3038 b
->yy_n_chars
= b
->yy_buf_size
;
3039 b
->yy_is_interactive
= 0;
3041 b
->yy_fill_buffer
= 0;
3042 b
->yy_buffer_status
= YY_BUFFER_NEW
;
3044 _mesa_glsl__switch_to_buffer(b
,yyscanner
);
3049 /** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will
3050 * scan from a @e copy of @a str.
3051 * @param yystr a NUL-terminated string to scan
3052 * @param yyscanner The scanner object.
3053 * @return the newly allocated buffer state object.
3054 * @note If you want to scan bytes that may contain NUL values, then use
3055 * _mesa_glsl__scan_bytes() instead.
3057 YY_BUFFER_STATE
_mesa_glsl__scan_string (yyconst
char * yystr
, yyscan_t yyscanner
)
3060 return _mesa_glsl__scan_bytes(yystr
,strlen(yystr
) ,yyscanner
);
3063 /** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will
3064 * scan from a @e copy of @a bytes.
3065 * @param bytes the byte buffer to scan
3066 * @param len the number of bytes in the buffer pointed to by @a bytes.
3067 * @param yyscanner The scanner object.
3068 * @return the newly allocated buffer state object.
3070 YY_BUFFER_STATE
_mesa_glsl__scan_bytes (yyconst
char * yybytes
, int _yybytes_len
, yyscan_t yyscanner
)
3077 /* Get memory for full buffer, including space for trailing EOB's. */
3078 n
= _yybytes_len
+ 2;
3079 buf
= (char *) _mesa_glsl_alloc(n
,yyscanner
);
3081 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" );
3083 for ( i
= 0; i
< _yybytes_len
; ++i
)
3084 buf
[i
] = yybytes
[i
];
3086 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
3088 b
= _mesa_glsl__scan_buffer(buf
,n
,yyscanner
);
3090 YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" );
3092 /* It's okay to grow etc. this buffer, and we should throw it
3093 * away when we're done.
3095 b
->yy_is_our_buffer
= 1;
3100 #ifndef YY_EXIT_FAILURE
3101 #define YY_EXIT_FAILURE 2
3104 static void yy_fatal_error (yyconst
char* msg
, yyscan_t yyscanner
)
3106 (void) fprintf( stderr
, "%s\n", msg
);
3107 exit( YY_EXIT_FAILURE
);
3110 /* Redefine yyless() so it works in section 3 code. */
3116 /* Undo effects of setting up yytext. */ \
3117 int yyless_macro_arg = (n); \
3118 YY_LESS_LINENO(yyless_macro_arg);\
3119 yytext[yyleng] = yyg->yy_hold_char; \
3120 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
3121 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
3122 *yyg->yy_c_buf_p = '\0'; \
3123 yyleng = yyless_macro_arg; \
3127 /* Accessor methods (get/set functions) to struct members. */
3129 /** Get the user-defined data for this scanner.
3130 * @param yyscanner The scanner object.
3132 YY_EXTRA_TYPE
_mesa_glsl_get_extra (yyscan_t yyscanner
)
3134 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3138 /** Get the current line number.
3139 * @param yyscanner The scanner object.
3141 int _mesa_glsl_get_lineno (yyscan_t yyscanner
)
3143 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3145 if (! YY_CURRENT_BUFFER
)
3151 /** Get the current column number.
3152 * @param yyscanner The scanner object.
3154 int _mesa_glsl_get_column (yyscan_t yyscanner
)
3156 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3158 if (! YY_CURRENT_BUFFER
)
3164 /** Get the input stream.
3165 * @param yyscanner The scanner object.
3167 FILE *_mesa_glsl_get_in (yyscan_t yyscanner
)
3169 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3173 /** Get the output stream.
3174 * @param yyscanner The scanner object.
3176 FILE *_mesa_glsl_get_out (yyscan_t yyscanner
)
3178 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3182 /** Get the length of the current token.
3183 * @param yyscanner The scanner object.
3185 int _mesa_glsl_get_leng (yyscan_t yyscanner
)
3187 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3191 /** Get the current token.
3192 * @param yyscanner The scanner object.
3195 char *_mesa_glsl_get_text (yyscan_t yyscanner
)
3197 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3201 /** Set the user-defined data. This data is never touched by the scanner.
3202 * @param user_defined The data to be associated with this scanner.
3203 * @param yyscanner The scanner object.
3205 void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined
, yyscan_t yyscanner
)
3207 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3208 yyextra
= user_defined
;
3211 /** Set the current line number.
3212 * @param line_number
3213 * @param yyscanner The scanner object.
3215 void _mesa_glsl_set_lineno (int line_number
, yyscan_t yyscanner
)
3217 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3219 /* lineno is only valid if an input buffer exists. */
3220 if (! YY_CURRENT_BUFFER
)
3221 yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner
);
3223 yylineno
= line_number
;
3226 /** Set the current column.
3227 * @param line_number
3228 * @param yyscanner The scanner object.
3230 void _mesa_glsl_set_column (int column_no
, yyscan_t yyscanner
)
3232 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3234 /* column is only valid if an input buffer exists. */
3235 if (! YY_CURRENT_BUFFER
)
3236 yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner
);
3238 yycolumn
= column_no
;
3241 /** Set the input stream. This does not discard the current
3243 * @param in_str A readable stream.
3244 * @param yyscanner The scanner object.
3245 * @see _mesa_glsl__switch_to_buffer
3247 void _mesa_glsl_set_in (FILE * in_str
, yyscan_t yyscanner
)
3249 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3253 void _mesa_glsl_set_out (FILE * out_str
, yyscan_t yyscanner
)
3255 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3259 int _mesa_glsl_get_debug (yyscan_t yyscanner
)
3261 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3262 return yy_flex_debug
;
3265 void _mesa_glsl_set_debug (int bdebug
, yyscan_t yyscanner
)
3267 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3268 yy_flex_debug
= bdebug
;
3271 /* Accessor methods for yylval and yylloc */
3273 YYSTYPE
* _mesa_glsl_get_lval (yyscan_t yyscanner
)
3275 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3279 void _mesa_glsl_set_lval (YYSTYPE
* yylval_param
, yyscan_t yyscanner
)
3281 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3282 yylval
= yylval_param
;
3285 YYLTYPE
*_mesa_glsl_get_lloc (yyscan_t yyscanner
)
3287 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3291 void _mesa_glsl_set_lloc (YYLTYPE
* yylloc_param
, yyscan_t yyscanner
)
3293 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3294 yylloc
= yylloc_param
;
3297 /* User-visible API */
3299 /* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is
3300 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3301 * That's why we explicitly handle the declaration, instead of using our macros.
3304 int _mesa_glsl_lex_init(yyscan_t
* ptr_yy_globals
)
3307 if (ptr_yy_globals
== NULL
){
3312 *ptr_yy_globals
= (yyscan_t
) _mesa_glsl_alloc ( sizeof( struct yyguts_t
), NULL
);
3314 if (*ptr_yy_globals
== NULL
){
3319 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3320 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
3322 return yy_init_globals ( *ptr_yy_globals
);
3325 /* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the
3326 * convention of taking the scanner as the last argument. Note however, that
3327 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3328 * is the reason, too, why this function also must handle its own declaration).
3329 * The user defined value in the first argument will be available to _mesa_glsl_alloc in
3330 * the yyextra field.
3333 int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined
,yyscan_t
* ptr_yy_globals
)
3336 struct yyguts_t dummy_yyguts
;
3338 _mesa_glsl_set_extra (yy_user_defined
, &dummy_yyguts
);
3340 if (ptr_yy_globals
== NULL
){
3345 *ptr_yy_globals
= (yyscan_t
) _mesa_glsl_alloc ( sizeof( struct yyguts_t
), &dummy_yyguts
);
3347 if (*ptr_yy_globals
== NULL
){
3352 /* By setting to 0xAA, we expose bugs in
3353 yy_init_globals. Leave at 0x00 for releases. */
3354 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
3356 _mesa_glsl_set_extra (yy_user_defined
, *ptr_yy_globals
);
3358 return yy_init_globals ( *ptr_yy_globals
);
3361 static int yy_init_globals (yyscan_t yyscanner
)
3363 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3364 /* Initialization is the same as for the non-reentrant scanner.
3365 * This function is called from _mesa_glsl_lex_destroy(), so don't allocate here.
3368 yyg
->yy_buffer_stack
= 0;
3369 yyg
->yy_buffer_stack_top
= 0;
3370 yyg
->yy_buffer_stack_max
= 0;
3371 yyg
->yy_c_buf_p
= (char *) 0;
3375 yyg
->yy_start_stack_ptr
= 0;
3376 yyg
->yy_start_stack_depth
= 0;
3377 yyg
->yy_start_stack
= NULL
;
3379 /* Defined in main.c */
3388 /* For future reference: Set errno on error, since we are called by
3389 * _mesa_glsl_lex_init()
3394 /* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */
3395 int _mesa_glsl_lex_destroy (yyscan_t yyscanner
)
3397 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3399 /* Pop the buffer stack, destroying each element. */
3400 while(YY_CURRENT_BUFFER
){
3401 _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
3402 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3403 _mesa_glsl_pop_buffer_state(yyscanner
);
3406 /* Destroy the stack itself. */
3407 _mesa_glsl_free(yyg
->yy_buffer_stack
,yyscanner
);
3408 yyg
->yy_buffer_stack
= NULL
;
3410 /* Destroy the start condition stack. */
3411 _mesa_glsl_free(yyg
->yy_start_stack
,yyscanner
);
3412 yyg
->yy_start_stack
= NULL
;
3414 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3415 * _mesa_glsl_lex() is called, initialization will occur. */
3416 yy_init_globals( yyscanner
);
3418 /* Destroy the main struct (reentrant only). */
3419 _mesa_glsl_free ( yyscanner
, yyscanner
);
3425 * Internal utility routines.
3429 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
, yyscan_t yyscanner
)
3432 for ( i
= 0; i
< n
; ++i
)
3437 #ifdef YY_NEED_STRLEN
3438 static int yy_flex_strlen (yyconst
char * s
, yyscan_t yyscanner
)
3441 for ( n
= 0; s
[n
]; ++n
)
3448 void *_mesa_glsl_alloc (yy_size_t size
, yyscan_t yyscanner
)
3450 return (void *) malloc( size
);
3453 void *_mesa_glsl_realloc (void * ptr
, yy_size_t size
, yyscan_t yyscanner
)
3455 /* The cast to (char *) in the following accommodates both
3456 * implementations that use char* generic pointers, and those
3457 * that use void* generic pointers. It works with the latter
3458 * because both ANSI C and C++ allow castless assignment from
3459 * any pointer type to void*, and deal with argument conversions
3460 * as though doing an assignment.
3462 return (void *) realloc( (char *) ptr
, size
);
3465 void _mesa_glsl_free (void * ptr
, yyscan_t yyscanner
)
3467 free( (char *) ptr
); /* see _mesa_glsl_realloc() for (char *) cast */
3470 #define YYTABLES_NAME "yytables"
3472 #line 386 "glsl_lexer.lpp"
3477 _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state
*state
, const char *string
)
3479 _mesa_glsl_lex_init_extra(state
,& state
->scanner
);
3480 _mesa_glsl__scan_string(string
,state
->scanner
);
3484 _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state
*state
)
3486 _mesa_glsl_lex_destroy(state
->scanner
);