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