this repo has no description
1
2#define YY_INT_ALIGNED short int
3
4/* A lexical scanner generated by flex */
5
6#define FLEX_SCANNER
7#define YY_FLEX_MAJOR_VERSION 2
8#define YY_FLEX_MINOR_VERSION 6
9#define YY_FLEX_SUBMINOR_VERSION 4
10#if YY_FLEX_SUBMINOR_VERSION > 0
11#define FLEX_BETA
12#endif
13
14#ifdef yy_create_buffer
15#define mzn_yy_create_buffer_ALREADY_DEFINED
16#else
17#define yy_create_buffer mzn_yy_create_buffer
18#endif
19
20#ifdef yy_delete_buffer
21#define mzn_yy_delete_buffer_ALREADY_DEFINED
22#else
23#define yy_delete_buffer mzn_yy_delete_buffer
24#endif
25
26#ifdef yy_scan_buffer
27#define mzn_yy_scan_buffer_ALREADY_DEFINED
28#else
29#define yy_scan_buffer mzn_yy_scan_buffer
30#endif
31
32#ifdef yy_scan_string
33#define mzn_yy_scan_string_ALREADY_DEFINED
34#else
35#define yy_scan_string mzn_yy_scan_string
36#endif
37
38#ifdef yy_scan_bytes
39#define mzn_yy_scan_bytes_ALREADY_DEFINED
40#else
41#define yy_scan_bytes mzn_yy_scan_bytes
42#endif
43
44#ifdef yy_init_buffer
45#define mzn_yy_init_buffer_ALREADY_DEFINED
46#else
47#define yy_init_buffer mzn_yy_init_buffer
48#endif
49
50#ifdef yy_flush_buffer
51#define mzn_yy_flush_buffer_ALREADY_DEFINED
52#else
53#define yy_flush_buffer mzn_yy_flush_buffer
54#endif
55
56#ifdef yy_load_buffer_state
57#define mzn_yy_load_buffer_state_ALREADY_DEFINED
58#else
59#define yy_load_buffer_state mzn_yy_load_buffer_state
60#endif
61
62#ifdef yy_switch_to_buffer
63#define mzn_yy_switch_to_buffer_ALREADY_DEFINED
64#else
65#define yy_switch_to_buffer mzn_yy_switch_to_buffer
66#endif
67
68#ifdef yypush_buffer_state
69#define mzn_yypush_buffer_state_ALREADY_DEFINED
70#else
71#define yypush_buffer_state mzn_yypush_buffer_state
72#endif
73
74#ifdef yypop_buffer_state
75#define mzn_yypop_buffer_state_ALREADY_DEFINED
76#else
77#define yypop_buffer_state mzn_yypop_buffer_state
78#endif
79
80#ifdef yyensure_buffer_stack
81#define mzn_yyensure_buffer_stack_ALREADY_DEFINED
82#else
83#define yyensure_buffer_stack mzn_yyensure_buffer_stack
84#endif
85
86#ifdef yylex
87#define mzn_yylex_ALREADY_DEFINED
88#else
89#define yylex mzn_yylex
90#endif
91
92#ifdef yyrestart
93#define mzn_yyrestart_ALREADY_DEFINED
94#else
95#define yyrestart mzn_yyrestart
96#endif
97
98#ifdef yylex_init
99#define mzn_yylex_init_ALREADY_DEFINED
100#else
101#define yylex_init mzn_yylex_init
102#endif
103
104#ifdef yylex_init_extra
105#define mzn_yylex_init_extra_ALREADY_DEFINED
106#else
107#define yylex_init_extra mzn_yylex_init_extra
108#endif
109
110#ifdef yylex_destroy
111#define mzn_yylex_destroy_ALREADY_DEFINED
112#else
113#define yylex_destroy mzn_yylex_destroy
114#endif
115
116#ifdef yyget_debug
117#define mzn_yyget_debug_ALREADY_DEFINED
118#else
119#define yyget_debug mzn_yyget_debug
120#endif
121
122#ifdef yyset_debug
123#define mzn_yyset_debug_ALREADY_DEFINED
124#else
125#define yyset_debug mzn_yyset_debug
126#endif
127
128#ifdef yyget_extra
129#define mzn_yyget_extra_ALREADY_DEFINED
130#else
131#define yyget_extra mzn_yyget_extra
132#endif
133
134#ifdef yyset_extra
135#define mzn_yyset_extra_ALREADY_DEFINED
136#else
137#define yyset_extra mzn_yyset_extra
138#endif
139
140#ifdef yyget_in
141#define mzn_yyget_in_ALREADY_DEFINED
142#else
143#define yyget_in mzn_yyget_in
144#endif
145
146#ifdef yyset_in
147#define mzn_yyset_in_ALREADY_DEFINED
148#else
149#define yyset_in mzn_yyset_in
150#endif
151
152#ifdef yyget_out
153#define mzn_yyget_out_ALREADY_DEFINED
154#else
155#define yyget_out mzn_yyget_out
156#endif
157
158#ifdef yyset_out
159#define mzn_yyset_out_ALREADY_DEFINED
160#else
161#define yyset_out mzn_yyset_out
162#endif
163
164#ifdef yyget_leng
165#define mzn_yyget_leng_ALREADY_DEFINED
166#else
167#define yyget_leng mzn_yyget_leng
168#endif
169
170#ifdef yyget_text
171#define mzn_yyget_text_ALREADY_DEFINED
172#else
173#define yyget_text mzn_yyget_text
174#endif
175
176#ifdef yyget_lineno
177#define mzn_yyget_lineno_ALREADY_DEFINED
178#else
179#define yyget_lineno mzn_yyget_lineno
180#endif
181
182#ifdef yyset_lineno
183#define mzn_yyset_lineno_ALREADY_DEFINED
184#else
185#define yyset_lineno mzn_yyset_lineno
186#endif
187
188#ifdef yyget_column
189#define mzn_yyget_column_ALREADY_DEFINED
190#else
191#define yyget_column mzn_yyget_column
192#endif
193
194#ifdef yyset_column
195#define mzn_yyset_column_ALREADY_DEFINED
196#else
197#define yyset_column mzn_yyset_column
198#endif
199
200#ifdef yywrap
201#define mzn_yywrap_ALREADY_DEFINED
202#else
203#define yywrap mzn_yywrap
204#endif
205
206#ifdef yyget_lval
207#define mzn_yyget_lval_ALREADY_DEFINED
208#else
209#define yyget_lval mzn_yyget_lval
210#endif
211
212#ifdef yyset_lval
213#define mzn_yyset_lval_ALREADY_DEFINED
214#else
215#define yyset_lval mzn_yyset_lval
216#endif
217
218#ifdef yyget_lloc
219#define mzn_yyget_lloc_ALREADY_DEFINED
220#else
221#define yyget_lloc mzn_yyget_lloc
222#endif
223
224#ifdef yyset_lloc
225#define mzn_yyset_lloc_ALREADY_DEFINED
226#else
227#define yyset_lloc mzn_yyset_lloc
228#endif
229
230#ifdef yyalloc
231#define mzn_yyalloc_ALREADY_DEFINED
232#else
233#define yyalloc mzn_yyalloc
234#endif
235
236#ifdef yyrealloc
237#define mzn_yyrealloc_ALREADY_DEFINED
238#else
239#define yyrealloc mzn_yyrealloc
240#endif
241
242#ifdef yyfree
243#define mzn_yyfree_ALREADY_DEFINED
244#else
245#define yyfree mzn_yyfree
246#endif
247
248/* First, we deal with platform-specific or compiler-specific issues. */
249
250/* begin standard C headers. */
251#include <stdio.h>
252#include <string.h>
253#include <errno.h>
254#include <stdlib.h>
255
256/* end standard C headers. */
257
258/* flex integer type definitions */
259
260#ifndef FLEXINT_H
261#define FLEXINT_H
262
263/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
264
265#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
266
267/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
268 * if you want the limit (max/min) macros for int types.
269 */
270#ifndef __STDC_LIMIT_MACROS
271#define __STDC_LIMIT_MACROS 1
272#endif
273
274#include <inttypes.h>
275typedef int8_t flex_int8_t;
276typedef uint8_t flex_uint8_t;
277typedef int16_t flex_int16_t;
278typedef uint16_t flex_uint16_t;
279typedef int32_t flex_int32_t;
280typedef uint32_t flex_uint32_t;
281#else
282typedef signed char flex_int8_t;
283typedef short int flex_int16_t;
284typedef int flex_int32_t;
285typedef unsigned char flex_uint8_t;
286typedef unsigned short int flex_uint16_t;
287typedef unsigned int flex_uint32_t;
288
289/* Limits of integral types. */
290#ifndef INT8_MIN
291#define INT8_MIN (-128)
292#endif
293#ifndef INT16_MIN
294#define INT16_MIN (-32767-1)
295#endif
296#ifndef INT32_MIN
297#define INT32_MIN (-2147483647-1)
298#endif
299#ifndef INT8_MAX
300#define INT8_MAX (127)
301#endif
302#ifndef INT16_MAX
303#define INT16_MAX (32767)
304#endif
305#ifndef INT32_MAX
306#define INT32_MAX (2147483647)
307#endif
308#ifndef UINT8_MAX
309#define UINT8_MAX (255U)
310#endif
311#ifndef UINT16_MAX
312#define UINT16_MAX (65535U)
313#endif
314#ifndef UINT32_MAX
315#define UINT32_MAX (4294967295U)
316#endif
317
318#ifndef SIZE_MAX
319#define SIZE_MAX (~(size_t)0)
320#endif
321
322#endif /* ! C99 */
323
324#endif /* ! FLEXINT_H */
325
326/* begin standard C++ headers. */
327
328/* TODO: this is always defined, so inline it */
329#define yyconst const
330
331#if defined(__GNUC__) && __GNUC__ >= 3
332#define yynoreturn __attribute__((__noreturn__))
333#else
334#define yynoreturn
335#endif
336
337/* Returned upon end-of-file. */
338#define YY_NULL 0
339
340/* Promotes a possibly negative, possibly signed char to an
341 * integer in range [0..255] for use as an array index.
342 */
343#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
344
345/* An opaque pointer. */
346#ifndef YY_TYPEDEF_YY_SCANNER_T
347#define YY_TYPEDEF_YY_SCANNER_T
348typedef void* yyscan_t;
349#endif
350
351/* For convenience, these vars (plus the bison vars far below)
352 are macros in the reentrant scanner. */
353#define yyin yyg->yyin_r
354#define yyout yyg->yyout_r
355#define yyextra yyg->yyextra_r
356#define yyleng yyg->yyleng_r
357#define yytext yyg->yytext_r
358#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
359#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
360#define yy_flex_debug yyg->yy_flex_debug_r
361
362/* Enter a start condition. This macro really ought to take a parameter,
363 * but we do it the disgusting crufty way forced on us by the ()-less
364 * definition of BEGIN.
365 */
366#define BEGIN yyg->yy_start = 1 + 2 *
367/* Translate the current start state into a value that can be later handed
368 * to BEGIN to return to the state. The YYSTATE alias is for lex
369 * compatibility.
370 */
371#define YY_START ((yyg->yy_start - 1) / 2)
372#define YYSTATE YY_START
373/* Action number for EOF rule of a given start state. */
374#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
375/* Special action meaning "start processing a new file". */
376#define YY_NEW_FILE yyrestart( yyin , yyscanner )
377#define YY_END_OF_BUFFER_CHAR 0
378
379/* Size of default input buffer. */
380#ifndef YY_BUF_SIZE
381#ifdef __ia64__
382/* On IA-64, the buffer size is 16k, not 8k.
383 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
384 * Ditto for the __ia64__ case accordingly.
385 */
386#define YY_BUF_SIZE 32768
387#else
388#define YY_BUF_SIZE 16384
389#endif /* __ia64__ */
390#endif
391
392/* The state buf must be large enough to hold one state per character in the main buffer.
393 */
394#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
395
396#ifndef YY_TYPEDEF_YY_BUFFER_STATE
397#define YY_TYPEDEF_YY_BUFFER_STATE
398typedef struct yy_buffer_state *YY_BUFFER_STATE;
399#endif
400
401#ifndef YY_TYPEDEF_YY_SIZE_T
402#define YY_TYPEDEF_YY_SIZE_T
403typedef size_t yy_size_t;
404#endif
405
406#define EOB_ACT_CONTINUE_SCAN 0
407#define EOB_ACT_END_OF_FILE 1
408#define EOB_ACT_LAST_MATCH 2
409
410 #define YY_LESS_LINENO(n)
411 #define YY_LINENO_REWIND_TO(ptr)
412
413/* Return all but the first "n" matched characters back to the input stream. */
414#define yyless(n) \
415 do \
416 { \
417 /* Undo effects of setting up yytext. */ \
418 int yyless_macro_arg = (n); \
419 YY_LESS_LINENO(yyless_macro_arg);\
420 *yy_cp = yyg->yy_hold_char; \
421 YY_RESTORE_YY_MORE_OFFSET \
422 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
423 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
424 } \
425 while ( 0 )
426#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
427
428#ifndef YY_STRUCT_YY_BUFFER_STATE
429#define YY_STRUCT_YY_BUFFER_STATE
430struct yy_buffer_state
431 {
432 FILE *yy_input_file;
433
434 char *yy_ch_buf; /* input buffer */
435 char *yy_buf_pos; /* current position in input buffer */
436
437 /* Size of input buffer in bytes, not including room for EOB
438 * characters.
439 */
440 int yy_buf_size;
441
442 /* Number of characters read into yy_ch_buf, not including EOB
443 * characters.
444 */
445 int yy_n_chars;
446
447 /* Whether we "own" the buffer - i.e., we know we created it,
448 * and can realloc() it to grow it, and should free() it to
449 * delete it.
450 */
451 int yy_is_our_buffer;
452
453 /* Whether this is an "interactive" input source; if so, and
454 * if we're using stdio for input, then we want to use getc()
455 * instead of fread(), to make sure we stop fetching input after
456 * each newline.
457 */
458 int yy_is_interactive;
459
460 /* Whether we're considered to be at the beginning of a line.
461 * If so, '^' rules will be active on the next match, otherwise
462 * not.
463 */
464 int yy_at_bol;
465
466 int yy_bs_lineno; /**< The line count. */
467 int yy_bs_column; /**< The column count. */
468
469 /* Whether to try to fill the input buffer when we reach the
470 * end of it.
471 */
472 int yy_fill_buffer;
473
474 int yy_buffer_status;
475
476#define YY_BUFFER_NEW 0
477#define YY_BUFFER_NORMAL 1
478 /* When an EOF's been seen but there's still some text to process
479 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
480 * shouldn't try reading from the input source any more. We might
481 * still have a bunch of tokens to match, though, because of
482 * possible backing-up.
483 *
484 * When we actually see the EOF, we change the status to "new"
485 * (via yyrestart()), so that the user can continue scanning by
486 * just pointing yyin at a new input file.
487 */
488#define YY_BUFFER_EOF_PENDING 2
489
490 };
491#endif /* !YY_STRUCT_YY_BUFFER_STATE */
492
493/* We provide macros for accessing buffer states in case in the
494 * future we want to put the buffer states in a more general
495 * "scanner state".
496 *
497 * Returns the top of the stack, or NULL.
498 */
499#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
500 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
501 : NULL)
502/* Same as previous macro, but useful when we know that the buffer stack is not
503 * NULL or when we need an lvalue. For internal use only.
504 */
505#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
506
507void yyrestart ( FILE *input_file , yyscan_t yyscanner );
508void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
509YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
510void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
511void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
512void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
513void yypop_buffer_state ( yyscan_t yyscanner );
514
515static void yyensure_buffer_stack ( yyscan_t yyscanner );
516static void yy_load_buffer_state ( yyscan_t yyscanner );
517static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
518#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
519
520YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
521YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
522YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
523
524void *yyalloc ( yy_size_t , yyscan_t yyscanner );
525void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
526void yyfree ( void * , yyscan_t yyscanner );
527
528#define yy_new_buffer yy_create_buffer
529#define yy_set_interactive(is_interactive) \
530 { \
531 if ( ! YY_CURRENT_BUFFER ){ \
532 yyensure_buffer_stack (yyscanner); \
533 YY_CURRENT_BUFFER_LVALUE = \
534 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
535 } \
536 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
537 }
538#define yy_set_bol(at_bol) \
539 { \
540 if ( ! YY_CURRENT_BUFFER ){\
541 yyensure_buffer_stack (yyscanner); \
542 YY_CURRENT_BUFFER_LVALUE = \
543 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
544 } \
545 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
546 }
547#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
548
549/* Begin user sect3 */
550
551#define mzn_yywrap(yyscanner) (/*CONSTCOND*/1)
552#define YY_SKIP_YYWRAP
553typedef flex_uint8_t YY_CHAR;
554
555typedef int yy_state_type;
556
557#define yytext_ptr yytext_r
558
559static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
560static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
561static int yy_get_next_buffer ( yyscan_t yyscanner );
562static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
563
564/* Done after the current pattern has been matched and before the
565 * corresponding action - sets up yytext.
566 */
567#define YY_DO_BEFORE_ACTION \
568 yyg->yytext_ptr = yy_bp; \
569 yyleng = (int) (yy_cp - yy_bp); \
570 yyg->yy_hold_char = *yy_cp; \
571 *yy_cp = '\0'; \
572 yyg->yy_c_buf_p = yy_cp;
573#define YY_NUM_RULES 183
574#define YY_END_OF_BUFFER 184
575/* This struct is not used in this scanner,
576 but its presence is necessary. */
577struct yy_trans_info
578 {
579 flex_int32_t yy_verify;
580 flex_int32_t yy_nxt;
581 };
582static const flex_int16_t yy_accept[506] =
583 { 0,
584 0, 0, 170, 170, 170, 170, 0, 0, 0, 0,
585 0, 0, 0, 0, 0, 0, 184, 182, 3, 2,
586 182, 169, 182, 23, 182, 166, 103, 99, 33, 101,
587 33, 105, 29, 29, 33, 113, 123, 117, 143, 19,
588 182, 21, 108, 37, 182, 143, 143, 143, 143, 143,
589 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
590 143, 143, 143, 143, 33, 182, 182, 182, 1, 170,
591 180, 179, 177, 179, 1, 178, 179, 16, 18, 17,
592 1, 6, 8, 7, 1, 11, 13, 12, 1, 167,
593 168, 125, 0, 165, 23, 0, 0, 144, 0, 0,
594
595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
596 0, 0, 0, 0, 0, 0, 110, 127, 34, 14,
597 135, 0, 29, 0, 0, 0, 36, 129, 115, 112,
598 121, 119, 143, 20, 133, 0, 145, 145, 0, 143,
599 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
600 143, 56, 61, 143, 143, 143, 143, 143, 143, 72,
601 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
602 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
603 22, 138, 137, 140, 139, 152, 0, 0, 0, 0,
604 0, 170, 174, 173, 175, 173, 171, 172, 176, 16,
605
606 15, 6, 5, 11, 10, 164, 165, 0, 104, 100,
607 0, 102, 0, 0, 106, 0, 114, 0, 0, 124,
608 0, 118, 0, 0, 109, 0, 0, 0, 0, 0,
609 0, 0, 0, 0, 4, 30, 0, 32, 0, 27,
610 28, 131, 107, 145, 145, 0, 181, 38, 40, 143,
611 143, 143, 143, 143, 143, 46, 143, 143, 143, 143,
612 143, 143, 143, 143, 63, 64, 143, 143, 143, 68,
613 70, 74, 143, 75, 143, 143, 143, 79, 143, 143,
614 143, 143, 143, 143, 143, 143, 143, 143, 143, 94,
615 143, 97, 0, 153, 154, 155, 146, 147, 148, 151,
616
617 156, 157, 162, 161, 158, 159, 160, 149, 150, 164,
618 126, 111, 128, 35, 136, 130, 0, 116, 122, 120,
619 134, 0, 0, 62, 0, 0, 0, 0, 0, 0,
620 0, 0, 141, 9, 0, 0, 0, 0, 145, 143,
621 143, 42, 43, 143, 143, 48, 50, 143, 53, 143,
622 143, 143, 143, 143, 143, 65, 143, 143, 143, 143,
623 143, 143, 143, 143, 143, 143, 143, 88, 89, 24,
624 143, 91, 143, 143, 143, 0, 132, 0, 47, 0,
625 69, 71, 0, 0, 0, 0, 98, 0, 31, 0,
626 0, 26, 145, 143, 41, 143, 143, 143, 52, 25,
627
628 54, 143, 143, 143, 143, 143, 143, 143, 143, 143,
629 143, 80, 143, 143, 143, 143, 90, 92, 143, 96,
630 163, 49, 0, 0, 0, 0, 0, 0, 26, 145,
631 143, 143, 143, 51, 143, 143, 143, 143, 143, 143,
632 73, 143, 77, 143, 81, 82, 143, 143, 143, 0,
633 0, 0, 0, 93, 145, 143, 143, 45, 143, 57,
634 143, 143, 143, 143, 143, 78, 143, 86, 143, 0,
635 83, 0, 0, 145, 143, 143, 55, 58, 143, 66,
636 67, 143, 84, 143, 0, 0, 87, 145, 143, 143,
637 59, 76, 143, 0, 85, 142, 39, 44, 143, 60,
638
639 143, 143, 143, 95, 0
640 } ;
641
642static const YY_CHAR yy_ec[256] =
643 { 0,
644 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
645 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647 1, 2, 5, 6, 1, 7, 8, 1, 9, 10,
648 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
649 20, 20, 20, 20, 20, 21, 21, 22, 14, 23,
650 24, 25, 1, 1, 26, 26, 26, 26, 27, 26,
651 28, 28, 28, 28, 28, 28, 28, 28, 28, 29,
652 28, 28, 28, 28, 28, 28, 28, 30, 28, 28,
653 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
654
655 41, 42, 43, 44, 45, 46, 28, 47, 48, 49,
656 50, 51, 28, 52, 53, 54, 55, 56, 57, 58,
657 59, 60, 14, 61, 14, 62, 1, 63, 64, 1,
658 65, 1, 1, 66, 67, 68, 69, 70, 1, 1,
659 1, 1, 1, 71, 1, 72, 1, 73, 1, 1,
660 1, 1, 1, 1, 1, 1, 1, 74, 1, 75,
661 1, 1, 1, 76, 77, 1, 78, 79, 80, 81,
662 1, 82, 1, 1, 1, 1, 1, 1, 1, 1,
663 1, 1, 1, 1, 83, 1, 84, 1, 1, 1,
664 1, 1, 1, 85, 1, 1, 1, 1, 1, 1,
665
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, 86, 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
672 } ;
673
674static const YY_CHAR yy_meta[88] =
675 { 0,
676 1, 1, 2, 3, 1, 4, 5, 1, 1, 1,
677 1, 6, 1, 1, 1, 7, 1, 8, 8, 8,
678 8, 1, 1, 1, 1, 9, 9, 10, 9, 10,
679 1, 4, 1, 1, 11, 12, 9, 9, 9, 9,
680 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
681 9, 10, 10, 10, 10, 10, 10, 10, 10, 10,
682 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
683 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
684 1, 1, 1, 1, 1, 1, 3
685 } ;
686
687static const flex_int16_t yy_base[527] =
688 { 0,
689 0, 0, 85, 89, 93, 97, 95, 99, 101, 102,
690 103, 106, 881, 880, 879, 878, 888, 893, 893, 893,
691 863, 893, 879, 0, 189, 893, 893, 872, 893, 859,
692 867, 78, 112, 125, 860, 111, 857, 856, 0, 818,
693 861, 893, 862, 826, 0, 67, 825, 87, 67, 73,
694 101, 85, 106, 113, 824, 113, 117, 832, 124, 156,
695 823, 834, 826, 819, 835, 204, 785, 156, 893, 0,
696 893, 893, 893, 186, 893, 893, 221, 0, 893, 849,
697 0, 0, 893, 848, 0, 0, 893, 847, 0, 893,
698 893, 893, 0, 0, 0, 178, 224, 893, 200, 230,
699
700 227, 241, 232, 245, 252, 254, 846, 236, 240, 249,
701 256, 257, 258, 262, 265, 290, 893, 893, 893, 850,
702 893, 300, 307, 317, 323, 273, 893, 836, 893, 893,
703 893, 893, 0, 893, 893, 841, 0, 821, 822, 100,
704 805, 806, 802, 805, 811, 115, 799, 120, 804, 800,
705 800, 0, 241, 794, 794, 788, 796, 804, 789, 0,
706 788, 787, 788, 798, 799, 783, 782, 788, 782, 249,
707 785, 779, 790, 775, 778, 777, 782, 774, 784, 772,
708 893, 893, 893, 893, 893, 893, 739, 237, 303, 270,
709 285, 0, 893, 893, 893, 893, 893, 893, 893, 0,
710
711 893, 0, 893, 0, 893, 0, 0, 292, 893, 893,
712 322, 893, 324, 344, 893, 813, 893, 348, 346, 893,
713 358, 893, 360, 812, 893, 361, 365, 366, 370, 363,
714 377, 376, 378, 379, 808, 408, 413, 418, 424, 389,
715 428, 893, 893, 0, 773, 782, 893, 767, 0, 779,
716 768, 773, 760, 775, 769, 0, 769, 764, 760, 754,
717 769, 766, 757, 758, 761, 0, 747, 755, 754, 0,
718 0, 0, 747, 0, 757, 746, 750, 0, 738, 748,
719 739, 750, 750, 735, 739, 746, 739, 744, 734, 738,
720 730, 0, 696, 893, 893, 893, 893, 893, 893, 893,
721
722 893, 893, 893, 893, 893, 893, 893, 893, 893, 0,
723 893, 893, 893, 893, 893, 893, 380, 893, 893, 893,
724 893, 443, 390, 893, 445, 391, 444, 446, 447, 449,
725 448, 450, 893, 893, 482, 148, 152, 491, 739, 725,
726 719, 0, 0, 723, 721, 0, 730, 732, 0, 732,
727 718, 717, 715, 720, 716, 0, 689, 685, 670, 676,
728 661, 656, 658, 649, 656, 626, 632, 0, 0, 0,
729 624, 0, 612, 623, 618, 525, 893, 451, 893, 461,
730 893, 893, 464, 462, 475, 459, 893, 497, 503, 512,
731 516, 520, 568, 569, 0, 552, 556, 560, 0, 0,
732
733 0, 556, 560, 554, 545, 552, 551, 541, 555, 553,
734 550, 0, 543, 531, 525, 535, 0, 0, 527, 0,
735 893, 893, 510, 517, 519, 520, 458, 525, 535, 521,
736 520, 532, 513, 0, 515, 518, 494, 446, 414, 412,
737 0, 404, 0, 361, 0, 0, 375, 373, 359, 538,
738 460, 541, 548, 893, 362, 359, 351, 0, 345, 0,
739 332, 320, 317, 299, 275, 0, 262, 0, 277, 549,
740 893, 551, 552, 248, 246, 233, 0, 0, 225, 0,
741 0, 214, 0, 194, 555, 557, 893, 166, 142, 131,
742 0, 0, 132, 559, 893, 0, 0, 0, 128, 893,
743
744 90, 71, 54, 0, 893, 609, 621, 633, 645, 653,
745 663, 675, 680, 683, 685, 695, 707, 719, 731, 735,
746 738, 742, 746, 751, 756, 758
747 } ;
748
749static const flex_int16_t yy_def[527] =
750 { 0,
751 505, 1, 506, 506, 506, 506, 507, 507, 508, 508,
752 509, 509, 1, 1, 1, 1, 505, 505, 505, 505,
753 505, 505, 510, 511, 512, 505, 505, 505, 505, 505,
754 505, 505, 505, 505, 505, 505, 505, 505, 513, 505,
755 505, 505, 505, 514, 515, 513, 513, 513, 513, 513,
756 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
757 513, 513, 513, 513, 505, 505, 505, 505, 505, 516,
758 505, 505, 505, 505, 505, 505, 505, 517, 505, 505,
759 517, 518, 505, 505, 518, 519, 505, 505, 519, 505,
760 505, 505, 520, 521, 511, 512, 512, 505, 512, 512,
761
762 512, 512, 512, 512, 512, 512, 505, 512, 512, 512,
763 512, 512, 512, 512, 512, 512, 505, 505, 505, 505,
764 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
765 505, 505, 513, 505, 505, 505, 522, 522, 523, 513,
766 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
767 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
768 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
769 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
770 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
771 505, 516, 505, 505, 505, 505, 505, 505, 505, 517,
772
773 505, 518, 505, 519, 505, 524, 521, 512, 505, 505,
774 512, 505, 512, 512, 505, 505, 505, 512, 512, 505,
775 512, 505, 512, 505, 505, 512, 512, 512, 512, 512,
776 512, 512, 512, 512, 505, 505, 505, 505, 505, 525,
777 505, 505, 505, 522, 522, 523, 505, 513, 513, 513,
778 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
779 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
780 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
781 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
782 513, 513, 505, 505, 505, 505, 505, 505, 505, 505,
783
784 505, 505, 505, 505, 505, 505, 505, 505, 505, 524,
785 505, 505, 505, 505, 505, 505, 512, 505, 505, 505,
786 505, 512, 512, 505, 512, 512, 512, 512, 512, 512,
787 512, 512, 505, 505, 505, 526, 526, 505, 522, 513,
788 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
789 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
790 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
791 513, 513, 513, 513, 513, 505, 505, 512, 505, 512,
792 505, 505, 512, 512, 512, 512, 505, 505, 505, 505,
793 505, 505, 522, 513, 513, 513, 513, 513, 513, 513,
794
795 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
796 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
797 505, 505, 512, 512, 512, 512, 512, 505, 505, 522,
798 513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
799 513, 513, 513, 513, 513, 513, 513, 513, 513, 512,
800 512, 512, 512, 505, 522, 513, 513, 513, 513, 513,
801 513, 513, 513, 513, 513, 513, 513, 513, 513, 512,
802 505, 512, 512, 522, 513, 513, 513, 513, 513, 513,
803 513, 513, 513, 513, 512, 512, 505, 522, 513, 513,
804 513, 513, 513, 512, 505, 522, 513, 513, 513, 505,
805
806 513, 513, 513, 513, 0, 505, 505, 505, 505, 505,
807 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
808 505, 505, 505, 505, 505, 505
809 } ;
810
811static const flex_int16_t yy_nxt[981] =
812 { 0,
813 18, 19, 20, 19, 21, 22, 23, 24, 25, 26,
814 18, 27, 28, 29, 30, 31, 32, 33, 34, 34,
815 34, 35, 36, 37, 38, 39, 39, 39, 39, 39,
816 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
817 50, 51, 39, 39, 52, 39, 53, 54, 55, 56,
818 57, 58, 59, 60, 61, 62, 63, 64, 39, 39,
819 65, 66, 18, 18, 18, 18, 18, 18, 18, 18,
820 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
821 18, 18, 18, 18, 67, 68, 69, 71, 72, 120,
822 73, 71, 72, 504, 73, 71, 72, 79, 76, 71,
823
824 72, 79, 76, 83, 83, 87, 80, 145, 87, 121,
825 80, 146, 84, 84, 88, 140, 74, 88, 141, 147,
826 74, 148, 503, 143, 77, 128, 152, 122, 77, 123,
827 123, 123, 123, 153, 129, 130, 144, 149, 124, 502,
828 122, 125, 123, 123, 123, 123, 154, 150, 248, 156,
829 155, 124, 124, 163, 160, 151, 255, 157, 249, 258,
830 166, 126, 158, 161, 167, 124, 501, 162, 164, 125,
831 256, 75, 499, 168, 259, 75, 390, 169, 170, 75,
832 390, 81, 171, 75, 498, 81, 98, 85, 85, 89,
833 497, 193, 89, 97, 194, 195, 172, 98, 390, 173,
834
835 99, 100, 390, 101, 102, 103, 496, 174, 209, 505,
836 175, 104, 105, 106, 176, 182, 183, 196, 184, 187,
837 107, 188, 108, 189, 190, 191, 193, 185, 109, 194,
838 199, 505, 98, 110, 197, 212, 111, 112, 210, 198,
839 215, 113, 211, 114, 225, 493, 115, 208, 98, 98,
840 116, 213, 196, 217, 492, 505, 214, 98, 505, 218,
841 220, 505, 222, 216, 98, 98, 98, 505, 219, 197,
842 98, 505, 505, 98, 198, 221, 505, 223, 491, 263,
843 505, 490, 264, 505, 226, 505, 281, 505, 505, 505,
844 241, 241, 241, 505, 265, 489, 505, 227, 98, 282,
845
846 311, 234, 234, 488, 234, 228, 229, 294, 295, 296,
847 232, 484, 230, 234, 233, 483, 231, 236, 236, 236,
848 236, 505, 122, 505, 123, 123, 123, 123, 482, 237,
849 312, 237, 313, 124, 238, 238, 238, 238, 239, 481,
850 240, 240, 240, 240, 305, 306, 307, 124, 240, 240,
851 308, 309, 314, 505, 318, 505, 316, 480, 479, 240,
852 240, 240, 240, 240, 240, 297, 319, 298, 320, 98,
853 299, 98, 317, 324, 98, 505, 300, 505, 98, 505,
854 301, 302, 303, 304, 98, 98, 98, 333, 377, 505,
855 478, 505, 505, 477, 505, 476, 505, 505, 379, 381,
856
857 328, 505, 322, 475, 337, 326, 474, 505, 505, 505,
858 505, 505, 469, 329, 468, 467, 323, 338, 325, 466,
859 331, 505, 505, 327, 330, 236, 236, 236, 236, 332,
860 238, 238, 238, 238, 335, 238, 238, 238, 238, 338,
861 465, 336, 336, 336, 336, 241, 241, 241, 335, 336,
862 336, 98, 382, 98, 98, 98, 98, 98, 387, 422,
863 336, 336, 336, 336, 336, 336, 454, 98, 471, 98,
864 98, 464, 98, 463, 505, 505, 505, 505, 505, 505,
865 505, 505, 505, 98, 378, 380, 462, 384, 385, 505,
866 505, 505, 505, 505, 388, 505, 388, 386, 383, 389,
867
868 389, 389, 389, 391, 424, 391, 505, 427, 392, 392,
869 392, 392, 423, 425, 389, 389, 389, 389, 98, 426,
870 389, 389, 389, 389, 428, 98, 428, 98, 98, 429,
871 429, 429, 429, 392, 392, 392, 392, 392, 392, 392,
872 392, 505, 429, 429, 429, 429, 98, 461, 505, 98,
873 505, 505, 429, 429, 429, 429, 98, 98, 460, 98,
874 487, 453, 450, 98, 459, 495, 458, 500, 457, 505,
875 451, 452, 505, 456, 455, 449, 448, 447, 470, 505,
876 505, 472, 505, 505, 446, 445, 505, 485, 505, 473,
877 505, 444, 443, 442, 441, 440, 439, 438, 437, 436,
878
879 435, 434, 433, 432, 486, 431, 430, 421, 494, 70,
880 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
881 70, 78, 78, 78, 78, 78, 78, 78, 78, 78,
882 78, 78, 78, 82, 82, 82, 82, 82, 82, 82,
883 82, 82, 82, 82, 82, 86, 86, 86, 86, 86,
884 86, 86, 86, 86, 86, 86, 86, 94, 420, 419,
885 418, 94, 94, 95, 417, 95, 95, 95, 95, 95,
886 95, 95, 95, 95, 95, 96, 416, 415, 96, 96,
887 96, 96, 96, 96, 96, 96, 96, 133, 133, 133,
888 133, 137, 137, 139, 139, 192, 414, 413, 412, 192,
889
890 192, 192, 192, 192, 192, 192, 192, 200, 411, 200,
891 200, 200, 410, 200, 200, 200, 200, 200, 200, 202,
892 409, 202, 202, 202, 408, 202, 202, 202, 202, 202,
893 202, 204, 407, 204, 204, 204, 406, 204, 204, 204,
894 204, 204, 204, 206, 206, 207, 207, 207, 207, 244,
895 244, 244, 244, 246, 246, 246, 246, 246, 310, 310,
896 310, 310, 240, 240, 240, 336, 336, 405, 404, 403,
897 402, 401, 400, 399, 398, 397, 396, 395, 394, 393,
898 376, 375, 374, 373, 372, 371, 370, 369, 368, 367,
899 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
900
901 356, 355, 354, 353, 352, 351, 350, 349, 348, 347,
902 346, 345, 344, 343, 342, 341, 340, 247, 339, 334,
903 321, 315, 293, 292, 291, 290, 289, 288, 287, 286,
904 285, 284, 283, 280, 279, 278, 277, 276, 275, 274,
905 273, 272, 271, 270, 269, 268, 267, 266, 262, 261,
906 260, 257, 254, 253, 252, 251, 250, 247, 245, 243,
907 242, 235, 224, 205, 203, 201, 186, 181, 180, 179,
908 178, 177, 165, 159, 142, 138, 136, 135, 134, 132,
909 131, 127, 119, 118, 117, 93, 92, 505, 91, 91,
910 90, 90, 17, 505, 505, 505, 505, 505, 505, 505,
911
912 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
913 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
914 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
915 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
916 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
917 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
918 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
919 505, 505, 505, 505, 505, 505, 505, 505, 505, 505
920 } ;
921
922static const flex_int16_t yy_chk[981] =
923 { 0,
924 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
925 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
926 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
927 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
928 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
929 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
930 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
931 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
932 1, 1, 1, 1, 1, 1, 1, 3, 3, 32,
933 3, 4, 4, 503, 4, 5, 5, 7, 5, 6,
934
935 6, 8, 6, 9, 10, 11, 7, 49, 12, 32,
936 8, 49, 9, 10, 11, 46, 3, 12, 46, 50,
937 4, 50, 502, 48, 5, 36, 52, 33, 6, 33,
938 33, 33, 33, 52, 36, 36, 48, 51, 33, 501,
939 34, 33, 34, 34, 34, 34, 53, 51, 140, 54,
940 53, 34, 33, 57, 56, 51, 146, 54, 140, 148,
941 59, 33, 54, 56, 59, 34, 499, 56, 57, 33,
942 146, 3, 493, 59, 148, 4, 336, 59, 59, 5,
943 337, 7, 59, 6, 490, 8, 96, 9, 10, 11,
944 489, 74, 12, 25, 74, 74, 60, 25, 336, 60,
945
946 25, 25, 337, 25, 25, 25, 488, 60, 99, 96,
947 60, 25, 25, 25, 60, 66, 66, 74, 66, 68,
948 25, 68, 25, 68, 68, 68, 77, 66, 25, 77,
949 77, 99, 97, 25, 74, 101, 25, 25, 100, 74,
950 103, 25, 100, 25, 108, 484, 25, 97, 109, 102,
951 25, 101, 77, 104, 482, 97, 102, 110, 101, 104,
952 105, 100, 106, 103, 111, 112, 113, 108, 104, 77,
953 114, 109, 102, 115, 77, 105, 104, 106, 479, 153,
954 110, 476, 153, 105, 109, 106, 170, 111, 112, 113,
955 126, 126, 126, 114, 153, 475, 115, 110, 116, 170,
956
957 208, 116, 116, 474, 116, 111, 112, 188, 188, 188,
958 114, 469, 113, 116, 115, 467, 113, 122, 122, 122,
959 122, 116, 123, 208, 123, 123, 123, 123, 465, 124,
960 211, 124, 213, 123, 124, 124, 124, 124, 125, 464,
961 125, 125, 125, 125, 190, 190, 190, 123, 125, 125,
962 191, 191, 214, 211, 219, 213, 218, 463, 462, 125,
963 125, 125, 125, 125, 125, 189, 221, 189, 223, 226,
964 189, 230, 218, 227, 228, 214, 189, 219, 229, 218,
965 189, 189, 189, 189, 232, 231, 233, 234, 317, 221,
966 461, 223, 226, 459, 230, 457, 227, 228, 323, 326,
967
968 230, 229, 226, 456, 240, 228, 455, 232, 231, 233,
969 234, 317, 449, 230, 448, 447, 226, 240, 227, 444,
970 232, 323, 326, 229, 231, 236, 236, 236, 236, 233,
971 237, 237, 237, 237, 236, 238, 238, 238, 238, 240,
972 442, 239, 239, 239, 239, 241, 241, 241, 236, 239,
973 239, 322, 327, 325, 328, 329, 331, 330, 332, 378,
974 239, 239, 239, 239, 239, 239, 427, 386, 451, 380,
975 384, 440, 383, 439, 322, 327, 325, 328, 329, 331,
976 330, 332, 378, 385, 322, 325, 438, 329, 330, 427,
977 386, 451, 380, 384, 335, 383, 335, 331, 328, 335,
978
979 335, 335, 335, 338, 383, 338, 385, 386, 338, 338,
980 338, 338, 380, 384, 388, 388, 388, 388, 423, 385,
981 389, 389, 389, 389, 390, 424, 390, 425, 426, 390,
982 390, 390, 390, 391, 391, 391, 391, 392, 392, 392,
983 392, 423, 428, 428, 428, 428, 450, 437, 424, 452,
984 425, 426, 429, 429, 429, 429, 453, 470, 436, 472,
985 473, 426, 423, 485, 435, 486, 433, 494, 432, 450,
986 424, 425, 452, 431, 430, 419, 416, 415, 450, 453,
987 470, 452, 472, 473, 414, 413, 485, 470, 486, 453,
988 494, 411, 410, 409, 408, 407, 406, 405, 404, 403,
989
990 402, 398, 397, 396, 472, 394, 393, 376, 485, 506,
991 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
992 506, 507, 507, 507, 507, 507, 507, 507, 507, 507,
993 507, 507, 507, 508, 508, 508, 508, 508, 508, 508,
994 508, 508, 508, 508, 508, 509, 509, 509, 509, 509,
995 509, 509, 509, 509, 509, 509, 509, 510, 375, 374,
996 373, 510, 510, 511, 371, 511, 511, 511, 511, 511,
997 511, 511, 511, 511, 511, 512, 367, 366, 512, 512,
998 512, 512, 512, 512, 512, 512, 512, 513, 513, 513,
999 513, 514, 514, 515, 515, 516, 365, 364, 363, 516,
1000
1001 516, 516, 516, 516, 516, 516, 516, 517, 362, 517,
1002 517, 517, 361, 517, 517, 517, 517, 517, 517, 518,
1003 360, 518, 518, 518, 359, 518, 518, 518, 518, 518,
1004 518, 519, 358, 519, 519, 519, 357, 519, 519, 519,
1005 519, 519, 519, 520, 520, 521, 521, 521, 521, 522,
1006 522, 522, 522, 523, 523, 523, 523, 523, 524, 524,
1007 524, 524, 525, 525, 525, 526, 526, 355, 354, 353,
1008 352, 351, 350, 348, 347, 345, 344, 341, 340, 339,
1009 293, 291, 290, 289, 288, 287, 286, 285, 284, 283,
1010 282, 281, 280, 279, 277, 276, 275, 273, 269, 268,
1011
1012 267, 265, 264, 263, 262, 261, 260, 259, 258, 257,
1013 255, 254, 253, 252, 251, 250, 248, 246, 245, 235,
1014 224, 216, 187, 180, 179, 178, 177, 176, 175, 174,
1015 173, 172, 171, 169, 168, 167, 166, 165, 164, 163,
1016 162, 161, 159, 158, 157, 156, 155, 154, 151, 150,
1017 149, 147, 145, 144, 143, 142, 141, 139, 138, 136,
1018 128, 120, 107, 88, 84, 80, 67, 65, 64, 63,
1019 62, 61, 58, 55, 47, 44, 43, 41, 40, 38,
1020 37, 35, 31, 30, 28, 23, 21, 17, 16, 15,
1021 14, 13, 505, 505, 505, 505, 505, 505, 505, 505,
1022
1023 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1024 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1025 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1026 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1027 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1028 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1029 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1030 505, 505, 505, 505, 505, 505, 505, 505, 505, 505
1031 } ;
1032
1033/* The intent behind this definition is that it'll catch
1034 * any uses of REJECT which flex missed.
1035 */
1036#define REJECT reject_used_but_not_detected
1037#define yymore() yymore_used_but_not_detected
1038#define YY_MORE_ADJ 0
1039#define YY_RESTORE_YY_MORE_OFFSET
1040/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
1041/*
1042 * Main authors:
1043 * Guido Tack <guido.tack@monash.edu>
1044 */
1045/* This Source Code Form is subject to the terms of the Mozilla Public
1046 * License, v. 2.0. If a copy of the MPL was not distributed with this
1047 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1048#if defined __GNUC__
1049#pragma GCC diagnostic ignored "-Wunused-function"
1050#pragma GCC diagnostic ignored "-Wunused-parameter"
1051#pragma GCC diagnostic ignored "-Wsign-compare"
1052#pragma GCC diagnostic ignored "-Wdeprecated"
1053#elif defined _MSC_VER
1054#pragma warning(push, 1)
1055#endif
1056
1057namespace MiniZinc{ class ParserLocation; }
1058#define YYLTYPE MiniZinc::ParserLocation
1059#define YYLTYPE_IS_DECLARED 1
1060#define YYLTYPE_IS_TRIVIAL 0
1061
1062#include <minizinc/parser.hh>
1063
1064namespace MiniZinc {
1065
1066 int utf8len(const char* s) {
1067 int l=0;
1068 for (int i=0; s[i] != '\0'; i++)
1069 if ((s[i] & 0xc0) != 0x80)
1070 l++;
1071 return l;
1072 }
1073
1074 int yy_input_proc(char* buf, int size, yyscan_t yyscanner);
1075}
1076
1077#define YY_INPUT(buf, result, max_size) \
1078 result = ::MiniZinc::yy_input_proc(buf, max_size, yyscanner);
1079
1080#define YY_USER_ACTION \
1081 { MiniZinc::ParserState* parm = \
1082 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner)); \
1083 yylloc->firstLine(yylloc->lastLine()); \
1084 yylloc->firstColumn(yylloc->lastColumn()+1); \
1085 if(parm->hadNewline) { \
1086 parm->hadNewline=false; \
1087 parm->lineStartPos += parm->nTokenNextStart; \
1088 parm->nTokenNextStart=1; \
1089 yylloc->lastLine(yylloc->lastLine()+1); \
1090 yylloc->firstLine(yylloc->lastLine()); \
1091 yylloc->firstColumn(1); \
1092 } \
1093 if(yytext[0] == '\n') { \
1094 parm->hadNewline=true; \
1095 parm->nTokenNextStart+=0; \
1096 } else { \
1097 parm->nTokenNextStart+=yyleng; \
1098 } \
1099 yylloc->lastColumn(yylloc->firstColumn()+::MiniZinc::utf8len(yytext)-1); \
1100 }
1101
1102namespace MiniZinc {
1103
1104 bool hexstrtointval(const char* s, long long int& v) {
1105 std::istringstream iss(s);
1106 iss >> std::hex >> v;
1107 return !iss.fail();
1108 }
1109
1110 bool octstrtointval(const char* s, long long int& v) {
1111 std::istringstream iss(s);
1112 iss >> std::oct >> v;
1113 return !iss.fail();
1114 }
1115
1116 bool fast_strtointval(const char* s, long long int& v) {
1117 MiniZinc::IntVal x = 0;
1118 try {
1119 for (; *s != '\0'; ++s) {
1120 x = (x*10) + (*s - '0');
1121 }
1122 } catch (MiniZinc::ArithmeticError&) {
1123 return false;
1124 }
1125 v = x.toInt();
1126 return true;
1127 }
1128
1129 bool strtofloatval(const char* s, double& v) {
1130 std::istringstream iss(s);
1131 iss >> v;
1132 return !iss.fail();
1133 }
1134
1135 void clearBuffer(void* parm) {
1136 MiniZinc::ParserState* pp =
1137 static_cast<MiniZinc::ParserState*>(parm);
1138 pp->stringBuffer = "";
1139 }
1140
1141 void appendBufferString(void* parm, const char* s) {
1142 MiniZinc::ParserState* pp =
1143 static_cast<MiniZinc::ParserState*>(parm);
1144 pp->stringBuffer += s;
1145 }
1146
1147 void appendBufferChar(void* parm, char s) {
1148 MiniZinc::ParserState* pp =
1149 static_cast<MiniZinc::ParserState*>(parm);
1150 pp->stringBuffer += s;
1151 }
1152
1153 char* bufferData(void* parm) {
1154 MiniZinc::ParserState* pp =
1155 static_cast<MiniZinc::ParserState*>(parm);
1156 return strdup(pp->stringBuffer.c_str());
1157 }
1158}
1159
1160#define INITIAL 0
1161#define string 1
1162#define string_quote 2
1163#define multilinecomment 3
1164#define doccomment 4
1165#define doccomment_file 5
1166#define bracket_exp 6
1167#define quoted_exp 7
1168
1169#ifndef YY_NO_UNISTD_H
1170/* Special case for "unistd.h", since it is non-ANSI. We include it way
1171 * down here because we want the user's section 1 to have been scanned first.
1172 * The user has a chance to override it with an option.
1173 */
1174#include <unistd.h>
1175#endif
1176
1177#ifndef YY_EXTRA_TYPE
1178#define YY_EXTRA_TYPE void *
1179#endif
1180
1181/* Holds the entire state of the reentrant scanner. */
1182struct yyguts_t
1183 {
1184
1185 /* User-defined. Not touched by flex. */
1186 YY_EXTRA_TYPE yyextra_r;
1187
1188 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1189 FILE *yyin_r, *yyout_r;
1190 size_t yy_buffer_stack_top; /**< index of top of stack. */
1191 size_t yy_buffer_stack_max; /**< capacity of stack. */
1192 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1193 char yy_hold_char;
1194 int yy_n_chars;
1195 int yyleng_r;
1196 char *yy_c_buf_p;
1197 int yy_init;
1198 int yy_start;
1199 int yy_did_buffer_switch_on_eof;
1200 int yy_start_stack_ptr;
1201 int yy_start_stack_depth;
1202 int *yy_start_stack;
1203 yy_state_type yy_last_accepting_state;
1204 char* yy_last_accepting_cpos;
1205
1206 int yylineno_r;
1207 int yy_flex_debug_r;
1208
1209 char *yytext_r;
1210 int yy_more_flag;
1211 int yy_more_len;
1212
1213 YYSTYPE * yylval_r;
1214
1215 YYLTYPE * yylloc_r;
1216
1217 }; /* end struct yyguts_t */
1218
1219static int yy_init_globals ( yyscan_t yyscanner );
1220
1221 /* This must go here because YYSTYPE and YYLTYPE are included
1222 * from bison output in section 1.*/
1223 # define yylval yyg->yylval_r
1224
1225 # define yylloc yyg->yylloc_r
1226
1227int yylex_init (yyscan_t* scanner);
1228
1229int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1230
1231/* Accessor methods to globals.
1232 These are made visible to non-reentrant scanners for convenience. */
1233
1234int yylex_destroy ( yyscan_t yyscanner );
1235
1236int yyget_debug ( yyscan_t yyscanner );
1237
1238void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1239
1240YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1241
1242void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1243
1244FILE *yyget_in ( yyscan_t yyscanner );
1245
1246void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1247
1248FILE *yyget_out ( yyscan_t yyscanner );
1249
1250void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1251
1252 int yyget_leng ( yyscan_t yyscanner );
1253
1254char *yyget_text ( yyscan_t yyscanner );
1255
1256int yyget_lineno ( yyscan_t yyscanner );
1257
1258void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1259
1260int yyget_column ( yyscan_t yyscanner );
1261
1262void yyset_column ( int _column_no , yyscan_t yyscanner );
1263
1264YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1265
1266void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1267
1268 YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1269
1270 void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1271
1272/* Macros after this point can all be overridden by user definitions in
1273 * section 1.
1274 */
1275
1276#ifndef YY_SKIP_YYWRAP
1277#ifdef __cplusplus
1278extern "C" int yywrap ( yyscan_t yyscanner );
1279#else
1280extern int yywrap ( yyscan_t yyscanner );
1281#endif
1282#endif
1283
1284#ifndef YY_NO_UNPUT
1285
1286 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
1287
1288#endif
1289
1290#ifndef yytext_ptr
1291static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1292#endif
1293
1294#ifdef YY_NEED_STRLEN
1295static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1296#endif
1297
1298#ifndef YY_NO_INPUT
1299#ifdef __cplusplus
1300static int yyinput ( yyscan_t yyscanner );
1301#else
1302static int input ( yyscan_t yyscanner );
1303#endif
1304
1305#endif
1306
1307 static void yy_push_state ( int _new_state , yyscan_t yyscanner);
1308
1309 static void yy_pop_state ( yyscan_t yyscanner );
1310
1311 static int yy_top_state ( yyscan_t yyscanner );
1312
1313/* Amount of stuff to slurp up with each read. */
1314#ifndef YY_READ_BUF_SIZE
1315#ifdef __ia64__
1316/* On IA-64, the buffer size is 16k, not 8k */
1317#define YY_READ_BUF_SIZE 16384
1318#else
1319#define YY_READ_BUF_SIZE 8192
1320#endif /* __ia64__ */
1321#endif
1322
1323/* Copy whatever the last rule matched to the standard output. */
1324#ifndef ECHO
1325/* This used to be an fputs(), but since the string might contain NUL's,
1326 * we now use fwrite().
1327 */
1328#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1329#endif
1330
1331/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1332 * is returned in "result".
1333 */
1334#ifndef YY_INPUT
1335#define YY_INPUT(buf,result,max_size) \
1336 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1337 { \
1338 int c = '*'; \
1339 int n; \
1340 for ( n = 0; n < max_size && \
1341 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1342 buf[n] = (char) c; \
1343 if ( c == '\n' ) \
1344 buf[n++] = (char) c; \
1345 if ( c == EOF && ferror( yyin ) ) \
1346 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1347 result = n; \
1348 } \
1349 else \
1350 { \
1351 errno=0; \
1352 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1353 { \
1354 if( errno != EINTR) \
1355 { \
1356 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1357 break; \
1358 } \
1359 errno=0; \
1360 clearerr(yyin); \
1361 } \
1362 }\
1363\
1364
1365#endif
1366
1367/* No semi-colon after return; correct usage is to write "yyterminate();" -
1368 * we don't want an extra ';' after the "return" because that will cause
1369 * some compilers to complain about unreachable statements.
1370 */
1371#ifndef yyterminate
1372#define yyterminate() return YY_NULL
1373#endif
1374
1375/* Number of entries by which start-condition stack grows. */
1376#ifndef YY_START_STACK_INCR
1377#define YY_START_STACK_INCR 25
1378#endif
1379
1380/* Report a fatal error. */
1381#ifndef YY_FATAL_ERROR
1382#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1383#endif
1384
1385/* end tables serialization structures and prototypes */
1386
1387/* Default declaration of generated scanner - a define so the user can
1388 * easily add parameters.
1389 */
1390#ifndef YY_DECL
1391#define YY_DECL_IS_OURS 1
1392
1393extern int yylex \
1394 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1395
1396#define YY_DECL int yylex \
1397 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1398#endif /* !YY_DECL */
1399
1400/* Code executed at the beginning of each rule, after yytext and yyleng
1401 * have been set up.
1402 */
1403#ifndef YY_USER_ACTION
1404#define YY_USER_ACTION
1405#endif
1406
1407/* Code executed at the end of each rule. */
1408#ifndef YY_BREAK
1409#define YY_BREAK /*LINTED*/break;
1410#endif
1411
1412#define YY_RULE_SETUP \
1413 YY_USER_ACTION
1414
1415/** The main scanner function which does all the work.
1416 */
1417YY_DECL
1418{
1419 yy_state_type yy_current_state;
1420 char *yy_cp, *yy_bp;
1421 int yy_act;
1422 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1423
1424 yylval = yylval_param;
1425
1426 yylloc = yylloc_param;
1427
1428 if ( !yyg->yy_init )
1429 {
1430 yyg->yy_init = 1;
1431
1432#ifdef YY_USER_INIT
1433 YY_USER_INIT;
1434#endif
1435
1436 if ( ! yyg->yy_start )
1437 yyg->yy_start = 1; /* first start state */
1438
1439 if ( ! yyin )
1440 yyin = stdin;
1441
1442 if ( ! yyout )
1443 yyout = stdout;
1444
1445 if ( ! YY_CURRENT_BUFFER ) {
1446 yyensure_buffer_stack (yyscanner);
1447 YY_CURRENT_BUFFER_LVALUE =
1448 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1449 }
1450
1451 yy_load_buffer_state( yyscanner );
1452 }
1453
1454 {
1455
1456 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1457 {
1458 yy_cp = yyg->yy_c_buf_p;
1459
1460 /* Support of yytext. */
1461 *yy_cp = yyg->yy_hold_char;
1462
1463 /* yy_bp points to the position in yy_ch_buf of the start of
1464 * the current run.
1465 */
1466 yy_bp = yy_cp;
1467
1468 yy_current_state = yyg->yy_start;
1469yy_match:
1470 do
1471 {
1472 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1473 if ( yy_accept[yy_current_state] )
1474 {
1475 yyg->yy_last_accepting_state = yy_current_state;
1476 yyg->yy_last_accepting_cpos = yy_cp;
1477 }
1478 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1479 {
1480 yy_current_state = (int) yy_def[yy_current_state];
1481 if ( yy_current_state >= 506 )
1482 yy_c = yy_meta[yy_c];
1483 }
1484 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1485 ++yy_cp;
1486 }
1487 while ( yy_base[yy_current_state] != 893 );
1488
1489yy_find_action:
1490 yy_act = yy_accept[yy_current_state];
1491 if ( yy_act == 0 )
1492 { /* have to back up */
1493 yy_cp = yyg->yy_last_accepting_cpos;
1494 yy_current_state = yyg->yy_last_accepting_state;
1495 yy_act = yy_accept[yy_current_state];
1496 }
1497
1498 YY_DO_BEFORE_ACTION;
1499
1500do_action: /* This label is used only to access EOF actions. */
1501
1502 switch ( yy_act )
1503 { /* beginning of action switch */
1504 case 0: /* must back up */
1505 /* undo the effects of YY_DO_BEFORE_ACTION */
1506 *yy_cp = yyg->yy_hold_char;
1507 yy_cp = yyg->yy_last_accepting_cpos;
1508 yy_current_state = yyg->yy_last_accepting_state;
1509 goto yy_find_action;
1510
1511case 1:
1512YY_RULE_SETUP
1513{ return MZN_INVALID_NULL; }
1514 YY_BREAK
1515case 2:
1516/* rule 2 can match eol */
1517YY_RULE_SETUP
1518{ }
1519 YY_BREAK
1520case 3:
1521YY_RULE_SETUP
1522{ /* ignore whitespace */ }
1523 YY_BREAK
1524case 4:
1525YY_RULE_SETUP
1526{ yy_push_state(doccomment,yyscanner); ::MiniZinc::clearBuffer(yyget_extra(yyscanner)); }
1527 YY_BREAK
1528
1529case 5:
1530YY_RULE_SETUP
1531{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
1532 yy_pop_state(yyscanner); return MZN_DOC_COMMENT; }
1533 YY_BREAK
1534case 6:
1535YY_RULE_SETUP
1536{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1537 YY_BREAK
1538case 7:
1539YY_RULE_SETUP
1540{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1541 YY_BREAK
1542case 8:
1543/* rule 8 can match eol */
1544YY_RULE_SETUP
1545{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1546 YY_BREAK
1547
1548case 9:
1549YY_RULE_SETUP
1550{ yy_push_state(doccomment_file,yyscanner); ::MiniZinc::clearBuffer(yyget_extra(yyscanner)); }
1551 YY_BREAK
1552
1553case 10:
1554YY_RULE_SETUP
1555{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
1556 yy_pop_state(yyscanner); return MZN_DOC_FILE_COMMENT; }
1557 YY_BREAK
1558case 11:
1559YY_RULE_SETUP
1560{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1561 YY_BREAK
1562case 12:
1563YY_RULE_SETUP
1564{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1565 YY_BREAK
1566case 13:
1567/* rule 13 can match eol */
1568YY_RULE_SETUP
1569{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
1570 YY_BREAK
1571
1572case 14:
1573YY_RULE_SETUP
1574{ yy_push_state(multilinecomment,yyscanner); }
1575 YY_BREAK
1576
1577case 15:
1578YY_RULE_SETUP
1579{ yy_pop_state(yyscanner); }
1580 YY_BREAK
1581case 16:
1582YY_RULE_SETUP
1583{ }
1584 YY_BREAK
1585case 17:
1586YY_RULE_SETUP
1587{ }
1588 YY_BREAK
1589case 18:
1590/* rule 18 can match eol */
1591YY_RULE_SETUP
1592{ }
1593 YY_BREAK
1594
1595case 19:
1596YY_RULE_SETUP
1597{ return MZN_LEFT_BRACKET; }
1598 YY_BREAK
1599case 20:
1600YY_RULE_SETUP
1601{ return MZN_LEFT_2D_BRACKET; }
1602 YY_BREAK
1603case 21:
1604YY_RULE_SETUP
1605{ return MZN_RIGHT_BRACKET; }
1606 YY_BREAK
1607case 22:
1608YY_RULE_SETUP
1609{ return MZN_RIGHT_2D_BRACKET; }
1610 YY_BREAK
1611case 23:
1612YY_RULE_SETUP
1613{ /* ignore comments */ }
1614 YY_BREAK
1615case 24:
1616YY_RULE_SETUP
1617{ yylval->iValue = 1; return MZN_BOOL_LITERAL; }
1618 YY_BREAK
1619case 25:
1620YY_RULE_SETUP
1621{ yylval->iValue = 0; return MZN_BOOL_LITERAL; }
1622 YY_BREAK
1623case 26:
1624YY_RULE_SETUP
1625{
1626 if (::MiniZinc::strtofloatval(yytext, yylval->dValue))
1627 return MZN_FLOAT_LITERAL;
1628 else
1629 return MZN_INVALID_FLOAT_LITERAL;
1630 }
1631 YY_BREAK
1632case 27:
1633YY_RULE_SETUP
1634{
1635 if (::MiniZinc::hexstrtointval(yytext+2, yylval->iValue))
1636 return MZN_INTEGER_LITERAL;
1637 else
1638 return MZN_INVALID_INTEGER_LITERAL;
1639 }
1640 YY_BREAK
1641case 28:
1642YY_RULE_SETUP
1643{
1644 if (::MiniZinc::octstrtointval(yytext+2, yylval->iValue))
1645 return MZN_INTEGER_LITERAL;
1646 else
1647 return MZN_INVALID_INTEGER_LITERAL;
1648 }
1649 YY_BREAK
1650case 29:
1651YY_RULE_SETUP
1652{
1653 if (::MiniZinc::fast_strtointval(yytext, yylval->iValue))
1654 return MZN_INTEGER_LITERAL;
1655 else
1656 return MZN_INVALID_INTEGER_LITERAL;
1657 }
1658 YY_BREAK
1659case 30:
1660YY_RULE_SETUP
1661{
1662 if (::MiniZinc::strtofloatval(yytext, yylval->dValue))
1663 return MZN_FLOAT_LITERAL;
1664 else
1665 return MZN_INVALID_FLOAT_LITERAL;
1666 }
1667 YY_BREAK
1668case 31:
1669YY_RULE_SETUP
1670{
1671 if (::MiniZinc::strtofloatval(yytext, yylval->dValue))
1672 return MZN_FLOAT_LITERAL;
1673 else
1674 return MZN_INVALID_FLOAT_LITERAL;
1675 }
1676 YY_BREAK
1677case 32:
1678YY_RULE_SETUP
1679{
1680 if (::MiniZinc::strtofloatval(yytext, yylval->dValue))
1681 return MZN_FLOAT_LITERAL;
1682 else
1683 return MZN_INVALID_FLOAT_LITERAL;
1684 }
1685 YY_BREAK
1686case 33:
1687YY_RULE_SETUP
1688{
1689 return *yytext; }
1690 YY_BREAK
1691case 34:
1692YY_RULE_SETUP
1693{ return MZN_DOTDOT; }
1694 YY_BREAK
1695case 35:
1696YY_RULE_SETUP
1697{ return MZN_DOTDOT_QUOTED; }
1698 YY_BREAK
1699case 36:
1700YY_RULE_SETUP
1701{ return MZN_COLONCOLON; }
1702 YY_BREAK
1703case 37:
1704YY_RULE_SETUP
1705{ return MZN_UNDERSCORE; }
1706 YY_BREAK
1707case 38:
1708YY_RULE_SETUP
1709{ return MZN_ANN; }
1710 YY_BREAK
1711case 39:
1712YY_RULE_SETUP
1713{ return MZN_ANNOTATION; }
1714 YY_BREAK
1715case 40:
1716YY_RULE_SETUP
1717{ return MZN_ANY; }
1718 YY_BREAK
1719case 41:
1720YY_RULE_SETUP
1721{ return MZN_ARRAY; }
1722 YY_BREAK
1723case 42:
1724YY_RULE_SETUP
1725{ return MZN_BOOL; }
1726 YY_BREAK
1727case 43:
1728YY_RULE_SETUP
1729{ return MZN_CASE; }
1730 YY_BREAK
1731case 44:
1732YY_RULE_SETUP
1733{ return MZN_CONSTRAINT; }
1734 YY_BREAK
1735case 45:
1736YY_RULE_SETUP
1737{ return MZN_DEFAULT; }
1738 YY_BREAK
1739case 46:
1740YY_RULE_SETUP
1741{ return MZN_IDIV; }
1742 YY_BREAK
1743case 47:
1744YY_RULE_SETUP
1745{ return MZN_IDIV_QUOTED; }
1746 YY_BREAK
1747case 48:
1748YY_RULE_SETUP
1749{ return MZN_DIFF; }
1750 YY_BREAK
1751case 49:
1752YY_RULE_SETUP
1753{ return MZN_DIFF_QUOTED; }
1754 YY_BREAK
1755case 50:
1756YY_RULE_SETUP
1757{ return MZN_ELSE; }
1758 YY_BREAK
1759case 51:
1760YY_RULE_SETUP
1761{ return MZN_ELSEIF; }
1762 YY_BREAK
1763case 52:
1764YY_RULE_SETUP
1765{ return MZN_ENDIF; }
1766 YY_BREAK
1767case 53:
1768YY_RULE_SETUP
1769{ return MZN_ENUM; }
1770 YY_BREAK
1771case 54:
1772YY_RULE_SETUP
1773{ return MZN_FLOAT; }
1774 YY_BREAK
1775case 55:
1776YY_RULE_SETUP
1777{ return MZN_FUNCTION; }
1778 YY_BREAK
1779case 56:
1780YY_RULE_SETUP
1781{ return MZN_IF; }
1782 YY_BREAK
1783case 57:
1784YY_RULE_SETUP
1785{ return MZN_INCLUDE; }
1786 YY_BREAK
1787case 58:
1788YY_RULE_SETUP
1789{ return MZN_INFINITY; }
1790 YY_BREAK
1791case 59:
1792YY_RULE_SETUP
1793{ return MZN_INTERSECT; }
1794 YY_BREAK
1795case 60:
1796YY_RULE_SETUP
1797{ return MZN_INTERSECT_QUOTED; }
1798 YY_BREAK
1799case 61:
1800YY_RULE_SETUP
1801{ return MZN_IN; }
1802 YY_BREAK
1803case 62:
1804YY_RULE_SETUP
1805{ return MZN_IN_QUOTED; }
1806 YY_BREAK
1807case 63:
1808YY_RULE_SETUP
1809{ return MZN_INT; }
1810 YY_BREAK
1811case 64:
1812YY_RULE_SETUP
1813{ return MZN_LET; }
1814 YY_BREAK
1815case 65:
1816YY_RULE_SETUP
1817{ return MZN_LIST; }
1818 YY_BREAK
1819case 66:
1820YY_RULE_SETUP
1821{ yylval->bValue = false; return MZN_MAXIMIZE; }
1822 YY_BREAK
1823case 67:
1824YY_RULE_SETUP
1825{ yylval->bValue = true; return MZN_MINIMIZE; }
1826 YY_BREAK
1827case 68:
1828YY_RULE_SETUP
1829{ return MZN_MOD; }
1830 YY_BREAK
1831case 69:
1832YY_RULE_SETUP
1833{ return MZN_MOD_QUOTED; }
1834 YY_BREAK
1835case 70:
1836YY_RULE_SETUP
1837{ return MZN_NOT; }
1838 YY_BREAK
1839case 71:
1840YY_RULE_SETUP
1841{ return MZN_NOT_QUOTED; }
1842 YY_BREAK
1843case 72:
1844YY_RULE_SETUP
1845{ return MZN_OF; }
1846 YY_BREAK
1847case 73:
1848YY_RULE_SETUP
1849{ return MZN_OUTPUT; }
1850 YY_BREAK
1851case 74:
1852YY_RULE_SETUP
1853{ return MZN_OPT; }
1854 YY_BREAK
1855case 75:
1856YY_RULE_SETUP
1857{ return MZN_PAR; }
1858 YY_BREAK
1859case 76:
1860YY_RULE_SETUP
1861{ return MZN_PREDICATE; }
1862 YY_BREAK
1863case 77:
1864YY_RULE_SETUP
1865{ return MZN_RECORD; }
1866 YY_BREAK
1867case 78:
1868YY_RULE_SETUP
1869{ return MZN_SATISFY; }
1870 YY_BREAK
1871case 79:
1872YY_RULE_SETUP
1873{ return MZN_SET; }
1874 YY_BREAK
1875case 80:
1876YY_RULE_SETUP
1877{ return MZN_SOLVE; }
1878 YY_BREAK
1879case 81:
1880YY_RULE_SETUP
1881{ return MZN_STRING; }
1882 YY_BREAK
1883case 82:
1884YY_RULE_SETUP
1885{ return MZN_SUBSET; }
1886 YY_BREAK
1887case 83:
1888YY_RULE_SETUP
1889{ return MZN_SUBSET_QUOTED; }
1890 YY_BREAK
1891case 84:
1892YY_RULE_SETUP
1893{ return MZN_SUPERSET; }
1894 YY_BREAK
1895case 85:
1896YY_RULE_SETUP
1897{ return MZN_SUPERSET_QUOTED; }
1898 YY_BREAK
1899case 86:
1900YY_RULE_SETUP
1901{ return MZN_SYMDIFF; }
1902 YY_BREAK
1903case 87:
1904YY_RULE_SETUP
1905{ return MZN_SYMDIFF_QUOTED; }
1906 YY_BREAK
1907case 88:
1908YY_RULE_SETUP
1909{ return MZN_TEST; }
1910 YY_BREAK
1911case 89:
1912YY_RULE_SETUP
1913{ return MZN_THEN; }
1914 YY_BREAK
1915case 90:
1916YY_RULE_SETUP
1917{ return MZN_TUPLE; }
1918 YY_BREAK
1919case 91:
1920YY_RULE_SETUP
1921{ return MZN_TYPE; }
1922 YY_BREAK
1923case 92:
1924YY_RULE_SETUP
1925{ return MZN_UNION; }
1926 YY_BREAK
1927case 93:
1928YY_RULE_SETUP
1929{ return MZN_UNION_QUOTED; }
1930 YY_BREAK
1931case 94:
1932YY_RULE_SETUP
1933{ return MZN_VAR; }
1934 YY_BREAK
1935case 95:
1936YY_RULE_SETUP
1937{ return MZN_VARIANT_RECORD; }
1938 YY_BREAK
1939case 96:
1940YY_RULE_SETUP
1941{ return MZN_WHERE; }
1942 YY_BREAK
1943case 97:
1944YY_RULE_SETUP
1945{ return MZN_XOR; }
1946 YY_BREAK
1947case 98:
1948YY_RULE_SETUP
1949{ return MZN_XOR_QUOTED; }
1950 YY_BREAK
1951case 99:
1952YY_RULE_SETUP
1953{ return MZN_PLUS; }
1954 YY_BREAK
1955case 100:
1956YY_RULE_SETUP
1957{ return MZN_PLUS_QUOTED; }
1958 YY_BREAK
1959case 101:
1960YY_RULE_SETUP
1961{ return MZN_MINUS; }
1962 YY_BREAK
1963case 102:
1964YY_RULE_SETUP
1965{ return MZN_MINUS_QUOTED; }
1966 YY_BREAK
1967case 103:
1968YY_RULE_SETUP
1969{ return MZN_MULT; }
1970 YY_BREAK
1971case 104:
1972YY_RULE_SETUP
1973{ return MZN_MULT_QUOTED; }
1974 YY_BREAK
1975case 105:
1976YY_RULE_SETUP
1977{ return MZN_DIV; }
1978 YY_BREAK
1979case 106:
1980YY_RULE_SETUP
1981{ return MZN_DIV_QUOTED; }
1982 YY_BREAK
1983case 107:
1984YY_RULE_SETUP
1985{ return MZN_POW_MINUS1; }
1986 YY_BREAK
1987case 108:
1988YY_RULE_SETUP
1989{ return MZN_POW; }
1990 YY_BREAK
1991case 109:
1992YY_RULE_SETUP
1993{ return MZN_POW_QUOTED; }
1994 YY_BREAK
1995case 110:
1996YY_RULE_SETUP
1997{ return MZN_PLUSPLUS; }
1998 YY_BREAK
1999case 111:
2000YY_RULE_SETUP
2001{ return MZN_PLUSPLUS_QUOTED; }
2002 YY_BREAK
2003case 112:
2004YY_RULE_SETUP
2005{ return MZN_ABSENT; }
2006 YY_BREAK
2007case 113:
2008YY_RULE_SETUP
2009{ return MZN_LE; }
2010 YY_BREAK
2011case 114:
2012YY_RULE_SETUP
2013{ return MZN_LE_QUOTED; }
2014 YY_BREAK
2015case 115:
2016YY_RULE_SETUP
2017{ return MZN_LQ; }
2018 YY_BREAK
2019case 116:
2020YY_RULE_SETUP
2021{ return MZN_LQ_QUOTED; }
2022 YY_BREAK
2023case 117:
2024YY_RULE_SETUP
2025{ return MZN_GR; }
2026 YY_BREAK
2027case 118:
2028YY_RULE_SETUP
2029{ return MZN_GR_QUOTED; }
2030 YY_BREAK
2031case 119:
2032YY_RULE_SETUP
2033{ return MZN_GQ; }
2034 YY_BREAK
2035case 120:
2036YY_RULE_SETUP
2037{ return MZN_GQ_QUOTED; }
2038 YY_BREAK
2039case 121:
2040YY_RULE_SETUP
2041{ return MZN_EQ; }
2042 YY_BREAK
2043case 122:
2044YY_RULE_SETUP
2045{ return MZN_EQ_QUOTED; }
2046 YY_BREAK
2047case 123:
2048YY_RULE_SETUP
2049{ return MZN_EQ; }
2050 YY_BREAK
2051case 124:
2052YY_RULE_SETUP
2053{ return MZN_EQ_QUOTED; }
2054 YY_BREAK
2055case 125:
2056YY_RULE_SETUP
2057{ return MZN_NQ; }
2058 YY_BREAK
2059case 126:
2060YY_RULE_SETUP
2061{ return MZN_NQ_QUOTED; }
2062 YY_BREAK
2063case 127:
2064YY_RULE_SETUP
2065{ return MZN_IMPL; }
2066 YY_BREAK
2067case 128:
2068YY_RULE_SETUP
2069{ return MZN_IMPL_QUOTED; }
2070 YY_BREAK
2071case 129:
2072YY_RULE_SETUP
2073{ return MZN_RIMPL; }
2074 YY_BREAK
2075case 130:
2076YY_RULE_SETUP
2077{ return MZN_RIMPL_QUOTED; }
2078 YY_BREAK
2079case 131:
2080YY_RULE_SETUP
2081{ return MZN_EQUIV; }
2082 YY_BREAK
2083case 132:
2084YY_RULE_SETUP
2085{ return MZN_EQUIV_QUOTED; }
2086 YY_BREAK
2087case 133:
2088YY_RULE_SETUP
2089{ return MZN_OR; }
2090 YY_BREAK
2091case 134:
2092YY_RULE_SETUP
2093{ return MZN_OR_QUOTED; }
2094 YY_BREAK
2095case 135:
2096YY_RULE_SETUP
2097{ return MZN_AND; }
2098 YY_BREAK
2099case 136:
2100YY_RULE_SETUP
2101{ return MZN_AND_QUOTED; }
2102 YY_BREAK
2103case 137:
2104YY_RULE_SETUP
2105{ return MZN_WEAK_PLUS; }
2106 YY_BREAK
2107case 138:
2108YY_RULE_SETUP
2109{ return MZN_WEAK_MULT; }
2110 YY_BREAK
2111case 139:
2112YY_RULE_SETUP
2113{ return MZN_WEAK_EQ; }
2114 YY_BREAK
2115case 140:
2116YY_RULE_SETUP
2117{ return MZN_WEAK_MINUS; }
2118 YY_BREAK
2119case 141:
2120YY_RULE_SETUP
2121{
2122 yylval->sValue = strdup(yytext+1);
2123 yylval->sValue[strlen(yytext)-2] = 0;
2124 return MZN_IDENTIFIER; }
2125 YY_BREAK
2126case 142:
2127YY_RULE_SETUP
2128{ yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; }
2129 YY_BREAK
2130case 143:
2131YY_RULE_SETUP
2132{
2133 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; }
2134 YY_BREAK
2135case 144:
2136YY_RULE_SETUP
2137{
2138 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; }
2139 YY_BREAK
2140case 145:
2141YY_RULE_SETUP
2142{
2143 MiniZinc::ParserState* parm =
2144 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner));
2145 if (parm->isFlatZinc) {
2146 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER;
2147 } else {
2148 return FLATZINC_IDENTIFIER;
2149 }
2150 }
2151 YY_BREAK
2152case 146:
2153YY_RULE_SETUP
2154{ yylval->sValue = strdup("forall"); return MZN_IDENTIFIER; }
2155 YY_BREAK
2156case 147:
2157YY_RULE_SETUP
2158{ yylval->sValue = strdup("exists"); return MZN_IDENTIFIER; }
2159 YY_BREAK
2160case 148:
2161YY_RULE_SETUP
2162{ return MZN_IN; }
2163 YY_BREAK
2164case 149:
2165YY_RULE_SETUP
2166{ return MZN_SUBSET; }
2167 YY_BREAK
2168case 150:
2169YY_RULE_SETUP
2170{ return MZN_SUPERSET; }
2171 YY_BREAK
2172case 151:
2173YY_RULE_SETUP
2174{ return MZN_INFINITY; }
2175 YY_BREAK
2176case 152:
2177YY_RULE_SETUP
2178{ return MZN_NOT; }
2179 YY_BREAK
2180case 153:
2181YY_RULE_SETUP
2182{ return MZN_RIMPL; }
2183 YY_BREAK
2184case 154:
2185YY_RULE_SETUP
2186{ return MZN_IMPL; }
2187 YY_BREAK
2188case 155:
2189YY_RULE_SETUP
2190{ return MZN_EQUIV; }
2191 YY_BREAK
2192case 156:
2193YY_RULE_SETUP
2194{ return MZN_AND; }
2195 YY_BREAK
2196case 157:
2197YY_RULE_SETUP
2198{ return MZN_OR; }
2199 YY_BREAK
2200case 158:
2201YY_RULE_SETUP
2202{ return MZN_NQ; }
2203 YY_BREAK
2204case 159:
2205YY_RULE_SETUP
2206{ return MZN_LQ; }
2207 YY_BREAK
2208case 160:
2209YY_RULE_SETUP
2210{ return MZN_GQ; }
2211 YY_BREAK
2212case 161:
2213YY_RULE_SETUP
2214{ return MZN_UNION; }
2215 YY_BREAK
2216case 162:
2217YY_RULE_SETUP
2218{ return MZN_INTERSECT; }
2219 YY_BREAK
2220case 163:
2221YY_RULE_SETUP
2222{ return MZN_POW_MINUS1; }
2223 YY_BREAK
2224case 164:
2225YY_RULE_SETUP
2226{
2227 yylval->sValue = strdup(yytext+1); return MZN_TI_ENUM_IDENTIFIER; }
2228 YY_BREAK
2229case 165:
2230YY_RULE_SETUP
2231{
2232 yylval->sValue = strdup(yytext+1); return MZN_TI_IDENTIFIER; }
2233 YY_BREAK
2234case 166:
2235YY_RULE_SETUP
2236{ yy_push_state(bracket_exp,yyscanner); return *yytext; }
2237 YY_BREAK
2238case 167:
2239YY_RULE_SETUP
2240{ yy_pop_state(yyscanner); return *yytext; }
2241 YY_BREAK
2242case 168:
2243YY_RULE_SETUP
2244{ yy_pop_state(yyscanner); yy_pop_state(yyscanner); yy_push_state(string_quote,yyscanner);
2245 ::MiniZinc::clearBuffer(yyget_extra(yyscanner)); }
2246 YY_BREAK
2247case 169:
2248YY_RULE_SETUP
2249{ yy_push_state(string,yyscanner); ::MiniZinc::clearBuffer(yyget_extra(yyscanner)); }
2250 YY_BREAK
2251case 170:
2252YY_RULE_SETUP
2253{ ::MiniZinc::appendBufferString(yyget_extra(yyscanner), yytext); }
2254 YY_BREAK
2255case 171:
2256YY_RULE_SETUP
2257{ ::MiniZinc::appendBufferChar(yyget_extra(yyscanner), '\n'); }
2258 YY_BREAK
2259case 172:
2260YY_RULE_SETUP
2261{ ::MiniZinc::appendBufferChar(yyget_extra(yyscanner), '\t'); }
2262 YY_BREAK
2263case 173:
2264YY_RULE_SETUP
2265{ ::MiniZinc::appendBufferChar(yyget_extra(yyscanner), yytext[1]); }
2266 YY_BREAK
2267case 174:
2268YY_RULE_SETUP
2269{ ::MiniZinc::appendBufferChar(yyget_extra(yyscanner), yytext[1]); }
2270 YY_BREAK
2271case 175:
2272YY_RULE_SETUP
2273{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
2274 yy_push_state(quoted_exp,yyscanner); return MZN_STRING_QUOTE_START; }
2275 YY_BREAK
2276case 176:
2277YY_RULE_SETUP
2278{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
2279 yy_push_state(quoted_exp,yyscanner); return MZN_STRING_QUOTE_MID; }
2280 YY_BREAK
2281case 177:
2282YY_RULE_SETUP
2283{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
2284 yy_pop_state(yyscanner); return MZN_STRING_LITERAL; }
2285 YY_BREAK
2286case 178:
2287YY_RULE_SETUP
2288{ yylval->sValue = ::MiniZinc::bufferData(yyget_extra(yyscanner));
2289 yy_pop_state(yyscanner); return MZN_STRING_QUOTE_END; }
2290 YY_BREAK
2291case 179:
2292YY_RULE_SETUP
2293{ return (unsigned char)yytext[0]; }
2294 YY_BREAK
2295case 180:
2296/* rule 180 can match eol */
2297YY_RULE_SETUP
2298{ return MZN_END_OF_LINE_IN_STRING; }
2299 YY_BREAK
2300case YY_STATE_EOF(string):
2301case YY_STATE_EOF(string_quote):
2302{ yy_pop_state(yyscanner); return MZN_UNTERMINATED_STRING; }
2303 YY_BREAK
2304case 181:
2305YY_RULE_SETUP
2306{
2307 yylval->sValue = strdup(yytext+1);
2308 yylval->sValue[strlen(yytext)-2] = 0;
2309 return MZN_QUOTED_IDENTIFIER; }
2310 YY_BREAK
2311case 182:
2312YY_RULE_SETUP
2313{ return (unsigned char)yytext[0]; }
2314 YY_BREAK
2315case 183:
2316YY_RULE_SETUP
2317ECHO;
2318 YY_BREAK
2319case YY_STATE_EOF(INITIAL):
2320case YY_STATE_EOF(multilinecomment):
2321case YY_STATE_EOF(doccomment):
2322case YY_STATE_EOF(doccomment_file):
2323case YY_STATE_EOF(bracket_exp):
2324case YY_STATE_EOF(quoted_exp):
2325 yyterminate();
2326
2327 case YY_END_OF_BUFFER:
2328 {
2329 /* Amount of text matched not including the EOB char. */
2330 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2331
2332 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2333 *yy_cp = yyg->yy_hold_char;
2334 YY_RESTORE_YY_MORE_OFFSET
2335
2336 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2337 {
2338 /* We're scanning a new file or input source. It's
2339 * possible that this happened because the user
2340 * just pointed yyin at a new source and called
2341 * yylex(). If so, then we have to assure
2342 * consistency between YY_CURRENT_BUFFER and our
2343 * globals. Here is the right place to do so, because
2344 * this is the first action (other than possibly a
2345 * back-up) that will match for the new input source.
2346 */
2347 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2348 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2349 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2350 }
2351
2352 /* Note that here we test for yy_c_buf_p "<=" to the position
2353 * of the first EOB in the buffer, since yy_c_buf_p will
2354 * already have been incremented past the NUL character
2355 * (since all states make transitions on EOB to the
2356 * end-of-buffer state). Contrast this with the test
2357 * in input().
2358 */
2359 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2360 { /* This was really a NUL. */
2361 yy_state_type yy_next_state;
2362
2363 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2364
2365 yy_current_state = yy_get_previous_state( yyscanner );
2366
2367 /* Okay, we're now positioned to make the NUL
2368 * transition. We couldn't have
2369 * yy_get_previous_state() go ahead and do it
2370 * for us because it doesn't know how to deal
2371 * with the possibility of jamming (and we don't
2372 * want to build jamming into it because then it
2373 * will run more slowly).
2374 */
2375
2376 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2377
2378 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2379
2380 if ( yy_next_state )
2381 {
2382 /* Consume the NUL. */
2383 yy_cp = ++yyg->yy_c_buf_p;
2384 yy_current_state = yy_next_state;
2385 goto yy_match;
2386 }
2387
2388 else
2389 {
2390 yy_cp = yyg->yy_c_buf_p;
2391 goto yy_find_action;
2392 }
2393 }
2394
2395 else switch ( yy_get_next_buffer( yyscanner ) )
2396 {
2397 case EOB_ACT_END_OF_FILE:
2398 {
2399 yyg->yy_did_buffer_switch_on_eof = 0;
2400
2401 if ( yywrap( yyscanner ) )
2402 {
2403 /* Note: because we've taken care in
2404 * yy_get_next_buffer() to have set up
2405 * yytext, we can now set up
2406 * yy_c_buf_p so that if some total
2407 * hoser (like flex itself) wants to
2408 * call the scanner after we return the
2409 * YY_NULL, it'll still work - another
2410 * YY_NULL will get returned.
2411 */
2412 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2413
2414 yy_act = YY_STATE_EOF(YY_START);
2415 goto do_action;
2416 }
2417
2418 else
2419 {
2420 if ( ! yyg->yy_did_buffer_switch_on_eof )
2421 YY_NEW_FILE;
2422 }
2423 break;
2424 }
2425
2426 case EOB_ACT_CONTINUE_SCAN:
2427 yyg->yy_c_buf_p =
2428 yyg->yytext_ptr + yy_amount_of_matched_text;
2429
2430 yy_current_state = yy_get_previous_state( yyscanner );
2431
2432 yy_cp = yyg->yy_c_buf_p;
2433 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2434 goto yy_match;
2435
2436 case EOB_ACT_LAST_MATCH:
2437 yyg->yy_c_buf_p =
2438 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2439
2440 yy_current_state = yy_get_previous_state( yyscanner );
2441
2442 yy_cp = yyg->yy_c_buf_p;
2443 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2444 goto yy_find_action;
2445 }
2446 break;
2447 }
2448
2449 default:
2450 YY_FATAL_ERROR(
2451 "fatal flex scanner internal error--no action found" );
2452 } /* end of action switch */
2453 } /* end of scanning one token */
2454 } /* end of user's declarations */
2455} /* end of yylex */
2456
2457/* yy_get_next_buffer - try to read in a new buffer
2458 *
2459 * Returns a code representing an action:
2460 * EOB_ACT_LAST_MATCH -
2461 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2462 * EOB_ACT_END_OF_FILE - end of file
2463 */
2464static int yy_get_next_buffer (yyscan_t yyscanner)
2465{
2466 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2467 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2468 char *source = yyg->yytext_ptr;
2469 int number_to_move, i;
2470 int ret_val;
2471
2472 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2473 YY_FATAL_ERROR(
2474 "fatal flex scanner internal error--end of buffer missed" );
2475
2476 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2477 { /* Don't try to fill the buffer, so this is an EOF. */
2478 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2479 {
2480 /* We matched a single character, the EOB, so
2481 * treat this as a final EOF.
2482 */
2483 return EOB_ACT_END_OF_FILE;
2484 }
2485
2486 else
2487 {
2488 /* We matched some text prior to the EOB, first
2489 * process it.
2490 */
2491 return EOB_ACT_LAST_MATCH;
2492 }
2493 }
2494
2495 /* Try to read more data. */
2496
2497 /* First move last chars to start of buffer. */
2498 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2499
2500 for ( i = 0; i < number_to_move; ++i )
2501 *(dest++) = *(source++);
2502
2503 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2504 /* don't do the read, it's not guaranteed to return an EOF,
2505 * just force an EOF
2506 */
2507 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2508
2509 else
2510 {
2511 int num_to_read =
2512 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2513
2514 while ( num_to_read <= 0 )
2515 { /* Not enough room in the buffer - grow it. */
2516
2517 /* just a shorter name for the current buffer */
2518 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2519
2520 int yy_c_buf_p_offset =
2521 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2522
2523 if ( b->yy_is_our_buffer )
2524 {
2525 int new_size = b->yy_buf_size * 2;
2526
2527 if ( new_size <= 0 )
2528 b->yy_buf_size += b->yy_buf_size / 8;
2529 else
2530 b->yy_buf_size *= 2;
2531
2532 b->yy_ch_buf = (char *)
2533 /* Include room in for 2 EOB chars. */
2534 yyrealloc( (void *) b->yy_ch_buf,
2535 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2536 }
2537 else
2538 /* Can't grow it, we don't own it. */
2539 b->yy_ch_buf = NULL;
2540
2541 if ( ! b->yy_ch_buf )
2542 YY_FATAL_ERROR(
2543 "fatal error - scanner input buffer overflow" );
2544
2545 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2546
2547 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2548 number_to_move - 1;
2549
2550 }
2551
2552 if ( num_to_read > YY_READ_BUF_SIZE )
2553 num_to_read = YY_READ_BUF_SIZE;
2554
2555 /* Read in more data. */
2556 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2557 yyg->yy_n_chars, num_to_read );
2558
2559 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2560 }
2561
2562 if ( yyg->yy_n_chars == 0 )
2563 {
2564 if ( number_to_move == YY_MORE_ADJ )
2565 {
2566 ret_val = EOB_ACT_END_OF_FILE;
2567 yyrestart( yyin , yyscanner);
2568 }
2569
2570 else
2571 {
2572 ret_val = EOB_ACT_LAST_MATCH;
2573 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2574 YY_BUFFER_EOF_PENDING;
2575 }
2576 }
2577
2578 else
2579 ret_val = EOB_ACT_CONTINUE_SCAN;
2580
2581 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2582 /* Extend the array by 50%, plus the number we really need. */
2583 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2584 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2585 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2586 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2587 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2588 /* "- 2" to take care of EOB's */
2589 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2590 }
2591
2592 yyg->yy_n_chars += number_to_move;
2593 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2594 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2595
2596 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2597
2598 return ret_val;
2599}
2600
2601/* yy_get_previous_state - get the state just before the EOB char was reached */
2602
2603 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2604{
2605 yy_state_type yy_current_state;
2606 char *yy_cp;
2607 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2608
2609 yy_current_state = yyg->yy_start;
2610
2611 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2612 {
2613 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 87);
2614 if ( yy_accept[yy_current_state] )
2615 {
2616 yyg->yy_last_accepting_state = yy_current_state;
2617 yyg->yy_last_accepting_cpos = yy_cp;
2618 }
2619 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2620 {
2621 yy_current_state = (int) yy_def[yy_current_state];
2622 if ( yy_current_state >= 506 )
2623 yy_c = yy_meta[yy_c];
2624 }
2625 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2626 }
2627
2628 return yy_current_state;
2629}
2630
2631/* yy_try_NUL_trans - try to make a transition on the NUL character
2632 *
2633 * synopsis
2634 * next_state = yy_try_NUL_trans( current_state );
2635 */
2636 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2637{
2638 int yy_is_jam;
2639 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2640 char *yy_cp = yyg->yy_c_buf_p;
2641
2642 YY_CHAR yy_c = 87;
2643 if ( yy_accept[yy_current_state] )
2644 {
2645 yyg->yy_last_accepting_state = yy_current_state;
2646 yyg->yy_last_accepting_cpos = yy_cp;
2647 }
2648 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2649 {
2650 yy_current_state = (int) yy_def[yy_current_state];
2651 if ( yy_current_state >= 506 )
2652 yy_c = yy_meta[yy_c];
2653 }
2654 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2655 yy_is_jam = (yy_current_state == 505);
2656
2657 (void)yyg;
2658 return yy_is_jam ? 0 : yy_current_state;
2659}
2660
2661#ifndef YY_NO_UNPUT
2662
2663 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
2664{
2665 char *yy_cp;
2666 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2667
2668 yy_cp = yyg->yy_c_buf_p;
2669
2670 /* undo effects of setting up yytext */
2671 *yy_cp = yyg->yy_hold_char;
2672
2673 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2674 { /* need to shift things up to make room */
2675 /* +2 for EOB chars. */
2676 int number_to_move = yyg->yy_n_chars + 2;
2677 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2678 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2679 char *source =
2680 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2681
2682 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2683 *--dest = *--source;
2684
2685 yy_cp += (int) (dest - source);
2686 yy_bp += (int) (dest - source);
2687 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2688 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2689
2690 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2691 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2692 }
2693
2694 *--yy_cp = (char) c;
2695
2696 yyg->yytext_ptr = yy_bp;
2697 yyg->yy_hold_char = *yy_cp;
2698 yyg->yy_c_buf_p = yy_cp;
2699}
2700
2701#endif
2702
2703#ifndef YY_NO_INPUT
2704#ifdef __cplusplus
2705 static int yyinput (yyscan_t yyscanner)
2706#else
2707 static int input (yyscan_t yyscanner)
2708#endif
2709
2710{
2711 int c;
2712 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2713
2714 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2715
2716 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2717 {
2718 /* yy_c_buf_p now points to the character we want to return.
2719 * If this occurs *before* the EOB characters, then it's a
2720 * valid NUL; if not, then we've hit the end of the buffer.
2721 */
2722 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2723 /* This was really a NUL. */
2724 *yyg->yy_c_buf_p = '\0';
2725
2726 else
2727 { /* need more input */
2728 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2729 ++yyg->yy_c_buf_p;
2730
2731 switch ( yy_get_next_buffer( yyscanner ) )
2732 {
2733 case EOB_ACT_LAST_MATCH:
2734 /* This happens because yy_g_n_b()
2735 * sees that we've accumulated a
2736 * token and flags that we need to
2737 * try matching the token before
2738 * proceeding. But for input(),
2739 * there's no matching to consider.
2740 * So convert the EOB_ACT_LAST_MATCH
2741 * to EOB_ACT_END_OF_FILE.
2742 */
2743
2744 /* Reset buffer status. */
2745 yyrestart( yyin , yyscanner);
2746
2747 /*FALLTHROUGH*/
2748
2749 case EOB_ACT_END_OF_FILE:
2750 {
2751 if ( yywrap( yyscanner ) )
2752 return 0;
2753
2754 if ( ! yyg->yy_did_buffer_switch_on_eof )
2755 YY_NEW_FILE;
2756#ifdef __cplusplus
2757 return yyinput(yyscanner);
2758#else
2759 return input(yyscanner);
2760#endif
2761 }
2762
2763 case EOB_ACT_CONTINUE_SCAN:
2764 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2765 break;
2766 }
2767 }
2768 }
2769
2770 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2771 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2772 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2773
2774 return c;
2775}
2776#endif /* ifndef YY_NO_INPUT */
2777
2778/** Immediately switch to a different input stream.
2779 * @param input_file A readable stream.
2780 * @param yyscanner The scanner object.
2781 * @note This function does not reset the start condition to @c INITIAL .
2782 */
2783 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2784{
2785 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2786
2787 if ( ! YY_CURRENT_BUFFER ){
2788 yyensure_buffer_stack (yyscanner);
2789 YY_CURRENT_BUFFER_LVALUE =
2790 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2791 }
2792
2793 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2794 yy_load_buffer_state( yyscanner );
2795}
2796
2797/** Switch to a different input buffer.
2798 * @param new_buffer The new input buffer.
2799 * @param yyscanner The scanner object.
2800 */
2801 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2802{
2803 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2804
2805 /* TODO. We should be able to replace this entire function body
2806 * with
2807 * yypop_buffer_state();
2808 * yypush_buffer_state(new_buffer);
2809 */
2810 yyensure_buffer_stack (yyscanner);
2811 if ( YY_CURRENT_BUFFER == new_buffer )
2812 return;
2813
2814 if ( YY_CURRENT_BUFFER )
2815 {
2816 /* Flush out information for old buffer. */
2817 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2818 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2819 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2820 }
2821
2822 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2823 yy_load_buffer_state( yyscanner );
2824
2825 /* We don't actually know whether we did this switch during
2826 * EOF (yywrap()) processing, but the only time this flag
2827 * is looked at is after yywrap() is called, so it's safe
2828 * to go ahead and always set it.
2829 */
2830 yyg->yy_did_buffer_switch_on_eof = 1;
2831}
2832
2833static void yy_load_buffer_state (yyscan_t yyscanner)
2834{
2835 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2836 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2837 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2838 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2839 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2840}
2841
2842/** Allocate and initialize an input buffer state.
2843 * @param file A readable stream.
2844 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2845 * @param yyscanner The scanner object.
2846 * @return the allocated buffer state.
2847 */
2848 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2849{
2850 YY_BUFFER_STATE b;
2851
2852 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2853 if ( ! b )
2854 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2855
2856 b->yy_buf_size = size;
2857
2858 /* yy_ch_buf has to be 2 characters longer than the size given because
2859 * we need to put in 2 end-of-buffer characters.
2860 */
2861 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2862 if ( ! b->yy_ch_buf )
2863 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2864
2865 b->yy_is_our_buffer = 1;
2866
2867 yy_init_buffer( b, file , yyscanner);
2868
2869 return b;
2870}
2871
2872/** Destroy the buffer.
2873 * @param b a buffer created with yy_create_buffer()
2874 * @param yyscanner The scanner object.
2875 */
2876 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2877{
2878 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2879
2880 if ( ! b )
2881 return;
2882
2883 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2884 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2885
2886 if ( b->yy_is_our_buffer )
2887 yyfree( (void *) b->yy_ch_buf , yyscanner );
2888
2889 yyfree( (void *) b , yyscanner );
2890}
2891
2892/* Initializes or reinitializes a buffer.
2893 * This function is sometimes called more than once on the same buffer,
2894 * such as during a yyrestart() or at EOF.
2895 */
2896 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2897
2898{
2899 int oerrno = errno;
2900 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2901
2902 yy_flush_buffer( b , yyscanner);
2903
2904 b->yy_input_file = file;
2905 b->yy_fill_buffer = 1;
2906
2907 /* If b is the current buffer, then yy_init_buffer was _probably_
2908 * called from yyrestart() or through yy_get_next_buffer.
2909 * In that case, we don't want to reset the lineno or column.
2910 */
2911 if (b != YY_CURRENT_BUFFER){
2912 b->yy_bs_lineno = 1;
2913 b->yy_bs_column = 0;
2914 }
2915
2916 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2917
2918 errno = oerrno;
2919}
2920
2921/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2922 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2923 * @param yyscanner The scanner object.
2924 */
2925 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2926{
2927 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2928 if ( ! b )
2929 return;
2930
2931 b->yy_n_chars = 0;
2932
2933 /* We always need two end-of-buffer characters. The first causes
2934 * a transition to the end-of-buffer state. The second causes
2935 * a jam in that state.
2936 */
2937 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2938 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2939
2940 b->yy_buf_pos = &b->yy_ch_buf[0];
2941
2942 b->yy_at_bol = 1;
2943 b->yy_buffer_status = YY_BUFFER_NEW;
2944
2945 if ( b == YY_CURRENT_BUFFER )
2946 yy_load_buffer_state( yyscanner );
2947}
2948
2949/** Pushes the new state onto the stack. The new state becomes
2950 * the current state. This function will allocate the stack
2951 * if necessary.
2952 * @param new_buffer The new state.
2953 * @param yyscanner The scanner object.
2954 */
2955void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2956{
2957 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2958 if (new_buffer == NULL)
2959 return;
2960
2961 yyensure_buffer_stack(yyscanner);
2962
2963 /* This block is copied from yy_switch_to_buffer. */
2964 if ( YY_CURRENT_BUFFER )
2965 {
2966 /* Flush out information for old buffer. */
2967 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2968 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2969 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2970 }
2971
2972 /* Only push if top exists. Otherwise, replace top. */
2973 if (YY_CURRENT_BUFFER)
2974 yyg->yy_buffer_stack_top++;
2975 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2976
2977 /* copied from yy_switch_to_buffer. */
2978 yy_load_buffer_state( yyscanner );
2979 yyg->yy_did_buffer_switch_on_eof = 1;
2980}
2981
2982/** Removes and deletes the top of the stack, if present.
2983 * The next element becomes the new top.
2984 * @param yyscanner The scanner object.
2985 */
2986void yypop_buffer_state (yyscan_t yyscanner)
2987{
2988 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2989 if (!YY_CURRENT_BUFFER)
2990 return;
2991
2992 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2993 YY_CURRENT_BUFFER_LVALUE = NULL;
2994 if (yyg->yy_buffer_stack_top > 0)
2995 --yyg->yy_buffer_stack_top;
2996
2997 if (YY_CURRENT_BUFFER) {
2998 yy_load_buffer_state( yyscanner );
2999 yyg->yy_did_buffer_switch_on_eof = 1;
3000 }
3001}
3002
3003/* Allocates the stack if it does not exist.
3004 * Guarantees space for at least one push.
3005 */
3006static void yyensure_buffer_stack (yyscan_t yyscanner)
3007{
3008 yy_size_t num_to_alloc;
3009 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3010
3011 if (!yyg->yy_buffer_stack) {
3012
3013 /* First allocation is just for 2 elements, since we don't know if this
3014 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3015 * immediate realloc on the next call.
3016 */
3017 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3018 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
3019 (num_to_alloc * sizeof(struct yy_buffer_state*)
3020 , yyscanner);
3021 if ( ! yyg->yy_buffer_stack )
3022 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3023
3024 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3025
3026 yyg->yy_buffer_stack_max = num_to_alloc;
3027 yyg->yy_buffer_stack_top = 0;
3028 return;
3029 }
3030
3031 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
3032
3033 /* Increase the buffer to prepare for a possible push. */
3034 yy_size_t grow_size = 8 /* arbitrary grow size */;
3035
3036 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
3037 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
3038 (yyg->yy_buffer_stack,
3039 num_to_alloc * sizeof(struct yy_buffer_state*)
3040 , yyscanner);
3041 if ( ! yyg->yy_buffer_stack )
3042 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3043
3044 /* zero only the new slots.*/
3045 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
3046 yyg->yy_buffer_stack_max = num_to_alloc;
3047 }
3048}
3049
3050/** Setup the input buffer state to scan directly from a user-specified character buffer.
3051 * @param base the character buffer
3052 * @param size the size in bytes of the character buffer
3053 * @param yyscanner The scanner object.
3054 * @return the newly allocated buffer state object.
3055 */
3056YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
3057{
3058 YY_BUFFER_STATE b;
3059
3060 if ( size < 2 ||
3061 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3062 base[size-1] != YY_END_OF_BUFFER_CHAR )
3063 /* They forgot to leave room for the EOB's. */
3064 return NULL;
3065
3066 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
3067 if ( ! b )
3068 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3069
3070 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3071 b->yy_buf_pos = b->yy_ch_buf = base;
3072 b->yy_is_our_buffer = 0;
3073 b->yy_input_file = NULL;
3074 b->yy_n_chars = b->yy_buf_size;
3075 b->yy_is_interactive = 0;
3076 b->yy_at_bol = 1;
3077 b->yy_fill_buffer = 0;
3078 b->yy_buffer_status = YY_BUFFER_NEW;
3079
3080 yy_switch_to_buffer( b , yyscanner );
3081
3082 return b;
3083}
3084
3085/** Setup the input buffer state to scan a string. The next call to yylex() will
3086 * scan from a @e copy of @a str.
3087 * @param yystr a NUL-terminated string to scan
3088 * @param yyscanner The scanner object.
3089 * @return the newly allocated buffer state object.
3090 * @note If you want to scan bytes that may contain NUL values, then use
3091 * yy_scan_bytes() instead.
3092 */
3093YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
3094{
3095
3096 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
3097}
3098
3099/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3100 * scan from a @e copy of @a bytes.
3101 * @param yybytes the byte buffer to scan
3102 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3103 * @param yyscanner The scanner object.
3104 * @return the newly allocated buffer state object.
3105 */
3106YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
3107{
3108 YY_BUFFER_STATE b;
3109 char *buf;
3110 yy_size_t n;
3111 int i;
3112
3113 /* Get memory for full buffer, including space for trailing EOB's. */
3114 n = (yy_size_t) (_yybytes_len + 2);
3115 buf = (char *) yyalloc( n , yyscanner );
3116 if ( ! buf )
3117 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3118
3119 for ( i = 0; i < _yybytes_len; ++i )
3120 buf[i] = yybytes[i];
3121
3122 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3123
3124 b = yy_scan_buffer( buf, n , yyscanner);
3125 if ( ! b )
3126 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3127
3128 /* It's okay to grow etc. this buffer, and we should throw it
3129 * away when we're done.
3130 */
3131 b->yy_is_our_buffer = 1;
3132
3133 return b;
3134}
3135
3136 static void yy_push_state (int _new_state , yyscan_t yyscanner)
3137{
3138 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3139 if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
3140 {
3141 yy_size_t new_size;
3142
3143 yyg->yy_start_stack_depth += YY_START_STACK_INCR;
3144 new_size = (yy_size_t) yyg->yy_start_stack_depth * sizeof( int );
3145
3146 if ( ! yyg->yy_start_stack )
3147 yyg->yy_start_stack = (int *) yyalloc( new_size , yyscanner );
3148
3149 else
3150 yyg->yy_start_stack = (int *) yyrealloc(
3151 (void *) yyg->yy_start_stack, new_size , yyscanner );
3152
3153 if ( ! yyg->yy_start_stack )
3154 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
3155 }
3156
3157 yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
3158
3159 BEGIN(_new_state);
3160}
3161
3162 static void yy_pop_state (yyscan_t yyscanner)
3163{
3164 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3165 if ( --yyg->yy_start_stack_ptr < 0 )
3166 YY_FATAL_ERROR( "start-condition stack underflow" );
3167
3168 BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
3169}
3170
3171 static int yy_top_state (yyscan_t yyscanner)
3172{
3173 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3174 return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
3175}
3176
3177#ifndef YY_EXIT_FAILURE
3178#define YY_EXIT_FAILURE 2
3179#endif
3180
3181static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
3182{
3183 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3184 (void)yyg;
3185 fprintf( stderr, "%s\n", msg );
3186 exit( YY_EXIT_FAILURE );
3187}
3188
3189/* Redefine yyless() so it works in section 3 code. */
3190
3191#undef yyless
3192#define yyless(n) \
3193 do \
3194 { \
3195 /* Undo effects of setting up yytext. */ \
3196 int yyless_macro_arg = (n); \
3197 YY_LESS_LINENO(yyless_macro_arg);\
3198 yytext[yyleng] = yyg->yy_hold_char; \
3199 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
3200 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
3201 *yyg->yy_c_buf_p = '\0'; \
3202 yyleng = yyless_macro_arg; \
3203 } \
3204 while ( 0 )
3205
3206/* Accessor methods (get/set functions) to struct members. */
3207
3208/** Get the user-defined data for this scanner.
3209 * @param yyscanner The scanner object.
3210 */
3211YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3212{
3213 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3214 return yyextra;
3215}
3216
3217/** Get the current line number.
3218 * @param yyscanner The scanner object.
3219 */
3220int yyget_lineno (yyscan_t yyscanner)
3221{
3222 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3223
3224 if (! YY_CURRENT_BUFFER)
3225 return 0;
3226
3227 return yylineno;
3228}
3229
3230/** Get the current column number.
3231 * @param yyscanner The scanner object.
3232 */
3233int yyget_column (yyscan_t yyscanner)
3234{
3235 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3236
3237 if (! YY_CURRENT_BUFFER)
3238 return 0;
3239
3240 return yycolumn;
3241}
3242
3243/** Get the input stream.
3244 * @param yyscanner The scanner object.
3245 */
3246FILE *yyget_in (yyscan_t yyscanner)
3247{
3248 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3249 return yyin;
3250}
3251
3252/** Get the output stream.
3253 * @param yyscanner The scanner object.
3254 */
3255FILE *yyget_out (yyscan_t yyscanner)
3256{
3257 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3258 return yyout;
3259}
3260
3261/** Get the length of the current token.
3262 * @param yyscanner The scanner object.
3263 */
3264int yyget_leng (yyscan_t yyscanner)
3265{
3266 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3267 return yyleng;
3268}
3269
3270/** Get the current token.
3271 * @param yyscanner The scanner object.
3272 */
3273
3274char *yyget_text (yyscan_t yyscanner)
3275{
3276 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3277 return yytext;
3278}
3279
3280/** Set the user-defined data. This data is never touched by the scanner.
3281 * @param user_defined The data to be associated with this scanner.
3282 * @param yyscanner The scanner object.
3283 */
3284void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3285{
3286 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3287 yyextra = user_defined ;
3288}
3289
3290/** Set the current line number.
3291 * @param _line_number line number
3292 * @param yyscanner The scanner object.
3293 */
3294void yyset_lineno (int _line_number , yyscan_t yyscanner)
3295{
3296 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3297
3298 /* lineno is only valid if an input buffer exists. */
3299 if (! YY_CURRENT_BUFFER )
3300 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
3301
3302 yylineno = _line_number;
3303}
3304
3305/** Set the current column.
3306 * @param _column_no column number
3307 * @param yyscanner The scanner object.
3308 */
3309void yyset_column (int _column_no , yyscan_t yyscanner)
3310{
3311 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3312
3313 /* column is only valid if an input buffer exists. */
3314 if (! YY_CURRENT_BUFFER )
3315 YY_FATAL_ERROR( "yyset_column called with no buffer" );
3316
3317 yycolumn = _column_no;
3318}
3319
3320/** Set the input stream. This does not discard the current
3321 * input buffer.
3322 * @param _in_str A readable stream.
3323 * @param yyscanner The scanner object.
3324 * @see yy_switch_to_buffer
3325 */
3326void yyset_in (FILE * _in_str , yyscan_t yyscanner)
3327{
3328 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3329 yyin = _in_str ;
3330}
3331
3332void yyset_out (FILE * _out_str , yyscan_t yyscanner)
3333{
3334 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3335 yyout = _out_str ;
3336}
3337
3338int yyget_debug (yyscan_t yyscanner)
3339{
3340 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3341 return yy_flex_debug;
3342}
3343
3344void yyset_debug (int _bdebug , yyscan_t yyscanner)
3345{
3346 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3347 yy_flex_debug = _bdebug ;
3348}
3349
3350/* Accessor methods for yylval and yylloc */
3351
3352YYSTYPE * yyget_lval (yyscan_t yyscanner)
3353{
3354 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3355 return yylval;
3356}
3357
3358void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
3359{
3360 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3361 yylval = yylval_param;
3362}
3363
3364YYLTYPE *yyget_lloc (yyscan_t yyscanner)
3365{
3366 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3367 return yylloc;
3368}
3369
3370void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
3371{
3372 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3373 yylloc = yylloc_param;
3374}
3375
3376/* User-visible API */
3377
3378/* yylex_init is special because it creates the scanner itself, so it is
3379 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3380 * That's why we explicitly handle the declaration, instead of using our macros.
3381 */
3382int yylex_init(yyscan_t* ptr_yy_globals)
3383{
3384 if (ptr_yy_globals == NULL){
3385 errno = EINVAL;
3386 return 1;
3387 }
3388
3389 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3390
3391 if (*ptr_yy_globals == NULL){
3392 errno = ENOMEM;
3393 return 1;
3394 }
3395
3396 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3397 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3398
3399 return yy_init_globals ( *ptr_yy_globals );
3400}
3401
3402/* yylex_init_extra has the same functionality as yylex_init, but follows the
3403 * convention of taking the scanner as the last argument. Note however, that
3404 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3405 * is the reason, too, why this function also must handle its own declaration).
3406 * The user defined value in the first argument will be available to yyalloc in
3407 * the yyextra field.
3408 */
3409int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3410{
3411 struct yyguts_t dummy_yyguts;
3412
3413 yyset_extra (yy_user_defined, &dummy_yyguts);
3414
3415 if (ptr_yy_globals == NULL){
3416 errno = EINVAL;
3417 return 1;
3418 }
3419
3420 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3421
3422 if (*ptr_yy_globals == NULL){
3423 errno = ENOMEM;
3424 return 1;
3425 }
3426
3427 /* By setting to 0xAA, we expose bugs in
3428 yy_init_globals. Leave at 0x00 for releases. */
3429 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3430
3431 yyset_extra (yy_user_defined, *ptr_yy_globals);
3432
3433 return yy_init_globals ( *ptr_yy_globals );
3434}
3435
3436static int yy_init_globals (yyscan_t yyscanner)
3437{
3438 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3439 /* Initialization is the same as for the non-reentrant scanner.
3440 * This function is called from yylex_destroy(), so don't allocate here.
3441 */
3442
3443 yyg->yy_buffer_stack = NULL;
3444 yyg->yy_buffer_stack_top = 0;
3445 yyg->yy_buffer_stack_max = 0;
3446 yyg->yy_c_buf_p = NULL;
3447 yyg->yy_init = 0;
3448 yyg->yy_start = 0;
3449
3450 yyg->yy_start_stack_ptr = 0;
3451 yyg->yy_start_stack_depth = 0;
3452 yyg->yy_start_stack = NULL;
3453
3454/* Defined in main.c */
3455#ifdef YY_STDINIT
3456 yyin = stdin;
3457 yyout = stdout;
3458#else
3459 yyin = NULL;
3460 yyout = NULL;
3461#endif
3462
3463 /* For future reference: Set errno on error, since we are called by
3464 * yylex_init()
3465 */
3466 return 0;
3467}
3468
3469/* yylex_destroy is for both reentrant and non-reentrant scanners. */
3470int yylex_destroy (yyscan_t yyscanner)
3471{
3472 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3473
3474 /* Pop the buffer stack, destroying each element. */
3475 while(YY_CURRENT_BUFFER){
3476 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3477 YY_CURRENT_BUFFER_LVALUE = NULL;
3478 yypop_buffer_state(yyscanner);
3479 }
3480
3481 /* Destroy the stack itself. */
3482 yyfree(yyg->yy_buffer_stack , yyscanner);
3483 yyg->yy_buffer_stack = NULL;
3484
3485 /* Destroy the start condition stack. */
3486 yyfree( yyg->yy_start_stack , yyscanner );
3487 yyg->yy_start_stack = NULL;
3488
3489 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3490 * yylex() is called, initialization will occur. */
3491 yy_init_globals( yyscanner);
3492
3493 /* Destroy the main struct (reentrant only). */
3494 yyfree ( yyscanner , yyscanner );
3495 yyscanner = NULL;
3496 return 0;
3497}
3498
3499/*
3500 * Internal utility routines.
3501 */
3502
3503#ifndef yytext_ptr
3504static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3505{
3506 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3507 (void)yyg;
3508
3509 int i;
3510 for ( i = 0; i < n; ++i )
3511 s1[i] = s2[i];
3512}
3513#endif
3514
3515#ifdef YY_NEED_STRLEN
3516static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3517{
3518 int n;
3519 for ( n = 0; s[n]; ++n )
3520 ;
3521
3522 return n;
3523}
3524#endif
3525
3526void *yyalloc (yy_size_t size , yyscan_t yyscanner)
3527{
3528 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3529 (void)yyg;
3530 return malloc(size);
3531}
3532
3533void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3534{
3535 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3536 (void)yyg;
3537
3538 /* The cast to (char *) in the following accommodates both
3539 * implementations that use char* generic pointers, and those
3540 * that use void* generic pointers. It works with the latter
3541 * because both ANSI C and C++ allow castless assignment from
3542 * any pointer type to void*, and deal with argument conversions
3543 * as though doing an assignment.
3544 */
3545 return realloc(ptr, size);
3546}
3547
3548void yyfree (void * ptr , yyscan_t yyscanner)
3549{
3550 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3551 (void)yyg;
3552 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3553}
3554
3555#define YYTABLES_NAME "yytables"
3556
3557namespace MiniZinc {
3558 int yy_input_proc(char* buf, int size, yyscan_t yyscanner) {
3559 MiniZinc::ParserState* parm =
3560 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner));
3561 return parm->fillBuffer(buf, size);
3562 // work around warning that yyunput is unused
3563 yyunput (0,buf,yyscanner);
3564 }
3565}
3566