1 /*
2  * Copyright 2017 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #line 3 "lex.sksl.c"
9 
10 #define  YY_INT_ALIGNED short int
11 
12 /* A lexical scanner generated by flex */
13 
14 #define FLEX_SCANNER
15 #define YY_FLEX_MAJOR_VERSION 2
16 #define YY_FLEX_MINOR_VERSION 5
17 #define YY_FLEX_SUBMINOR_VERSION 39
18 #if YY_FLEX_SUBMINOR_VERSION > 0
19 #define FLEX_BETA
20 #endif
21 
22 /* First, we deal with  platform-specific or compiler-specific issues. */
23 
24 /* begin standard C headers. */
25 #include <stdio.h>
26 #include <string.h>
27 #include <errno.h>
28 #include <stdlib.h>
29 
30 /* end standard C headers. */
31 
32 /* flex integer type definitions */
33 
34 #ifndef FLEXINT_H
35 #define FLEXINT_H
36 
37 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
38 
39 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
40 
41 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
42  * if you want the limit (max/min) macros for int types.
43  */
44 #ifndef __STDC_LIMIT_MACROS
45 #define __STDC_LIMIT_MACROS 1
46 #endif
47 
48 #include <inttypes.h>
49 typedef int8_t flex_int8_t;
50 typedef uint8_t flex_uint8_t;
51 typedef int16_t flex_int16_t;
52 typedef uint16_t flex_uint16_t;
53 typedef int32_t flex_int32_t;
54 typedef uint32_t flex_uint32_t;
55 #else
56 typedef signed char flex_int8_t;
57 typedef short int flex_int16_t;
58 typedef int flex_int32_t;
59 typedef unsigned char flex_uint8_t;
60 typedef unsigned short int flex_uint16_t;
61 typedef unsigned int flex_uint32_t;
62 
63 /* Limits of integral types. */
64 #ifndef INT8_MIN
65 #define INT8_MIN               (-128)
66 #endif
67 #ifndef INT16_MIN
68 #define INT16_MIN              (-32767-1)
69 #endif
70 #ifndef INT32_MIN
71 #define INT32_MIN              (-2147483647-1)
72 #endif
73 #ifndef INT8_MAX
74 #define INT8_MAX               (127)
75 #endif
76 #ifndef INT16_MAX
77 #define INT16_MAX              (32767)
78 #endif
79 #ifndef INT32_MAX
80 #define INT32_MAX              (2147483647)
81 #endif
82 #ifndef UINT8_MAX
83 #define UINT8_MAX              (255U)
84 #endif
85 #ifndef UINT16_MAX
86 #define UINT16_MAX             (65535U)
87 #endif
88 #ifndef UINT32_MAX
89 #define UINT32_MAX             (4294967295U)
90 #endif
91 
92 #endif /* ! C99 */
93 
94 #endif /* ! FLEXINT_H */
95 
96 #ifdef __cplusplus
97 
98 /* The "const" storage-class-modifier is valid. */
99 #define YY_USE_CONST
100 
101 #else	/* ! __cplusplus */
102 
103 /* C99 requires __STDC__ to be defined as 1. */
104 #if defined (__STDC__)
105 
106 #define YY_USE_CONST
107 
108 #endif	/* defined (__STDC__) */
109 #endif	/* ! __cplusplus */
110 
111 #ifdef YY_USE_CONST
112 #define yyconst const
113 #else
114 #define yyconst
115 #endif
116 
117 /* Returned upon end-of-file. */
118 #define YY_NULL 0
119 
120 /* Promotes a possibly negative, possibly signed char to an unsigned
121  * integer for use as an array index.  If the signed char is negative,
122  * we want to instead treat it as an 8-bit unsigned char, hence the
123  * double cast.
124  */
125 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
126 
127 /* An opaque pointer. */
128 #ifndef YY_TYPEDEF_YY_SCANNER_T
129 #define YY_TYPEDEF_YY_SCANNER_T
130 typedef void* yyscan_t;
131 #endif
132 
133 /* For convenience, these vars (plus the bison vars far below)
134    are macros in the reentrant scanner. */
135 #define yyin yyg->yyin_r
136 #define yyout yyg->yyout_r
137 #define yyextra yyg->yyextra_r
138 #define yyleng yyg->yyleng_r
139 #define yytext yyg->yytext_r
140 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
141 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
142 #define yy_flex_debug yyg->yy_flex_debug_r
143 
144 /* Enter a start condition.  This macro really ought to take a parameter,
145  * but we do it the disgusting crufty way forced on us by the ()-less
146  * definition of BEGIN.
147  */
148 #define BEGIN yyg->yy_start = 1 + 2 *
149 
150 /* Translate the current start state into a value that can be later handed
151  * to BEGIN to return to the state.  The YYSTATE alias is for lex
152  * compatibility.
153  */
154 #define YY_START ((yyg->yy_start - 1) / 2)
155 #define YYSTATE YY_START
156 
157 /* Action number for EOF rule of a given start state. */
158 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
159 
160 /* Special action meaning "start processing a new file". */
161 #define YY_NEW_FILE skslrestart(yyin ,yyscanner )
162 
163 #define YY_END_OF_BUFFER_CHAR 0
164 
165 /* Size of default input buffer. */
166 #ifndef YY_BUF_SIZE
167 #ifdef __ia64__
168 /* On IA-64, the buffer size is 16k, not 8k.
169  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
170  * Ditto for the __ia64__ case accordingly.
171  */
172 #define YY_BUF_SIZE 32768
173 #else
174 #define YY_BUF_SIZE 16384
175 #endif /* __ia64__ */
176 #endif
177 
178 /* The state buf must be large enough to hold one state per character in the main buffer.
179  */
180 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
181 
182 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
183 #define YY_TYPEDEF_YY_BUFFER_STATE
184 typedef struct yy_buffer_state *YY_BUFFER_STATE;
185 #endif
186 
187 #ifndef YY_TYPEDEF_YY_SIZE_T
188 #define YY_TYPEDEF_YY_SIZE_T
189 typedef size_t yy_size_t;
190 #endif
191 
192 #define EOB_ACT_CONTINUE_SCAN 0
193 #define EOB_ACT_END_OF_FILE 1
194 #define EOB_ACT_LAST_MATCH 2
195 
196     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
197      *       access to the local variable yy_act. Since yyless() is a macro, it would break
198      *       existing scanners that call yyless() from OUTSIDE sksllex.
199      *       One obvious solution it to make yy_act a global. I tried that, and saw
200      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
201      *       normally declared as a register variable-- so it is not worth it.
202      */
203     #define  YY_LESS_LINENO(n) \
204             do { \
205                 int yyl;\
206                 for ( yyl = n; yyl < yyleng; ++yyl )\
207                     if ( yytext[yyl] == '\n' )\
208                         --yylineno;\
209             }while(0)
210     #define YY_LINENO_REWIND_TO(dst) \
211             do {\
212                 const char *p;\
213                 for ( p = yy_cp-1; p >= (dst); --p)\
214                     if ( *p == '\n' )\
215                         --yylineno;\
216             }while(0)
217 
218 /* Return all but the first "n" matched characters back to the input stream. */
219 #define yyless(n) \
220 	do \
221 		{ \
222 		/* Undo effects of setting up yytext. */ \
223         int yyless_macro_arg = (n); \
224         YY_LESS_LINENO(yyless_macro_arg);\
225 		*yy_cp = yyg->yy_hold_char; \
226 		YY_RESTORE_YY_MORE_OFFSET \
227 		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
228 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
229 		} \
230 	while ( 0 )
231 
232 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
233 
234 #ifndef YY_STRUCT_YY_BUFFER_STATE
235 #define YY_STRUCT_YY_BUFFER_STATE
236 struct yy_buffer_state
237 	{
238 	FILE *yy_input_file;
239 
240 	char *yy_ch_buf;		/* input buffer */
241 	char *yy_buf_pos;		/* current position in input buffer */
242 
243 	/* Size of input buffer in bytes, not including room for EOB
244 	 * characters.
245 	 */
246 	yy_size_t yy_buf_size;
247 
248 	/* Number of characters read into yy_ch_buf, not including EOB
249 	 * characters.
250 	 */
251 	yy_size_t yy_n_chars;
252 
253 	/* Whether we "own" the buffer - i.e., we know we created it,
254 	 * and can realloc() it to grow it, and should free() it to
255 	 * delete it.
256 	 */
257 	int yy_is_our_buffer;
258 
259 	/* Whether this is an "interactive" input source; if so, and
260 	 * if we're using stdio for input, then we want to use getc()
261 	 * instead of fread(), to make sure we stop fetching input after
262 	 * each newline.
263 	 */
264 	int yy_is_interactive;
265 
266 	/* Whether we're considered to be at the beginning of a line.
267 	 * If so, '^' rules will be active on the next match, otherwise
268 	 * not.
269 	 */
270 	int yy_at_bol;
271 
272     int yy_bs_lineno; /**< The line count. */
273     int yy_bs_column; /**< The column count. */
274 
275 	/* Whether to try to fill the input buffer when we reach the
276 	 * end of it.
277 	 */
278 	int yy_fill_buffer;
279 
280 	int yy_buffer_status;
281 
282 #define YY_BUFFER_NEW 0
283 #define YY_BUFFER_NORMAL 1
284 	/* When an EOF's been seen but there's still some text to process
285 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
286 	 * shouldn't try reading from the input source any more.  We might
287 	 * still have a bunch of tokens to match, though, because of
288 	 * possible backing-up.
289 	 *
290 	 * When we actually see the EOF, we change the status to "new"
291 	 * (via skslrestart()), so that the user can continue scanning by
292 	 * just pointing yyin at a new input file.
293 	 */
294 #define YY_BUFFER_EOF_PENDING 2
295 
296 	};
297 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
298 
299 /* We provide macros for accessing buffer states in case in the
300  * future we want to put the buffer states in a more general
301  * "scanner state".
302  *
303  * Returns the top of the stack, or NULL.
304  */
305 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
306                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
307                           : NULL)
308 
309 /* Same as previous macro, but useful when we know that the buffer stack is not
310  * NULL or when we need an lvalue. For internal use only.
311  */
312 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
313 
314 void skslrestart (FILE *input_file ,yyscan_t yyscanner );
315 void sksl_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
316 YY_BUFFER_STATE sksl_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
317 void sksl_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
318 void sksl_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
319 void skslpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
320 void skslpop_buffer_state (yyscan_t yyscanner );
321 
322 static void skslensure_buffer_stack (yyscan_t yyscanner );
323 static void sksl_load_buffer_state (yyscan_t yyscanner );
324 static void sksl_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
325 
326 #define YY_FLUSH_BUFFER sksl_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
327 
328 YY_BUFFER_STATE sksl_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
329 YY_BUFFER_STATE sksl_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
330 YY_BUFFER_STATE sksl_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
331 
332 void *skslalloc (yy_size_t ,yyscan_t yyscanner );
333 void *skslrealloc (void *,yy_size_t ,yyscan_t yyscanner );
334 void skslfree (void * ,yyscan_t yyscanner );
335 
336 #define yy_new_buffer sksl_create_buffer
337 
338 #define yy_set_interactive(is_interactive) \
339 	{ \
340 	if ( ! YY_CURRENT_BUFFER ){ \
341         skslensure_buffer_stack (yyscanner); \
342 		YY_CURRENT_BUFFER_LVALUE =    \
343             sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
344 	} \
345 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
346 	}
347 
348 #define yy_set_bol(at_bol) \
349 	{ \
350 	if ( ! YY_CURRENT_BUFFER ){\
351         skslensure_buffer_stack (yyscanner); \
352 		YY_CURRENT_BUFFER_LVALUE =    \
353             sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
354 	} \
355 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
356 	}
357 
358 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
359 
360 /* Begin user sect3 */
361 
362 typedef unsigned char YY_CHAR;
363 
364 typedef int yy_state_type;
365 
366 #define yytext_ptr yytext_r
367 
368 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
369 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
370 static int yy_get_next_buffer (yyscan_t yyscanner );
371 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
372 
373 /* Done after the current pattern has been matched and before the
374  * corresponding action - sets up yytext.
375  */
376 #define YY_DO_BEFORE_ACTION \
377 	yyg->yytext_ptr = yy_bp; \
378 	yyleng = (size_t) (yy_cp - yy_bp); \
379 	yyg->yy_hold_char = *yy_cp; \
380 	*yy_cp = '\0'; \
381 	yyg->yy_c_buf_p = yy_cp;
382 
383 #define YY_NUM_RULES 92
384 #define YY_END_OF_BUFFER 93
385 /* This struct is not used in this scanner,
386    but its presence is necessary. */
387 struct yy_trans_info
388 	{
389 	flex_int32_t yy_verify;
390 	flex_int32_t yy_nxt;
391 	};
392 static yyconst flex_int16_t yy_accept[253] =
393     {   0,
394         0,    0,   93,   91,   90,   90,   64,   91,   38,   54,
395        59,   40,   41,   52,   50,   47,   51,   46,   53,    4,
396         4,   66,   87,   71,   67,   70,   65,   44,   45,   58,
397        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
398        38,   38,   38,   38,   38,   38,   38,   38,   42,   57,
399        43,   60,   90,   69,   39,   38,   78,   63,   83,   76,
400        48,   74,   49,   75,    1,    0,   88,   77,    2,    4,
401         0,    0,   55,   73,   68,   72,   56,   82,   62,   38,
402        38,   38,   38,   38,   12,   38,   38,   38,   38,   38,
403         8,   20,   38,   38,   38,   38,   38,   38,   38,   38,
404 
405        38,   38,   38,   38,   38,   38,   81,   61,   39,   86,
406         0,    0,    0,   88,    1,    0,    0,    3,    5,   79,
407        80,   85,   38,   38,   38,   38,   38,   38,   38,   38,
408        38,   10,   38,   38,   38,   38,   38,   38,   21,   38,
409        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
410        84,    0,    1,   89,    0,    0,    2,   38,   14,   38,
411        38,   38,   38,   38,    9,   38,   28,   38,   38,   38,
412        25,   38,   38,   38,   38,   38,   38,   38,   38,    6,
413        38,   38,   38,   38,    0,    1,   16,   38,   24,   38,
414        38,   38,    7,   27,   22,   38,   38,   38,   38,   38,
415 
416        38,   38,   38,   38,   38,   38,   11,   38,   38,   38,
417        38,   38,   36,   38,   38,   38,   38,   38,   19,   35,
418        13,   38,   38,   38,   38,   38,   15,   18,   26,   38,
419        38,   38,   38,   23,   38,   38,   32,   17,   38,   38,
420        30,   34,   33,   38,   38,   37,   31,   38,   38,   38,
421        29,    0
422     } ;
423 
424 static yyconst flex_int32_t yy_ec[256] =
425     {   0,
426         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
427         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
428         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
429         1,    2,    4,    1,    5,    6,    7,    8,    1,    9,
430        10,   11,   12,   13,   14,   15,   16,   17,   18,   18,
431        18,   18,   18,   18,   18,   18,   18,   19,   20,   21,
432        22,   23,   24,    1,   25,   25,   25,   25,   26,   25,
433         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
434         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
435        27,    1,   28,   29,    6,    1,   30,   31,   32,   33,
436 
437        34,   35,   36,   37,   38,    6,   39,   40,   41,   42,
438        43,   44,    6,   45,   46,   47,   48,   49,   50,   51,
439        52,    6,   53,   54,   55,   56,    1,    1,    1,    1,
440         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
441         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
442         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
443         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
444         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
445         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
446         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
447 
448         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
449         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
452         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453         1,    1,    1,    1,    1
454     } ;
455 
456 static yyconst flex_int32_t yy_meta[57] =
457     {   0,
458         1,    1,    2,    1,    1,    3,    1,    1,    1,    1,
459         1,    1,    1,    1,    1,    1,    4,    4,    1,    1,
460         1,    1,    1,    1,    5,    5,    1,    1,    1,    5,
461         5,    5,    5,    5,    5,    3,    3,    3,    3,    3,
462         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
463         3,    3,    1,    1,    1,    1
464     } ;
465 
466 static yyconst flex_int16_t yy_base[259] =
467     {   0,
468         0,    0,  320,  321,   55,   57,  297,    0,    0,  296,
469        53,  321,  321,  295,   50,  321,   49,   47,   57,   52,
470        59,  321,  321,   59,  294,   60,  321,  321,  321,   62,
471       270,   57,   54,  274,   59,  275,   59,   65,  278,  268,
472       262,  264,  274,   57,  262,  264,  262,   53,  321,   74,
473       321,  321,  103,  321,    0,    0,  321,  282,  321,  321,
474       321,  321,  321,  321,   92,  292,    0,  321,   95,   99,
475       118,    0,  280,  321,  321,  321,  279,  321,  278,  265,
476       252,   78,  262,  250,    0,  249,  254,  263,  247,  255,
477         0,  247,  237,  238,  254,  242,  238,  250,   92,  238,
478 
479       244,  233,  242,  239,  240,  239,  321,  254,    0,  321,
480       128,  264,  258,    0,  126,  136,  106,  138,    0,  321,
481       321,  321,  243,  238,  237,  111,  240,  237,  234,  221,
482       219,    0,  228,  216,  220,  218,  223,  226,    0,  227,
483       225,  210,  208,  207,  207,  219,  217,  221,  210,  202,
484       321,  144,  146,  321,  153,  151,  155,  209,    0,  202,
485       199,  207,  196,  213,    0,  208,    0,  197,  193,  191,
486         0,  190,  192,  198,  192,  189,  188,  200,  199,    0,
487       187,  182,  194,  193,  157,  159,    0,  192,    0,  183,
488       184,  178,    0,    0,    0,  175,  180,  174,  173,  176,
489 
490       179,  174,  168,  177,  168,  174,    0,  168,  168,  161,
491       161,  174,    0,  162,  161,  166,  163,  170,    0,    0,
492         0,  160,  160,  157,  146,  145,    0,    0,    0,  132,
493       116,   99,  102,    0,  113,  101,    0,    0,  105,   92,
494         0,    0,    0,   79,   80,    0,    0,   81,   62,   32,
495         0,  321,  175,  178,  181,  186,  191,  193
496     } ;
497 
498 static yyconst flex_int16_t yy_def[259] =
499     {   0,
500       252,    1,  252,  252,  252,  252,  252,  253,  254,  252,
501       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
502       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
503       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
504       254,  254,  254,  254,  254,  254,  254,  254,  252,  252,
505       252,  252,  252,  252,  255,  254,  252,  252,  252,  252,
506       252,  252,  252,  252,  252,  256,  257,  252,  252,  252,
507       252,  258,  252,  252,  252,  252,  252,  252,  252,  254,
508       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
509       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
510 
511       254,  254,  254,  254,  254,  254,  252,  252,  255,  252,
512       252,  256,  256,  257,  252,  252,  252,  252,  258,  252,
513       252,  252,  254,  254,  254,  254,  254,  254,  254,  254,
514       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
515       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
516       252,  252,  252,  252,  252,  252,  252,  254,  254,  254,
517       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
518       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
519       254,  254,  254,  254,  252,  252,  254,  254,  254,  254,
520       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
521 
522       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
523       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
524       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
525       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
526       254,  254,  254,  254,  254,  254,  254,  254,  254,  254,
527       254,    0,  252,  252,  252,  252,  252,  252
528     } ;
529 
530 static yyconst flex_int16_t yy_nxt[378] =
531     {   0,
532         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
533        14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
534        24,   25,   26,   27,    9,    9,   28,   29,   30,    9,
535        31,   32,   33,   34,   35,    9,   36,   37,    9,   38,
536        39,   40,   41,   42,   43,   44,   45,   46,   47,   48,
537         9,    9,   49,   50,   51,   52,   53,   53,   53,   53,
538        58,   61,   63,   65,   65,  251,   69,   66,   70,   70,
539        64,   62,   67,   69,   59,   70,   70,   71,   68,   73,
540        74,   76,   77,   78,   71,   71,   81,   83,   87,  105,
541        79,   84,   71,   91,   93,  107,   85,  106,   88,   82,
542 
543        92,   89,   72,  100,   53,   53,  101,   94,   65,   65,
544       250,  115,  115,   69,  125,   70,   70,  111,  249,  126,
545       116,  141,  118,  118,   71,  111,  248,  108,  116,  117,
546       247,  117,   71,  246,  118,  118,  245,  142,  143,  152,
547       244,  152,  115,  115,  153,  153,  243,  156,  242,  156,
548       241,  155,  157,  157,  118,  118,  161,  162,  240,  155,
549       153,  153,  153,  153,  185,  239,  185,  157,  157,  186,
550       186,  157,  157,  186,  186,  186,  186,   55,  238,   55,
551        56,   56,   56,  109,  109,  109,  112,  112,  112,  112,
552       112,  114,  237,  114,  114,  114,  119,  119,  236,  235,
553 
554       234,  233,  232,  231,  230,  229,  228,  227,  226,  225,
555       224,  223,  222,  221,  220,  219,  218,  217,  216,  215,
556       214,  213,  212,  211,  210,  209,  208,  207,  206,  205,
557       204,  203,  202,  201,  200,  199,  198,  197,  196,  195,
558       194,  193,  192,  191,  190,  189,  188,  187,  184,  183,
559       182,  181,  180,  179,  178,  177,  176,  175,  174,  173,
560       172,  171,  170,  169,  168,  167,  166,  165,  164,  163,
561       160,  159,  158,  154,  113,  151,  150,  149,  148,  147,
562       146,  145,  144,  140,  139,  138,  137,  136,  135,  134,
563       133,  132,  131,  130,  129,  128,  127,  124,  123,  122,
564 
565       121,  120,  113,  110,  104,  103,  102,   99,   98,   97,
566        96,   95,   90,   86,   80,   75,   60,   57,   54,  252,
567         3,  252,  252,  252,  252,  252,  252,  252,  252,  252,
568       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
569       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
570       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
571       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
572       252,  252,  252,  252,  252,  252,  252
573     } ;
574 
575 static yyconst flex_int16_t yy_chk[378] =
576     {   0,
577         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
578         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
579         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
580         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
581         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
582         1,    1,    1,    1,    1,    1,    5,    5,    6,    6,
583        11,   15,   17,   18,   18,  250,   20,   19,   20,   20,
584        17,   15,   19,   21,   11,   21,   21,   20,   19,   24,
585        24,   26,   26,   30,   21,   20,   32,   33,   35,   48,
586        30,   33,   21,   37,   38,   50,   33,   48,   35,   32,
587 
588        37,   35,   20,   44,   53,   53,   44,   38,   65,   65,
589       249,   69,   69,   70,   82,   70,   70,   65,  248,   82,
590        69,   99,  117,  117,   70,   65,  245,   50,   69,   71,
591       244,   71,   70,  240,   71,   71,  239,   99,   99,  111,
592       236,  111,  115,  115,  111,  111,  235,  116,  233,  116,
593       232,  115,  116,  116,  118,  118,  126,  126,  231,  115,
594       152,  152,  153,  153,  155,  230,  155,  156,  156,  155,
595       155,  157,  157,  185,  185,  186,  186,  253,  226,  253,
596       254,  254,  254,  255,  255,  255,  256,  256,  256,  256,
597       256,  257,  225,  257,  257,  257,  258,  258,  224,  223,
598 
599       222,  218,  217,  216,  215,  214,  212,  211,  210,  209,
600       208,  206,  205,  204,  203,  202,  201,  200,  199,  198,
601       197,  196,  192,  191,  190,  188,  184,  183,  182,  181,
602       179,  178,  177,  176,  175,  174,  173,  172,  170,  169,
603       168,  166,  164,  163,  162,  161,  160,  158,  150,  149,
604       148,  147,  146,  145,  144,  143,  142,  141,  140,  138,
605       137,  136,  135,  134,  133,  131,  130,  129,  128,  127,
606       125,  124,  123,  113,  112,  108,  106,  105,  104,  103,
607       102,  101,  100,   98,   97,   96,   95,   94,   93,   92,
608        90,   89,   88,   87,   86,   84,   83,   81,   80,   79,
609 
610        77,   73,   66,   58,   47,   46,   45,   43,   42,   41,
611        40,   39,   36,   34,   31,   25,   14,   10,    7,    3,
612       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
613       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
614       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
615       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
616       252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
617       252,  252,  252,  252,  252,  252,  252
618     } ;
619 
620 /* Table of booleans, true if rule could match eol. */
621 static yyconst flex_int32_t yy_rule_can_match_eol[93] =
622     {   0,
623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
624     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
625     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
626     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
627     0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,     };
628 
629 /* The intent behind this definition is that it'll catch
630  * any uses of REJECT which flex missed.
631  */
632 #define REJECT reject_used_but_not_detected
633 #define yymore() yymore_used_but_not_detected
634 #define YY_MORE_ADJ 0
635 #define YY_RESTORE_YY_MORE_OFFSET
636 #line 1 "sksl.flex"
637 /*
638 
639 	This file is IGNORED during the build process!
640 
641 	As this file is updated so infrequently and flex is not universally present on build machines,
642 	the lex.sksl.c file must be manually regenerated if you make any changes to this file. Just run:
643 
644 		flex sksl.flex
645 
646     You will have to manually add a copyright notice to the top of lex.sksl.c.
647 
648 */
649 #define YY_NO_UNISTD_H 1
650 #line 645 "lex.sksl.c"
651 
652 #define INITIAL 0
653 
654 #ifndef YY_NO_UNISTD_H
655 /* Special case for "unistd.h", since it is non-ANSI. We include it way
656  * down here because we want the user's section 1 to have been scanned first.
657  * The user has a chance to override it with an option.
658  */
659 #include <unistd.h>
660 #endif
661 
662 #ifndef YY_EXTRA_TYPE
663 #define YY_EXTRA_TYPE void *
664 #endif
665 
666 /* Holds the entire state of the reentrant scanner. */
667 struct yyguts_t
668     {
669 
670     /* User-defined. Not touched by flex. */
671     YY_EXTRA_TYPE yyextra_r;
672 
673     /* The rest are the same as the globals declared in the non-reentrant scanner. */
674     FILE *yyin_r, *yyout_r;
675     size_t yy_buffer_stack_top; /**< index of top of stack. */
676     size_t yy_buffer_stack_max; /**< capacity of stack. */
677     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
678     char yy_hold_char;
679     yy_size_t yy_n_chars;
680     yy_size_t yyleng_r;
681     char *yy_c_buf_p;
682     int yy_init;
683     int yy_start;
684     int yy_did_buffer_switch_on_eof;
685     int yy_start_stack_ptr;
686     int yy_start_stack_depth;
687     int *yy_start_stack;
688     yy_state_type yy_last_accepting_state;
689     char* yy_last_accepting_cpos;
690 
691     int yylineno_r;
692     int yy_flex_debug_r;
693 
694     char *yytext_r;
695     int yy_more_flag;
696     int yy_more_len;
697 
698     }; /* end struct yyguts_t */
699 
700 static int yy_init_globals (yyscan_t yyscanner );
701 
702 int sksllex_init (yyscan_t* scanner);
703 
704 int sksllex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
705 
706 /* Accessor methods to globals.
707    These are made visible to non-reentrant scanners for convenience. */
708 
709 int sksllex_destroy (yyscan_t yyscanner );
710 
711 int skslget_debug (yyscan_t yyscanner );
712 
713 void skslset_debug (int debug_flag ,yyscan_t yyscanner );
714 
715 YY_EXTRA_TYPE skslget_extra (yyscan_t yyscanner );
716 
717 void skslset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
718 
719 FILE *skslget_in (yyscan_t yyscanner );
720 
721 void skslset_in  (FILE * in_str ,yyscan_t yyscanner );
722 
723 FILE *skslget_out (yyscan_t yyscanner );
724 
725 void skslset_out  (FILE * out_str ,yyscan_t yyscanner );
726 
727 yy_size_t skslget_leng (yyscan_t yyscanner );
728 
729 char *skslget_text (yyscan_t yyscanner );
730 
731 int skslget_lineno (yyscan_t yyscanner );
732 
733 void skslset_lineno (int line_number ,yyscan_t yyscanner );
734 
735 int skslget_column  (yyscan_t yyscanner );
736 
737 void skslset_column (int column_no ,yyscan_t yyscanner );
738 
739 /* Macros after this point can all be overridden by user definitions in
740  * section 1.
741  */
742 
743 #ifndef YY_SKIP_YYWRAP
744 #ifdef __cplusplus
745 extern "C" int skslwrap (yyscan_t yyscanner );
746 #else
747 extern int skslwrap (yyscan_t yyscanner );
748 #endif
749 #endif
750 
751     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
752 
753 #ifndef yytext_ptr
754 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
755 #endif
756 
757 #ifdef YY_NEED_STRLEN
758 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
759 #endif
760 
761 #ifndef YY_NO_INPUT
762 
763 #ifdef __cplusplus
764 static int yyinput (yyscan_t yyscanner );
765 #else
766 static int input (yyscan_t yyscanner );
767 #endif
768 
769 #endif
770 
771 /* Amount of stuff to slurp up with each read. */
772 #ifndef YY_READ_BUF_SIZE
773 #ifdef __ia64__
774 /* On IA-64, the buffer size is 16k, not 8k */
775 #define YY_READ_BUF_SIZE 16384
776 #else
777 #define YY_READ_BUF_SIZE 8192
778 #endif /* __ia64__ */
779 #endif
780 
781 /* Copy whatever the last rule matched to the standard output. */
782 #ifndef ECHO
783 /* This used to be an fputs(), but since the string might contain NUL's,
784  * we now use fwrite().
785  */
786 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
787 #endif
788 
789 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
790  * is returned in "result".
791  */
792 #ifndef YY_INPUT
793 #define YY_INPUT(buf,result,max_size) \
794 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
795 		{ \
796 		int c = '*'; \
797 		size_t n; \
798 		for ( n = 0; n < max_size && \
799 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
800 			buf[n] = (char) c; \
801 		if ( c == '\n' ) \
802 			buf[n++] = (char) c; \
803 		if ( c == EOF && ferror( yyin ) ) \
804 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
805 		result = n; \
806 		} \
807 	else \
808 		{ \
809 		errno=0; \
810 		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
811 			{ \
812 			if( errno != EINTR) \
813 				{ \
814 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
815 				break; \
816 				} \
817 			errno=0; \
818 			clearerr(yyin); \
819 			} \
820 		}\
821 \
822 
823 #endif
824 
825 /* No semi-colon after return; correct usage is to write "yyterminate();" -
826  * we don't want an extra ';' after the "return" because that will cause
827  * some compilers to complain about unreachable statements.
828  */
829 #ifndef yyterminate
830 #define yyterminate() return YY_NULL
831 #endif
832 
833 /* Number of entries by which start-condition stack grows. */
834 #ifndef YY_START_STACK_INCR
835 #define YY_START_STACK_INCR 25
836 #endif
837 
838 /* Report a fatal error. */
839 #ifndef YY_FATAL_ERROR
840 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
841 #endif
842 
843 /* end tables serialization structures and prototypes */
844 
845 /* Default declaration of generated scanner - a define so the user can
846  * easily add parameters.
847  */
848 #ifndef YY_DECL
849 #define YY_DECL_IS_OURS 1
850 
851 extern int sksllex (yyscan_t yyscanner);
852 
853 #define YY_DECL int sksllex (yyscan_t yyscanner)
854 #endif /* !YY_DECL */
855 
856 /* Code executed at the beginning of each rule, after yytext and yyleng
857  * have been set up.
858  */
859 #ifndef YY_USER_ACTION
860 #define YY_USER_ACTION
861 #endif
862 
863 /* Code executed at the end of each rule. */
864 #ifndef YY_BREAK
865 #define YY_BREAK break;
866 #endif
867 
868 #define YY_RULE_SETUP \
869 	YY_USER_ACTION
870 
871 /** The main scanner function which does all the work.
872  */
873 YY_DECL
874 {
875 	register yy_state_type yy_current_state;
876 	register char *yy_cp, *yy_bp;
877 	register int yy_act;
878     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
879 
880 	if ( !yyg->yy_init )
881 		{
882 		yyg->yy_init = 1;
883 
884 #ifdef YY_USER_INIT
885 		YY_USER_INIT;
886 #endif
887 
888 		if ( ! yyg->yy_start )
889 			yyg->yy_start = 1;	/* first start state */
890 
891 		if ( ! yyin )
892 			yyin = stdin;
893 
894 		if ( ! yyout )
895 			yyout = stdout;
896 
897 		if ( ! YY_CURRENT_BUFFER ) {
898 			skslensure_buffer_stack (yyscanner);
899 			YY_CURRENT_BUFFER_LVALUE =
900 				sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
901 		}
902 
903 		sksl_load_buffer_state(yyscanner );
904 		}
905 
906 	{
907 #line 23 "sksl.flex"
908 
909 
910 #line 905 "lex.sksl.c"
911 
912 	while ( 1 )		/* loops until end-of-file is reached */
913 		{
914 		yy_cp = yyg->yy_c_buf_p;
915 
916 		/* Support of yytext. */
917 		*yy_cp = yyg->yy_hold_char;
918 
919 		/* yy_bp points to the position in yy_ch_buf of the start of
920 		 * the current run.
921 		 */
922 		yy_bp = yy_cp;
923 
924 		yy_current_state = yyg->yy_start;
925 yy_match:
926 		do
927 			{
928 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
929 			if ( yy_accept[yy_current_state] )
930 				{
931 				yyg->yy_last_accepting_state = yy_current_state;
932 				yyg->yy_last_accepting_cpos = yy_cp;
933 				}
934 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
935 				{
936 				yy_current_state = (int) yy_def[yy_current_state];
937 				if ( yy_current_state >= 253 )
938 					yy_c = yy_meta[(unsigned int) yy_c];
939 				}
940 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
941 			++yy_cp;
942 			}
943 		while ( yy_current_state != 252 );
944 		yy_cp = yyg->yy_last_accepting_cpos;
945 		yy_current_state = yyg->yy_last_accepting_state;
946 
947 yy_find_action:
948 		yy_act = yy_accept[yy_current_state];
949 
950 		YY_DO_BEFORE_ACTION;
951 
952 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
953 			{
954 			yy_size_t yyl;
955 			for ( yyl = 0; yyl < yyleng; ++yyl )
956 				if ( yytext[yyl] == '\n' )
957 
958     do{ yylineno++;
959         yycolumn=0;
960     }while(0)
961 ;
962 			}
963 
964 do_action:	/* This label is used only to access EOF actions. */
965 
966 		switch ( yy_act )
967 	{ /* beginning of action switch */
968 			case 0: /* must back up */
969 			/* undo the effects of YY_DO_BEFORE_ACTION */
970 			*yy_cp = yyg->yy_hold_char;
971 			yy_cp = yyg->yy_last_accepting_cpos;
972 			yy_current_state = yyg->yy_last_accepting_state;
973 			goto yy_find_action;
974 
975 case 1:
976 YY_RULE_SETUP
977 #line 25 "sksl.flex"
978 { return SkSL::Token::FLOAT_LITERAL; }
979 	YY_BREAK
980 case 2:
981 YY_RULE_SETUP
982 #line 27 "sksl.flex"
983 { return SkSL::Token::FLOAT_LITERAL; }
984 	YY_BREAK
985 case 3:
986 YY_RULE_SETUP
987 #line 29 "sksl.flex"
988 { return SkSL::Token::FLOAT_LITERAL; }
989 	YY_BREAK
990 case 4:
991 YY_RULE_SETUP
992 #line 31 "sksl.flex"
993 { return SkSL::Token::INT_LITERAL; }
994 	YY_BREAK
995 case 5:
996 YY_RULE_SETUP
997 #line 33 "sksl.flex"
998 { return SkSL::Token::INT_LITERAL; }
999 	YY_BREAK
1000 case 6:
1001 YY_RULE_SETUP
1002 #line 35 "sksl.flex"
1003 { return SkSL::Token::TRUE_LITERAL; }
1004 	YY_BREAK
1005 case 7:
1006 YY_RULE_SETUP
1007 #line 37 "sksl.flex"
1008 { return SkSL::Token::FALSE_LITERAL; }
1009 	YY_BREAK
1010 case 8:
1011 YY_RULE_SETUP
1012 #line 39 "sksl.flex"
1013 { return SkSL::Token::IF; }
1014 	YY_BREAK
1015 case 9:
1016 YY_RULE_SETUP
1017 #line 41 "sksl.flex"
1018 { return SkSL::Token::ELSE; }
1019 	YY_BREAK
1020 case 10:
1021 YY_RULE_SETUP
1022 #line 43 "sksl.flex"
1023 { return SkSL::Token::FOR; }
1024 	YY_BREAK
1025 case 11:
1026 YY_RULE_SETUP
1027 #line 45 "sksl.flex"
1028 { return SkSL::Token::WHILE; }
1029 	YY_BREAK
1030 case 12:
1031 YY_RULE_SETUP
1032 #line 47 "sksl.flex"
1033 { return SkSL::Token::DO; }
1034 	YY_BREAK
1035 case 13:
1036 YY_RULE_SETUP
1037 #line 49 "sksl.flex"
1038 { return SkSL::Token::SWITCH; }
1039 	YY_BREAK
1040 case 14:
1041 YY_RULE_SETUP
1042 #line 51 "sksl.flex"
1043 { return SkSL::Token::CASE; }
1044 	YY_BREAK
1045 case 15:
1046 YY_RULE_SETUP
1047 #line 53 "sksl.flex"
1048 { return SkSL::Token::DEFAULT; }
1049 	YY_BREAK
1050 case 16:
1051 YY_RULE_SETUP
1052 #line 55 "sksl.flex"
1053 { return SkSL::Token::BREAK; }
1054 	YY_BREAK
1055 case 17:
1056 YY_RULE_SETUP
1057 #line 57 "sksl.flex"
1058 { return SkSL::Token::CONTINUE; }
1059 	YY_BREAK
1060 case 18:
1061 YY_RULE_SETUP
1062 #line 59 "sksl.flex"
1063 { return SkSL::Token::DISCARD; }
1064 	YY_BREAK
1065 case 19:
1066 YY_RULE_SETUP
1067 #line 61 "sksl.flex"
1068 { return SkSL::Token::RETURN; }
1069 	YY_BREAK
1070 case 20:
1071 YY_RULE_SETUP
1072 #line 63 "sksl.flex"
1073 { return SkSL::Token::IN; }
1074 	YY_BREAK
1075 case 21:
1076 YY_RULE_SETUP
1077 #line 65 "sksl.flex"
1078 { return SkSL::Token::OUT; }
1079 	YY_BREAK
1080 case 22:
1081 YY_RULE_SETUP
1082 #line 67 "sksl.flex"
1083 { return SkSL::Token::INOUT; }
1084 	YY_BREAK
1085 case 23:
1086 YY_RULE_SETUP
1087 #line 69 "sksl.flex"
1088 { return SkSL::Token::UNIFORM; }
1089 	YY_BREAK
1090 case 24:
1091 YY_RULE_SETUP
1092 #line 71 "sksl.flex"
1093 { return SkSL::Token::CONST; }
1094 	YY_BREAK
1095 case 25:
1096 YY_RULE_SETUP
1097 #line 73 "sksl.flex"
1098 { return SkSL::Token::LOWP; }
1099 	YY_BREAK
1100 case 26:
1101 YY_RULE_SETUP
1102 #line 75 "sksl.flex"
1103 { return SkSL::Token::MEDIUMP; }
1104 	YY_BREAK
1105 case 27:
1106 YY_RULE_SETUP
1107 #line 77 "sksl.flex"
1108 { return SkSL::Token::HIGHP; }
1109 	YY_BREAK
1110 case 28:
1111 YY_RULE_SETUP
1112 #line 79 "sksl.flex"
1113 { return SkSL::Token::FLAT; }
1114 	YY_BREAK
1115 case 29:
1116 YY_RULE_SETUP
1117 #line 81 "sksl.flex"
1118 { return SkSL::Token::NOPERSPECTIVE; }
1119 	YY_BREAK
1120 case 30:
1121 YY_RULE_SETUP
1122 #line 83 "sksl.flex"
1123 { return SkSL::Token::READONLY; }
1124 	YY_BREAK
1125 case 31:
1126 YY_RULE_SETUP
1127 #line 85 "sksl.flex"
1128 { return SkSL::Token::WRITEONLY; }
1129 	YY_BREAK
1130 case 32:
1131 YY_RULE_SETUP
1132 #line 87 "sksl.flex"
1133 { return SkSL::Token::COHERENT; }
1134 	YY_BREAK
1135 case 33:
1136 YY_RULE_SETUP
1137 #line 89 "sksl.flex"
1138 { return SkSL::Token::VOLATILE; }
1139 	YY_BREAK
1140 case 34:
1141 YY_RULE_SETUP
1142 #line 91 "sksl.flex"
1143 { return SkSL::Token::RESTRICT; }
1144 	YY_BREAK
1145 case 35:
1146 YY_RULE_SETUP
1147 #line 93 "sksl.flex"
1148 { return SkSL::Token::STRUCT; }
1149 	YY_BREAK
1150 case 36:
1151 YY_RULE_SETUP
1152 #line 95 "sksl.flex"
1153 { return SkSL::Token::LAYOUT; }
1154 	YY_BREAK
1155 case 37:
1156 YY_RULE_SETUP
1157 #line 97 "sksl.flex"
1158 { return SkSL::Token::PRECISION; }
1159 	YY_BREAK
1160 case 38:
1161 YY_RULE_SETUP
1162 #line 99 "sksl.flex"
1163 { return SkSL::Token::IDENTIFIER; }
1164 	YY_BREAK
1165 case 39:
1166 YY_RULE_SETUP
1167 #line 101 "sksl.flex"
1168 { return SkSL::Token::DIRECTIVE; }
1169 	YY_BREAK
1170 case 40:
1171 YY_RULE_SETUP
1172 #line 103 "sksl.flex"
1173 { return SkSL::Token::LPAREN; }
1174 	YY_BREAK
1175 case 41:
1176 YY_RULE_SETUP
1177 #line 105 "sksl.flex"
1178 { return SkSL::Token::RPAREN; }
1179 	YY_BREAK
1180 case 42:
1181 YY_RULE_SETUP
1182 #line 107 "sksl.flex"
1183 { return SkSL::Token::LBRACE; }
1184 	YY_BREAK
1185 case 43:
1186 YY_RULE_SETUP
1187 #line 109 "sksl.flex"
1188 { return SkSL::Token::RBRACE; }
1189 	YY_BREAK
1190 case 44:
1191 YY_RULE_SETUP
1192 #line 111 "sksl.flex"
1193 { return SkSL::Token::LBRACKET; }
1194 	YY_BREAK
1195 case 45:
1196 YY_RULE_SETUP
1197 #line 113 "sksl.flex"
1198 { return SkSL::Token::RBRACKET; }
1199 	YY_BREAK
1200 case 46:
1201 YY_RULE_SETUP
1202 #line 115 "sksl.flex"
1203 { return SkSL::Token::DOT; }
1204 	YY_BREAK
1205 case 47:
1206 YY_RULE_SETUP
1207 #line 117 "sksl.flex"
1208 { return SkSL::Token::COMMA; }
1209 	YY_BREAK
1210 case 48:
1211 YY_RULE_SETUP
1212 #line 119 "sksl.flex"
1213 { return SkSL::Token::PLUSPLUS; }
1214 	YY_BREAK
1215 case 49:
1216 YY_RULE_SETUP
1217 #line 121 "sksl.flex"
1218 { return SkSL::Token::MINUSMINUS; }
1219 	YY_BREAK
1220 case 50:
1221 YY_RULE_SETUP
1222 #line 123 "sksl.flex"
1223 { return SkSL::Token::PLUS; }
1224 	YY_BREAK
1225 case 51:
1226 YY_RULE_SETUP
1227 #line 125 "sksl.flex"
1228 { return SkSL::Token::MINUS; }
1229 	YY_BREAK
1230 case 52:
1231 YY_RULE_SETUP
1232 #line 127 "sksl.flex"
1233 { return SkSL::Token::STAR; }
1234 	YY_BREAK
1235 case 53:
1236 YY_RULE_SETUP
1237 #line 129 "sksl.flex"
1238 { return SkSL::Token::SLASH; }
1239 	YY_BREAK
1240 case 54:
1241 YY_RULE_SETUP
1242 #line 131 "sksl.flex"
1243 { return SkSL::Token::PERCENT; }
1244 	YY_BREAK
1245 case 55:
1246 YY_RULE_SETUP
1247 #line 133 "sksl.flex"
1248 { return SkSL::Token::SHL; }
1249 	YY_BREAK
1250 case 56:
1251 YY_RULE_SETUP
1252 #line 135 "sksl.flex"
1253 { return SkSL::Token::SHR; }
1254 	YY_BREAK
1255 case 57:
1256 YY_RULE_SETUP
1257 #line 137 "sksl.flex"
1258 { return SkSL::Token::BITWISEOR; }
1259 	YY_BREAK
1260 case 58:
1261 YY_RULE_SETUP
1262 #line 139 "sksl.flex"
1263 { return SkSL::Token::BITWISEXOR; }
1264 	YY_BREAK
1265 case 59:
1266 YY_RULE_SETUP
1267 #line 141 "sksl.flex"
1268 { return SkSL::Token::BITWISEAND; }
1269 	YY_BREAK
1270 case 60:
1271 YY_RULE_SETUP
1272 #line 143 "sksl.flex"
1273 { return SkSL::Token::BITWISENOT; }
1274 	YY_BREAK
1275 case 61:
1276 YY_RULE_SETUP
1277 #line 145 "sksl.flex"
1278 { return SkSL::Token::LOGICALOR; }
1279 	YY_BREAK
1280 case 62:
1281 YY_RULE_SETUP
1282 #line 147 "sksl.flex"
1283 { return SkSL::Token::LOGICALXOR; }
1284 	YY_BREAK
1285 case 63:
1286 YY_RULE_SETUP
1287 #line 149 "sksl.flex"
1288 { return SkSL::Token::LOGICALAND; }
1289 	YY_BREAK
1290 case 64:
1291 YY_RULE_SETUP
1292 #line 151 "sksl.flex"
1293 { return SkSL::Token::LOGICALNOT; }
1294 	YY_BREAK
1295 case 65:
1296 YY_RULE_SETUP
1297 #line 153 "sksl.flex"
1298 { return SkSL::Token::QUESTION; }
1299 	YY_BREAK
1300 case 66:
1301 YY_RULE_SETUP
1302 #line 155 "sksl.flex"
1303 { return SkSL::Token::COLON; }
1304 	YY_BREAK
1305 case 67:
1306 YY_RULE_SETUP
1307 #line 157 "sksl.flex"
1308 { return SkSL::Token::EQ; }
1309 	YY_BREAK
1310 case 68:
1311 YY_RULE_SETUP
1312 #line 159 "sksl.flex"
1313 { return SkSL::Token::EQEQ; }
1314 	YY_BREAK
1315 case 69:
1316 YY_RULE_SETUP
1317 #line 161 "sksl.flex"
1318 { return SkSL::Token::NEQ; }
1319 	YY_BREAK
1320 case 70:
1321 YY_RULE_SETUP
1322 #line 163 "sksl.flex"
1323 { return SkSL::Token::GT; }
1324 	YY_BREAK
1325 case 71:
1326 YY_RULE_SETUP
1327 #line 165 "sksl.flex"
1328 { return SkSL::Token::LT; }
1329 	YY_BREAK
1330 case 72:
1331 YY_RULE_SETUP
1332 #line 167 "sksl.flex"
1333 { return SkSL::Token::GTEQ; }
1334 	YY_BREAK
1335 case 73:
1336 YY_RULE_SETUP
1337 #line 169 "sksl.flex"
1338 { return SkSL::Token::LTEQ; }
1339 	YY_BREAK
1340 case 74:
1341 YY_RULE_SETUP
1342 #line 171 "sksl.flex"
1343 { return SkSL::Token::PLUSEQ; }
1344 	YY_BREAK
1345 case 75:
1346 YY_RULE_SETUP
1347 #line 173 "sksl.flex"
1348 { return SkSL::Token::MINUSEQ; }
1349 	YY_BREAK
1350 case 76:
1351 YY_RULE_SETUP
1352 #line 175 "sksl.flex"
1353 { return SkSL::Token::STAREQ; }
1354 	YY_BREAK
1355 case 77:
1356 YY_RULE_SETUP
1357 #line 177 "sksl.flex"
1358 { return SkSL::Token::SLASHEQ; }
1359 	YY_BREAK
1360 case 78:
1361 YY_RULE_SETUP
1362 #line 179 "sksl.flex"
1363 { return SkSL::Token::PERCENTEQ; }
1364 	YY_BREAK
1365 case 79:
1366 YY_RULE_SETUP
1367 #line 181 "sksl.flex"
1368 { return SkSL::Token::SHLEQ; }
1369 	YY_BREAK
1370 case 80:
1371 YY_RULE_SETUP
1372 #line 183 "sksl.flex"
1373 { return SkSL::Token::SHREQ; }
1374 	YY_BREAK
1375 case 81:
1376 YY_RULE_SETUP
1377 #line 185 "sksl.flex"
1378 { return SkSL::Token::BITWISEOREQ; }
1379 	YY_BREAK
1380 case 82:
1381 YY_RULE_SETUP
1382 #line 187 "sksl.flex"
1383 { return SkSL::Token::BITWISEXOREQ; }
1384 	YY_BREAK
1385 case 83:
1386 YY_RULE_SETUP
1387 #line 189 "sksl.flex"
1388 { return SkSL::Token::BITWISEANDEQ; }
1389 	YY_BREAK
1390 case 84:
1391 YY_RULE_SETUP
1392 #line 191 "sksl.flex"
1393 { return SkSL::Token::LOGICALOREQ; }
1394 	YY_BREAK
1395 case 85:
1396 YY_RULE_SETUP
1397 #line 193 "sksl.flex"
1398 { return SkSL::Token::LOGICALXOREQ; }
1399 	YY_BREAK
1400 case 86:
1401 YY_RULE_SETUP
1402 #line 195 "sksl.flex"
1403 { return SkSL::Token::LOGICALANDEQ; }
1404 	YY_BREAK
1405 case 87:
1406 YY_RULE_SETUP
1407 #line 197 "sksl.flex"
1408 { return SkSL::Token::SEMICOLON; }
1409 	YY_BREAK
1410 case 88:
1411 YY_RULE_SETUP
1412 #line 199 "sksl.flex"
1413 /* line comment */
1414 	YY_BREAK
1415 case 89:
1416 /* rule 89 can match eol */
1417 YY_RULE_SETUP
1418 #line 201 "sksl.flex"
1419 /* block comment */
1420 	YY_BREAK
1421 case 90:
1422 /* rule 90 can match eol */
1423 YY_RULE_SETUP
1424 #line 203 "sksl.flex"
1425 /* whitespace */
1426 	YY_BREAK
1427 case 91:
1428 YY_RULE_SETUP
1429 #line 205 "sksl.flex"
1430 { return SkSL::Token::INVALID_TOKEN; }
1431 	YY_BREAK
1432 case 92:
1433 YY_RULE_SETUP
1434 #line 207 "sksl.flex"
1435 ECHO;
1436 	YY_BREAK
1437 #line 1432 "lex.sksl.c"
1438 case YY_STATE_EOF(INITIAL):
1439 	yyterminate();
1440 
1441 	case YY_END_OF_BUFFER:
1442 		{
1443 		/* Amount of text matched not including the EOB char. */
1444 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1445 
1446 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1447 		*yy_cp = yyg->yy_hold_char;
1448 		YY_RESTORE_YY_MORE_OFFSET
1449 
1450 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1451 			{
1452 			/* We're scanning a new file or input source.  It's
1453 			 * possible that this happened because the user
1454 			 * just pointed yyin at a new source and called
1455 			 * sksllex().  If so, then we have to assure
1456 			 * consistency between YY_CURRENT_BUFFER and our
1457 			 * globals.  Here is the right place to do so, because
1458 			 * this is the first action (other than possibly a
1459 			 * back-up) that will match for the new input source.
1460 			 */
1461 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1462 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1463 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1464 			}
1465 
1466 		/* Note that here we test for yy_c_buf_p "<=" to the position
1467 		 * of the first EOB in the buffer, since yy_c_buf_p will
1468 		 * already have been incremented past the NUL character
1469 		 * (since all states make transitions on EOB to the
1470 		 * end-of-buffer state).  Contrast this with the test
1471 		 * in input().
1472 		 */
1473 		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1474 			{ /* This was really a NUL. */
1475 			yy_state_type yy_next_state;
1476 
1477 			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1478 
1479 			yy_current_state = yy_get_previous_state( yyscanner );
1480 
1481 			/* Okay, we're now positioned to make the NUL
1482 			 * transition.  We couldn't have
1483 			 * yy_get_previous_state() go ahead and do it
1484 			 * for us because it doesn't know how to deal
1485 			 * with the possibility of jamming (and we don't
1486 			 * want to build jamming into it because then it
1487 			 * will run more slowly).
1488 			 */
1489 
1490 			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1491 
1492 			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1493 
1494 			if ( yy_next_state )
1495 				{
1496 				/* Consume the NUL. */
1497 				yy_cp = ++yyg->yy_c_buf_p;
1498 				yy_current_state = yy_next_state;
1499 				goto yy_match;
1500 				}
1501 
1502 			else
1503 				{
1504 				yy_cp = yyg->yy_last_accepting_cpos;
1505 				yy_current_state = yyg->yy_last_accepting_state;
1506 				goto yy_find_action;
1507 				}
1508 			}
1509 
1510 		else switch ( yy_get_next_buffer( yyscanner ) )
1511 			{
1512 			case EOB_ACT_END_OF_FILE:
1513 				{
1514 				yyg->yy_did_buffer_switch_on_eof = 0;
1515 
1516 				if ( skslwrap(yyscanner ) )
1517 					{
1518 					/* Note: because we've taken care in
1519 					 * yy_get_next_buffer() to have set up
1520 					 * yytext, we can now set up
1521 					 * yy_c_buf_p so that if some total
1522 					 * hoser (like flex itself) wants to
1523 					 * call the scanner after we return the
1524 					 * YY_NULL, it'll still work - another
1525 					 * YY_NULL will get returned.
1526 					 */
1527 					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1528 
1529 					yy_act = YY_STATE_EOF(YY_START);
1530 					goto do_action;
1531 					}
1532 
1533 				else
1534 					{
1535 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1536 						YY_NEW_FILE;
1537 					}
1538 				break;
1539 				}
1540 
1541 			case EOB_ACT_CONTINUE_SCAN:
1542 				yyg->yy_c_buf_p =
1543 					yyg->yytext_ptr + yy_amount_of_matched_text;
1544 
1545 				yy_current_state = yy_get_previous_state( yyscanner );
1546 
1547 				yy_cp = yyg->yy_c_buf_p;
1548 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1549 				goto yy_match;
1550 
1551 			case EOB_ACT_LAST_MATCH:
1552 				yyg->yy_c_buf_p =
1553 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1554 
1555 				yy_current_state = yy_get_previous_state( yyscanner );
1556 
1557 				yy_cp = yyg->yy_c_buf_p;
1558 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1559 				goto yy_find_action;
1560 			}
1561 		break;
1562 		}
1563 
1564 	default:
1565 		YY_FATAL_ERROR(
1566 			"fatal flex scanner internal error--no action found" );
1567 	} /* end of action switch */
1568 		} /* end of scanning one token */
1569 	} /* end of user's declarations */
1570 } /* end of sksllex */
1571 
1572 /* yy_get_next_buffer - try to read in a new buffer
1573  *
1574  * Returns a code representing an action:
1575  *	EOB_ACT_LAST_MATCH -
1576  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1577  *	EOB_ACT_END_OF_FILE - end of file
1578  */
yy_get_next_buffer(yyscan_t yyscanner)1579 static int yy_get_next_buffer (yyscan_t yyscanner)
1580 {
1581     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1582 	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1583 	register char *source = yyg->yytext_ptr;
1584 	register int number_to_move, i;
1585 	int ret_val;
1586 
1587 	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1588 		YY_FATAL_ERROR(
1589 		"fatal flex scanner internal error--end of buffer missed" );
1590 
1591 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1592 		{ /* Don't try to fill the buffer, so this is an EOF. */
1593 		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1594 			{
1595 			/* We matched a single character, the EOB, so
1596 			 * treat this as a final EOF.
1597 			 */
1598 			return EOB_ACT_END_OF_FILE;
1599 			}
1600 
1601 		else
1602 			{
1603 			/* We matched some text prior to the EOB, first
1604 			 * process it.
1605 			 */
1606 			return EOB_ACT_LAST_MATCH;
1607 			}
1608 		}
1609 
1610 	/* Try to read more data. */
1611 
1612 	/* First move last chars to start of buffer. */
1613 	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1614 
1615 	for ( i = 0; i < number_to_move; ++i )
1616 		*(dest++) = *(source++);
1617 
1618 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1619 		/* don't do the read, it's not guaranteed to return an EOF,
1620 		 * just force an EOF
1621 		 */
1622 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1623 
1624 	else
1625 		{
1626 			yy_size_t num_to_read =
1627 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1628 
1629 		while ( num_to_read <= 0 )
1630 			{ /* Not enough room in the buffer - grow it. */
1631 
1632 			/* just a shorter name for the current buffer */
1633 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1634 
1635 			int yy_c_buf_p_offset =
1636 				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1637 
1638 			if ( b->yy_is_our_buffer )
1639 				{
1640 				yy_size_t new_size = b->yy_buf_size * 2;
1641 
1642 				if ( new_size <= 0 )
1643 					b->yy_buf_size += b->yy_buf_size / 8;
1644 				else
1645 					b->yy_buf_size *= 2;
1646 
1647 				b->yy_ch_buf = (char *)
1648 					/* Include room in for 2 EOB chars. */
1649 					skslrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1650 				}
1651 			else
1652 				/* Can't grow it, we don't own it. */
1653 				b->yy_ch_buf = 0;
1654 
1655 			if ( ! b->yy_ch_buf )
1656 				YY_FATAL_ERROR(
1657 				"fatal error - scanner input buffer overflow" );
1658 
1659 			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1660 
1661 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1662 						number_to_move - 1;
1663 
1664 			}
1665 
1666 		if ( num_to_read > YY_READ_BUF_SIZE )
1667 			num_to_read = YY_READ_BUF_SIZE;
1668 
1669 		/* Read in more data. */
1670 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1671 			yyg->yy_n_chars, num_to_read );
1672 
1673 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1674 		}
1675 
1676 	if ( yyg->yy_n_chars == 0 )
1677 		{
1678 		if ( number_to_move == YY_MORE_ADJ )
1679 			{
1680 			ret_val = EOB_ACT_END_OF_FILE;
1681 			skslrestart(yyin  ,yyscanner);
1682 			}
1683 
1684 		else
1685 			{
1686 			ret_val = EOB_ACT_LAST_MATCH;
1687 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1688 				YY_BUFFER_EOF_PENDING;
1689 			}
1690 		}
1691 
1692 	else
1693 		ret_val = EOB_ACT_CONTINUE_SCAN;
1694 
1695 	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1696 		/* Extend the array by 50%, plus the number we really need. */
1697 		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1698 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) skslrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1699 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1700 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1701 	}
1702 
1703 	yyg->yy_n_chars += number_to_move;
1704 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1705 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1706 
1707 	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1708 
1709 	return ret_val;
1710 }
1711 
1712 /* yy_get_previous_state - get the state just before the EOB char was reached */
1713 
yy_get_previous_state(yyscan_t yyscanner)1714     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1715 {
1716 	register yy_state_type yy_current_state;
1717 	register char *yy_cp;
1718     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1719 
1720 	yy_current_state = yyg->yy_start;
1721 
1722 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1723 		{
1724 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1725 		if ( yy_accept[yy_current_state] )
1726 			{
1727 			yyg->yy_last_accepting_state = yy_current_state;
1728 			yyg->yy_last_accepting_cpos = yy_cp;
1729 			}
1730 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1731 			{
1732 			yy_current_state = (int) yy_def[yy_current_state];
1733 			if ( yy_current_state >= 253 )
1734 				yy_c = yy_meta[(unsigned int) yy_c];
1735 			}
1736 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1737 		}
1738 
1739 	return yy_current_state;
1740 }
1741 
1742 /* yy_try_NUL_trans - try to make a transition on the NUL character
1743  *
1744  * synopsis
1745  *	next_state = yy_try_NUL_trans( current_state );
1746  */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)1747     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
1748 {
1749 	register int yy_is_jam;
1750     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1751 	register char *yy_cp = yyg->yy_c_buf_p;
1752 
1753 	register YY_CHAR yy_c = 1;
1754 	if ( yy_accept[yy_current_state] )
1755 		{
1756 		yyg->yy_last_accepting_state = yy_current_state;
1757 		yyg->yy_last_accepting_cpos = yy_cp;
1758 		}
1759 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1760 		{
1761 		yy_current_state = (int) yy_def[yy_current_state];
1762 		if ( yy_current_state >= 253 )
1763 			yy_c = yy_meta[(unsigned int) yy_c];
1764 		}
1765 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1766 	yy_is_jam = (yy_current_state == 252);
1767 
1768 	(void)yyg;
1769 	return yy_is_jam ? 0 : yy_current_state;
1770 }
1771 
yyunput(int c,register char * yy_bp,yyscan_t yyscanner)1772     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1773 {
1774 	register char *yy_cp;
1775     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1776 
1777     yy_cp = yyg->yy_c_buf_p;
1778 
1779 	/* undo effects of setting up yytext */
1780 	*yy_cp = yyg->yy_hold_char;
1781 
1782 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1783 		{ /* need to shift things up to make room */
1784 		/* +2 for EOB chars. */
1785 		register yy_size_t number_to_move = yyg->yy_n_chars + 2;
1786 		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1787 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1788 		register char *source =
1789 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1790 
1791 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1792 			*--dest = *--source;
1793 
1794 		yy_cp += (int) (dest - source);
1795 		yy_bp += (int) (dest - source);
1796 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1797 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1798 
1799 		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1800 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1801 		}
1802 
1803 	*--yy_cp = (char) c;
1804 
1805     if ( c == '\n' ){
1806         --yylineno;
1807     }
1808 
1809 	yyg->yytext_ptr = yy_bp;
1810 	yyg->yy_hold_char = *yy_cp;
1811 	yyg->yy_c_buf_p = yy_cp;
1812 }
1813 
1814 #ifndef YY_NO_INPUT
1815 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)1816     static int yyinput (yyscan_t yyscanner)
1817 #else
1818     static int input  (yyscan_t yyscanner)
1819 #endif
1820 
1821 {
1822 	int c;
1823     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1824 
1825 	*yyg->yy_c_buf_p = yyg->yy_hold_char;
1826 
1827 	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1828 		{
1829 		/* yy_c_buf_p now points to the character we want to return.
1830 		 * If this occurs *before* the EOB characters, then it's a
1831 		 * valid NUL; if not, then we've hit the end of the buffer.
1832 		 */
1833 		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1834 			/* This was really a NUL. */
1835 			*yyg->yy_c_buf_p = '\0';
1836 
1837 		else
1838 			{ /* need more input */
1839 			yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1840 			++yyg->yy_c_buf_p;
1841 
1842 			switch ( yy_get_next_buffer( yyscanner ) )
1843 				{
1844 				case EOB_ACT_LAST_MATCH:
1845 					/* This happens because yy_g_n_b()
1846 					 * sees that we've accumulated a
1847 					 * token and flags that we need to
1848 					 * try matching the token before
1849 					 * proceeding.  But for input(),
1850 					 * there's no matching to consider.
1851 					 * So convert the EOB_ACT_LAST_MATCH
1852 					 * to EOB_ACT_END_OF_FILE.
1853 					 */
1854 
1855 					/* Reset buffer status. */
1856 					skslrestart(yyin ,yyscanner);
1857 
1858 					/*FALLTHROUGH*/
1859 
1860 				case EOB_ACT_END_OF_FILE:
1861 					{
1862 					if ( skslwrap(yyscanner ) )
1863 						return EOF;
1864 
1865 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1866 						YY_NEW_FILE;
1867 #ifdef __cplusplus
1868 					return yyinput(yyscanner);
1869 #else
1870 					return input(yyscanner);
1871 #endif
1872 					}
1873 
1874 				case EOB_ACT_CONTINUE_SCAN:
1875 					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1876 					break;
1877 				}
1878 			}
1879 		}
1880 
1881 	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
1882 	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
1883 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1884 
1885 	if ( c == '\n' )
1886 
1887     do{ yylineno++;
1888         yycolumn=0;
1889     }while(0)
1890 ;
1891 
1892 	return c;
1893 }
1894 #endif	/* ifndef YY_NO_INPUT */
1895 
1896 /** Immediately switch to a different input stream.
1897  * @param input_file A readable stream.
1898  * @param yyscanner The scanner object.
1899  * @note This function does not reset the start condition to @c INITIAL .
1900  */
skslrestart(FILE * input_file,yyscan_t yyscanner)1901     void skslrestart  (FILE * input_file , yyscan_t yyscanner)
1902 {
1903     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1904 
1905 	if ( ! YY_CURRENT_BUFFER ){
1906         skslensure_buffer_stack (yyscanner);
1907 		YY_CURRENT_BUFFER_LVALUE =
1908             sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1909 	}
1910 
1911 	sksl_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1912 	sksl_load_buffer_state(yyscanner );
1913 }
1914 
1915 /** Switch to a different input buffer.
1916  * @param new_buffer The new input buffer.
1917  * @param yyscanner The scanner object.
1918  */
sksl_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)1919     void sksl_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
1920 {
1921     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1922 
1923 	/* TODO. We should be able to replace this entire function body
1924 	 * with
1925 	 *		skslpop_buffer_state();
1926 	 *		skslpush_buffer_state(new_buffer);
1927      */
1928 	skslensure_buffer_stack (yyscanner);
1929 	if ( YY_CURRENT_BUFFER == new_buffer )
1930 		return;
1931 
1932 	if ( YY_CURRENT_BUFFER )
1933 		{
1934 		/* Flush out information for old buffer. */
1935 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
1936 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1937 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1938 		}
1939 
1940 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1941 	sksl_load_buffer_state(yyscanner );
1942 
1943 	/* We don't actually know whether we did this switch during
1944 	 * EOF (skslwrap()) processing, but the only time this flag
1945 	 * is looked at is after skslwrap() is called, so it's safe
1946 	 * to go ahead and always set it.
1947 	 */
1948 	yyg->yy_did_buffer_switch_on_eof = 1;
1949 }
1950 
sksl_load_buffer_state(yyscan_t yyscanner)1951 static void sksl_load_buffer_state  (yyscan_t yyscanner)
1952 {
1953     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1954 	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1955 	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1956 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1957 	yyg->yy_hold_char = *yyg->yy_c_buf_p;
1958 }
1959 
1960 /** Allocate and initialize an input buffer state.
1961  * @param file A readable stream.
1962  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1963  * @param yyscanner The scanner object.
1964  * @return the allocated buffer state.
1965  */
sksl_create_buffer(FILE * file,int size,yyscan_t yyscanner)1966     YY_BUFFER_STATE sksl_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
1967 {
1968 	YY_BUFFER_STATE b;
1969 
1970 	b = (YY_BUFFER_STATE) skslalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1971 	if ( ! b )
1972 		YY_FATAL_ERROR( "out of dynamic memory in sksl_create_buffer()" );
1973 
1974 	b->yy_buf_size = size;
1975 
1976 	/* yy_ch_buf has to be 2 characters longer than the size given because
1977 	 * we need to put in 2 end-of-buffer characters.
1978 	 */
1979 	b->yy_ch_buf = (char *) skslalloc(b->yy_buf_size + 2 ,yyscanner );
1980 	if ( ! b->yy_ch_buf )
1981 		YY_FATAL_ERROR( "out of dynamic memory in sksl_create_buffer()" );
1982 
1983 	b->yy_is_our_buffer = 1;
1984 
1985 	sksl_init_buffer(b,file ,yyscanner);
1986 
1987 	return b;
1988 }
1989 
1990 /** Destroy the buffer.
1991  * @param b a buffer created with sksl_create_buffer()
1992  * @param yyscanner The scanner object.
1993  */
sksl_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)1994     void sksl_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1995 {
1996     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1997 
1998 	if ( ! b )
1999 		return;
2000 
2001 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2002 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2003 
2004 	if ( b->yy_is_our_buffer )
2005 		skslfree((void *) b->yy_ch_buf ,yyscanner );
2006 
2007 	skslfree((void *) b ,yyscanner );
2008 }
2009 
2010 /* Initializes or reinitializes a buffer.
2011  * This function is sometimes called more than once on the same buffer,
2012  * such as during a skslrestart() or at EOF.
2013  */
sksl_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)2014     static void sksl_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
2015 
2016 {
2017 	int oerrno = errno;
2018     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2019 
2020 	sksl_flush_buffer(b ,yyscanner);
2021 
2022 	b->yy_input_file = file;
2023 	b->yy_fill_buffer = 1;
2024 
2025     /* If b is the current buffer, then sksl_init_buffer was _probably_
2026      * called from skslrestart() or through yy_get_next_buffer.
2027      * In that case, we don't want to reset the lineno or column.
2028      */
2029     if (b != YY_CURRENT_BUFFER){
2030         b->yy_bs_lineno = 1;
2031         b->yy_bs_column = 0;
2032     }
2033 
2034         b->yy_is_interactive = 0;
2035 
2036 	errno = oerrno;
2037 }
2038 
2039 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2040  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2041  * @param yyscanner The scanner object.
2042  */
sksl_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2043     void sksl_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2044 {
2045     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2046 	if ( ! b )
2047 		return;
2048 
2049 	b->yy_n_chars = 0;
2050 
2051 	/* We always need two end-of-buffer characters.  The first causes
2052 	 * a transition to the end-of-buffer state.  The second causes
2053 	 * a jam in that state.
2054 	 */
2055 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2056 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2057 
2058 	b->yy_buf_pos = &b->yy_ch_buf[0];
2059 
2060 	b->yy_at_bol = 1;
2061 	b->yy_buffer_status = YY_BUFFER_NEW;
2062 
2063 	if ( b == YY_CURRENT_BUFFER )
2064 		sksl_load_buffer_state(yyscanner );
2065 }
2066 
2067 /** Pushes the new state onto the stack. The new state becomes
2068  *  the current state. This function will allocate the stack
2069  *  if necessary.
2070  *  @param new_buffer The new state.
2071  *  @param yyscanner The scanner object.
2072  */
skslpush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2073 void skslpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2074 {
2075     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2076 	if (new_buffer == NULL)
2077 		return;
2078 
2079 	skslensure_buffer_stack(yyscanner);
2080 
2081 	/* This block is copied from sksl_switch_to_buffer. */
2082 	if ( YY_CURRENT_BUFFER )
2083 		{
2084 		/* Flush out information for old buffer. */
2085 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
2086 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2087 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2088 		}
2089 
2090 	/* Only push if top exists. Otherwise, replace top. */
2091 	if (YY_CURRENT_BUFFER)
2092 		yyg->yy_buffer_stack_top++;
2093 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2094 
2095 	/* copied from sksl_switch_to_buffer. */
2096 	sksl_load_buffer_state(yyscanner );
2097 	yyg->yy_did_buffer_switch_on_eof = 1;
2098 }
2099 
2100 /** Removes and deletes the top of the stack, if present.
2101  *  The next element becomes the new top.
2102  *  @param yyscanner The scanner object.
2103  */
skslpop_buffer_state(yyscan_t yyscanner)2104 void skslpop_buffer_state (yyscan_t yyscanner)
2105 {
2106     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2107 	if (!YY_CURRENT_BUFFER)
2108 		return;
2109 
2110 	sksl_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2111 	YY_CURRENT_BUFFER_LVALUE = NULL;
2112 	if (yyg->yy_buffer_stack_top > 0)
2113 		--yyg->yy_buffer_stack_top;
2114 
2115 	if (YY_CURRENT_BUFFER) {
2116 		sksl_load_buffer_state(yyscanner );
2117 		yyg->yy_did_buffer_switch_on_eof = 1;
2118 	}
2119 }
2120 
2121 /* Allocates the stack if it does not exist.
2122  *  Guarantees space for at least one push.
2123  */
skslensure_buffer_stack(yyscan_t yyscanner)2124 static void skslensure_buffer_stack (yyscan_t yyscanner)
2125 {
2126 	yy_size_t num_to_alloc;
2127     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2128 
2129 	if (!yyg->yy_buffer_stack) {
2130 
2131 		/* First allocation is just for 2 elements, since we don't know if this
2132 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2133 		 * immediate realloc on the next call.
2134          */
2135 		num_to_alloc = 1;
2136 		yyg->yy_buffer_stack = (struct yy_buffer_state**)skslalloc
2137 								(num_to_alloc * sizeof(struct yy_buffer_state*)
2138 								, yyscanner);
2139 		if ( ! yyg->yy_buffer_stack )
2140 			YY_FATAL_ERROR( "out of dynamic memory in skslensure_buffer_stack()" );
2141 
2142 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2143 
2144 		yyg->yy_buffer_stack_max = num_to_alloc;
2145 		yyg->yy_buffer_stack_top = 0;
2146 		return;
2147 	}
2148 
2149 	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2150 
2151 		/* Increase the buffer to prepare for a possible push. */
2152 		int grow_size = 8 /* arbitrary grow size */;
2153 
2154 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2155 		yyg->yy_buffer_stack = (struct yy_buffer_state**)skslrealloc
2156 								(yyg->yy_buffer_stack,
2157 								num_to_alloc * sizeof(struct yy_buffer_state*)
2158 								, yyscanner);
2159 		if ( ! yyg->yy_buffer_stack )
2160 			YY_FATAL_ERROR( "out of dynamic memory in skslensure_buffer_stack()" );
2161 
2162 		/* zero only the new slots.*/
2163 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2164 		yyg->yy_buffer_stack_max = num_to_alloc;
2165 	}
2166 }
2167 
2168 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2169  * @param base the character buffer
2170  * @param size the size in bytes of the character buffer
2171  * @param yyscanner The scanner object.
2172  * @return the newly allocated buffer state object.
2173  */
sksl_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)2174 YY_BUFFER_STATE sksl_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
2175 {
2176 	YY_BUFFER_STATE b;
2177 
2178 	if ( size < 2 ||
2179 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2180 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2181 		/* They forgot to leave room for the EOB's. */
2182 		return 0;
2183 
2184 	b = (YY_BUFFER_STATE) skslalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2185 	if ( ! b )
2186 		YY_FATAL_ERROR( "out of dynamic memory in sksl_scan_buffer()" );
2187 
2188 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
2189 	b->yy_buf_pos = b->yy_ch_buf = base;
2190 	b->yy_is_our_buffer = 0;
2191 	b->yy_input_file = 0;
2192 	b->yy_n_chars = b->yy_buf_size;
2193 	b->yy_is_interactive = 0;
2194 	b->yy_at_bol = 1;
2195 	b->yy_fill_buffer = 0;
2196 	b->yy_buffer_status = YY_BUFFER_NEW;
2197 
2198 	sksl_switch_to_buffer(b ,yyscanner );
2199 
2200 	return b;
2201 }
2202 
2203 /** Setup the input buffer state to scan a string. The next call to sksllex() will
2204  * scan from a @e copy of @a str.
2205  * @param yystr a NUL-terminated string to scan
2206  * @param yyscanner The scanner object.
2207  * @return the newly allocated buffer state object.
2208  * @note If you want to scan bytes that may contain NUL values, then use
2209  *       sksl_scan_bytes() instead.
2210  */
sksl_scan_string(yyconst char * yystr,yyscan_t yyscanner)2211 YY_BUFFER_STATE sksl_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2212 {
2213 
2214 	return sksl_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2215 }
2216 
2217 /** Setup the input buffer state to scan the given bytes. The next call to sksllex() will
2218  * scan from a @e copy of @a bytes.
2219  * @param yybytes the byte buffer to scan
2220  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2221  * @param yyscanner The scanner object.
2222  * @return the newly allocated buffer state object.
2223  */
sksl_scan_bytes(yyconst char * yybytes,yy_size_t _yybytes_len,yyscan_t yyscanner)2224 YY_BUFFER_STATE sksl_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
2225 {
2226 	YY_BUFFER_STATE b;
2227 	char *buf;
2228 	yy_size_t n;
2229 	yy_size_t i;
2230 
2231 	/* Get memory for full buffer, including space for trailing EOB's. */
2232 	n = _yybytes_len + 2;
2233 	buf = (char *) skslalloc(n ,yyscanner );
2234 	if ( ! buf )
2235 		YY_FATAL_ERROR( "out of dynamic memory in sksl_scan_bytes()" );
2236 
2237 	for ( i = 0; i < _yybytes_len; ++i )
2238 		buf[i] = yybytes[i];
2239 
2240 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2241 
2242 	b = sksl_scan_buffer(buf,n ,yyscanner);
2243 	if ( ! b )
2244 		YY_FATAL_ERROR( "bad buffer in sksl_scan_bytes()" );
2245 
2246 	/* It's okay to grow etc. this buffer, and we should throw it
2247 	 * away when we're done.
2248 	 */
2249 	b->yy_is_our_buffer = 1;
2250 
2251 	return b;
2252 }
2253 
2254 #ifndef YY_EXIT_FAILURE
2255 #define YY_EXIT_FAILURE 2
2256 #endif
2257 
yy_fatal_error(yyconst char * msg,yyscan_t yyscanner)2258 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2259 {
2260     	(void) fprintf( stderr, "%s\n", msg );
2261 	exit( YY_EXIT_FAILURE );
2262 }
2263 
2264 /* Redefine yyless() so it works in section 3 code. */
2265 
2266 #undef yyless
2267 #define yyless(n) \
2268 	do \
2269 		{ \
2270 		/* Undo effects of setting up yytext. */ \
2271         int yyless_macro_arg = (n); \
2272         YY_LESS_LINENO(yyless_macro_arg);\
2273 		yytext[yyleng] = yyg->yy_hold_char; \
2274 		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2275 		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2276 		*yyg->yy_c_buf_p = '\0'; \
2277 		yyleng = yyless_macro_arg; \
2278 		} \
2279 	while ( 0 )
2280 
2281 /* Accessor  methods (get/set functions) to struct members. */
2282 
2283 /** Get the user-defined data for this scanner.
2284  * @param yyscanner The scanner object.
2285  */
skslget_extra(yyscan_t yyscanner)2286 YY_EXTRA_TYPE skslget_extra  (yyscan_t yyscanner)
2287 {
2288     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2289     return yyextra;
2290 }
2291 
2292 /** Get the current line number.
2293  * @param yyscanner The scanner object.
2294  */
skslget_lineno(yyscan_t yyscanner)2295 int skslget_lineno  (yyscan_t yyscanner)
2296 {
2297     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2298 
2299         if (! YY_CURRENT_BUFFER)
2300             return 0;
2301 
2302     return yylineno;
2303 }
2304 
2305 /** Get the current column number.
2306  * @param yyscanner The scanner object.
2307  */
skslget_column(yyscan_t yyscanner)2308 int skslget_column  (yyscan_t yyscanner)
2309 {
2310     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2311 
2312         if (! YY_CURRENT_BUFFER)
2313             return 0;
2314 
2315     return yycolumn;
2316 }
2317 
2318 /** Get the input stream.
2319  * @param yyscanner The scanner object.
2320  */
skslget_in(yyscan_t yyscanner)2321 FILE *skslget_in  (yyscan_t yyscanner)
2322 {
2323     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2324     return yyin;
2325 }
2326 
2327 /** Get the output stream.
2328  * @param yyscanner The scanner object.
2329  */
skslget_out(yyscan_t yyscanner)2330 FILE *skslget_out  (yyscan_t yyscanner)
2331 {
2332     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2333     return yyout;
2334 }
2335 
2336 /** Get the length of the current token.
2337  * @param yyscanner The scanner object.
2338  */
skslget_leng(yyscan_t yyscanner)2339 yy_size_t skslget_leng  (yyscan_t yyscanner)
2340 {
2341     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2342     return yyleng;
2343 }
2344 
2345 /** Get the current token.
2346  * @param yyscanner The scanner object.
2347  */
2348 
skslget_text(yyscan_t yyscanner)2349 char *skslget_text  (yyscan_t yyscanner)
2350 {
2351     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2352     return yytext;
2353 }
2354 
2355 /** Set the user-defined data. This data is never touched by the scanner.
2356  * @param user_defined The data to be associated with this scanner.
2357  * @param yyscanner The scanner object.
2358  */
skslset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)2359 void skslset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
2360 {
2361     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2362     yyextra = user_defined ;
2363 }
2364 
2365 /** Set the current line number.
2366  * @param line_number
2367  * @param yyscanner The scanner object.
2368  */
skslset_lineno(int line_number,yyscan_t yyscanner)2369 void skslset_lineno (int  line_number , yyscan_t yyscanner)
2370 {
2371     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2372 
2373         /* lineno is only valid if an input buffer exists. */
2374         if (! YY_CURRENT_BUFFER )
2375            YY_FATAL_ERROR( "skslset_lineno called with no buffer" );
2376 
2377     yylineno = line_number;
2378 }
2379 
2380 /** Set the current column.
2381  * @param line_number
2382  * @param yyscanner The scanner object.
2383  */
skslset_column(int column_no,yyscan_t yyscanner)2384 void skslset_column (int  column_no , yyscan_t yyscanner)
2385 {
2386     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2387 
2388         /* column is only valid if an input buffer exists. */
2389         if (! YY_CURRENT_BUFFER )
2390            YY_FATAL_ERROR( "skslset_column called with no buffer" );
2391 
2392     yycolumn = column_no;
2393 }
2394 
2395 /** Set the input stream. This does not discard the current
2396  * input buffer.
2397  * @param in_str A readable stream.
2398  * @param yyscanner The scanner object.
2399  * @see sksl_switch_to_buffer
2400  */
skslset_in(FILE * in_str,yyscan_t yyscanner)2401 void skslset_in (FILE *  in_str , yyscan_t yyscanner)
2402 {
2403     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2404     yyin = in_str ;
2405 }
2406 
skslset_out(FILE * out_str,yyscan_t yyscanner)2407 void skslset_out (FILE *  out_str , yyscan_t yyscanner)
2408 {
2409     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2410     yyout = out_str ;
2411 }
2412 
skslget_debug(yyscan_t yyscanner)2413 int skslget_debug  (yyscan_t yyscanner)
2414 {
2415     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2416     return yy_flex_debug;
2417 }
2418 
skslset_debug(int bdebug,yyscan_t yyscanner)2419 void skslset_debug (int  bdebug , yyscan_t yyscanner)
2420 {
2421     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2422     yy_flex_debug = bdebug ;
2423 }
2424 
2425 /* Accessor methods for yylval and yylloc */
2426 
2427 /* User-visible API */
2428 
2429 /* sksllex_init is special because it creates the scanner itself, so it is
2430  * the ONLY reentrant function that doesn't take the scanner as the last argument.
2431  * That's why we explicitly handle the declaration, instead of using our macros.
2432  */
2433 
sksllex_init(yyscan_t * ptr_yy_globals)2434 int sksllex_init(yyscan_t* ptr_yy_globals)
2435 
2436 {
2437     if (ptr_yy_globals == NULL){
2438         errno = EINVAL;
2439         return 1;
2440     }
2441 
2442     *ptr_yy_globals = (yyscan_t) skslalloc ( sizeof( struct yyguts_t ), NULL );
2443 
2444     if (*ptr_yy_globals == NULL){
2445         errno = ENOMEM;
2446         return 1;
2447     }
2448 
2449     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2450     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2451 
2452     return yy_init_globals ( *ptr_yy_globals );
2453 }
2454 
2455 /* sksllex_init_extra has the same functionality as sksllex_init, but follows the
2456  * convention of taking the scanner as the last argument. Note however, that
2457  * this is a *pointer* to a scanner, as it will be allocated by this call (and
2458  * is the reason, too, why this function also must handle its own declaration).
2459  * The user defined value in the first argument will be available to skslalloc in
2460  * the yyextra field.
2461  */
2462 
sksllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)2463 int sksllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2464 
2465 {
2466     struct yyguts_t dummy_yyguts;
2467 
2468     skslset_extra (yy_user_defined, &dummy_yyguts);
2469 
2470     if (ptr_yy_globals == NULL){
2471         errno = EINVAL;
2472         return 1;
2473     }
2474 
2475     *ptr_yy_globals = (yyscan_t) skslalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2476 
2477     if (*ptr_yy_globals == NULL){
2478         errno = ENOMEM;
2479         return 1;
2480     }
2481 
2482     /* By setting to 0xAA, we expose bugs in
2483     yy_init_globals. Leave at 0x00 for releases. */
2484     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2485 
2486     skslset_extra (yy_user_defined, *ptr_yy_globals);
2487 
2488     return yy_init_globals ( *ptr_yy_globals );
2489 }
2490 
yy_init_globals(yyscan_t yyscanner)2491 static int yy_init_globals (yyscan_t yyscanner)
2492 {
2493     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2494     /* Initialization is the same as for the non-reentrant scanner.
2495      * This function is called from sksllex_destroy(), so don't allocate here.
2496      */
2497 
2498     yyg->yy_buffer_stack = 0;
2499     yyg->yy_buffer_stack_top = 0;
2500     yyg->yy_buffer_stack_max = 0;
2501     yyg->yy_c_buf_p = (char *) 0;
2502     yyg->yy_init = 0;
2503     yyg->yy_start = 0;
2504 
2505     yyg->yy_start_stack_ptr = 0;
2506     yyg->yy_start_stack_depth = 0;
2507     yyg->yy_start_stack =  NULL;
2508 
2509 /* Defined in main.c */
2510 #ifdef YY_STDINIT
2511     yyin = stdin;
2512     yyout = stdout;
2513 #else
2514     yyin = (FILE *) 0;
2515     yyout = (FILE *) 0;
2516 #endif
2517 
2518     /* For future reference: Set errno on error, since we are called by
2519      * sksllex_init()
2520      */
2521     return 0;
2522 }
2523 
2524 /* sksllex_destroy is for both reentrant and non-reentrant scanners. */
sksllex_destroy(yyscan_t yyscanner)2525 int sksllex_destroy  (yyscan_t yyscanner)
2526 {
2527     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2528 
2529     /* Pop the buffer stack, destroying each element. */
2530 	while(YY_CURRENT_BUFFER){
2531 		sksl_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2532 		YY_CURRENT_BUFFER_LVALUE = NULL;
2533 		skslpop_buffer_state(yyscanner);
2534 	}
2535 
2536 	/* Destroy the stack itself. */
2537 	skslfree(yyg->yy_buffer_stack ,yyscanner);
2538 	yyg->yy_buffer_stack = NULL;
2539 
2540     /* Destroy the start condition stack. */
2541         skslfree(yyg->yy_start_stack ,yyscanner );
2542         yyg->yy_start_stack = NULL;
2543 
2544     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2545      * sksllex() is called, initialization will occur. */
2546     yy_init_globals( yyscanner);
2547 
2548     /* Destroy the main struct (reentrant only). */
2549     skslfree ( yyscanner , yyscanner );
2550     yyscanner = NULL;
2551     return 0;
2552 }
2553 
2554 /*
2555  * Internal utility routines.
2556  */
2557 
2558 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,yyconst char * s2,int n,yyscan_t yyscanner)2559 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2560 {
2561 	register int i;
2562 	for ( i = 0; i < n; ++i )
2563 		s1[i] = s2[i];
2564 }
2565 #endif
2566 
2567 #ifdef YY_NEED_STRLEN
yy_flex_strlen(yyconst char * s,yyscan_t yyscanner)2568 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2569 {
2570 	register int n;
2571 	for ( n = 0; s[n]; ++n )
2572 		;
2573 
2574 	return n;
2575 }
2576 #endif
2577 
skslalloc(yy_size_t size,yyscan_t yyscanner)2578 void *skslalloc (yy_size_t  size , yyscan_t yyscanner)
2579 {
2580 	return (void *) malloc( size );
2581 }
2582 
skslrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)2583 void *skslrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2584 {
2585 	/* The cast to (char *) in the following accommodates both
2586 	 * implementations that use char* generic pointers, and those
2587 	 * that use void* generic pointers.  It works with the latter
2588 	 * because both ANSI C and C++ allow castless assignment from
2589 	 * any pointer type to void*, and deal with argument conversions
2590 	 * as though doing an assignment.
2591 	 */
2592 	return (void *) realloc( (char *) ptr, size );
2593 }
2594 
skslfree(void * ptr,yyscan_t yyscanner)2595 void skslfree (void * ptr , yyscan_t yyscanner)
2596 {
2597 	free( (char *) ptr );	/* see skslrealloc() for (char *) cast */
2598 }
2599 
2600 #define YYTABLES_NAME "yytables"
2601 
2602 #line 206 "sksl.flex"
2603 
2604 
2605 
skslwrap(yyscan_t scanner)2606 int skslwrap(yyscan_t scanner) {
2607     return 1; // terminate
2608 }
2609 
2610