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