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