blob: 4993fac3a5a23475f7b44dad6945e295775fa7fa [file] [log] [blame]
ethannicholasb3058bd2016-07-01 08:22:01 -07001/*
2 * Copyright 2016 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 */
fmalitad214d6a2016-09-30 08:05:24 -07007
ethannicholasb3058bd2016-07-01 08:22:01 -07008#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
fmalitad214d6a2016-09-30 08:05:24 -070017#define YY_FLEX_SUBMINOR_VERSION 37
ethannicholasb3058bd2016-07-01 08:22:01 -070018#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>
49typedef int8_t flex_int8_t;
50typedef uint8_t flex_uint8_t;
51typedef int16_t flex_int16_t;
52typedef uint16_t flex_uint16_t;
53typedef int32_t flex_int32_t;
54typedef uint32_t flex_uint32_t;
ethannicholasb3058bd2016-07-01 08:22:01 -070055#else
56typedef signed char flex_int8_t;
57typedef short int flex_int16_t;
58typedef int flex_int32_t;
59typedef unsigned char flex_uint8_t;
60typedef unsigned short int flex_uint16_t;
61typedef unsigned int flex_uint32_t;
ethannicholasb3058bd2016-07-01 08:22:01 -070062
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
fmalitad214d6a2016-09-30 08:05:24 -070092#endif /* ! C99 */
93
ethannicholasb3058bd2016-07-01 08:22:01 -070094#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
130typedef 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#define YY_BUF_SIZE 16384
168#endif
169
170/* The state buf must be large enough to hold one state per character in the main buffer.
171 */
172#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
173
174#ifndef YY_TYPEDEF_YY_BUFFER_STATE
175#define YY_TYPEDEF_YY_BUFFER_STATE
176typedef struct yy_buffer_state *YY_BUFFER_STATE;
177#endif
178
179#ifndef YY_TYPEDEF_YY_SIZE_T
180#define YY_TYPEDEF_YY_SIZE_T
181typedef size_t yy_size_t;
182#endif
183
184#define EOB_ACT_CONTINUE_SCAN 0
185#define EOB_ACT_END_OF_FILE 1
186#define EOB_ACT_LAST_MATCH 2
187
188 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
189 * access to the local variable yy_act. Since yyless() is a macro, it would break
190 * existing scanners that call yyless() from OUTSIDE sksllex.
191 * One obvious solution it to make yy_act a global. I tried that, and saw
192 * a 5% performance hit in a non-yylineno scanner, because yy_act is
193 * normally declared as a register variable-- so it is not worth it.
194 */
195 #define YY_LESS_LINENO(n) \
196 do { \
fmalitad214d6a2016-09-30 08:05:24 -0700197 int yyl;\
ethannicholasb3058bd2016-07-01 08:22:01 -0700198 for ( yyl = n; yyl < yyleng; ++yyl )\
199 if ( yytext[yyl] == '\n' )\
200 --yylineno;\
201 }while(0)
202
203/* Return all but the first "n" matched characters back to the input stream. */
204#define yyless(n) \
205 do \
206 { \
207 /* Undo effects of setting up yytext. */ \
208 int yyless_macro_arg = (n); \
209 YY_LESS_LINENO(yyless_macro_arg);\
210 *yy_cp = yyg->yy_hold_char; \
211 YY_RESTORE_YY_MORE_OFFSET \
212 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
213 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
214 } \
215 while ( 0 )
216
217#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
218
219#ifndef YY_STRUCT_YY_BUFFER_STATE
220#define YY_STRUCT_YY_BUFFER_STATE
221struct yy_buffer_state
222 {
223 FILE *yy_input_file;
224
225 char *yy_ch_buf; /* input buffer */
226 char *yy_buf_pos; /* current position in input buffer */
227
228 /* Size of input buffer in bytes, not including room for EOB
229 * characters.
230 */
231 yy_size_t yy_buf_size;
232
233 /* Number of characters read into yy_ch_buf, not including EOB
234 * characters.
235 */
236 yy_size_t yy_n_chars;
237
238 /* Whether we "own" the buffer - i.e., we know we created it,
239 * and can realloc() it to grow it, and should free() it to
240 * delete it.
241 */
242 int yy_is_our_buffer;
243
244 /* Whether this is an "interactive" input source; if so, and
245 * if we're using stdio for input, then we want to use getc()
246 * instead of fread(), to make sure we stop fetching input after
247 * each newline.
248 */
249 int yy_is_interactive;
250
251 /* Whether we're considered to be at the beginning of a line.
252 * If so, '^' rules will be active on the next match, otherwise
253 * not.
254 */
255 int yy_at_bol;
256
257 int yy_bs_lineno; /**< The line count. */
258 int yy_bs_column; /**< The column count. */
259
260 /* Whether to try to fill the input buffer when we reach the
261 * end of it.
262 */
263 int yy_fill_buffer;
264
265 int yy_buffer_status;
266
267#define YY_BUFFER_NEW 0
268#define YY_BUFFER_NORMAL 1
269 /* When an EOF's been seen but there's still some text to process
270 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
271 * shouldn't try reading from the input source any more. We might
272 * still have a bunch of tokens to match, though, because of
273 * possible backing-up.
274 *
275 * When we actually see the EOF, we change the status to "new"
276 * (via skslrestart()), so that the user can continue scanning by
277 * just pointing yyin at a new input file.
278 */
279#define YY_BUFFER_EOF_PENDING 2
280
281 };
282#endif /* !YY_STRUCT_YY_BUFFER_STATE */
283
284/* We provide macros for accessing buffer states in case in the
285 * future we want to put the buffer states in a more general
286 * "scanner state".
287 *
288 * Returns the top of the stack, or NULL.
289 */
290#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
291 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
292 : NULL)
293
294/* Same as previous macro, but useful when we know that the buffer stack is not
295 * NULL or when we need an lvalue. For internal use only.
296 */
297#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
298
299void skslrestart (FILE *input_file ,yyscan_t yyscanner );
300void sksl_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
301YY_BUFFER_STATE sksl_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
302void sksl_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
303void sksl_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
304void skslpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
305void skslpop_buffer_state (yyscan_t yyscanner );
306
307static void skslensure_buffer_stack (yyscan_t yyscanner );
308static void sksl_load_buffer_state (yyscan_t yyscanner );
309static void sksl_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
310
311#define YY_FLUSH_BUFFER sksl_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
312
313YY_BUFFER_STATE sksl_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
314YY_BUFFER_STATE sksl_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
315YY_BUFFER_STATE sksl_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
316
317void *skslalloc (yy_size_t ,yyscan_t yyscanner );
318void *skslrealloc (void *,yy_size_t ,yyscan_t yyscanner );
319void skslfree (void * ,yyscan_t yyscanner );
320
321#define yy_new_buffer sksl_create_buffer
322
323#define yy_set_interactive(is_interactive) \
324 { \
325 if ( ! YY_CURRENT_BUFFER ){ \
326 skslensure_buffer_stack (yyscanner); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
331 }
332
333#define yy_set_bol(at_bol) \
334 { \
335 if ( ! YY_CURRENT_BUFFER ){\
336 skslensure_buffer_stack (yyscanner); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
339 } \
340 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
341 }
342
343#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
344
345/* Begin user sect3 */
346
347typedef unsigned char YY_CHAR;
348
349typedef int yy_state_type;
350
351#define yytext_ptr yytext_r
352
353static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
354static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
355static int yy_get_next_buffer (yyscan_t yyscanner );
356static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
357
358/* Done after the current pattern has been matched and before the
359 * corresponding action - sets up yytext.
360 */
361#define YY_DO_BEFORE_ACTION \
362 yyg->yytext_ptr = yy_bp; \
fmalitad214d6a2016-09-30 08:05:24 -0700363 yyleng = (size_t) (yy_cp - yy_bp); \
ethannicholasb3058bd2016-07-01 08:22:01 -0700364 yyg->yy_hold_char = *yy_cp; \
365 *yy_cp = '\0'; \
366 yyg->yy_c_buf_p = yy_cp;
367
fmalitad214d6a2016-09-30 08:05:24 -0700368#define YY_NUM_RULES 82
369#define YY_END_OF_BUFFER 83
ethannicholasb3058bd2016-07-01 08:22:01 -0700370/* This struct is not used in this scanner,
371 but its presence is necessary. */
372struct yy_trans_info
373 {
374 flex_int32_t yy_verify;
375 flex_int32_t yy_nxt;
376 };
fmalitad214d6a2016-09-30 08:05:24 -0700377static yyconst flex_int16_t yy_accept[201] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700378 { 0,
fmalitad214d6a2016-09-30 08:05:24 -0700379 0, 0, 83, 81, 80, 80, 54, 81, 29, 45,
380 50, 31, 32, 43, 41, 38, 42, 37, 44, 4,
381 56, 77, 61, 57, 60, 55, 35, 36, 49, 29,
382 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
383 29, 29, 29, 29, 29, 29, 33, 48, 34, 80,
384 59, 30, 29, 68, 53, 73, 66, 39, 64, 40,
385 65, 1, 0, 78, 67, 2, 4, 0, 46, 63,
386 58, 62, 47, 72, 52, 29, 29, 29, 11, 29,
387 29, 29, 29, 29, 7, 16, 29, 29, 29, 29,
388 29, 29, 29, 29, 29, 29, 29, 71, 51, 30,
ethannicholasb3058bd2016-07-01 08:22:01 -0700389
fmalitad214d6a2016-09-30 08:05:24 -0700390 76, 0, 0, 0, 78, 1, 0, 0, 3, 69,
391 70, 75, 29, 29, 29, 29, 29, 29, 9, 29,
392 29, 29, 29, 29, 29, 17, 29, 29, 29, 29,
393 29, 29, 74, 0, 1, 79, 0, 0, 2, 29,
394 29, 29, 29, 8, 29, 24, 29, 29, 29, 21,
395 29, 29, 29, 29, 29, 5, 29, 29, 0, 1,
396 12, 20, 29, 29, 6, 23, 18, 29, 29, 29,
397 29, 29, 29, 29, 10, 29, 29, 27, 29, 29,
398 29, 15, 26, 29, 29, 14, 22, 29, 29, 19,
399 13, 29, 29, 29, 28, 29, 29, 29, 25, 0
ethannicholasf789b382016-08-03 12:43:36 -0700400
ethannicholasb3058bd2016-07-01 08:22:01 -0700401 } ;
402
403static yyconst flex_int32_t yy_ec[256] =
404 { 0,
405 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
406 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 2, 4, 1, 5, 6, 7, 8, 1, 9,
fmalitad214d6a2016-09-30 08:05:24 -0700409 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
410 17, 17, 17, 17, 17, 17, 17, 18, 19, 20,
411 21, 22, 23, 1, 6, 6, 6, 6, 24, 6,
412 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
413 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
414 25, 1, 26, 27, 6, 1, 28, 29, 30, 31,
ethannicholasb3058bd2016-07-01 08:22:01 -0700415
fmalitad214d6a2016-09-30 08:05:24 -0700416 32, 33, 34, 35, 36, 6, 37, 38, 39, 40,
417 41, 42, 6, 43, 44, 45, 46, 47, 48, 6,
418 49, 6, 50, 51, 52, 1, 1, 1, 1, 1,
ethannicholasb3058bd2016-07-01 08:22:01 -0700419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1
433 } ;
434
fmalitad214d6a2016-09-30 08:05:24 -0700435static yyconst flex_int32_t yy_meta[53] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700436 { 0,
437 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
fmalitad214d6a2016-09-30 08:05:24 -0700438 1, 1, 1, 1, 1, 1, 4, 1, 1, 1,
439 1, 1, 1, 3, 1, 1, 1, 3, 3, 3,
440 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
441 3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
442 1, 1
ethannicholasb3058bd2016-07-01 08:22:01 -0700443 } ;
444
fmalitad214d6a2016-09-30 08:05:24 -0700445static yyconst flex_int16_t yy_base[206] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700446 { 0,
fmalitad214d6a2016-09-30 08:05:24 -0700447 0, 0, 238, 239, 51, 53, 216, 0, 0, 215,
448 49, 239, 239, 214, 46, 239, 45, 217, 52, 45,
449 239, 239, 44, 212, 50, 239, 239, 239, 53, 189,
450 190, 40, 192, 47, 193, 46, 50, 196, 186, 180,
451 182, 192, 178, 179, 181, 185, 239, 61, 239, 81,
452 239, 0, 0, 239, 198, 239, 239, 239, 239, 239,
453 239, 70, 207, 0, 239, 72, 75, 81, 196, 239,
454 239, 239, 195, 239, 194, 182, 173, 168, 0, 167,
455 172, 181, 165, 173, 0, 165, 156, 156, 172, 160,
456 156, 168, 154, 155, 151, 160, 159, 239, 173, 0,
ethannicholasb3058bd2016-07-01 08:22:01 -0700457
fmalitad214d6a2016-09-30 08:05:24 -0700458 239, 89, 182, 176, 0, 91, 97, 174, 173, 239,
459 239, 239, 161, 72, 158, 155, 142, 140, 0, 149,
460 137, 141, 139, 144, 147, 0, 148, 131, 130, 143,
461 141, 135, 239, 155, 154, 239, 107, 153, 152, 131,
462 122, 130, 137, 0, 132, 0, 121, 117, 115, 0,
463 114, 116, 122, 114, 126, 0, 114, 122, 136, 135,
464 0, 0, 111, 107, 0, 0, 0, 104, 109, 103,
465 102, 105, 99, 100, 0, 96, 110, 0, 98, 97,
466 102, 0, 0, 98, 102, 0, 0, 90, 79, 0,
467 0, 88, 73, 65, 0, 69, 53, 65, 0, 239,
ethannicholasf789b382016-08-03 12:43:36 -0700468
fmalitad214d6a2016-09-30 08:05:24 -0700469 58, 122, 124, 128, 132
ethannicholasb3058bd2016-07-01 08:22:01 -0700470 } ;
471
fmalitad214d6a2016-09-30 08:05:24 -0700472static yyconst flex_int16_t yy_def[206] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700473 { 0,
fmalitad214d6a2016-09-30 08:05:24 -0700474 200, 1, 200, 200, 200, 200, 200, 201, 202, 200,
475 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
476 200, 200, 200, 200, 200, 200, 200, 200, 200, 202,
477 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
478 202, 202, 202, 202, 202, 202, 200, 200, 200, 200,
479 200, 203, 202, 200, 200, 200, 200, 200, 200, 200,
480 200, 200, 204, 205, 200, 200, 200, 200, 200, 200,
481 200, 200, 200, 200, 200, 202, 202, 202, 202, 202,
482 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
483 202, 202, 202, 202, 202, 202, 202, 200, 200, 203,
ethannicholasb3058bd2016-07-01 08:22:01 -0700484
fmalitad214d6a2016-09-30 08:05:24 -0700485 200, 200, 204, 204, 205, 200, 200, 200, 200, 200,
486 200, 200, 202, 202, 202, 202, 202, 202, 202, 202,
487 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
488 202, 202, 200, 200, 200, 200, 200, 200, 200, 202,
489 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
490 202, 202, 202, 202, 202, 202, 202, 202, 200, 200,
491 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
492 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
493 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
494 202, 202, 202, 202, 202, 202, 202, 202, 202, 0,
ethannicholasf789b382016-08-03 12:43:36 -0700495
fmalitad214d6a2016-09-30 08:05:24 -0700496 200, 200, 200, 200, 200
ethannicholasb3058bd2016-07-01 08:22:01 -0700497 } ;
498
fmalitad214d6a2016-09-30 08:05:24 -0700499static yyconst flex_int16_t yy_nxt[292] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700500 { 0,
501 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
502 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
fmalitad214d6a2016-09-30 08:05:24 -0700503 24, 25, 26, 9, 27, 28, 29, 9, 30, 31,
504 32, 33, 34, 9, 35, 36, 9, 37, 38, 39,
505 40, 41, 42, 43, 44, 45, 9, 46, 9, 47,
506 48, 49, 50, 50, 50, 50, 55, 58, 60, 66,
507 52, 67, 63, 69, 70, 61, 59, 64, 68, 56,
508 72, 73, 65, 74, 81, 78, 68, 87, 85, 75,
509 79, 98, 50, 50, 82, 86, 62, 83, 106, 66,
510 88, 67, 108, 102, 108, 107, 199, 109, 68, 198,
ethannicholasb3058bd2016-07-01 08:22:01 -0700511
fmalitad214d6a2016-09-30 08:05:24 -0700512 134, 102, 134, 107, 197, 135, 68, 106, 138, 196,
513 138, 99, 195, 139, 137, 141, 142, 194, 159, 193,
514 159, 192, 137, 160, 53, 53, 100, 100, 103, 103,
515 103, 103, 105, 191, 105, 105, 190, 189, 188, 187,
516 186, 185, 184, 183, 182, 181, 180, 179, 178, 177,
517 176, 160, 160, 175, 174, 173, 172, 171, 170, 169,
518 168, 167, 166, 165, 164, 163, 162, 161, 139, 139,
519 135, 135, 158, 157, 156, 155, 154, 153, 152, 151,
520 150, 149, 148, 147, 146, 145, 144, 143, 140, 109,
521 109, 136, 104, 133, 132, 131, 130, 129, 128, 127,
ethannicholasb3058bd2016-07-01 08:22:01 -0700522
ethannicholas29111a32016-09-26 13:43:47 -0700523 126, 125, 124, 123, 122, 121, 120, 119, 118, 117,
fmalitad214d6a2016-09-30 08:05:24 -0700524 116, 115, 114, 113, 112, 111, 110, 104, 101, 97,
525 96, 95, 94, 93, 92, 91, 90, 89, 84, 80,
526 77, 76, 71, 62, 57, 54, 51, 200, 3, 200,
527 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
528 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
529 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
530 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
531 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
532 200
ethannicholasf789b382016-08-03 12:43:36 -0700533
ethannicholasb3058bd2016-07-01 08:22:01 -0700534 } ;
535
fmalitad214d6a2016-09-30 08:05:24 -0700536static yyconst flex_int16_t yy_chk[292] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700537 { 0,
538 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
539 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
540 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
541 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
542 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
fmalitad214d6a2016-09-30 08:05:24 -0700543 1, 1, 5, 5, 6, 6, 11, 15, 17, 20,
544 201, 20, 19, 23, 23, 17, 15, 19, 20, 11,
545 25, 25, 19, 29, 34, 32, 20, 37, 36, 29,
546 32, 48, 50, 50, 34, 36, 62, 34, 66, 67,
547 37, 67, 68, 62, 68, 66, 198, 68, 67, 197,
ethannicholasb3058bd2016-07-01 08:22:01 -0700548
fmalitad214d6a2016-09-30 08:05:24 -0700549 102, 62, 102, 66, 196, 102, 67, 106, 107, 194,
550 107, 48, 193, 107, 106, 114, 114, 192, 137, 189,
551 137, 188, 106, 137, 202, 202, 203, 203, 204, 204,
552 204, 204, 205, 185, 205, 205, 184, 181, 180, 179,
553 177, 176, 174, 173, 172, 171, 170, 169, 168, 164,
554 163, 160, 159, 158, 157, 155, 154, 153, 152, 151,
555 149, 148, 147, 145, 143, 142, 141, 140, 139, 138,
556 135, 134, 132, 131, 130, 129, 128, 127, 125, 124,
557 123, 122, 121, 120, 118, 117, 116, 115, 113, 109,
558 108, 104, 103, 99, 97, 96, 95, 94, 93, 92,
ethannicholasb3058bd2016-07-01 08:22:01 -0700559
fmalitad214d6a2016-09-30 08:05:24 -0700560 91, 90, 89, 88, 87, 86, 84, 83, 82, 81,
561 80, 78, 77, 76, 75, 73, 69, 63, 55, 46,
562 45, 44, 43, 42, 41, 40, 39, 38, 35, 33,
563 31, 30, 24, 18, 14, 10, 7, 3, 200, 200,
564 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
565 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
566 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
567 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
568 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
569 200
ethannicholasf789b382016-08-03 12:43:36 -0700570
ethannicholasb3058bd2016-07-01 08:22:01 -0700571 } ;
572
573/* Table of booleans, true if rule could match eol. */
fmalitad214d6a2016-09-30 08:05:24 -0700574static yyconst flex_int32_t yy_rule_can_match_eol[83] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700575 { 0,
5760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
fmalitad214d6a2016-09-30 08:05:24 -0700579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
580 1, 0, 0, };
ethannicholasb3058bd2016-07-01 08:22:01 -0700581
582/* The intent behind this definition is that it'll catch
583 * any uses of REJECT which flex missed.
584 */
585#define REJECT reject_used_but_not_detected
586#define yymore() yymore_used_but_not_detected
587#define YY_MORE_ADJ 0
588#define YY_RESTORE_YY_MORE_OFFSET
589#line 1 "sksl.flex"
590/*
591
592 This file is IGNORED during the build process!
593
594 As this file is updated so infrequently and flex is not universally present on build machines,
595 the lex.sksl.c file must be manually regenerated if you make any changes to this file. Just run:
596
597 flex sksl.flex
598
ethannicholasf789b382016-08-03 12:43:36 -0700599 You will have to manually add a copyright notice to the top of lex.sksl.c.
600
ethannicholasb3058bd2016-07-01 08:22:01 -0700601*/
602#define YY_NO_UNISTD_H 1
fmalitad214d6a2016-09-30 08:05:24 -0700603#line 598 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -0700604
605#define INITIAL 0
606
607#ifndef YY_NO_UNISTD_H
608/* Special case for "unistd.h", since it is non-ANSI. We include it way
609 * down here because we want the user's section 1 to have been scanned first.
610 * The user has a chance to override it with an option.
611 */
612#include <unistd.h>
613#endif
614
615#ifndef YY_EXTRA_TYPE
616#define YY_EXTRA_TYPE void *
617#endif
618
619/* Holds the entire state of the reentrant scanner. */
620struct yyguts_t
621 {
622
623 /* User-defined. Not touched by flex. */
624 YY_EXTRA_TYPE yyextra_r;
625
626 /* The rest are the same as the globals declared in the non-reentrant scanner. */
627 FILE *yyin_r, *yyout_r;
628 size_t yy_buffer_stack_top; /**< index of top of stack. */
629 size_t yy_buffer_stack_max; /**< capacity of stack. */
630 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
631 char yy_hold_char;
632 yy_size_t yy_n_chars;
633 yy_size_t yyleng_r;
634 char *yy_c_buf_p;
635 int yy_init;
636 int yy_start;
637 int yy_did_buffer_switch_on_eof;
638 int yy_start_stack_ptr;
639 int yy_start_stack_depth;
640 int *yy_start_stack;
641 yy_state_type yy_last_accepting_state;
642 char* yy_last_accepting_cpos;
643
644 int yylineno_r;
645 int yy_flex_debug_r;
646
647 char *yytext_r;
648 int yy_more_flag;
649 int yy_more_len;
650
651 }; /* end struct yyguts_t */
652
653static int yy_init_globals (yyscan_t yyscanner );
654
655int sksllex_init (yyscan_t* scanner);
656
657int sksllex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
658
659/* Accessor methods to globals.
660 These are made visible to non-reentrant scanners for convenience. */
661
662int sksllex_destroy (yyscan_t yyscanner );
663
664int skslget_debug (yyscan_t yyscanner );
665
666void skslset_debug (int debug_flag ,yyscan_t yyscanner );
667
668YY_EXTRA_TYPE skslget_extra (yyscan_t yyscanner );
669
670void skslset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
671
672FILE *skslget_in (yyscan_t yyscanner );
673
674void skslset_in (FILE * in_str ,yyscan_t yyscanner );
675
676FILE *skslget_out (yyscan_t yyscanner );
677
678void skslset_out (FILE * out_str ,yyscan_t yyscanner );
679
680yy_size_t skslget_leng (yyscan_t yyscanner );
681
682char *skslget_text (yyscan_t yyscanner );
683
684int skslget_lineno (yyscan_t yyscanner );
685
686void skslset_lineno (int line_number ,yyscan_t yyscanner );
687
fmalitad214d6a2016-09-30 08:05:24 -0700688int skslget_column (yyscan_t yyscanner );
689
690void skslset_column (int column_no ,yyscan_t yyscanner );
691
ethannicholasb3058bd2016-07-01 08:22:01 -0700692/* Macros after this point can all be overridden by user definitions in
693 * section 1.
694 */
695
696#ifndef YY_SKIP_YYWRAP
697#ifdef __cplusplus
698extern "C" int skslwrap (yyscan_t yyscanner );
699#else
700extern int skslwrap (yyscan_t yyscanner );
701#endif
702#endif
703
704 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
705
706#ifndef yytext_ptr
707static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
708#endif
709
710#ifdef YY_NEED_STRLEN
711static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
712#endif
713
714#ifndef YY_NO_INPUT
715
716#ifdef __cplusplus
717static int yyinput (yyscan_t yyscanner );
718#else
719static int input (yyscan_t yyscanner );
720#endif
721
722#endif
723
724/* Amount of stuff to slurp up with each read. */
725#ifndef YY_READ_BUF_SIZE
726#define YY_READ_BUF_SIZE 8192
727#endif
728
729/* Copy whatever the last rule matched to the standard output. */
730#ifndef ECHO
731/* This used to be an fputs(), but since the string might contain NUL's,
732 * we now use fwrite().
733 */
fmalitad214d6a2016-09-30 08:05:24 -0700734#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
ethannicholasb3058bd2016-07-01 08:22:01 -0700735#endif
736
737/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
738 * is returned in "result".
739 */
740#ifndef YY_INPUT
741#define YY_INPUT(buf,result,max_size) \
742 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
743 { \
744 int c = '*'; \
fmalitad214d6a2016-09-30 08:05:24 -0700745 size_t n; \
ethannicholasb3058bd2016-07-01 08:22:01 -0700746 for ( n = 0; n < max_size && \
747 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
748 buf[n] = (char) c; \
749 if ( c == '\n' ) \
750 buf[n++] = (char) c; \
751 if ( c == EOF && ferror( yyin ) ) \
752 YY_FATAL_ERROR( "input in flex scanner failed" ); \
753 result = n; \
754 } \
755 else \
756 { \
757 errno=0; \
758 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
759 { \
760 if( errno != EINTR) \
761 { \
762 YY_FATAL_ERROR( "input in flex scanner failed" ); \
763 break; \
764 } \
765 errno=0; \
766 clearerr(yyin); \
767 } \
768 }\
769\
770
771#endif
772
773/* No semi-colon after return; correct usage is to write "yyterminate();" -
774 * we don't want an extra ';' after the "return" because that will cause
775 * some compilers to complain about unreachable statements.
776 */
777#ifndef yyterminate
778#define yyterminate() return YY_NULL
779#endif
780
781/* Number of entries by which start-condition stack grows. */
782#ifndef YY_START_STACK_INCR
783#define YY_START_STACK_INCR 25
784#endif
785
786/* Report a fatal error. */
787#ifndef YY_FATAL_ERROR
788#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
789#endif
790
791/* end tables serialization structures and prototypes */
792
793/* Default declaration of generated scanner - a define so the user can
794 * easily add parameters.
795 */
796#ifndef YY_DECL
797#define YY_DECL_IS_OURS 1
798
799extern int sksllex (yyscan_t yyscanner);
800
801#define YY_DECL int sksllex (yyscan_t yyscanner)
802#endif /* !YY_DECL */
803
804/* Code executed at the beginning of each rule, after yytext and yyleng
805 * have been set up.
806 */
807#ifndef YY_USER_ACTION
808#define YY_USER_ACTION
809#endif
810
811/* Code executed at the end of each rule. */
812#ifndef YY_BREAK
813#define YY_BREAK break;
814#endif
815
816#define YY_RULE_SETUP \
817 YY_USER_ACTION
818
819/** The main scanner function which does all the work.
820 */
821YY_DECL
822{
823 register yy_state_type yy_current_state;
824 register char *yy_cp, *yy_bp;
825 register int yy_act;
826 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
827
ethannicholasf789b382016-08-03 12:43:36 -0700828#line 23 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -0700829
830
fmalitad214d6a2016-09-30 08:05:24 -0700831#line 826 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -0700832
833 if ( !yyg->yy_init )
834 {
835 yyg->yy_init = 1;
836
837#ifdef YY_USER_INIT
838 YY_USER_INIT;
839#endif
840
841 if ( ! yyg->yy_start )
842 yyg->yy_start = 1; /* first start state */
843
844 if ( ! yyin )
845 yyin = stdin;
846
847 if ( ! yyout )
848 yyout = stdout;
849
850 if ( ! YY_CURRENT_BUFFER ) {
851 skslensure_buffer_stack (yyscanner);
852 YY_CURRENT_BUFFER_LVALUE =
853 sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
854 }
855
856 sksl_load_buffer_state(yyscanner );
857 }
858
859 while ( 1 ) /* loops until end-of-file is reached */
860 {
861 yy_cp = yyg->yy_c_buf_p;
862
863 /* Support of yytext. */
864 *yy_cp = yyg->yy_hold_char;
865
866 /* yy_bp points to the position in yy_ch_buf of the start of
867 * the current run.
868 */
869 yy_bp = yy_cp;
870
871 yy_current_state = yyg->yy_start;
872yy_match:
873 do
874 {
875 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
876 if ( yy_accept[yy_current_state] )
877 {
878 yyg->yy_last_accepting_state = yy_current_state;
879 yyg->yy_last_accepting_cpos = yy_cp;
880 }
881 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
882 {
883 yy_current_state = (int) yy_def[yy_current_state];
fmalitad214d6a2016-09-30 08:05:24 -0700884 if ( yy_current_state >= 201 )
ethannicholasb3058bd2016-07-01 08:22:01 -0700885 yy_c = yy_meta[(unsigned int) yy_c];
886 }
887 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
888 ++yy_cp;
889 }
fmalitad214d6a2016-09-30 08:05:24 -0700890 while ( yy_current_state != 200 );
ethannicholasb3058bd2016-07-01 08:22:01 -0700891 yy_cp = yyg->yy_last_accepting_cpos;
892 yy_current_state = yyg->yy_last_accepting_state;
893
894yy_find_action:
895 yy_act = yy_accept[yy_current_state];
896
897 YY_DO_BEFORE_ACTION;
898
899 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
900 {
fmalitad214d6a2016-09-30 08:05:24 -0700901 int yyl;
ethannicholasb3058bd2016-07-01 08:22:01 -0700902 for ( yyl = 0; yyl < yyleng; ++yyl )
903 if ( yytext[yyl] == '\n' )
904
905 do{ yylineno++;
906 yycolumn=0;
907 }while(0)
908;
909 }
910
911do_action: /* This label is used only to access EOF actions. */
912
913 switch ( yy_act )
914 { /* beginning of action switch */
915 case 0: /* must back up */
916 /* undo the effects of YY_DO_BEFORE_ACTION */
917 *yy_cp = yyg->yy_hold_char;
918 yy_cp = yyg->yy_last_accepting_cpos;
919 yy_current_state = yyg->yy_last_accepting_state;
920 goto yy_find_action;
921
922case 1:
923YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700924#line 25 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -0700925{ return SkSL::Token::FLOAT_LITERAL; }
926 YY_BREAK
927case 2:
928YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700929#line 27 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -0700930{ return SkSL::Token::FLOAT_LITERAL; }
931 YY_BREAK
932case 3:
933YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700934#line 29 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -0700935{ return SkSL::Token::FLOAT_LITERAL; }
936 YY_BREAK
937case 4:
938YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700939#line 31 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -0700940{ return SkSL::Token::INT_LITERAL; }
941 YY_BREAK
942case 5:
943YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700944#line 33 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700945{ return SkSL::Token::TRUE_LITERAL; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700946 YY_BREAK
947case 6:
948YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700949#line 35 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700950{ return SkSL::Token::FALSE_LITERAL; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700951 YY_BREAK
952case 7:
953YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700954#line 37 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700955{ return SkSL::Token::IF; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700956 YY_BREAK
957case 8:
958YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700959#line 39 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700960{ return SkSL::Token::ELSE; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700961 YY_BREAK
962case 9:
963YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700964#line 41 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700965{ return SkSL::Token::FOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700966 YY_BREAK
967case 10:
968YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700969#line 43 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700970{ return SkSL::Token::WHILE; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700971 YY_BREAK
972case 11:
973YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700974#line 45 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700975{ return SkSL::Token::DO; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700976 YY_BREAK
977case 12:
978YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700979#line 47 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700980{ return SkSL::Token::BREAK; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700981 YY_BREAK
982case 13:
983YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700984#line 49 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700985{ return SkSL::Token::CONTINUE; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700986 YY_BREAK
987case 14:
988YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700989#line 51 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700990{ return SkSL::Token::DISCARD; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700991 YY_BREAK
992case 15:
993YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700994#line 53 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -0700995{ return SkSL::Token::RETURN; }
ethannicholasb3058bd2016-07-01 08:22:01 -0700996 YY_BREAK
997case 16:
998YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -0700999#line 55 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001000{ return SkSL::Token::IN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001001 YY_BREAK
1002case 17:
1003YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001004#line 57 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001005{ return SkSL::Token::OUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001006 YY_BREAK
1007case 18:
1008YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001009#line 59 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001010{ return SkSL::Token::INOUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001011 YY_BREAK
1012case 19:
1013YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001014#line 61 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001015{ return SkSL::Token::UNIFORM; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001016 YY_BREAK
1017case 20:
1018YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001019#line 63 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001020{ return SkSL::Token::CONST; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001021 YY_BREAK
1022case 21:
1023YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001024#line 65 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001025{ return SkSL::Token::LOWP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001026 YY_BREAK
1027case 22:
1028YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001029#line 67 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001030{ return SkSL::Token::MEDIUMP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001031 YY_BREAK
1032case 23:
1033YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001034#line 69 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001035{ return SkSL::Token::HIGHP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001036 YY_BREAK
1037case 24:
1038YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001039#line 71 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001040{ return SkSL::Token::FLAT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001041 YY_BREAK
1042case 25:
1043YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001044#line 73 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001045{ return SkSL::Token::NOPERSPECTIVE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001046 YY_BREAK
1047case 26:
1048YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001049#line 75 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001050{ return SkSL::Token::STRUCT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001051 YY_BREAK
1052case 27:
1053YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001054#line 77 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001055{ return SkSL::Token::LAYOUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001056 YY_BREAK
1057case 28:
1058YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001059#line 79 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001060{ return SkSL::Token::PRECISION; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001061 YY_BREAK
1062case 29:
1063YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001064#line 81 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001065{ return SkSL::Token::IDENTIFIER; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001066 YY_BREAK
1067case 30:
1068YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001069#line 83 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001070{ return SkSL::Token::DIRECTIVE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001071 YY_BREAK
1072case 31:
1073YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001074#line 85 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001075{ return SkSL::Token::LPAREN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001076 YY_BREAK
1077case 32:
1078YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001079#line 87 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001080{ return SkSL::Token::RPAREN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001081 YY_BREAK
1082case 33:
1083YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001084#line 89 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001085{ return SkSL::Token::LBRACE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001086 YY_BREAK
1087case 34:
1088YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001089#line 91 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001090{ return SkSL::Token::RBRACE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001091 YY_BREAK
1092case 35:
1093YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001094#line 93 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001095{ return SkSL::Token::LBRACKET; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001096 YY_BREAK
1097case 36:
1098YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001099#line 95 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001100{ return SkSL::Token::RBRACKET; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001101 YY_BREAK
1102case 37:
1103YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001104#line 97 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001105{ return SkSL::Token::DOT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001106 YY_BREAK
1107case 38:
1108YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001109#line 99 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001110{ return SkSL::Token::COMMA; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001111 YY_BREAK
1112case 39:
1113YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001114#line 101 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001115{ return SkSL::Token::PLUSPLUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001116 YY_BREAK
1117case 40:
1118YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001119#line 103 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001120{ return SkSL::Token::MINUSMINUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001121 YY_BREAK
1122case 41:
1123YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001124#line 105 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001125{ return SkSL::Token::PLUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001126 YY_BREAK
1127case 42:
1128YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001129#line 107 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001130{ return SkSL::Token::MINUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001131 YY_BREAK
1132case 43:
1133YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001134#line 109 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001135{ return SkSL::Token::STAR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001136 YY_BREAK
1137case 44:
1138YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001139#line 111 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001140{ return SkSL::Token::SLASH; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001141 YY_BREAK
1142case 45:
1143YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001144#line 113 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001145{ return SkSL::Token::PERCENT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001146 YY_BREAK
1147case 46:
1148YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001149#line 115 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001150{ return SkSL::Token::SHL; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001151 YY_BREAK
1152case 47:
1153YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001154#line 117 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001155{ return SkSL::Token::SHR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001156 YY_BREAK
1157case 48:
1158YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001159#line 119 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001160{ return SkSL::Token::BITWISEOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001161 YY_BREAK
1162case 49:
1163YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001164#line 121 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001165{ return SkSL::Token::BITWISEXOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001166 YY_BREAK
1167case 50:
1168YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001169#line 123 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001170{ return SkSL::Token::BITWISEAND; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001171 YY_BREAK
1172case 51:
1173YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001174#line 125 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001175{ return SkSL::Token::LOGICALOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001176 YY_BREAK
1177case 52:
1178YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001179#line 127 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001180{ return SkSL::Token::LOGICALXOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001181 YY_BREAK
1182case 53:
1183YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001184#line 129 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001185{ return SkSL::Token::LOGICALAND; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001186 YY_BREAK
1187case 54:
1188YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001189#line 131 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001190{ return SkSL::Token::NOT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001191 YY_BREAK
1192case 55:
1193YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001194#line 133 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001195{ return SkSL::Token::QUESTION; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001196 YY_BREAK
1197case 56:
1198YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001199#line 135 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001200{ return SkSL::Token::COLON; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001201 YY_BREAK
1202case 57:
1203YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001204#line 137 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001205{ return SkSL::Token::EQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001206 YY_BREAK
1207case 58:
1208YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001209#line 139 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001210{ return SkSL::Token::EQEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001211 YY_BREAK
1212case 59:
1213YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001214#line 141 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001215{ return SkSL::Token::NEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001216 YY_BREAK
1217case 60:
1218YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001219#line 143 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001220{ return SkSL::Token::GT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001221 YY_BREAK
1222case 61:
1223YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001224#line 145 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001225{ return SkSL::Token::LT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001226 YY_BREAK
1227case 62:
1228YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001229#line 147 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001230{ return SkSL::Token::GTEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001231 YY_BREAK
1232case 63:
1233YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001234#line 149 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001235{ return SkSL::Token::LTEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001236 YY_BREAK
1237case 64:
1238YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001239#line 151 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001240{ return SkSL::Token::PLUSEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001241 YY_BREAK
1242case 65:
1243YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001244#line 153 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001245{ return SkSL::Token::MINUSEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001246 YY_BREAK
1247case 66:
1248YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001249#line 155 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001250{ return SkSL::Token::STAREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001251 YY_BREAK
1252case 67:
1253YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001254#line 157 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001255{ return SkSL::Token::SLASHEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001256 YY_BREAK
1257case 68:
1258YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001259#line 159 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001260{ return SkSL::Token::PERCENTEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001261 YY_BREAK
1262case 69:
1263YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001264#line 161 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001265{ return SkSL::Token::SHLEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001266 YY_BREAK
1267case 70:
1268YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001269#line 163 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001270{ return SkSL::Token::SHREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001271 YY_BREAK
1272case 71:
1273YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001274#line 165 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001275{ return SkSL::Token::BITWISEOREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001276 YY_BREAK
1277case 72:
1278YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001279#line 167 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001280{ return SkSL::Token::BITWISEXOREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001281 YY_BREAK
1282case 73:
1283YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001284#line 169 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001285{ return SkSL::Token::BITWISEANDEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001286 YY_BREAK
1287case 74:
1288YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001289#line 171 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001290{ return SkSL::Token::LOGICALOREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001291 YY_BREAK
1292case 75:
1293YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001294#line 173 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001295{ return SkSL::Token::LOGICALXOREQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001296 YY_BREAK
1297case 76:
1298YY_RULE_SETUP
ethannicholasf789b382016-08-03 12:43:36 -07001299#line 175 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001300{ return SkSL::Token::LOGICALANDEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001301 YY_BREAK
1302case 77:
ethannicholasb3058bd2016-07-01 08:22:01 -07001303YY_RULE_SETUP
1304#line 177 "sksl.flex"
fmalitad214d6a2016-09-30 08:05:24 -07001305{ return SkSL::Token::SEMICOLON; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001306 YY_BREAK
ethannicholasf789b382016-08-03 12:43:36 -07001307case 78:
ethannicholasb3058bd2016-07-01 08:22:01 -07001308YY_RULE_SETUP
1309#line 179 "sksl.flex"
ethannicholasf008b0a2016-09-30 06:23:24 -07001310/* line comment */
ethannicholasf789b382016-08-03 12:43:36 -07001311 YY_BREAK
fmalitad214d6a2016-09-30 08:05:24 -07001312case 79:
1313/* rule 79 can match eol */
ethannicholasf789b382016-08-03 12:43:36 -07001314YY_RULE_SETUP
fmalitad214d6a2016-09-30 08:05:24 -07001315#line 181 "sksl.flex"
ethannicholasf008b0a2016-09-30 06:23:24 -07001316/* block comment */
ethannicholasf789b382016-08-03 12:43:36 -07001317 YY_BREAK
fmalitad214d6a2016-09-30 08:05:24 -07001318case 80:
1319/* rule 80 can match eol */
ethannicholasf789b382016-08-03 12:43:36 -07001320YY_RULE_SETUP
fmalitad214d6a2016-09-30 08:05:24 -07001321#line 183 "sksl.flex"
ethannicholasf008b0a2016-09-30 06:23:24 -07001322/* whitespace */
1323 YY_BREAK
fmalitad214d6a2016-09-30 08:05:24 -07001324case 81:
ethannicholasf008b0a2016-09-30 06:23:24 -07001325YY_RULE_SETUP
fmalitad214d6a2016-09-30 08:05:24 -07001326#line 185 "sksl.flex"
ethannicholasf008b0a2016-09-30 06:23:24 -07001327{ return SkSL::Token::INVALID_TOKEN; }
1328 YY_BREAK
fmalitad214d6a2016-09-30 08:05:24 -07001329case 82:
ethannicholasf008b0a2016-09-30 06:23:24 -07001330YY_RULE_SETUP
fmalitad214d6a2016-09-30 08:05:24 -07001331#line 187 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001332ECHO;
1333 YY_BREAK
fmalitad214d6a2016-09-30 08:05:24 -07001334#line 1329 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -07001335case YY_STATE_EOF(INITIAL):
1336 yyterminate();
1337
1338 case YY_END_OF_BUFFER:
1339 {
1340 /* Amount of text matched not including the EOB char. */
1341 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1342
1343 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1344 *yy_cp = yyg->yy_hold_char;
1345 YY_RESTORE_YY_MORE_OFFSET
1346
1347 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1348 {
1349 /* We're scanning a new file or input source. It's
1350 * possible that this happened because the user
1351 * just pointed yyin at a new source and called
1352 * sksllex(). If so, then we have to assure
1353 * consistency between YY_CURRENT_BUFFER and our
1354 * globals. Here is the right place to do so, because
1355 * this is the first action (other than possibly a
1356 * back-up) that will match for the new input source.
1357 */
1358 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1359 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1360 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1361 }
1362
1363 /* Note that here we test for yy_c_buf_p "<=" to the position
1364 * of the first EOB in the buffer, since yy_c_buf_p will
1365 * already have been incremented past the NUL character
1366 * (since all states make transitions on EOB to the
1367 * end-of-buffer state). Contrast this with the test
1368 * in input().
1369 */
1370 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1371 { /* This was really a NUL. */
1372 yy_state_type yy_next_state;
1373
1374 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1375
1376 yy_current_state = yy_get_previous_state( yyscanner );
1377
1378 /* Okay, we're now positioned to make the NUL
1379 * transition. We couldn't have
1380 * yy_get_previous_state() go ahead and do it
1381 * for us because it doesn't know how to deal
1382 * with the possibility of jamming (and we don't
1383 * want to build jamming into it because then it
1384 * will run more slowly).
1385 */
1386
1387 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1388
1389 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1390
1391 if ( yy_next_state )
1392 {
1393 /* Consume the NUL. */
1394 yy_cp = ++yyg->yy_c_buf_p;
1395 yy_current_state = yy_next_state;
1396 goto yy_match;
1397 }
1398
1399 else
1400 {
1401 yy_cp = yyg->yy_last_accepting_cpos;
1402 yy_current_state = yyg->yy_last_accepting_state;
1403 goto yy_find_action;
1404 }
1405 }
1406
1407 else switch ( yy_get_next_buffer( yyscanner ) )
1408 {
1409 case EOB_ACT_END_OF_FILE:
1410 {
1411 yyg->yy_did_buffer_switch_on_eof = 0;
1412
1413 if ( skslwrap(yyscanner ) )
1414 {
1415 /* Note: because we've taken care in
1416 * yy_get_next_buffer() to have set up
1417 * yytext, we can now set up
1418 * yy_c_buf_p so that if some total
1419 * hoser (like flex itself) wants to
1420 * call the scanner after we return the
1421 * YY_NULL, it'll still work - another
1422 * YY_NULL will get returned.
1423 */
1424 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1425
1426 yy_act = YY_STATE_EOF(YY_START);
1427 goto do_action;
1428 }
1429
1430 else
1431 {
1432 if ( ! yyg->yy_did_buffer_switch_on_eof )
1433 YY_NEW_FILE;
1434 }
1435 break;
1436 }
1437
1438 case EOB_ACT_CONTINUE_SCAN:
1439 yyg->yy_c_buf_p =
1440 yyg->yytext_ptr + yy_amount_of_matched_text;
1441
1442 yy_current_state = yy_get_previous_state( yyscanner );
1443
1444 yy_cp = yyg->yy_c_buf_p;
1445 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1446 goto yy_match;
1447
1448 case EOB_ACT_LAST_MATCH:
1449 yyg->yy_c_buf_p =
1450 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1451
1452 yy_current_state = yy_get_previous_state( yyscanner );
1453
1454 yy_cp = yyg->yy_c_buf_p;
1455 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1456 goto yy_find_action;
1457 }
1458 break;
1459 }
1460
1461 default:
1462 YY_FATAL_ERROR(
1463 "fatal flex scanner internal error--no action found" );
1464 } /* end of action switch */
1465 } /* end of scanning one token */
1466} /* end of sksllex */
1467
1468/* yy_get_next_buffer - try to read in a new buffer
1469 *
1470 * Returns a code representing an action:
1471 * EOB_ACT_LAST_MATCH -
1472 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1473 * EOB_ACT_END_OF_FILE - end of file
1474 */
1475static int yy_get_next_buffer (yyscan_t yyscanner)
1476{
1477 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1478 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1479 register char *source = yyg->yytext_ptr;
1480 register int number_to_move, i;
1481 int ret_val;
1482
1483 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1484 YY_FATAL_ERROR(
1485 "fatal flex scanner internal error--end of buffer missed" );
1486
1487 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1488 { /* Don't try to fill the buffer, so this is an EOF. */
1489 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1490 {
1491 /* We matched a single character, the EOB, so
1492 * treat this as a final EOF.
1493 */
1494 return EOB_ACT_END_OF_FILE;
1495 }
1496
1497 else
1498 {
1499 /* We matched some text prior to the EOB, first
1500 * process it.
1501 */
1502 return EOB_ACT_LAST_MATCH;
1503 }
1504 }
1505
1506 /* Try to read more data. */
1507
1508 /* First move last chars to start of buffer. */
1509 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1510
1511 for ( i = 0; i < number_to_move; ++i )
1512 *(dest++) = *(source++);
1513
1514 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1515 /* don't do the read, it's not guaranteed to return an EOF,
1516 * just force an EOF
1517 */
1518 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1519
1520 else
1521 {
1522 yy_size_t num_to_read =
1523 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1524
1525 while ( num_to_read <= 0 )
1526 { /* Not enough room in the buffer - grow it. */
1527
1528 /* just a shorter name for the current buffer */
fmalitad214d6a2016-09-30 08:05:24 -07001529 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
ethannicholasb3058bd2016-07-01 08:22:01 -07001530
1531 int yy_c_buf_p_offset =
1532 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1533
1534 if ( b->yy_is_our_buffer )
1535 {
1536 yy_size_t new_size = b->yy_buf_size * 2;
1537
1538 if ( new_size <= 0 )
1539 b->yy_buf_size += b->yy_buf_size / 8;
1540 else
1541 b->yy_buf_size *= 2;
1542
1543 b->yy_ch_buf = (char *)
1544 /* Include room in for 2 EOB chars. */
1545 skslrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1546 }
1547 else
1548 /* Can't grow it, we don't own it. */
1549 b->yy_ch_buf = 0;
1550
1551 if ( ! b->yy_ch_buf )
1552 YY_FATAL_ERROR(
1553 "fatal error - scanner input buffer overflow" );
1554
1555 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1556
1557 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1558 number_to_move - 1;
1559
1560 }
1561
1562 if ( num_to_read > YY_READ_BUF_SIZE )
1563 num_to_read = YY_READ_BUF_SIZE;
1564
1565 /* Read in more data. */
1566 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1567 yyg->yy_n_chars, num_to_read );
1568
1569 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1570 }
1571
1572 if ( yyg->yy_n_chars == 0 )
1573 {
1574 if ( number_to_move == YY_MORE_ADJ )
1575 {
1576 ret_val = EOB_ACT_END_OF_FILE;
1577 skslrestart(yyin ,yyscanner);
1578 }
1579
1580 else
1581 {
1582 ret_val = EOB_ACT_LAST_MATCH;
1583 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1584 YY_BUFFER_EOF_PENDING;
1585 }
1586 }
1587
1588 else
1589 ret_val = EOB_ACT_CONTINUE_SCAN;
1590
1591 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1592 /* Extend the array by 50%, plus the number we really need. */
1593 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1594 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) skslrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1595 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1596 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1597 }
1598
1599 yyg->yy_n_chars += number_to_move;
1600 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1601 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1602
1603 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1604
1605 return ret_val;
1606}
1607
1608/* yy_get_previous_state - get the state just before the EOB char was reached */
1609
1610 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1611{
1612 register yy_state_type yy_current_state;
1613 register char *yy_cp;
1614 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1615
1616 yy_current_state = yyg->yy_start;
1617
1618 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1619 {
1620 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1621 if ( yy_accept[yy_current_state] )
1622 {
1623 yyg->yy_last_accepting_state = yy_current_state;
1624 yyg->yy_last_accepting_cpos = yy_cp;
1625 }
1626 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1627 {
1628 yy_current_state = (int) yy_def[yy_current_state];
fmalitad214d6a2016-09-30 08:05:24 -07001629 if ( yy_current_state >= 201 )
ethannicholasb3058bd2016-07-01 08:22:01 -07001630 yy_c = yy_meta[(unsigned int) yy_c];
1631 }
1632 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1633 }
1634
1635 return yy_current_state;
1636}
1637
1638/* yy_try_NUL_trans - try to make a transition on the NUL character
1639 *
1640 * synopsis
1641 * next_state = yy_try_NUL_trans( current_state );
1642 */
1643 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1644{
1645 register int yy_is_jam;
1646 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1647 register char *yy_cp = yyg->yy_c_buf_p;
1648
1649 register YY_CHAR yy_c = 1;
1650 if ( yy_accept[yy_current_state] )
1651 {
1652 yyg->yy_last_accepting_state = yy_current_state;
1653 yyg->yy_last_accepting_cpos = yy_cp;
1654 }
1655 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1656 {
1657 yy_current_state = (int) yy_def[yy_current_state];
fmalitad214d6a2016-09-30 08:05:24 -07001658 if ( yy_current_state >= 201 )
ethannicholasb3058bd2016-07-01 08:22:01 -07001659 yy_c = yy_meta[(unsigned int) yy_c];
1660 }
1661 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
fmalitad214d6a2016-09-30 08:05:24 -07001662 yy_is_jam = (yy_current_state == 200);
ethannicholasb3058bd2016-07-01 08:22:01 -07001663
fmalitad214d6a2016-09-30 08:05:24 -07001664 (void)yyg;
ethannicholasb3058bd2016-07-01 08:22:01 -07001665 return yy_is_jam ? 0 : yy_current_state;
1666}
1667
1668 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1669{
1670 register char *yy_cp;
1671 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1672
1673 yy_cp = yyg->yy_c_buf_p;
1674
1675 /* undo effects of setting up yytext */
1676 *yy_cp = yyg->yy_hold_char;
1677
1678 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1679 { /* need to shift things up to make room */
1680 /* +2 for EOB chars. */
1681 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
1682 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1683 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1684 register char *source =
1685 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1686
1687 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1688 *--dest = *--source;
1689
1690 yy_cp += (int) (dest - source);
1691 yy_bp += (int) (dest - source);
1692 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1693 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1694
1695 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1696 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1697 }
1698
1699 *--yy_cp = (char) c;
1700
1701 if ( c == '\n' ){
1702 --yylineno;
1703 }
1704
1705 yyg->yytext_ptr = yy_bp;
1706 yyg->yy_hold_char = *yy_cp;
1707 yyg->yy_c_buf_p = yy_cp;
1708}
1709
1710#ifndef YY_NO_INPUT
1711#ifdef __cplusplus
1712 static int yyinput (yyscan_t yyscanner)
1713#else
1714 static int input (yyscan_t yyscanner)
1715#endif
1716
1717{
1718 int c;
1719 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1720
1721 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1722
1723 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1724 {
1725 /* yy_c_buf_p now points to the character we want to return.
1726 * If this occurs *before* the EOB characters, then it's a
1727 * valid NUL; if not, then we've hit the end of the buffer.
1728 */
1729 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1730 /* This was really a NUL. */
1731 *yyg->yy_c_buf_p = '\0';
1732
1733 else
1734 { /* need more input */
1735 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1736 ++yyg->yy_c_buf_p;
1737
1738 switch ( yy_get_next_buffer( yyscanner ) )
1739 {
1740 case EOB_ACT_LAST_MATCH:
1741 /* This happens because yy_g_n_b()
1742 * sees that we've accumulated a
1743 * token and flags that we need to
1744 * try matching the token before
1745 * proceeding. But for input(),
1746 * there's no matching to consider.
1747 * So convert the EOB_ACT_LAST_MATCH
1748 * to EOB_ACT_END_OF_FILE.
1749 */
1750
1751 /* Reset buffer status. */
1752 skslrestart(yyin ,yyscanner);
1753
1754 /*FALLTHROUGH*/
1755
1756 case EOB_ACT_END_OF_FILE:
1757 {
1758 if ( skslwrap(yyscanner ) )
fmalitad214d6a2016-09-30 08:05:24 -07001759 return EOF;
ethannicholasb3058bd2016-07-01 08:22:01 -07001760
1761 if ( ! yyg->yy_did_buffer_switch_on_eof )
1762 YY_NEW_FILE;
1763#ifdef __cplusplus
1764 return yyinput(yyscanner);
1765#else
1766 return input(yyscanner);
1767#endif
1768 }
1769
1770 case EOB_ACT_CONTINUE_SCAN:
1771 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1772 break;
1773 }
1774 }
1775 }
1776
1777 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1778 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1779 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1780
1781 if ( c == '\n' )
1782
1783 do{ yylineno++;
1784 yycolumn=0;
1785 }while(0)
1786;
1787
1788 return c;
1789}
1790#endif /* ifndef YY_NO_INPUT */
1791
1792/** Immediately switch to a different input stream.
1793 * @param input_file A readable stream.
1794 * @param yyscanner The scanner object.
1795 * @note This function does not reset the start condition to @c INITIAL .
1796 */
1797 void skslrestart (FILE * input_file , yyscan_t yyscanner)
1798{
1799 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1800
1801 if ( ! YY_CURRENT_BUFFER ){
1802 skslensure_buffer_stack (yyscanner);
1803 YY_CURRENT_BUFFER_LVALUE =
1804 sksl_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1805 }
1806
1807 sksl_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1808 sksl_load_buffer_state(yyscanner );
1809}
1810
1811/** Switch to a different input buffer.
1812 * @param new_buffer The new input buffer.
1813 * @param yyscanner The scanner object.
1814 */
1815 void sksl_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1816{
1817 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1818
1819 /* TODO. We should be able to replace this entire function body
1820 * with
1821 * skslpop_buffer_state();
1822 * skslpush_buffer_state(new_buffer);
1823 */
1824 skslensure_buffer_stack (yyscanner);
1825 if ( YY_CURRENT_BUFFER == new_buffer )
1826 return;
1827
1828 if ( YY_CURRENT_BUFFER )
1829 {
1830 /* Flush out information for old buffer. */
1831 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1832 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1833 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1834 }
1835
1836 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1837 sksl_load_buffer_state(yyscanner );
1838
1839 /* We don't actually know whether we did this switch during
1840 * EOF (skslwrap()) processing, but the only time this flag
1841 * is looked at is after skslwrap() is called, so it's safe
1842 * to go ahead and always set it.
1843 */
1844 yyg->yy_did_buffer_switch_on_eof = 1;
1845}
1846
1847static void sksl_load_buffer_state (yyscan_t yyscanner)
1848{
1849 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1850 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1851 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1852 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1853 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1854}
1855
1856/** Allocate and initialize an input buffer state.
1857 * @param file A readable stream.
1858 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1859 * @param yyscanner The scanner object.
1860 * @return the allocated buffer state.
1861 */
1862 YY_BUFFER_STATE sksl_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1863{
1864 YY_BUFFER_STATE b;
1865
1866 b = (YY_BUFFER_STATE) skslalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1867 if ( ! b )
1868 YY_FATAL_ERROR( "out of dynamic memory in sksl_create_buffer()" );
1869
1870 b->yy_buf_size = size;
1871
1872 /* yy_ch_buf has to be 2 characters longer than the size given because
1873 * we need to put in 2 end-of-buffer characters.
1874 */
1875 b->yy_ch_buf = (char *) skslalloc(b->yy_buf_size + 2 ,yyscanner );
1876 if ( ! b->yy_ch_buf )
1877 YY_FATAL_ERROR( "out of dynamic memory in sksl_create_buffer()" );
1878
1879 b->yy_is_our_buffer = 1;
1880
1881 sksl_init_buffer(b,file ,yyscanner);
1882
1883 return b;
1884}
1885
1886/** Destroy the buffer.
1887 * @param b a buffer created with sksl_create_buffer()
1888 * @param yyscanner The scanner object.
1889 */
1890 void sksl_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1891{
1892 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1893
1894 if ( ! b )
1895 return;
1896
1897 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1898 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1899
1900 if ( b->yy_is_our_buffer )
1901 skslfree((void *) b->yy_ch_buf ,yyscanner );
1902
1903 skslfree((void *) b ,yyscanner );
1904}
1905
1906/* Initializes or reinitializes a buffer.
1907 * This function is sometimes called more than once on the same buffer,
1908 * such as during a skslrestart() or at EOF.
1909 */
1910 static void sksl_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1911
1912{
1913 int oerrno = errno;
1914 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1915
1916 sksl_flush_buffer(b ,yyscanner);
1917
1918 b->yy_input_file = file;
1919 b->yy_fill_buffer = 1;
1920
1921 /* If b is the current buffer, then sksl_init_buffer was _probably_
1922 * called from skslrestart() or through yy_get_next_buffer.
1923 * In that case, we don't want to reset the lineno or column.
1924 */
1925 if (b != YY_CURRENT_BUFFER){
1926 b->yy_bs_lineno = 1;
1927 b->yy_bs_column = 0;
1928 }
1929
1930 b->yy_is_interactive = 0;
1931
1932 errno = oerrno;
1933}
1934
1935/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1936 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1937 * @param yyscanner The scanner object.
1938 */
1939 void sksl_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1940{
1941 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1942 if ( ! b )
1943 return;
1944
1945 b->yy_n_chars = 0;
1946
1947 /* We always need two end-of-buffer characters. The first causes
1948 * a transition to the end-of-buffer state. The second causes
1949 * a jam in that state.
1950 */
1951 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1952 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1953
1954 b->yy_buf_pos = &b->yy_ch_buf[0];
1955
1956 b->yy_at_bol = 1;
1957 b->yy_buffer_status = YY_BUFFER_NEW;
1958
1959 if ( b == YY_CURRENT_BUFFER )
1960 sksl_load_buffer_state(yyscanner );
1961}
1962
1963/** Pushes the new state onto the stack. The new state becomes
1964 * the current state. This function will allocate the stack
1965 * if necessary.
1966 * @param new_buffer The new state.
1967 * @param yyscanner The scanner object.
1968 */
1969void skslpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1970{
1971 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1972 if (new_buffer == NULL)
1973 return;
1974
1975 skslensure_buffer_stack(yyscanner);
1976
1977 /* This block is copied from sksl_switch_to_buffer. */
1978 if ( YY_CURRENT_BUFFER )
1979 {
1980 /* Flush out information for old buffer. */
1981 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1982 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1983 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1984 }
1985
1986 /* Only push if top exists. Otherwise, replace top. */
1987 if (YY_CURRENT_BUFFER)
1988 yyg->yy_buffer_stack_top++;
1989 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1990
1991 /* copied from sksl_switch_to_buffer. */
1992 sksl_load_buffer_state(yyscanner );
1993 yyg->yy_did_buffer_switch_on_eof = 1;
1994}
1995
1996/** Removes and deletes the top of the stack, if present.
1997 * The next element becomes the new top.
1998 * @param yyscanner The scanner object.
1999 */
2000void skslpop_buffer_state (yyscan_t yyscanner)
2001{
2002 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2003 if (!YY_CURRENT_BUFFER)
2004 return;
2005
2006 sksl_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2007 YY_CURRENT_BUFFER_LVALUE = NULL;
2008 if (yyg->yy_buffer_stack_top > 0)
2009 --yyg->yy_buffer_stack_top;
2010
2011 if (YY_CURRENT_BUFFER) {
2012 sksl_load_buffer_state(yyscanner );
2013 yyg->yy_did_buffer_switch_on_eof = 1;
2014 }
2015}
2016
2017/* Allocates the stack if it does not exist.
2018 * Guarantees space for at least one push.
2019 */
2020static void skslensure_buffer_stack (yyscan_t yyscanner)
2021{
2022 yy_size_t num_to_alloc;
2023 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2024
2025 if (!yyg->yy_buffer_stack) {
2026
2027 /* First allocation is just for 2 elements, since we don't know if this
2028 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2029 * immediate realloc on the next call.
2030 */
2031 num_to_alloc = 1;
2032 yyg->yy_buffer_stack = (struct yy_buffer_state**)skslalloc
2033 (num_to_alloc * sizeof(struct yy_buffer_state*)
2034 , yyscanner);
2035 if ( ! yyg->yy_buffer_stack )
2036 YY_FATAL_ERROR( "out of dynamic memory in skslensure_buffer_stack()" );
2037
2038 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2039
2040 yyg->yy_buffer_stack_max = num_to_alloc;
2041 yyg->yy_buffer_stack_top = 0;
2042 return;
2043 }
2044
2045 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2046
2047 /* Increase the buffer to prepare for a possible push. */
2048 int grow_size = 8 /* arbitrary grow size */;
2049
2050 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2051 yyg->yy_buffer_stack = (struct yy_buffer_state**)skslrealloc
2052 (yyg->yy_buffer_stack,
2053 num_to_alloc * sizeof(struct yy_buffer_state*)
2054 , yyscanner);
2055 if ( ! yyg->yy_buffer_stack )
2056 YY_FATAL_ERROR( "out of dynamic memory in skslensure_buffer_stack()" );
2057
2058 /* zero only the new slots.*/
2059 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2060 yyg->yy_buffer_stack_max = num_to_alloc;
2061 }
2062}
2063
2064/** Setup the input buffer state to scan directly from a user-specified character buffer.
2065 * @param base the character buffer
2066 * @param size the size in bytes of the character buffer
2067 * @param yyscanner The scanner object.
2068 * @return the newly allocated buffer state object.
2069 */
2070YY_BUFFER_STATE sksl_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2071{
2072 YY_BUFFER_STATE b;
2073
2074 if ( size < 2 ||
2075 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2076 base[size-1] != YY_END_OF_BUFFER_CHAR )
2077 /* They forgot to leave room for the EOB's. */
2078 return 0;
2079
2080 b = (YY_BUFFER_STATE) skslalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2081 if ( ! b )
2082 YY_FATAL_ERROR( "out of dynamic memory in sksl_scan_buffer()" );
2083
2084 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2085 b->yy_buf_pos = b->yy_ch_buf = base;
2086 b->yy_is_our_buffer = 0;
2087 b->yy_input_file = 0;
2088 b->yy_n_chars = b->yy_buf_size;
2089 b->yy_is_interactive = 0;
2090 b->yy_at_bol = 1;
2091 b->yy_fill_buffer = 0;
2092 b->yy_buffer_status = YY_BUFFER_NEW;
2093
2094 sksl_switch_to_buffer(b ,yyscanner );
2095
2096 return b;
2097}
2098
2099/** Setup the input buffer state to scan a string. The next call to sksllex() will
2100 * scan from a @e copy of @a str.
2101 * @param yystr a NUL-terminated string to scan
2102 * @param yyscanner The scanner object.
2103 * @return the newly allocated buffer state object.
2104 * @note If you want to scan bytes that may contain NUL values, then use
2105 * sksl_scan_bytes() instead.
2106 */
2107YY_BUFFER_STATE sksl_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2108{
2109
2110 return sksl_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2111}
2112
2113/** Setup the input buffer state to scan the given bytes. The next call to sksllex() will
2114 * scan from a @e copy of @a bytes.
fmalitad214d6a2016-09-30 08:05:24 -07002115 * @param yybytes the byte buffer to scan
2116 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
ethannicholasb3058bd2016-07-01 08:22:01 -07002117 * @param yyscanner The scanner object.
2118 * @return the newly allocated buffer state object.
2119 */
2120YY_BUFFER_STATE sksl_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
2121{
2122 YY_BUFFER_STATE b;
2123 char *buf;
fmalitad214d6a2016-09-30 08:05:24 -07002124 yy_size_t n;
2125 int i;
ethannicholasb3058bd2016-07-01 08:22:01 -07002126
2127 /* Get memory for full buffer, including space for trailing EOB's. */
2128 n = _yybytes_len + 2;
2129 buf = (char *) skslalloc(n ,yyscanner );
2130 if ( ! buf )
2131 YY_FATAL_ERROR( "out of dynamic memory in sksl_scan_bytes()" );
2132
2133 for ( i = 0; i < _yybytes_len; ++i )
2134 buf[i] = yybytes[i];
2135
2136 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2137
2138 b = sksl_scan_buffer(buf,n ,yyscanner);
2139 if ( ! b )
2140 YY_FATAL_ERROR( "bad buffer in sksl_scan_bytes()" );
2141
2142 /* It's okay to grow etc. this buffer, and we should throw it
2143 * away when we're done.
2144 */
2145 b->yy_is_our_buffer = 1;
2146
2147 return b;
2148}
2149
2150#ifndef YY_EXIT_FAILURE
2151#define YY_EXIT_FAILURE 2
2152#endif
2153
2154static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2155{
2156 (void) fprintf( stderr, "%s\n", msg );
2157 exit( YY_EXIT_FAILURE );
2158}
2159
2160/* Redefine yyless() so it works in section 3 code. */
2161
2162#undef yyless
2163#define yyless(n) \
2164 do \
2165 { \
2166 /* Undo effects of setting up yytext. */ \
2167 int yyless_macro_arg = (n); \
2168 YY_LESS_LINENO(yyless_macro_arg);\
2169 yytext[yyleng] = yyg->yy_hold_char; \
2170 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2171 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2172 *yyg->yy_c_buf_p = '\0'; \
2173 yyleng = yyless_macro_arg; \
2174 } \
2175 while ( 0 )
2176
2177/* Accessor methods (get/set functions) to struct members. */
2178
2179/** Get the user-defined data for this scanner.
2180 * @param yyscanner The scanner object.
2181 */
2182YY_EXTRA_TYPE skslget_extra (yyscan_t yyscanner)
2183{
2184 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2185 return yyextra;
2186}
2187
2188/** Get the current line number.
2189 * @param yyscanner The scanner object.
2190 */
2191int skslget_lineno (yyscan_t yyscanner)
2192{
2193 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2194
2195 if (! YY_CURRENT_BUFFER)
2196 return 0;
2197
2198 return yylineno;
2199}
2200
2201/** Get the current column number.
2202 * @param yyscanner The scanner object.
2203 */
2204int skslget_column (yyscan_t yyscanner)
2205{
2206 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2207
2208 if (! YY_CURRENT_BUFFER)
2209 return 0;
2210
2211 return yycolumn;
2212}
2213
2214/** Get the input stream.
2215 * @param yyscanner The scanner object.
2216 */
2217FILE *skslget_in (yyscan_t yyscanner)
2218{
2219 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2220 return yyin;
2221}
2222
2223/** Get the output stream.
2224 * @param yyscanner The scanner object.
2225 */
2226FILE *skslget_out (yyscan_t yyscanner)
2227{
2228 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2229 return yyout;
2230}
2231
2232/** Get the length of the current token.
2233 * @param yyscanner The scanner object.
2234 */
2235yy_size_t skslget_leng (yyscan_t yyscanner)
2236{
2237 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2238 return yyleng;
2239}
2240
2241/** Get the current token.
2242 * @param yyscanner The scanner object.
2243 */
2244
2245char *skslget_text (yyscan_t yyscanner)
2246{
2247 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2248 return yytext;
2249}
2250
2251/** Set the user-defined data. This data is never touched by the scanner.
2252 * @param user_defined The data to be associated with this scanner.
2253 * @param yyscanner The scanner object.
2254 */
2255void skslset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2256{
2257 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2258 yyextra = user_defined ;
2259}
2260
2261/** Set the current line number.
2262 * @param line_number
2263 * @param yyscanner The scanner object.
2264 */
2265void skslset_lineno (int line_number , yyscan_t yyscanner)
2266{
2267 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2268
2269 /* lineno is only valid if an input buffer exists. */
2270 if (! YY_CURRENT_BUFFER )
fmalitad214d6a2016-09-30 08:05:24 -07002271 YY_FATAL_ERROR( "skslset_lineno called with no buffer" );
ethannicholasb3058bd2016-07-01 08:22:01 -07002272
2273 yylineno = line_number;
2274}
2275
2276/** Set the current column.
2277 * @param line_number
2278 * @param yyscanner The scanner object.
2279 */
2280void skslset_column (int column_no , yyscan_t yyscanner)
2281{
2282 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2283
2284 /* column is only valid if an input buffer exists. */
2285 if (! YY_CURRENT_BUFFER )
fmalitad214d6a2016-09-30 08:05:24 -07002286 YY_FATAL_ERROR( "skslset_column called with no buffer" );
ethannicholasb3058bd2016-07-01 08:22:01 -07002287
2288 yycolumn = column_no;
2289}
2290
2291/** Set the input stream. This does not discard the current
2292 * input buffer.
2293 * @param in_str A readable stream.
2294 * @param yyscanner The scanner object.
2295 * @see sksl_switch_to_buffer
2296 */
2297void skslset_in (FILE * in_str , yyscan_t yyscanner)
2298{
2299 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2300 yyin = in_str ;
2301}
2302
2303void skslset_out (FILE * out_str , yyscan_t yyscanner)
2304{
2305 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2306 yyout = out_str ;
2307}
2308
2309int skslget_debug (yyscan_t yyscanner)
2310{
2311 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2312 return yy_flex_debug;
2313}
2314
2315void skslset_debug (int bdebug , yyscan_t yyscanner)
2316{
2317 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2318 yy_flex_debug = bdebug ;
2319}
2320
2321/* Accessor methods for yylval and yylloc */
2322
2323/* User-visible API */
2324
2325/* sksllex_init is special because it creates the scanner itself, so it is
2326 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2327 * That's why we explicitly handle the declaration, instead of using our macros.
2328 */
2329
2330int sksllex_init(yyscan_t* ptr_yy_globals)
2331
2332{
2333 if (ptr_yy_globals == NULL){
2334 errno = EINVAL;
2335 return 1;
2336 }
2337
2338 *ptr_yy_globals = (yyscan_t) skslalloc ( sizeof( struct yyguts_t ), NULL );
2339
2340 if (*ptr_yy_globals == NULL){
2341 errno = ENOMEM;
2342 return 1;
2343 }
2344
2345 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2346 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2347
2348 return yy_init_globals ( *ptr_yy_globals );
2349}
2350
2351/* sksllex_init_extra has the same functionality as sksllex_init, but follows the
2352 * convention of taking the scanner as the last argument. Note however, that
2353 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2354 * is the reason, too, why this function also must handle its own declaration).
2355 * The user defined value in the first argument will be available to skslalloc in
2356 * the yyextra field.
2357 */
2358
2359int sksllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2360
2361{
2362 struct yyguts_t dummy_yyguts;
2363
2364 skslset_extra (yy_user_defined, &dummy_yyguts);
2365
2366 if (ptr_yy_globals == NULL){
2367 errno = EINVAL;
2368 return 1;
2369 }
2370
2371 *ptr_yy_globals = (yyscan_t) skslalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2372
2373 if (*ptr_yy_globals == NULL){
2374 errno = ENOMEM;
2375 return 1;
2376 }
2377
2378 /* By setting to 0xAA, we expose bugs in
2379 yy_init_globals. Leave at 0x00 for releases. */
2380 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2381
2382 skslset_extra (yy_user_defined, *ptr_yy_globals);
2383
2384 return yy_init_globals ( *ptr_yy_globals );
2385}
2386
2387static int yy_init_globals (yyscan_t yyscanner)
2388{
2389 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2390 /* Initialization is the same as for the non-reentrant scanner.
2391 * This function is called from sksllex_destroy(), so don't allocate here.
2392 */
2393
2394 yyg->yy_buffer_stack = 0;
2395 yyg->yy_buffer_stack_top = 0;
2396 yyg->yy_buffer_stack_max = 0;
2397 yyg->yy_c_buf_p = (char *) 0;
2398 yyg->yy_init = 0;
2399 yyg->yy_start = 0;
2400
2401 yyg->yy_start_stack_ptr = 0;
2402 yyg->yy_start_stack_depth = 0;
2403 yyg->yy_start_stack = NULL;
2404
2405/* Defined in main.c */
2406#ifdef YY_STDINIT
2407 yyin = stdin;
2408 yyout = stdout;
2409#else
2410 yyin = (FILE *) 0;
2411 yyout = (FILE *) 0;
2412#endif
2413
2414 /* For future reference: Set errno on error, since we are called by
2415 * sksllex_init()
2416 */
2417 return 0;
2418}
2419
2420/* sksllex_destroy is for both reentrant and non-reentrant scanners. */
2421int sksllex_destroy (yyscan_t yyscanner)
2422{
2423 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2424
2425 /* Pop the buffer stack, destroying each element. */
2426 while(YY_CURRENT_BUFFER){
2427 sksl_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2428 YY_CURRENT_BUFFER_LVALUE = NULL;
2429 skslpop_buffer_state(yyscanner);
2430 }
2431
2432 /* Destroy the stack itself. */
2433 skslfree(yyg->yy_buffer_stack ,yyscanner);
2434 yyg->yy_buffer_stack = NULL;
2435
2436 /* Destroy the start condition stack. */
2437 skslfree(yyg->yy_start_stack ,yyscanner );
2438 yyg->yy_start_stack = NULL;
2439
2440 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2441 * sksllex() is called, initialization will occur. */
2442 yy_init_globals( yyscanner);
2443
2444 /* Destroy the main struct (reentrant only). */
2445 skslfree ( yyscanner , yyscanner );
2446 yyscanner = NULL;
2447 return 0;
2448}
2449
2450/*
2451 * Internal utility routines.
2452 */
2453
2454#ifndef yytext_ptr
2455static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2456{
2457 register int i;
2458 for ( i = 0; i < n; ++i )
2459 s1[i] = s2[i];
2460}
2461#endif
2462
2463#ifdef YY_NEED_STRLEN
2464static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2465{
2466 register int n;
2467 for ( n = 0; s[n]; ++n )
2468 ;
2469
2470 return n;
2471}
2472#endif
2473
2474void *skslalloc (yy_size_t size , yyscan_t yyscanner)
2475{
2476 return (void *) malloc( size );
2477}
2478
2479void *skslrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2480{
2481 /* The cast to (char *) in the following accommodates both
2482 * implementations that use char* generic pointers, and those
2483 * that use void* generic pointers. It works with the latter
2484 * because both ANSI C and C++ allow castless assignment from
2485 * any pointer type to void*, and deal with argument conversions
2486 * as though doing an assignment.
2487 */
2488 return (void *) realloc( (char *) ptr, size );
2489}
2490
2491void skslfree (void * ptr , yyscan_t yyscanner)
2492{
2493 free( (char *) ptr ); /* see skslrealloc() for (char *) cast */
2494}
2495
2496#define YYTABLES_NAME "yytables"
2497
fmalitad214d6a2016-09-30 08:05:24 -07002498#line 187 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07002499
2500
2501
2502int skslwrap(yyscan_t scanner) {
2503 return 1; // terminate
2504}
2505