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