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