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