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