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