Debian Codegraph @

visa/iga/IGALibrary/Frontend/lex.yy.cpp

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