1 #line 1 "src/compiler/glsl/glsl_lexer.cpp"
2
3 #line 3 "src/compiler/glsl/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 6
12 #define YY_FLEX_SUBMINOR_VERSION 4
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 #ifdef yy_create_buffer
18 #define _mesa_glsl_lexer__create_buffer_ALREADY_DEFINED
19 #else
20 #define yy_create_buffer _mesa_glsl_lexer__create_buffer
21 #endif
22
23 #ifdef yy_delete_buffer
24 #define _mesa_glsl_lexer__delete_buffer_ALREADY_DEFINED
25 #else
26 #define yy_delete_buffer _mesa_glsl_lexer__delete_buffer
27 #endif
28
29 #ifdef yy_scan_buffer
30 #define _mesa_glsl_lexer__scan_buffer_ALREADY_DEFINED
31 #else
32 #define yy_scan_buffer _mesa_glsl_lexer__scan_buffer
33 #endif
34
35 #ifdef yy_scan_string
36 #define _mesa_glsl_lexer__scan_string_ALREADY_DEFINED
37 #else
38 #define yy_scan_string _mesa_glsl_lexer__scan_string
39 #endif
40
41 #ifdef yy_scan_bytes
42 #define _mesa_glsl_lexer__scan_bytes_ALREADY_DEFINED
43 #else
44 #define yy_scan_bytes _mesa_glsl_lexer__scan_bytes
45 #endif
46
47 #ifdef yy_init_buffer
48 #define _mesa_glsl_lexer__init_buffer_ALREADY_DEFINED
49 #else
50 #define yy_init_buffer _mesa_glsl_lexer__init_buffer
51 #endif
52
53 #ifdef yy_flush_buffer
54 #define _mesa_glsl_lexer__flush_buffer_ALREADY_DEFINED
55 #else
56 #define yy_flush_buffer _mesa_glsl_lexer__flush_buffer
57 #endif
58
59 #ifdef yy_load_buffer_state
60 #define _mesa_glsl_lexer__load_buffer_state_ALREADY_DEFINED
61 #else
62 #define yy_load_buffer_state _mesa_glsl_lexer__load_buffer_state
63 #endif
64
65 #ifdef yy_switch_to_buffer
66 #define _mesa_glsl_lexer__switch_to_buffer_ALREADY_DEFINED
67 #else
68 #define yy_switch_to_buffer _mesa_glsl_lexer__switch_to_buffer
69 #endif
70
71 #ifdef yypush_buffer_state
72 #define _mesa_glsl_lexer_push_buffer_state_ALREADY_DEFINED
73 #else
74 #define yypush_buffer_state _mesa_glsl_lexer_push_buffer_state
75 #endif
76
77 #ifdef yypop_buffer_state
78 #define _mesa_glsl_lexer_pop_buffer_state_ALREADY_DEFINED
79 #else
80 #define yypop_buffer_state _mesa_glsl_lexer_pop_buffer_state
81 #endif
82
83 #ifdef yyensure_buffer_stack
84 #define _mesa_glsl_lexer_ensure_buffer_stack_ALREADY_DEFINED
85 #else
86 #define yyensure_buffer_stack _mesa_glsl_lexer_ensure_buffer_stack
87 #endif
88
89 #ifdef yylex
90 #define _mesa_glsl_lexer_lex_ALREADY_DEFINED
91 #else
92 #define yylex _mesa_glsl_lexer_lex
93 #endif
94
95 #ifdef yyrestart
96 #define _mesa_glsl_lexer_restart_ALREADY_DEFINED
97 #else
98 #define yyrestart _mesa_glsl_lexer_restart
99 #endif
100
101 #ifdef yylex_init
102 #define _mesa_glsl_lexer_lex_init_ALREADY_DEFINED
103 #else
104 #define yylex_init _mesa_glsl_lexer_lex_init
105 #endif
106
107 #ifdef yylex_init_extra
108 #define _mesa_glsl_lexer_lex_init_extra_ALREADY_DEFINED
109 #else
110 #define yylex_init_extra _mesa_glsl_lexer_lex_init_extra
111 #endif
112
113 #ifdef yylex_destroy
114 #define _mesa_glsl_lexer_lex_destroy_ALREADY_DEFINED
115 #else
116 #define yylex_destroy _mesa_glsl_lexer_lex_destroy
117 #endif
118
119 #ifdef yyget_debug
120 #define _mesa_glsl_lexer_get_debug_ALREADY_DEFINED
121 #else
122 #define yyget_debug _mesa_glsl_lexer_get_debug
123 #endif
124
125 #ifdef yyset_debug
126 #define _mesa_glsl_lexer_set_debug_ALREADY_DEFINED
127 #else
128 #define yyset_debug _mesa_glsl_lexer_set_debug
129 #endif
130
131 #ifdef yyget_extra
132 #define _mesa_glsl_lexer_get_extra_ALREADY_DEFINED
133 #else
134 #define yyget_extra _mesa_glsl_lexer_get_extra
135 #endif
136
137 #ifdef yyset_extra
138 #define _mesa_glsl_lexer_set_extra_ALREADY_DEFINED
139 #else
140 #define yyset_extra _mesa_glsl_lexer_set_extra
141 #endif
142
143 #ifdef yyget_in
144 #define _mesa_glsl_lexer_get_in_ALREADY_DEFINED
145 #else
146 #define yyget_in _mesa_glsl_lexer_get_in
147 #endif
148
149 #ifdef yyset_in
150 #define _mesa_glsl_lexer_set_in_ALREADY_DEFINED
151 #else
152 #define yyset_in _mesa_glsl_lexer_set_in
153 #endif
154
155 #ifdef yyget_out
156 #define _mesa_glsl_lexer_get_out_ALREADY_DEFINED
157 #else
158 #define yyget_out _mesa_glsl_lexer_get_out
159 #endif
160
161 #ifdef yyset_out
162 #define _mesa_glsl_lexer_set_out_ALREADY_DEFINED
163 #else
164 #define yyset_out _mesa_glsl_lexer_set_out
165 #endif
166
167 #ifdef yyget_leng
168 #define _mesa_glsl_lexer_get_leng_ALREADY_DEFINED
169 #else
170 #define yyget_leng _mesa_glsl_lexer_get_leng
171 #endif
172
173 #ifdef yyget_text
174 #define _mesa_glsl_lexer_get_text_ALREADY_DEFINED
175 #else
176 #define yyget_text _mesa_glsl_lexer_get_text
177 #endif
178
179 #ifdef yyget_lineno
180 #define _mesa_glsl_lexer_get_lineno_ALREADY_DEFINED
181 #else
182 #define yyget_lineno _mesa_glsl_lexer_get_lineno
183 #endif
184
185 #ifdef yyset_lineno
186 #define _mesa_glsl_lexer_set_lineno_ALREADY_DEFINED
187 #else
188 #define yyset_lineno _mesa_glsl_lexer_set_lineno
189 #endif
190
191 #ifdef yyget_column
192 #define _mesa_glsl_lexer_get_column_ALREADY_DEFINED
193 #else
194 #define yyget_column _mesa_glsl_lexer_get_column
195 #endif
196
197 #ifdef yyset_column
198 #define _mesa_glsl_lexer_set_column_ALREADY_DEFINED
199 #else
200 #define yyset_column _mesa_glsl_lexer_set_column
201 #endif
202
203 #ifdef yywrap
204 #define _mesa_glsl_lexer_wrap_ALREADY_DEFINED
205 #else
206 #define yywrap _mesa_glsl_lexer_wrap
207 #endif
208
209 #ifdef yyget_lval
210 #define _mesa_glsl_lexer_get_lval_ALREADY_DEFINED
211 #else
212 #define yyget_lval _mesa_glsl_lexer_get_lval
213 #endif
214
215 #ifdef yyset_lval
216 #define _mesa_glsl_lexer_set_lval_ALREADY_DEFINED
217 #else
218 #define yyset_lval _mesa_glsl_lexer_set_lval
219 #endif
220
221 #ifdef yyget_lloc
222 #define _mesa_glsl_lexer_get_lloc_ALREADY_DEFINED
223 #else
224 #define yyget_lloc _mesa_glsl_lexer_get_lloc
225 #endif
226
227 #ifdef yyset_lloc
228 #define _mesa_glsl_lexer_set_lloc_ALREADY_DEFINED
229 #else
230 #define yyset_lloc _mesa_glsl_lexer_set_lloc
231 #endif
232
233 #ifdef yyalloc
234 #define _mesa_glsl_lexer_alloc_ALREADY_DEFINED
235 #else
236 #define yyalloc _mesa_glsl_lexer_alloc
237 #endif
238
239 #ifdef yyrealloc
240 #define _mesa_glsl_lexer_realloc_ALREADY_DEFINED
241 #else
242 #define yyrealloc _mesa_glsl_lexer_realloc
243 #endif
244
245 #ifdef yyfree
246 #define _mesa_glsl_lexer_free_ALREADY_DEFINED
247 #else
248 #define yyfree _mesa_glsl_lexer_free
249 #endif
250
251 /* First, we deal with platform-specific or compiler-specific issues. */
252
253 /* begin standard C headers. */
254 #include <stdio.h>
255 #include <string.h>
256 #include <errno.h>
257 #include <stdlib.h>
258
259 /* end standard C headers. */
260
261 /* flex integer type definitions */
262
263 #ifndef FLEXINT_H
264 #define FLEXINT_H
265
266 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
267
268 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
269
270 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
271 * if you want the limit (max/min) macros for int types.
272 */
273 #ifndef __STDC_LIMIT_MACROS
274 #define __STDC_LIMIT_MACROS 1
275 #endif
276
277 #include <inttypes.h>
278 typedef int8_t flex_int8_t;
279 typedef uint8_t flex_uint8_t;
280 typedef int16_t flex_int16_t;
281 typedef uint16_t flex_uint16_t;
282 typedef int32_t flex_int32_t;
283 typedef uint32_t flex_uint32_t;
284 #else
285 typedef signed char flex_int8_t;
286 typedef short int flex_int16_t;
287 typedef int flex_int32_t;
288 typedef unsigned char flex_uint8_t;
289 typedef unsigned short int flex_uint16_t;
290 typedef unsigned int flex_uint32_t;
291
292 /* Limits of integral types. */
293 #ifndef INT8_MIN
294 #define INT8_MIN (-128)
295 #endif
296 #ifndef INT16_MIN
297 #define INT16_MIN (-32767-1)
298 #endif
299 #ifndef INT32_MIN
300 #define INT32_MIN (-2147483647-1)
301 #endif
302 #ifndef INT8_MAX
303 #define INT8_MAX (127)
304 #endif
305 #ifndef INT16_MAX
306 #define INT16_MAX (32767)
307 #endif
308 #ifndef INT32_MAX
309 #define INT32_MAX (2147483647)
310 #endif
311 #ifndef UINT8_MAX
312 #define UINT8_MAX (255U)
313 #endif
314 #ifndef UINT16_MAX
315 #define UINT16_MAX (65535U)
316 #endif
317 #ifndef UINT32_MAX
318 #define UINT32_MAX (4294967295U)
319 #endif
320
321 #ifndef SIZE_MAX
322 #define SIZE_MAX (~(size_t)0)
323 #endif
324
325 #endif /* ! C99 */
326
327 #endif /* ! FLEXINT_H */
328
329 /* begin standard C++ headers. */
330
331 /* TODO: this is always defined, so inline it */
332 #define yyconst const
333
334 #if defined(__GNUC__) && __GNUC__ >= 3
335 #define yynoreturn __attribute__((__noreturn__))
336 #else
337 #define yynoreturn
338 #endif
339
340 /* Returned upon end-of-file. */
341 #define YY_NULL 0
342
343 /* Promotes a possibly negative, possibly signed char to an
344 * integer in range [0..255] for use as an array index.
345 */
346 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
347
348 /* An opaque pointer. */
349 #ifndef YY_TYPEDEF_YY_SCANNER_T
350 #define YY_TYPEDEF_YY_SCANNER_T
351 typedef void* yyscan_t;
352 #endif
353
354 /* For convenience, these vars (plus the bison vars far below)
355 are macros in the reentrant scanner. */
356 #define yyin yyg->yyin_r
357 #define yyout yyg->yyout_r
358 #define yyextra yyg->yyextra_r
359 #define yyleng yyg->yyleng_r
360 #define yytext yyg->yytext_r
361 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
362 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
363 #define yy_flex_debug yyg->yy_flex_debug_r
364
365 /* Enter a start condition. This macro really ought to take a parameter,
366 * but we do it the disgusting crufty way forced on us by the ()-less
367 * definition of BEGIN.
368 */
369 #define BEGIN yyg->yy_start = 1 + 2 *
370 /* Translate the current start state into a value that can be later handed
371 * to BEGIN to return to the state. The YYSTATE alias is for lex
372 * compatibility.
373 */
374 #define YY_START ((yyg->yy_start - 1) / 2)
375 #define YYSTATE YY_START
376 /* Action number for EOF rule of a given start state. */
377 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
378 /* Special action meaning "start processing a new file". */
379 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
380 #define YY_END_OF_BUFFER_CHAR 0
381
382 /* Size of default input buffer. */
383 #ifndef YY_BUF_SIZE
384 #ifdef __ia64__
385 /* On IA-64, the buffer size is 16k, not 8k.
386 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
387 * Ditto for the __ia64__ case accordingly.
388 */
389 #define YY_BUF_SIZE 32768
390 #else
391 #define YY_BUF_SIZE 16384
392 #endif /* __ia64__ */
393 #endif
394
395 /* The state buf must be large enough to hold one state per character in the main buffer.
396 */
397 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
398
399 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
400 #define YY_TYPEDEF_YY_BUFFER_STATE
401 typedef struct yy_buffer_state *YY_BUFFER_STATE;
402 #endif
403
404 #ifndef YY_TYPEDEF_YY_SIZE_T
405 #define YY_TYPEDEF_YY_SIZE_T
406 typedef size_t yy_size_t;
407 #endif
408
409 #define EOB_ACT_CONTINUE_SCAN 0
410 #define EOB_ACT_END_OF_FILE 1
411 #define EOB_ACT_LAST_MATCH 2
412
413 #define YY_LESS_LINENO(n)
414 #define YY_LINENO_REWIND_TO(ptr)
415
416 /* Return all but the first "n" matched characters back to the input stream. */
417 #define yyless(n) \
418 do \
419 { \
420 /* Undo effects of setting up yytext. */ \
421 int yyless_macro_arg = (n); \
422 YY_LESS_LINENO(yyless_macro_arg);\
423 *yy_cp = yyg->yy_hold_char; \
424 YY_RESTORE_YY_MORE_OFFSET \
425 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
426 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
427 } \
428 while ( 0 )
429 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
430
431 #ifndef YY_STRUCT_YY_BUFFER_STATE
432 #define YY_STRUCT_YY_BUFFER_STATE
433 struct yy_buffer_state
434 {
435 FILE *yy_input_file;
436
437 char *yy_ch_buf; /* input buffer */
438 char *yy_buf_pos; /* current position in input buffer */
439
440 /* Size of input buffer in bytes, not including room for EOB
441 * characters.
442 */
443 int yy_buf_size;
444
445 /* Number of characters read into yy_ch_buf, not including EOB
446 * characters.
447 */
448 int yy_n_chars;
449
450 /* Whether we "own" the buffer - i.e., we know we created it,
451 * and can realloc() it to grow it, and should free() it to
452 * delete it.
453 */
454 int yy_is_our_buffer;
455
456 /* Whether this is an "interactive" input source; if so, and
457 * if we're using stdio for input, then we want to use getc()
458 * instead of fread(), to make sure we stop fetching input after
459 * each newline.
460 */
461 int yy_is_interactive;
462
463 /* Whether we're considered to be at the beginning of a line.
464 * If so, '^' rules will be active on the next match, otherwise
465 * not.
466 */
467 int yy_at_bol;
468
469 int yy_bs_lineno; /**< The line count. */
470 int yy_bs_column; /**< The column count. */
471
472 /* Whether to try to fill the input buffer when we reach the
473 * end of it.
474 */
475 int yy_fill_buffer;
476
477 int yy_buffer_status;
478
479 #define YY_BUFFER_NEW 0
480 #define YY_BUFFER_NORMAL 1
481 /* When an EOF's been seen but there's still some text to process
482 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
483 * shouldn't try reading from the input source any more. We might
484 * still have a bunch of tokens to match, though, because of
485 * possible backing-up.
486 *
487 * When we actually see the EOF, we change the status to "new"
488 * (via yyrestart()), so that the user can continue scanning by
489 * just pointing yyin at a new input file.
490 */
491 #define YY_BUFFER_EOF_PENDING 2
492
493 };
494 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
495
496 /* We provide macros for accessing buffer states in case in the
497 * future we want to put the buffer states in a more general
498 * "scanner state".
499 *
500 * Returns the top of the stack, or NULL.
501 */
502 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
503 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
504 : NULL)
505 /* Same as previous macro, but useful when we know that the buffer stack is not
506 * NULL or when we need an lvalue. For internal use only.
507 */
508 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
509
510 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
511 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
512 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
513 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
514 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
515 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
516 void yypop_buffer_state ( yyscan_t yyscanner );
517
518 static void yyensure_buffer_stack ( yyscan_t yyscanner );
519 static void yy_load_buffer_state ( yyscan_t yyscanner );
520 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
521 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
522
523 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
524 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
525 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
526
527 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
528 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
529 void yyfree ( void * , yyscan_t yyscanner );
530
531 #define yy_new_buffer yy_create_buffer
532 #define yy_set_interactive(is_interactive) \
533 { \
534 if ( ! YY_CURRENT_BUFFER ){ \
535 yyensure_buffer_stack (yyscanner); \
536 YY_CURRENT_BUFFER_LVALUE = \
537 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
538 } \
539 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
540 }
541 #define yy_set_bol(at_bol) \
542 { \
543 if ( ! YY_CURRENT_BUFFER ){\
544 yyensure_buffer_stack (yyscanner); \
545 YY_CURRENT_BUFFER_LVALUE = \
546 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
547 } \
548 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
549 }
550 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
551
552 /* Begin user sect3 */
553
554 #define _mesa_glsl_lexer_wrap(yyscanner) (/*CONSTCOND*/1)
555 #define YY_SKIP_YYWRAP
556 typedef flex_uint8_t YY_CHAR;
557
558 typedef int yy_state_type;
559
560 #define yytext_ptr yytext_r
561
562 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
563 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
564 static int yy_get_next_buffer ( yyscan_t yyscanner );
565 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
566
567 /* Done after the current pattern has been matched and before the
568 * corresponding action - sets up yytext.
569 */
570 #define YY_DO_BEFORE_ACTION \
571 yyg->yytext_ptr = yy_bp; \
572 yyleng = (int) (yy_cp - yy_bp); \
573 yyg->yy_hold_char = *yy_cp; \
574 *yy_cp = '\0'; \
575 yyg->yy_c_buf_p = yy_cp;
576 #define YY_NUM_RULES 280
577 #define YY_END_OF_BUFFER 281
578 /* This struct is not used in this scanner,
579 but its presence is necessary. */
580 struct yy_trans_info
581 {
582 flex_int32_t yy_verify;
583 flex_int32_t yy_nxt;
584 };
585 static const flex_int16_t yy_accept[1112] =
586 { 0,
587 0, 0, 20, 20, 0, 0, 281, 279, 1, 27,
588 279, 279, 279, 279, 279, 279, 278, 279, 185, 183,
589 279, 279, 279, 277, 279, 277, 277, 277, 277, 277,
590 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
591 277, 277, 277, 277, 277, 279, 1, 279, 26, 20,
592 25, 26, 24, 23, 21, 22, 18, 17, 1, 167,
593 176, 168, 179, 173, 162, 175, 163, 182, 187, 174,
594 188, 185, 0, 0, 185, 185, 0, 185, 183, 183,
595 183, 183, 171, 164, 166, 165, 172, 277, 180, 170,
596 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
597
598 277, 277, 277, 277, 36, 277, 277, 277, 277, 277,
599 277, 277, 277, 277, 277, 277, 277, 277, 277, 40,
600 277, 277, 68, 277, 277, 277, 277, 277, 277, 277,
601 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
602 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
603 277, 277, 277, 277, 277, 277, 277, 277, 181, 169,
604 1, 0, 0, 2, 0, 0, 0, 0, 0, 20,
605 19, 23, 22, 0, 187, 0, 0, 186, 0, 188,
606 0, 0, 0, 189, 184, 177, 178, 277, 196, 277,
607 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
608
609 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
610 277, 277, 277, 277, 277, 39, 277, 277, 277, 277,
611 277, 277, 277, 277, 277, 277, 277, 32, 277, 277,
612 277, 277, 277, 277, 277, 277, 277, 277, 277, 69,
613 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
614 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
615 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
616 277, 277, 277, 277, 277, 277, 277, 0, 0, 0,
617 0, 0, 19, 0, 187, 191, 0, 186, 0, 0,
618 0, 188, 192, 189, 0, 0, 184, 184, 184, 277,
619
620 277, 277, 30, 277, 277, 277, 254, 247, 277, 277,
621 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
622 38, 199, 277, 277, 277, 277, 76, 277, 277, 204,
623 217, 277, 277, 277, 277, 277, 277, 277, 277, 277,
624 277, 277, 277, 277, 277, 214, 250, 56, 57, 58,
625 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
626 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
627 277, 277, 277, 277, 277, 277, 202, 194, 277, 277,
628 277, 33, 277, 277, 277, 277, 277, 277, 277, 53,
629 54, 55, 160, 277, 277, 277, 0, 0, 0, 0,
630
631 0, 0, 186, 190, 193, 277, 277, 277, 34, 277,
632 44, 45, 46, 277, 197, 277, 277, 29, 277, 277,
633 277, 277, 228, 229, 230, 277, 225, 226, 227, 277,
634 195, 277, 218, 31, 240, 241, 242, 252, 222, 223,
635 224, 277, 277, 277, 277, 70, 220, 277, 277, 277,
636 277, 47, 48, 49, 277, 277, 277, 277, 277, 277,
637 277, 277, 277, 277, 277, 79, 277, 277, 277, 277,
638 277, 277, 277, 277, 277, 215, 277, 277, 277, 277,
639 277, 277, 277, 277, 277, 277, 277, 277, 277, 198,
640 277, 277, 249, 50, 51, 52, 277, 277, 37, 277,
641
642 0, 0, 0, 0, 0, 257, 277, 277, 72, 277,
643 277, 255, 277, 277, 43, 277, 277, 277, 277, 216,
644 211, 260, 277, 277, 277, 277, 277, 277, 277, 207,
645 277, 277, 277, 277, 161, 59, 60, 61, 62, 63,
646 64, 65, 66, 67, 277, 277, 277, 277, 221, 203,
647 277, 277, 209, 277, 277, 277, 42, 277, 267, 158,
648 246, 77, 210, 159, 277, 258, 205, 277, 277, 277,
649 277, 277, 277, 277, 277, 277, 277, 277, 0, 0,
650 0, 0, 0, 277, 277, 277, 277, 277, 206, 41,
651 231, 232, 233, 234, 235, 236, 237, 238, 239, 277,
652
653 270, 271, 272, 277, 277, 277, 277, 277, 115, 116,
654 117, 277, 277, 269, 277, 277, 277, 251, 277, 277,
655 277, 277, 114, 277, 277, 277, 277, 277, 277, 277,
656 277, 200, 274, 275, 276, 277, 277, 277, 277, 277,
657 277, 71, 277, 277, 73, 277, 277, 0, 0, 0,
658 0, 0, 0, 277, 277, 74, 152, 35, 212, 126,
659 127, 128, 277, 277, 277, 277, 277, 277, 277, 277,
660 277, 277, 277, 277, 277, 277, 208, 277, 277, 277,
661 155, 266, 154, 277, 277, 277, 277, 277, 277, 277,
662 277, 201, 137, 138, 139, 277, 277, 273, 219, 277,
663
664 153, 277, 0, 5, 0, 8, 0, 0, 0, 16,
665 3, 277, 28, 277, 277, 277, 277, 277, 277, 277,
666 277, 277, 124, 277, 277, 277, 119, 213, 75, 277,
667 277, 277, 277, 277, 248, 277, 256, 253, 261, 80,
668 81, 82, 277, 277, 277, 277, 277, 277, 277, 277,
669 277, 277, 277, 277, 277, 277, 277, 156, 0, 0,
670 0, 0, 0, 0, 0, 0, 0, 277, 277, 277,
671 135, 277, 277, 130, 277, 277, 277, 277, 277, 277,
672 277, 277, 91, 92, 93, 277, 277, 277, 277, 277,
673 277, 277, 277, 277, 277, 277, 277, 277, 268, 277,
674
675 277, 146, 277, 277, 141, 97, 98, 99, 277, 277,
676 4, 0, 0, 0, 6, 0, 0, 0, 0, 0,
677 0, 0, 157, 277, 277, 277, 277, 277, 277, 277,
678 277, 277, 277, 118, 277, 120, 277, 277, 277, 277,
679 277, 277, 277, 277, 277, 277, 277, 103, 277, 277,
680 277, 277, 83, 277, 277, 277, 277, 277, 277, 277,
681 277, 277, 277, 277, 277, 277, 0, 7, 0, 0,
682 0, 0, 0, 277, 277, 277, 129, 131, 277, 121,
683 277, 122, 277, 277, 277, 277, 277, 104, 277, 277,
684 94, 277, 277, 277, 277, 277, 277, 277, 277, 277,
685
686 277, 277, 277, 277, 277, 277, 140, 142, 277, 277,
687 277, 105, 277, 277, 100, 0, 0, 0, 0, 132,
688 133, 277, 277, 277, 148, 277, 277, 149, 277, 277,
689 277, 277, 277, 277, 277, 78, 277, 277, 277, 277,
690 243, 277, 244, 259, 277, 277, 277, 143, 144, 277,
691 277, 277, 277, 277, 277, 277, 277, 0, 0, 0,
692 0, 277, 277, 277, 277, 125, 123, 277, 277, 277,
693 262, 264, 277, 84, 277, 85, 277, 277, 277, 277,
694 277, 277, 277, 277, 277, 277, 277, 263, 265, 277,
695 0, 0, 0, 0, 0, 136, 134, 277, 277, 95,
696
697 96, 277, 277, 277, 86, 277, 277, 277, 87, 277,
698 277, 277, 147, 145, 101, 102, 277, 277, 0, 0,
699 0, 0, 0, 277, 277, 277, 277, 277, 277, 106,
700 277, 109, 277, 277, 277, 277, 0, 0, 0, 0,
701 0, 0, 277, 277, 107, 110, 277, 277, 277, 277,
702 88, 277, 108, 111, 0, 0, 0, 9, 0, 0,
703 0, 0, 150, 151, 277, 277, 277, 277, 113, 0,
704 0, 10, 0, 0, 0, 0, 277, 277, 245, 277,
705 0, 0, 0, 0, 0, 13, 89, 90, 277, 0,
706 0, 0, 11, 0, 14, 277, 0, 0, 12, 112,
707
708 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
709 0
710 } ;
711
712 static const YY_CHAR yy_ec[256] =
713 { 0,
714 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
715 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
717 1, 5, 6, 7, 8, 1, 9, 10, 1, 11,
718 12, 13, 14, 1, 15, 16, 17, 18, 19, 20,
719 21, 22, 23, 24, 23, 25, 25, 26, 1, 27,
720 28, 29, 1, 1, 30, 31, 32, 33, 34, 35,
721 36, 37, 37, 37, 37, 38, 39, 37, 40, 37,
722 37, 41, 42, 43, 44, 37, 37, 45, 37, 37,
723 1, 1, 1, 46, 47, 1, 48, 49, 50, 51,
724
725 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
726 62, 63, 37, 64, 65, 66, 67, 68, 69, 70,
727 71, 72, 1, 73, 1, 1, 1, 1, 1, 1,
728 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
729 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
730 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
731 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
732 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
733 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735
736 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
738 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
739 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
740 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
741 1, 1, 1, 1, 1
742 } ;
743
744 static const YY_CHAR yy_meta[74] =
745 { 0,
746 1, 2, 3, 1, 4, 1, 5, 1, 1, 1,
747 1, 1, 1, 1, 1, 6, 5, 7, 7, 7,
748 7, 7, 7, 7, 7, 1, 1, 1, 1, 8,
749 8, 8, 8, 9, 10, 11, 11, 12, 11, 11,
750 11, 11, 11, 11, 11, 1, 11, 8, 8, 8,
751 8, 9, 10, 11, 11, 11, 11, 11, 12, 11,
752 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
753 11, 11, 1
754 } ;
755
756 static const flex_int16_t yy_base[1127] =
757 { 0,
758 0, 72, 80, 0, 1606, 1605, 1607, 1610, 74, 1610,
759 1578, 1577, 144, 1576, 141, 142, 140, 1575, 157, 212,
760 139, 1574, 155, 0, 128, 121, 126, 137, 151, 145,
761 192, 1539, 144, 202, 160, 162, 177, 1533, 201, 190,
762 218, 217, 221, 195, 165, 210, 288, 292, 1610, 296,
763 1610, 1582, 1610, 284, 1610, 0, 1610, 1610, 308, 1610,
764 1610, 1610, 1610, 1610, 1610, 1610, 1610, 1610, 343, 1610,
765 385, 153, 283, 300, 1610, 1560, 0, 1538, 0, 1610,
766 1558, 1536, 1566, 1610, 1610, 1610, 1565, 0, 1610, 1610,
767 1526, 1531, 155, 1528, 1537, 1535, 1535, 1521, 1524, 1536,
768
769 271, 274, 1518, 1534, 1514, 1528, 1514, 1511, 1511, 1517,
770 221, 213, 1511, 1522, 1507, 1513, 1517, 1518, 1547, 0,
771 1508, 1519, 274, 1518, 1513, 1493, 136, 1497, 1511, 1501,
772 282, 1494, 293, 1507, 1509, 263, 1488, 1496, 268, 1483,
773 1492, 305, 307, 1497, 1492, 1495, 1483, 1486, 1526, 286,
774 188, 293, 1495, 1482, 1495, 315, 1488, 1487, 1610, 1610,
775 371, 380, 395, 1610, 1472, 1480, 1484, 1475, 1486, 382,
776 0, 393, 0, 446, 1610, 1502, 1483, 393, 458, 1610,
777 1500, 1481, 466, 457, 455, 1610, 1610, 1477, 0, 1472,
778 1467, 1471, 1481, 1475, 1477, 306, 1460, 1460, 1472, 1463,
779
780 323, 1474, 1459, 1470, 1453, 1469, 1467, 1464, 1455, 1462,
781 1448, 1446, 1459, 1444, 1461, 0, 1458, 1445, 1453, 1450,
782 1454, 1435, 1454, 1447, 1444, 1432, 1431, 328, 1449, 1436,
783 1445, 1432, 1439, 1429, 370, 1435, 1438, 1428, 1436, 1424,
784 1428, 1419, 1434, 1433, 1423, 1430, 288, 1413, 1432, 1415,
785 1413, 1412, 1423, 1412, 1407, 1405, 1407, 1418, 1403, 1405,
786 1402, 1414, 1413, 1396, 1415, 1396, 368, 1405, 1400, 1398,
787 1408, 1386, 404, 1405, 1407, 1395, 1387, 1386, 1401, 1389,
788 1401, 1384, 0, 482, 459, 1610, 505, 1610, 1412, 1393,
789 513, 504, 1610, 1610, 1410, 1391, 1610, 1405, 1383, 1373,
790
791 1384, 1383, 0, 1380, 1385, 413, 0, 0, 1372, 1370,
792 1370, 1371, 1366, 1375, 1363, 1363, 1380, 420, 1368, 435,
793 0, 0, 1362, 1373, 1372, 1372, 0, 1356, 523, 0,
794 0, 1358, 526, 1368, 1365, 1366, 1356, 1350, 1349, 1392,
795 1349, 1348, 1348, 529, 1343, 0, 0, 1339, 1338, 1337,
796 1339, 1340, 1345, 1339, 1335, 1349, 1344, 1344, 1342, 1341,
797 1334, 1328, 1330, 1329, 1332, 1332, 1338, 1323, 1326, 1321,
798 1330, 1335, 1322, 1319, 1332, 1322, 0, 0, 1329, 1327,
799 1324, 1353, 1314, 1314, 1320, 1310, 1318, 532, 1315, 0,
800 0, 0, 0, 1304, 1317, 1316, 1315, 1307, 1313, 1310,
801
802 1298, 546, 520, 1610, 1610, 1310, 1311, 1311, 0, 1295,
803 0, 0, 0, 1296, 0, 1305, 1295, 0, 1294, 1295,
804 1301, 1288, 1281, 1280, 1279, 1296, 0, 0, 0, 1286,
805 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0,
806 0, 1295, 1292, 555, 1291, 0, 0, 1295, 1288, 1284,
807 1280, 0, 0, 0, 1272, 539, 560, 563, 1277, 1273,
808 1279, 1269, 1267, 1281, 1265, 0, 1265, 1279, 1267, 1263,
809 1270, 1264, 1276, 1271, 1271, 0, 1268, 1265, 1269, 1252,
810 1250, 1253, 1260, 1266, 1261, 1262, 1259, 1288, 1245, 0,
811 1247, 1248, 0, 0, 0, 0, 1245, 1249, 0, 1242,
812
813 1242, 1235, 448, 1241, 1244, 0, 1252, 1231, 0, 1241,
814 1235, 0, 1228, 1228, 0, 1242, 568, 571, 574, 0,
815 1244, 0, 577, 581, 1258, 1257, 1256, 1221, 1220, 0,
816 1220, 1237, 1236, 1231, 0, 0, 0, 0, 0, 0,
817 0, 0, 0, 0, 1219, 1233, 1219, 1216, 0, 0,
818 1222, 457, 0, 1218, 1226, 1225, 0, 1217, 1209, 0,
819 0, 0, 0, 0, 1206, 0, 0, 1205, 1217, 583,
820 587, 1222, 1208, 1215, 1214, 1211, 1205, 1202, 1197, 1210,
821 609, 1212, 1197, 1191, 1191, 1205, 1189, 1202, 0, 0,
822 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194,
823
824 0, 0, 0, 1219, 1218, 1217, 1182, 1181, 432, 596,
825 0, 1194, 1197, 0, 1195, 1183, 1179, 0, 1192, 1189,
826 1188, 1177, 0, 1176, 1166, 1184, 1169, 1172, 620, 1177,
827 1180, 0, 0, 0, 0, 1198, 1197, 1196, 1161, 1160,
828 1160, 0, 1174, 1160, 0, 1171, 1163, 1165, 1168, 653,
829 618, 506, 1158, 1162, 1165, 0, 0, 0, 0, 1186,
830 606, 0, 1162, 1165, 1149, 1157, 1147, 1168, 1157, 1153,
831 1154, 1154, 1153, 1138, 629, 1151, 0, 1152, 1140, 1139,
832 0, 0, 0, 1135, 1165, 1164, 1163, 1128, 1127, 1123,
833 1131, 0, 1161, 623, 0, 1137, 1140, 0, 0, 647,
834
835 0, 1117, 1125, 1610, 722, 1610, 681, 0, 641, 686,
836 1610, 1125, 0, 1121, 1120, 1141, 1130, 1128, 1128, 1115,
837 1130, 1113, 1146, 1125, 1126, 1121, 1142, 0, 0, 1138,
838 1137, 1136, 1096, 1095, 0, 1078, 0, 0, 0, 580,
839 651, 1102, 1085, 1087, 1069, 1080, 1066, 1065, 1084, 1072,
840 1070, 1068, 1085, 1084, 1073, 1031, 1003, 0, 1008, 1061,
841 754, 692, 704, 1024, 1013, 1001, 1015, 996, 997, 996,
842 1029, 1008, 1005, 1026, 1007, 1003, 1005, 988, 985, 999,
843 985, 984, 1017, 678, 0, 993, 996, 988, 979, 987,
844 977, 997, 986, 982, 983, 981, 980, 979, 0, 960,
845
846 955, 988, 958, 23, 138, 188, 681, 0, 188, 210,
847 1610, 269, 710, 728, 1610, 747, 0, 733, 306, 344,
848 328, 335, 0, 353, 374, 365, 383, 395, 411, 425,
849 436, 444, 453, 0, 459, 0, 476, 477, 492, 520,
850 520, 524, 526, 541, 551, 568, 553, 594, 575, 594,
851 607, 607, 640, 599, 617, 621, 616, 619, 623, 625,
852 632, 646, 672, 664, 665, 669, 758, 1610, 777, 690,
853 665, 678, 678, 680, 682, 690, 0, 0, 694, 720,
854 695, 739, 735, 715, 737, 722, 723, 758, 739, 738,
855 761, 740, 745, 743, 747, 732, 731, 747, 734, 737,
856
857 738, 748, 743, 734, 735, 743, 0, 0, 744, 745,
858 746, 781, 762, 761, 784, 777, 762, 757, 762, 0,
859 0, 771, 772, 766, 0, 767, 752, 0, 754, 778,
860 779, 764, 763, 766, 767, 0, 761, 771, 763, 771,
861 794, 775, 0, 0, 774, 791, 792, 0, 0, 793,
862 794, 795, 796, 781, 780, 783, 784, 847, 848, 795,
863 793, 784, 785, 809, 810, 0, 0, 789, 790, 798,
864 0, 0, 799, 822, 796, 824, 819, 813, 800, 822,
865 820, 813, 802, 803, 804, 805, 813, 0, 0, 814,
866 877, 878, 879, 813, 832, 0, 0, 836, 837, 0,
867
868 0, 842, 843, 837, 0, 838, 823, 847, 0, 825,
869 835, 858, 0, 0, 0, 0, 851, 852, 840, 900,
870 850, 852, 904, 845, 846, 839, 841, 865, 866, 0,
871 865, 875, 849, 885, 849, 850, 854, 870, 922, 924,
872 926, 934, 856, 861, 0, 0, 881, 887, 878, 887,
873 0, 901, 0, 0, 896, 943, 944, 1610, 948, 949,
874 955, 905, 0, 0, 885, 890, 892, 915, 0, 900,
875 963, 1610, 965, 916, 918, 971, 903, 905, 0, 927,
876 923, 927, 979, 980, 985, 1610, 0, 0, 924, 940,
877 993, 997, 1610, 998, 1610, 920, 932, 1002, 1610, 0,
878
879 928, 1010, 1011, 1018, 1023, 942, 947, 1024, 1028, 1610,
880 1610, 1071, 1077, 1083, 1090, 1093, 1103, 1109, 1115, 1121,
881 1127, 1138, 1139, 1146, 1157, 1158
882 } ;
883
884 static const flex_int16_t yy_def[1127] =
885 { 0,
886 1111, 1, 1111, 3, 1112, 1112, 1111, 1111, 1111, 1111,
887 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
888 1111, 1111, 1111, 1113, 1111, 1113, 1113, 1113, 1113, 1113,
889 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
890 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111, 1111, 1111,
891 1111, 1111, 1111, 1111, 1111, 1114, 1111, 1111, 1111, 1111,
892 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
893 1111, 19, 1115, 1111, 1111, 1111, 1116, 1111, 20, 1111,
894 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1113, 1111, 1111,
895 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
896
897 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
898 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
899 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
900 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
901 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
902 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111,
903 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
904 1117, 1111, 1114, 1111, 1111, 1111, 1111, 71, 1111, 1111,
905 1111, 1111, 1111, 1118, 1116, 1111, 1111, 1113, 1113, 1113,
906 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
907
908 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
909 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
910 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
911 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
912 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
913 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
914 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
915 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111,
916 1111, 1111, 1117, 1111, 1119, 1111, 1111, 1111, 1111, 1111,
917 1111, 1120, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1113,
918
919 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
920 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
921 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
922 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
923 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
924 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
925 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
926 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
927 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
928 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111, 1111,
929
930 1111, 1111, 1121, 1111, 1111, 1113, 1113, 1113, 1113, 1113,
931 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
932 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
933 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
934 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
935 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
936 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
937 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
938 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
939 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
940
941 1111, 1111, 1111, 1111, 1111, 1113, 1113, 1113, 1113, 1113,
942 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
943 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
944 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
945 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
946 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
947 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
948 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111,
949 1111, 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
950 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
951
952 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
953 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
954 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
955 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
956 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111,
957 1122, 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
958 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
959 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
960 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
961 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
962
963 1113, 1113, 1111, 1111, 1111, 1111, 1111, 1123, 1122, 1111,
964 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
965 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
966 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
967 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
968 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1124,
969 1111, 1125, 1123, 1111, 1111, 1111, 1111, 1113, 1113, 1113,
970 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
971 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
972 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
973
974 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
975 1111, 1124, 1111, 1111, 1111, 1111, 1126, 1125, 1111, 1111,
976 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
977 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
978 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
979 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
980 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1126, 1111,
981 1111, 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
982 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
983 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
984
985 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
986 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111, 1111, 1113,
987 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
988 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
989 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
990 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111,
991 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
992 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
993 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
994 1111, 1111, 1111, 1111, 1111, 1113, 1113, 1113, 1113, 1113,
995
996 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
997 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111,
998 1111, 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
999 1113, 1113, 1113, 1113, 1113, 1113, 1111, 1111, 1111, 1111,
1000 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
1001 1113, 1113, 1113, 1113, 1111, 1111, 1111, 1111, 1111, 1111,
1002 1111, 1111, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1111,
1003 1111, 1111, 1111, 1111, 1111, 1111, 1113, 1113, 1113, 1113,
1004 1111, 1111, 1111, 1111, 1111, 1111, 1113, 1113, 1113, 1111,
1005 1111, 1111, 1111, 1111, 1111, 1113, 1111, 1111, 1111, 1113,
1006
1007 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1008 0, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1009 1111, 1111, 1111, 1111, 1111, 1111
1010 } ;
1011
1012 static const flex_int16_t yy_nxt[1684] =
1013 { 0,
1014 8, 9, 10, 9, 9, 11, 8, 8, 12, 13,
1015 8, 8, 14, 15, 16, 17, 18, 19, 20, 20,
1016 20, 20, 20, 20, 20, 8, 21, 22, 23, 24,
1017 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
1018 24, 24, 24, 24, 24, 25, 24, 26, 27, 28,
1019 29, 30, 31, 32, 33, 34, 24, 24, 35, 36,
1020 37, 38, 39, 40, 41, 42, 43, 44, 45, 24,
1021 24, 24, 46, 47, 859, 59, 47, 59, 59, 48,
1022 49, 50, 51, 50, 50, 49, 49, 49, 49, 49,
1023 49, 49, 49, 49, 49, 49, 52, 53, 54, 54,
1024
1025 54, 54, 54, 54, 54, 55, 49, 49, 49, 56,
1026 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
1027 56, 56, 56, 56, 56, 49, 56, 56, 56, 56,
1028 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
1029 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
1030 56, 56, 49, 62, 65, 89, 67, 69, 69, 69,
1031 69, 69, 69, 69, 69, 83, 84, 860, 66, 68,
1032 91, 63, 71, 90, 72, 72, 72, 72, 72, 72,
1033 72, 73, 86, 87, 98, 92, 93, 94, 99, 95,
1034 74, 116, 96, 97, 75, 100, 233, 1111, 101, 117,
1035
1036 76, 77, 102, 107, 234, 108, 103, 126, 74, 128,
1037 104, 118, 105, 129, 109, 75, 190, 861, 106, 157,
1038 191, 127, 1111, 78, 130, 119, 77, 71, 158, 79,
1039 79, 79, 79, 79, 79, 79, 79, 159, 131, 110,
1040 865, 136, 154, 267, 149, 74, 155, 111, 133, 80,
1041 112, 137, 268, 113, 120, 81, 156, 121, 866, 114,
1042 214, 122, 123, 74, 134, 138, 124, 135, 145, 125,
1043 80, 146, 139, 140, 215, 813, 150, 141, 82, 212,
1044 147, 151, 160, 142, 143, 152, 144, 148, 153, 161,
1045 213, 59, 161, 163, 164, 162, 163, 170, 71, 170,
1046
1047 170, 172, 172, 172, 172, 172, 172, 172, 172, 59,
1048 246, 59, 59, 183, 183, 251, 74, 184, 184, 184,
1049 184, 184, 184, 184, 184, 199, 202, 247, 248, 252,
1050 200, 201, 225, 203, 74, 226, 227, 238, 870, 228,
1051 269, 229, 241, 165, 239, 265, 266, 166, 270, 362,
1052 167, 340, 255, 363, 168, 257, 242, 307, 243, 169,
1053 69, 69, 69, 69, 69, 69, 69, 69, 256, 258,
1054 274, 308, 161, 275, 59, 161, 174, 175, 162, 341,
1055 176, 163, 164, 170, 163, 170, 170, 313, 314, 348,
1056 349, 350, 871, 872, 174, 175, 163, 164, 873, 163,
1057
1058 874, 177, 178, 178, 178, 178, 178, 178, 178, 178,
1059 172, 172, 172, 172, 172, 172, 172, 172, 179, 180,
1060 383, 875, 181, 390, 391, 392, 287, 288, 876, 384,
1061 289, 165, 411, 412, 413, 166, 179, 180, 167, 423,
1062 424, 425, 168, 182, 287, 288, 165, 169, 877, 581,
1063 166, 290, 581, 167, 427, 428, 429, 168, 878, 284,
1064 284, 665, 169, 285, 285, 285, 285, 285, 285, 285,
1065 285, 291, 291, 666, 879, 292, 292, 292, 292, 292,
1066 292, 292, 292, 184, 184, 184, 184, 184, 184, 184,
1067 184, 294, 297, 175, 295, 880, 176, 881, 298, 285,
1068
1069 285, 285, 285, 285, 285, 285, 285, 710, 623, 294,
1070 710, 175, 624, 297, 882, 296, 883, 177, 402, 402,
1071 884, 299, 403, 403, 403, 403, 403, 403, 403, 403,
1072 292, 292, 292, 292, 292, 292, 292, 292, 180, 885,
1073 886, 181, 435, 436, 437, 439, 440, 441, 452, 453,
1074 454, 494, 495, 496, 288, 887, 180, 289, 536, 537,
1075 538, 888, 182, 403, 403, 403, 403, 403, 403, 403,
1076 403, 889, 288, 525, 526, 527, 890, 891, 290, 539,
1077 540, 541, 542, 543, 544, 528, 529, 591, 592, 593,
1078 594, 595, 596, 597, 598, 599, 601, 602, 603, 604,
1079
1080 605, 606, 633, 634, 635, 636, 637, 638, 892, 789,
1081 581, 607, 608, 581, 893, 894, 895, 639, 640, 705,
1082 706, 790, 705, 896, 897, 667, 650, 651, 651, 651,
1083 651, 651, 651, 651, 668, 715, 669, 670, 685, 686,
1084 687, 898, 705, 706, 716, 705, 717, 730, 731, 732,
1085 688, 689, 748, 690, 705, 706, 899, 705, 900, 733,
1086 734, 749, 903, 750, 904, 753, 754, 755, 905, 901,
1087 707, 707, 707, 707, 707, 707, 707, 756, 757, 906,
1088 791, 902, 705, 706, 907, 705, 908, 710, 909, 792,
1089 710, 793, 794, 814, 815, 910, 814, 708, 707, 707,
1090
1091 707, 707, 707, 707, 707, 705, 706, 839, 705, 911,
1092 862, 867, 868, 912, 867, 913, 840, 914, 841, 863,
1093 915, 864, 708, 705, 706, 916, 705, 764, 760, 814,
1094 815, 917, 814, 918, 814, 815, 765, 814, 919, 761,
1095 762, 762, 762, 762, 762, 762, 762, 766, 814, 815,
1096 920, 814, 921, 922, 767, 814, 815, 923, 814, 867,
1097 868, 924, 867, 925, 816, 816, 816, 816, 816, 816,
1098 816, 816, 816, 816, 816, 816, 816, 816, 814, 815,
1099 926, 814, 927, 928, 929, 930, 931, 932, 933, 934,
1100 935, 936, 937, 938, 939, 940, 941, 942, 817, 943,
1101
1102 944, 945, 946, 947, 948, 949, 950, 951, 952, 953,
1103 954, 955, 956, 957, 958, 959, 960, 961, 962, 963,
1104 964, 965, 966, 817, 967, 968, 969, 970, 971, 972,
1105 973, 974, 975, 976, 977, 978, 979, 980, 981, 982,
1106 983, 984, 985, 986, 987, 988, 989, 990, 991, 992,
1107 994, 991, 992, 995, 996, 997, 998, 999, 993, 1000,
1108 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
1109 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 991, 992,
1110 1020, 991, 992, 1020, 1022, 1023, 1024, 1025, 993, 1026,
1111 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036,
1112
1113 1037, 1020, 1038, 1040, 1020, 1041, 1043, 1044, 1041, 1045,
1114 1039, 1046, 1047, 1048, 1042, 1049, 1050, 1051, 1052, 1053,
1115 1054, 1055, 1056, 1057, 1063, 1059, 1057, 1041, 1059, 1064,
1116 1041, 1065, 1019, 1058, 1060, 1061, 1042, 1066, 1061, 1067,
1117 1021, 1068, 1069, 1070, 1071, 1057, 1077, 1071, 1057, 1059,
1118 1073, 1078, 1059, 1073, 1072, 1058, 1061, 1075, 1060, 1061,
1119 1079, 1021, 1080, 1081, 1071, 1076, 1073, 1071, 1082, 1073,
1120 1084, 1087, 1085, 1088, 1072, 1085, 1083, 1089, 1090, 1091,
1121 1092, 1094, 1086, 1092, 1094, 1096, 1085, 1097, 1100, 1085,
1122 1093, 1095, 1101, 1102, 1098, 1062, 1086, 1098, 1092, 1094,
1123
1124 1107, 1092, 1094, 1098, 1099, 1108, 1098, 858, 1093, 1095,
1125 1074, 1103, 1103, 1099, 1103, 1103, 1062, 857, 856, 1105,
1126 1104, 1104, 1105, 855, 1105, 1109, 1074, 1105, 1109, 1109,
1127 854, 853, 1109, 852, 851, 1110, 850, 849, 848, 1110,
1128 847, 846, 845, 844, 843, 842, 838, 837, 836, 835,
1129 834, 833, 832, 831, 830, 829, 828, 827, 826, 825,
1130 824, 823, 822, 821, 820, 1106, 819, 813, 811, 810,
1131 1106, 57, 57, 57, 57, 57, 57, 57, 57, 57,
1132 57, 57, 57, 88, 88, 88, 88, 88, 88, 173,
1133 173, 173, 173, 173, 173, 73, 73, 809, 73, 185,
1134
1135 185, 185, 185, 283, 283, 808, 283, 283, 283, 283,
1136 283, 283, 283, 283, 283, 184, 807, 806, 184, 805,
1137 184, 285, 804, 803, 285, 802, 285, 292, 801, 800,
1138 292, 799, 292, 403, 798, 797, 403, 796, 403, 709,
1139 709, 709, 795, 788, 709, 763, 763, 763, 763, 812,
1140 812, 812, 812, 812, 812, 812, 812, 812, 818, 818,
1141 818, 787, 786, 818, 869, 869, 869, 869, 785, 784,
1142 783, 782, 781, 780, 779, 778, 777, 776, 775, 774,
1143 773, 772, 771, 770, 769, 768, 759, 758, 752, 751,
1144 747, 746, 745, 744, 743, 742, 741, 740, 739, 738,
1145
1146 737, 736, 735, 729, 728, 727, 726, 725, 724, 723,
1147 722, 721, 720, 719, 718, 714, 713, 712, 711, 704,
1148 703, 702, 701, 700, 699, 698, 697, 696, 695, 694,
1149 693, 692, 691, 684, 683, 682, 681, 680, 679, 678,
1150 677, 676, 675, 674, 673, 672, 671, 664, 663, 662,
1151 661, 660, 659, 658, 657, 656, 655, 654, 653, 652,
1152 649, 648, 647, 646, 645, 644, 643, 642, 641, 632,
1153 631, 630, 629, 628, 627, 626, 625, 622, 621, 620,
1154 619, 618, 617, 616, 615, 614, 613, 612, 611, 610,
1155 609, 600, 590, 589, 588, 587, 586, 585, 584, 583,
1156
1157 582, 580, 579, 578, 577, 576, 575, 574, 573, 572,
1158 571, 570, 569, 568, 567, 566, 565, 564, 563, 562,
1159 561, 560, 559, 558, 557, 556, 555, 554, 553, 552,
1160 551, 550, 549, 548, 547, 546, 545, 535, 534, 533,
1161 532, 531, 530, 524, 523, 522, 521, 520, 519, 518,
1162 517, 516, 515, 514, 513, 512, 511, 510, 509, 508,
1163 507, 506, 505, 504, 503, 502, 501, 500, 499, 498,
1164 497, 493, 492, 491, 490, 489, 488, 487, 486, 485,
1165 484, 483, 482, 481, 480, 479, 478, 477, 476, 475,
1166 474, 473, 472, 471, 470, 469, 468, 467, 466, 465,
1167
1168 464, 463, 462, 461, 460, 459, 458, 457, 456, 455,
1169 451, 450, 449, 448, 447, 446, 445, 444, 443, 442,
1170 438, 434, 433, 432, 431, 430, 426, 422, 421, 420,
1171 419, 418, 417, 416, 415, 414, 410, 409, 408, 407,
1172 406, 297, 297, 405, 405, 404, 404, 401, 400, 399,
1173 398, 397, 396, 395, 394, 393, 389, 388, 387, 386,
1174 385, 382, 381, 380, 379, 378, 377, 376, 375, 374,
1175 373, 372, 371, 370, 369, 368, 367, 366, 365, 364,
1176 361, 360, 359, 358, 357, 356, 355, 354, 353, 352,
1177 351, 347, 346, 345, 344, 343, 342, 339, 338, 337,
1178
1179 336, 335, 334, 333, 332, 331, 330, 329, 328, 327,
1180 326, 325, 324, 323, 322, 321, 320, 319, 318, 317,
1181 316, 315, 312, 311, 310, 309, 306, 305, 304, 303,
1182 302, 301, 300, 293, 293, 286, 286, 282, 281, 280,
1183 279, 278, 277, 276, 273, 272, 271, 264, 263, 262,
1184 261, 260, 259, 254, 253, 250, 249, 245, 244, 240,
1185 237, 236, 235, 232, 231, 230, 224, 223, 222, 221,
1186 220, 219, 218, 217, 216, 211, 210, 209, 208, 207,
1187 206, 205, 204, 198, 197, 196, 195, 194, 193, 192,
1188 189, 188, 187, 186, 80, 80, 75, 75, 171, 132,
1189
1190 115, 85, 70, 64, 61, 60, 1111, 58, 58, 7,
1191 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1192 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1193 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1194 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1195 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1196 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1197 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1198 1111, 1111, 1111
1199 } ;
1200
1201 static const flex_int16_t yy_chk[1684] =
1202 { 0,
1203 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1204 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1205 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1206 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1207 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1208 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1209 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1210 1, 1, 1, 2, 804, 9, 2, 9, 9, 2,
1211 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1212 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1213
1214 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1215 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1216 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1217 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1218 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1219 3, 3, 3, 13, 15, 25, 16, 17, 17, 17,
1220 17, 17, 17, 17, 17, 21, 21, 805, 15, 16,
1221 26, 13, 19, 25, 19, 19, 19, 19, 19, 19,
1222 19, 19, 23, 23, 28, 26, 26, 27, 28, 27,
1223 19, 33, 27, 27, 19, 28, 127, 72, 28, 33,
1224
1225 19, 19, 29, 30, 127, 30, 29, 35, 19, 36,
1226 29, 33, 29, 36, 30, 19, 93, 806, 29, 45,
1227 93, 35, 72, 19, 37, 34, 19, 20, 45, 20,
1228 20, 20, 20, 20, 20, 20, 20, 46, 37, 31,
1229 809, 40, 44, 151, 43, 20, 44, 31, 39, 20,
1230 31, 40, 151, 31, 34, 20, 44, 34, 810, 31,
1231 112, 34, 34, 20, 39, 41, 34, 39, 42, 34,
1232 20, 42, 41, 41, 112, 812, 43, 41, 20, 111,
1233 42, 43, 46, 41, 41, 43, 41, 42, 43, 47,
1234 111, 47, 47, 48, 48, 47, 48, 50, 73, 50,
1235
1236 50, 54, 54, 54, 54, 54, 54, 54, 54, 59,
1237 136, 59, 59, 74, 74, 139, 73, 74, 74, 74,
1238 74, 74, 74, 74, 74, 101, 102, 136, 136, 139,
1239 101, 101, 123, 102, 73, 123, 123, 131, 819, 123,
1240 152, 123, 133, 48, 131, 150, 150, 48, 152, 247,
1241 48, 228, 142, 247, 48, 143, 133, 196, 133, 48,
1242 69, 69, 69, 69, 69, 69, 69, 69, 142, 143,
1243 156, 196, 161, 156, 161, 161, 69, 69, 161, 228,
1244 69, 162, 162, 170, 162, 170, 170, 201, 201, 235,
1245 235, 235, 820, 821, 69, 69, 163, 163, 822, 163,
1246
1247 824, 69, 71, 71, 71, 71, 71, 71, 71, 71,
1248 172, 172, 172, 172, 172, 172, 172, 172, 71, 71,
1249 267, 825, 71, 273, 273, 273, 178, 178, 826, 267,
1250 178, 162, 306, 306, 306, 162, 71, 71, 162, 318,
1251 318, 318, 162, 71, 178, 178, 163, 162, 827, 503,
1252 163, 178, 503, 163, 320, 320, 320, 163, 828, 174,
1253 174, 609, 163, 174, 174, 174, 174, 174, 174, 174,
1254 174, 179, 179, 609, 829, 179, 179, 179, 179, 179,
1255 179, 179, 179, 183, 183, 183, 183, 183, 183, 183,
1256 183, 184, 185, 285, 184, 830, 285, 831, 185, 284,
1257
1258 284, 284, 284, 284, 284, 284, 284, 652, 552, 184,
1259 652, 285, 552, 185, 832, 184, 833, 285, 287, 287,
1260 835, 185, 287, 287, 287, 287, 287, 287, 287, 287,
1261 291, 291, 291, 291, 291, 291, 291, 291, 292, 837,
1262 838, 292, 329, 329, 329, 333, 333, 333, 344, 344,
1263 344, 388, 388, 388, 403, 839, 292, 403, 456, 456,
1264 456, 840, 292, 402, 402, 402, 402, 402, 402, 402,
1265 402, 841, 403, 444, 444, 444, 842, 843, 403, 457,
1266 457, 457, 458, 458, 458, 444, 444, 517, 517, 517,
1267 518, 518, 518, 519, 519, 519, 523, 523, 523, 524,
1268
1269 524, 524, 570, 570, 570, 571, 571, 571, 844, 740,
1270 581, 524, 524, 581, 845, 846, 847, 571, 571, 651,
1271 651, 740, 651, 848, 849, 610, 581, 581, 581, 581,
1272 581, 581, 581, 581, 610, 661, 610, 610, 629, 629,
1273 629, 850, 709, 709, 661, 709, 661, 675, 675, 675,
1274 629, 629, 694, 629, 650, 650, 851, 650, 852, 675,
1275 675, 694, 854, 694, 855, 700, 700, 700, 856, 853,
1276 650, 650, 650, 650, 650, 650, 650, 700, 700, 857,
1277 741, 853, 707, 707, 858, 707, 859, 710, 860, 741,
1278 710, 741, 741, 762, 762, 861, 762, 650, 707, 707,
1279
1280 707, 707, 707, 707, 707, 763, 763, 784, 763, 862,
1281 807, 813, 813, 863, 813, 864, 784, 865, 784, 807,
1282 866, 807, 650, 705, 705, 870, 705, 710, 705, 814,
1283 814, 871, 814, 872, 818, 818, 710, 818, 873, 705,
1284 705, 705, 705, 705, 705, 705, 705, 710, 816, 816,
1285 874, 816, 875, 876, 710, 761, 761, 879, 761, 867,
1286 867, 880, 867, 881, 816, 816, 816, 816, 816, 816,
1287 816, 761, 761, 761, 761, 761, 761, 761, 869, 869,
1288 882, 869, 883, 884, 885, 886, 887, 888, 889, 890,
1289 891, 892, 893, 894, 895, 896, 897, 898, 761, 899,
1290
1291 900, 901, 902, 903, 904, 905, 906, 909, 910, 911,
1292 912, 913, 914, 915, 916, 917, 918, 919, 922, 923,
1293 924, 926, 927, 761, 929, 930, 931, 932, 933, 934,
1294 935, 937, 938, 939, 940, 941, 942, 945, 946, 947,
1295 950, 951, 952, 953, 954, 955, 956, 957, 958, 959,
1296 960, 958, 959, 961, 962, 963, 964, 965, 959, 968,
1297 969, 970, 973, 974, 975, 976, 977, 978, 979, 980,
1298 981, 982, 983, 984, 985, 986, 987, 990, 991, 992,
1299 993, 991, 992, 993, 994, 995, 998, 999, 992, 1002,
1300 1003, 1004, 1006, 1007, 1008, 1010, 1011, 1012, 1017, 1018,
1301
1302 1019, 1020, 1021, 1022, 1020, 1023, 1024, 1025, 1023, 1026,
1303 1021, 1027, 1028, 1029, 1023, 1031, 1032, 1033, 1034, 1035,
1304 1036, 1037, 1038, 1039, 1043, 1040, 1039, 1041, 1040, 1044,
1305 1041, 1047, 991, 1039, 1040, 1042, 1041, 1048, 1042, 1049,
1306 993, 1050, 1052, 1055, 1056, 1057, 1065, 1056, 1057, 1059,
1307 1060, 1066, 1059, 1060, 1056, 1057, 1061, 1062, 1059, 1061,
1308 1067, 1020, 1068, 1070, 1071, 1062, 1073, 1071, 1074, 1073,
1309 1075, 1077, 1076, 1078, 1071, 1076, 1074, 1080, 1081, 1082,
1310 1083, 1084, 1076, 1083, 1084, 1089, 1085, 1090, 1096, 1085,
1311 1083, 1084, 1097, 1101, 1091, 1042, 1085, 1091, 1092, 1094,
1312
1313 1106, 1092, 1094, 1098, 1091, 1107, 1098, 803, 1092, 1094,
1314 1060, 1102, 1103, 1098, 1102, 1103, 1061, 802, 801, 1104,
1315 1102, 1103, 1104, 800, 1105, 1108, 1073, 1105, 1108, 1109,
1316 798, 797, 1109, 796, 795, 1108, 794, 793, 792, 1109,
1317 791, 790, 789, 788, 787, 786, 783, 782, 781, 780,
1318 779, 778, 777, 776, 775, 774, 773, 772, 771, 770,
1319 769, 768, 767, 766, 765, 1104, 764, 760, 759, 757,
1320 1105, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112,
1321 1112, 1112, 1112, 1113, 1113, 1113, 1113, 1113, 1113, 1114,
1322 1114, 1114, 1114, 1114, 1114, 1115, 1115, 756, 1115, 1116,
1323
1324 1116, 1116, 1116, 1117, 1117, 755, 1117, 1117, 1117, 1117,
1325 1117, 1117, 1117, 1117, 1117, 1118, 754, 753, 1118, 752,
1326 1118, 1119, 751, 750, 1119, 749, 1119, 1120, 748, 747,
1327 1120, 746, 1120, 1121, 745, 744, 1121, 743, 1121, 1122,
1328 1122, 1122, 742, 736, 1122, 1123, 1123, 1123, 1123, 1124,
1329 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1125, 1125,
1330 1125, 734, 733, 1125, 1126, 1126, 1126, 1126, 732, 731,
1331 730, 727, 726, 725, 724, 723, 722, 721, 720, 719,
1332 718, 717, 716, 715, 714, 712, 703, 702, 697, 696,
1333 693, 691, 690, 689, 688, 687, 686, 685, 684, 680,
1334
1335 679, 678, 676, 674, 673, 672, 671, 670, 669, 668,
1336 667, 666, 665, 664, 663, 660, 655, 654, 653, 649,
1337 648, 647, 646, 644, 643, 641, 640, 639, 638, 637,
1338 636, 631, 630, 628, 627, 626, 625, 624, 622, 621,
1339 620, 619, 617, 616, 615, 613, 612, 608, 607, 606,
1340 605, 604, 600, 588, 587, 586, 585, 584, 583, 582,
1341 580, 579, 578, 577, 576, 575, 574, 573, 572, 569,
1342 568, 565, 559, 558, 556, 555, 554, 551, 548, 547,
1343 546, 545, 534, 533, 532, 531, 529, 528, 527, 526,
1344 525, 521, 516, 514, 513, 511, 510, 508, 507, 505,
1345
1346 504, 502, 501, 500, 498, 497, 492, 491, 489, 488,
1347 487, 486, 485, 484, 483, 482, 481, 480, 479, 478,
1348 477, 475, 474, 473, 472, 471, 470, 469, 468, 467,
1349 465, 464, 463, 462, 461, 460, 459, 455, 451, 450,
1350 449, 448, 445, 443, 442, 432, 430, 426, 425, 424,
1351 423, 422, 421, 420, 419, 417, 416, 414, 410, 408,
1352 407, 406, 401, 400, 399, 398, 397, 396, 395, 394,
1353 389, 387, 386, 385, 384, 383, 382, 381, 380, 379,
1354 376, 375, 374, 373, 372, 371, 370, 369, 368, 367,
1355 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
1356
1357 356, 355, 354, 353, 352, 351, 350, 349, 348, 345,
1358 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
1359 332, 328, 326, 325, 324, 323, 319, 317, 316, 315,
1360 314, 313, 312, 311, 310, 309, 305, 304, 302, 301,
1361 300, 299, 298, 296, 295, 290, 289, 282, 281, 280,
1362 279, 278, 277, 276, 275, 274, 272, 271, 270, 269,
1363 268, 266, 265, 264, 263, 262, 261, 260, 259, 258,
1364 257, 256, 255, 254, 253, 252, 251, 250, 249, 248,
1365 246, 245, 244, 243, 242, 241, 240, 239, 238, 237,
1366 236, 234, 233, 232, 231, 230, 229, 227, 226, 225,
1367
1368 224, 223, 222, 221, 220, 219, 218, 217, 215, 214,
1369 213, 212, 211, 210, 209, 208, 207, 206, 205, 204,
1370 203, 202, 200, 199, 198, 197, 195, 194, 193, 192,
1371 191, 190, 188, 182, 181, 177, 176, 169, 168, 167,
1372 166, 165, 158, 157, 155, 154, 153, 149, 148, 147,
1373 146, 145, 144, 141, 140, 138, 137, 135, 134, 132,
1374 130, 129, 128, 126, 125, 124, 122, 121, 119, 118,
1375 117, 116, 115, 114, 113, 110, 109, 108, 107, 106,
1376 105, 104, 103, 100, 99, 98, 97, 96, 95, 94,
1377 92, 91, 87, 83, 82, 81, 78, 76, 52, 38,
1378
1379 32, 22, 18, 14, 12, 11, 7, 6, 5, 1111,
1380 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1381 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1382 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1383 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1384 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1385 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1386 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111,
1387 1111, 1111, 1111
1388 } ;
1389
1390 /* The intent behind this definition is that it'll catch
1391 * any uses of REJECT which flex missed.
1392 */
1393 #define REJECT reject_used_but_not_detected
1394 #define yymore() yymore_used_but_not_detected
1395 #define YY_MORE_ADJ 0
1396 #define YY_RESTORE_YY_MORE_OFFSET
1397 #line 1 "src/compiler/glsl/glsl_lexer.ll"
1398 #line 2 "src/compiler/glsl/glsl_lexer.ll"
1399 /*
1400 * Copyright © 2008, 2009 Intel Corporation
1401 *
1402 * Permission is hereby granted, free of charge, to any person obtaining a
1403 * copy of this software and associated documentation files (the "Software"),
1404 * to deal in the Software without restriction, including without limitation
1405 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1406 * and/or sell copies of the Software, and to permit persons to whom the
1407 * Software is furnished to do so, subject to the following conditions:
1408 *
1409 * The above copyright notice and this permission notice (including the next
1410 * paragraph) shall be included in all copies or substantial portions of the
1411 * Software.
1412 *
1413 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1415 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1416 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1417 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1418 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1419 * DEALINGS IN THE SOFTWARE.
1420 */
1421 #include <ctype.h>
1422 #include <limits.h>
1423 #include "util/strtod.h"
1424 #include "ast.h"
1425 #include "glsl_parser_extras.h"
1426 #include "glsl_parser.h"
1427 #include "main/mtypes.h"
1428
1429 static int classify_identifier(struct _mesa_glsl_parse_state *, const char *,
1430 unsigned name_len, YYSTYPE *output);
1431
1432 #ifdef _MSC_VER
1433 #define YY_NO_UNISTD_H
1434 #endif
1435
1436 #define YY_NO_INPUT
1437 #define YY_USER_ACTION \
1438 do { \
1439 yylloc->first_column = yycolumn + 1; \
1440 yylloc->first_line = yylloc->last_line = yylineno + 1; \
1441 yycolumn += yyleng; \
1442 yylloc->last_column = yycolumn + 1; \
1443 } while(0);
1444
1445 #define YY_USER_INIT yylineno = 0; yycolumn = 0; yylloc->source = 0; \
1446 yylloc->path = NULL;
1447
1448 /* A macro for handling reserved words and keywords across language versions.
1449 *
1450 * Certain words start out as identifiers, become reserved words in
1451 * later language revisions, and finally become language keywords.
1452 * This may happen at different times in desktop GLSL and GLSL ES.
1453 *
1454 * For example, consider the following lexer rule:
1455 * samplerBuffer KEYWORD(130, 0, 140, 0, SAMPLERBUFFER)
1456 *
1457 * This means that "samplerBuffer" will be treated as:
1458 * - a keyword (SAMPLERBUFFER token) ...in GLSL >= 1.40
1459 * - a reserved word - error ...in GLSL >= 1.30
1460 * - an identifier ...in GLSL < 1.30 or GLSL ES
1461 */
1462 #define KEYWORD(reserved_glsl, reserved_glsl_es, \
1463 allowed_glsl, allowed_glsl_es, token) \
1464 KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
1465 allowed_glsl, allowed_glsl_es, false, token)
1466
1467 /**
1468 * Like the KEYWORD macro, but the word is also treated as a keyword
1469 * if the given boolean expression is true.
1470 */
1471 #define KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
1472 allowed_glsl, allowed_glsl_es, \
1473 alt_expr, token) \
1474 do { \
1475 if (yyextra->is_version(allowed_glsl, allowed_glsl_es) \
1476 || (alt_expr)) { \
1477 return token; \
1478 } else if (yyextra->is_version(reserved_glsl, \
1479 reserved_glsl_es)) { \
1480 _mesa_glsl_error(yylloc, yyextra, \
1481 "illegal use of reserved word `%s'", yytext); \
1482 return ERROR_TOK; \
1483 } else { \
1484 return classify_identifier(yyextra, yytext, yyleng, yylval); \
1485 } \
1486 } while (0)
1487
1488 /**
1489 * Like KEYWORD_WITH_ALT, but used for built-in GLSL types
1490 */
1491 #define TYPE_WITH_ALT(reserved_glsl, reserved_glsl_es, \
1492 allowed_glsl, allowed_glsl_es, \
1493 alt_expr, gtype) \
1494 do { \
1495 if (yyextra->is_version(allowed_glsl, allowed_glsl_es) \
1496 || (alt_expr)) { \
1497 yylval->type = gtype; \
1498 return BASIC_TYPE_TOK; \
1499 } else if (yyextra->is_version(reserved_glsl, \
1500 reserved_glsl_es)) { \
1501 _mesa_glsl_error(yylloc, yyextra, \
1502 "illegal use of reserved word `%s'", yytext); \
1503 return ERROR_TOK; \
1504 } else { \
1505 return classify_identifier(yyextra, yytext, yyleng, yylval); \
1506 } \
1507 } while (0)
1508
1509 #define TYPE(reserved_glsl, reserved_glsl_es, \
1510 allowed_glsl, allowed_glsl_es, \
1511 gtype) \
1512 TYPE_WITH_ALT(reserved_glsl, reserved_glsl_es, \
1513 allowed_glsl, allowed_glsl_es, \
1514 false, gtype)
1515
1516 /**
1517 * A macro for handling keywords that have been present in GLSL since
1518 * its origin, but were changed into reserved words in GLSL 3.00 ES.
1519 */
1520 #define DEPRECATED_ES_KEYWORD(token) \
1521 do { \
1522 if (yyextra->is_version(0, 300)) { \
1523 _mesa_glsl_error(yylloc, yyextra, \
1524 "illegal use of reserved word `%s'", yytext); \
1525 return ERROR_TOK; \
1526 } else { \
1527 return token; \
1528 } \
1529 } while (0)
1530
1531 /**
1532 * Like DEPRECATED_ES_KEYWORD, but for types
1533 */
1534 #define DEPRECATED_ES_TYPE_WITH_ALT(alt_expr, gtype) \
1535 do { \
1536 if (yyextra->is_version(0, 300)) { \
1537 _mesa_glsl_error(yylloc, yyextra, \
1538 "illegal use of reserved word `%s'", yytext); \
1539 return ERROR_TOK; \
1540 } else if (alt_expr) { \
1541 yylval->type = gtype; \
1542 return BASIC_TYPE_TOK; \
1543 } else { \
1544 return classify_identifier(yyextra, yytext, yyleng, yylval); \
1545 } \
1546 } while (0)
1547
1548 #define DEPRECATED_ES_TYPE(gtype) \
1549 DEPRECATED_ES_TYPE_WITH_ALT(true, gtype)
1550
1551 static int
literal_integer(char * text,int len,struct _mesa_glsl_parse_state * state,YYSTYPE * lval,YYLTYPE * lloc,int base)1552 literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
1553 YYSTYPE *lval, YYLTYPE *lloc, int base)
1554 {
1555 bool is_uint = (text[len - 1] == 'u' ||
1556 text[len - 1] == 'U');
1557 bool is_long = (text[len - 1] == 'l' || text[len - 1] == 'L');
1558 const char *digits = text;
1559
1560 if (is_long)
1561 is_uint = (text[len - 2] == 'u' && text[len - 1] == 'l') ||
1562 (text[len - 2] == 'U' && text[len - 1] == 'L');
1563 /* Skip "0x" */
1564 if (base == 16)
1565 digits += 2;
1566
1567 unsigned long long value = strtoull(digits, NULL, base);
1568
1569 if (is_long)
1570 lval->n64 = (int64_t)value;
1571 else
1572 lval->n = (int)value;
1573
1574 if (is_long && !is_uint && base == 10 && value > (uint64_t)LLONG_MAX + 1) {
1575 /* Tries to catch unintentionally providing a negative value. */
1576 _mesa_glsl_warning(lloc, state,
1577 "signed literal value `%s' is interpreted as %lld",
1578 text, lval->n64);
1579 } else if (!is_long && value > UINT_MAX) {
1580 /* Note that signed 0xffffffff is valid, not out of range! */
1581 if (state->is_version(130, 300)) {
1582 _mesa_glsl_error(lloc, state,
1583 "literal value `%s' out of range", text);
1584 } else {
1585 _mesa_glsl_warning(lloc, state,
1586 "literal value `%s' out of range", text);
1587 }
1588 } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) {
1589 /* Tries to catch unintentionally providing a negative value.
1590 * Note that -2147483648 is parsed as -(2147483648), so we don't
1591 * want to warn for INT_MAX.
1592 */
1593 _mesa_glsl_warning(lloc, state,
1594 "signed literal value `%s' is interpreted as %d",
1595 text, lval->n);
1596 }
1597 if (is_long)
1598 return is_uint ? UINT64CONSTANT : INT64CONSTANT;
1599 else
1600 return is_uint ? UINTCONSTANT : INTCONSTANT;
1601 }
1602
1603 #define LITERAL_INTEGER(base) \
1604 literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
1605
1606 #line 1606 "src/compiler/glsl/glsl_lexer.cpp"
1607 #line 219 "src/compiler/glsl/glsl_lexer.ll"
1608 /* Note: When adding any start conditions to this list, you must also
1609 * update the "Internal compiler error" catch-all rule near the end of
1610 * this file. */
1611
1612 #line 1612 "src/compiler/glsl/glsl_lexer.cpp"
1613
1614 #define INITIAL 0
1615 #define PP 1
1616 #define PRAGMA 2
1617
1618 #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
1619
1620 /* Holds the entire state of the reentrant scanner. */
1621 struct yyguts_t
1622 {
1623
1624 /* User-defined. Not touched by flex. */
1625 YY_EXTRA_TYPE yyextra_r;
1626
1627 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1628 FILE *yyin_r, *yyout_r;
1629 size_t yy_buffer_stack_top; /**< index of top of stack. */
1630 size_t yy_buffer_stack_max; /**< capacity of stack. */
1631 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1632 char yy_hold_char;
1633 int yy_n_chars;
1634 int yyleng_r;
1635 char *yy_c_buf_p;
1636 int yy_init;
1637 int yy_start;
1638 int yy_did_buffer_switch_on_eof;
1639 int yy_start_stack_ptr;
1640 int yy_start_stack_depth;
1641 int *yy_start_stack;
1642 yy_state_type yy_last_accepting_state;
1643 char* yy_last_accepting_cpos;
1644
1645 int yylineno_r;
1646 int yy_flex_debug_r;
1647
1648 char *yytext_r;
1649 int yy_more_flag;
1650 int yy_more_len;
1651
1652 YYSTYPE * yylval_r;
1653
1654 YYLTYPE * yylloc_r;
1655
1656 }; /* end struct yyguts_t */
1657
1658 static int yy_init_globals ( yyscan_t yyscanner );
1659
1660 /* This must go here because YYSTYPE and YYLTYPE are included
1661 * from bison output in section 1.*/
1662 # define yylval yyg->yylval_r
1663
1664 # define yylloc yyg->yylloc_r
1665
1666 int yylex_init (yyscan_t* scanner);
1667
1668 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1669
1670 /* Accessor methods to globals.
1671 These are made visible to non-reentrant scanners for convenience. */
1672
1673 int yylex_destroy ( yyscan_t yyscanner );
1674
1675 int yyget_debug ( yyscan_t yyscanner );
1676
1677 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1678
1679 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1680
1681 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1682
1683 FILE *yyget_in ( yyscan_t yyscanner );
1684
1685 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1686
1687 FILE *yyget_out ( yyscan_t yyscanner );
1688
1689 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1690
1691 int yyget_leng ( yyscan_t yyscanner );
1692
1693 char *yyget_text ( yyscan_t yyscanner );
1694
1695 int yyget_lineno ( yyscan_t yyscanner );
1696
1697 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1698
1699 int yyget_column ( yyscan_t yyscanner );
1700
1701 void yyset_column ( int _column_no , yyscan_t yyscanner );
1702
1703 YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1704
1705 void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1706
1707 YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1708
1709 void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1710
1711 /* Macros after this point can all be overridden by user definitions in
1712 * section 1.
1713 */
1714
1715 #ifndef YY_SKIP_YYWRAP
1716 #ifdef __cplusplus
1717 extern "C" int yywrap ( yyscan_t yyscanner );
1718 #else
1719 extern int yywrap ( yyscan_t yyscanner );
1720 #endif
1721 #endif
1722
1723 #ifndef YY_NO_UNPUT
1724
1725 #endif
1726
1727 #ifndef yytext_ptr
1728 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1729 #endif
1730
1731 #ifdef YY_NEED_STRLEN
1732 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1733 #endif
1734
1735 #ifndef YY_NO_INPUT
1736 #ifdef __cplusplus
1737 static int yyinput ( yyscan_t yyscanner );
1738 #else
1739 static int input ( yyscan_t yyscanner );
1740 #endif
1741
1742 #endif
1743
1744 /* Amount of stuff to slurp up with each read. */
1745 #ifndef YY_READ_BUF_SIZE
1746 #ifdef __ia64__
1747 /* On IA-64, the buffer size is 16k, not 8k */
1748 #define YY_READ_BUF_SIZE 16384
1749 #else
1750 #define YY_READ_BUF_SIZE 8192
1751 #endif /* __ia64__ */
1752 #endif
1753
1754 /* Copy whatever the last rule matched to the standard output. */
1755 #ifndef ECHO
1756 /* This used to be an fputs(), but since the string might contain NUL's,
1757 * we now use fwrite().
1758 */
1759 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1760 #endif
1761
1762 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1763 * is returned in "result".
1764 */
1765 #ifndef YY_INPUT
1766 #define YY_INPUT(buf,result,max_size) \
1767 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1768 { \
1769 int c = '*'; \
1770 int n; \
1771 for ( n = 0; n < max_size && \
1772 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1773 buf[n] = (char) c; \
1774 if ( c == '\n' ) \
1775 buf[n++] = (char) c; \
1776 if ( c == EOF && ferror( yyin ) ) \
1777 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1778 result = n; \
1779 } \
1780 else \
1781 { \
1782 errno=0; \
1783 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1784 { \
1785 if( errno != EINTR) \
1786 { \
1787 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1788 break; \
1789 } \
1790 errno=0; \
1791 clearerr(yyin); \
1792 } \
1793 }\
1794 \
1795
1796 #endif
1797
1798 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1799 * we don't want an extra ';' after the "return" because that will cause
1800 * some compilers to complain about unreachable statements.
1801 */
1802 #ifndef yyterminate
1803 #define yyterminate() return YY_NULL
1804 #endif
1805
1806 /* Number of entries by which start-condition stack grows. */
1807 #ifndef YY_START_STACK_INCR
1808 #define YY_START_STACK_INCR 25
1809 #endif
1810
1811 /* Report a fatal error. */
1812 #ifndef YY_FATAL_ERROR
1813 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1814 #endif
1815
1816 /* end tables serialization structures and prototypes */
1817
1818 /* Default declaration of generated scanner - a define so the user can
1819 * easily add parameters.
1820 */
1821 #ifndef YY_DECL
1822 #define YY_DECL_IS_OURS 1
1823
1824 extern int yylex \
1825 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1826
1827 #define YY_DECL int yylex \
1828 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1829 #endif /* !YY_DECL */
1830
1831 /* Code executed at the beginning of each rule, after yytext and yyleng
1832 * have been set up.
1833 */
1834 #ifndef YY_USER_ACTION
1835 #define YY_USER_ACTION
1836 #endif
1837
1838 /* Code executed at the end of each rule. */
1839 #ifndef YY_BREAK
1840 #define YY_BREAK /*LINTED*/break;
1841 #endif
1842
1843 #define YY_RULE_SETUP \
1844 if ( yyleng > 0 ) \
1845 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1846 (yytext[yyleng - 1] == '\n'); \
1847 YY_USER_ACTION
1848
1849 /** The main scanner function which does all the work.
1850 */
1851 YY_DECL
1852 {
1853 yy_state_type yy_current_state;
1854 char *yy_cp, *yy_bp;
1855 int yy_act;
1856 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1857
1858 yylval = yylval_param;
1859
1860 yylloc = yylloc_param;
1861
1862 if ( !yyg->yy_init )
1863 {
1864 yyg->yy_init = 1;
1865
1866 #ifdef YY_USER_INIT
1867 YY_USER_INIT;
1868 #endif
1869
1870 if ( ! yyg->yy_start )
1871 yyg->yy_start = 1; /* first start state */
1872
1873 if ( ! yyin )
1874 yyin = stdin;
1875
1876 if ( ! yyout )
1877 yyout = stdout;
1878
1879 if ( ! YY_CURRENT_BUFFER ) {
1880 yyensure_buffer_stack (yyscanner);
1881 YY_CURRENT_BUFFER_LVALUE =
1882 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1883 }
1884
1885 yy_load_buffer_state( yyscanner );
1886 }
1887
1888 {
1889 #line 232 "src/compiler/glsl/glsl_lexer.ll"
1890
1891
1892 #line 1892 "src/compiler/glsl/glsl_lexer.cpp"
1893
1894 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1895 {
1896 yy_cp = yyg->yy_c_buf_p;
1897
1898 /* Support of yytext. */
1899 *yy_cp = yyg->yy_hold_char;
1900
1901 /* yy_bp points to the position in yy_ch_buf of the start of
1902 * the current run.
1903 */
1904 yy_bp = yy_cp;
1905
1906 yy_current_state = yyg->yy_start;
1907 yy_current_state += YY_AT_BOL();
1908 yy_match:
1909 do
1910 {
1911 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1912 if ( yy_accept[yy_current_state] )
1913 {
1914 yyg->yy_last_accepting_state = yy_current_state;
1915 yyg->yy_last_accepting_cpos = yy_cp;
1916 }
1917 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1918 {
1919 yy_current_state = (int) yy_def[yy_current_state];
1920 if ( yy_current_state >= 1112 )
1921 yy_c = yy_meta[yy_c];
1922 }
1923 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1924 ++yy_cp;
1925 }
1926 while ( yy_current_state != 1111 );
1927 yy_cp = yyg->yy_last_accepting_cpos;
1928 yy_current_state = yyg->yy_last_accepting_state;
1929
1930 yy_find_action:
1931 yy_act = yy_accept[yy_current_state];
1932
1933 YY_DO_BEFORE_ACTION;
1934
1935 do_action: /* This label is used only to access EOF actions. */
1936
1937 switch ( yy_act )
1938 { /* beginning of action switch */
1939 case 0: /* must back up */
1940 /* undo the effects of YY_DO_BEFORE_ACTION */
1941 *yy_cp = yyg->yy_hold_char;
1942 yy_cp = yyg->yy_last_accepting_cpos;
1943 yy_current_state = yyg->yy_last_accepting_state;
1944 goto yy_find_action;
1945
1946 case 1:
1947 YY_RULE_SETUP
1948 #line 234 "src/compiler/glsl/glsl_lexer.ll"
1949 ;
1950 YY_BREAK
1951 /* Preprocessor tokens. */
1952 case 2:
1953 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1954 yyg->yy_c_buf_p = yy_cp -= 1;
1955 YY_DO_BEFORE_ACTION; /* set up yytext again */
1956 YY_RULE_SETUP
1957 #line 237 "src/compiler/glsl/glsl_lexer.ll"
1958 ;
1959 YY_BREAK
1960 case 3:
1961 YY_RULE_SETUP
1962 #line 238 "src/compiler/glsl/glsl_lexer.ll"
1963 { BEGIN PP; return VERSION_TOK; }
1964 YY_BREAK
1965 case 4:
1966 YY_RULE_SETUP
1967 #line 239 "src/compiler/glsl/glsl_lexer.ll"
1968 { BEGIN PP; return EXTENSION; }
1969 YY_BREAK
1970 case 5:
1971 YY_RULE_SETUP
1972 #line 240 "src/compiler/glsl/glsl_lexer.ll"
1973 {
1974 if (!yyextra->ARB_shading_language_include_enable) {
1975 struct _mesa_glsl_parse_state *state = yyextra;
1976 _mesa_glsl_error(yylloc, state,
1977 "ARB_shading_language_include required "
1978 "to use #include");
1979 }
1980 }
1981 YY_BREAK
1982 case 6:
1983 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1984 yyg->yy_c_buf_p = yy_cp -= 1;
1985 YY_DO_BEFORE_ACTION; /* set up yytext again */
1986 YY_RULE_SETUP
1987 #line 248 "src/compiler/glsl/glsl_lexer.ll"
1988 {
1989 /* Eat characters until the first digit is
1990 * encountered
1991 */
1992 char *ptr = yytext;
1993 while (!isdigit(*ptr))
1994 ptr++;
1995
1996 /* Subtract one from the line number because
1997 * yylineno is zero-based instead of
1998 * one-based.
1999 */
2000 yylineno = strtol(ptr, &ptr, 0) - 1;
2001
2002 /* From GLSL 3.30 and GLSL ES on, after processing the
2003 * line directive (including its new-line), the implementation
2004 * will behave as if it is compiling at the line number passed
2005 * as argument. It was line number + 1 in older specifications.
2006 */
2007 if (yyextra->is_version(330, 100))
2008 yylineno--;
2009
2010 yylloc->source = strtol(ptr, NULL, 0);
2011 yylloc->path = NULL;
2012 }
2013 YY_BREAK
2014 case 7:
2015 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
2016 yyg->yy_c_buf_p = yy_cp -= 1;
2017 YY_DO_BEFORE_ACTION; /* set up yytext again */
2018 YY_RULE_SETUP
2019 #line 273 "src/compiler/glsl/glsl_lexer.ll"
2020 {
2021 if (!yyextra->ARB_shading_language_include_enable) {
2022 struct _mesa_glsl_parse_state *state = yyextra;
2023 _mesa_glsl_error(yylloc, state,
2024 "ARB_shading_language_include required "
2025 "to use #line <line> \"<path>\"");
2026 }
2027
2028 /* Eat characters until the first digit is
2029 * encountered
2030 */
2031 char *ptr = yytext;
2032 while (!isdigit(*ptr))
2033 ptr++;
2034
2035 /* Subtract one from the line number because
2036 * yylineno is zero-based instead of
2037 * one-based.
2038 */
2039 yylineno = strtol(ptr, &ptr, 0) - 1;
2040
2041 /* From GLSL 3.30 and GLSL ES on, after processing the
2042 * line directive (including its new-line), the implementation
2043 * will behave as if it is compiling at the line number passed
2044 * as argument. It was line number + 1 in older specifications.
2045 */
2046 if (yyextra->is_version(330, 100))
2047 yylineno--;
2048
2049 while (isspace(*ptr))
2050 ptr++;
2051
2052 /* Skip over leading " */
2053 ptr++;
2054
2055 char *end = strrchr(ptr, '"');
2056 int path_len = (end - ptr) + 1;
2057 void *mem_ctx = yyextra->linalloc;
2058 yylloc->path = (char *) linear_alloc_child(mem_ctx, path_len);
2059 memcpy(yylloc->path, ptr, path_len);
2060 yylloc->path[path_len - 1] = '\0';
2061 }
2062 YY_BREAK
2063 case 8:
2064 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
2065 yyg->yy_c_buf_p = yy_cp -= 1;
2066 YY_DO_BEFORE_ACTION; /* set up yytext again */
2067 YY_RULE_SETUP
2068 #line 315 "src/compiler/glsl/glsl_lexer.ll"
2069 {
2070 /* Eat characters until the first digit is
2071 * encountered
2072 */
2073 char *ptr = yytext;
2074 while (!isdigit(*ptr))
2075 ptr++;
2076
2077 /* Subtract one from the line number because
2078 * yylineno is zero-based instead of
2079 * one-based.
2080 */
2081 yylineno = strtol(ptr, &ptr, 0) - 1;
2082
2083 /* From GLSL 3.30 and GLSL ES on, after processing the
2084 * line directive (including its new-line), the implementation
2085 * will behave as if it is compiling at the line number passed
2086 * as argument. It was line number + 1 in older specifications.
2087 */
2088 if (yyextra->is_version(330, 100))
2089 yylineno--;
2090 }
2091 YY_BREAK
2092 case 9:
2093 YY_RULE_SETUP
2094 #line 337 "src/compiler/glsl/glsl_lexer.ll"
2095 {
2096 BEGIN PP;
2097 return PRAGMA_DEBUG_ON;
2098 }
2099 YY_BREAK
2100 case 10:
2101 YY_RULE_SETUP
2102 #line 341 "src/compiler/glsl/glsl_lexer.ll"
2103 {
2104 BEGIN PP;
2105 return PRAGMA_DEBUG_OFF;
2106 }
2107 YY_BREAK
2108 case 11:
2109 YY_RULE_SETUP
2110 #line 345 "src/compiler/glsl/glsl_lexer.ll"
2111 {
2112 BEGIN PP;
2113 return PRAGMA_OPTIMIZE_ON;
2114 }
2115 YY_BREAK
2116 case 12:
2117 YY_RULE_SETUP
2118 #line 349 "src/compiler/glsl/glsl_lexer.ll"
2119 {
2120 BEGIN PP;
2121 return PRAGMA_OPTIMIZE_OFF;
2122 }
2123 YY_BREAK
2124 case 13:
2125 YY_RULE_SETUP
2126 #line 353 "src/compiler/glsl/glsl_lexer.ll"
2127 {
2128 BEGIN PP;
2129 return PRAGMA_WARNING_ON;
2130 }
2131 YY_BREAK
2132 case 14:
2133 YY_RULE_SETUP
2134 #line 357 "src/compiler/glsl/glsl_lexer.ll"
2135 {
2136 BEGIN PP;
2137 return PRAGMA_WARNING_OFF;
2138 }
2139 YY_BREAK
2140 case 15:
2141 YY_RULE_SETUP
2142 #line 361 "src/compiler/glsl/glsl_lexer.ll"
2143 {
2144 BEGIN PP;
2145 return PRAGMA_INVARIANT_ALL;
2146 }
2147 YY_BREAK
2148 case 16:
2149 YY_RULE_SETUP
2150 #line 365 "src/compiler/glsl/glsl_lexer.ll"
2151 { BEGIN PRAGMA; }
2152 YY_BREAK
2153 case 17:
2154 /* rule 17 can match eol */
2155 YY_RULE_SETUP
2156 #line 367 "src/compiler/glsl/glsl_lexer.ll"
2157 { BEGIN 0; yylineno++; yycolumn = 0; }
2158 YY_BREAK
2159 case 18:
2160 YY_RULE_SETUP
2161 #line 368 "src/compiler/glsl/glsl_lexer.ll"
2162 { }
2163 YY_BREAK
2164 case 19:
2165 YY_RULE_SETUP
2166 #line 370 "src/compiler/glsl/glsl_lexer.ll"
2167 { }
2168 YY_BREAK
2169 case 20:
2170 YY_RULE_SETUP
2171 #line 371 "src/compiler/glsl/glsl_lexer.ll"
2172 { }
2173 YY_BREAK
2174 case 21:
2175 YY_RULE_SETUP
2176 #line 372 "src/compiler/glsl/glsl_lexer.ll"
2177 return COLON;
2178 YY_BREAK
2179 case 22:
2180 YY_RULE_SETUP
2181 #line 373 "src/compiler/glsl/glsl_lexer.ll"
2182 {
2183 /* We're not doing linear_strdup here, to avoid an implicit call
2184 * on strlen() for the length of the string, as this is already
2185 * found by flex and stored in yyleng
2186 */
2187 void *mem_ctx = yyextra->linalloc;
2188 char *id = (char *) linear_alloc_child(mem_ctx, yyleng + 1);
2189 memcpy(id, yytext, yyleng + 1);
2190 yylval->identifier = id;
2191 return IDENTIFIER;
2192 }
2193 YY_BREAK
2194 case 23:
2195 YY_RULE_SETUP
2196 #line 384 "src/compiler/glsl/glsl_lexer.ll"
2197 {
2198 yylval->n = strtol(yytext, NULL, 10);
2199 return INTCONSTANT;
2200 }
2201 YY_BREAK
2202 case 24:
2203 YY_RULE_SETUP
2204 #line 388 "src/compiler/glsl/glsl_lexer.ll"
2205 {
2206 yylval->n = 0;
2207 return INTCONSTANT;
2208 }
2209 YY_BREAK
2210 case 25:
2211 /* rule 25 can match eol */
2212 YY_RULE_SETUP
2213 #line 392 "src/compiler/glsl/glsl_lexer.ll"
2214 { BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
2215 YY_BREAK
2216 case 26:
2217 YY_RULE_SETUP
2218 #line 393 "src/compiler/glsl/glsl_lexer.ll"
2219 { return yytext[0]; }
2220 YY_BREAK
2221 case 27:
2222 /* rule 27 can match eol */
2223 YY_RULE_SETUP
2224 #line 395 "src/compiler/glsl/glsl_lexer.ll"
2225 { yylineno++; yycolumn = 0; }
2226 YY_BREAK
2227 case 28:
2228 YY_RULE_SETUP
2229 #line 397 "src/compiler/glsl/glsl_lexer.ll"
2230 DEPRECATED_ES_KEYWORD(ATTRIBUTE);
2231 YY_BREAK
2232 case 29:
2233 YY_RULE_SETUP
2234 #line 398 "src/compiler/glsl/glsl_lexer.ll"
2235 return CONST_TOK;
2236 YY_BREAK
2237 case 30:
2238 YY_RULE_SETUP
2239 #line 399 "src/compiler/glsl/glsl_lexer.ll"
2240 { yylval->type = glsl_type::bool_type; return BASIC_TYPE_TOK; }
2241 YY_BREAK
2242 case 31:
2243 YY_RULE_SETUP
2244 #line 400 "src/compiler/glsl/glsl_lexer.ll"
2245 { yylval->type = glsl_type::float_type; return BASIC_TYPE_TOK; }
2246 YY_BREAK
2247 case 32:
2248 YY_RULE_SETUP
2249 #line 401 "src/compiler/glsl/glsl_lexer.ll"
2250 { yylval->type = glsl_type::int_type; return BASIC_TYPE_TOK; }
2251 YY_BREAK
2252 case 33:
2253 YY_RULE_SETUP
2254 #line 402 "src/compiler/glsl/glsl_lexer.ll"
2255 TYPE(130, 300, 130, 300, glsl_type::uint_type);
2256 YY_BREAK
2257 case 34:
2258 YY_RULE_SETUP
2259 #line 404 "src/compiler/glsl/glsl_lexer.ll"
2260 return BREAK;
2261 YY_BREAK
2262 case 35:
2263 YY_RULE_SETUP
2264 #line 405 "src/compiler/glsl/glsl_lexer.ll"
2265 return CONTINUE;
2266 YY_BREAK
2267 case 36:
2268 YY_RULE_SETUP
2269 #line 406 "src/compiler/glsl/glsl_lexer.ll"
2270 return DO;
2271 YY_BREAK
2272 case 37:
2273 YY_RULE_SETUP
2274 #line 407 "src/compiler/glsl/glsl_lexer.ll"
2275 return WHILE;
2276 YY_BREAK
2277 case 38:
2278 YY_RULE_SETUP
2279 #line 408 "src/compiler/glsl/glsl_lexer.ll"
2280 return ELSE;
2281 YY_BREAK
2282 case 39:
2283 YY_RULE_SETUP
2284 #line 409 "src/compiler/glsl/glsl_lexer.ll"
2285 return FOR;
2286 YY_BREAK
2287 case 40:
2288 YY_RULE_SETUP
2289 #line 410 "src/compiler/glsl/glsl_lexer.ll"
2290 return IF;
2291 YY_BREAK
2292 case 41:
2293 YY_RULE_SETUP
2294 #line 411 "src/compiler/glsl/glsl_lexer.ll"
2295 return DISCARD;
2296 YY_BREAK
2297 case 42:
2298 YY_RULE_SETUP
2299 #line 412 "src/compiler/glsl/glsl_lexer.ll"
2300 return RETURN;
2301 YY_BREAK
2302 case 43:
2303 YY_RULE_SETUP
2304 #line 413 "src/compiler/glsl/glsl_lexer.ll"
2305 KEYWORD_WITH_ALT(0, 0, 0, 0, yyextra->EXT_demote_to_helper_invocation_enable, DEMOTE);
2306 YY_BREAK
2307 case 44:
2308 YY_RULE_SETUP
2309 #line 415 "src/compiler/glsl/glsl_lexer.ll"
2310 { yylval->type = glsl_type::bvec2_type; return BASIC_TYPE_TOK; }
2311 YY_BREAK
2312 case 45:
2313 YY_RULE_SETUP
2314 #line 416 "src/compiler/glsl/glsl_lexer.ll"
2315 { yylval->type = glsl_type::bvec3_type; return BASIC_TYPE_TOK; }
2316 YY_BREAK
2317 case 46:
2318 YY_RULE_SETUP
2319 #line 417 "src/compiler/glsl/glsl_lexer.ll"
2320 { yylval->type = glsl_type::bvec4_type; return BASIC_TYPE_TOK; }
2321 YY_BREAK
2322 case 47:
2323 YY_RULE_SETUP
2324 #line 418 "src/compiler/glsl/glsl_lexer.ll"
2325 { yylval->type = glsl_type::ivec2_type; return BASIC_TYPE_TOK; }
2326 YY_BREAK
2327 case 48:
2328 YY_RULE_SETUP
2329 #line 419 "src/compiler/glsl/glsl_lexer.ll"
2330 { yylval->type = glsl_type::ivec3_type; return BASIC_TYPE_TOK; }
2331 YY_BREAK
2332 case 49:
2333 YY_RULE_SETUP
2334 #line 420 "src/compiler/glsl/glsl_lexer.ll"
2335 { yylval->type = glsl_type::ivec4_type; return BASIC_TYPE_TOK; }
2336 YY_BREAK
2337 case 50:
2338 YY_RULE_SETUP
2339 #line 421 "src/compiler/glsl/glsl_lexer.ll"
2340 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable, glsl_type::uvec2_type);
2341 YY_BREAK
2342 case 51:
2343 YY_RULE_SETUP
2344 #line 422 "src/compiler/glsl/glsl_lexer.ll"
2345 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable, glsl_type::uvec3_type);
2346 YY_BREAK
2347 case 52:
2348 YY_RULE_SETUP
2349 #line 423 "src/compiler/glsl/glsl_lexer.ll"
2350 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable, glsl_type::uvec4_type);
2351 YY_BREAK
2352 case 53:
2353 YY_RULE_SETUP
2354 #line 424 "src/compiler/glsl/glsl_lexer.ll"
2355 { yylval->type = glsl_type::vec2_type; return BASIC_TYPE_TOK; }
2356 YY_BREAK
2357 case 54:
2358 YY_RULE_SETUP
2359 #line 425 "src/compiler/glsl/glsl_lexer.ll"
2360 { yylval->type = glsl_type::vec3_type; return BASIC_TYPE_TOK; }
2361 YY_BREAK
2362 case 55:
2363 YY_RULE_SETUP
2364 #line 426 "src/compiler/glsl/glsl_lexer.ll"
2365 { yylval->type = glsl_type::vec4_type; return BASIC_TYPE_TOK; }
2366 YY_BREAK
2367 case 56:
2368 YY_RULE_SETUP
2369 #line 427 "src/compiler/glsl/glsl_lexer.ll"
2370 { yylval->type = glsl_type::mat2_type; return BASIC_TYPE_TOK; }
2371 YY_BREAK
2372 case 57:
2373 YY_RULE_SETUP
2374 #line 428 "src/compiler/glsl/glsl_lexer.ll"
2375 { yylval->type = glsl_type::mat3_type; return BASIC_TYPE_TOK; }
2376 YY_BREAK
2377 case 58:
2378 YY_RULE_SETUP
2379 #line 429 "src/compiler/glsl/glsl_lexer.ll"
2380 { yylval->type = glsl_type::mat4_type; return BASIC_TYPE_TOK; }
2381 YY_BREAK
2382 case 59:
2383 YY_RULE_SETUP
2384 #line 430 "src/compiler/glsl/glsl_lexer.ll"
2385 TYPE(120, 300, 120, 300, glsl_type::mat2_type);
2386 YY_BREAK
2387 case 60:
2388 YY_RULE_SETUP
2389 #line 431 "src/compiler/glsl/glsl_lexer.ll"
2390 TYPE(120, 300, 120, 300, glsl_type::mat2x3_type);
2391 YY_BREAK
2392 case 61:
2393 YY_RULE_SETUP
2394 #line 432 "src/compiler/glsl/glsl_lexer.ll"
2395 TYPE(120, 300, 120, 300, glsl_type::mat2x4_type);
2396 YY_BREAK
2397 case 62:
2398 YY_RULE_SETUP
2399 #line 433 "src/compiler/glsl/glsl_lexer.ll"
2400 TYPE(120, 300, 120, 300, glsl_type::mat3x2_type);
2401 YY_BREAK
2402 case 63:
2403 YY_RULE_SETUP
2404 #line 434 "src/compiler/glsl/glsl_lexer.ll"
2405 TYPE(120, 300, 120, 300, glsl_type::mat3_type);
2406 YY_BREAK
2407 case 64:
2408 YY_RULE_SETUP
2409 #line 435 "src/compiler/glsl/glsl_lexer.ll"
2410 TYPE(120, 300, 120, 300, glsl_type::mat3x4_type);
2411 YY_BREAK
2412 case 65:
2413 YY_RULE_SETUP
2414 #line 436 "src/compiler/glsl/glsl_lexer.ll"
2415 TYPE(120, 300, 120, 300, glsl_type::mat4x2_type);
2416 YY_BREAK
2417 case 66:
2418 YY_RULE_SETUP
2419 #line 437 "src/compiler/glsl/glsl_lexer.ll"
2420 TYPE(120, 300, 120, 300, glsl_type::mat4x3_type);
2421 YY_BREAK
2422 case 67:
2423 YY_RULE_SETUP
2424 #line 438 "src/compiler/glsl/glsl_lexer.ll"
2425 TYPE(120, 300, 120, 300, glsl_type::mat4_type);
2426 YY_BREAK
2427 case 68:
2428 YY_RULE_SETUP
2429 #line 440 "src/compiler/glsl/glsl_lexer.ll"
2430 return IN_TOK;
2431 YY_BREAK
2432 case 69:
2433 YY_RULE_SETUP
2434 #line 441 "src/compiler/glsl/glsl_lexer.ll"
2435 return OUT_TOK;
2436 YY_BREAK
2437 case 70:
2438 YY_RULE_SETUP
2439 #line 442 "src/compiler/glsl/glsl_lexer.ll"
2440 return INOUT_TOK;
2441 YY_BREAK
2442 case 71:
2443 YY_RULE_SETUP
2444 #line 443 "src/compiler/glsl/glsl_lexer.ll"
2445 return UNIFORM;
2446 YY_BREAK
2447 case 72:
2448 YY_RULE_SETUP
2449 #line 444 "src/compiler/glsl/glsl_lexer.ll"
2450 KEYWORD_WITH_ALT(0, 0, 430, 310, yyextra->ARB_shader_storage_buffer_object_enable, BUFFER);
2451 YY_BREAK
2452 case 73:
2453 YY_RULE_SETUP
2454 #line 445 "src/compiler/glsl/glsl_lexer.ll"
2455 DEPRECATED_ES_KEYWORD(VARYING);
2456 YY_BREAK
2457 case 74:
2458 YY_RULE_SETUP
2459 #line 446 "src/compiler/glsl/glsl_lexer.ll"
2460 KEYWORD_WITH_ALT(120, 300, 120, 300, yyextra->EXT_gpu_shader4_enable, CENTROID);
2461 YY_BREAK
2462 case 75:
2463 YY_RULE_SETUP
2464 #line 447 "src/compiler/glsl/glsl_lexer.ll"
2465 KEYWORD(120, 100, 120, 100, INVARIANT);
2466 YY_BREAK
2467 case 76:
2468 YY_RULE_SETUP
2469 #line 448 "src/compiler/glsl/glsl_lexer.ll"
2470 KEYWORD_WITH_ALT(130, 100, 130, 300, yyextra->EXT_gpu_shader4_enable, FLAT);
2471 YY_BREAK
2472 case 77:
2473 YY_RULE_SETUP
2474 #line 449 "src/compiler/glsl/glsl_lexer.ll"
2475 KEYWORD(130, 300, 130, 300, SMOOTH);
2476 YY_BREAK
2477 case 78:
2478 YY_RULE_SETUP
2479 #line 450 "src/compiler/glsl/glsl_lexer.ll"
2480 KEYWORD_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable, NOPERSPECTIVE);
2481 YY_BREAK
2482 case 79:
2483 YY_RULE_SETUP
2484 #line 451 "src/compiler/glsl/glsl_lexer.ll"
2485 KEYWORD_WITH_ALT(0, 300, 400, 320, yyextra->has_tessellation_shader(), PATCH);
2486 YY_BREAK
2487 case 80:
2488 YY_RULE_SETUP
2489 #line 453 "src/compiler/glsl/glsl_lexer.ll"
2490 DEPRECATED_ES_TYPE(glsl_type::sampler1D_type);
2491 YY_BREAK
2492 case 81:
2493 YY_RULE_SETUP
2494 #line 454 "src/compiler/glsl/glsl_lexer.ll"
2495 { yylval->type = glsl_type::sampler2D_type; return BASIC_TYPE_TOK; }
2496 YY_BREAK
2497 case 82:
2498 YY_RULE_SETUP
2499 #line 455 "src/compiler/glsl/glsl_lexer.ll"
2500 { yylval->type = glsl_type::sampler3D_type; return BASIC_TYPE_TOK; }
2501 YY_BREAK
2502 case 83:
2503 YY_RULE_SETUP
2504 #line 456 "src/compiler/glsl/glsl_lexer.ll"
2505 { yylval->type = glsl_type::samplerCube_type; return BASIC_TYPE_TOK; }
2506 YY_BREAK
2507 case 84:
2508 YY_RULE_SETUP
2509 #line 457 "src/compiler/glsl/glsl_lexer.ll"
2510 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::sampler1DArray_type);
2511 YY_BREAK
2512 case 85:
2513 YY_RULE_SETUP
2514 #line 458 "src/compiler/glsl/glsl_lexer.ll"
2515 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::sampler2DArray_type);
2516 YY_BREAK
2517 case 86:
2518 YY_RULE_SETUP
2519 #line 459 "src/compiler/glsl/glsl_lexer.ll"
2520 DEPRECATED_ES_TYPE(glsl_type::sampler1DShadow_type);
2521 YY_BREAK
2522 case 87:
2523 YY_RULE_SETUP
2524 #line 460 "src/compiler/glsl/glsl_lexer.ll"
2525 { yylval->type = glsl_type::sampler2DShadow_type; return BASIC_TYPE_TOK; }
2526 YY_BREAK
2527 case 88:
2528 YY_RULE_SETUP
2529 #line 461 "src/compiler/glsl/glsl_lexer.ll"
2530 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable, glsl_type::samplerCubeShadow_type);
2531 YY_BREAK
2532 case 89:
2533 YY_RULE_SETUP
2534 #line 462 "src/compiler/glsl/glsl_lexer.ll"
2535 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::sampler1DArrayShadow_type);
2536 YY_BREAK
2537 case 90:
2538 YY_RULE_SETUP
2539 #line 463 "src/compiler/glsl/glsl_lexer.ll"
2540 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::sampler2DArrayShadow_type);
2541 YY_BREAK
2542 case 91:
2543 YY_RULE_SETUP
2544 #line 464 "src/compiler/glsl/glsl_lexer.ll"
2545 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::isampler1D_type);
2546 YY_BREAK
2547 case 92:
2548 YY_RULE_SETUP
2549 #line 465 "src/compiler/glsl/glsl_lexer.ll"
2550 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::isampler2D_type);
2551 YY_BREAK
2552 case 93:
2553 YY_RULE_SETUP
2554 #line 466 "src/compiler/glsl/glsl_lexer.ll"
2555 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::isampler3D_type);
2556 YY_BREAK
2557 case 94:
2558 YY_RULE_SETUP
2559 #line 467 "src/compiler/glsl/glsl_lexer.ll"
2560 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::isamplerCube_type);
2561 YY_BREAK
2562 case 95:
2563 YY_RULE_SETUP
2564 #line 468 "src/compiler/glsl/glsl_lexer.ll"
2565 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::isampler1DArray_type);
2566 YY_BREAK
2567 case 96:
2568 YY_RULE_SETUP
2569 #line 469 "src/compiler/glsl/glsl_lexer.ll"
2570 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::isampler2DArray_type);
2571 YY_BREAK
2572 case 97:
2573 YY_RULE_SETUP
2574 #line 470 "src/compiler/glsl/glsl_lexer.ll"
2575 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::usampler1D_type);
2576 YY_BREAK
2577 case 98:
2578 YY_RULE_SETUP
2579 #line 471 "src/compiler/glsl/glsl_lexer.ll"
2580 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::usampler2D_type);
2581 YY_BREAK
2582 case 99:
2583 YY_RULE_SETUP
2584 #line 472 "src/compiler/glsl/glsl_lexer.ll"
2585 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::usampler3D_type);
2586 YY_BREAK
2587 case 100:
2588 YY_RULE_SETUP
2589 #line 473 "src/compiler/glsl/glsl_lexer.ll"
2590 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::usamplerCube_type);
2591 YY_BREAK
2592 case 101:
2593 YY_RULE_SETUP
2594 #line 474 "src/compiler/glsl/glsl_lexer.ll"
2595 TYPE_WITH_ALT(130, 300, 130, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::usampler1DArray_type);
2596 YY_BREAK
2597 case 102:
2598 YY_RULE_SETUP
2599 #line 475 "src/compiler/glsl/glsl_lexer.ll"
2600 TYPE_WITH_ALT(130, 300, 130, 300, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_integer && yyextra->ctx->Extensions.EXT_texture_array, glsl_type::usampler2DArray_type);
2601 YY_BREAK
2602 /* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
2603 /* these are reserved but not defined in GLSL 3.00 */
2604 /* [iu]sampler2DMS are defined in GLSL ES 3.10 */
2605 case 103:
2606 YY_RULE_SETUP
2607 #line 480 "src/compiler/glsl/glsl_lexer.ll"
2608 TYPE_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, glsl_type::sampler2DMS_type);
2609 YY_BREAK
2610 case 104:
2611 YY_RULE_SETUP
2612 #line 481 "src/compiler/glsl/glsl_lexer.ll"
2613 TYPE_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, glsl_type::isampler2DMS_type);
2614 YY_BREAK
2615 case 105:
2616 YY_RULE_SETUP
2617 #line 482 "src/compiler/glsl/glsl_lexer.ll"
2618 TYPE_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, glsl_type::usampler2DMS_type);
2619 YY_BREAK
2620 case 106:
2621 YY_RULE_SETUP
2622 #line 483 "src/compiler/glsl/glsl_lexer.ll"
2623 TYPE_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, glsl_type::sampler2DMSArray_type);
2624 YY_BREAK
2625 case 107:
2626 YY_RULE_SETUP
2627 #line 484 "src/compiler/glsl/glsl_lexer.ll"
2628 TYPE_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, glsl_type::isampler2DMSArray_type);
2629 YY_BREAK
2630 case 108:
2631 YY_RULE_SETUP
2632 #line 485 "src/compiler/glsl/glsl_lexer.ll"
2633 TYPE_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, glsl_type::usampler2DMSArray_type);
2634 YY_BREAK
2635 /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
2636 case 109:
2637 YY_RULE_SETUP
2638 #line 488 "src/compiler/glsl/glsl_lexer.ll"
2639 TYPE_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::samplerCubeArray_type);
2640 YY_BREAK
2641 case 110:
2642 YY_RULE_SETUP
2643 #line 489 "src/compiler/glsl/glsl_lexer.ll"
2644 TYPE_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::isamplerCubeArray_type);
2645 YY_BREAK
2646 case 111:
2647 YY_RULE_SETUP
2648 #line 490 "src/compiler/glsl/glsl_lexer.ll"
2649 TYPE_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::usamplerCubeArray_type);
2650 YY_BREAK
2651 case 112:
2652 YY_RULE_SETUP
2653 #line 491 "src/compiler/glsl/glsl_lexer.ll"
2654 TYPE_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::samplerCubeArrayShadow_type);
2655 YY_BREAK
2656 case 113:
2657 YY_RULE_SETUP
2658 #line 493 "src/compiler/glsl/glsl_lexer.ll"
2659 {
2660 if (yyextra->OES_EGL_image_external_enable || yyextra->OES_EGL_image_external_essl3_enable) {
2661 yylval->type = glsl_type::samplerExternalOES_type;
2662 return BASIC_TYPE_TOK;
2663 } else
2664 return IDENTIFIER;
2665 }
2666 YY_BREAK
2667 /* keywords available with ARB_gpu_shader5 */
2668 case 114:
2669 YY_RULE_SETUP
2670 #line 502 "src/compiler/glsl/glsl_lexer.ll"
2671 KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->EXT_gpu_shader5_enable || yyextra->OES_gpu_shader5_enable, PRECISE);
2672 YY_BREAK
2673 /* keywords available with ARB_shader_image_load_store */
2674 case 115:
2675 YY_RULE_SETUP
2676 #line 505 "src/compiler/glsl/glsl_lexer.ll"
2677 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image1D_type);
2678 YY_BREAK
2679 case 116:
2680 YY_RULE_SETUP
2681 #line 506 "src/compiler/glsl/glsl_lexer.ll"
2682 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image2D_type);
2683 YY_BREAK
2684 case 117:
2685 YY_RULE_SETUP
2686 #line 507 "src/compiler/glsl/glsl_lexer.ll"
2687 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image3D_type);
2688 YY_BREAK
2689 case 118:
2690 YY_RULE_SETUP
2691 #line 508 "src/compiler/glsl/glsl_lexer.ll"
2692 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image2DRect_type);
2693 YY_BREAK
2694 case 119:
2695 YY_RULE_SETUP
2696 #line 509 "src/compiler/glsl/glsl_lexer.ll"
2697 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::imageCube_type);
2698 YY_BREAK
2699 case 120:
2700 YY_RULE_SETUP
2701 #line 510 "src/compiler/glsl/glsl_lexer.ll"
2702 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, glsl_type::imageBuffer_type);
2703 YY_BREAK
2704 case 121:
2705 YY_RULE_SETUP
2706 #line 511 "src/compiler/glsl/glsl_lexer.ll"
2707 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image1DArray_type);
2708 YY_BREAK
2709 case 122:
2710 YY_RULE_SETUP
2711 #line 512 "src/compiler/glsl/glsl_lexer.ll"
2712 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image2DArray_type);
2713 YY_BREAK
2714 case 123:
2715 YY_RULE_SETUP
2716 #line 513 "src/compiler/glsl/glsl_lexer.ll"
2717 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::imageCubeArray_type);
2718 YY_BREAK
2719 case 124:
2720 YY_RULE_SETUP
2721 #line 514 "src/compiler/glsl/glsl_lexer.ll"
2722 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image2DMS_type);
2723 YY_BREAK
2724 case 125:
2725 YY_RULE_SETUP
2726 #line 515 "src/compiler/glsl/glsl_lexer.ll"
2727 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::image2DMSArray_type);
2728 YY_BREAK
2729 case 126:
2730 YY_RULE_SETUP
2731 #line 516 "src/compiler/glsl/glsl_lexer.ll"
2732 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage1D_type);
2733 YY_BREAK
2734 case 127:
2735 YY_RULE_SETUP
2736 #line 517 "src/compiler/glsl/glsl_lexer.ll"
2737 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage2D_type);
2738 YY_BREAK
2739 case 128:
2740 YY_RULE_SETUP
2741 #line 518 "src/compiler/glsl/glsl_lexer.ll"
2742 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage3D_type);
2743 YY_BREAK
2744 case 129:
2745 YY_RULE_SETUP
2746 #line 519 "src/compiler/glsl/glsl_lexer.ll"
2747 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage2DRect_type);
2748 YY_BREAK
2749 case 130:
2750 YY_RULE_SETUP
2751 #line 520 "src/compiler/glsl/glsl_lexer.ll"
2752 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimageCube_type);
2753 YY_BREAK
2754 case 131:
2755 YY_RULE_SETUP
2756 #line 521 "src/compiler/glsl/glsl_lexer.ll"
2757 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, glsl_type::iimageBuffer_type);
2758 YY_BREAK
2759 case 132:
2760 YY_RULE_SETUP
2761 #line 522 "src/compiler/glsl/glsl_lexer.ll"
2762 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage1DArray_type);
2763 YY_BREAK
2764 case 133:
2765 YY_RULE_SETUP
2766 #line 523 "src/compiler/glsl/glsl_lexer.ll"
2767 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage2DArray_type);
2768 YY_BREAK
2769 case 134:
2770 YY_RULE_SETUP
2771 #line 524 "src/compiler/glsl/glsl_lexer.ll"
2772 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::iimageCubeArray_type);
2773 YY_BREAK
2774 case 135:
2775 YY_RULE_SETUP
2776 #line 525 "src/compiler/glsl/glsl_lexer.ll"
2777 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage2DMS_type);
2778 YY_BREAK
2779 case 136:
2780 YY_RULE_SETUP
2781 #line 526 "src/compiler/glsl/glsl_lexer.ll"
2782 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::iimage2DMSArray_type);
2783 YY_BREAK
2784 case 137:
2785 YY_RULE_SETUP
2786 #line 527 "src/compiler/glsl/glsl_lexer.ll"
2787 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage1D_type);
2788 YY_BREAK
2789 case 138:
2790 YY_RULE_SETUP
2791 #line 528 "src/compiler/glsl/glsl_lexer.ll"
2792 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage2D_type);
2793 YY_BREAK
2794 case 139:
2795 YY_RULE_SETUP
2796 #line 529 "src/compiler/glsl/glsl_lexer.ll"
2797 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage3D_type);
2798 YY_BREAK
2799 case 140:
2800 YY_RULE_SETUP
2801 #line 530 "src/compiler/glsl/glsl_lexer.ll"
2802 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage2DRect_type);
2803 YY_BREAK
2804 case 141:
2805 YY_RULE_SETUP
2806 #line 531 "src/compiler/glsl/glsl_lexer.ll"
2807 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimageCube_type);
2808 YY_BREAK
2809 case 142:
2810 YY_RULE_SETUP
2811 #line 532 "src/compiler/glsl/glsl_lexer.ll"
2812 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, glsl_type::uimageBuffer_type);
2813 YY_BREAK
2814 case 143:
2815 YY_RULE_SETUP
2816 #line 533 "src/compiler/glsl/glsl_lexer.ll"
2817 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage1DArray_type);
2818 YY_BREAK
2819 case 144:
2820 YY_RULE_SETUP
2821 #line 534 "src/compiler/glsl/glsl_lexer.ll"
2822 TYPE_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage2DArray_type);
2823 YY_BREAK
2824 case 145:
2825 YY_RULE_SETUP
2826 #line 535 "src/compiler/glsl/glsl_lexer.ll"
2827 TYPE_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, glsl_type::uimageCubeArray_type);
2828 YY_BREAK
2829 case 146:
2830 YY_RULE_SETUP
2831 #line 536 "src/compiler/glsl/glsl_lexer.ll"
2832 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage2DMS_type);
2833 YY_BREAK
2834 case 147:
2835 YY_RULE_SETUP
2836 #line 537 "src/compiler/glsl/glsl_lexer.ll"
2837 TYPE_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable, glsl_type::uimage2DMSArray_type);
2838 YY_BREAK
2839 case 148:
2840 YY_RULE_SETUP
2841 #line 538 "src/compiler/glsl/glsl_lexer.ll"
2842 KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
2843 YY_BREAK
2844 case 149:
2845 YY_RULE_SETUP
2846 #line 539 "src/compiler/glsl/glsl_lexer.ll"
2847 KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
2848 YY_BREAK
2849 case 150:
2850 YY_RULE_SETUP
2851 #line 540 "src/compiler/glsl/glsl_lexer.ll"
2852 KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
2853 YY_BREAK
2854 case 151:
2855 YY_RULE_SETUP
2856 #line 541 "src/compiler/glsl/glsl_lexer.ll"
2857 KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
2858 YY_BREAK
2859 case 152:
2860 YY_RULE_SETUP
2861 #line 543 "src/compiler/glsl/glsl_lexer.ll"
2862 KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, COHERENT);
2863 YY_BREAK
2864 case 153:
2865 YY_RULE_SETUP
2866 #line 544 "src/compiler/glsl/glsl_lexer.ll"
2867 KEYWORD_WITH_ALT(110, 100, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, VOLATILE);
2868 YY_BREAK
2869 case 154:
2870 YY_RULE_SETUP
2871 #line 545 "src/compiler/glsl/glsl_lexer.ll"
2872 KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, RESTRICT);
2873 YY_BREAK
2874 case 155:
2875 YY_RULE_SETUP
2876 #line 546 "src/compiler/glsl/glsl_lexer.ll"
2877 KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, READONLY);
2878 YY_BREAK
2879 case 156:
2880 YY_RULE_SETUP
2881 #line 547 "src/compiler/glsl/glsl_lexer.ll"
2882 KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, WRITEONLY);
2883 YY_BREAK
2884 case 157:
2885 YY_RULE_SETUP
2886 #line 549 "src/compiler/glsl/glsl_lexer.ll"
2887 TYPE_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_atomic_counters_enable, glsl_type::atomic_uint_type);
2888 YY_BREAK
2889 case 158:
2890 YY_RULE_SETUP
2891 #line 551 "src/compiler/glsl/glsl_lexer.ll"
2892 KEYWORD_WITH_ALT(430, 310, 430, 310, yyextra->ARB_compute_shader_enable, SHARED);
2893 YY_BREAK
2894 case 159:
2895 YY_RULE_SETUP
2896 #line 553 "src/compiler/glsl/glsl_lexer.ll"
2897 return STRUCT;
2898 YY_BREAK
2899 case 160:
2900 YY_RULE_SETUP
2901 #line 554 "src/compiler/glsl/glsl_lexer.ll"
2902 return VOID_TOK;
2903 YY_BREAK
2904 case 161:
2905 YY_RULE_SETUP
2906 #line 556 "src/compiler/glsl/glsl_lexer.ll"
2907 {
2908 if ((yyextra->is_version(140, 300))
2909 || yyextra->ARB_bindless_texture_enable
2910 || yyextra->KHR_blend_equation_advanced_enable
2911 || yyextra->AMD_conservative_depth_enable
2912 || yyextra->ARB_conservative_depth_enable
2913 || yyextra->ARB_explicit_attrib_location_enable
2914 || yyextra->ARB_explicit_uniform_location_enable
2915 || yyextra->ARB_post_depth_coverage_enable
2916 || yyextra->has_separate_shader_objects()
2917 || yyextra->ARB_uniform_buffer_object_enable
2918 || yyextra->ARB_fragment_coord_conventions_enable
2919 || yyextra->ARB_shading_language_420pack_enable
2920 || yyextra->ARB_compute_shader_enable
2921 || yyextra->ARB_tessellation_shader_enable
2922 || yyextra->EXT_shader_framebuffer_fetch_non_coherent_enable) {
2923 return LAYOUT_TOK;
2924 } else {
2925 return classify_identifier(yyextra, yytext, yyleng, yylval);
2926 }
2927 }
2928 YY_BREAK
2929 case 162:
2930 YY_RULE_SETUP
2931 #line 578 "src/compiler/glsl/glsl_lexer.ll"
2932 return INC_OP;
2933 YY_BREAK
2934 case 163:
2935 YY_RULE_SETUP
2936 #line 579 "src/compiler/glsl/glsl_lexer.ll"
2937 return DEC_OP;
2938 YY_BREAK
2939 case 164:
2940 YY_RULE_SETUP
2941 #line 580 "src/compiler/glsl/glsl_lexer.ll"
2942 return LE_OP;
2943 YY_BREAK
2944 case 165:
2945 YY_RULE_SETUP
2946 #line 581 "src/compiler/glsl/glsl_lexer.ll"
2947 return GE_OP;
2948 YY_BREAK
2949 case 166:
2950 YY_RULE_SETUP
2951 #line 582 "src/compiler/glsl/glsl_lexer.ll"
2952 return EQ_OP;
2953 YY_BREAK
2954 case 167:
2955 YY_RULE_SETUP
2956 #line 583 "src/compiler/glsl/glsl_lexer.ll"
2957 return NE_OP;
2958 YY_BREAK
2959 case 168:
2960 YY_RULE_SETUP
2961 #line 584 "src/compiler/glsl/glsl_lexer.ll"
2962 return AND_OP;
2963 YY_BREAK
2964 case 169:
2965 YY_RULE_SETUP
2966 #line 585 "src/compiler/glsl/glsl_lexer.ll"
2967 return OR_OP;
2968 YY_BREAK
2969 case 170:
2970 YY_RULE_SETUP
2971 #line 586 "src/compiler/glsl/glsl_lexer.ll"
2972 return XOR_OP;
2973 YY_BREAK
2974 case 171:
2975 YY_RULE_SETUP
2976 #line 587 "src/compiler/glsl/glsl_lexer.ll"
2977 return LEFT_OP;
2978 YY_BREAK
2979 case 172:
2980 YY_RULE_SETUP
2981 #line 588 "src/compiler/glsl/glsl_lexer.ll"
2982 return RIGHT_OP;
2983 YY_BREAK
2984 case 173:
2985 YY_RULE_SETUP
2986 #line 590 "src/compiler/glsl/glsl_lexer.ll"
2987 return MUL_ASSIGN;
2988 YY_BREAK
2989 case 174:
2990 YY_RULE_SETUP
2991 #line 591 "src/compiler/glsl/glsl_lexer.ll"
2992 return DIV_ASSIGN;
2993 YY_BREAK
2994 case 175:
2995 YY_RULE_SETUP
2996 #line 592 "src/compiler/glsl/glsl_lexer.ll"
2997 return ADD_ASSIGN;
2998 YY_BREAK
2999 case 176:
3000 YY_RULE_SETUP
3001 #line 593 "src/compiler/glsl/glsl_lexer.ll"
3002 return MOD_ASSIGN;
3003 YY_BREAK
3004 case 177:
3005 YY_RULE_SETUP
3006 #line 594 "src/compiler/glsl/glsl_lexer.ll"
3007 return LEFT_ASSIGN;
3008 YY_BREAK
3009 case 178:
3010 YY_RULE_SETUP
3011 #line 595 "src/compiler/glsl/glsl_lexer.ll"
3012 return RIGHT_ASSIGN;
3013 YY_BREAK
3014 case 179:
3015 YY_RULE_SETUP
3016 #line 596 "src/compiler/glsl/glsl_lexer.ll"
3017 return AND_ASSIGN;
3018 YY_BREAK
3019 case 180:
3020 YY_RULE_SETUP
3021 #line 597 "src/compiler/glsl/glsl_lexer.ll"
3022 return XOR_ASSIGN;
3023 YY_BREAK
3024 case 181:
3025 YY_RULE_SETUP
3026 #line 598 "src/compiler/glsl/glsl_lexer.ll"
3027 return OR_ASSIGN;
3028 YY_BREAK
3029 case 182:
3030 YY_RULE_SETUP
3031 #line 599 "src/compiler/glsl/glsl_lexer.ll"
3032 return SUB_ASSIGN;
3033 YY_BREAK
3034 case 183:
3035 YY_RULE_SETUP
3036 #line 601 "src/compiler/glsl/glsl_lexer.ll"
3037 {
3038 return LITERAL_INTEGER(10);
3039 }
3040 YY_BREAK
3041 case 184:
3042 YY_RULE_SETUP
3043 #line 604 "src/compiler/glsl/glsl_lexer.ll"
3044 {
3045 return LITERAL_INTEGER(16);
3046 }
3047 YY_BREAK
3048 case 185:
3049 YY_RULE_SETUP
3050 #line 607 "src/compiler/glsl/glsl_lexer.ll"
3051 {
3052 return LITERAL_INTEGER(8);
3053 }
3054 YY_BREAK
3055 case 186:
3056 #line 612 "src/compiler/glsl/glsl_lexer.ll"
3057 case 187:
3058 #line 613 "src/compiler/glsl/glsl_lexer.ll"
3059 case 188:
3060 #line 614 "src/compiler/glsl/glsl_lexer.ll"
3061 case 189:
3062 YY_RULE_SETUP
3063 #line 614 "src/compiler/glsl/glsl_lexer.ll"
3064 {
3065 struct _mesa_glsl_parse_state *state = yyextra;
3066 char suffix = yytext[strlen(yytext) - 1];
3067 if (!state->is_version(120, 300) &&
3068 (suffix == 'f' || suffix == 'F')) {
3069 _mesa_glsl_warning(yylloc, state,
3070 "Float suffixes are invalid in GLSL 1.10");
3071 }
3072 yylval->real = _mesa_strtof(yytext, NULL);
3073 return FLOATCONSTANT;
3074 }
3075 YY_BREAK
3076 case 190:
3077 #line 627 "src/compiler/glsl/glsl_lexer.ll"
3078 case 191:
3079 #line 628 "src/compiler/glsl/glsl_lexer.ll"
3080 case 192:
3081 #line 629 "src/compiler/glsl/glsl_lexer.ll"
3082 case 193:
3083 YY_RULE_SETUP
3084 #line 629 "src/compiler/glsl/glsl_lexer.ll"
3085 {
3086 if (!yyextra->is_version(400, 0) &&
3087 !yyextra->ARB_gpu_shader_fp64_enable)
3088 return ERROR_TOK;
3089 yylval->dreal = _mesa_strtod(yytext, NULL);
3090 return DOUBLECONSTANT;
3091 }
3092 YY_BREAK
3093 case 194:
3094 YY_RULE_SETUP
3095 #line 637 "src/compiler/glsl/glsl_lexer.ll"
3096 {
3097 yylval->n = 1;
3098 return BOOLCONSTANT;
3099 }
3100 YY_BREAK
3101 case 195:
3102 YY_RULE_SETUP
3103 #line 641 "src/compiler/glsl/glsl_lexer.ll"
3104 {
3105 yylval->n = 0;
3106 return BOOLCONSTANT;
3107 }
3108 YY_BREAK
3109 /* Reserved words in GLSL 1.10. */
3110 case 196:
3111 YY_RULE_SETUP
3112 #line 648 "src/compiler/glsl/glsl_lexer.ll"
3113 KEYWORD(110, 100, 0, 0, ASM);
3114 YY_BREAK
3115 case 197:
3116 YY_RULE_SETUP
3117 #line 649 "src/compiler/glsl/glsl_lexer.ll"
3118 KEYWORD(110, 100, 0, 0, CLASS);
3119 YY_BREAK
3120 case 198:
3121 YY_RULE_SETUP
3122 #line 650 "src/compiler/glsl/glsl_lexer.ll"
3123 KEYWORD(110, 100, 0, 0, UNION);
3124 YY_BREAK
3125 case 199:
3126 YY_RULE_SETUP
3127 #line 651 "src/compiler/glsl/glsl_lexer.ll"
3128 KEYWORD(110, 100, 0, 0, ENUM);
3129 YY_BREAK
3130 case 200:
3131 YY_RULE_SETUP
3132 #line 652 "src/compiler/glsl/glsl_lexer.ll"
3133 KEYWORD(110, 100, 0, 0, TYPEDEF);
3134 YY_BREAK
3135 case 201:
3136 YY_RULE_SETUP
3137 #line 653 "src/compiler/glsl/glsl_lexer.ll"
3138 KEYWORD(110, 100, 0, 0, TEMPLATE);
3139 YY_BREAK
3140 case 202:
3141 YY_RULE_SETUP
3142 #line 654 "src/compiler/glsl/glsl_lexer.ll"
3143 KEYWORD(110, 100, 0, 0, THIS);
3144 YY_BREAK
3145 case 203:
3146 YY_RULE_SETUP
3147 #line 655 "src/compiler/glsl/glsl_lexer.ll"
3148 KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
3149 YY_BREAK
3150 case 204:
3151 YY_RULE_SETUP
3152 #line 656 "src/compiler/glsl/glsl_lexer.ll"
3153 KEYWORD(110, 100, 0, 0, GOTO);
3154 YY_BREAK
3155 case 205:
3156 YY_RULE_SETUP
3157 #line 657 "src/compiler/glsl/glsl_lexer.ll"
3158 KEYWORD(110, 100, 130, 300, SWITCH);
3159 YY_BREAK
3160 case 206:
3161 YY_RULE_SETUP
3162 #line 658 "src/compiler/glsl/glsl_lexer.ll"
3163 KEYWORD(110, 100, 130, 300, DEFAULT);
3164 YY_BREAK
3165 case 207:
3166 YY_RULE_SETUP
3167 #line 659 "src/compiler/glsl/glsl_lexer.ll"
3168 KEYWORD(110, 100, 0, 0, INLINE_TOK);
3169 YY_BREAK
3170 case 208:
3171 YY_RULE_SETUP
3172 #line 660 "src/compiler/glsl/glsl_lexer.ll"
3173 KEYWORD(110, 100, 0, 0, NOINLINE);
3174 YY_BREAK
3175 case 209:
3176 YY_RULE_SETUP
3177 #line 661 "src/compiler/glsl/glsl_lexer.ll"
3178 KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
3179 YY_BREAK
3180 case 210:
3181 YY_RULE_SETUP
3182 #line 662 "src/compiler/glsl/glsl_lexer.ll"
3183 KEYWORD(110, 100, 0, 0, STATIC);
3184 YY_BREAK
3185 case 211:
3186 YY_RULE_SETUP
3187 #line 663 "src/compiler/glsl/glsl_lexer.ll"
3188 KEYWORD(110, 100, 0, 0, EXTERN);
3189 YY_BREAK
3190 case 212:
3191 YY_RULE_SETUP
3192 #line 664 "src/compiler/glsl/glsl_lexer.ll"
3193 KEYWORD(110, 100, 0, 0, EXTERNAL);
3194 YY_BREAK
3195 case 213:
3196 YY_RULE_SETUP
3197 #line 665 "src/compiler/glsl/glsl_lexer.ll"
3198 KEYWORD(110, 100, 0, 0, INTERFACE);
3199 YY_BREAK
3200 case 214:
3201 YY_RULE_SETUP
3202 #line 666 "src/compiler/glsl/glsl_lexer.ll"
3203 KEYWORD(110, 100, 0, 0, LONG_TOK);
3204 YY_BREAK
3205 case 215:
3206 YY_RULE_SETUP
3207 #line 667 "src/compiler/glsl/glsl_lexer.ll"
3208 KEYWORD(110, 100, 0, 0, SHORT_TOK);
3209 YY_BREAK
3210 case 216:
3211 YY_RULE_SETUP
3212 #line 668 "src/compiler/glsl/glsl_lexer.ll"
3213 TYPE_WITH_ALT(130, 100, 130, 300, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::double_type);
3214 YY_BREAK
3215 case 217:
3216 YY_RULE_SETUP
3217 #line 669 "src/compiler/glsl/glsl_lexer.ll"
3218 KEYWORD(110, 100, 0, 0, HALF);
3219 YY_BREAK
3220 case 218:
3221 YY_RULE_SETUP
3222 #line 670 "src/compiler/glsl/glsl_lexer.ll"
3223 KEYWORD(110, 100, 0, 0, FIXED_TOK);
3224 YY_BREAK
3225 case 219:
3226 YY_RULE_SETUP
3227 #line 671 "src/compiler/glsl/glsl_lexer.ll"
3228 KEYWORD_WITH_ALT(110, 100, 0, 0, yyextra->EXT_gpu_shader4_enable, UNSIGNED);
3229 YY_BREAK
3230 case 220:
3231 YY_RULE_SETUP
3232 #line 672 "src/compiler/glsl/glsl_lexer.ll"
3233 KEYWORD(110, 100, 0, 0, INPUT_TOK);
3234 YY_BREAK
3235 case 221:
3236 YY_RULE_SETUP
3237 #line 673 "src/compiler/glsl/glsl_lexer.ll"
3238 KEYWORD(110, 100, 0, 0, OUTPUT);
3239 YY_BREAK
3240 case 222:
3241 YY_RULE_SETUP
3242 #line 674 "src/compiler/glsl/glsl_lexer.ll"
3243 KEYWORD(110, 100, 0, 0, HVEC2);
3244 YY_BREAK
3245 case 223:
3246 YY_RULE_SETUP
3247 #line 675 "src/compiler/glsl/glsl_lexer.ll"
3248 KEYWORD(110, 100, 0, 0, HVEC3);
3249 YY_BREAK
3250 case 224:
3251 YY_RULE_SETUP
3252 #line 676 "src/compiler/glsl/glsl_lexer.ll"
3253 KEYWORD(110, 100, 0, 0, HVEC4);
3254 YY_BREAK
3255 case 225:
3256 YY_RULE_SETUP
3257 #line 677 "src/compiler/glsl/glsl_lexer.ll"
3258 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dvec2_type);
3259 YY_BREAK
3260 case 226:
3261 YY_RULE_SETUP
3262 #line 678 "src/compiler/glsl/glsl_lexer.ll"
3263 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dvec3_type);
3264 YY_BREAK
3265 case 227:
3266 YY_RULE_SETUP
3267 #line 679 "src/compiler/glsl/glsl_lexer.ll"
3268 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dvec4_type);
3269 YY_BREAK
3270 case 228:
3271 YY_RULE_SETUP
3272 #line 680 "src/compiler/glsl/glsl_lexer.ll"
3273 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat2_type);
3274 YY_BREAK
3275 case 229:
3276 YY_RULE_SETUP
3277 #line 681 "src/compiler/glsl/glsl_lexer.ll"
3278 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat3_type);
3279 YY_BREAK
3280 case 230:
3281 YY_RULE_SETUP
3282 #line 682 "src/compiler/glsl/glsl_lexer.ll"
3283 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat4_type);
3284 YY_BREAK
3285 case 231:
3286 YY_RULE_SETUP
3287 #line 683 "src/compiler/glsl/glsl_lexer.ll"
3288 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat2_type);
3289 YY_BREAK
3290 case 232:
3291 YY_RULE_SETUP
3292 #line 684 "src/compiler/glsl/glsl_lexer.ll"
3293 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat2x3_type);
3294 YY_BREAK
3295 case 233:
3296 YY_RULE_SETUP
3297 #line 685 "src/compiler/glsl/glsl_lexer.ll"
3298 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat2x4_type);
3299 YY_BREAK
3300 case 234:
3301 YY_RULE_SETUP
3302 #line 686 "src/compiler/glsl/glsl_lexer.ll"
3303 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat3x2_type);
3304 YY_BREAK
3305 case 235:
3306 YY_RULE_SETUP
3307 #line 687 "src/compiler/glsl/glsl_lexer.ll"
3308 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat3_type);
3309 YY_BREAK
3310 case 236:
3311 YY_RULE_SETUP
3312 #line 688 "src/compiler/glsl/glsl_lexer.ll"
3313 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat3x4_type);
3314 YY_BREAK
3315 case 237:
3316 YY_RULE_SETUP
3317 #line 689 "src/compiler/glsl/glsl_lexer.ll"
3318 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat4x2_type);
3319 YY_BREAK
3320 case 238:
3321 YY_RULE_SETUP
3322 #line 690 "src/compiler/glsl/glsl_lexer.ll"
3323 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat4x3_type);
3324 YY_BREAK
3325 case 239:
3326 YY_RULE_SETUP
3327 #line 691 "src/compiler/glsl/glsl_lexer.ll"
3328 TYPE_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::dmat4_type);
3329 YY_BREAK
3330 case 240:
3331 YY_RULE_SETUP
3332 #line 692 "src/compiler/glsl/glsl_lexer.ll"
3333 KEYWORD(110, 100, 0, 0, FVEC2);
3334 YY_BREAK
3335 case 241:
3336 YY_RULE_SETUP
3337 #line 693 "src/compiler/glsl/glsl_lexer.ll"
3338 KEYWORD(110, 100, 0, 0, FVEC3);
3339 YY_BREAK
3340 case 242:
3341 YY_RULE_SETUP
3342 #line 694 "src/compiler/glsl/glsl_lexer.ll"
3343 KEYWORD(110, 100, 0, 0, FVEC4);
3344 YY_BREAK
3345 case 243:
3346 YY_RULE_SETUP
3347 #line 695 "src/compiler/glsl/glsl_lexer.ll"
3348 TYPE_WITH_ALT(110, 100, 0, 0, yyextra->ARB_texture_rectangle_enable, glsl_type::sampler2DRect_type);
3349 YY_BREAK
3350 case 244:
3351 YY_RULE_SETUP
3352 #line 696 "src/compiler/glsl/glsl_lexer.ll"
3353 KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
3354 YY_BREAK
3355 case 245:
3356 YY_RULE_SETUP
3357 #line 697 "src/compiler/glsl/glsl_lexer.ll"
3358 TYPE_WITH_ALT(110, 100, 0, 0, yyextra->ARB_texture_rectangle_enable, glsl_type::sampler2DRectShadow_type);
3359 YY_BREAK
3360 case 246:
3361 YY_RULE_SETUP
3362 #line 698 "src/compiler/glsl/glsl_lexer.ll"
3363 KEYWORD(110, 100, 0, 0, SIZEOF);
3364 YY_BREAK
3365 case 247:
3366 YY_RULE_SETUP
3367 #line 699 "src/compiler/glsl/glsl_lexer.ll"
3368 KEYWORD(110, 100, 0, 0, CAST);
3369 YY_BREAK
3370 case 248:
3371 YY_RULE_SETUP
3372 #line 700 "src/compiler/glsl/glsl_lexer.ll"
3373 KEYWORD(110, 100, 0, 0, NAMESPACE);
3374 YY_BREAK
3375 case 249:
3376 YY_RULE_SETUP
3377 #line 701 "src/compiler/glsl/glsl_lexer.ll"
3378 KEYWORD(110, 100, 0, 0, USING);
3379 YY_BREAK
3380 /* Additional reserved words in GLSL 1.20. */
3381 case 250:
3382 YY_RULE_SETUP
3383 #line 704 "src/compiler/glsl/glsl_lexer.ll"
3384 KEYWORD(120, 100, 130, 100, LOWP);
3385 YY_BREAK
3386 case 251:
3387 YY_RULE_SETUP
3388 #line 705 "src/compiler/glsl/glsl_lexer.ll"
3389 KEYWORD(120, 100, 130, 100, MEDIUMP);
3390 YY_BREAK
3391 case 252:
3392 YY_RULE_SETUP
3393 #line 706 "src/compiler/glsl/glsl_lexer.ll"
3394 KEYWORD(120, 100, 130, 100, HIGHP);
3395 YY_BREAK
3396 case 253:
3397 YY_RULE_SETUP
3398 #line 707 "src/compiler/glsl/glsl_lexer.ll"
3399 KEYWORD(120, 100, 130, 100, PRECISION);
3400 YY_BREAK
3401 /* Additional reserved words in GLSL 1.30. */
3402 case 254:
3403 YY_RULE_SETUP
3404 #line 710 "src/compiler/glsl/glsl_lexer.ll"
3405 KEYWORD(130, 300, 130, 300, CASE);
3406 YY_BREAK
3407 case 255:
3408 YY_RULE_SETUP
3409 #line 711 "src/compiler/glsl/glsl_lexer.ll"
3410 KEYWORD(130, 300, 0, 0, COMMON);
3411 YY_BREAK
3412 case 256:
3413 YY_RULE_SETUP
3414 #line 712 "src/compiler/glsl/glsl_lexer.ll"
3415 KEYWORD(130, 300, 0, 0, PARTITION);
3416 YY_BREAK
3417 case 257:
3418 YY_RULE_SETUP
3419 #line 713 "src/compiler/glsl/glsl_lexer.ll"
3420 KEYWORD(130, 300, 0, 0, ACTIVE);
3421 YY_BREAK
3422 case 258:
3423 YY_RULE_SETUP
3424 #line 714 "src/compiler/glsl/glsl_lexer.ll"
3425 KEYWORD(130, 100, 0, 0, SUPERP);
3426 YY_BREAK
3427 case 259:
3428 YY_RULE_SETUP
3429 #line 715 "src/compiler/glsl/glsl_lexer.ll"
3430 TYPE_WITH_ALT(130, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable || (yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_buffer_object), glsl_type::samplerBuffer_type);
3431 YY_BREAK
3432 case 260:
3433 YY_RULE_SETUP
3434 #line 716 "src/compiler/glsl/glsl_lexer.ll"
3435 KEYWORD(130, 300, 0, 0, FILTER);
3436 YY_BREAK
3437 case 261:
3438 YY_RULE_SETUP
3439 #line 717 "src/compiler/glsl/glsl_lexer.ll"
3440 KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
3441 YY_BREAK
3442 /* Additional reserved words in GLSL 1.40 */
3443 case 262:
3444 YY_RULE_SETUP
3445 #line 720 "src/compiler/glsl/glsl_lexer.ll"
3446 TYPE_WITH_ALT(140, 300, 140, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.NV_texture_rectangle && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::isampler2DRect_type);
3447 YY_BREAK
3448 case 263:
3449 YY_RULE_SETUP
3450 #line 721 "src/compiler/glsl/glsl_lexer.ll"
3451 TYPE_WITH_ALT(140, 300, 140, 0, yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.NV_texture_rectangle && yyextra->ctx->Extensions.EXT_texture_integer, glsl_type::usampler2DRect_type);
3452 YY_BREAK
3453 case 264:
3454 YY_RULE_SETUP
3455 #line 722 "src/compiler/glsl/glsl_lexer.ll"
3456 TYPE_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable || (yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_buffer_object && yyextra->ctx->Extensions.EXT_texture_integer), glsl_type::isamplerBuffer_type);
3457 YY_BREAK
3458 case 265:
3459 YY_RULE_SETUP
3460 #line 723 "src/compiler/glsl/glsl_lexer.ll"
3461 TYPE_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable || (yyextra->EXT_gpu_shader4_enable && yyextra->ctx->Extensions.EXT_texture_buffer_object && yyextra->ctx->Extensions.EXT_texture_integer), glsl_type::usamplerBuffer_type);
3462 YY_BREAK
3463 /* Additional reserved words in GLSL ES 3.00 */
3464 case 266:
3465 YY_RULE_SETUP
3466 #line 726 "src/compiler/glsl/glsl_lexer.ll"
3467 KEYWORD(420, 300, 0, 0, RESOURCE);
3468 YY_BREAK
3469 case 267:
3470 YY_RULE_SETUP
3471 #line 727 "src/compiler/glsl/glsl_lexer.ll"
3472 KEYWORD_WITH_ALT(400, 300, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->OES_shader_multisample_interpolation_enable, SAMPLE);
3473 YY_BREAK
3474 case 268:
3475 YY_RULE_SETUP
3476 #line 728 "src/compiler/glsl/glsl_lexer.ll"
3477 KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_shader_subroutine_enable, SUBROUTINE);
3478 YY_BREAK
3479 /* Additional words for ARB_gpu_shader_int64 */
3480 case 269:
3481 YY_RULE_SETUP
3482 #line 731 "src/compiler/glsl/glsl_lexer.ll"
3483 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::int64_t_type);
3484 YY_BREAK
3485 case 270:
3486 YY_RULE_SETUP
3487 #line 732 "src/compiler/glsl/glsl_lexer.ll"
3488 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::i64vec2_type);
3489 YY_BREAK
3490 case 271:
3491 YY_RULE_SETUP
3492 #line 733 "src/compiler/glsl/glsl_lexer.ll"
3493 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::i64vec3_type);
3494 YY_BREAK
3495 case 272:
3496 YY_RULE_SETUP
3497 #line 734 "src/compiler/glsl/glsl_lexer.ll"
3498 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::i64vec4_type);
3499 YY_BREAK
3500 case 273:
3501 YY_RULE_SETUP
3502 #line 736 "src/compiler/glsl/glsl_lexer.ll"
3503 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::uint64_t_type);
3504 YY_BREAK
3505 case 274:
3506 YY_RULE_SETUP
3507 #line 737 "src/compiler/glsl/glsl_lexer.ll"
3508 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::u64vec2_type);
3509 YY_BREAK
3510 case 275:
3511 YY_RULE_SETUP
3512 #line 738 "src/compiler/glsl/glsl_lexer.ll"
3513 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::u64vec3_type);
3514 YY_BREAK
3515 case 276:
3516 YY_RULE_SETUP
3517 #line 739 "src/compiler/glsl/glsl_lexer.ll"
3518 TYPE_WITH_ALT(0, 0, 0, 0, yyextra->ARB_gpu_shader_int64_enable || yyextra->AMD_gpu_shader_int64_enable, glsl_type::u64vec4_type);
3519 YY_BREAK
3520 case 277:
3521 YY_RULE_SETUP
3522 #line 741 "src/compiler/glsl/glsl_lexer.ll"
3523 {
3524 struct _mesa_glsl_parse_state *state = yyextra;
3525 if (state->es_shader && yyleng > 1024) {
3526 _mesa_glsl_error(yylloc, state,
3527 "Identifier `%s' exceeds 1024 characters",
3528 yytext);
3529 }
3530 return classify_identifier(state, yytext, yyleng, yylval);
3531 }
3532 YY_BREAK
3533 case 278:
3534 YY_RULE_SETUP
3535 #line 751 "src/compiler/glsl/glsl_lexer.ll"
3536 { struct _mesa_glsl_parse_state *state = yyextra;
3537 state->is_field = true;
3538 return DOT_TOK; }
3539 YY_BREAK
3540 case 279:
3541 YY_RULE_SETUP
3542 #line 755 "src/compiler/glsl/glsl_lexer.ll"
3543 { return yytext[0]; }
3544 YY_BREAK
3545 case 280:
3546 YY_RULE_SETUP
3547 #line 757 "src/compiler/glsl/glsl_lexer.ll"
3548 YY_FATAL_ERROR( "flex scanner jammed" );
3549 YY_BREAK
3550 #line 3550 "src/compiler/glsl/glsl_lexer.cpp"
3551 case YY_STATE_EOF(INITIAL):
3552 case YY_STATE_EOF(PP):
3553 case YY_STATE_EOF(PRAGMA):
3554 yyterminate();
3555
3556 case YY_END_OF_BUFFER:
3557 {
3558 /* Amount of text matched not including the EOB char. */
3559 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
3560
3561 /* Undo the effects of YY_DO_BEFORE_ACTION. */
3562 *yy_cp = yyg->yy_hold_char;
3563 YY_RESTORE_YY_MORE_OFFSET
3564
3565 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3566 {
3567 /* We're scanning a new file or input source. It's
3568 * possible that this happened because the user
3569 * just pointed yyin at a new source and called
3570 * yylex(). If so, then we have to assure
3571 * consistency between YY_CURRENT_BUFFER and our
3572 * globals. Here is the right place to do so, because
3573 * this is the first action (other than possibly a
3574 * back-up) that will match for the new input source.
3575 */
3576 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3577 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3578 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3579 }
3580
3581 /* Note that here we test for yy_c_buf_p "<=" to the position
3582 * of the first EOB in the buffer, since yy_c_buf_p will
3583 * already have been incremented past the NUL character
3584 * (since all states make transitions on EOB to the
3585 * end-of-buffer state). Contrast this with the test
3586 * in input().
3587 */
3588 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
3589 { /* This was really a NUL. */
3590 yy_state_type yy_next_state;
3591
3592 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3593
3594 yy_current_state = yy_get_previous_state( yyscanner );
3595
3596 /* Okay, we're now positioned to make the NUL
3597 * transition. We couldn't have
3598 * yy_get_previous_state() go ahead and do it
3599 * for us because it doesn't know how to deal
3600 * with the possibility of jamming (and we don't
3601 * want to build jamming into it because then it
3602 * will run more slowly).
3603 */
3604
3605 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
3606
3607 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3608
3609 if ( yy_next_state )
3610 {
3611 /* Consume the NUL. */
3612 yy_cp = ++yyg->yy_c_buf_p;
3613 yy_current_state = yy_next_state;
3614 goto yy_match;
3615 }
3616
3617 else
3618 {
3619 yy_cp = yyg->yy_last_accepting_cpos;
3620 yy_current_state = yyg->yy_last_accepting_state;
3621 goto yy_find_action;
3622 }
3623 }
3624
3625 else switch ( yy_get_next_buffer( yyscanner ) )
3626 {
3627 case EOB_ACT_END_OF_FILE:
3628 {
3629 yyg->yy_did_buffer_switch_on_eof = 0;
3630
3631 if ( yywrap( yyscanner ) )
3632 {
3633 /* Note: because we've taken care in
3634 * yy_get_next_buffer() to have set up
3635 * yytext, we can now set up
3636 * yy_c_buf_p so that if some total
3637 * hoser (like flex itself) wants to
3638 * call the scanner after we return the
3639 * YY_NULL, it'll still work - another
3640 * YY_NULL will get returned.
3641 */
3642 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
3643
3644 yy_act = YY_STATE_EOF(YY_START);
3645 goto do_action;
3646 }
3647
3648 else
3649 {
3650 if ( ! yyg->yy_did_buffer_switch_on_eof )
3651 YY_NEW_FILE;
3652 }
3653 break;
3654 }
3655
3656 case EOB_ACT_CONTINUE_SCAN:
3657 yyg->yy_c_buf_p =
3658 yyg->yytext_ptr + yy_amount_of_matched_text;
3659
3660 yy_current_state = yy_get_previous_state( yyscanner );
3661
3662 yy_cp = yyg->yy_c_buf_p;
3663 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3664 goto yy_match;
3665
3666 case EOB_ACT_LAST_MATCH:
3667 yyg->yy_c_buf_p =
3668 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
3669
3670 yy_current_state = yy_get_previous_state( yyscanner );
3671
3672 yy_cp = yyg->yy_c_buf_p;
3673 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3674 goto yy_find_action;
3675 }
3676 break;
3677 }
3678
3679 default:
3680 YY_FATAL_ERROR(
3681 "fatal flex scanner internal error--no action found" );
3682 } /* end of action switch */
3683 } /* end of scanning one token */
3684 } /* end of user's declarations */
3685 } /* end of yylex */
3686
3687 /* yy_get_next_buffer - try to read in a new buffer
3688 *
3689 * Returns a code representing an action:
3690 * EOB_ACT_LAST_MATCH -
3691 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3692 * EOB_ACT_END_OF_FILE - end of file
3693 */
3694 static int yy_get_next_buffer (yyscan_t yyscanner)
3695 {
3696 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3697 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3698 char *source = yyg->yytext_ptr;
3699 int number_to_move, i;
3700 int ret_val;
3701
3702 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
3703 YY_FATAL_ERROR(
3704 "fatal flex scanner internal error--end of buffer missed" );
3705
3706 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3707 { /* Don't try to fill the buffer, so this is an EOF. */
3708 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
3709 {
3710 /* We matched a single character, the EOB, so
3711 * treat this as a final EOF.
3712 */
3713 return EOB_ACT_END_OF_FILE;
3714 }
3715
3716 else
3717 {
3718 /* We matched some text prior to the EOB, first
3719 * process it.
3720 */
3721 return EOB_ACT_LAST_MATCH;
3722 }
3723 }
3724
3725 /* Try to read more data. */
3726
3727 /* First move last chars to start of buffer. */
3728 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
3729
3730 for ( i = 0; i < number_to_move; ++i )
3731 *(dest++) = *(source++);
3732
3733 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3734 /* don't do the read, it's not guaranteed to return an EOF,
3735 * just force an EOF
3736 */
3737 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
3738
3739 else
3740 {
3741 int num_to_read =
3742 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3743
3744 while ( num_to_read <= 0 )
3745 { /* Not enough room in the buffer - grow it. */
3746
3747 /* just a shorter name for the current buffer */
3748 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
3749
3750 int yy_c_buf_p_offset =
3751 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
3752
3753 if ( b->yy_is_our_buffer )
3754 {
3755 int new_size = b->yy_buf_size * 2;
3756
3757 if ( new_size <= 0 )
3758 b->yy_buf_size += b->yy_buf_size / 8;
3759 else
3760 b->yy_buf_size *= 2;
3761
3762 b->yy_ch_buf = (char *)
3763 /* Include room in for 2 EOB chars. */
3764 yyrealloc( (void *) b->yy_ch_buf,
3765 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
3766 }
3767 else
3768 /* Can't grow it, we don't own it. */
3769 b->yy_ch_buf = NULL;
3770
3771 if ( ! b->yy_ch_buf )
3772 YY_FATAL_ERROR(
3773 "fatal error - scanner input buffer overflow" );
3774
3775 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
3776
3777 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3778 number_to_move - 1;
3779
3780 }
3781
3782 if ( num_to_read > YY_READ_BUF_SIZE )
3783 num_to_read = YY_READ_BUF_SIZE;
3784
3785 /* Read in more data. */
3786 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3787 yyg->yy_n_chars, num_to_read );
3788
3789 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
3790 }
3791
3792 if ( yyg->yy_n_chars == 0 )
3793 {
3794 if ( number_to_move == YY_MORE_ADJ )
3795 {
3796 ret_val = EOB_ACT_END_OF_FILE;
3797 yyrestart( yyin , yyscanner);
3798 }
3799
3800 else
3801 {
3802 ret_val = EOB_ACT_LAST_MATCH;
3803 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3804 YY_BUFFER_EOF_PENDING;
3805 }
3806 }
3807
3808 else
3809 ret_val = EOB_ACT_CONTINUE_SCAN;
3810
3811 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3812 /* Extend the array by 50%, plus the number we really need. */
3813 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
3814 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
3815 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
3816 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3817 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3818 /* "- 2" to take care of EOB's */
3819 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
3820 }
3821
3822 yyg->yy_n_chars += number_to_move;
3823 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
3824 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
3825
3826 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3827
3828 return ret_val;
3829 }
3830
3831 /* yy_get_previous_state - get the state just before the EOB char was reached */
3832
yy_get_previous_state(yyscan_t yyscanner)3833 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
3834 {
3835 yy_state_type yy_current_state;
3836 char *yy_cp;
3837 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3838
3839 yy_current_state = yyg->yy_start;
3840 yy_current_state += YY_AT_BOL();
3841
3842 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
3843 {
3844 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3845 if ( yy_accept[yy_current_state] )
3846 {
3847 yyg->yy_last_accepting_state = yy_current_state;
3848 yyg->yy_last_accepting_cpos = yy_cp;
3849 }
3850 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3851 {
3852 yy_current_state = (int) yy_def[yy_current_state];
3853 if ( yy_current_state >= 1112 )
3854 yy_c = yy_meta[yy_c];
3855 }
3856 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3857 }
3858
3859 return yy_current_state;
3860 }
3861
3862 /* yy_try_NUL_trans - try to make a transition on the NUL character
3863 *
3864 * synopsis
3865 * next_state = yy_try_NUL_trans( current_state );
3866 */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)3867 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
3868 {
3869 int yy_is_jam;
3870 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
3871 char *yy_cp = yyg->yy_c_buf_p;
3872
3873 YY_CHAR yy_c = 1;
3874 if ( yy_accept[yy_current_state] )
3875 {
3876 yyg->yy_last_accepting_state = yy_current_state;
3877 yyg->yy_last_accepting_cpos = yy_cp;
3878 }
3879 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3880 {
3881 yy_current_state = (int) yy_def[yy_current_state];
3882 if ( yy_current_state >= 1112 )
3883 yy_c = yy_meta[yy_c];
3884 }
3885 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3886 yy_is_jam = (yy_current_state == 1111);
3887
3888 (void)yyg;
3889 return yy_is_jam ? 0 : yy_current_state;
3890 }
3891
3892 #ifndef YY_NO_UNPUT
3893
3894 #endif
3895
3896 #ifndef YY_NO_INPUT
3897 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)3898 static int yyinput (yyscan_t yyscanner)
3899 #else
3900 static int input (yyscan_t yyscanner)
3901 #endif
3902
3903 {
3904 int c;
3905 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3906
3907 *yyg->yy_c_buf_p = yyg->yy_hold_char;
3908
3909 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
3910 {
3911 /* yy_c_buf_p now points to the character we want to return.
3912 * If this occurs *before* the EOB characters, then it's a
3913 * valid NUL; if not, then we've hit the end of the buffer.
3914 */
3915 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
3916 /* This was really a NUL. */
3917 *yyg->yy_c_buf_p = '\0';
3918
3919 else
3920 { /* need more input */
3921 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
3922 ++yyg->yy_c_buf_p;
3923
3924 switch ( yy_get_next_buffer( yyscanner ) )
3925 {
3926 case EOB_ACT_LAST_MATCH:
3927 /* This happens because yy_g_n_b()
3928 * sees that we've accumulated a
3929 * token and flags that we need to
3930 * try matching the token before
3931 * proceeding. But for input(),
3932 * there's no matching to consider.
3933 * So convert the EOB_ACT_LAST_MATCH
3934 * to EOB_ACT_END_OF_FILE.
3935 */
3936
3937 /* Reset buffer status. */
3938 yyrestart( yyin , yyscanner);
3939
3940 /*FALLTHROUGH*/
3941
3942 case EOB_ACT_END_OF_FILE:
3943 {
3944 if ( yywrap( yyscanner ) )
3945 return 0;
3946
3947 if ( ! yyg->yy_did_buffer_switch_on_eof )
3948 YY_NEW_FILE;
3949 #ifdef __cplusplus
3950 return yyinput(yyscanner);
3951 #else
3952 return input(yyscanner);
3953 #endif
3954 }
3955
3956 case EOB_ACT_CONTINUE_SCAN:
3957 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
3958 break;
3959 }
3960 }
3961 }
3962
3963 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
3964 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
3965 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
3966
3967 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3968
3969 return c;
3970 }
3971 #endif /* ifndef YY_NO_INPUT */
3972
3973 /** Immediately switch to a different input stream.
3974 * @param input_file A readable stream.
3975 * @param yyscanner The scanner object.
3976 * @note This function does not reset the start condition to @c INITIAL .
3977 */
yyrestart(FILE * input_file,yyscan_t yyscanner)3978 void yyrestart (FILE * input_file , yyscan_t yyscanner)
3979 {
3980 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3981
3982 if ( ! YY_CURRENT_BUFFER ){
3983 yyensure_buffer_stack (yyscanner);
3984 YY_CURRENT_BUFFER_LVALUE =
3985 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
3986 }
3987
3988 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
3989 yy_load_buffer_state( yyscanner );
3990 }
3991
3992 /** Switch to a different input buffer.
3993 * @param new_buffer The new input buffer.
3994 * @param yyscanner The scanner object.
3995 */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)3996 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3997 {
3998 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3999
4000 /* TODO. We should be able to replace this entire function body
4001 * with
4002 * yypop_buffer_state();
4003 * yypush_buffer_state(new_buffer);
4004 */
4005 yyensure_buffer_stack (yyscanner);
4006 if ( YY_CURRENT_BUFFER == new_buffer )
4007 return;
4008
4009 if ( YY_CURRENT_BUFFER )
4010 {
4011 /* Flush out information for old buffer. */
4012 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4013 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
4014 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4015 }
4016
4017 YY_CURRENT_BUFFER_LVALUE = new_buffer;
4018 yy_load_buffer_state( yyscanner );
4019
4020 /* We don't actually know whether we did this switch during
4021 * EOF (yywrap()) processing, but the only time this flag
4022 * is looked at is after yywrap() is called, so it's safe
4023 * to go ahead and always set it.
4024 */
4025 yyg->yy_did_buffer_switch_on_eof = 1;
4026 }
4027
yy_load_buffer_state(yyscan_t yyscanner)4028 static void yy_load_buffer_state (yyscan_t yyscanner)
4029 {
4030 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4031 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4032 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
4033 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
4034 yyg->yy_hold_char = *yyg->yy_c_buf_p;
4035 }
4036
4037 /** Allocate and initialize an input buffer state.
4038 * @param file A readable stream.
4039 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
4040 * @param yyscanner The scanner object.
4041 * @return the allocated buffer state.
4042 */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)4043 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
4044 {
4045 YY_BUFFER_STATE b;
4046
4047 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
4048 if ( ! b )
4049 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
4050
4051 b->yy_buf_size = size;
4052
4053 /* yy_ch_buf has to be 2 characters longer than the size given because
4054 * we need to put in 2 end-of-buffer characters.
4055 */
4056 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
4057 if ( ! b->yy_ch_buf )
4058 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
4059
4060 b->yy_is_our_buffer = 1;
4061
4062 yy_init_buffer( b, file , yyscanner);
4063
4064 return b;
4065 }
4066
4067 /** Destroy the buffer.
4068 * @param b a buffer created with yy_create_buffer()
4069 * @param yyscanner The scanner object.
4070 */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)4071 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4072 {
4073 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4074
4075 if ( ! b )
4076 return;
4077
4078 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
4079 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
4080
4081 if ( b->yy_is_our_buffer )
4082 yyfree( (void *) b->yy_ch_buf , yyscanner );
4083
4084 yyfree( (void *) b , yyscanner );
4085 }
4086
4087 /* Initializes or reinitializes a buffer.
4088 * This function is sometimes called more than once on the same buffer,
4089 * such as during a yyrestart() or at EOF.
4090 */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)4091 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
4092
4093 {
4094 int oerrno = errno;
4095 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4096
4097 yy_flush_buffer( b , yyscanner);
4098
4099 b->yy_input_file = file;
4100 b->yy_fill_buffer = 1;
4101
4102 /* If b is the current buffer, then yy_init_buffer was _probably_
4103 * called from yyrestart() or through yy_get_next_buffer.
4104 * In that case, we don't want to reset the lineno or column.
4105 */
4106 if (b != YY_CURRENT_BUFFER){
4107 b->yy_bs_lineno = 1;
4108 b->yy_bs_column = 0;
4109 }
4110
4111 b->yy_is_interactive = 0;
4112
4113 errno = oerrno;
4114 }
4115
4116 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
4117 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
4118 * @param yyscanner The scanner object.
4119 */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)4120 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4121 {
4122 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4123 if ( ! b )
4124 return;
4125
4126 b->yy_n_chars = 0;
4127
4128 /* We always need two end-of-buffer characters. The first causes
4129 * a transition to the end-of-buffer state. The second causes
4130 * a jam in that state.
4131 */
4132 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
4133 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
4134
4135 b->yy_buf_pos = &b->yy_ch_buf[0];
4136
4137 b->yy_at_bol = 1;
4138 b->yy_buffer_status = YY_BUFFER_NEW;
4139
4140 if ( b == YY_CURRENT_BUFFER )
4141 yy_load_buffer_state( yyscanner );
4142 }
4143
4144 /** Pushes the new state onto the stack. The new state becomes
4145 * the current state. This function will allocate the stack
4146 * if necessary.
4147 * @param new_buffer The new state.
4148 * @param yyscanner The scanner object.
4149 */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)4150 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
4151 {
4152 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4153 if (new_buffer == NULL)
4154 return;
4155
4156 yyensure_buffer_stack(yyscanner);
4157
4158 /* This block is copied from yy_switch_to_buffer. */
4159 if ( YY_CURRENT_BUFFER )
4160 {
4161 /* Flush out information for old buffer. */
4162 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4163 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
4164 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4165 }
4166
4167 /* Only push if top exists. Otherwise, replace top. */
4168 if (YY_CURRENT_BUFFER)
4169 yyg->yy_buffer_stack_top++;
4170 YY_CURRENT_BUFFER_LVALUE = new_buffer;
4171
4172 /* copied from yy_switch_to_buffer. */
4173 yy_load_buffer_state( yyscanner );
4174 yyg->yy_did_buffer_switch_on_eof = 1;
4175 }
4176
4177 /** Removes and deletes the top of the stack, if present.
4178 * The next element becomes the new top.
4179 * @param yyscanner The scanner object.
4180 */
yypop_buffer_state(yyscan_t yyscanner)4181 void yypop_buffer_state (yyscan_t yyscanner)
4182 {
4183 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4184 if (!YY_CURRENT_BUFFER)
4185 return;
4186
4187 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
4188 YY_CURRENT_BUFFER_LVALUE = NULL;
4189 if (yyg->yy_buffer_stack_top > 0)
4190 --yyg->yy_buffer_stack_top;
4191
4192 if (YY_CURRENT_BUFFER) {
4193 yy_load_buffer_state( yyscanner );
4194 yyg->yy_did_buffer_switch_on_eof = 1;
4195 }
4196 }
4197
4198 /* Allocates the stack if it does not exist.
4199 * Guarantees space for at least one push.
4200 */
yyensure_buffer_stack(yyscan_t yyscanner)4201 static void yyensure_buffer_stack (yyscan_t yyscanner)
4202 {
4203 yy_size_t num_to_alloc;
4204 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4205
4206 if (!yyg->yy_buffer_stack) {
4207
4208 /* First allocation is just for 2 elements, since we don't know if this
4209 * scanner will even need a stack. We use 2 instead of 1 to avoid an
4210 * immediate realloc on the next call.
4211 */
4212 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
4213 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
4214 (num_to_alloc * sizeof(struct yy_buffer_state*)
4215 , yyscanner);
4216 if ( ! yyg->yy_buffer_stack )
4217 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
4218
4219 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4220
4221 yyg->yy_buffer_stack_max = num_to_alloc;
4222 yyg->yy_buffer_stack_top = 0;
4223 return;
4224 }
4225
4226 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
4227
4228 /* Increase the buffer to prepare for a possible push. */
4229 yy_size_t grow_size = 8 /* arbitrary grow size */;
4230
4231 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
4232 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
4233 (yyg->yy_buffer_stack,
4234 num_to_alloc * sizeof(struct yy_buffer_state*)
4235 , yyscanner);
4236 if ( ! yyg->yy_buffer_stack )
4237 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
4238
4239 /* zero only the new slots.*/
4240 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
4241 yyg->yy_buffer_stack_max = num_to_alloc;
4242 }
4243 }
4244
4245 /** Setup the input buffer state to scan directly from a user-specified character buffer.
4246 * @param base the character buffer
4247 * @param size the size in bytes of the character buffer
4248 * @param yyscanner The scanner object.
4249 * @return the newly allocated buffer state object.
4250 */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)4251 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
4252 {
4253 YY_BUFFER_STATE b;
4254
4255 if ( size < 2 ||
4256 base[size-2] != YY_END_OF_BUFFER_CHAR ||
4257 base[size-1] != YY_END_OF_BUFFER_CHAR )
4258 /* They forgot to leave room for the EOB's. */
4259 return NULL;
4260
4261 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
4262 if ( ! b )
4263 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
4264
4265 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
4266 b->yy_buf_pos = b->yy_ch_buf = base;
4267 b->yy_is_our_buffer = 0;
4268 b->yy_input_file = NULL;
4269 b->yy_n_chars = b->yy_buf_size;
4270 b->yy_is_interactive = 0;
4271 b->yy_at_bol = 1;
4272 b->yy_fill_buffer = 0;
4273 b->yy_buffer_status = YY_BUFFER_NEW;
4274
4275 yy_switch_to_buffer( b , yyscanner );
4276
4277 return b;
4278 }
4279
4280 /** Setup the input buffer state to scan a string. The next call to yylex() will
4281 * scan from a @e copy of @a str.
4282 * @param yystr a NUL-terminated string to scan
4283 * @param yyscanner The scanner object.
4284 * @return the newly allocated buffer state object.
4285 * @note If you want to scan bytes that may contain NUL values, then use
4286 * yy_scan_bytes() instead.
4287 */
yy_scan_string(const char * yystr,yyscan_t yyscanner)4288 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
4289 {
4290
4291 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
4292 }
4293
4294 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
4295 * scan from a @e copy of @a bytes.
4296 * @param yybytes the byte buffer to scan
4297 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
4298 * @param yyscanner The scanner object.
4299 * @return the newly allocated buffer state object.
4300 */
yy_scan_bytes(const char * yybytes,int _yybytes_len,yyscan_t yyscanner)4301 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
4302 {
4303 YY_BUFFER_STATE b;
4304 char *buf;
4305 yy_size_t n;
4306 int i;
4307
4308 /* Get memory for full buffer, including space for trailing EOB's. */
4309 n = (yy_size_t) (_yybytes_len + 2);
4310 buf = (char *) yyalloc( n , yyscanner );
4311 if ( ! buf )
4312 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
4313
4314 for ( i = 0; i < _yybytes_len; ++i )
4315 buf[i] = yybytes[i];
4316
4317 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4318
4319 b = yy_scan_buffer( buf, n , yyscanner);
4320 if ( ! b )
4321 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
4322
4323 /* It's okay to grow etc. this buffer, and we should throw it
4324 * away when we're done.
4325 */
4326 b->yy_is_our_buffer = 1;
4327
4328 return b;
4329 }
4330
4331 #ifndef YY_EXIT_FAILURE
4332 #define YY_EXIT_FAILURE 2
4333 #endif
4334
yy_fatal_error(const char * msg,yyscan_t yyscanner)4335 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
4336 {
4337 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4338 (void)yyg;
4339 fprintf( stderr, "%s\n", msg );
4340 exit( YY_EXIT_FAILURE );
4341 }
4342
4343 /* Redefine yyless() so it works in section 3 code. */
4344
4345 #undef yyless
4346 #define yyless(n) \
4347 do \
4348 { \
4349 /* Undo effects of setting up yytext. */ \
4350 int yyless_macro_arg = (n); \
4351 YY_LESS_LINENO(yyless_macro_arg);\
4352 yytext[yyleng] = yyg->yy_hold_char; \
4353 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4354 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4355 *yyg->yy_c_buf_p = '\0'; \
4356 yyleng = yyless_macro_arg; \
4357 } \
4358 while ( 0 )
4359
4360 /* Accessor methods (get/set functions) to struct members. */
4361
4362 /** Get the user-defined data for this scanner.
4363 * @param yyscanner The scanner object.
4364 */
yyget_extra(yyscan_t yyscanner)4365 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
4366 {
4367 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4368 return yyextra;
4369 }
4370
4371 /** Get the current line number.
4372 * @param yyscanner The scanner object.
4373 */
yyget_lineno(yyscan_t yyscanner)4374 int yyget_lineno (yyscan_t yyscanner)
4375 {
4376 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4377
4378 if (! YY_CURRENT_BUFFER)
4379 return 0;
4380
4381 return yylineno;
4382 }
4383
4384 /** Get the current column number.
4385 * @param yyscanner The scanner object.
4386 */
yyget_column(yyscan_t yyscanner)4387 int yyget_column (yyscan_t yyscanner)
4388 {
4389 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4390
4391 if (! YY_CURRENT_BUFFER)
4392 return 0;
4393
4394 return yycolumn;
4395 }
4396
4397 /** Get the input stream.
4398 * @param yyscanner The scanner object.
4399 */
yyget_in(yyscan_t yyscanner)4400 FILE *yyget_in (yyscan_t yyscanner)
4401 {
4402 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4403 return yyin;
4404 }
4405
4406 /** Get the output stream.
4407 * @param yyscanner The scanner object.
4408 */
yyget_out(yyscan_t yyscanner)4409 FILE *yyget_out (yyscan_t yyscanner)
4410 {
4411 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4412 return yyout;
4413 }
4414
4415 /** Get the length of the current token.
4416 * @param yyscanner The scanner object.
4417 */
yyget_leng(yyscan_t yyscanner)4418 int yyget_leng (yyscan_t yyscanner)
4419 {
4420 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4421 return yyleng;
4422 }
4423
4424 /** Get the current token.
4425 * @param yyscanner The scanner object.
4426 */
4427
yyget_text(yyscan_t yyscanner)4428 char *yyget_text (yyscan_t yyscanner)
4429 {
4430 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4431 return yytext;
4432 }
4433
4434 /** Set the user-defined data. This data is never touched by the scanner.
4435 * @param user_defined The data to be associated with this scanner.
4436 * @param yyscanner The scanner object.
4437 */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)4438 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
4439 {
4440 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4441 yyextra = user_defined ;
4442 }
4443
4444 /** Set the current line number.
4445 * @param _line_number line number
4446 * @param yyscanner The scanner object.
4447 */
yyset_lineno(int _line_number,yyscan_t yyscanner)4448 void yyset_lineno (int _line_number , yyscan_t yyscanner)
4449 {
4450 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4451
4452 /* lineno is only valid if an input buffer exists. */
4453 if (! YY_CURRENT_BUFFER )
4454 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
4455
4456 yylineno = _line_number;
4457 }
4458
4459 /** Set the current column.
4460 * @param _column_no column number
4461 * @param yyscanner The scanner object.
4462 */
yyset_column(int _column_no,yyscan_t yyscanner)4463 void yyset_column (int _column_no , yyscan_t yyscanner)
4464 {
4465 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4466
4467 /* column is only valid if an input buffer exists. */
4468 if (! YY_CURRENT_BUFFER )
4469 YY_FATAL_ERROR( "yyset_column called with no buffer" );
4470
4471 yycolumn = _column_no;
4472 }
4473
4474 /** Set the input stream. This does not discard the current
4475 * input buffer.
4476 * @param _in_str A readable stream.
4477 * @param yyscanner The scanner object.
4478 * @see yy_switch_to_buffer
4479 */
yyset_in(FILE * _in_str,yyscan_t yyscanner)4480 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
4481 {
4482 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4483 yyin = _in_str ;
4484 }
4485
yyset_out(FILE * _out_str,yyscan_t yyscanner)4486 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
4487 {
4488 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4489 yyout = _out_str ;
4490 }
4491
yyget_debug(yyscan_t yyscanner)4492 int yyget_debug (yyscan_t yyscanner)
4493 {
4494 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4495 return yy_flex_debug;
4496 }
4497
yyset_debug(int _bdebug,yyscan_t yyscanner)4498 void yyset_debug (int _bdebug , yyscan_t yyscanner)
4499 {
4500 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4501 yy_flex_debug = _bdebug ;
4502 }
4503
4504 /* Accessor methods for yylval and yylloc */
4505
yyget_lval(yyscan_t yyscanner)4506 YYSTYPE * yyget_lval (yyscan_t yyscanner)
4507 {
4508 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4509 return yylval;
4510 }
4511
yyset_lval(YYSTYPE * yylval_param,yyscan_t yyscanner)4512 void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
4513 {
4514 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4515 yylval = yylval_param;
4516 }
4517
yyget_lloc(yyscan_t yyscanner)4518 YYLTYPE *yyget_lloc (yyscan_t yyscanner)
4519 {
4520 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4521 return yylloc;
4522 }
4523
yyset_lloc(YYLTYPE * yylloc_param,yyscan_t yyscanner)4524 void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
4525 {
4526 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4527 yylloc = yylloc_param;
4528 }
4529
4530 /* User-visible API */
4531
4532 /* yylex_init is special because it creates the scanner itself, so it is
4533 * the ONLY reentrant function that doesn't take the scanner as the last argument.
4534 * That's why we explicitly handle the declaration, instead of using our macros.
4535 */
yylex_init(yyscan_t * ptr_yy_globals)4536 int yylex_init(yyscan_t* ptr_yy_globals)
4537 {
4538 if (ptr_yy_globals == NULL){
4539 errno = EINVAL;
4540 return 1;
4541 }
4542
4543 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
4544
4545 if (*ptr_yy_globals == NULL){
4546 errno = ENOMEM;
4547 return 1;
4548 }
4549
4550 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
4551 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
4552
4553 return yy_init_globals ( *ptr_yy_globals );
4554 }
4555
4556 /* yylex_init_extra has the same functionality as yylex_init, but follows the
4557 * convention of taking the scanner as the last argument. Note however, that
4558 * this is a *pointer* to a scanner, as it will be allocated by this call (and
4559 * is the reason, too, why this function also must handle its own declaration).
4560 * The user defined value in the first argument will be available to yyalloc in
4561 * the yyextra field.
4562 */
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)4563 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
4564 {
4565 struct yyguts_t dummy_yyguts;
4566
4567 yyset_extra (yy_user_defined, &dummy_yyguts);
4568
4569 if (ptr_yy_globals == NULL){
4570 errno = EINVAL;
4571 return 1;
4572 }
4573
4574 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
4575
4576 if (*ptr_yy_globals == NULL){
4577 errno = ENOMEM;
4578 return 1;
4579 }
4580
4581 /* By setting to 0xAA, we expose bugs in
4582 yy_init_globals. Leave at 0x00 for releases. */
4583 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
4584
4585 yyset_extra (yy_user_defined, *ptr_yy_globals);
4586
4587 return yy_init_globals ( *ptr_yy_globals );
4588 }
4589
yy_init_globals(yyscan_t yyscanner)4590 static int yy_init_globals (yyscan_t yyscanner)
4591 {
4592 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4593 /* Initialization is the same as for the non-reentrant scanner.
4594 * This function is called from yylex_destroy(), so don't allocate here.
4595 */
4596
4597 yyg->yy_buffer_stack = NULL;
4598 yyg->yy_buffer_stack_top = 0;
4599 yyg->yy_buffer_stack_max = 0;
4600 yyg->yy_c_buf_p = NULL;
4601 yyg->yy_init = 0;
4602 yyg->yy_start = 0;
4603
4604 yyg->yy_start_stack_ptr = 0;
4605 yyg->yy_start_stack_depth = 0;
4606 yyg->yy_start_stack = NULL;
4607
4608 /* Defined in main.c */
4609 #ifdef YY_STDINIT
4610 yyin = stdin;
4611 yyout = stdout;
4612 #else
4613 yyin = NULL;
4614 yyout = NULL;
4615 #endif
4616
4617 /* For future reference: Set errno on error, since we are called by
4618 * yylex_init()
4619 */
4620 return 0;
4621 }
4622
4623 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)4624 int yylex_destroy (yyscan_t yyscanner)
4625 {
4626 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4627
4628 /* Pop the buffer stack, destroying each element. */
4629 while(YY_CURRENT_BUFFER){
4630 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
4631 YY_CURRENT_BUFFER_LVALUE = NULL;
4632 yypop_buffer_state(yyscanner);
4633 }
4634
4635 /* Destroy the stack itself. */
4636 yyfree(yyg->yy_buffer_stack , yyscanner);
4637 yyg->yy_buffer_stack = NULL;
4638
4639 /* Destroy the start condition stack. */
4640 yyfree( yyg->yy_start_stack , yyscanner );
4641 yyg->yy_start_stack = NULL;
4642
4643 /* Reset the globals. This is important in a non-reentrant scanner so the next time
4644 * yylex() is called, initialization will occur. */
4645 yy_init_globals( yyscanner);
4646
4647 /* Destroy the main struct (reentrant only). */
4648 yyfree ( yyscanner , yyscanner );
4649 yyscanner = NULL;
4650 return 0;
4651 }
4652
4653 /*
4654 * Internal utility routines.
4655 */
4656
4657 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n,yyscan_t yyscanner)4658 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
4659 {
4660 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4661 (void)yyg;
4662
4663 int i;
4664 for ( i = 0; i < n; ++i )
4665 s1[i] = s2[i];
4666 }
4667 #endif
4668
4669 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s,yyscan_t yyscanner)4670 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
4671 {
4672 int n;
4673 for ( n = 0; s[n]; ++n )
4674 ;
4675
4676 return n;
4677 }
4678 #endif
4679
yyalloc(yy_size_t size,yyscan_t yyscanner)4680 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
4681 {
4682 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4683 (void)yyg;
4684 return malloc(size);
4685 }
4686
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)4687 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
4688 {
4689 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4690 (void)yyg;
4691
4692 /* The cast to (char *) in the following accommodates both
4693 * implementations that use char* generic pointers, and those
4694 * that use void* generic pointers. It works with the latter
4695 * because both ANSI C and C++ allow castless assignment from
4696 * any pointer type to void*, and deal with argument conversions
4697 * as though doing an assignment.
4698 */
4699 return realloc(ptr, size);
4700 }
4701
yyfree(void * ptr,yyscan_t yyscanner)4702 void yyfree (void * ptr , yyscan_t yyscanner)
4703 {
4704 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4705 (void)yyg;
4706 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
4707 }
4708
4709 #define YYTABLES_NAME "yytables"
4710
4711 #line 757 "src/compiler/glsl/glsl_lexer.ll"
4712
4713
4714 int
classify_identifier(struct _mesa_glsl_parse_state * state,const char * name,unsigned name_len,YYSTYPE * output)4715 classify_identifier(struct _mesa_glsl_parse_state *state, const char *name,
4716 unsigned name_len, YYSTYPE *output)
4717 {
4718 /* We're not doing linear_strdup here, to avoid an implicit call on
4719 * strlen() for the length of the string, as this is already found by flex
4720 * and stored in yyleng
4721 */
4722 char *id = (char *) linear_alloc_child(state->linalloc, name_len + 1);
4723 memcpy(id, name, name_len + 1);
4724 output->identifier = id;
4725
4726 if (state->is_field) {
4727 state->is_field = false;
4728 return FIELD_SELECTION;
4729 }
4730 if (state->symbols->get_variable(name) || state->symbols->get_function(name))
4731 return IDENTIFIER;
4732 else if (state->symbols->get_type(name))
4733 return TYPE_IDENTIFIER;
4734 else
4735 return NEW_IDENTIFIER;
4736 }
4737
4738 void
_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state * state,const char * string)4739 _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
4740 {
4741 yylex_init_extra(state, & state->scanner);
4742 yy_scan_string(string, state->scanner);
4743 }
4744
4745 void
_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state * state)4746 _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
4747 {
4748 yylex_destroy(state->scanner);
4749 }
4750
4751