blob: 6e44f5aea76b47f85e6b2d6853581194376a8324 [file] [log] [blame]
Ethan Nicholas762466e2017-06-29 10:03:38 -04001/*
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 */
Brian Salomonf9f45122016-11-29 11:59:17 -05007
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04008#line 3 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -07009
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
Ethan Nicholas94421942017-03-31 17:06:42 -040016#define YY_FLEX_MINOR_VERSION 6
Ethan Nicholas0dd30d92017-05-01 16:57:07 -040017#define YY_FLEX_SUBMINOR_VERSION 1
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
Brian Salomonf9f45122016-11-29 11:59:17 -050092#endif /* ! C99 */
93
ethannicholasb3058bd2016-07-01 08:22:01 -070094#endif /* ! FLEXINT_H */
95
Ethan Nicholas94421942017-03-31 17:06:42 -040096/* TODO: this is always defined, so inline it */
ethannicholasb3058bd2016-07-01 08:22:01 -070097#define yyconst const
Ethan Nicholas94421942017-03-31 17:06:42 -040098
99#if defined(__GNUC__) && __GNUC__ >= 3
100#define yynoreturn __attribute__((__noreturn__))
ethannicholasb3058bd2016-07-01 08:22:01 -0700101#else
Ethan Nicholas94421942017-03-31 17:06:42 -0400102#define yynoreturn
ethannicholasb3058bd2016-07-01 08:22:01 -0700103#endif
104
105/* Returned upon end-of-file. */
106#define YY_NULL 0
107
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400108/* 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.
ethannicholasb3058bd2016-07-01 08:22:01 -0700112 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400113#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
ethannicholasb3058bd2016-07-01 08:22:01 -0700114
115/* An opaque pointer. */
116#ifndef YY_TYPEDEF_YY_SCANNER_T
117#define YY_TYPEDEF_YY_SCANNER_T
118typedef 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 *
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400137
ethannicholasb3058bd2016-07-01 08:22:01 -0700138/* 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400144
ethannicholasb3058bd2016-07-01 08:22:01 -0700145/* Action number for EOF rule of a given start state. */
146#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400147
ethannicholasb3058bd2016-07-01 08:22:01 -0700148/* Special action meaning "start processing a new file". */
149#define YY_NEW_FILE skslrestart(yyin ,yyscanner )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400150
ethannicholasb3058bd2016-07-01 08:22:01 -0700151#define YY_END_OF_BUFFER_CHAR 0
152
153/* Size of default input buffer. */
154#ifndef YY_BUF_SIZE
Brian Salomonf9f45122016-11-29 11:59:17 -0500155#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
ethannicholasb3058bd2016-07-01 08:22:01 -0700162#define YY_BUF_SIZE 16384
Brian Salomonf9f45122016-11-29 11:59:17 -0500163#endif /* __ia64__ */
ethannicholasb3058bd2016-07-01 08:22:01 -0700164#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
172typedef struct yy_buffer_state *YY_BUFFER_STATE;
173#endif
174
175#ifndef YY_TYPEDEF_YY_SIZE_T
176#define YY_TYPEDEF_YY_SIZE_T
177typedef 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400183
ethannicholasb3058bd2016-07-01 08:22:01 -0700184 /* 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400186 * existing scanners that call yyless() from OUTSIDE sksllex.
ethannicholasb3058bd2016-07-01 08:22:01 -0700187 * 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 { \
Brian Salomonf9f45122016-11-29 11:59:17 -0500193 int yyl;\
ethannicholasb3058bd2016-07-01 08:22:01 -0700194 for ( yyl = n; yyl < yyleng; ++yyl )\
195 if ( yytext[yyl] == '\n' )\
196 --yylineno;\
197 }while(0)
Brian Salomonf9f45122016-11-29 11:59:17 -0500198 #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)
ethannicholasb3058bd2016-07-01 08:22:01 -0700205
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 )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400219
ethannicholasb3058bd2016-07-01 08:22:01 -0700220#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
221
222#ifndef YY_STRUCT_YY_BUFFER_STATE
223#define YY_STRUCT_YY_BUFFER_STATE
224struct 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 */
Ethan Nicholas94421942017-03-31 17:06:42 -0400234 int yy_buf_size;
ethannicholasb3058bd2016-07-01 08:22:01 -0700235
236 /* Number of characters read into yy_ch_buf, not including EOB
237 * characters.
238 */
Ethan Nicholas94421942017-03-31 17:06:42 -0400239 int yy_n_chars;
ethannicholasb3058bd2016-07-01 08:22:01 -0700240
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. */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400262
ethannicholasb3058bd2016-07-01 08:22:01 -0700263 /* 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)
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400296
ethannicholasb3058bd2016-07-01 08:22:01 -0700297/* 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400302void skslrestart (FILE *input_file ,yyscan_t yyscanner );
303void sksl_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
304YY_BUFFER_STATE sksl_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
305void sksl_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
306void sksl_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
307void skslpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
308void skslpop_buffer_state (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700309
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400310static void skslensure_buffer_stack (yyscan_t yyscanner );
311static void sksl_load_buffer_state (yyscan_t yyscanner );
312static void sksl_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
313
ethannicholasb3058bd2016-07-01 08:22:01 -0700314#define YY_FLUSH_BUFFER sksl_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
315
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400316YY_BUFFER_STATE sksl_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
317YY_BUFFER_STATE sksl_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
318YY_BUFFER_STATE sksl_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700319
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400320void *skslalloc (yy_size_t ,yyscan_t yyscanner );
321void *skslrealloc (void *,yy_size_t ,yyscan_t yyscanner );
322void skslfree (void * ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700323
324#define yy_new_buffer sksl_create_buffer
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400325
ethannicholasb3058bd2016-07-01 08:22:01 -0700326#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 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400335
ethannicholasb3058bd2016-07-01 08:22:01 -0700336#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 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400345
ethannicholasb3058bd2016-07-01 08:22:01 -0700346#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
347
348/* Begin user sect3 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400349
350typedef unsigned char YY_CHAR;
ethannicholasb3058bd2016-07-01 08:22:01 -0700351
352typedef int yy_state_type;
353
354#define yytext_ptr yytext_r
355
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400356static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
357static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
358static int yy_get_next_buffer (yyscan_t yyscanner );
359static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700360
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; \
Ethan Nicholas94421942017-03-31 17:06:42 -0400366 yyleng = (int) (yy_cp - yy_bp); \
ethannicholasb3058bd2016-07-01 08:22:01 -0700367 yyg->yy_hold_char = *yy_cp; \
368 *yy_cp = '\0'; \
369 yyg->yy_c_buf_p = yy_cp;
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400370
Ethan Nicholas762466e2017-06-29 10:03:38 -0400371#define YY_NUM_RULES 99
372#define YY_END_OF_BUFFER 100
ethannicholasb3058bd2016-07-01 08:22:01 -0700373/* This struct is not used in this scanner,
374 but its presence is necessary. */
375struct yy_trans_info
376 {
377 flex_int32_t yy_verify;
378 flex_int32_t yy_nxt;
379 };
Ethan Nicholas762466e2017-06-29 10:03:38 -0400380static yyconst flex_int16_t yy_accept[289] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700381 { 0,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400382 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700392
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400393 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400394 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,
ethannicholasf789b382016-08-03 12:43:36 -0700403
Ethan Nicholas762466e2017-06-29 10:03:38 -0400404 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
ethannicholasb3058bd2016-07-01 08:22:01 -0700413 } ;
414
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400415static yyconst YY_CHAR yy_ec[256] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700416 { 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,
ethannicholas5961bc92016-10-12 06:39:56 -0700421 10, 11, 12, 13, 14, 15, 16, 17, 18, 18,
422 18, 18, 18, 18, 18, 18, 18, 19, 20, 21,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400423 22, 23, 24, 25, 26, 26, 26, 26, 27, 26,
fmalitad214d6a2016-09-30 08:05:24 -0700424 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
425 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400426 28, 1, 29, 30, 31, 1, 32, 33, 34, 35,
ethannicholasb3058bd2016-07-01 08:22:01 -0700427
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400428 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700431 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
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400447static yyconst YY_CHAR yy_meta[59] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700448 { 0,
449 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
ethannicholas5961bc92016-10-12 06:39:56 -0700450 1, 1, 1, 1, 1, 1, 4, 4, 1, 1,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400451 1, 1, 1, 1, 1, 5, 5, 1, 1, 1,
452 3, 5, 5, 5, 5, 5, 5, 3, 3, 3,
fmalitad214d6a2016-09-30 08:05:24 -0700453 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400454 3, 3, 3, 3, 1, 1, 1, 1
ethannicholasb3058bd2016-07-01 08:22:01 -0700455 } ;
456
Ethan Nicholas762466e2017-06-29 10:03:38 -0400457static yyconst flex_uint16_t yy_base[297] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700458 { 0,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400459 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700469
Ethan Nicholas762466e2017-06-29 10:03:38 -0400470 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,
ethannicholasf789b382016-08-03 12:43:36 -0700480
Ethan Nicholas762466e2017-06-29 10:03:38 -0400481 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
ethannicholasb3058bd2016-07-01 08:22:01 -0700492 } ;
493
Ethan Nicholas762466e2017-06-29 10:03:38 -0400494static yyconst flex_int16_t yy_def[297] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700495 { 0,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400496 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700506
Ethan Nicholas762466e2017-06-29 10:03:38 -0400507 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,
ethannicholasf789b382016-08-03 12:43:36 -0700517
Ethan Nicholas762466e2017-06-29 10:03:38 -0400518 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
ethannicholasb3058bd2016-07-01 08:22:01 -0700529 } ;
530
Ethan Nicholas762466e2017-06-29 10:03:38 -0400531static yyconst flex_uint16_t yy_nxt[420] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700532 { 0,
533 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
534 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400535 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,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400539 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700543
Ethan Nicholas762466e2017-06-29 10:03:38 -0400544 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700554
Ethan Nicholas762466e2017-06-29 10:03:38 -0400555 122, 127, 127, 130, 130, 130, 277, 276, 275, 274,
556 273, 272, 271, 270, 269, 268, 267, 266, 265, 264,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400557 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,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400563 203, 200, 199, 198, 197, 196, 195, 194, 193, 192,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400564 191, 190, 189, 188, 187, 186, 185, 184, 183, 182,
ethannicholasf789b382016-08-03 12:43:36 -0700565
Ethan Nicholas762466e2017-06-29 10:03:38 -0400566 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,
Ethan Nicholascb670962017-04-20 19:31:52 -0400576
Ethan Nicholas762466e2017-06-29 10:03:38 -0400577 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
578 288, 288, 288, 288, 288, 288, 288, 288, 288
ethannicholasb3058bd2016-07-01 08:22:01 -0700579 } ;
580
Ethan Nicholas762466e2017-06-29 10:03:38 -0400581static yyconst flex_int16_t yy_chk[420] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700582 { 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,
Ethan Nicholas5ac13c22017-05-10 15:06:17 -0400588 1, 1, 1, 1, 1, 1, 1, 1, 5, 5,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400589 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700593
Ethan Nicholas762466e2017-06-29 10:03:38 -0400594 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,
ethannicholasb3058bd2016-07-01 08:22:01 -0700604
Ethan Nicholas762466e2017-06-29 10:03:38 -0400605 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,
ethannicholasf789b382016-08-03 12:43:36 -0700615
Ethan Nicholas762466e2017-06-29 10:03:38 -0400616 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,
Ethan Nicholascb670962017-04-20 19:31:52 -0400626
Ethan Nicholas762466e2017-06-29 10:03:38 -0400627 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
628 288, 288, 288, 288, 288, 288, 288, 288, 288
ethannicholasb3058bd2016-07-01 08:22:01 -0700629 } ;
630
631/* Table of booleans, true if rule could match eol. */
Ethan Nicholas762466e2017-06-29 10:03:38 -0400632static yyconst flex_int32_t yy_rule_can_match_eol[100] =
ethannicholasb3058bd2016-07-01 08:22:01 -0700633 { 0,
6340, 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,
ethannicholas5961bc92016-10-12 06:39:56 -0700637 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Ethan Nicholas762466e2017-06-29 10:03:38 -0400638 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,
639 };
ethannicholasb3058bd2016-07-01 08:22:01 -0700640
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/*
Ethan Nicholas94421942017-03-31 17:06:42 -0400650 * 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/*
ethannicholasb3058bd2016-07-01 08:22:01 -0700656
Ethan Nicholas94421942017-03-31 17:06:42 -0400657 This file is IGNORED during the build process!
ethannicholasb3058bd2016-07-01 08:22:01 -0700658
Ethan Nicholas94421942017-03-31 17:06:42 -0400659 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:
ethannicholasb3058bd2016-07-01 08:22:01 -0700661
Ethan Nicholas94421942017-03-31 17:06:42 -0400662 flex sksl.flex
ethannicholasb3058bd2016-07-01 08:22:01 -0700663
ethannicholasf789b382016-08-03 12:43:36 -0700664 You will have to manually add a copyright notice to the top of lex.sksl.c.
Ethan Nicholas94421942017-03-31 17:06:42 -0400665
ethannicholasb3058bd2016-07-01 08:22:01 -0700666*/
667#define YY_NO_UNISTD_H 1
Ethan Nicholas762466e2017-06-29 10:03:38 -0400668#line 663 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -0700669
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. */
685struct 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;
Ethan Nicholas94421942017-03-31 17:06:42 -0400697 int yy_n_chars;
698 int yyleng_r;
ethannicholasb3058bd2016-07-01 08:22:01 -0700699 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400718static int yy_init_globals (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700719
720int sksllex_init (yyscan_t* scanner);
721
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400722int sksllex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
ethannicholasb3058bd2016-07-01 08:22:01 -0700723
724/* Accessor methods to globals.
725 These are made visible to non-reentrant scanners for convenience. */
726
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400727int sksllex_destroy (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700728
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400729int skslget_debug (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700730
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400731void skslset_debug (int debug_flag ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700732
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400733YY_EXTRA_TYPE skslget_extra (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700734
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400735void skslset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700736
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400737FILE *skslget_in (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700738
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400739void skslset_in (FILE * _in_str ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700740
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400741FILE *skslget_out (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700742
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400743void skslset_out (FILE * _out_str ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700744
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400745 int skslget_leng (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700746
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400747char *skslget_text (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700748
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400749int skslget_lineno (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700750
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400751void skslset_lineno (int _line_number ,yyscan_t yyscanner );
Brian Salomonf9f45122016-11-29 11:59:17 -0500752
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400753int skslget_column (yyscan_t yyscanner );
Brian Salomonf9f45122016-11-29 11:59:17 -0500754
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400755void skslset_column (int _column_no ,yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700756
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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400763extern "C" int skslwrap (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700764#else
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400765extern int skslwrap (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700766#endif
767#endif
768
Ethan Nicholas94421942017-03-31 17:06:42 -0400769#ifndef YY_NO_UNPUT
ethannicholasb3058bd2016-07-01 08:22:01 -0700770
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400771 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
Ethan Nicholas94421942017-03-31 17:06:42 -0400772
773#endif
774
ethannicholasb3058bd2016-07-01 08:22:01 -0700775#ifndef yytext_ptr
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400776static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
ethannicholasb3058bd2016-07-01 08:22:01 -0700777#endif
778
779#ifdef YY_NEED_STRLEN
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400780static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
ethannicholasb3058bd2016-07-01 08:22:01 -0700781#endif
782
783#ifndef YY_NO_INPUT
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400784
ethannicholasb3058bd2016-07-01 08:22:01 -0700785#ifdef __cplusplus
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400786static int yyinput (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700787#else
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400788static int input (yyscan_t yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -0700789#endif
790
791#endif
792
793/* Amount of stuff to slurp up with each read. */
794#ifndef YY_READ_BUF_SIZE
Brian Salomonf9f45122016-11-29 11:59:17 -0500795#ifdef __ia64__
796/* On IA-64, the buffer size is 16k, not 8k */
797#define YY_READ_BUF_SIZE 16384
798#else
ethannicholasb3058bd2016-07-01 08:22:01 -0700799#define YY_READ_BUF_SIZE 8192
Brian Salomonf9f45122016-11-29 11:59:17 -0500800#endif /* __ia64__ */
ethannicholasb3058bd2016-07-01 08:22:01 -0700801#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 */
Ethan Nicholas94421942017-03-31 17:06:42 -0400808#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
ethannicholasb3058bd2016-07-01 08:22:01 -0700809#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 = '*'; \
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400819 size_t n; \
ethannicholasb3058bd2016-07-01 08:22:01 -0700820 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; \
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400832 while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
ethannicholasb3058bd2016-07-01 08:22:01 -0700833 { \
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
873extern 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
Ethan Nicholas94421942017-03-31 17:06:42 -0400887#define YY_BREAK /*LINTED*/break;
ethannicholasb3058bd2016-07-01 08:22:01 -0700888#endif
889
890#define YY_RULE_SETUP \
891 YY_USER_ACTION
892
893/** The main scanner function which does all the work.
894 */
895YY_DECL
896{
Ethan Nicholas94421942017-03-31 17:06:42 -0400897 yy_state_type yy_current_state;
898 char *yy_cp, *yy_bp;
899 int yy_act;
ethannicholasb3058bd2016-07-01 08:22:01 -0700900 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
901
ethannicholasb3058bd2016-07-01 08:22:01 -0700902 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
Brian Salomonf9f45122016-11-29 11:59:17 -0500928 {
Ethan Nicholas94421942017-03-31 17:06:42 -0400929#line 30 "sksl.flex"
Brian Salomonf9f45122016-11-29 11:59:17 -0500930
931
Ethan Nicholas762466e2017-06-29 10:03:38 -0400932#line 927 "lex.sksl.c"
Brian Salomonf9f45122016-11-29 11:59:17 -0500933
Ethan Nicholas94421942017-03-31 17:06:42 -0400934 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
ethannicholasb3058bd2016-07-01 08:22:01 -0700935 {
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;
947yy_match:
948 do
949 {
Ethan Nicholas94421942017-03-31 17:06:42 -0400950 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
ethannicholasb3058bd2016-07-01 08:22:01 -0700951 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];
Ethan Nicholas762466e2017-06-29 10:03:38 -0400959 if ( yy_current_state >= 289 )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400960 yy_c = yy_meta[(unsigned int) yy_c];
ethannicholasb3058bd2016-07-01 08:22:01 -0700961 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400962 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
ethannicholasb3058bd2016-07-01 08:22:01 -0700963 ++yy_cp;
964 }
Ethan Nicholas762466e2017-06-29 10:03:38 -0400965 while ( yy_current_state != 288 );
ethannicholasb3058bd2016-07-01 08:22:01 -0700966 yy_cp = yyg->yy_last_accepting_cpos;
967 yy_current_state = yyg->yy_last_accepting_state;
968
969yy_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 {
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400976 yy_size_t yyl;
ethannicholasb3058bd2016-07-01 08:22:01 -0700977 for ( yyl = 0; yyl < yyleng; ++yyl )
978 if ( yytext[yyl] == '\n' )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -0400979
ethannicholasb3058bd2016-07-01 08:22:01 -0700980 do{ yylineno++;
981 yycolumn=0;
982 }while(0)
983;
984 }
985
986do_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
997case 1:
998YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -0400999#line 32 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001000{ return SkSL::Token::FLOAT_LITERAL; }
1001 YY_BREAK
1002case 2:
1003YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001004#line 34 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001005{ return SkSL::Token::FLOAT_LITERAL; }
1006 YY_BREAK
1007case 3:
1008YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001009#line 36 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001010{ return SkSL::Token::FLOAT_LITERAL; }
1011 YY_BREAK
1012case 4:
1013YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001014#line 38 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001015{ return SkSL::Token::INT_LITERAL; }
1016 YY_BREAK
1017case 5:
1018YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001019#line 40 "sksl.flex"
ethannicholas5961bc92016-10-12 06:39:56 -07001020{ return SkSL::Token::INT_LITERAL; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001021 YY_BREAK
1022case 6:
1023YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001024#line 42 "sksl.flex"
ethannicholas5961bc92016-10-12 06:39:56 -07001025{ return SkSL::Token::TRUE_LITERAL; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001026 YY_BREAK
1027case 7:
1028YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001029#line 44 "sksl.flex"
ethannicholas5961bc92016-10-12 06:39:56 -07001030{ return SkSL::Token::FALSE_LITERAL; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001031 YY_BREAK
1032case 8:
1033YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001034#line 46 "sksl.flex"
ethannicholas5961bc92016-10-12 06:39:56 -07001035{ return SkSL::Token::IF; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001036 YY_BREAK
1037case 9:
1038YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001039#line 48 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001040{ return SkSL::Token::STATIC_IF; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001041 YY_BREAK
1042case 10:
1043YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001044#line 50 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001045{ return SkSL::Token::ELSE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001046 YY_BREAK
1047case 11:
1048YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001049#line 52 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001050{ return SkSL::Token::FOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001051 YY_BREAK
1052case 12:
1053YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001054#line 54 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001055{ return SkSL::Token::WHILE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001056 YY_BREAK
1057case 13:
1058YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001059#line 56 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001060{ return SkSL::Token::DO; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001061 YY_BREAK
1062case 14:
1063YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001064#line 58 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001065{ return SkSL::Token::SWITCH; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001066 YY_BREAK
1067case 15:
1068YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001069#line 60 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001070{ return SkSL::Token::STATIC_SWITCH; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001071 YY_BREAK
1072case 16:
1073YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001074#line 62 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001075{ return SkSL::Token::CASE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001076 YY_BREAK
1077case 17:
1078YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001079#line 64 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001080{ return SkSL::Token::DEFAULT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001081 YY_BREAK
1082case 18:
1083YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001084#line 66 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001085{ return SkSL::Token::BREAK; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001086 YY_BREAK
1087case 19:
1088YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001089#line 68 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001090{ return SkSL::Token::CONTINUE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001091 YY_BREAK
1092case 20:
1093YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001094#line 70 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001095{ return SkSL::Token::DISCARD; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001096 YY_BREAK
1097case 21:
1098YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001099#line 72 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001100{ return SkSL::Token::RETURN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001101 YY_BREAK
1102case 22:
1103YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001104#line 74 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001105{ return SkSL::Token::IN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001106 YY_BREAK
1107case 23:
1108YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001109#line 76 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001110{ return SkSL::Token::OUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001111 YY_BREAK
1112case 24:
1113YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001114#line 78 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001115{ return SkSL::Token::INOUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001116 YY_BREAK
1117case 25:
1118YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001119#line 80 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001120{ return SkSL::Token::UNIFORM; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001121 YY_BREAK
1122case 26:
1123YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001124#line 82 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001125{ return SkSL::Token::CONST; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001126 YY_BREAK
1127case 27:
1128YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001129#line 84 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001130{ return SkSL::Token::LOWP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001131 YY_BREAK
1132case 28:
1133YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001134#line 86 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001135{ return SkSL::Token::MEDIUMP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001136 YY_BREAK
1137case 29:
1138YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001139#line 88 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001140{ return SkSL::Token::HIGHP; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001141 YY_BREAK
1142case 30:
1143YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001144#line 90 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001145{ return SkSL::Token::FLAT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001146 YY_BREAK
1147case 31:
1148YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001149#line 92 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001150{ return SkSL::Token::NOPERSPECTIVE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001151 YY_BREAK
1152case 32:
1153YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001154#line 94 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001155{ return SkSL::Token::READONLY; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001156 YY_BREAK
1157case 33:
1158YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001159#line 96 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001160{ return SkSL::Token::WRITEONLY; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001161 YY_BREAK
1162case 34:
1163YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001164#line 98 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001165{ return SkSL::Token::COHERENT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001166 YY_BREAK
1167case 35:
1168YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001169#line 100 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001170{ return SkSL::Token::VOLATILE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001171 YY_BREAK
1172case 36:
1173YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001174#line 102 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001175{ return SkSL::Token::RESTRICT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001176 YY_BREAK
1177case 37:
1178YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001179#line 104 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001180{ return SkSL::Token::BUFFER; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001181 YY_BREAK
1182case 38:
1183YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001184#line 106 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001185{ return SkSL::Token::HASSIDEEFFECTS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001186 YY_BREAK
1187case 39:
1188YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001189#line 108 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001190{ return SkSL::Token::STRUCT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001191 YY_BREAK
1192case 40:
1193YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001194#line 110 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001195{ return SkSL::Token::LAYOUT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001196 YY_BREAK
1197case 41:
1198YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001199#line 112 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001200{ return SkSL::Token::PRECISION; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001201 YY_BREAK
1202case 42:
1203YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001204#line 114 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001205{ return SkSL::Token::IDENTIFIER; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001206 YY_BREAK
1207case 43:
1208YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001209#line 116 "sksl.flex"
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001210{ return SkSL::Token::DIRECTIVE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001211 YY_BREAK
1212case 44:
1213YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001214#line 118 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001215{ return SkSL::Token::SECTION; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001216 YY_BREAK
1217case 45:
1218YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001219#line 120 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001220{ return SkSL::Token::LPAREN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001221 YY_BREAK
1222case 46:
1223YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001224#line 122 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001225{ return SkSL::Token::RPAREN; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001226 YY_BREAK
1227case 47:
1228YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001229#line 124 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001230{ return SkSL::Token::LBRACE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001231 YY_BREAK
1232case 48:
1233YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001234#line 126 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001235{ return SkSL::Token::RBRACE; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001236 YY_BREAK
1237case 49:
1238YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001239#line 128 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001240{ return SkSL::Token::LBRACKET; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001241 YY_BREAK
1242case 50:
1243YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001244#line 130 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001245{ return SkSL::Token::RBRACKET; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001246 YY_BREAK
1247case 51:
1248YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001249#line 132 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001250{ return SkSL::Token::DOT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001251 YY_BREAK
1252case 52:
1253YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001254#line 134 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001255{ return SkSL::Token::COMMA; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001256 YY_BREAK
1257case 53:
1258YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001259#line 136 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001260{ return SkSL::Token::PLUSPLUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001261 YY_BREAK
1262case 54:
1263YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001264#line 138 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001265{ return SkSL::Token::MINUSMINUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001266 YY_BREAK
1267case 55:
1268YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001269#line 140 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001270{ return SkSL::Token::PLUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001271 YY_BREAK
1272case 56:
1273YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001274#line 142 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001275{ return SkSL::Token::MINUS; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001276 YY_BREAK
1277case 57:
1278YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001279#line 144 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001280{ return SkSL::Token::STAR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001281 YY_BREAK
1282case 58:
1283YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001284#line 146 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001285{ return SkSL::Token::SLASH; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001286 YY_BREAK
1287case 59:
1288YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001289#line 148 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001290{ return SkSL::Token::PERCENT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001291 YY_BREAK
1292case 60:
1293YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001294#line 150 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001295{ return SkSL::Token::SHL; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001296 YY_BREAK
1297case 61:
1298YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001299#line 152 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001300{ return SkSL::Token::SHR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001301 YY_BREAK
1302case 62:
1303YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001304#line 154 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001305{ return SkSL::Token::BITWISEOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001306 YY_BREAK
1307case 63:
1308YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001309#line 156 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001310{ return SkSL::Token::BITWISEXOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001311 YY_BREAK
1312case 64:
1313YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001314#line 158 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001315{ return SkSL::Token::BITWISEAND; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001316 YY_BREAK
1317case 65:
1318YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001319#line 160 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001320{ return SkSL::Token::BITWISENOT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001321 YY_BREAK
1322case 66:
1323YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001324#line 162 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001325{ return SkSL::Token::LOGICALOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001326 YY_BREAK
1327case 67:
1328YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001329#line 164 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001330{ return SkSL::Token::LOGICALXOR; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001331 YY_BREAK
1332case 68:
1333YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001334#line 166 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001335{ return SkSL::Token::LOGICALAND; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001336 YY_BREAK
1337case 69:
1338YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001339#line 168 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001340{ return SkSL::Token::LOGICALNOT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001341 YY_BREAK
1342case 70:
1343YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001344#line 170 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001345{ return SkSL::Token::QUESTION; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001346 YY_BREAK
1347case 71:
1348YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001349#line 172 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001350{ return SkSL::Token::COLON; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001351 YY_BREAK
1352case 72:
1353YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001354#line 174 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001355{ return SkSL::Token::EQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001356 YY_BREAK
1357case 73:
1358YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001359#line 176 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001360{ return SkSL::Token::EQEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001361 YY_BREAK
1362case 74:
1363YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001364#line 178 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001365{ return SkSL::Token::NEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001366 YY_BREAK
1367case 75:
1368YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001369#line 180 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001370{ return SkSL::Token::GT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001371 YY_BREAK
1372case 76:
1373YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001374#line 182 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001375{ return SkSL::Token::LT; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001376 YY_BREAK
1377case 77:
ethannicholasb3058bd2016-07-01 08:22:01 -07001378YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001379#line 184 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001380{ return SkSL::Token::GTEQ; }
ethannicholasb3058bd2016-07-01 08:22:01 -07001381 YY_BREAK
ethannicholasf789b382016-08-03 12:43:36 -07001382case 78:
ethannicholasb3058bd2016-07-01 08:22:01 -07001383YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001384#line 186 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001385{ return SkSL::Token::LTEQ; }
ethannicholasdcfe6db2016-10-10 10:09:00 -07001386 YY_BREAK
jvanverth9df16b52016-10-11 10:03:56 -07001387case 79:
ethannicholasdcfe6db2016-10-10 10:09:00 -07001388YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001389#line 188 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001390{ return SkSL::Token::PLUSEQ; }
ethannicholasdcfe6db2016-10-10 10:09:00 -07001391 YY_BREAK
jvanverth9df16b52016-10-11 10:03:56 -07001392case 80:
ethannicholasdcfe6db2016-10-10 10:09:00 -07001393YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001394#line 190 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001395{ return SkSL::Token::MINUSEQ; }
ethannicholasccb1dd82016-10-11 08:47:04 -07001396 YY_BREAK
jvanverth9df16b52016-10-11 10:03:56 -07001397case 81:
ethannicholasccb1dd82016-10-11 08:47:04 -07001398YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001399#line 192 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001400{ return SkSL::Token::STAREQ; }
ethannicholasccb1dd82016-10-11 08:47:04 -07001401 YY_BREAK
jvanverth9df16b52016-10-11 10:03:56 -07001402case 82:
ethannicholasccb1dd82016-10-11 08:47:04 -07001403YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001404#line 194 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001405{ return SkSL::Token::SLASHEQ; }
ethannicholas5961bc92016-10-12 06:39:56 -07001406 YY_BREAK
1407case 83:
1408YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001409#line 196 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001410{ return SkSL::Token::PERCENTEQ; }
ethannicholas5961bc92016-10-12 06:39:56 -07001411 YY_BREAK
1412case 84:
1413YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001414#line 198 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001415{ return SkSL::Token::SHLEQ; }
Brian Salomonf9f45122016-11-29 11:59:17 -05001416 YY_BREAK
1417case 85:
1418YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001419#line 200 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001420{ return SkSL::Token::SHREQ; }
Brian Salomonf9f45122016-11-29 11:59:17 -05001421 YY_BREAK
1422case 86:
Brian Salomonf9f45122016-11-29 11:59:17 -05001423YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001424#line 202 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001425{ return SkSL::Token::BITWISEOREQ; }
Brian Salomonf9f45122016-11-29 11:59:17 -05001426 YY_BREAK
1427case 87:
Brian Salomonf9f45122016-11-29 11:59:17 -05001428YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001429#line 204 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001430{ return SkSL::Token::BITWISEXOREQ; }
Brian Salomonf9f45122016-11-29 11:59:17 -05001431 YY_BREAK
1432case 88:
1433YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001434#line 206 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001435{ return SkSL::Token::BITWISEANDEQ; }
Ethan Nicholas2b1e4682017-02-22 17:20:11 -05001436 YY_BREAK
Ethan Nicholas7d975fc2017-02-23 16:18:54 +00001437case 89:
Ethan Nicholas2b1e4682017-02-22 17:20:11 -05001438YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001439#line 208 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001440{ return SkSL::Token::LOGICALOREQ; }
Ethan Nicholasaf197692017-02-27 13:26:45 -05001441 YY_BREAK
1442case 90:
Ethan Nicholasaf197692017-02-27 13:26:45 -05001443YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001444#line 210 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001445{ return SkSL::Token::LOGICALXOREQ; }
Ethan Nicholasaf197692017-02-27 13:26:45 -05001446 YY_BREAK
1447case 91:
1448YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001449#line 212 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001450{ return SkSL::Token::LOGICALANDEQ; }
Ethan Nicholasaf197692017-02-27 13:26:45 -05001451 YY_BREAK
1452case 92:
1453YY_RULE_SETUP
Ethan Nicholas94421942017-03-31 17:06:42 -04001454#line 214 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001455{ return SkSL::Token::SEMICOLON; }
Ethan Nicholascb670962017-04-20 19:31:52 -04001456 YY_BREAK
1457case 93:
1458YY_RULE_SETUP
1459#line 216 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001460{ return SkSL::Token::ARROW; }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001461 YY_BREAK
1462case 94:
1463YY_RULE_SETUP
1464#line 218 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001465{ return SkSL::Token::COLONCOLON; }
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001466 YY_BREAK
1467case 95:
Ethan Nicholas762466e2017-06-29 10:03:38 -04001468/* rule 95 can match eol */
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001469YY_RULE_SETUP
1470#line 220 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001471{ return SkSL::Token::WHITESPACE; }
Ethan Nicholas5ac13c22017-05-10 15:06:17 -04001472 YY_BREAK
1473case 96:
1474YY_RULE_SETUP
1475#line 222 "sksl.flex"
Ethan Nicholas762466e2017-06-29 10:03:38 -04001476/* line comment */
1477 YY_BREAK
1478case 97:
1479/* rule 97 can match eol */
1480YY_RULE_SETUP
1481#line 224 "sksl.flex"
1482/* block comment */
1483 YY_BREAK
1484case 98:
1485YY_RULE_SETUP
1486#line 226 "sksl.flex"
1487{ return SkSL::Token::INVALID_TOKEN; }
1488 YY_BREAK
1489case 99:
1490YY_RULE_SETUP
1491#line 228 "sksl.flex"
ethannicholasb3058bd2016-07-01 08:22:01 -07001492ECHO;
1493 YY_BREAK
Ethan Nicholas762466e2017-06-29 10:03:38 -04001494#line 1489 "lex.sksl.c"
ethannicholasb3058bd2016-07-01 08:22:01 -07001495case 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 */
Brian Salomonf9f45122016-11-29 11:59:17 -05001626 } /* end of user's declarations */
ethannicholasb3058bd2016-07-01 08:22:01 -07001627} /* 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 */
1636static int yy_get_next_buffer (yyscan_t yyscanner)
1637{
1638 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas94421942017-03-31 17:06:42 -04001639 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1640 char *source = yyg->yytext_ptr;
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001641 yy_size_t number_to_move, i;
ethannicholasb3058bd2016-07-01 08:22:01 -07001642 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. */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001670 number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
ethannicholasb3058bd2016-07-01 08:22:01 -07001671
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 {
Ethan Nicholas94421942017-03-31 17:06:42 -04001683 int num_to_read =
ethannicholasb3058bd2016-07-01 08:22:01 -07001684 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 */
Brian Salomonf9f45122016-11-29 11:59:17 -05001690 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
ethannicholasb3058bd2016-07-01 08:22:01 -07001691
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 {
Ethan Nicholas94421942017-03-31 17:06:42 -04001697 int new_size = b->yy_buf_size * 2;
ethannicholasb3058bd2016-07-01 08:22:01 -07001698
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. */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001706 skslrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -07001707 }
1708 else
1709 /* Can't grow it, we don't own it. */
Ethan Nicholas94421942017-03-31 17:06:42 -04001710 b->yy_ch_buf = NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07001711
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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001752 if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
ethannicholasb3058bd2016-07-01 08:22:01 -07001753 /* Extend the array by 50%, plus the number we really need. */
Ethan Nicholas94421942017-03-31 17:06:42 -04001754 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001755 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) skslrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -07001756 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
1771 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1772{
Ethan Nicholas94421942017-03-31 17:06:42 -04001773 yy_state_type yy_current_state;
1774 char *yy_cp;
ethannicholasb3058bd2016-07-01 08:22:01 -07001775 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 {
Ethan Nicholas94421942017-03-31 17:06:42 -04001781 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
ethannicholasb3058bd2016-07-01 08:22:01 -07001782 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];
Ethan Nicholas762466e2017-06-29 10:03:38 -04001790 if ( yy_current_state >= 289 )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001791 yy_c = yy_meta[(unsigned int) yy_c];
ethannicholasb3058bd2016-07-01 08:22:01 -07001792 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001793 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
ethannicholasb3058bd2016-07-01 08:22:01 -07001794 }
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 */
1804 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1805{
Ethan Nicholas94421942017-03-31 17:06:42 -04001806 int yy_is_jam;
ethannicholasb3058bd2016-07-01 08:22:01 -07001807 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
Ethan Nicholas94421942017-03-31 17:06:42 -04001808 char *yy_cp = yyg->yy_c_buf_p;
ethannicholasb3058bd2016-07-01 08:22:01 -07001809
Ethan Nicholas94421942017-03-31 17:06:42 -04001810 YY_CHAR yy_c = 1;
ethannicholasb3058bd2016-07-01 08:22:01 -07001811 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];
Ethan Nicholas762466e2017-06-29 10:03:38 -04001819 if ( yy_current_state >= 289 )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001820 yy_c = yy_meta[(unsigned int) yy_c];
ethannicholasb3058bd2016-07-01 08:22:01 -07001821 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001822 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Ethan Nicholas762466e2017-06-29 10:03:38 -04001823 yy_is_jam = (yy_current_state == 288);
ethannicholasb3058bd2016-07-01 08:22:01 -07001824
Brian Salomonf9f45122016-11-29 11:59:17 -05001825 (void)yyg;
ethannicholasb3058bd2016-07-01 08:22:01 -07001826 return yy_is_jam ? 0 : yy_current_state;
1827}
1828
Ethan Nicholas94421942017-03-31 17:06:42 -04001829#ifndef YY_NO_UNPUT
1830
1831 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07001832{
Ethan Nicholas94421942017-03-31 17:06:42 -04001833 char *yy_cp;
ethannicholasb3058bd2016-07-01 08:22:01 -07001834 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. */
Ethan Nicholas94421942017-03-31 17:06:42 -04001844 int number_to_move = yyg->yy_n_chars + 2;
1845 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
ethannicholasb3058bd2016-07-01 08:22:01 -07001846 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Ethan Nicholas94421942017-03-31 17:06:42 -04001847 char *source =
ethannicholasb3058bd2016-07-01 08:22:01 -07001848 &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 =
Ethan Nicholas94421942017-03-31 17:06:42 -04001856 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
ethannicholasb3058bd2016-07-01 08:22:01 -07001857
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
Ethan Nicholas94421942017-03-31 17:06:42 -04001873#endif
1874
ethannicholasb3058bd2016-07-01 08:22:01 -07001875#ifndef YY_NO_INPUT
1876#ifdef __cplusplus
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 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001900 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
ethannicholasb3058bd2016-07-01 08:22:01 -07001901 ++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 ) )
Ethan Nicholas94421942017-03-31 17:06:42 -04001924 return 0;
ethannicholasb3058bd2016-07-01 08:22:01 -07001925
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' )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04001947
ethannicholasb3058bd2016-07-01 08:22:01 -07001948 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 */
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 */
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
2012static 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 */
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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002035 b->yy_buf_size = (yy_size_t)size;
ethannicholasb3058bd2016-07-01 08:22:01 -07002036
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 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002040 b->yy_ch_buf = (char *) skslalloc(b->yy_buf_size + 2 ,yyscanner );
ethannicholasb3058bd2016-07-01 08:22:01 -07002041 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 */
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 */
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 */
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 */
2134void 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 */
2165void 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 */
2185static void skslensure_buffer_stack (yyscan_t yyscanner)
2186{
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002187 int num_to_alloc;
ethannicholasb3058bd2016-07-01 08:22:01 -07002188 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 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002196 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
ethannicholasb3058bd2016-07-01 08:22:01 -07002197 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()" );
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002202
ethannicholasb3058bd2016-07-01 08:22:01 -07002203 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002204
ethannicholasb3058bd2016-07-01 08:22:01 -07002205 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. */
Ethan Nicholas94421942017-03-31 17:06:42 -04002213 yy_size_t grow_size = 8 /* arbitrary grow size */;
ethannicholasb3058bd2016-07-01 08:22:01 -07002214
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.
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002233 * @return the newly allocated buffer state object.
ethannicholasb3058bd2016-07-01 08:22:01 -07002234 */
2235YY_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. */
Ethan Nicholas94421942017-03-31 17:06:42 -04002243 return NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07002244
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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002249 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
ethannicholasb3058bd2016-07-01 08:22:01 -07002250 b->yy_buf_pos = b->yy_ch_buf = base;
2251 b->yy_is_our_buffer = 0;
Ethan Nicholas94421942017-03-31 17:06:42 -04002252 b->yy_input_file = NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07002253 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 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002272YY_BUFFER_STATE sksl_scan_string (yyconst char * yystr , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002273{
2274
Ethan Nicholas94421942017-03-31 17:06:42 -04002275 return sksl_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
ethannicholasb3058bd2016-07-01 08:22:01 -07002276}
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.
Brian Salomonf9f45122016-11-29 11:59:17 -05002280 * @param yybytes the byte buffer to scan
2281 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
ethannicholasb3058bd2016-07-01 08:22:01 -07002282 * @param yyscanner The scanner object.
2283 * @return the newly allocated buffer state object.
2284 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002285YY_BUFFER_STATE sksl_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002286{
2287 YY_BUFFER_STATE b;
2288 char *buf;
Brian Salomonf9f45122016-11-29 11:59:17 -05002289 yy_size_t n;
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002290 yy_size_t i;
ethannicholasb3058bd2016-07-01 08:22:01 -07002291
2292 /* Get memory for full buffer, including space for trailing EOB's. */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002293 n = (yy_size_t) _yybytes_len + 2;
ethannicholasb3058bd2016-07-01 08:22:01 -07002294 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002319static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002320{
Ethan Nicholas94421942017-03-31 17:06:42 -04002321 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2322 (void)yyg;
2323 (void) fprintf( stderr, "%s\n", msg );
ethannicholasb3058bd2016-07-01 08:22:01 -07002324 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 */
2349YY_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 */
2358int skslget_lineno (yyscan_t yyscanner)
2359{
2360 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002361
ethannicholasb3058bd2016-07-01 08:22:01 -07002362 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 */
2371int skslget_column (yyscan_t yyscanner)
2372{
2373 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002374
ethannicholasb3058bd2016-07-01 08:22:01 -07002375 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 */
2384FILE *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 */
2393FILE *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 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002402int skslget_leng (yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002403{
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
2412char *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 */
2422void 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.
Ethan Nicholas94421942017-03-31 17:06:42 -04002429 * @param _line_number line number
ethannicholasb3058bd2016-07-01 08:22:01 -07002430 * @param yyscanner The scanner object.
2431 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002432void skslset_lineno (int _line_number , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002433{
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 )
Brian Salomonf9f45122016-11-29 11:59:17 -05002438 YY_FATAL_ERROR( "skslset_lineno called with no buffer" );
ethannicholasb3058bd2016-07-01 08:22:01 -07002439
Ethan Nicholas94421942017-03-31 17:06:42 -04002440 yylineno = _line_number;
ethannicholasb3058bd2016-07-01 08:22:01 -07002441}
2442
2443/** Set the current column.
Ethan Nicholas94421942017-03-31 17:06:42 -04002444 * @param _column_no column number
ethannicholasb3058bd2016-07-01 08:22:01 -07002445 * @param yyscanner The scanner object.
2446 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002447void skslset_column (int _column_no , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002448{
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 )
Brian Salomonf9f45122016-11-29 11:59:17 -05002453 YY_FATAL_ERROR( "skslset_column called with no buffer" );
ethannicholasb3058bd2016-07-01 08:22:01 -07002454
Ethan Nicholas94421942017-03-31 17:06:42 -04002455 yycolumn = _column_no;
ethannicholasb3058bd2016-07-01 08:22:01 -07002456}
2457
2458/** Set the input stream. This does not discard the current
2459 * input buffer.
Ethan Nicholas94421942017-03-31 17:06:42 -04002460 * @param _in_str A readable stream.
ethannicholasb3058bd2016-07-01 08:22:01 -07002461 * @param yyscanner The scanner object.
2462 * @see sksl_switch_to_buffer
2463 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002464void skslset_in (FILE * _in_str , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002465{
2466 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas94421942017-03-31 17:06:42 -04002467 yyin = _in_str ;
ethannicholasb3058bd2016-07-01 08:22:01 -07002468}
2469
Ethan Nicholas94421942017-03-31 17:06:42 -04002470void skslset_out (FILE * _out_str , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002471{
2472 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas94421942017-03-31 17:06:42 -04002473 yyout = _out_str ;
ethannicholasb3058bd2016-07-01 08:22:01 -07002474}
2475
2476int skslget_debug (yyscan_t yyscanner)
2477{
2478 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2479 return yy_flex_debug;
2480}
2481
Ethan Nicholas94421942017-03-31 17:06:42 -04002482void skslset_debug (int _bdebug , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002483{
2484 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
Ethan Nicholas94421942017-03-31 17:06:42 -04002485 yy_flex_debug = _bdebug ;
ethannicholasb3058bd2016-07-01 08:22:01 -07002486}
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 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002496
ethannicholasb3058bd2016-07-01 08:22:01 -07002497int sksllex_init(yyscan_t* ptr_yy_globals)
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002498
ethannicholasb3058bd2016-07-01 08:22:01 -07002499{
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 */
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002525
ethannicholasb3058bd2016-07-01 08:22:01 -07002526int sksllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002527
ethannicholasb3058bd2016-07-01 08:22:01 -07002528{
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 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002537
ethannicholasb3058bd2016-07-01 08:22:01 -07002538 *ptr_yy_globals = (yyscan_t) skslalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002539
ethannicholasb3058bd2016-07-01 08:22:01 -07002540 if (*ptr_yy_globals == NULL){
2541 errno = ENOMEM;
2542 return 1;
2543 }
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002544
ethannicholasb3058bd2016-07-01 08:22:01 -07002545 /* 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));
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002548
ethannicholasb3058bd2016-07-01 08:22:01 -07002549 skslset_extra (yy_user_defined, *ptr_yy_globals);
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002550
ethannicholasb3058bd2016-07-01 08:22:01 -07002551 return yy_init_globals ( *ptr_yy_globals );
2552}
2553
2554static 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
Ethan Nicholas94421942017-03-31 17:06:42 -04002561 yyg->yy_buffer_stack = NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07002562 yyg->yy_buffer_stack_top = 0;
2563 yyg->yy_buffer_stack_max = 0;
Ethan Nicholas94421942017-03-31 17:06:42 -04002564 yyg->yy_c_buf_p = NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07002565 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
Ethan Nicholas94421942017-03-31 17:06:42 -04002577 yyin = NULL;
2578 yyout = NULL;
ethannicholasb3058bd2016-07-01 08:22:01 -07002579#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. */
2588int 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
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002622static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002623{
Ethan Nicholas94421942017-03-31 17:06:42 -04002624 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2625 (void)yyg;
2626
2627 int i;
ethannicholasb3058bd2016-07-01 08:22:01 -07002628 for ( i = 0; i < n; ++i )
2629 s1[i] = s2[i];
2630}
2631#endif
2632
2633#ifdef YY_NEED_STRLEN
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002634static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
ethannicholasb3058bd2016-07-01 08:22:01 -07002635{
Ethan Nicholas94421942017-03-31 17:06:42 -04002636 int n;
ethannicholasb3058bd2016-07-01 08:22:01 -07002637 for ( n = 0; s[n]; ++n )
2638 ;
2639
2640 return n;
2641}
2642#endif
2643
2644void *skslalloc (yy_size_t size , yyscan_t yyscanner)
2645{
Ethan Nicholas94421942017-03-31 17:06:42 -04002646 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2647 (void)yyg;
2648 return malloc(size);
ethannicholasb3058bd2016-07-01 08:22:01 -07002649}
2650
2651void *skslrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2652{
Ethan Nicholas94421942017-03-31 17:06:42 -04002653 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2654 (void)yyg;
2655
ethannicholasb3058bd2016-07-01 08:22:01 -07002656 /* 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 */
Ethan Nicholas94421942017-03-31 17:06:42 -04002663 return realloc(ptr, size);
ethannicholasb3058bd2016-07-01 08:22:01 -07002664}
2665
2666void skslfree (void * ptr , yyscan_t yyscanner)
2667{
Ethan Nicholas94421942017-03-31 17:06:42 -04002668 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2669 (void)yyg;
ethannicholasb3058bd2016-07-01 08:22:01 -07002670 free( (char *) ptr ); /* see skslrealloc() for (char *) cast */
2671}
2672
2673#define YYTABLES_NAME "yytables"
2674
Ethan Nicholas762466e2017-06-29 10:03:38 -04002675#line 228 "sksl.flex"
Ethan Nicholas0dd30d92017-05-01 16:57:07 -04002676
ethannicholasb3058bd2016-07-01 08:22:01 -07002677
2678
2679int skslwrap(yyscan_t scanner) {
2680 return 1; // terminate
2681}
2682