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