Commit 5564dda3f42663374e46888c3f208873003fa379

Authored by Salvador Abreu
1 parent 3d23f341
Exists in master

ditch generated files

TODO 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +TODO list
  2 +
  3 +- port flatzinc parser from Gecode
  4 +- implement necessary new constraints to suit flatzinc
  5 +
  6 +DONE list
fz/.gitignore 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +*.tab.cpp
  2 +*.tab.hh
  3 +*.yy.cpp
  4 +fz
fz/lexer.yy.cpp
@@ -1,2451 +0,0 @@ @@ -1,2451 +0,0 @@
1 -#line 2 "lexer.yy.cpp"  
2 -  
3 -#line 4 "lexer.yy.cpp"  
4 -  
5 -#define YY_INT_ALIGNED short int  
6 -  
7 -/* A lexical scanner generated by flex */  
8 -  
9 -#define FLEX_SCANNER  
10 -#define YY_FLEX_MAJOR_VERSION 2  
11 -#define YY_FLEX_MINOR_VERSION 5  
12 -#define YY_FLEX_SUBMINOR_VERSION 35  
13 -#if YY_FLEX_SUBMINOR_VERSION > 0  
14 -#define FLEX_BETA  
15 -#endif  
16 -  
17 -/* First, we deal with platform-specific or compiler-specific issues. */  
18 -  
19 -/* begin standard C headers. */  
20 -#include <stdio.h>  
21 -#include <string.h>  
22 -#include <errno.h>  
23 -#include <stdlib.h>  
24 -  
25 -/* end standard C headers. */  
26 -  
27 -/* flex integer type definitions */  
28 -  
29 -#ifndef FLEXINT_H  
30 -#define FLEXINT_H  
31 -  
32 -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */  
33 -  
34 -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L  
35 -  
36 -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,  
37 - * if you want the limit (max/min) macros for int types.  
38 - */  
39 -#ifndef __STDC_LIMIT_MACROS  
40 -#define __STDC_LIMIT_MACROS 1  
41 -#endif  
42 -  
43 -#include <inttypes.h>  
44 -typedef int8_t flex_int8_t;  
45 -typedef uint8_t flex_uint8_t;  
46 -typedef int16_t flex_int16_t;  
47 -typedef uint16_t flex_uint16_t;  
48 -typedef int32_t flex_int32_t;  
49 -typedef uint32_t flex_uint32_t;  
50 -#else  
51 -typedef signed char flex_int8_t;  
52 -typedef short int flex_int16_t;  
53 -typedef int flex_int32_t;  
54 -typedef unsigned char flex_uint8_t;  
55 -typedef unsigned short int flex_uint16_t;  
56 -typedef unsigned int flex_uint32_t;  
57 -#endif /* ! C99 */  
58 -  
59 -/* Limits of integral types. */  
60 -#ifndef INT8_MIN  
61 -#define INT8_MIN (-128)  
62 -#endif  
63 -#ifndef INT16_MIN  
64 -#define INT16_MIN (-32767-1)  
65 -#endif  
66 -#ifndef INT32_MIN  
67 -#define INT32_MIN (-2147483647-1)  
68 -#endif  
69 -#ifndef INT8_MAX  
70 -#define INT8_MAX (127)  
71 -#endif  
72 -#ifndef INT16_MAX  
73 -#define INT16_MAX (32767)  
74 -#endif  
75 -#ifndef INT32_MAX  
76 -#define INT32_MAX (2147483647)  
77 -#endif  
78 -#ifndef UINT8_MAX  
79 -#define UINT8_MAX (255U)  
80 -#endif  
81 -#ifndef UINT16_MAX  
82 -#define UINT16_MAX (65535U)  
83 -#endif  
84 -#ifndef UINT32_MAX  
85 -#define UINT32_MAX (4294967295U)  
86 -#endif  
87 -  
88 -#endif /* ! FLEXINT_H */  
89 -  
90 -#ifdef __cplusplus  
91 -  
92 -/* The "const" storage-class-modifier is valid. */  
93 -#define YY_USE_CONST  
94 -  
95 -#else /* ! __cplusplus */  
96 -  
97 -/* C99 requires __STDC__ to be defined as 1. */  
98 -#if defined (__STDC__)  
99 -  
100 -#define YY_USE_CONST  
101 -  
102 -#endif /* defined (__STDC__) */  
103 -#endif /* ! __cplusplus */  
104 -  
105 -#ifdef YY_USE_CONST  
106 -#define yyconst const  
107 -#else  
108 -#define yyconst  
109 -#endif  
110 -  
111 -/* Returned upon end-of-file. */  
112 -#define YY_NULL 0  
113 -  
114 -/* Promotes a possibly negative, possibly signed char to an unsigned  
115 - * integer for use as an array index. If the signed char is negative,  
116 - * we want to instead treat it as an 8-bit unsigned char, hence the  
117 - * double cast.  
118 - */  
119 -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)  
120 -  
121 -/* An opaque pointer. */  
122 -#ifndef YY_TYPEDEF_YY_SCANNER_T  
123 -#define YY_TYPEDEF_YY_SCANNER_T  
124 -typedef void* yyscan_t;  
125 -#endif  
126 -  
127 -/* For convenience, these vars (plus the bison vars far below)  
128 - are macros in the reentrant scanner. */  
129 -#define yyin yyg->yyin_r  
130 -#define yyout yyg->yyout_r  
131 -#define yyextra yyg->yyextra_r  
132 -#define yyleng yyg->yyleng_r  
133 -#define yytext yyg->yytext_r  
134 -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)  
135 -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)  
136 -#define yy_flex_debug yyg->yy_flex_debug_r  
137 -  
138 -/* Enter a start condition. This macro really ought to take a parameter,  
139 - * but we do it the disgusting crufty way forced on us by the ()-less  
140 - * definition of BEGIN.  
141 - */  
142 -#define BEGIN yyg->yy_start = 1 + 2 *  
143 -  
144 -/* Translate the current start state into a value that can be later handed  
145 - * to BEGIN to return to the state. The YYSTATE alias is for lex  
146 - * compatibility.  
147 - */  
148 -#define YY_START ((yyg->yy_start - 1) / 2)  
149 -#define YYSTATE YY_START  
150 -  
151 -/* Action number for EOF rule of a given start state. */  
152 -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)  
153 -  
154 -/* Special action meaning "start processing a new file". */  
155 -#define YY_NEW_FILE yyrestart(yyin ,yyscanner )  
156 -  
157 -#define YY_END_OF_BUFFER_CHAR 0  
158 -  
159 -/* Size of default input buffer. */  
160 -#ifndef YY_BUF_SIZE  
161 -#define YY_BUF_SIZE 16384  
162 -#endif  
163 -  
164 -/* The state buf must be large enough to hold one state per character in the main buffer.  
165 - */  
166 -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))  
167 -  
168 -#ifndef YY_TYPEDEF_YY_BUFFER_STATE  
169 -#define YY_TYPEDEF_YY_BUFFER_STATE  
170 -typedef struct yy_buffer_state *YY_BUFFER_STATE;  
171 -#endif  
172 -  
173 -#define EOB_ACT_CONTINUE_SCAN 0  
174 -#define EOB_ACT_END_OF_FILE 1  
175 -#define EOB_ACT_LAST_MATCH 2  
176 -  
177 - /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires  
178 - * access to the local variable yy_act. Since yyless() is a macro, it would break  
179 - * existing scanners that call yyless() from OUTSIDE yylex.  
180 - * One obvious solution it to make yy_act a global. I tried that, and saw  
181 - * a 5% performance hit in a non-yylineno scanner, because yy_act is  
182 - * normally declared as a register variable-- so it is not worth it.  
183 - */  
184 - #define YY_LESS_LINENO(n) \  
185 - do { \  
186 - int yyl;\  
187 - for ( yyl = n; yyl < yyleng; ++yyl )\  
188 - if ( yytext[yyl] == '\n' )\  
189 - --yylineno;\  
190 - }while(0)  
191 -  
192 -/* Return all but the first "n" matched characters back to the input stream. */  
193 -#define yyless(n) \  
194 - do \  
195 - { \  
196 - /* Undo effects of setting up yytext. */ \  
197 - int yyless_macro_arg = (n); \  
198 - YY_LESS_LINENO(yyless_macro_arg);\  
199 - *yy_cp = yyg->yy_hold_char; \  
200 - YY_RESTORE_YY_MORE_OFFSET \  
201 - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \  
202 - YY_DO_BEFORE_ACTION; /* set up yytext again */ \  
203 - } \  
204 - while ( 0 )  
205 -  
206 -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )  
207 -  
208 -#ifndef YY_TYPEDEF_YY_SIZE_T  
209 -#define YY_TYPEDEF_YY_SIZE_T  
210 -typedef size_t yy_size_t;  
211 -#endif  
212 -  
213 -#ifndef YY_STRUCT_YY_BUFFER_STATE  
214 -#define YY_STRUCT_YY_BUFFER_STATE  
215 -struct yy_buffer_state  
216 - {  
217 - FILE *yy_input_file;  
218 -  
219 - char *yy_ch_buf; /* input buffer */  
220 - char *yy_buf_pos; /* current position in input buffer */  
221 -  
222 - /* Size of input buffer in bytes, not including room for EOB  
223 - * characters.  
224 - */  
225 - yy_size_t yy_buf_size;  
226 -  
227 - /* Number of characters read into yy_ch_buf, not including EOB  
228 - * characters.  
229 - */  
230 - int yy_n_chars;  
231 -  
232 - /* Whether we "own" the buffer - i.e., we know we created it,  
233 - * and can realloc() it to grow it, and should free() it to  
234 - * delete it.  
235 - */  
236 - int yy_is_our_buffer;  
237 -  
238 - /* Whether this is an "interactive" input source; if so, and  
239 - * if we're using stdio for input, then we want to use getc()  
240 - * instead of fread(), to make sure we stop fetching input after  
241 - * each newline.  
242 - */  
243 - int yy_is_interactive;  
244 -  
245 - /* Whether we're considered to be at the beginning of a line.  
246 - * If so, '^' rules will be active on the next match, otherwise  
247 - * not.  
248 - */  
249 - int yy_at_bol;  
250 -  
251 - int yy_bs_lineno; /**< The line count. */  
252 - int yy_bs_column; /**< The column count. */  
253 -  
254 - /* Whether to try to fill the input buffer when we reach the  
255 - * end of it.  
256 - */  
257 - int yy_fill_buffer;  
258 -  
259 - int yy_buffer_status;  
260 -  
261 -#define YY_BUFFER_NEW 0  
262 -#define YY_BUFFER_NORMAL 1  
263 - /* When an EOF's been seen but there's still some text to process  
264 - * then we mark the buffer as YY_EOF_PENDING, to indicate that we  
265 - * shouldn't try reading from the input source any more. We might  
266 - * still have a bunch of tokens to match, though, because of  
267 - * possible backing-up.  
268 - *  
269 - * When we actually see the EOF, we change the status to "new"  
270 - * (via yyrestart()), so that the user can continue scanning by  
271 - * just pointing yyin at a new input file.  
272 - */  
273 -#define YY_BUFFER_EOF_PENDING 2  
274 -  
275 - };  
276 -#endif /* !YY_STRUCT_YY_BUFFER_STATE */  
277 -  
278 -/* We provide macros for accessing buffer states in case in the  
279 - * future we want to put the buffer states in a more general  
280 - * "scanner state".  
281 - *  
282 - * Returns the top of the stack, or NULL.  
283 - */  
284 -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \  
285 - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \  
286 - : NULL)  
287 -  
288 -/* Same as previous macro, but useful when we know that the buffer stack is not  
289 - * NULL or when we need an lvalue. For internal use only.  
290 - */  
291 -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]  
292 -  
293 -void yyrestart (FILE *input_file ,yyscan_t yyscanner );  
294 -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );  
295 -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );  
296 -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );  
297 -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );  
298 -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );  
299 -void yypop_buffer_state (yyscan_t yyscanner );  
300 -  
301 -static void yyensure_buffer_stack (yyscan_t yyscanner );  
302 -static void yy_load_buffer_state (yyscan_t yyscanner );  
303 -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );  
304 -  
305 -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)  
306 -  
307 -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );  
308 -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );  
309 -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );  
310 -  
311 -void *yyalloc (yy_size_t ,yyscan_t yyscanner );  
312 -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );  
313 -void yyfree (void * ,yyscan_t yyscanner );  
314 -  
315 -#define yy_new_buffer yy_create_buffer  
316 -  
317 -#define yy_set_interactive(is_interactive) \  
318 - { \  
319 - if ( ! YY_CURRENT_BUFFER ){ \  
320 - yyensure_buffer_stack (yyscanner); \  
321 - YY_CURRENT_BUFFER_LVALUE = \  
322 - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \  
323 - } \  
324 - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \  
325 - }  
326 -  
327 -#define yy_set_bol(at_bol) \  
328 - { \  
329 - if ( ! YY_CURRENT_BUFFER ){\  
330 - yyensure_buffer_stack (yyscanner); \  
331 - YY_CURRENT_BUFFER_LVALUE = \  
332 - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \  
333 - } \  
334 - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \  
335 - }  
336 -  
337 -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)  
338 -  
339 -/* Begin user sect3 */  
340 -  
341 -#define yywrap(n) 1  
342 -#define YY_SKIP_YYWRAP  
343 -  
344 -typedef unsigned char YY_CHAR;  
345 -  
346 -typedef int yy_state_type;  
347 -  
348 -#define yytext_ptr yytext_r  
349 -  
350 -static yy_state_type yy_get_previous_state (yyscan_t yyscanner );  
351 -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);  
352 -static int yy_get_next_buffer (yyscan_t yyscanner );  
353 -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );  
354 -  
355 -/* Done after the current pattern has been matched and before the  
356 - * corresponding action - sets up yytext.  
357 - */  
358 -#define YY_DO_BEFORE_ACTION \  
359 - yyg->yytext_ptr = yy_bp; \  
360 - yyleng = (size_t) (yy_cp - yy_bp); \  
361 - yyg->yy_hold_char = *yy_cp; \  
362 - *yy_cp = '\0'; \  
363 - yyg->yy_c_buf_p = yy_cp;  
364 -  
365 -#define YY_NUM_RULES 56  
366 -#define YY_END_OF_BUFFER 57  
367 -/* This struct is not used in this scanner,  
368 - but its presence is necessary. */  
369 -struct yy_trans_info  
370 - {  
371 - flex_int32_t yy_verify;  
372 - flex_int32_t yy_nxt;  
373 - };  
374 -static yyconst flex_int16_t yy_accept[221] =  
375 - { 0,  
376 - 0, 0, 57, 55, 2, 1, 55, 3, 12, 55,  
377 - 12, 6, 6, 12, 52, 55, 52, 52, 52, 52,  
378 - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,  
379 - 52, 52, 0, 54, 3, 6, 6, 13, 0, 0,  
380 - 0, 0, 14, 52, 53, 0, 52, 52, 52, 52,  
381 - 52, 52, 52, 52, 52, 52, 52, 28, 52, 52,  
382 - 52, 52, 34, 52, 52, 52, 52, 52, 52, 52,  
383 - 52, 52, 52, 52, 52, 52, 52, 52, 52, 9,  
384 - 0, 11, 8, 7, 53, 52, 16, 52, 52, 52,  
385 - 52, 52, 52, 52, 52, 52, 52, 52, 52, 30,  
386 -  
387 - 31, 52, 52, 52, 37, 52, 52, 52, 40, 52,  
388 - 52, 52, 52, 52, 52, 52, 52, 49, 52, 0,  
389 - 52, 52, 18, 19, 52, 52, 22, 52, 25, 52,  
390 - 52, 52, 52, 52, 52, 52, 52, 52, 52, 42,  
391 - 52, 52, 45, 46, 4, 52, 48, 52, 52, 0,  
392 - 10, 52, 17, 52, 52, 52, 24, 5, 26, 52,  
393 - 52, 52, 52, 52, 52, 52, 52, 52, 43, 52,  
394 - 47, 52, 51, 52, 52, 52, 23, 52, 52, 52,  
395 - 52, 36, 52, 39, 52, 52, 44, 52, 52, 52,  
396 - 21, 52, 29, 52, 52, 52, 35, 52, 52, 52,  
397 -  
398 - 52, 27, 32, 33, 52, 52, 52, 52, 52, 38,  
399 - 41, 52, 15, 20, 52, 52, 52, 52, 50, 0  
400 - } ;  
401 -  
402 -static yyconst flex_int32_t yy_ec[256] =  
403 - { 0,  
404 - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,  
405 - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,  
406 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
407 - 1, 2, 1, 4, 1, 1, 5, 1, 1, 6,  
408 - 6, 1, 7, 6, 8, 9, 1, 10, 11, 11,  
409 - 11, 11, 11, 11, 11, 12, 12, 13, 6, 1,  
410 - 6, 1, 1, 1, 14, 14, 14, 14, 15, 14,  
411 - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,  
412 - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,  
413 - 6, 1, 6, 1, 17, 1, 18, 19, 20, 21,  
414 -  
415 - 22, 23, 24, 25, 26, 16, 16, 27, 28, 29,  
416 - 30, 31, 16, 32, 33, 34, 35, 36, 37, 38,  
417 - 39, 40, 6, 1, 6, 1, 1, 1, 1, 1,  
418 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
419 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
420 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
421 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
422 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
423 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
424 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
425 -  
426 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
427 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
428 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
429 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
430 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
431 - 1, 1, 1, 1, 1  
432 - } ;  
433 -  
434 -static yyconst flex_int32_t yy_meta[41] =  
435 - { 0,  
436 - 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,  
437 - 3, 3, 1, 4, 4, 5, 5, 4, 4, 4,  
438 - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5,  
439 - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5  
440 - } ;  
441 -  
442 -static yyconst flex_int16_t yy_base[227] =  
443 - { 0,  
444 - 0, 0, 276, 277, 277, 277, 271, 0, 277, 31,  
445 - 265, 35, 18, 260, 0, 255, 20, 241, 33, 248,  
446 - 26, 40, 31, 247, 43, 36, 44, 246, 52, 56,  
447 - 249, 241, 261, 277, 0, 0, 0, 277, 73, 82,  
448 - 69, 0, 277, 0, 0, 247, 58, 231, 232, 228,  
449 - 231, 236, 225, 75, 230, 226, 226, 0, 78, 220,  
450 - 215, 223, 0, 217, 218, 227, 228, 213, 212, 215,  
451 - 217, 211, 209, 219, 205, 208, 207, 205, 214, 89,  
452 - 95, 103, 92, 0, 0, 205, 0, 216, 206, 210,  
453 - 198, 212, 207, 202, 199, 193, 207, 204, 196, 0,  
454 -  
455 - 0, 196, 195, 189, 0, 198, 188, 191, 0, 179,  
456 - 179, 188, 179, 183, 189, 183, 187, 182, 175, 109,  
457 - 172, 166, 0, 0, 170, 168, 176, 178, 0, 178,  
458 - 165, 164, 162, 168, 167, 159, 167, 160, 158, 173,  
459 - 167, 159, 0, 0, 0, 165, 0, 168, 163, 112,  
460 - 115, 166, 0, 151, 155, 158, 0, 0, 0, 154,  
461 - 158, 152, 151, 142, 155, 153, 150, 152, 0, 147,  
462 - 0, 141, 0, 135, 150, 133, 0, 136, 143, 124,  
463 - 123, 0, 144, 0, 122, 130, 0, 125, 132, 131,  
464 - 0, 127, 0, 133, 132, 119, 0, 123, 134, 120,  
465 -  
466 - 120, 0, 0, 0, 126, 113, 97, 89, 75, 0,  
467 - 0, 86, 0, 0, 52, 38, 34, 43, 0, 277,  
468 - 127, 132, 135, 137, 140, 142  
469 - } ;  
470 -  
471 -static yyconst flex_int16_t yy_def[227] =  
472 - { 0,  
473 - 220, 1, 220, 220, 220, 220, 221, 222, 220, 220,  
474 - 220, 220, 12, 220, 223, 224, 223, 223, 223, 223,  
475 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
476 - 223, 223, 221, 220, 222, 12, 13, 220, 220, 220,  
477 - 220, 225, 220, 223, 226, 224, 223, 223, 223, 223,  
478 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
479 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
480 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 220,  
481 - 220, 220, 220, 225, 226, 223, 223, 223, 223, 223,  
482 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
483 -  
484 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
485 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 220,  
486 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
487 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
488 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 220,  
489 - 220, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
490 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
491 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
492 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
493 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
494 -  
495 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,  
496 - 223, 223, 223, 223, 223, 223, 223, 223, 223, 0,  
497 - 220, 220, 220, 220, 220, 220  
498 - } ;  
499 -  
500 -static yyconst flex_int16_t yy_nxt[318] =  
501 - { 0,  
502 - 4, 5, 6, 7, 8, 9, 4, 10, 11, 12,  
503 - 13, 13, 14, 15, 15, 15, 16, 17, 18, 19,  
504 - 20, 21, 22, 15, 15, 23, 24, 25, 15, 26,  
505 - 27, 28, 29, 30, 15, 31, 32, 15, 15, 15,  
506 - 36, 37, 37, 39, 37, 37, 37, 220, 47, 40,  
507 - 50, 48, 53, 58, 54, 220, 40, 55, 63, 59,  
508 - 61, 65, 51, 219, 41, 218, 56, 217, 62, 68,  
509 - 64, 216, 42, 69, 57, 66, 70, 73, 83, 83,  
510 - 74, 71, 80, 80, 80, 72, 86, 75, 81, 81,  
511 - 76, 82, 82, 82, 77, 94, 87, 99, 80, 80,  
512 -  
513 - 80, 83, 83, 120, 82, 82, 82, 215, 214, 95,  
514 - 120, 100, 82, 82, 82, 150, 150, 213, 151, 151,  
515 - 151, 151, 151, 151, 151, 151, 151, 33, 212, 33,  
516 - 33, 33, 35, 211, 35, 35, 35, 44, 44, 44,  
517 - 45, 45, 84, 84, 85, 85, 85, 210, 209, 208,  
518 - 207, 206, 205, 204, 203, 202, 201, 200, 199, 198,  
519 - 197, 196, 195, 194, 193, 192, 191, 190, 189, 188,  
520 - 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,  
521 - 177, 176, 175, 174, 173, 172, 171, 170, 169, 168,  
522 - 167, 166, 165, 164, 163, 162, 161, 160, 159, 158,  
523 -  
524 - 157, 156, 155, 154, 153, 152, 149, 148, 147, 146,  
525 - 145, 144, 143, 142, 141, 140, 139, 138, 137, 136,  
526 - 135, 134, 133, 132, 131, 130, 129, 128, 127, 126,  
527 - 125, 124, 123, 122, 121, 119, 118, 117, 116, 115,  
528 - 114, 113, 112, 111, 110, 109, 108, 107, 106, 105,  
529 - 104, 103, 102, 101, 98, 97, 96, 93, 92, 91,  
530 - 90, 89, 88, 46, 34, 79, 78, 67, 60, 52,  
531 - 49, 46, 43, 38, 34, 220, 3, 220, 220, 220,  
532 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
533 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
534 -  
535 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
536 - 220, 220, 220, 220, 220, 220, 220  
537 - } ;  
538 -  
539 -static yyconst flex_int16_t yy_chk[318] =  
540 - { 0,  
541 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
542 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
543 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
544 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  
545 - 10, 10, 10, 12, 12, 12, 12, 13, 17, 12,  
546 - 19, 17, 21, 23, 21, 13, 12, 22, 26, 23,  
547 - 25, 27, 19, 218, 12, 217, 22, 216, 25, 29,  
548 - 26, 215, 12, 29, 22, 27, 29, 30, 41, 41,  
549 - 30, 29, 39, 39, 39, 29, 47, 30, 40, 40,  
550 - 30, 40, 40, 40, 30, 54, 47, 59, 80, 80,  
551 -  
552 - 80, 83, 83, 80, 81, 81, 81, 212, 209, 54,  
553 - 80, 59, 82, 82, 82, 120, 120, 208, 120, 120,  
554 - 120, 150, 150, 150, 151, 151, 151, 221, 207, 221,  
555 - 221, 221, 222, 206, 222, 222, 222, 223, 223, 223,  
556 - 224, 224, 225, 225, 226, 226, 226, 205, 201, 200,  
557 - 199, 198, 196, 195, 194, 192, 190, 189, 188, 186,  
558 - 185, 183, 181, 180, 179, 178, 176, 175, 174, 172,  
559 - 170, 168, 167, 166, 165, 164, 163, 162, 161, 160,  
560 - 156, 155, 154, 152, 149, 148, 146, 142, 141, 140,  
561 - 139, 138, 137, 136, 135, 134, 133, 132, 131, 130,  
562 -  
563 - 128, 127, 126, 125, 122, 121, 119, 118, 117, 116,  
564 - 115, 114, 113, 112, 111, 110, 108, 107, 106, 104,  
565 - 103, 102, 99, 98, 97, 96, 95, 94, 93, 92,  
566 - 91, 90, 89, 88, 86, 79, 78, 77, 76, 75,  
567 - 74, 73, 72, 71, 70, 69, 68, 67, 66, 65,  
568 - 64, 62, 61, 60, 57, 56, 55, 53, 52, 51,  
569 - 50, 49, 48, 46, 33, 32, 31, 28, 24, 20,  
570 - 18, 16, 14, 11, 7, 3, 220, 220, 220, 220,  
571 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
572 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
573 -  
574 - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,  
575 - 220, 220, 220, 220, 220, 220, 220  
576 - } ;  
577 -  
578 -/* Table of booleans, true if rule could match eol. */  
579 -static yyconst flex_int32_t yy_rule_can_match_eol[57] =  
580 - { 0,  
581 -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
582 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
583 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };  
584 -  
585 -/* The intent behind this definition is that it'll catch  
586 - * any uses of REJECT which flex missed.  
587 - */  
588 -#define REJECT reject_used_but_not_detected  
589 -#define yymore() yymore_used_but_not_detected  
590 -#define YY_MORE_ADJ 0  
591 -#define YY_RESTORE_YY_MORE_OFFSET  
592 -#line 1 "lexer.lxx"  
593 -/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */  
594 -/*  
595 - * Main authors:  
596 - * Guido Tack <tack@gecode.org>  
597 - *  
598 - * Copyright:  
599 - * Guido Tack, 2007  
600 - *  
601 - * Last modified:  
602 - * $Date: 2012-03-09 09:58:49 +1100 (Fri, 09 Mar 2012) $ by $Author: tack $  
603 - * $Revision: 12564 $  
604 - *  
605 - * This file is part of Gecode, the generic constraint  
606 - * development environment:  
607 - * http://www.gecode.org  
608 - *  
609 - * Permission is hereby granted, free of charge, to any person obtaining  
610 - * a copy of this software and associated documentation files (the  
611 - * "Software"), to deal in the Software without restriction, including  
612 - * without limitation the rights to use, copy, modify, merge, publish,  
613 - * distribute, sublicense, and/or sell copies of the Software, and to  
614 - * permit persons to whom the Software is furnished to do so, subject to  
615 - * the following conditions:  
616 - *  
617 - * The above copyright notice and this permission notice shall be  
618 - * included in all copies or substantial portions of the Software.  
619 - *  
620 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  
621 - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  
622 - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  
623 - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE  
624 - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION  
625 - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
626 - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
627 - *  
628 - */  
629 -#line 44 "lexer.lxx"  
630 -  
631 -void yyerror(void*, const char*);  
632 -#define yyerror(s) yyerror(yyextra, s)  
633 -  
634 -#include "parser.hh"  
635 -  
636 -const char* stringbuf;  
637 -int stringbuflen;  
638 -int stringbufpos;  
639 -  
640 -int yy_input_proc(char* buf, int size, yyscan_t yyscanner);  
641 -#define YY_INPUT(buf, result, max_size) \  
642 - result = yy_input_proc(buf, max_size, yyscanner);  
643 -#line 644 "lexer.yy.cpp"  
644 -  
645 -#define INITIAL 0  
646 -  
647 -#ifndef YY_NO_UNISTD_H  
648 -/* Special case for "unistd.h", since it is non-ANSI. We include it way  
649 - * down here because we want the user's section 1 to have been scanned first.  
650 - * The user has a chance to override it with an option.  
651 - */  
652 -#include <unistd.h>  
653 -#endif  
654 -  
655 -#ifndef YY_EXTRA_TYPE  
656 -#define YY_EXTRA_TYPE void *  
657 -#endif  
658 -  
659 -/* Holds the entire state of the reentrant scanner. */  
660 -struct yyguts_t  
661 - {  
662 -  
663 - /* User-defined. Not touched by flex. */  
664 - YY_EXTRA_TYPE yyextra_r;  
665 -  
666 - /* The rest are the same as the globals declared in the non-reentrant scanner. */  
667 - FILE *yyin_r, *yyout_r;  
668 - size_t yy_buffer_stack_top; /**< index of top of stack. */  
669 - size_t yy_buffer_stack_max; /**< capacity of stack. */  
670 - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */  
671 - char yy_hold_char;  
672 - int yy_n_chars;  
673 - int yyleng_r;  
674 - char *yy_c_buf_p;  
675 - int yy_init;  
676 - int yy_start;  
677 - int yy_did_buffer_switch_on_eof;  
678 - int yy_start_stack_ptr;  
679 - int yy_start_stack_depth;  
680 - int *yy_start_stack;  
681 - yy_state_type yy_last_accepting_state;  
682 - char* yy_last_accepting_cpos;  
683 -  
684 - int yylineno_r;  
685 - int yy_flex_debug_r;  
686 -  
687 - char *yytext_r;  
688 - int yy_more_flag;  
689 - int yy_more_len;  
690 -  
691 - YYSTYPE * yylval_r;  
692 -  
693 - }; /* end struct yyguts_t */  
694 -  
695 -static int yy_init_globals (yyscan_t yyscanner );  
696 -  
697 - /* This must go here because YYSTYPE and YYLTYPE are included  
698 - * from bison output in section 1.*/  
699 - # define yylval yyg->yylval_r  
700 -  
701 -int yylex_init (yyscan_t* scanner);  
702 -  
703 -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);  
704 -  
705 -/* Accessor methods to globals.  
706 - These are made visible to non-reentrant scanners for convenience. */  
707 -  
708 -int yylex_destroy (yyscan_t yyscanner );  
709 -  
710 -int yyget_debug (yyscan_t yyscanner );  
711 -  
712 -void yyset_debug (int debug_flag ,yyscan_t yyscanner );  
713 -  
714 -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );  
715 -  
716 -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );  
717 -  
718 -FILE *yyget_in (yyscan_t yyscanner );  
719 -  
720 -void yyset_in (FILE * in_str ,yyscan_t yyscanner );  
721 -  
722 -FILE *yyget_out (yyscan_t yyscanner );  
723 -  
724 -void yyset_out (FILE * out_str ,yyscan_t yyscanner );  
725 -  
726 -int yyget_leng (yyscan_t yyscanner );  
727 -  
728 -char *yyget_text (yyscan_t yyscanner );  
729 -  
730 -int yyget_lineno (yyscan_t yyscanner );  
731 -  
732 -void yyset_lineno (int line_number ,yyscan_t yyscanner );  
733 -  
734 -YYSTYPE * yyget_lval (yyscan_t yyscanner );  
735 -  
736 -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );  
737 -  
738 -/* Macros after this point can all be overridden by user definitions in  
739 - * section 1.  
740 - */  
741 -  
742 -#ifndef YY_SKIP_YYWRAP  
743 -#ifdef __cplusplus  
744 -extern "C" int yywrap (yyscan_t yyscanner );  
745 -#else  
746 -extern int yywrap (yyscan_t yyscanner );  
747 -#endif  
748 -#endif  
749 -  
750 - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);  
751 -  
752 -#ifndef yytext_ptr  
753 -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);  
754 -#endif  
755 -  
756 -#ifdef YY_NEED_STRLEN  
757 -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);  
758 -#endif  
759 -  
760 -#ifndef YY_NO_INPUT  
761 -  
762 -#ifdef __cplusplus  
763 -static int yyinput (yyscan_t yyscanner );  
764 -#else  
765 -static int input (yyscan_t yyscanner );  
766 -#endif  
767 -  
768 -#endif  
769 -  
770 -/* Amount of stuff to slurp up with each read. */  
771 -#ifndef YY_READ_BUF_SIZE  
772 -#define YY_READ_BUF_SIZE 8192  
773 -#endif  
774 -  
775 -/* Copy whatever the last rule matched to the standard output. */  
776 -#ifndef ECHO  
777 -/* This used to be an fputs(), but since the string might contain NUL's,  
778 - * we now use fwrite().  
779 - */  
780 -#define ECHO fwrite( yytext, yyleng, 1, yyout )  
781 -#endif  
782 -  
783 -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,  
784 - * is returned in "result".  
785 - */  
786 -#ifndef YY_INPUT  
787 -#define YY_INPUT(buf,result,max_size) \  
788 - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \  
789 - { \  
790 - int c = '*'; \  
791 - yy_size_t n; \  
792 - for ( n = 0; n < max_size && \  
793 - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \  
794 - buf[n] = (char) c; \  
795 - if ( c == '\n' ) \  
796 - buf[n++] = (char) c; \  
797 - if ( c == EOF && ferror( yyin ) ) \  
798 - YY_FATAL_ERROR( "input in flex scanner failed" ); \  
799 - result = n; \  
800 - } \  
801 - else \  
802 - { \  
803 - errno=0; \  
804 - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \  
805 - { \  
806 - if( errno != EINTR) \  
807 - { \  
808 - YY_FATAL_ERROR( "input in flex scanner failed" ); \  
809 - break; \  
810 - } \  
811 - errno=0; \  
812 - clearerr(yyin); \  
813 - } \  
814 - }\  
815 -\  
816 -  
817 -#endif  
818 -  
819 -/* No semi-colon after return; correct usage is to write "yyterminate();" -  
820 - * we don't want an extra ';' after the "return" because that will cause  
821 - * some compilers to complain about unreachable statements.  
822 - */  
823 -#ifndef yyterminate  
824 -#define yyterminate() return YY_NULL  
825 -#endif  
826 -  
827 -/* Number of entries by which start-condition stack grows. */  
828 -#ifndef YY_START_STACK_INCR  
829 -#define YY_START_STACK_INCR 25  
830 -#endif  
831 -  
832 -/* Report a fatal error. */  
833 -#ifndef YY_FATAL_ERROR  
834 -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)  
835 -#endif  
836 -  
837 -/* end tables serialization structures and prototypes */  
838 -  
839 -/* Default declaration of generated scanner - a define so the user can  
840 - * easily add parameters.  
841 - */  
842 -#ifndef YY_DECL  
843 -#define YY_DECL_IS_OURS 1  
844 -  
845 -extern int yylex \  
846 - (YYSTYPE * yylval_param ,yyscan_t yyscanner);  
847 -  
848 -#define YY_DECL int yylex \  
849 - (YYSTYPE * yylval_param , yyscan_t yyscanner)  
850 -#endif /* !YY_DECL */  
851 -  
852 -/* Code executed at the beginning of each rule, after yytext and yyleng  
853 - * have been set up.  
854 - */  
855 -#ifndef YY_USER_ACTION  
856 -#define YY_USER_ACTION  
857 -#endif  
858 -  
859 -/* Code executed at the end of each rule. */  
860 -#ifndef YY_BREAK  
861 -#define YY_BREAK break;  
862 -#endif  
863 -  
864 -#define YY_RULE_SETUP \  
865 - YY_USER_ACTION  
866 -  
867 -/** The main scanner function which does all the work.  
868 - */  
869 -YY_DECL  
870 -{  
871 - register yy_state_type yy_current_state;  
872 - register char *yy_cp, *yy_bp;  
873 - register int yy_act;  
874 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
875 -  
876 -#line 59 "lexer.lxx"  
877 -  
878 -  
879 -#line 880 "lexer.yy.cpp"  
880 -  
881 - yylval = yylval_param;  
882 -  
883 - if ( !yyg->yy_init )  
884 - {  
885 - yyg->yy_init = 1;  
886 -  
887 -#ifdef YY_USER_INIT  
888 - YY_USER_INIT;  
889 -#endif  
890 -  
891 - if ( ! yyg->yy_start )  
892 - yyg->yy_start = 1; /* first start state */  
893 -  
894 - if ( ! yyin )  
895 - yyin = stdin;  
896 -  
897 - if ( ! yyout )  
898 - yyout = stdout;  
899 -  
900 - if ( ! YY_CURRENT_BUFFER ) {  
901 - yyensure_buffer_stack (yyscanner);  
902 - YY_CURRENT_BUFFER_LVALUE =  
903 - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);  
904 - }  
905 -  
906 - yy_load_buffer_state(yyscanner );  
907 - }  
908 -  
909 - while ( 1 ) /* loops until end-of-file is reached */  
910 - {  
911 - yy_cp = yyg->yy_c_buf_p;  
912 -  
913 - /* Support of yytext. */  
914 - *yy_cp = yyg->yy_hold_char;  
915 -  
916 - /* yy_bp points to the position in yy_ch_buf of the start of  
917 - * the current run.  
918 - */  
919 - yy_bp = yy_cp;  
920 -  
921 - yy_current_state = yyg->yy_start;  
922 -yy_match:  
923 - do  
924 - {  
925 - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];  
926 - if ( yy_accept[yy_current_state] )  
927 - {  
928 - yyg->yy_last_accepting_state = yy_current_state;  
929 - yyg->yy_last_accepting_cpos = yy_cp;  
930 - }  
931 - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )  
932 - {  
933 - yy_current_state = (int) yy_def[yy_current_state];  
934 - if ( yy_current_state >= 221 )  
935 - yy_c = yy_meta[(unsigned int) yy_c];  
936 - }  
937 - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];  
938 - ++yy_cp;  
939 - }  
940 - while ( yy_base[yy_current_state] != 277 );  
941 -  
942 -yy_find_action:  
943 - yy_act = yy_accept[yy_current_state];  
944 - if ( yy_act == 0 )  
945 - { /* have to back up */  
946 - yy_cp = yyg->yy_last_accepting_cpos;  
947 - yy_current_state = yyg->yy_last_accepting_state;  
948 - yy_act = yy_accept[yy_current_state];  
949 - }  
950 -  
951 - YY_DO_BEFORE_ACTION;  
952 -  
953 - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )  
954 - {  
955 - yy_size_t yyl;  
956 - for ( yyl = 0; yyl < yyleng; ++yyl )  
957 - if ( yytext[yyl] == '\n' )  
958 -  
959 - do{ yylineno++;  
960 - yycolumn=0;  
961 - }while(0)  
962 -;  
963 - }  
964 -  
965 -do_action: /* This label is used only to access EOF actions. */  
966 -  
967 - switch ( yy_act )  
968 - { /* beginning of action switch */  
969 - case 0: /* must back up */  
970 - /* undo the effects of YY_DO_BEFORE_ACTION */  
971 - *yy_cp = yyg->yy_hold_char;  
972 - yy_cp = yyg->yy_last_accepting_cpos;  
973 - yy_current_state = yyg->yy_last_accepting_state;  
974 - goto yy_find_action;  
975 -  
976 -case 1:  
977 -/* rule 1 can match eol */  
978 -YY_RULE_SETUP  
979 -#line 61 "lexer.lxx"  
980 -{ /*yylineno++;*/ /* ignore EOL */ }  
981 - YY_BREAK  
982 -case 2:  
983 -YY_RULE_SETUP  
984 -#line 62 "lexer.lxx"  
985 -{ /* ignore whitespace */ }  
986 - YY_BREAK  
987 -case 3:  
988 -YY_RULE_SETUP  
989 -#line 63 "lexer.lxx"  
990 -{ /* ignore comments */ }  
991 - YY_BREAK  
992 -case 4:  
993 -YY_RULE_SETUP  
994 -#line 65 "lexer.lxx"  
995 -{ yylval->iValue = 1; return FZ_BOOL_LIT; }  
996 - YY_BREAK  
997 -case 5:  
998 -YY_RULE_SETUP  
999 -#line 66 "lexer.lxx"  
1000 -{ yylval->iValue = 0; return FZ_BOOL_LIT; }  
1001 - YY_BREAK  
1002 -case 6:  
1003 -YY_RULE_SETUP  
1004 -#line 67 "lexer.lxx"  
1005 -{ yylval->iValue = atoi(yytext); return FZ_INT_LIT; }  
1006 - YY_BREAK  
1007 -case 7:  
1008 -YY_RULE_SETUP  
1009 -#line 68 "lexer.lxx"  
1010 -{ yylval->iValue = atoi(yytext); return FZ_INT_LIT; }  
1011 - YY_BREAK  
1012 -case 8:  
1013 -YY_RULE_SETUP  
1014 -#line 69 "lexer.lxx"  
1015 -{ yylval->iValue = atoi(yytext); return FZ_INT_LIT; }  
1016 - YY_BREAK  
1017 -case 9:  
1018 -YY_RULE_SETUP  
1019 -#line 70 "lexer.lxx"  
1020 -{ yylval->dValue = strtod(yytext,NULL);  
1021 - return FZ_FLOAT_LIT; }  
1022 - YY_BREAK  
1023 -case 10:  
1024 -YY_RULE_SETUP  
1025 -#line 72 "lexer.lxx"  
1026 -{ yylval->dValue = strtod(yytext,NULL);  
1027 - return FZ_FLOAT_LIT; }  
1028 - YY_BREAK  
1029 -case 11:  
1030 -YY_RULE_SETUP  
1031 -#line 74 "lexer.lxx"  
1032 -{ yylval->dValue = strtod(yytext,NULL);  
1033 - return FZ_FLOAT_LIT; }  
1034 - YY_BREAK  
1035 -case 12:  
1036 -YY_RULE_SETUP  
1037 -#line 76 "lexer.lxx"  
1038 -{ return *yytext; }  
1039 - YY_BREAK  
1040 -case 13:  
1041 -YY_RULE_SETUP  
1042 -#line 77 "lexer.lxx"  
1043 -{ return FZ_DOTDOT; }  
1044 - YY_BREAK  
1045 -case 14:  
1046 -YY_RULE_SETUP  
1047 -#line 78 "lexer.lxx"  
1048 -{ return FZ_COLONCOLON; }  
1049 - YY_BREAK  
1050 -case 15:  
1051 -YY_RULE_SETUP  
1052 -#line 79 "lexer.lxx"  
1053 -{ return FZ_ANNOTATION; }  
1054 - YY_BREAK  
1055 -case 16:  
1056 -YY_RULE_SETUP  
1057 -#line 80 "lexer.lxx"  
1058 -{ return FZ_ANY; }  
1059 - YY_BREAK  
1060 -case 17:  
1061 -YY_RULE_SETUP  
1062 -#line 81 "lexer.lxx"  
1063 -{ return FZ_ARRAY; }  
1064 - YY_BREAK  
1065 -case 18:  
1066 -YY_RULE_SETUP  
1067 -#line 82 "lexer.lxx"  
1068 -{ return FZ_BOOL; }  
1069 - YY_BREAK  
1070 -case 19:  
1071 -YY_RULE_SETUP  
1072 -#line 83 "lexer.lxx"  
1073 -{ return FZ_CASE; }  
1074 - YY_BREAK  
1075 -case 20:  
1076 -YY_RULE_SETUP  
1077 -#line 84 "lexer.lxx"  
1078 -{ return FZ_CONSTRAINT; }  
1079 - YY_BREAK  
1080 -case 21:  
1081 -YY_RULE_SETUP  
1082 -#line 85 "lexer.lxx"  
1083 -{ return FZ_DEFAULT; }  
1084 - YY_BREAK  
1085 -case 22:  
1086 -YY_RULE_SETUP  
1087 -#line 86 "lexer.lxx"  
1088 -{ return FZ_ELSE; }  
1089 - YY_BREAK  
1090 -case 23:  
1091 -YY_RULE_SETUP  
1092 -#line 87 "lexer.lxx"  
1093 -{ return FZ_ELSEIF; }  
1094 - YY_BREAK  
1095 -case 24:  
1096 -YY_RULE_SETUP  
1097 -#line 88 "lexer.lxx"  
1098 -{ return FZ_ENDIF; }  
1099 - YY_BREAK  
1100 -case 25:  
1101 -YY_RULE_SETUP  
1102 -#line 89 "lexer.lxx"  
1103 -{ return FZ_ENUM; }  
1104 - YY_BREAK  
1105 -case 26:  
1106 -YY_RULE_SETUP  
1107 -#line 90 "lexer.lxx"  
1108 -{ return FZ_FLOAT; }  
1109 - YY_BREAK  
1110 -case 27:  
1111 -YY_RULE_SETUP  
1112 -#line 91 "lexer.lxx"  
1113 -{ return FZ_FUNCTION; }  
1114 - YY_BREAK  
1115 -case 28:  
1116 -YY_RULE_SETUP  
1117 -#line 92 "lexer.lxx"  
1118 -{ return FZ_IF; }  
1119 - YY_BREAK  
1120 -case 29:  
1121 -YY_RULE_SETUP  
1122 -#line 93 "lexer.lxx"  
1123 -{ return FZ_INCLUDE; }  
1124 - YY_BREAK  
1125 -case 30:  
1126 -YY_RULE_SETUP  
1127 -#line 94 "lexer.lxx"  
1128 -{ return FZ_INT; }  
1129 - YY_BREAK  
1130 -case 31:  
1131 -YY_RULE_SETUP  
1132 -#line 95 "lexer.lxx"  
1133 -{ return FZ_LET; }  
1134 - YY_BREAK  
1135 -case 32:  
1136 -YY_RULE_SETUP  
1137 -#line 96 "lexer.lxx"  
1138 -{ yylval->bValue = false; return FZ_MAXIMIZE; }  
1139 - YY_BREAK  
1140 -case 33:  
1141 -YY_RULE_SETUP  
1142 -#line 97 "lexer.lxx"  
1143 -{ yylval->bValue = true; return FZ_MINIMIZE; }  
1144 - YY_BREAK  
1145 -case 34:  
1146 -YY_RULE_SETUP  
1147 -#line 98 "lexer.lxx"  
1148 -{ return FZ_OF; }  
1149 - YY_BREAK  
1150 -case 35:  
1151 -YY_RULE_SETUP  
1152 -#line 99 "lexer.lxx"  
1153 -{ return FZ_SATISFY; }  
1154 - YY_BREAK  
1155 -case 36:  
1156 -YY_RULE_SETUP  
1157 -#line 100 "lexer.lxx"  
1158 -{ return FZ_OUTPUT; }  
1159 - YY_BREAK  
1160 -case 37:  
1161 -YY_RULE_SETUP  
1162 -#line 101 "lexer.lxx"  
1163 -{ yylval->bValue = false; return FZ_PAR; }  
1164 - YY_BREAK  
1165 -case 38:  
1166 -YY_RULE_SETUP  
1167 -#line 102 "lexer.lxx"  
1168 -{ return FZ_PREDICATE; }  
1169 - YY_BREAK  
1170 -case 39:  
1171 -YY_RULE_SETUP  
1172 -#line 103 "lexer.lxx"  
1173 -{ return FZ_RECORD; }  
1174 - YY_BREAK  
1175 -case 40:  
1176 -YY_RULE_SETUP  
1177 -#line 104 "lexer.lxx"  
1178 -{ return FZ_SET; }  
1179 - YY_BREAK  
1180 -case 41:  
1181 -YY_RULE_SETUP  
1182 -#line 105 "lexer.lxx"  
1183 -{ return FZ_SHOWCOND; }  
1184 - YY_BREAK  
1185 -case 42:  
1186 -YY_RULE_SETUP  
1187 -#line 106 "lexer.lxx"  
1188 -{ return FZ_SHOW; }  
1189 - YY_BREAK  
1190 -case 43:  
1191 -YY_RULE_SETUP  
1192 -#line 107 "lexer.lxx"  
1193 -{ return FZ_SOLVE; }  
1194 - YY_BREAK  
1195 -case 44:  
1196 -YY_RULE_SETUP  
1197 -#line 108 "lexer.lxx"  
1198 -{ return FZ_STRING; }  
1199 - YY_BREAK  
1200 -case 45:  
1201 -YY_RULE_SETUP  
1202 -#line 109 "lexer.lxx"  
1203 -{ return FZ_TEST; }  
1204 - YY_BREAK  
1205 -case 46:  
1206 -YY_RULE_SETUP  
1207 -#line 110 "lexer.lxx"  
1208 -{ return FZ_THEN; }  
1209 - YY_BREAK  
1210 -case 47:  
1211 -YY_RULE_SETUP  
1212 -#line 111 "lexer.lxx"  
1213 -{ return FZ_TUPLE; }  
1214 - YY_BREAK  
1215 -case 48:  
1216 -YY_RULE_SETUP  
1217 -#line 112 "lexer.lxx"  
1218 -{ return FZ_TYPE; }  
1219 - YY_BREAK  
1220 -case 49:  
1221 -YY_RULE_SETUP  
1222 -#line 113 "lexer.lxx"  
1223 -{ yylval->bValue = true; return FZ_VAR; }  
1224 - YY_BREAK  
1225 -case 50:  
1226 -YY_RULE_SETUP  
1227 -#line 114 "lexer.lxx"  
1228 -{ return FZ_VARIANT_RECORD; }  
1229 - YY_BREAK  
1230 -case 51:  
1231 -YY_RULE_SETUP  
1232 -#line 115 "lexer.lxx"  
1233 -{ return FZ_WHERE; }  
1234 - YY_BREAK  
1235 -case 52:  
1236 -YY_RULE_SETUP  
1237 -#line 116 "lexer.lxx"  
1238 -{ yylval->sValue = strdup(yytext); return FZ_ID; }  
1239 - YY_BREAK  
1240 -case 53:  
1241 -YY_RULE_SETUP  
1242 -#line 117 "lexer.lxx"  
1243 -{ yylval->sValue = strdup(yytext); return FZ_U_ID; }  
1244 - YY_BREAK  
1245 -case 54:  
1246 -YY_RULE_SETUP  
1247 -#line 118 "lexer.lxx"  
1248 -{  
1249 - yylval->sValue = strdup(yytext+1);  
1250 - yylval->sValue[strlen(yytext)-2] = 0;  
1251 - return FZ_STRING_LIT; }  
1252 - YY_BREAK  
1253 -case 55:  
1254 -YY_RULE_SETUP  
1255 -#line 122 "lexer.lxx"  
1256 -{ yyerror("Unknown character"); }  
1257 - YY_BREAK  
1258 -case 56:  
1259 -YY_RULE_SETUP  
1260 -#line 123 "lexer.lxx"  
1261 -ECHO;  
1262 - YY_BREAK  
1263 -#line 1264 "lexer.yy.cpp"  
1264 -case YY_STATE_EOF(INITIAL):  
1265 - yyterminate();  
1266 -  
1267 - case YY_END_OF_BUFFER:  
1268 - {  
1269 - /* Amount of text matched not including the EOB char. */  
1270 - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;  
1271 -  
1272 - /* Undo the effects of YY_DO_BEFORE_ACTION. */  
1273 - *yy_cp = yyg->yy_hold_char;  
1274 - YY_RESTORE_YY_MORE_OFFSET  
1275 -  
1276 - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )  
1277 - {  
1278 - /* We're scanning a new file or input source. It's  
1279 - * possible that this happened because the user  
1280 - * just pointed yyin at a new source and called  
1281 - * yylex(). If so, then we have to assure  
1282 - * consistency between YY_CURRENT_BUFFER and our  
1283 - * globals. Here is the right place to do so, because  
1284 - * this is the first action (other than possibly a  
1285 - * back-up) that will match for the new input source.  
1286 - */  
1287 - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;  
1288 - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;  
1289 - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;  
1290 - }  
1291 -  
1292 - /* Note that here we test for yy_c_buf_p "<=" to the position  
1293 - * of the first EOB in the buffer, since yy_c_buf_p will  
1294 - * already have been incremented past the NUL character  
1295 - * (since all states make transitions on EOB to the  
1296 - * end-of-buffer state). Contrast this with the test  
1297 - * in input().  
1298 - */  
1299 - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )  
1300 - { /* This was really a NUL. */  
1301 - yy_state_type yy_next_state;  
1302 -  
1303 - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;  
1304 -  
1305 - yy_current_state = yy_get_previous_state( yyscanner );  
1306 -  
1307 - /* Okay, we're now positioned to make the NUL  
1308 - * transition. We couldn't have  
1309 - * yy_get_previous_state() go ahead and do it  
1310 - * for us because it doesn't know how to deal  
1311 - * with the possibility of jamming (and we don't  
1312 - * want to build jamming into it because then it  
1313 - * will run more slowly).  
1314 - */  
1315 -  
1316 - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);  
1317 -  
1318 - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;  
1319 -  
1320 - if ( yy_next_state )  
1321 - {  
1322 - /* Consume the NUL. */  
1323 - yy_cp = ++yyg->yy_c_buf_p;  
1324 - yy_current_state = yy_next_state;  
1325 - goto yy_match;  
1326 - }  
1327 -  
1328 - else  
1329 - {  
1330 - yy_cp = yyg->yy_c_buf_p;  
1331 - goto yy_find_action;  
1332 - }  
1333 - }  
1334 -  
1335 - else switch ( yy_get_next_buffer( yyscanner ) )  
1336 - {  
1337 - case EOB_ACT_END_OF_FILE:  
1338 - {  
1339 - yyg->yy_did_buffer_switch_on_eof = 0;  
1340 -  
1341 - if ( yywrap(yyscanner ) )  
1342 - {  
1343 - /* Note: because we've taken care in  
1344 - * yy_get_next_buffer() to have set up  
1345 - * yytext, we can now set up  
1346 - * yy_c_buf_p so that if some total  
1347 - * hoser (like flex itself) wants to  
1348 - * call the scanner after we return the  
1349 - * YY_NULL, it'll still work - another  
1350 - * YY_NULL will get returned.  
1351 - */  
1352 - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;  
1353 -  
1354 - yy_act = YY_STATE_EOF(YY_START);  
1355 - goto do_action;  
1356 - }  
1357 -  
1358 - else  
1359 - {  
1360 - if ( ! yyg->yy_did_buffer_switch_on_eof )  
1361 - YY_NEW_FILE;  
1362 - }  
1363 - break;  
1364 - }  
1365 -  
1366 - case EOB_ACT_CONTINUE_SCAN:  
1367 - yyg->yy_c_buf_p =  
1368 - yyg->yytext_ptr + yy_amount_of_matched_text;  
1369 -  
1370 - yy_current_state = yy_get_previous_state( yyscanner );  
1371 -  
1372 - yy_cp = yyg->yy_c_buf_p;  
1373 - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;  
1374 - goto yy_match;  
1375 -  
1376 - case EOB_ACT_LAST_MATCH:  
1377 - yyg->yy_c_buf_p =  
1378 - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];  
1379 -  
1380 - yy_current_state = yy_get_previous_state( yyscanner );  
1381 -  
1382 - yy_cp = yyg->yy_c_buf_p;  
1383 - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;  
1384 - goto yy_find_action;  
1385 - }  
1386 - break;  
1387 - }  
1388 -  
1389 - default:  
1390 - YY_FATAL_ERROR(  
1391 - "fatal flex scanner internal error--no action found" );  
1392 - } /* end of action switch */  
1393 - } /* end of scanning one token */  
1394 -} /* end of yylex */  
1395 -  
1396 -/* yy_get_next_buffer - try to read in a new buffer  
1397 - *  
1398 - * Returns a code representing an action:  
1399 - * EOB_ACT_LAST_MATCH -  
1400 - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position  
1401 - * EOB_ACT_END_OF_FILE - end of file  
1402 - */  
1403 -static int yy_get_next_buffer (yyscan_t yyscanner)  
1404 -{  
1405 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1406 - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;  
1407 - register char *source = yyg->yytext_ptr;  
1408 - register int number_to_move, i;  
1409 - int ret_val;  
1410 -  
1411 - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )  
1412 - YY_FATAL_ERROR(  
1413 - "fatal flex scanner internal error--end of buffer missed" );  
1414 -  
1415 - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )  
1416 - { /* Don't try to fill the buffer, so this is an EOF. */  
1417 - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )  
1418 - {  
1419 - /* We matched a single character, the EOB, so  
1420 - * treat this as a final EOF.  
1421 - */  
1422 - return EOB_ACT_END_OF_FILE;  
1423 - }  
1424 -  
1425 - else  
1426 - {  
1427 - /* We matched some text prior to the EOB, first  
1428 - * process it.  
1429 - */  
1430 - return EOB_ACT_LAST_MATCH;  
1431 - }  
1432 - }  
1433 -  
1434 - /* Try to read more data. */  
1435 -  
1436 - /* First move last chars to start of buffer. */  
1437 - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;  
1438 -  
1439 - for ( i = 0; i < number_to_move; ++i )  
1440 - *(dest++) = *(source++);  
1441 -  
1442 - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )  
1443 - /* don't do the read, it's not guaranteed to return an EOF,  
1444 - * just force an EOF  
1445 - */  
1446 - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;  
1447 -  
1448 - else  
1449 - {  
1450 - int num_to_read =  
1451 - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;  
1452 -  
1453 - while ( num_to_read <= 0 )  
1454 - { /* Not enough room in the buffer - grow it. */  
1455 -  
1456 - /* just a shorter name for the current buffer */  
1457 - YY_BUFFER_STATE b = YY_CURRENT_BUFFER;  
1458 -  
1459 - int yy_c_buf_p_offset =  
1460 - (int) (yyg->yy_c_buf_p - b->yy_ch_buf);  
1461 -  
1462 - if ( b->yy_is_our_buffer )  
1463 - {  
1464 - int new_size = b->yy_buf_size * 2;  
1465 -  
1466 - if ( new_size <= 0 )  
1467 - b->yy_buf_size += b->yy_buf_size / 8;  
1468 - else  
1469 - b->yy_buf_size *= 2;  
1470 -  
1471 - b->yy_ch_buf = (char *)  
1472 - /* Include room in for 2 EOB chars. */  
1473 - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );  
1474 - }  
1475 - else  
1476 - /* Can't grow it, we don't own it. */  
1477 - b->yy_ch_buf = 0;  
1478 -  
1479 - if ( ! b->yy_ch_buf )  
1480 - YY_FATAL_ERROR(  
1481 - "fatal error - scanner input buffer overflow" );  
1482 -  
1483 - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];  
1484 -  
1485 - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -  
1486 - number_to_move - 1;  
1487 -  
1488 - }  
1489 -  
1490 - if ( num_to_read > YY_READ_BUF_SIZE )  
1491 - num_to_read = YY_READ_BUF_SIZE;  
1492 -  
1493 - /* Read in more data. */  
1494 - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),  
1495 - yyg->yy_n_chars, (size_t) num_to_read );  
1496 -  
1497 - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;  
1498 - }  
1499 -  
1500 - if ( yyg->yy_n_chars == 0 )  
1501 - {  
1502 - if ( number_to_move == YY_MORE_ADJ )  
1503 - {  
1504 - ret_val = EOB_ACT_END_OF_FILE;  
1505 - yyrestart(yyin ,yyscanner);  
1506 - }  
1507 -  
1508 - else  
1509 - {  
1510 - ret_val = EOB_ACT_LAST_MATCH;  
1511 - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =  
1512 - YY_BUFFER_EOF_PENDING;  
1513 - }  
1514 - }  
1515 -  
1516 - else  
1517 - ret_val = EOB_ACT_CONTINUE_SCAN;  
1518 -  
1519 - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {  
1520 - /* Extend the array by 50%, plus the number we really need. */  
1521 - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);  
1522 - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );  
1523 - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )  
1524 - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );  
1525 - }  
1526 -  
1527 - yyg->yy_n_chars += number_to_move;  
1528 - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;  
1529 - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;  
1530 -  
1531 - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];  
1532 -  
1533 - return ret_val;  
1534 -}  
1535 -  
1536 -/* yy_get_previous_state - get the state just before the EOB char was reached */  
1537 -  
1538 - static yy_state_type yy_get_previous_state (yyscan_t yyscanner)  
1539 -{  
1540 - register yy_state_type yy_current_state;  
1541 - register char *yy_cp;  
1542 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1543 -  
1544 - yy_current_state = yyg->yy_start;  
1545 -  
1546 - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )  
1547 - {  
1548 - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);  
1549 - if ( yy_accept[yy_current_state] )  
1550 - {  
1551 - yyg->yy_last_accepting_state = yy_current_state;  
1552 - yyg->yy_last_accepting_cpos = yy_cp;  
1553 - }  
1554 - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )  
1555 - {  
1556 - yy_current_state = (int) yy_def[yy_current_state];  
1557 - if ( yy_current_state >= 221 )  
1558 - yy_c = yy_meta[(unsigned int) yy_c];  
1559 - }  
1560 - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];  
1561 - }  
1562 -  
1563 - return yy_current_state;  
1564 -}  
1565 -  
1566 -/* yy_try_NUL_trans - try to make a transition on the NUL character  
1567 - *  
1568 - * synopsis  
1569 - * next_state = yy_try_NUL_trans( current_state );  
1570 - */  
1571 - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)  
1572 -{  
1573 - register int yy_is_jam;  
1574 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */  
1575 - register char *yy_cp = yyg->yy_c_buf_p;  
1576 -  
1577 - register YY_CHAR yy_c = 1;  
1578 - if ( yy_accept[yy_current_state] )  
1579 - {  
1580 - yyg->yy_last_accepting_state = yy_current_state;  
1581 - yyg->yy_last_accepting_cpos = yy_cp;  
1582 - }  
1583 - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )  
1584 - {  
1585 - yy_current_state = (int) yy_def[yy_current_state];  
1586 - if ( yy_current_state >= 221 )  
1587 - yy_c = yy_meta[(unsigned int) yy_c];  
1588 - }  
1589 - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];  
1590 - yy_is_jam = (yy_current_state == 220);  
1591 -  
1592 - return yy_is_jam ? 0 : yy_current_state;  
1593 -}  
1594 -  
1595 - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)  
1596 -{  
1597 - register char *yy_cp;  
1598 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1599 -  
1600 - yy_cp = yyg->yy_c_buf_p;  
1601 -  
1602 - /* undo effects of setting up yytext */  
1603 - *yy_cp = yyg->yy_hold_char;  
1604 -  
1605 - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )  
1606 - { /* need to shift things up to make room */  
1607 - /* +2 for EOB chars. */  
1608 - register int number_to_move = yyg->yy_n_chars + 2;  
1609 - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[  
1610 - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];  
1611 - register char *source =  
1612 - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];  
1613 -  
1614 - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )  
1615 - *--dest = *--source;  
1616 -  
1617 - yy_cp += (int) (dest - source);  
1618 - yy_bp += (int) (dest - source);  
1619 - YY_CURRENT_BUFFER_LVALUE->yy_n_chars =  
1620 - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;  
1621 -  
1622 - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )  
1623 - YY_FATAL_ERROR( "flex scanner push-back overflow" );  
1624 - }  
1625 -  
1626 - *--yy_cp = (char) c;  
1627 -  
1628 - if ( c == '\n' ){  
1629 - --yylineno;  
1630 - }  
1631 -  
1632 - yyg->yytext_ptr = yy_bp;  
1633 - yyg->yy_hold_char = *yy_cp;  
1634 - yyg->yy_c_buf_p = yy_cp;  
1635 -}  
1636 -  
1637 -#ifndef YY_NO_INPUT  
1638 -#ifdef __cplusplus  
1639 - static int yyinput (yyscan_t yyscanner)  
1640 -#else  
1641 - static int input (yyscan_t yyscanner)  
1642 -#endif  
1643 -  
1644 -{  
1645 - int c;  
1646 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1647 -  
1648 - *yyg->yy_c_buf_p = yyg->yy_hold_char;  
1649 -  
1650 - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )  
1651 - {  
1652 - /* yy_c_buf_p now points to the character we want to return.  
1653 - * If this occurs *before* the EOB characters, then it's a  
1654 - * valid NUL; if not, then we've hit the end of the buffer.  
1655 - */  
1656 - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )  
1657 - /* This was really a NUL. */  
1658 - *yyg->yy_c_buf_p = '\0';  
1659 -  
1660 - else  
1661 - { /* need more input */  
1662 - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;  
1663 - ++yyg->yy_c_buf_p;  
1664 -  
1665 - switch ( yy_get_next_buffer( yyscanner ) )  
1666 - {  
1667 - case EOB_ACT_LAST_MATCH:  
1668 - /* This happens because yy_g_n_b()  
1669 - * sees that we've accumulated a  
1670 - * token and flags that we need to  
1671 - * try matching the token before  
1672 - * proceeding. But for input(),  
1673 - * there's no matching to consider.  
1674 - * So convert the EOB_ACT_LAST_MATCH  
1675 - * to EOB_ACT_END_OF_FILE.  
1676 - */  
1677 -  
1678 - /* Reset buffer status. */  
1679 - yyrestart(yyin ,yyscanner);  
1680 -  
1681 - /*FALLTHROUGH*/  
1682 -  
1683 - case EOB_ACT_END_OF_FILE:  
1684 - {  
1685 - if ( yywrap(yyscanner ) )  
1686 - return EOF;  
1687 -  
1688 - if ( ! yyg->yy_did_buffer_switch_on_eof )  
1689 - YY_NEW_FILE;  
1690 -#ifdef __cplusplus  
1691 - return yyinput(yyscanner);  
1692 -#else  
1693 - return input(yyscanner);  
1694 -#endif  
1695 - }  
1696 -  
1697 - case EOB_ACT_CONTINUE_SCAN:  
1698 - yyg->yy_c_buf_p = yyg->yytext_ptr + offset;  
1699 - break;  
1700 - }  
1701 - }  
1702 - }  
1703 -  
1704 - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */  
1705 - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */  
1706 - yyg->yy_hold_char = *++yyg->yy_c_buf_p;  
1707 -  
1708 - if ( c == '\n' )  
1709 -  
1710 - do{ yylineno++;  
1711 - yycolumn=0;  
1712 - }while(0)  
1713 -;  
1714 -  
1715 - return c;  
1716 -}  
1717 -#endif /* ifndef YY_NO_INPUT */  
1718 -  
1719 -/** Immediately switch to a different input stream.  
1720 - * @param input_file A readable stream.  
1721 - * @param yyscanner The scanner object.  
1722 - * @note This function does not reset the start condition to @c INITIAL .  
1723 - */  
1724 - void yyrestart (FILE * input_file , yyscan_t yyscanner)  
1725 -{  
1726 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1727 -  
1728 - if ( ! YY_CURRENT_BUFFER ){  
1729 - yyensure_buffer_stack (yyscanner);  
1730 - YY_CURRENT_BUFFER_LVALUE =  
1731 - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);  
1732 - }  
1733 -  
1734 - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);  
1735 - yy_load_buffer_state(yyscanner );  
1736 -}  
1737 -  
1738 -/** Switch to a different input buffer.  
1739 - * @param new_buffer The new input buffer.  
1740 - * @param yyscanner The scanner object.  
1741 - */  
1742 - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)  
1743 -{  
1744 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1745 -  
1746 - /* TODO. We should be able to replace this entire function body  
1747 - * with  
1748 - * yypop_buffer_state();  
1749 - * yypush_buffer_state(new_buffer);  
1750 - */  
1751 - yyensure_buffer_stack (yyscanner);  
1752 - if ( YY_CURRENT_BUFFER == new_buffer )  
1753 - return;  
1754 -  
1755 - if ( YY_CURRENT_BUFFER )  
1756 - {  
1757 - /* Flush out information for old buffer. */  
1758 - *yyg->yy_c_buf_p = yyg->yy_hold_char;  
1759 - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;  
1760 - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;  
1761 - }  
1762 -  
1763 - YY_CURRENT_BUFFER_LVALUE = new_buffer;  
1764 - yy_load_buffer_state(yyscanner );  
1765 -  
1766 - /* We don't actually know whether we did this switch during  
1767 - * EOF (yywrap()) processing, but the only time this flag  
1768 - * is looked at is after yywrap() is called, so it's safe  
1769 - * to go ahead and always set it.  
1770 - */  
1771 - yyg->yy_did_buffer_switch_on_eof = 1;  
1772 -}  
1773 -  
1774 -static void yy_load_buffer_state (yyscan_t yyscanner)  
1775 -{  
1776 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1777 - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;  
1778 - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;  
1779 - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;  
1780 - yyg->yy_hold_char = *yyg->yy_c_buf_p;  
1781 -}  
1782 -  
1783 -/** Allocate and initialize an input buffer state.  
1784 - * @param file A readable stream.  
1785 - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.  
1786 - * @param yyscanner The scanner object.  
1787 - * @return the allocated buffer state.  
1788 - */  
1789 - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)  
1790 -{  
1791 - YY_BUFFER_STATE b;  
1792 -  
1793 - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );  
1794 - if ( ! b )  
1795 - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );  
1796 -  
1797 - b->yy_buf_size = size;  
1798 -  
1799 - /* yy_ch_buf has to be 2 characters longer than the size given because  
1800 - * we need to put in 2 end-of-buffer characters.  
1801 - */  
1802 - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );  
1803 - if ( ! b->yy_ch_buf )  
1804 - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );  
1805 -  
1806 - b->yy_is_our_buffer = 1;  
1807 -  
1808 - yy_init_buffer(b,file ,yyscanner);  
1809 -  
1810 - return b;  
1811 -}  
1812 -  
1813 -/** Destroy the buffer.  
1814 - * @param b a buffer created with yy_create_buffer()  
1815 - * @param yyscanner The scanner object.  
1816 - */  
1817 - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)  
1818 -{  
1819 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1820 -  
1821 - if ( ! b )  
1822 - return;  
1823 -  
1824 - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */  
1825 - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;  
1826 -  
1827 - if ( b->yy_is_our_buffer )  
1828 - yyfree((void *) b->yy_ch_buf ,yyscanner );  
1829 -  
1830 - yyfree((void *) b ,yyscanner );  
1831 -}  
1832 -  
1833 -#ifndef __cplusplus  
1834 -extern int isatty (int );  
1835 -#endif /* __cplusplus */  
1836 -  
1837 -/* Initializes or reinitializes a buffer.  
1838 - * This function is sometimes called more than once on the same buffer,  
1839 - * such as during a yyrestart() or at EOF.  
1840 - */  
1841 - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)  
1842 -  
1843 -{  
1844 - int oerrno = errno;  
1845 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1846 -  
1847 - yy_flush_buffer(b ,yyscanner);  
1848 -  
1849 - b->yy_input_file = file;  
1850 - b->yy_fill_buffer = 1;  
1851 -  
1852 - /* If b is the current buffer, then yy_init_buffer was _probably_  
1853 - * called from yyrestart() or through yy_get_next_buffer.  
1854 - * In that case, we don't want to reset the lineno or column.  
1855 - */  
1856 - if (b != YY_CURRENT_BUFFER){  
1857 - b->yy_bs_lineno = 1;  
1858 - b->yy_bs_column = 0;  
1859 - }  
1860 -  
1861 - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;  
1862 -  
1863 - errno = oerrno;  
1864 -}  
1865 -  
1866 -/** Discard all buffered characters. On the next scan, YY_INPUT will be called.  
1867 - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.  
1868 - * @param yyscanner The scanner object.  
1869 - */  
1870 - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)  
1871 -{  
1872 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1873 - if ( ! b )  
1874 - return;  
1875 -  
1876 - b->yy_n_chars = 0;  
1877 -  
1878 - /* We always need two end-of-buffer characters. The first causes  
1879 - * a transition to the end-of-buffer state. The second causes  
1880 - * a jam in that state.  
1881 - */  
1882 - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;  
1883 - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;  
1884 -  
1885 - b->yy_buf_pos = &b->yy_ch_buf[0];  
1886 -  
1887 - b->yy_at_bol = 1;  
1888 - b->yy_buffer_status = YY_BUFFER_NEW;  
1889 -  
1890 - if ( b == YY_CURRENT_BUFFER )  
1891 - yy_load_buffer_state(yyscanner );  
1892 -}  
1893 -  
1894 -/** Pushes the new state onto the stack. The new state becomes  
1895 - * the current state. This function will allocate the stack  
1896 - * if necessary.  
1897 - * @param new_buffer The new state.  
1898 - * @param yyscanner The scanner object.  
1899 - */  
1900 -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)  
1901 -{  
1902 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1903 - if (new_buffer == NULL)  
1904 - return;  
1905 -  
1906 - yyensure_buffer_stack(yyscanner);  
1907 -  
1908 - /* This block is copied from yy_switch_to_buffer. */  
1909 - if ( YY_CURRENT_BUFFER )  
1910 - {  
1911 - /* Flush out information for old buffer. */  
1912 - *yyg->yy_c_buf_p = yyg->yy_hold_char;  
1913 - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;  
1914 - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;  
1915 - }  
1916 -  
1917 - /* Only push if top exists. Otherwise, replace top. */  
1918 - if (YY_CURRENT_BUFFER)  
1919 - yyg->yy_buffer_stack_top++;  
1920 - YY_CURRENT_BUFFER_LVALUE = new_buffer;  
1921 -  
1922 - /* copied from yy_switch_to_buffer. */  
1923 - yy_load_buffer_state(yyscanner );  
1924 - yyg->yy_did_buffer_switch_on_eof = 1;  
1925 -}  
1926 -  
1927 -/** Removes and deletes the top of the stack, if present.  
1928 - * The next element becomes the new top.  
1929 - * @param yyscanner The scanner object.  
1930 - */  
1931 -void yypop_buffer_state (yyscan_t yyscanner)  
1932 -{  
1933 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1934 - if (!YY_CURRENT_BUFFER)  
1935 - return;  
1936 -  
1937 - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);  
1938 - YY_CURRENT_BUFFER_LVALUE = NULL;  
1939 - if (yyg->yy_buffer_stack_top > 0)  
1940 - --yyg->yy_buffer_stack_top;  
1941 -  
1942 - if (YY_CURRENT_BUFFER) {  
1943 - yy_load_buffer_state(yyscanner );  
1944 - yyg->yy_did_buffer_switch_on_eof = 1;  
1945 - }  
1946 -}  
1947 -  
1948 -/* Allocates the stack if it does not exist.  
1949 - * Guarantees space for at least one push.  
1950 - */  
1951 -static void yyensure_buffer_stack (yyscan_t yyscanner)  
1952 -{  
1953 - int num_to_alloc;  
1954 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
1955 -  
1956 - if (!yyg->yy_buffer_stack) {  
1957 -  
1958 - /* First allocation is just for 2 elements, since we don't know if this  
1959 - * scanner will even need a stack. We use 2 instead of 1 to avoid an  
1960 - * immediate realloc on the next call.  
1961 - */  
1962 - num_to_alloc = 1;  
1963 - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc  
1964 - (num_to_alloc * sizeof(struct yy_buffer_state*)  
1965 - , yyscanner);  
1966 - if ( ! yyg->yy_buffer_stack )  
1967 - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );  
1968 -  
1969 - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));  
1970 -  
1971 - yyg->yy_buffer_stack_max = num_to_alloc;  
1972 - yyg->yy_buffer_stack_top = 0;  
1973 - return;  
1974 - }  
1975 -  
1976 - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){  
1977 -  
1978 - /* Increase the buffer to prepare for a possible push. */  
1979 - int grow_size = 8 /* arbitrary grow size */;  
1980 -  
1981 - num_to_alloc = yyg->yy_buffer_stack_max + grow_size;  
1982 - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc  
1983 - (yyg->yy_buffer_stack,  
1984 - num_to_alloc * sizeof(struct yy_buffer_state*)  
1985 - , yyscanner);  
1986 - if ( ! yyg->yy_buffer_stack )  
1987 - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );  
1988 -  
1989 - /* zero only the new slots.*/  
1990 - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));  
1991 - yyg->yy_buffer_stack_max = num_to_alloc;  
1992 - }  
1993 -}  
1994 -  
1995 -/** Setup the input buffer state to scan directly from a user-specified character buffer.  
1996 - * @param base the character buffer  
1997 - * @param size the size in bytes of the character buffer  
1998 - * @param yyscanner The scanner object.  
1999 - * @return the newly allocated buffer state object.  
2000 - */  
2001 -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)  
2002 -{  
2003 - YY_BUFFER_STATE b;  
2004 -  
2005 - if ( size < 2 ||  
2006 - base[size-2] != YY_END_OF_BUFFER_CHAR ||  
2007 - base[size-1] != YY_END_OF_BUFFER_CHAR )  
2008 - /* They forgot to leave room for the EOB's. */  
2009 - return 0;  
2010 -  
2011 - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );  
2012 - if ( ! b )  
2013 - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );  
2014 -  
2015 - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */  
2016 - b->yy_buf_pos = b->yy_ch_buf = base;  
2017 - b->yy_is_our_buffer = 0;  
2018 - b->yy_input_file = 0;  
2019 - b->yy_n_chars = b->yy_buf_size;  
2020 - b->yy_is_interactive = 0;  
2021 - b->yy_at_bol = 1;  
2022 - b->yy_fill_buffer = 0;  
2023 - b->yy_buffer_status = YY_BUFFER_NEW;  
2024 -  
2025 - yy_switch_to_buffer(b ,yyscanner );  
2026 -  
2027 - return b;  
2028 -}  
2029 -  
2030 -/** Setup the input buffer state to scan a string. The next call to yylex() will  
2031 - * scan from a @e copy of @a str.  
2032 - * @param yystr a NUL-terminated string to scan  
2033 - * @param yyscanner The scanner object.  
2034 - * @return the newly allocated buffer state object.  
2035 - * @note If you want to scan bytes that may contain NUL values, then use  
2036 - * yy_scan_bytes() instead.  
2037 - */  
2038 -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)  
2039 -{  
2040 -  
2041 - return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);  
2042 -}  
2043 -  
2044 -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will  
2045 - * scan from a @e copy of @a bytes.  
2046 - * @param bytes the byte buffer to scan  
2047 - * @param len the number of bytes in the buffer pointed to by @a bytes.  
2048 - * @param yyscanner The scanner object.  
2049 - * @return the newly allocated buffer state object.  
2050 - */  
2051 -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)  
2052 -{  
2053 - YY_BUFFER_STATE b;  
2054 - char *buf;  
2055 - yy_size_t n;  
2056 - int i;  
2057 -  
2058 - /* Get memory for full buffer, including space for trailing EOB's. */  
2059 - n = _yybytes_len + 2;  
2060 - buf = (char *) yyalloc(n ,yyscanner );  
2061 - if ( ! buf )  
2062 - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );  
2063 -  
2064 - for ( i = 0; i < _yybytes_len; ++i )  
2065 - buf[i] = yybytes[i];  
2066 -  
2067 - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;  
2068 -  
2069 - b = yy_scan_buffer(buf,n ,yyscanner);  
2070 - if ( ! b )  
2071 - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );  
2072 -  
2073 - /* It's okay to grow etc. this buffer, and we should throw it  
2074 - * away when we're done.  
2075 - */  
2076 - b->yy_is_our_buffer = 1;  
2077 -  
2078 - return b;  
2079 -}  
2080 -  
2081 -#ifndef YY_EXIT_FAILURE  
2082 -#define YY_EXIT_FAILURE 2  
2083 -#endif  
2084 -  
2085 -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)  
2086 -{  
2087 - (void) fprintf( stderr, "%s\n", msg );  
2088 - exit( YY_EXIT_FAILURE );  
2089 -}  
2090 -  
2091 -/* Redefine yyless() so it works in section 3 code. */  
2092 -  
2093 -#undef yyless  
2094 -#define yyless(n) \  
2095 - do \  
2096 - { \  
2097 - /* Undo effects of setting up yytext. */ \  
2098 - int yyless_macro_arg = (n); \  
2099 - YY_LESS_LINENO(yyless_macro_arg);\  
2100 - yytext[yyleng] = yyg->yy_hold_char; \  
2101 - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \  
2102 - yyg->yy_hold_char = *yyg->yy_c_buf_p; \  
2103 - *yyg->yy_c_buf_p = '\0'; \  
2104 - yyleng = yyless_macro_arg; \  
2105 - } \  
2106 - while ( 0 )  
2107 -  
2108 -/* Accessor methods (get/set functions) to struct members. */  
2109 -  
2110 -/** Get the user-defined data for this scanner.  
2111 - * @param yyscanner The scanner object.  
2112 - */  
2113 -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)  
2114 -{  
2115 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2116 - return yyextra;  
2117 -}  
2118 -  
2119 -/** Get the current line number.  
2120 - * @param yyscanner The scanner object.  
2121 - */  
2122 -int yyget_lineno (yyscan_t yyscanner)  
2123 -{  
2124 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2125 -  
2126 - if (! YY_CURRENT_BUFFER)  
2127 - return 0;  
2128 -  
2129 - return yylineno;  
2130 -}  
2131 -  
2132 -/** Get the current column number.  
2133 - * @param yyscanner The scanner object.  
2134 - */  
2135 -int yyget_column (yyscan_t yyscanner)  
2136 -{  
2137 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2138 -  
2139 - if (! YY_CURRENT_BUFFER)  
2140 - return 0;  
2141 -  
2142 - return yycolumn;  
2143 -}  
2144 -  
2145 -/** Get the input stream.  
2146 - * @param yyscanner The scanner object.  
2147 - */  
2148 -FILE *yyget_in (yyscan_t yyscanner)  
2149 -{  
2150 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2151 - return yyin;  
2152 -}  
2153 -  
2154 -/** Get the output stream.  
2155 - * @param yyscanner The scanner object.  
2156 - */  
2157 -FILE *yyget_out (yyscan_t yyscanner)  
2158 -{  
2159 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2160 - return yyout;  
2161 -}  
2162 -  
2163 -/** Get the length of the current token.  
2164 - * @param yyscanner The scanner object.  
2165 - */  
2166 -int yyget_leng (yyscan_t yyscanner)  
2167 -{  
2168 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2169 - return yyleng;  
2170 -}  
2171 -  
2172 -/** Get the current token.  
2173 - * @param yyscanner The scanner object.  
2174 - */  
2175 -  
2176 -char *yyget_text (yyscan_t yyscanner)  
2177 -{  
2178 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2179 - return yytext;  
2180 -}  
2181 -  
2182 -/** Set the user-defined data. This data is never touched by the scanner.  
2183 - * @param user_defined The data to be associated with this scanner.  
2184 - * @param yyscanner The scanner object.  
2185 - */  
2186 -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)  
2187 -{  
2188 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2189 - yyextra = user_defined ;  
2190 -}  
2191 -  
2192 -/** Set the current line number.  
2193 - * @param line_number  
2194 - * @param yyscanner The scanner object.  
2195 - */  
2196 -void yyset_lineno (int line_number , yyscan_t yyscanner)  
2197 -{  
2198 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2199 -  
2200 - /* lineno is only valid if an input buffer exists. */  
2201 - if (! YY_CURRENT_BUFFER )  
2202 - yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner);  
2203 -  
2204 - yylineno = line_number;  
2205 -}  
2206 -  
2207 -/** Set the current column.  
2208 - * @param line_number  
2209 - * @param yyscanner The scanner object.  
2210 - */  
2211 -void yyset_column (int column_no , yyscan_t yyscanner)  
2212 -{  
2213 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2214 -  
2215 - /* column is only valid if an input buffer exists. */  
2216 - if (! YY_CURRENT_BUFFER )  
2217 - yy_fatal_error( "yyset_column called with no buffer" , yyscanner);  
2218 -  
2219 - yycolumn = column_no;  
2220 -}  
2221 -  
2222 -/** Set the input stream. This does not discard the current  
2223 - * input buffer.  
2224 - * @param in_str A readable stream.  
2225 - * @param yyscanner The scanner object.  
2226 - * @see yy_switch_to_buffer  
2227 - */  
2228 -void yyset_in (FILE * in_str , yyscan_t yyscanner)  
2229 -{  
2230 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2231 - yyin = in_str ;  
2232 -}  
2233 -  
2234 -void yyset_out (FILE * out_str , yyscan_t yyscanner)  
2235 -{  
2236 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2237 - yyout = out_str ;  
2238 -}  
2239 -  
2240 -int yyget_debug (yyscan_t yyscanner)  
2241 -{  
2242 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2243 - return yy_flex_debug;  
2244 -}  
2245 -  
2246 -void yyset_debug (int bdebug , yyscan_t yyscanner)  
2247 -{  
2248 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2249 - yy_flex_debug = bdebug ;  
2250 -}  
2251 -  
2252 -/* Accessor methods for yylval and yylloc */  
2253 -  
2254 -YYSTYPE * yyget_lval (yyscan_t yyscanner)  
2255 -{  
2256 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2257 - return yylval;  
2258 -}  
2259 -  
2260 -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)  
2261 -{  
2262 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2263 - yylval = yylval_param;  
2264 -}  
2265 -  
2266 -/* User-visible API */  
2267 -  
2268 -/* yylex_init is special because it creates the scanner itself, so it is  
2269 - * the ONLY reentrant function that doesn't take the scanner as the last argument.  
2270 - * That's why we explicitly handle the declaration, instead of using our macros.  
2271 - */  
2272 -  
2273 -int yylex_init(yyscan_t* ptr_yy_globals)  
2274 -  
2275 -{  
2276 - if (ptr_yy_globals == NULL){  
2277 - errno = EINVAL;  
2278 - return 1;  
2279 - }  
2280 -  
2281 - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );  
2282 -  
2283 - if (*ptr_yy_globals == NULL){  
2284 - errno = ENOMEM;  
2285 - return 1;  
2286 - }  
2287 -  
2288 - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */  
2289 - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));  
2290 -  
2291 - return yy_init_globals ( *ptr_yy_globals );  
2292 -}  
2293 -  
2294 -/* yylex_init_extra has the same functionality as yylex_init, but follows the  
2295 - * convention of taking the scanner as the last argument. Note however, that  
2296 - * this is a *pointer* to a scanner, as it will be allocated by this call (and  
2297 - * is the reason, too, why this function also must handle its own declaration).  
2298 - * The user defined value in the first argument will be available to yyalloc in  
2299 - * the yyextra field.  
2300 - */  
2301 -  
2302 -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )  
2303 -  
2304 -{  
2305 - struct yyguts_t dummy_yyguts;  
2306 -  
2307 - yyset_extra (yy_user_defined, &dummy_yyguts);  
2308 -  
2309 - if (ptr_yy_globals == NULL){  
2310 - errno = EINVAL;  
2311 - return 1;  
2312 - }  
2313 -  
2314 - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );  
2315 -  
2316 - if (*ptr_yy_globals == NULL){  
2317 - errno = ENOMEM;  
2318 - return 1;  
2319 - }  
2320 -  
2321 - /* By setting to 0xAA, we expose bugs in  
2322 - yy_init_globals. Leave at 0x00 for releases. */  
2323 - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));  
2324 -  
2325 - yyset_extra (yy_user_defined, *ptr_yy_globals);  
2326 -  
2327 - return yy_init_globals ( *ptr_yy_globals );  
2328 -}  
2329 -  
2330 -static int yy_init_globals (yyscan_t yyscanner)  
2331 -{  
2332 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2333 - /* Initialization is the same as for the non-reentrant scanner.  
2334 - * This function is called from yylex_destroy(), so don't allocate here.  
2335 - */  
2336 -  
2337 - yyg->yy_buffer_stack = 0;  
2338 - yyg->yy_buffer_stack_top = 0;  
2339 - yyg->yy_buffer_stack_max = 0;  
2340 - yyg->yy_c_buf_p = (char *) 0;  
2341 - yyg->yy_init = 0;  
2342 - yyg->yy_start = 0;  
2343 -  
2344 - yyg->yy_start_stack_ptr = 0;  
2345 - yyg->yy_start_stack_depth = 0;  
2346 - yyg->yy_start_stack = NULL;  
2347 -  
2348 -/* Defined in main.c */  
2349 -#ifdef YY_STDINIT  
2350 - yyin = stdin;  
2351 - yyout = stdout;  
2352 -#else  
2353 - yyin = (FILE *) 0;  
2354 - yyout = (FILE *) 0;  
2355 -#endif  
2356 -  
2357 - /* For future reference: Set errno on error, since we are called by  
2358 - * yylex_init()  
2359 - */  
2360 - return 0;  
2361 -}  
2362 -  
2363 -/* yylex_destroy is for both reentrant and non-reentrant scanners. */  
2364 -int yylex_destroy (yyscan_t yyscanner)  
2365 -{  
2366 - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;  
2367 -  
2368 - /* Pop the buffer stack, destroying each element. */  
2369 - while(YY_CURRENT_BUFFER){  
2370 - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );  
2371 - YY_CURRENT_BUFFER_LVALUE = NULL;  
2372 - yypop_buffer_state(yyscanner);  
2373 - }  
2374 -  
2375 - /* Destroy the stack itself. */  
2376 - yyfree(yyg->yy_buffer_stack ,yyscanner);  
2377 - yyg->yy_buffer_stack = NULL;  
2378 -  
2379 - /* Destroy the start condition stack. */  
2380 - yyfree(yyg->yy_start_stack ,yyscanner );  
2381 - yyg->yy_start_stack = NULL;  
2382 -  
2383 - /* Reset the globals. This is important in a non-reentrant scanner so the next time  
2384 - * yylex() is called, initialization will occur. */  
2385 - yy_init_globals( yyscanner);  
2386 -  
2387 - /* Destroy the main struct (reentrant only). */  
2388 - yyfree ( yyscanner , yyscanner );  
2389 - yyscanner = NULL;  
2390 - return 0;  
2391 -}  
2392 -  
2393 -/*  
2394 - * Internal utility routines.  
2395 - */  
2396 -  
2397 -#ifndef yytext_ptr  
2398 -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)  
2399 -{  
2400 - register int i;  
2401 - for ( i = 0; i < n; ++i )  
2402 - s1[i] = s2[i];  
2403 -}  
2404 -#endif  
2405 -  
2406 -#ifdef YY_NEED_STRLEN  
2407 -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)  
2408 -{  
2409 - register int n;  
2410 - for ( n = 0; s[n]; ++n )  
2411 - ;  
2412 -  
2413 - return n;  
2414 -}  
2415 -#endif  
2416 -  
2417 -void *yyalloc (yy_size_t size , yyscan_t yyscanner)  
2418 -{  
2419 - return (void *) malloc( size );  
2420 -}  
2421 -  
2422 -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)  
2423 -{  
2424 - /* The cast to (char *) in the following accommodates both  
2425 - * implementations that use char* generic pointers, and those  
2426 - * that use void* generic pointers. It works with the latter  
2427 - * because both ANSI C and C++ allow castless assignment from  
2428 - * any pointer type to void*, and deal with argument conversions  
2429 - * as though doing an assignment.  
2430 - */  
2431 - return (void *) realloc( (char *) ptr, size );  
2432 -}  
2433 -  
2434 -void yyfree (void * ptr , yyscan_t yyscanner)  
2435 -{  
2436 - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */  
2437 -}  
2438 -  
2439 -#define YYTABLES_NAME "yytables"  
2440 -  
2441 -#line 123 "lexer.lxx"  
2442 -  
2443 -  
2444 -int yy_input_proc(char* buf, int size, yyscan_t yyscanner) {  
2445 - FlatZinc::ParserState* parm =  
2446 - static_cast<FlatZinc::ParserState*>(yyget_extra(yyscanner));  
2447 - return parm->fillBuffer(buf, size);  
2448 - // work around warning that yyunput is unused  
2449 - yyunput (0,buf,yyscanner);  
2450 -}  
2451 -  
fz/parser.tab.cpp
@@ -1,3441 +0,0 @@ @@ -1,3441 +0,0 @@
1 -/* A Bison parser, made by GNU Bison 2.3. */  
2 -  
3 -/* Skeleton implementation for Bison's Yacc-like parsers in C  
4 -  
5 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006  
6 - Free Software Foundation, Inc.  
7 -  
8 - This program is free software; you can redistribute it and/or modify  
9 - it under the terms of the GNU General Public License as published by  
10 - the Free Software Foundation; either version 2, or (at your option)  
11 - any later version.  
12 -  
13 - This program is distributed in the hope that it will be useful,  
14 - but WITHOUT ANY WARRANTY; without even the implied warranty of  
15 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
16 - GNU General Public License for more details.  
17 -  
18 - You should have received a copy of the GNU General Public License  
19 - along with this program; if not, write to the Free Software  
20 - Foundation, Inc., 51 Franklin Street, Fifth Floor,  
21 - Boston, MA 02110-1301, USA. */  
22 -  
23 -/* As a special exception, you may create a larger work that contains  
24 - part or all of the Bison parser skeleton and distribute that work  
25 - under terms of your choice, so long as that work isn't itself a  
26 - parser generator using the skeleton or a modified version thereof  
27 - as a parser skeleton. Alternatively, if you modify or redistribute  
28 - the parser skeleton itself, you may (at your option) remove this  
29 - special exception, which will cause the skeleton and the resulting  
30 - Bison output files to be licensed under the GNU General Public  
31 - License without this special exception.  
32 -  
33 - This special exception was added by the Free Software Foundation in  
34 - version 2.2 of Bison. */  
35 -  
36 -/* C LALR(1) parser skeleton written by Richard Stallman, by  
37 - simplifying the original so-called "semantic" parser. */  
38 -  
39 -/* All symbols defined below should begin with yy or YY, to avoid  
40 - infringing on user name space. This should be done even for local  
41 - variables, as they might otherwise be expanded by user macros.  
42 - There are some unavoidable exceptions within include files to  
43 - define necessary library symbols; they are noted "INFRINGES ON  
44 - USER NAME SPACE" below. */  
45 -  
46 -/* Identify Bison output. */  
47 -#define YYBISON 1  
48 -  
49 -/* Bison version. */  
50 -#define YYBISON_VERSION "2.3"  
51 -  
52 -/* Skeleton name. */  
53 -#define YYSKELETON_NAME "yacc.c"  
54 -  
55 -/* Pure parsers. */  
56 -#define YYPURE 1  
57 -  
58 -/* Using locations. */  
59 -#define YYLSP_NEEDED 0  
60 -  
61 -  
62 -  
63 -/* Tokens. */  
64 -#ifndef YYTOKENTYPE  
65 -# define YYTOKENTYPE  
66 - /* Put the tokens into the symbol table, so that GDB and other debuggers  
67 - know about them. */  
68 - enum yytokentype {  
69 - FZ_INT_LIT = 258,  
70 - FZ_BOOL_LIT = 259,  
71 - FZ_FLOAT_LIT = 260,  
72 - FZ_ID = 261,  
73 - FZ_U_ID = 262,  
74 - FZ_STRING_LIT = 263,  
75 - FZ_VAR = 264,  
76 - FZ_PAR = 265,  
77 - FZ_ANNOTATION = 266,  
78 - FZ_ANY = 267,  
79 - FZ_ARRAY = 268,  
80 - FZ_BOOL = 269,  
81 - FZ_CASE = 270,  
82 - FZ_COLONCOLON = 271,  
83 - FZ_CONSTRAINT = 272,  
84 - FZ_DEFAULT = 273,  
85 - FZ_DOTDOT = 274,  
86 - FZ_ELSE = 275,  
87 - FZ_ELSEIF = 276,  
88 - FZ_ENDIF = 277,  
89 - FZ_ENUM = 278,  
90 - FZ_FLOAT = 279,  
91 - FZ_FUNCTION = 280,  
92 - FZ_IF = 281,  
93 - FZ_INCLUDE = 282,  
94 - FZ_INT = 283,  
95 - FZ_LET = 284,  
96 - FZ_MAXIMIZE = 285,  
97 - FZ_MINIMIZE = 286,  
98 - FZ_OF = 287,  
99 - FZ_SATISFY = 288,  
100 - FZ_OUTPUT = 289,  
101 - FZ_PREDICATE = 290,  
102 - FZ_RECORD = 291,  
103 - FZ_SET = 292,  
104 - FZ_SHOW = 293,  
105 - FZ_SHOWCOND = 294,  
106 - FZ_SOLVE = 295,  
107 - FZ_STRING = 296,  
108 - FZ_TEST = 297,  
109 - FZ_THEN = 298,  
110 - FZ_TUPLE = 299,  
111 - FZ_TYPE = 300,  
112 - FZ_VARIANT_RECORD = 301,  
113 - FZ_WHERE = 302  
114 - };  
115 -#endif  
116 -/* Tokens. */  
117 -#define FZ_INT_LIT 258  
118 -#define FZ_BOOL_LIT 259  
119 -#define FZ_FLOAT_LIT 260  
120 -#define FZ_ID 261  
121 -#define FZ_U_ID 262  
122 -#define FZ_STRING_LIT 263  
123 -#define FZ_VAR 264  
124 -#define FZ_PAR 265  
125 -#define FZ_ANNOTATION 266  
126 -#define FZ_ANY 267  
127 -#define FZ_ARRAY 268  
128 -#define FZ_BOOL 269  
129 -#define FZ_CASE 270  
130 -#define FZ_COLONCOLON 271  
131 -#define FZ_CONSTRAINT 272  
132 -#define FZ_DEFAULT 273  
133 -#define FZ_DOTDOT 274  
134 -#define FZ_ELSE 275  
135 -#define FZ_ELSEIF 276  
136 -#define FZ_ENDIF 277  
137 -#define FZ_ENUM 278  
138 -#define FZ_FLOAT 279  
139 -#define FZ_FUNCTION 280  
140 -#define FZ_IF 281  
141 -#define FZ_INCLUDE 282  
142 -#define FZ_INT 283  
143 -#define FZ_LET 284  
144 -#define FZ_MAXIMIZE 285  
145 -#define FZ_MINIMIZE 286  
146 -#define FZ_OF 287  
147 -#define FZ_SATISFY 288  
148 -#define FZ_OUTPUT 289  
149 -#define FZ_PREDICATE 290  
150 -#define FZ_RECORD 291  
151 -#define FZ_SET 292  
152 -#define FZ_SHOW 293  
153 -#define FZ_SHOWCOND 294  
154 -#define FZ_SOLVE 295  
155 -#define FZ_STRING 296  
156 -#define FZ_TEST 297  
157 -#define FZ_THEN 298  
158 -#define FZ_TUPLE 299  
159 -#define FZ_TYPE 300  
160 -#define FZ_VARIANT_RECORD 301  
161 -#define FZ_WHERE 302  
162 -  
163 -  
164 -  
165 -  
166 -/* Copy the first part of user declarations. */  
167 -#line 40 "parser.yxx"  
168 -  
169 -#define YYPARSE_PARAM parm  
170 -#define YYLEX_PARAM static_cast<ParserState*>(parm)->yyscanner  
171 -#include "flatzinc.hh"  
172 -#include "parser.hh"  
173 -#include <iostream>  
174 -#include <fstream>  
175 -#include <sstream>  
176 -  
177 -#include <stdio.h>  
178 -#include <stdlib.h>  
179 -#include <fcntl.h>  
180 -#include <unistd.h>  
181 -#include <sys/types.h>  
182 -#include <sys/mman.h>  
183 -#include <sys/stat.h>  
184 -  
185 -using namespace std;  
186 -  
187 -int yyparse(void*);  
188 -int yylex(YYSTYPE*, void* scanner);  
189 -int yylex_init (void** scanner);  
190 -int yylex_destroy (void* scanner);  
191 -int yyget_lineno (void* scanner);  
192 -void yyset_extra (void* user_defined ,void* yyscanner );  
193 -  
194 -extern int yydebug;  
195 -  
196 -using namespace FlatZinc;  
197 -  
198 -void yyerror(void* parm, const char *str) {  
199 - ParserState* pp = static_cast<ParserState*>(parm);  
200 - pp->err << "Error: " << str  
201 - << " in line no. " << yyget_lineno(pp->yyscanner)  
202 - << std::endl;  
203 - pp->hadError = true;  
204 -}  
205 -  
206 -void yyassert(ParserState* pp, bool cond, const char* str)  
207 -{  
208 - if (!cond) {  
209 - pp->err << "Error: " << str  
210 - << " in line no. " << yyget_lineno(pp->yyscanner)  
211 - << std::endl;  
212 - pp->hadError = true;  
213 - }  
214 -}  
215 -  
216 -/*  
217 - * The symbol tables  
218 - *  
219 - */  
220 -  
221 -AST::Node* getArrayElement(ParserState* pp, string id, unsigned int offset) {  
222 - if (offset > 0) {  
223 - vector<int> tmp;  
224 - if (pp->intvararrays.get(id, tmp) && offset<=tmp.size())  
225 - return new AST::IntVar(tmp[offset-1]);  
226 - if (pp->boolvararrays.get(id, tmp) && offset<=tmp.size())  
227 - return new AST::BoolVar(tmp[offset-1]);  
228 - if (pp->setvararrays.get(id, tmp) && offset<=tmp.size())  
229 - return new AST::SetVar(tmp[offset-1]);  
230 -  
231 - if (pp->intvalarrays.get(id, tmp) && offset<=tmp.size())  
232 - return new AST::IntLit(tmp[offset-1]);  
233 - if (pp->boolvalarrays.get(id, tmp) && offset<=tmp.size())  
234 - return new AST::BoolLit(tmp[offset-1]);  
235 - vector<AST::SetLit> tmpS;  
236 - if (pp->setvalarrays.get(id, tmpS) && offset<=tmpS.size())  
237 - return new AST::SetLit(tmpS[offset-1]);  
238 - }  
239 -  
240 - pp->err << "Error: array access to " << id << " invalid"  
241 - << " in line no. "  
242 - << yyget_lineno(pp->yyscanner) << std::endl;  
243 - pp->hadError = true;  
244 - return new AST::IntVar(0); // keep things consistent  
245 -}  
246 -AST::Node* getVarRefArg(ParserState* pp, string id, bool annotation = false) {  
247 - int tmp;  
248 - if (pp->intvarTable.get(id, tmp))  
249 - return new AST::IntVar(tmp);  
250 - if (pp->boolvarTable.get(id, tmp))  
251 - return new AST::BoolVar(tmp);  
252 - if (pp->setvarTable.get(id, tmp))  
253 - return new AST::SetVar(tmp);  
254 - if (annotation)  
255 - return new AST::Atom(id);  
256 - pp->err << "Error: undefined variable " << id  
257 - << " in line no. "  
258 - << yyget_lineno(pp->yyscanner) << std::endl;  
259 - pp->hadError = true;  
260 - return new AST::IntVar(0); // keep things consistent  
261 -}  
262 -  
263 -void addDomainConstraint(ParserState* pp, std::string id, AST::Node* var,  
264 - Option<AST::SetLit* >& dom) {  
265 - if (!dom())  
266 - return;  
267 - AST::Array* args = new AST::Array(2);  
268 - args->a[0] = var;  
269 - args->a[1] = dom.some();  
270 - pp->domainConstraints.push_back(new ConExpr(id, args));  
271 -}  
272 -  
273 -/*  
274 - * Initialize the root gecode space  
275 - *  
276 - */  
277 -  
278 -void initfg(ParserState* pp) {  
279 - if (!pp->hadError)  
280 - pp->fg->init(pp->intvars.size(),  
281 - pp->boolvars.size(),  
282 - pp->setvars.size());  
283 -  
284 - for (unsigned int i=0; i<pp->intvars.size(); i++) {  
285 - if (!pp->hadError) {  
286 - try {  
287 - pp->fg->newIntVar(static_cast<IntVarSpec*>(pp->intvars[i].second));  
288 - } catch (FlatZinc::Error& e) {  
289 - yyerror(pp, e.toString().c_str());  
290 - }  
291 - }  
292 - if (pp->intvars[i].first[0] != '[') {  
293 - delete pp->intvars[i].second;  
294 - pp->intvars[i].second = NULL;  
295 - }  
296 - }  
297 - for (unsigned int i=0; i<pp->boolvars.size(); i++) {  
298 - if (!pp->hadError) {  
299 - try {  
300 - pp->fg->newBoolVar(  
301 - static_cast<BoolVarSpec*>(pp->boolvars[i].second));  
302 - } catch (FlatZinc::Error& e) {  
303 - yyerror(pp, e.toString().c_str());  
304 - }  
305 - }  
306 - if (pp->boolvars[i].first[0] != '[') {  
307 - delete pp->boolvars[i].second;  
308 - pp->boolvars[i].second = NULL;  
309 - }  
310 - }  
311 - for (unsigned int i=0; i<pp->setvars.size(); i++) {  
312 - if (!pp->hadError) {  
313 - try {  
314 - pp->fg->newSetVar(static_cast<SetVarSpec*>(pp->setvars[i].second));  
315 - } catch (FlatZinc::Error& e) {  
316 - yyerror(pp, e.toString().c_str());  
317 - }  
318 - }  
319 - if (pp->setvars[i].first[0] != '[') {  
320 - delete pp->setvars[i].second;  
321 - pp->setvars[i].second = NULL;  
322 - }  
323 - }  
324 - for (unsigned int i=pp->domainConstraints.size(); i--;) {  
325 - if (!pp->hadError) {  
326 - try {  
327 - assert(pp->domainConstraints[i]->args->a.size() == 2);  
328 - pp->fg->postConstraint(*pp->domainConstraints[i], NULL);  
329 - delete pp->domainConstraints[i];  
330 - } catch (FlatZinc::Error& e) {  
331 - yyerror(pp, e.toString().c_str());  
332 - }  
333 - }  
334 - }  
335 -}  
336 -  
337 -void fillPrinter(ParserState& pp, FlatZinc::Printer& p) {  
338 - p.init(pp.getOutput());  
339 -}  
340 -  
341 -AST::Node* arrayOutput(AST::Call* ann) {  
342 - AST::Array* a = NULL;  
343 -  
344 - if (ann->args->isArray()) {  
345 - a = ann->args->getArray();  
346 - } else {  
347 - a = new AST::Array(ann->args);  
348 - }  
349 -  
350 - std::ostringstream oss;  
351 -  
352 - oss << "array" << a->a.size() << "d(";  
353 - for (unsigned int i=0; i<a->a.size(); i++) {  
354 - AST::SetLit* s = a->a[i]->getSet();  
355 - if (s->empty())  
356 - oss << "{}, ";  
357 - else if (s->interval)  
358 - oss << s->min << ".." << s->max << ", ";  
359 - else {  
360 - oss << "{";  
361 - for (unsigned int j=0; j<s->s.size(); j++) {  
362 - oss << s->s[j];  
363 - if (j<s->s.size()-1)  
364 - oss << ",";  
365 - }  
366 - oss << "}, ";  
367 - }  
368 - }  
369 -  
370 - if (!ann->args->isArray()) {  
371 - a->a[0] = NULL;  
372 - delete a;  
373 - }  
374 - return new AST::String(oss.str());  
375 -}  
376 -  
377 -/*  
378 - * The main program  
379 - *  
380 - */  
381 -  
382 -namespace FlatZinc {  
383 -  
384 - FlatZincModel* parse(const std::string& filename, Printer& p, std::ostream& err,  
385 - FlatZincModel* fzs) {  
386 -#ifdef HAVE_MMAP  
387 - int fd;  
388 - char* data;  
389 - struct stat sbuf;  
390 - fd = open(filename.c_str(), O_RDONLY);  
391 - if (fd == -1) {  
392 - err << "Cannot open file " << filename << endl;  
393 - return NULL;  
394 - }  
395 - if (stat(filename.c_str(), &sbuf) == -1) {  
396 - err << "Cannot stat file " << filename << endl;  
397 - return NULL;  
398 - }  
399 - data = (char*)mmap((caddr_t)0, sbuf.st_size, PROT_READ, MAP_SHARED, fd,0);  
400 - if (data == (caddr_t)(-1)) {  
401 - err << "Cannot mmap file " << filename << endl;  
402 - return NULL;  
403 - }  
404 -  
405 - if (fzs == NULL) {  
406 - fzs = new FlatZincModel();  
407 - }  
408 - ParserState pp(data, sbuf.st_size, err, fzs);  
409 -#else  
410 - std::ifstream file;  
411 - file.open(filename.c_str());  
412 - if (!file.is_open()) {  
413 - err << "Cannot open file " << filename << endl;  
414 - return NULL;  
415 - }  
416 - std::string s = string(istreambuf_iterator<char>(file),  
417 - istreambuf_iterator<char>());  
418 - if (fzs == NULL) {  
419 - fzs = new FlatZincModel();  
420 - }  
421 - ParserState pp(s, err, fzs);  
422 -#endif  
423 - yylex_init(&pp.yyscanner);  
424 - yyset_extra(&pp, pp.yyscanner);  
425 - // yydebug = 1;  
426 - yyparse(&pp);  
427 - fillPrinter(pp, p);  
428 -  
429 - if (pp.yyscanner)  
430 - yylex_destroy(pp.yyscanner);  
431 - return pp.hadError ? NULL : pp.fg;  
432 - }  
433 -  
434 - FlatZincModel* parse(std::istream& is, Printer& p, std::ostream& err,  
435 - FlatZincModel* fzs) {  
436 - std::string s = string(istreambuf_iterator<char>(is),  
437 - istreambuf_iterator<char>());  
438 -  
439 - if (fzs == NULL) {  
440 - fzs = new FlatZincModel();  
441 - }  
442 - ParserState pp(s, err, fzs);  
443 - yylex_init(&pp.yyscanner);  
444 - yyset_extra(&pp, pp.yyscanner);  
445 - // yydebug = 1;  
446 - yyparse(&pp);  
447 - fillPrinter(pp, p);  
448 -  
449 - if (pp.yyscanner)  
450 - yylex_destroy(pp.yyscanner);  
451 - return pp.hadError ? NULL : pp.fg;  
452 - }  
453 -  
454 -}  
455 -  
456 -  
457 -  
458 -/* Enabling traces. */  
459 -#ifndef YYDEBUG  
460 -# define YYDEBUG 1  
461 -#endif  
462 -  
463 -/* Enabling verbose error messages. */  
464 -#ifdef YYERROR_VERBOSE  
465 -# undef YYERROR_VERBOSE  
466 -# define YYERROR_VERBOSE 1  
467 -#else  
468 -# define YYERROR_VERBOSE 1  
469 -#endif  
470 -  
471 -/* Enabling the token table. */  
472 -#ifndef YYTOKEN_TABLE  
473 -# define YYTOKEN_TABLE 0  
474 -#endif  
475 -  
476 -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED  
477 -typedef union YYSTYPE  
478 -#line 330 "parser.yxx"  
479 -{ int iValue; char* sValue; bool bValue; double dValue;  
480 - std::vector<int>* setValue;  
481 - FlatZinc::AST::SetLit* setLit;  
482 - std::vector<double>* floatSetValue;  
483 - std::vector<FlatZinc::AST::SetLit>* setValueList;  
484 - FlatZinc::Option<FlatZinc::AST::SetLit* > oSet;  
485 - FlatZinc::VarSpec* varSpec;  
486 - FlatZinc::Option<FlatZinc::AST::Node*> oArg;  
487 - std::vector<FlatZinc::VarSpec*>* varSpecVec;  
488 - FlatZinc::Option<std::vector<FlatZinc::VarSpec*>* > oVarSpecVec;  
489 - FlatZinc::AST::Node* arg;  
490 - FlatZinc::AST::Array* argVec;  
491 - }  
492 -/* Line 193 of yacc.c. */  
493 -#line 494 "parser.tab.cpp"  
494 - YYSTYPE;  
495 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */  
496 -# define YYSTYPE_IS_DECLARED 1  
497 -# define YYSTYPE_IS_TRIVIAL 1  
498 -#endif  
499 -  
500 -  
501 -  
502 -/* Copy the second part of user declarations. */  
503 -  
504 -  
505 -/* Line 216 of yacc.c. */  
506 -#line 507 "parser.tab.cpp"  
507 -  
508 -#ifdef short  
509 -# undef short  
510 -#endif  
511 -  
512 -#ifdef YYTYPE_UINT8  
513 -typedef YYTYPE_UINT8 yytype_uint8;  
514 -#else  
515 -typedef unsigned char yytype_uint8;  
516 -#endif  
517 -  
518 -#ifdef YYTYPE_INT8  
519 -typedef YYTYPE_INT8 yytype_int8;  
520 -#elif (defined __STDC__ || defined __C99__FUNC__ \  
521 - || defined __cplusplus || defined _MSC_VER)  
522 -typedef signed char yytype_int8;  
523 -#else  
524 -typedef short int yytype_int8;  
525 -#endif  
526 -  
527 -#ifdef YYTYPE_UINT16  
528 -typedef YYTYPE_UINT16 yytype_uint16;  
529 -#else  
530 -typedef unsigned short int yytype_uint16;  
531 -#endif  
532 -  
533 -#ifdef YYTYPE_INT16  
534 -typedef YYTYPE_INT16 yytype_int16;  
535 -#else  
536 -typedef short int yytype_int16;  
537 -#endif  
538 -  
539 -#ifndef YYSIZE_T  
540 -# ifdef __SIZE_TYPE__  
541 -# define YYSIZE_T __SIZE_TYPE__  
542 -# elif defined size_t  
543 -# define YYSIZE_T size_t  
544 -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \  
545 - || defined __cplusplus || defined _MSC_VER)  
546 -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */  
547 -# define YYSIZE_T size_t  
548 -# else  
549 -# define YYSIZE_T unsigned int  
550 -# endif  
551 -#endif  
552 -  
553 -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)  
554 -  
555 -#ifndef YY_  
556 -# if defined YYENABLE_NLS && YYENABLE_NLS  
557 -# if ENABLE_NLS  
558 -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */  
559 -# define YY_(msgid) dgettext ("bison-runtime", msgid)  
560 -# endif  
561 -# endif  
562 -# ifndef YY_  
563 -# define YY_(msgid) msgid  
564 -# endif  
565 -#endif  
566 -  
567 -/* Suppress unused-variable warnings by "using" E. */  
568 -#if ! defined lint || defined __GNUC__  
569 -# define YYUSE(e) ((void) (e))  
570 -#else  
571 -# define YYUSE(e) /* empty */  
572 -#endif  
573 -  
574 -/* Identity function, used to suppress warnings about constant conditions. */  
575 -#ifndef lint  
576 -# define YYID(n) (n)  
577 -#else  
578 -#if (defined __STDC__ || defined __C99__FUNC__ \  
579 - || defined __cplusplus || defined _MSC_VER)  
580 -static int  
581 -YYID (int i)  
582 -#else  
583 -static int  
584 -YYID (i)  
585 - int i;  
586 -#endif  
587 -{  
588 - return i;  
589 -}  
590 -#endif  
591 -  
592 -#if ! defined yyoverflow || YYERROR_VERBOSE  
593 -  
594 -/* The parser invokes alloca or malloc; define the necessary symbols. */  
595 -  
596 -# ifdef YYSTACK_USE_ALLOCA  
597 -# if YYSTACK_USE_ALLOCA  
598 -# ifdef __GNUC__  
599 -# define YYSTACK_ALLOC __builtin_alloca  
600 -# elif defined __BUILTIN_VA_ARG_INCR  
601 -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */  
602 -# elif defined _AIX  
603 -# define YYSTACK_ALLOC __alloca  
604 -# elif defined _MSC_VER  
605 -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */  
606 -# define alloca _alloca  
607 -# else  
608 -# define YYSTACK_ALLOC alloca  
609 -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \  
610 - || defined __cplusplus || defined _MSC_VER)  
611 -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */  
612 -# ifndef _STDLIB_H  
613 -# define _STDLIB_H 1  
614 -# endif  
615 -# endif  
616 -# endif  
617 -# endif  
618 -# endif  
619 -  
620 -# ifdef YYSTACK_ALLOC  
621 - /* Pacify GCC's `empty if-body' warning. */  
622 -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))  
623 -# ifndef YYSTACK_ALLOC_MAXIMUM  
624 - /* The OS might guarantee only one guard page at the bottom of the stack,  
625 - and a page size can be as small as 4096 bytes. So we cannot safely  
626 - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number  
627 - to allow for a few compiler-allocated temporary stack slots. */  
628 -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */  
629 -# endif  
630 -# else  
631 -# define YYSTACK_ALLOC YYMALLOC  
632 -# define YYSTACK_FREE YYFREE  
633 -# ifndef YYSTACK_ALLOC_MAXIMUM  
634 -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM  
635 -# endif  
636 -# if (defined __cplusplus && ! defined _STDLIB_H \  
637 - && ! ((defined YYMALLOC || defined malloc) \  
638 - && (defined YYFREE || defined free)))  
639 -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */  
640 -# ifndef _STDLIB_H  
641 -# define _STDLIB_H 1  
642 -# endif  
643 -# endif  
644 -# ifndef YYMALLOC  
645 -# define YYMALLOC malloc  
646 -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \  
647 - || defined __cplusplus || defined _MSC_VER)  
648 -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */  
649 -# endif  
650 -# endif  
651 -# ifndef YYFREE  
652 -# define YYFREE free  
653 -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \  
654 - || defined __cplusplus || defined _MSC_VER)  
655 -void free (void *); /* INFRINGES ON USER NAME SPACE */  
656 -# endif  
657 -# endif  
658 -# endif  
659 -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */  
660 -  
661 -  
662 -#if (! defined yyoverflow \  
663 - && (! defined __cplusplus \  
664 - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))  
665 -  
666 -/* A type that is properly aligned for any stack member. */  
667 -union yyalloc  
668 -{  
669 - yytype_int16 yyss;  
670 - YYSTYPE yyvs;  
671 - };  
672 -  
673 -/* The size of the maximum gap between one aligned stack and the next. */  
674 -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)  
675 -  
676 -/* The size of an array large to enough to hold all stacks, each with  
677 - N elements. */  
678 -# define YYSTACK_BYTES(N) \  
679 - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \  
680 - + YYSTACK_GAP_MAXIMUM)  
681 -  
682 -/* Copy COUNT objects from FROM to TO. The source and destination do  
683 - not overlap. */  
684 -# ifndef YYCOPY  
685 -# if defined __GNUC__ && 1 < __GNUC__  
686 -# define YYCOPY(To, From, Count) \  
687 - __builtin_memcpy (To, From, (Count) * sizeof (*(From)))  
688 -# else  
689 -# define YYCOPY(To, From, Count) \  
690 - do \  
691 - { \  
692 - YYSIZE_T yyi; \  
693 - for (yyi = 0; yyi < (Count); yyi++) \  
694 - (To)[yyi] = (From)[yyi]; \  
695 - } \  
696 - while (YYID (0))  
697 -# endif  
698 -# endif  
699 -  
700 -/* Relocate STACK from its old location to the new one. The  
701 - local variables YYSIZE and YYSTACKSIZE give the old and new number of  
702 - elements in the stack, and YYPTR gives the new location of the  
703 - stack. Advance YYPTR to a properly aligned location for the next  
704 - stack. */  
705 -# define YYSTACK_RELOCATE(Stack) \  
706 - do \  
707 - { \  
708 - YYSIZE_T yynewbytes; \  
709 - YYCOPY (&yyptr->Stack, Stack, yysize); \  
710 - Stack = &yyptr->Stack; \  
711 - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \  
712 - yyptr += yynewbytes / sizeof (*yyptr); \  
713 - } \  
714 - while (YYID (0))  
715 -  
716 -#endif  
717 -  
718 -/* YYFINAL -- State number of the termination state. */  
719 -#define YYFINAL 7  
720 -/* YYLAST -- Last index in YYTABLE. */  
721 -#define YYLAST 337  
722 -  
723 -/* YYNTOKENS -- Number of terminals. */  
724 -#define YYNTOKENS 58  
725 -/* YYNNTS -- Number of nonterminals. */  
726 -#define YYNNTS 67  
727 -/* YYNRULES -- Number of rules. */  
728 -#define YYNRULES 156  
729 -/* YYNRULES -- Number of states. */  
730 -#define YYNSTATES 336  
731 -  
732 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */  
733 -#define YYUNDEFTOK 2  
734 -#define YYMAXUTOK 302  
735 -  
736 -#define YYTRANSLATE(YYX) \  
737 - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)  
738 -  
739 -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */  
740 -static const yytype_uint8 yytranslate[] =  
741 -{  
742 - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
743 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
744 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
745 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
746 - 49, 50, 2, 2, 51, 2, 2, 2, 2, 2,  
747 - 2, 2, 2, 2, 2, 2, 2, 2, 52, 48,  
748 - 2, 55, 2, 2, 2, 2, 2, 2, 2, 2,  
749 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
750 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
751 - 2, 53, 2, 54, 2, 2, 2, 2, 2, 2,  
752 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
753 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
754 - 2, 2, 2, 56, 2, 57, 2, 2, 2, 2,  
755 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
756 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
757 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
758 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
759 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
760 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
761 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
762 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
763 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
764 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
765 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
766 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  
767 - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,  
768 - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,  
769 - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,  
770 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,  
771 - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,  
772 - 45, 46, 47  
773 -};  
774 -  
775 -#if YYDEBUG  
776 -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in  
777 - YYRHS. */  
778 -static const yytype_uint16 yyprhs[] =  
779 -{  
780 - 0, 0, 3, 9, 10, 12, 15, 19, 20, 22,  
781 - 25, 29, 30, 32, 35, 39, 45, 46, 49, 51,  
782 - 55, 59, 66, 74, 77, 79, 81, 85, 87, 89,  
783 - 91, 95, 97, 101, 103, 105, 112, 119, 126, 135,  
784 - 142, 149, 158, 172, 186, 200, 216, 232, 248, 264,  
785 - 282, 284, 286, 291, 292, 295, 297, 301, 302, 304,  
786 - 308, 310, 312, 317, 318, 321, 323, 327, 331, 333,  
787 - 335, 340, 341, 344, 346, 350, 354, 356, 358, 363,  
788 - 364, 367, 369, 373, 377, 378, 381, 382, 385, 386,  
789 - 389, 390, 393, 400, 404, 409, 411, 415, 419, 421,  
790 - 426, 428, 433, 437, 441, 442, 445, 447, 451, 452,  
791 - 455, 457, 461, 462, 465, 467, 471, 472, 475, 477,  
792 - 481, 483, 487, 489, 493, 494, 497, 499, 501, 503,  
793 - 505, 507, 512, 513, 516, 518, 522, 524, 529, 531,  
794 - 533, 534, 536, 539, 543, 548, 550, 552, 556, 558,  
795 - 562, 564, 566, 568, 570, 572, 577  
796 -};  
797 -  
798 -/* YYRHS -- A `-1'-separated list of the rules' RHS. */  
799 -static const yytype_int8 yyrhs[] =  
800 -{  
801 - 59, 0, -1, 60, 62, 64, 98, 48, -1, -1,  
802 - 61, -1, 66, 48, -1, 61, 66, 48, -1, -1,  
803 - 63, -1, 75, 48, -1, 63, 75, 48, -1, -1,  
804 - 65, -1, 97, 48, -1, 65, 97, 48, -1, 35,  
805 - 6, 49, 67, 50, -1, -1, 68, 79, -1, 69,  
806 - -1, 68, 51, 69, -1, 70, 52, 6, -1, 13,  
807 - 53, 72, 54, 32, 71, -1, 13, 53, 72, 54,  
808 - 32, 9, 71, -1, 9, 71, -1, 71, -1, 99,  
809 - -1, 37, 32, 99, -1, 14, -1, 24, -1, 73,  
810 - -1, 72, 51, 73, -1, 28, -1, 3, 19, 3,  
811 - -1, 6, -1, 7, -1, 9, 99, 52, 74, 119,  
812 - 113, -1, 9, 100, 52, 74, 119, 113, -1, 9,  
813 - 101, 52, 74, 119, 113, -1, 9, 37, 32, 99,  
814 - 52, 74, 119, 113, -1, 28, 52, 74, 119, 55,  
815 - 114, -1, 14, 52, 74, 119, 55, 114, -1, 37,  
816 - 32, 28, 52, 74, 119, 55, 114, -1, 13, 53,  
817 - 3, 19, 3, 54, 32, 9, 99, 52, 74, 119,  
818 - 93, -1, 13, 53, 3, 19, 3, 54, 32, 9,  
819 - 100, 52, 74, 119, 94, -1, 13, 53, 3, 19,  
820 - 3, 54, 32, 9, 101, 52, 74, 119, 95, -1,  
821 - 13, 53, 3, 19, 3, 54, 32, 9, 37, 32,  
822 - 99, 52, 74, 119, 96, -1, 13, 53, 3, 19,  
823 - 3, 54, 32, 28, 52, 74, 119, 55, 53, 103,  
824 - 54, -1, 13, 53, 3, 19, 3, 54, 32, 14,  
825 - 52, 74, 119, 55, 53, 105, 54, -1, 13, 53,  
826 - 3, 19, 3, 54, 32, 24, 52, 74, 119, 55,  
827 - 53, 107, 54, -1, 13, 53, 3, 19, 3, 54,  
828 - 32, 37, 32, 28, 52, 74, 119, 55, 53, 109,  
829 - 54, -1, 3, -1, 74, -1, 74, 53, 3, 54,  
830 - -1, -1, 78, 79, -1, 76, -1, 78, 51, 76,  
831 - -1, -1, 51, -1, 53, 77, 54, -1, 5, -1,  
832 - 74, -1, 74, 53, 3, 54, -1, -1, 83, 79,  
833 - -1, 81, -1, 83, 51, 81, -1, 53, 82, 54,  
834 - -1, 4, -1, 74, -1, 74, 53, 3, 54, -1,  
835 - -1, 87, 79, -1, 85, -1, 87, 51, 85, -1,  
836 - 53, 86, 54, -1, 102, -1, 74, -1, 74, 53,  
837 - 3, 54, -1, -1, 91, 79, -1, 89, -1, 91,  
838 - 51, 89, -1, 53, 90, 54, -1, -1, 55, 80,  
839 - -1, -1, 55, 88, -1, -1, 55, 84, -1, -1,  
840 - 55, 92, -1, 17, 6, 49, 111, 50, 119, -1,  
841 - 40, 119, 33, -1, 40, 119, 118, 117, -1, 28,  
842 - -1, 56, 103, 57, -1, 3, 19, 3, -1, 14,  
843 - -1, 56, 106, 79, 57, -1, 24, -1, 56, 108,  
844 - 79, 57, -1, 56, 103, 57, -1, 3, 19, 3,  
845 - -1, -1, 104, 79, -1, 3, -1, 104, 51, 3,  
846 - -1, -1, 106, 79, -1, 4, -1, 106, 51, 4,  
847 - -1, -1, 108, 79, -1, 5, -1, 108, 51, 5,  
848 - -1, -1, 110, 79, -1, 102, -1, 110, 51, 102,  
849 - -1, 112, -1, 111, 51, 112, -1, 114, -1, 53,  
850 - 115, 54, -1, -1, 55, 114, -1, 4, -1, 3,  
851 - -1, 5, -1, 102, -1, 74, -1, 74, 53, 114,  
852 - 54, -1, -1, 116, 79, -1, 114, -1, 116, 51,  
853 - 114, -1, 74, -1, 74, 53, 3, 54, -1, 31,  
854 - -1, 30, -1, -1, 120, -1, 16, 121, -1, 120,  
855 - 16, 121, -1, 6, 49, 122, 50, -1, 123, -1,  
856 - 121, -1, 122, 51, 121, -1, 124, -1, 53, 122,  
857 - 54, -1, 4, -1, 3, -1, 5, -1, 102, -1,  
858 - 74, -1, 74, 53, 124, 54, -1, 8, -1  
859 -};  
860 -  
861 -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */  
862 -static const yytype_uint16 yyrline[] =  
863 -{  
864 - 0, 430, 430, 432, 434, 437, 438, 442, 443, 447,  
865 - 448, 450, 452, 455, 456, 463, 465, 467, 470, 471,  
866 - 474, 477, 478, 479, 480, 483, 484, 485, 486, 489,  
867 - 490, 493, 494, 500, 500, 503, 532, 561, 566, 596,  
868 - 603, 610, 619, 678, 730, 737, 794, 807, 820, 827,  
869 - 841, 845, 860, 884, 885, 889, 891, 894, 894, 896,  
870 - 900, 902, 917, 941, 942, 946, 948, 952, 956, 958,  
871 - 973, 997, 998, 1002, 1004, 1007, 1010, 1012, 1027, 1051,  
872 - 1052, 1056, 1058, 1061, 1066, 1067, 1072, 1073, 1078, 1079,  
873 - 1084, 1085, 1089, 1103, 1116, 1138, 1140, 1142, 1148, 1150,  
874 - 1163, 1164, 1171, 1173, 1180, 1181, 1185, 1187, 1192, 1193,  
875 - 1197, 1199, 1204, 1205, 1209, 1211, 1216, 1217, 1221, 1223,  
876 - 1231, 1233, 1237, 1239, 1244, 1245, 1249, 1251, 1253, 1255,  
877 - 1257, 1306, 1320, 1321, 1325, 1327, 1335, 1346, 1368, 1369,  
878 - 1377, 1378, 1382, 1384, 1388, 1392, 1396, 1398, 1402, 1404,  
879 - 1408, 1410, 1412, 1414, 1416, 1459, 1470  
880 -};  
881 -#endif  
882 -  
883 -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE  
884 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.  
885 - First, the terminals, then, starting at YYNTOKENS, nonterminals. */  
886 -static const char *const yytname[] =  
887 -{  
888 - "$end", "error", "$undefined", "FZ_INT_LIT", "FZ_BOOL_LIT",  
889 - "FZ_FLOAT_LIT", "FZ_ID", "FZ_U_ID", "FZ_STRING_LIT", "FZ_VAR", "FZ_PAR",  
890 - "FZ_ANNOTATION", "FZ_ANY", "FZ_ARRAY", "FZ_BOOL", "FZ_CASE",  
891 - "FZ_COLONCOLON", "FZ_CONSTRAINT", "FZ_DEFAULT", "FZ_DOTDOT", "FZ_ELSE",  
892 - "FZ_ELSEIF", "FZ_ENDIF", "FZ_ENUM", "FZ_FLOAT", "FZ_FUNCTION", "FZ_IF",  
893 - "FZ_INCLUDE", "FZ_INT", "FZ_LET", "FZ_MAXIMIZE", "FZ_MINIMIZE", "FZ_OF",  
894 - "FZ_SATISFY", "FZ_OUTPUT", "FZ_PREDICATE", "FZ_RECORD", "FZ_SET",  
895 - "FZ_SHOW", "FZ_SHOWCOND", "FZ_SOLVE", "FZ_STRING", "FZ_TEST", "FZ_THEN",  
896 - "FZ_TUPLE", "FZ_TYPE", "FZ_VARIANT_RECORD", "FZ_WHERE", "';'", "'('",  
897 - "')'", "','", "':'", "'['", "']'", "'='", "'{'", "'}'", "$accept",  
898 - "model", "preddecl_items", "preddecl_items_head", "vardecl_items",  
899 - "vardecl_items_head", "constraint_items", "constraint_items_head",  
900 - "preddecl_item", "pred_arg_list", "pred_arg_list_head", "pred_arg",  
901 - "pred_arg_type", "pred_arg_simple_type", "pred_array_init",  
902 - "pred_array_init_arg", "var_par_id", "vardecl_item", "int_init",  
903 - "int_init_list", "int_init_list_head", "list_tail",  
904 - "int_var_array_literal", "float_init", "float_init_list",  
905 - "float_init_list_head", "float_var_array_literal", "bool_init",  
906 - "bool_init_list", "bool_init_list_head", "bool_var_array_literal",  
907 - "set_init", "set_init_list", "set_init_list_head",  
908 - "set_var_array_literal", "vardecl_int_var_array_init",  
909 - "vardecl_bool_var_array_init", "vardecl_float_var_array_init",  
910 - "vardecl_set_var_array_init", "constraint_item", "solve_item",  
911 - "int_ti_expr_tail", "bool_ti_expr_tail", "float_ti_expr_tail",  
912 - "set_literal", "int_list", "int_list_head", "bool_list",  
913 - "bool_list_head", "float_list", "float_list_head", "set_literal_list",  
914 - "set_literal_list_head", "flat_expr_list", "flat_expr",  
915 - "non_array_expr_opt", "non_array_expr", "non_array_expr_list",  
916 - "non_array_expr_list_head", "solve_expr", "minmax", "annotations",  
917 - "annotations_head", "annotation", "annotation_list", "annotation_expr",  
918 - "ann_non_array_expr", 0  
919 -};  
920 -#endif  
921 -  
922 -# ifdef YYPRINT  
923 -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to  
924 - token YYLEX-NUM. */  
925 -static const yytype_uint16 yytoknum[] =  
926 -{  
927 - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,  
928 - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,  
929 - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,  
930 - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,  
931 - 295, 296, 297, 298, 299, 300, 301, 302, 59, 40,  
932 - 41, 44, 58, 91, 93, 61, 123, 125  
933 -};  
934 -# endif  
935 -  
936 -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */  
937 -static const yytype_uint8 yyr1[] =  
938 -{  
939 - 0, 58, 59, 60, 60, 61, 61, 62, 62, 63,  
940 - 63, 64, 64, 65, 65, 66, 67, 67, 68, 68,  
941 - 69, 70, 70, 70, 70, 71, 71, 71, 71, 72,  
942 - 72, 73, 73, 74, 74, 75, 75, 75, 75, 75,  
943 - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,  
944 - 76, 76, 76, 77, 77, 78, 78, 79, 79, 80,  
945 - 81, 81, 81, 82, 82, 83, 83, 84, 85, 85,  
946 - 85, 86, 86, 87, 87, 88, 89, 89, 89, 90,  
947 - 90, 91, 91, 92, 93, 93, 94, 94, 95, 95,  
948 - 96, 96, 97, 98, 98, 99, 99, 99, 100, 100,  
949 - 101, 101, 102, 102, 103, 103, 104, 104, 105, 105,  
950 - 106, 106, 107, 107, 108, 108, 109, 109, 110, 110,  
951 - 111, 111, 112, 112, 113, 113, 114, 114, 114, 114,  
952 - 114, 114, 115, 115, 116, 116, 117, 117, 118, 118,  
953 - 119, 119, 120, 120, 121, 121, 122, 122, 123, 123,  
954 - 124, 124, 124, 124, 124, 124, 124  
955 -};  
956 -  
957 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */  
958 -static const yytype_uint8 yyr2[] =  
959 -{  
960 - 0, 2, 5, 0, 1, 2, 3, 0, 1, 2,  
961 - 3, 0, 1, 2, 3, 5, 0, 2, 1, 3,  
962 - 3, 6, 7, 2, 1, 1, 3, 1, 1, 1,  
963 - 3, 1, 3, 1, 1, 6, 6, 6, 8, 6,  
964 - 6, 8, 13, 13, 13, 15, 15, 15, 15, 17,  
965 - 1, 1, 4, 0, 2, 1, 3, 0, 1, 3,  
966 - 1, 1, 4, 0, 2, 1, 3, 3, 1, 1,  
967 - 4, 0, 2, 1, 3, 3, 1, 1, 4, 0,  
968 - 2, 1, 3, 3, 0, 2, 0, 2, 0, 2,  
969 - 0, 2, 6, 3, 4, 1, 3, 3, 1, 4,  
970 - 1, 4, 3, 3, 0, 2, 1, 3, 0, 2,  
971 - 1, 3, 0, 2, 1, 3, 0, 2, 1, 3,  
972 - 1, 3, 1, 3, 0, 2, 1, 1, 1, 1,  
973 - 1, 4, 0, 2, 1, 3, 1, 4, 1, 1,  
974 - 0, 1, 2, 3, 4, 1, 1, 3, 1, 3,  
975 - 1, 1, 1, 1, 1, 4, 1  
976 -};  
977 -  
978 -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state  
979 - STATE-NUM when YYTABLE doesn't specify something else to do. Zero  
980 - means the default is an error. */  
981 -static const yytype_uint8 yydefact[] =  
982 -{  
983 - 3, 0, 0, 7, 4, 0, 0, 1, 0, 0,  
984 - 0, 0, 0, 11, 8, 0, 0, 5, 16, 0,  
985 - 98, 100, 95, 0, 104, 0, 0, 0, 0, 0,  
986 - 0, 0, 0, 0, 12, 0, 0, 9, 6, 0,  
987 - 0, 27, 28, 0, 104, 0, 57, 18, 0, 24,  
988 - 25, 0, 0, 106, 110, 114, 0, 57, 57, 57,  
989 - 0, 0, 0, 0, 33, 34, 140, 140, 0, 0,  
990 - 140, 0, 0, 13, 10, 23, 0, 0, 15, 58,  
991 - 17, 0, 97, 0, 96, 58, 105, 58, 0, 58,  
992 - 0, 140, 140, 140, 0, 0, 0, 141, 0, 0,  
993 - 0, 0, 2, 14, 0, 31, 0, 29, 26, 19,  
994 - 20, 0, 107, 111, 99, 115, 101, 124, 124, 124,  
995 - 0, 151, 150, 152, 33, 156, 0, 104, 154, 153,  
996 - 142, 145, 148, 0, 0, 0, 140, 127, 126, 128,  
997 - 132, 130, 129, 0, 120, 122, 139, 138, 93, 0,  
998 - 0, 0, 0, 140, 0, 35, 36, 37, 0, 0,  
999 - 0, 146, 0, 0, 0, 40, 143, 39, 0, 134,  
1000 - 0, 57, 0, 140, 0, 136, 94, 32, 30, 0,  
1001 - 124, 125, 0, 103, 0, 0, 149, 102, 0, 0,  
1002 - 123, 58, 133, 0, 92, 121, 0, 0, 21, 38,  
1003 - 0, 0, 0, 0, 0, 144, 147, 155, 41, 135,  
1004 - 131, 0, 22, 0, 0, 0, 0, 0, 0, 0,  
1005 - 0, 137, 0, 0, 0, 0, 140, 140, 140, 0,  
1006 - 0, 140, 140, 140, 0, 0, 0, 0, 0, 84,  
1007 - 86, 88, 0, 0, 0, 140, 140, 0, 42, 0,  
1008 - 43, 0, 44, 108, 112, 104, 0, 90, 53, 85,  
1009 - 71, 87, 63, 89, 0, 57, 0, 57, 0, 0,  
1010 - 0, 45, 50, 51, 55, 0, 57, 68, 69, 73,  
1011 - 0, 57, 60, 61, 65, 0, 57, 47, 109, 48,  
1012 - 113, 46, 116, 79, 91, 0, 59, 58, 54, 0,  
1013 - 75, 58, 72, 0, 67, 58, 64, 0, 118, 0,  
1014 - 57, 77, 81, 0, 57, 76, 0, 56, 0, 74,  
1015 - 0, 66, 49, 58, 117, 0, 83, 58, 80, 52,  
1016 - 70, 62, 119, 0, 82, 78  
1017 -};  
1018 -  
1019 -/* YYDEFGOTO[NTERM-NUM]. */  
1020 -static const yytype_int16 yydefgoto[] =  
1021 -{  
1022 - -1, 2, 3, 4, 13, 14, 33, 34, 5, 45,  
1023 - 46, 47, 48, 49, 106, 107, 141, 15, 274, 275,  
1024 - 276, 80, 259, 284, 285, 286, 263, 279, 280, 281,  
1025 - 261, 312, 313, 314, 294, 248, 250, 252, 271, 35,  
1026 - 71, 50, 26, 27, 142, 56, 57, 264, 58, 266,  
1027 - 59, 309, 310, 143, 144, 155, 145, 170, 171, 176,  
1028 - 149, 96, 97, 161, 162, 131, 132  
1029 -};  
1030 -  
1031 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing  
1032 - STATE-NUM. */  
1033 -#define YYPACT_NINF -120  
1034 -static const yytype_int16 yypact[] =  
1035 -{  
1036 - 0, 34, 46, 101, 0, 1, 12, -120, 97, -3,  
1037 - 29, 33, 71, 96, 101, 68, 74, -120, 50, 100,  
1038 - -120, -120, -120, 94, 64, 76, 78, 80, 136, 23,  
1039 - 23, 112, 151, 119, 96, 113, 114, -120, -120, 144,  
1040 - 110, -120, -120, 132, 163, 117, 118, -120, 126, -120,  
1041 - -120, 167, 24, -120, -120, -120, 122, 120, 129, 131,  
1042 - 23, 23, 23, 164, -120, -120, 168, 168, 133, 137,  
1043 - 168, 139, 149, -120, -120, -120, 15, 24, -120, 50,  
1044 - -120, 186, -120, 146, -120, 198, -120, 201, 150, 209,  
1045 - 158, 168, 168, 168, 203, 9, 162, 202, 165, 23,  
1046 - 51, 53, -120, -120, 200, -120, -15, -120, -120, -120,  
1047 - -120, 23, -120, -120, -120, -120, -120, 169, 169, 169,  
1048 - 174, 204, -120, -120, 187, -120, 9, 163, 182, -120,  
1049 - -120, -120, -120, 170, 9, 170, 168, 204, -120, -120,  
1050 - 170, 184, -120, 44, -120, -120, -120, -120, -120, 23,  
1051 - 236, 15, 208, 168, 170, -120, -120, -120, 210, 238,  
1052 - 9, -120, -10, 189, 85, -120, -120, -120, 190, -120,  
1053 - 193, 192, 170, 168, 51, 195, -120, -120, -120, 109,  
1054 - 169, -120, 10, -120, 58, 9, -120, -120, 196, 170,  
1055 - -120, 170, -120, 197, -120, -120, 246, 144, -120, -120,  
1056 - 188, 205, 206, 207, 220, -120, -120, -120, -120, -120,  
1057 - -120, 199, -120, 222, 211, 213, 214, 23, 23, 23,  
1058 - 227, -120, 24, 23, 23, 23, 168, 168, 168, 215,  
1059 - 217, 168, 168, 168, 216, 218, 219, 23, 23, 223,  
1060 - 224, 225, 228, 229, 233, 168, 168, 234, -120, 239,  
1061 - -120, 240, -120, 257, 265, 163, 241, 242, 19, -120,  
1062 - 148, -120, 138, -120, 221, 129, 237, 131, 245, 247,  
1063 - 248, -120, -120, 251, -120, 252, 226, -120, 254, -120,  
1064 - 255, 243, -120, 258, -120, 256, 244, -120, -120, -120,  
1065 - -120, -120, 17, 95, -120, 259, -120, 19, -120, 302,  
1066 - -120, 148, -120, 305, -120, 138, -120, 204, -120, 260,  
1067 - 261, 262, -120, 263, 267, -120, 266, -120, 268, -120,  
1068 - 269, -120, -120, 17, -120, 310, -120, 95, -120, -120,  
1069 - -120, -120, -120, 270, -120, -120  
1070 -};  
1071 -  
1072 -/* YYPGOTO[NTERM-NUM]. */  
1073 -static const yytype_int16 yypgoto[] =  
1074 -{  
1075 - -120, -120, -120, -120, -120, -120, -120, -120, 312, -120,  
1076 - -120, 249, -120, -37, -120, 175, -29, 307, 22, -120,  
1077 - -120, -54, -120, 20, -120, -120, -120, 26, -120, -120,  
1078 - -120, 2, -120, -120, -120, -120, -120, -120, -120, 296,  
1079 - -120, -1, 134, 135, -89, -119, -120, -120, 79, -120,  
1080 - 77, -120, -120, -120, 159, -108, -112, -120, -120, -120,  
1081 - -120, 57, -120, -86, 176, -120, 173  
1082 -};  
1083 -  
1084 -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If  
1085 - positive, shift that token. If negative, reduce the rule which  
1086 - number is the opposite. If zero, do what YYDEFACT says.  
1087 - If YYTABLE_NINF, syntax error. */  
1088 -#define YYTABLE_NINF -1  
1089 -static const yytype_uint16 yytable[] =  
1090 -{  
1091 - 66, 67, 75, 86, 88, 90, 129, 25, 163, 130,  
1092 - 156, 157, 121, 122, 123, 124, 65, 125, 104, 200,  
1093 - 307, 165, 272, 167, 201, 64, 65, 19, 169, 64,  
1094 - 65, 91, 92, 93, 202, 1, 151, 129, 203, 152,  
1095 - 6, 185, 181, 105, 186, 129, 7, 204, 166, 17,  
1096 - 28, 83, 22, 19, 137, 138, 139, 64, 65, 39,  
1097 - 193, 18, 126, 40, 41, 127, 128, 53, 54, 55,  
1098 - 136, 129, 199, 127, 42, 129, 108, 208, 22, 209,  
1099 - 44, 29, 153, 146, 147, 30, 148, 43, 121, 122,  
1100 - 123, 64, 65, 125, 173, 174, 129, 128, 307, 206,  
1101 - 19, 64, 65, 31, 140, 128, 44, 127, 205, 185,  
1102 - 8, 20, 19, 32, 9, 10, 37, 192, 197, 51,  
1103 - 175, 21, 38, 41, 98, 22, 52, 101, 60, 11,  
1104 - 61, 128, 62, 42, 23, 128, 268, 22, 12, 63,  
1105 - 68, 127, 198, 282, 64, 65, 43, 19, 117, 118,  
1106 - 119, 127, 277, 24, 64, 65, 128, 69, 41, 70,  
1107 - 212, 73, 74, 76, 77, 44, 53, 78, 42, 79,  
1108 - 82, 85, 22, 137, 138, 139, 64, 65, 81, 84,  
1109 - 87, 43, 89, 94, 95, 99, 100, 102, 226, 227,  
1110 - 228, 19, 110, 168, 231, 232, 233, 103, 111, 214,  
1111 - 44, 112, 20, 308, 315, 113, 120, 114, 245, 246,  
1112 - 180, 288, 21, 290, 115, 116, 22, 133, 134, 150,  
1113 - 135, 230, 298, 159, 154, 213, 127, 302, 158, 273,  
1114 - 194, 278, 306, 283, 332, 164, 160, 172, 315, 177,  
1115 - 179, 183, 182, 191, 24, 189, 187, 190, 196, 211,  
1116 - 207, 210, 220, 221, 222, 229, 324, 217, 218, 219,  
1117 - 328, 54, 316, 223, 311, 224, 225, 237, 273, 238,  
1118 - 55, 242, 278, 243, 244, 287, 283, 297, 247, 249,  
1119 - 251, 253, 254, 234, 235, 236, 255, 258, 239, 240,  
1120 - 241, 289, 260, 262, 301, 305, 269, 270, 311, 291,  
1121 - 292, 293, 256, 257, 295, 318, 296, 299, 320, 300,  
1122 - 304, 303, 323, 333, 322, 325, 16, 326, 327, 317,  
1123 - 329, 36, 330, 331, 335, 321, 178, 319, 109, 334,  
1124 - 72, 267, 265, 195, 215, 216, 184, 188  
1125 -};  
1126 -  
1127 -static const yytype_uint16 yycheck[] =  
1128 -{  
1129 - 29, 30, 39, 57, 58, 59, 95, 8, 127, 95,  
1130 - 118, 119, 3, 4, 5, 6, 7, 8, 3, 9,  
1131 - 3, 133, 3, 135, 14, 6, 7, 3, 140, 6,  
1132 - 7, 60, 61, 62, 24, 35, 51, 126, 28, 54,  
1133 - 6, 51, 154, 28, 54, 134, 0, 37, 134, 48,  
1134 - 53, 52, 28, 3, 3, 4, 5, 6, 7, 9,  
1135 - 172, 49, 53, 13, 14, 56, 95, 3, 4, 5,  
1136 - 99, 160, 180, 56, 24, 164, 77, 189, 28, 191,  
1137 - 56, 52, 111, 30, 31, 52, 33, 37, 3, 4,  
1138 - 5, 6, 7, 8, 50, 51, 185, 126, 3, 185,  
1139 - 3, 6, 7, 32, 53, 134, 56, 56, 50, 51,  
1140 - 9, 14, 3, 17, 13, 14, 48, 171, 9, 19,  
1141 - 149, 24, 48, 14, 67, 28, 32, 70, 52, 28,  
1142 - 52, 160, 52, 24, 37, 164, 255, 28, 37, 3,  
1143 - 28, 56, 179, 5, 6, 7, 37, 3, 91, 92,  
1144 - 93, 56, 4, 56, 6, 7, 185, 6, 14, 40,  
1145 - 197, 48, 48, 53, 32, 56, 3, 50, 24, 51,  
1146 - 3, 51, 28, 3, 4, 5, 6, 7, 52, 57,  
1147 - 51, 37, 51, 19, 16, 52, 49, 48, 217, 218,  
1148 - 219, 3, 6, 136, 223, 224, 225, 48, 52, 200,  
1149 - 56, 3, 14, 292, 293, 4, 3, 57, 237, 238,  
1150 - 153, 265, 24, 267, 5, 57, 28, 55, 16, 19,  
1151 - 55, 222, 276, 19, 55, 37, 56, 281, 54, 258,  
1152 - 173, 260, 286, 262, 323, 53, 49, 53, 327, 3,  
1153 - 32, 3, 32, 51, 56, 55, 57, 54, 53, 3,  
1154 - 54, 54, 32, 54, 32, 28, 310, 52, 52, 52,  
1155 - 314, 4, 3, 52, 293, 52, 52, 52, 297, 52,  
1156 - 5, 55, 301, 55, 55, 54, 305, 51, 55, 55,  
1157 - 55, 53, 53, 226, 227, 228, 53, 53, 231, 232,  
1158 - 233, 54, 53, 53, 51, 51, 55, 55, 327, 54,  
1159 - 53, 53, 245, 246, 53, 3, 54, 53, 3, 54,  
1160 - 54, 53, 51, 3, 54, 53, 4, 54, 51, 297,  
1161 - 54, 14, 54, 54, 54, 305, 151, 301, 79, 327,  
1162 - 34, 254, 253, 174, 200, 200, 160, 164  
1163 -};  
1164 -  
1165 -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing  
1166 - symbol of state STATE-NUM. */  
1167 -static const yytype_uint8 yystos[] =  
1168 -{  
1169 - 0, 35, 59, 60, 61, 66, 6, 0, 9, 13,  
1170 - 14, 28, 37, 62, 63, 75, 66, 48, 49, 3,  
1171 - 14, 24, 28, 37, 56, 99, 100, 101, 53, 52,  
1172 - 52, 32, 17, 64, 65, 97, 75, 48, 48, 9,  
1173 - 13, 14, 24, 37, 56, 67, 68, 69, 70, 71,  
1174 - 99, 19, 32, 3, 4, 5, 103, 104, 106, 108,  
1175 - 52, 52, 52, 3, 6, 7, 74, 74, 28, 6,  
1176 - 40, 98, 97, 48, 48, 71, 53, 32, 50, 51,  
1177 - 79, 52, 3, 99, 57, 51, 79, 51, 79, 51,  
1178 - 79, 74, 74, 74, 19, 16, 119, 120, 119, 52,  
1179 - 49, 119, 48, 48, 3, 28, 72, 73, 99, 69,  
1180 - 6, 52, 3, 4, 57, 5, 57, 119, 119, 119,  
1181 - 3, 3, 4, 5, 6, 8, 53, 56, 74, 102,  
1182 - 121, 123, 124, 55, 16, 55, 74, 3, 4, 5,  
1183 - 53, 74, 102, 111, 112, 114, 30, 31, 33, 118,  
1184 - 19, 51, 54, 74, 55, 113, 113, 113, 54, 19,  
1185 - 49, 121, 122, 103, 53, 114, 121, 114, 119, 114,  
1186 - 115, 116, 53, 50, 51, 74, 117, 3, 73, 32,  
1187 - 119, 114, 32, 3, 122, 51, 54, 57, 124, 55,  
1188 - 54, 51, 79, 114, 119, 112, 53, 9, 71, 113,  
1189 - 9, 14, 24, 28, 37, 50, 121, 54, 114, 114,  
1190 - 54, 3, 71, 37, 99, 100, 101, 52, 52, 52,  
1191 - 32, 54, 32, 52, 52, 52, 74, 74, 74, 28,  
1192 - 99, 74, 74, 74, 119, 119, 119, 52, 52, 119,  
1193 - 119, 119, 55, 55, 55, 74, 74, 55, 93, 55,  
1194 - 94, 55, 95, 53, 53, 53, 119, 119, 53, 80,  
1195 - 53, 88, 53, 84, 105, 106, 107, 108, 103, 55,  
1196 - 55, 96, 3, 74, 76, 77, 78, 4, 74, 85,  
1197 - 86, 87, 5, 74, 81, 82, 83, 54, 79, 54,  
1198 - 79, 54, 53, 53, 92, 53, 54, 51, 79, 53,  
1199 - 54, 51, 79, 53, 54, 51, 79, 3, 102, 109,  
1200 - 110, 74, 89, 90, 91, 102, 3, 76, 3, 85,  
1201 - 3, 81, 54, 51, 79, 53, 54, 51, 79, 54,  
1202 - 54, 54, 102, 3, 89, 54  
1203 -};  
1204 -  
1205 -#define yyerrok (yyerrstatus = 0)  
1206 -#define yyclearin (yychar = YYEMPTY)  
1207 -#define YYEMPTY (-2)  
1208 -#define YYEOF 0  
1209 -  
1210 -#define YYACCEPT goto yyacceptlab  
1211 -#define YYABORT goto yyabortlab  
1212 -#define YYERROR goto yyerrorlab  
1213 -  
1214 -  
1215 -/* Like YYERROR except do call yyerror. This remains here temporarily  
1216 - to ease the transition to the new meaning of YYERROR, for GCC.  
1217 - Once GCC version 2 has supplanted version 1, this can go. */  
1218 -  
1219 -#define YYFAIL goto yyerrlab  
1220 -  
1221 -#define YYRECOVERING() (!!yyerrstatus)  
1222 -  
1223 -#define YYBACKUP(Token, Value) \  
1224 -do \  
1225 - if (yychar == YYEMPTY && yylen == 1) \  
1226 - { \  
1227 - yychar = (Token); \  
1228 - yylval = (Value); \  
1229 - yytoken = YYTRANSLATE (yychar); \  
1230 - YYPOPSTACK (1); \  
1231 - goto yybackup; \  
1232 - } \  
1233 - else \  
1234 - { \  
1235 - yyerror (parm, YY_("syntax error: cannot back up")); \  
1236 - YYERROR; \  
1237 - } \  
1238 -while (YYID (0))  
1239 -  
1240 -  
1241 -#define YYTERROR 1  
1242 -#define YYERRCODE 256  
1243 -  
1244 -  
1245 -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].  
1246 - If N is 0, then set CURRENT to the empty location which ends  
1247 - the previous symbol: RHS[0] (always defined). */  
1248 -  
1249 -#define YYRHSLOC(Rhs, K) ((Rhs)[K])  
1250 -#ifndef YYLLOC_DEFAULT  
1251 -# define YYLLOC_DEFAULT(Current, Rhs, N) \  
1252 - do \  
1253 - if (YYID (N)) \  
1254 - { \  
1255 - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \  
1256 - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \  
1257 - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \  
1258 - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \  
1259 - } \  
1260 - else \  
1261 - { \  
1262 - (Current).first_line = (Current).last_line = \  
1263 - YYRHSLOC (Rhs, 0).last_line; \  
1264 - (Current).first_column = (Current).last_column = \  
1265 - YYRHSLOC (Rhs, 0).last_column; \  
1266 - } \  
1267 - while (YYID (0))  
1268 -#endif  
1269 -  
1270 -  
1271 -/* YY_LOCATION_PRINT -- Print the location on the stream.  
1272 - This macro was not mandated originally: define only if we know  
1273 - we won't break user code: when these are the locations we know. */  
1274 -  
1275 -#ifndef YY_LOCATION_PRINT  
1276 -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL  
1277 -# define YY_LOCATION_PRINT(File, Loc) \  
1278 - fprintf (File, "%d.%d-%d.%d", \  
1279 - (Loc).first_line, (Loc).first_column, \  
1280 - (Loc).last_line, (Loc).last_column)  
1281 -# else  
1282 -# define YY_LOCATION_PRINT(File, Loc) ((void) 0)  
1283 -# endif  
1284 -#endif  
1285 -  
1286 -  
1287 -/* YYLEX -- calling `yylex' with the right arguments. */  
1288 -  
1289 -#ifdef YYLEX_PARAM  
1290 -# define YYLEX yylex (&yylval, YYLEX_PARAM)  
1291 -#else  
1292 -# define YYLEX yylex (&yylval)  
1293 -#endif  
1294 -  
1295 -/* Enable debugging if requested. */  
1296 -#if YYDEBUG  
1297 -  
1298 -# ifndef YYFPRINTF  
1299 -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */  
1300 -# define YYFPRINTF fprintf  
1301 -# endif  
1302 -  
1303 -# define YYDPRINTF(Args) \  
1304 -do { \  
1305 - if (yydebug) \  
1306 - YYFPRINTF Args; \  
1307 -} while (YYID (0))  
1308 -  
1309 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \  
1310 -do { \  
1311 - if (yydebug) \  
1312 - { \  
1313 - YYFPRINTF (stderr, "%s ", Title); \  
1314 - yy_symbol_print (stderr, \  
1315 - Type, Value, parm); \  
1316 - YYFPRINTF (stderr, "\n"); \  
1317 - } \  
1318 -} while (YYID (0))  
1319 -  
1320 -  
1321 -/*--------------------------------.  
1322 -| Print this symbol on YYOUTPUT. |  
1323 -`--------------------------------*/  
1324 -  
1325 -/*ARGSUSED*/  
1326 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1327 - || defined __cplusplus || defined _MSC_VER)  
1328 -static void  
1329 -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *parm)  
1330 -#else  
1331 -static void  
1332 -yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm)  
1333 - FILE *yyoutput;  
1334 - int yytype;  
1335 - YYSTYPE const * const yyvaluep;  
1336 - void *parm;  
1337 -#endif  
1338 -{  
1339 - if (!yyvaluep)  
1340 - return;  
1341 - YYUSE (parm);  
1342 -# ifdef YYPRINT  
1343 - if (yytype < YYNTOKENS)  
1344 - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);  
1345 -# else  
1346 - YYUSE (yyoutput);  
1347 -# endif  
1348 - switch (yytype)  
1349 - {  
1350 - default:  
1351 - break;  
1352 - }  
1353 -}  
1354 -  
1355 -  
1356 -/*--------------------------------.  
1357 -| Print this symbol on YYOUTPUT. |  
1358 -`--------------------------------*/  
1359 -  
1360 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1361 - || defined __cplusplus || defined _MSC_VER)  
1362 -static void  
1363 -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *parm)  
1364 -#else  
1365 -static void  
1366 -yy_symbol_print (yyoutput, yytype, yyvaluep, parm)  
1367 - FILE *yyoutput;  
1368 - int yytype;  
1369 - YYSTYPE const * const yyvaluep;  
1370 - void *parm;  
1371 -#endif  
1372 -{  
1373 - if (yytype < YYNTOKENS)  
1374 - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);  
1375 - else  
1376 - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);  
1377 -  
1378 - yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm);  
1379 - YYFPRINTF (yyoutput, ")");  
1380 -}  
1381 -  
1382 -/*------------------------------------------------------------------.  
1383 -| yy_stack_print -- Print the state stack from its BOTTOM up to its |  
1384 -| TOP (included). |  
1385 -`------------------------------------------------------------------*/  
1386 -  
1387 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1388 - || defined __cplusplus || defined _MSC_VER)  
1389 -static void  
1390 -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)  
1391 -#else  
1392 -static void  
1393 -yy_stack_print (bottom, top)  
1394 - yytype_int16 *bottom;  
1395 - yytype_int16 *top;  
1396 -#endif  
1397 -{  
1398 - YYFPRINTF (stderr, "Stack now");  
1399 - for (; bottom <= top; ++bottom)  
1400 - YYFPRINTF (stderr, " %d", *bottom);  
1401 - YYFPRINTF (stderr, "\n");  
1402 -}  
1403 -  
1404 -# define YY_STACK_PRINT(Bottom, Top) \  
1405 -do { \  
1406 - if (yydebug) \  
1407 - yy_stack_print ((Bottom), (Top)); \  
1408 -} while (YYID (0))  
1409 -  
1410 -  
1411 -/*------------------------------------------------.  
1412 -| Report that the YYRULE is going to be reduced. |  
1413 -`------------------------------------------------*/  
1414 -  
1415 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1416 - || defined __cplusplus || defined _MSC_VER)  
1417 -static void  
1418 -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *parm)  
1419 -#else  
1420 -static void  
1421 -yy_reduce_print (yyvsp, yyrule, parm)  
1422 - YYSTYPE *yyvsp;  
1423 - int yyrule;  
1424 - void *parm;  
1425 -#endif  
1426 -{  
1427 - int yynrhs = yyr2[yyrule];  
1428 - int yyi;  
1429 - unsigned long int yylno = yyrline[yyrule];  
1430 - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",  
1431 - yyrule - 1, yylno);  
1432 - /* The symbols being reduced. */  
1433 - for (yyi = 0; yyi < yynrhs; yyi++)  
1434 - {  
1435 - fprintf (stderr, " $%d = ", yyi + 1);  
1436 - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],  
1437 - &(yyvsp[(yyi + 1) - (yynrhs)])  
1438 - , parm);  
1439 - fprintf (stderr, "\n");  
1440 - }  
1441 -}  
1442 -  
1443 -# define YY_REDUCE_PRINT(Rule) \  
1444 -do { \  
1445 - if (yydebug) \  
1446 - yy_reduce_print (yyvsp, Rule, parm); \  
1447 -} while (YYID (0))  
1448 -  
1449 -/* Nonzero means print parse trace. It is left uninitialized so that  
1450 - multiple parsers can coexist. */  
1451 -int yydebug;  
1452 -#else /* !YYDEBUG */  
1453 -# define YYDPRINTF(Args)  
1454 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location)  
1455 -# define YY_STACK_PRINT(Bottom, Top)  
1456 -# define YY_REDUCE_PRINT(Rule)  
1457 -#endif /* !YYDEBUG */  
1458 -  
1459 -  
1460 -/* YYINITDEPTH -- initial size of the parser's stacks. */  
1461 -#ifndef YYINITDEPTH  
1462 -# define YYINITDEPTH 200  
1463 -#endif  
1464 -  
1465 -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only  
1466 - if the built-in stack extension method is used).  
1467 -  
1468 - Do not make this value too large; the results are undefined if  
1469 - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)  
1470 - evaluated with infinite-precision integer arithmetic. */  
1471 -  
1472 -#ifndef YYMAXDEPTH  
1473 -# define YYMAXDEPTH 10000  
1474 -#endif  
1475 -  
1476 -  
1477 -  
1478 -#if YYERROR_VERBOSE  
1479 -  
1480 -# ifndef yystrlen  
1481 -# if defined __GLIBC__ && defined _STRING_H  
1482 -# define yystrlen strlen  
1483 -# else  
1484 -/* Return the length of YYSTR. */  
1485 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1486 - || defined __cplusplus || defined _MSC_VER)  
1487 -static YYSIZE_T  
1488 -yystrlen (const char *yystr)  
1489 -#else  
1490 -static YYSIZE_T  
1491 -yystrlen (yystr)  
1492 - const char *yystr;  
1493 -#endif  
1494 -{  
1495 - YYSIZE_T yylen;  
1496 - for (yylen = 0; yystr[yylen]; yylen++)  
1497 - continue;  
1498 - return yylen;  
1499 -}  
1500 -# endif  
1501 -# endif  
1502 -  
1503 -# ifndef yystpcpy  
1504 -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE  
1505 -# define yystpcpy stpcpy  
1506 -# else  
1507 -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in  
1508 - YYDEST. */  
1509 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1510 - || defined __cplusplus || defined _MSC_VER)  
1511 -static char *  
1512 -yystpcpy (char *yydest, const char *yysrc)  
1513 -#else  
1514 -static char *  
1515 -yystpcpy (yydest, yysrc)  
1516 - char *yydest;  
1517 - const char *yysrc;  
1518 -#endif  
1519 -{  
1520 - char *yyd = yydest;  
1521 - const char *yys = yysrc;  
1522 -  
1523 - while ((*yyd++ = *yys++) != '\0')  
1524 - continue;  
1525 -  
1526 - return yyd - 1;  
1527 -}  
1528 -# endif  
1529 -# endif  
1530 -  
1531 -# ifndef yytnamerr  
1532 -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary  
1533 - quotes and backslashes, so that it's suitable for yyerror. The  
1534 - heuristic is that double-quoting is unnecessary unless the string  
1535 - contains an apostrophe, a comma, or backslash (other than  
1536 - backslash-backslash). YYSTR is taken from yytname. If YYRES is  
1537 - null, do not copy; instead, return the length of what the result  
1538 - would have been. */  
1539 -static YYSIZE_T  
1540 -yytnamerr (char *yyres, const char *yystr)  
1541 -{  
1542 - if (*yystr == '"')  
1543 - {  
1544 - YYSIZE_T yyn = 0;  
1545 - char const *yyp = yystr;  
1546 -  
1547 - for (;;)  
1548 - switch (*++yyp)  
1549 - {  
1550 - case '\'':  
1551 - case ',':  
1552 - goto do_not_strip_quotes;  
1553 -  
1554 - case '\\':  
1555 - if (*++yyp != '\\')  
1556 - goto do_not_strip_quotes;  
1557 - /* Fall through. */  
1558 - default:  
1559 - if (yyres)  
1560 - yyres[yyn] = *yyp;  
1561 - yyn++;  
1562 - break;  
1563 -  
1564 - case '"':  
1565 - if (yyres)  
1566 - yyres[yyn] = '\0';  
1567 - return yyn;  
1568 - }  
1569 - do_not_strip_quotes: ;  
1570 - }  
1571 -  
1572 - if (! yyres)  
1573 - return yystrlen (yystr);  
1574 -  
1575 - return yystpcpy (yyres, yystr) - yyres;  
1576 -}  
1577 -# endif  
1578 -  
1579 -/* Copy into YYRESULT an error message about the unexpected token  
1580 - YYCHAR while in state YYSTATE. Return the number of bytes copied,  
1581 - including the terminating null byte. If YYRESULT is null, do not  
1582 - copy anything; just return the number of bytes that would be  
1583 - copied. As a special case, return 0 if an ordinary "syntax error"  
1584 - message will do. Return YYSIZE_MAXIMUM if overflow occurs during  
1585 - size calculation. */  
1586 -static YYSIZE_T  
1587 -yysyntax_error (char *yyresult, int yystate, int yychar)  
1588 -{  
1589 - int yyn = yypact[yystate];  
1590 -  
1591 - if (! (YYPACT_NINF < yyn && yyn <= YYLAST))  
1592 - return 0;  
1593 - else  
1594 - {  
1595 - int yytype = YYTRANSLATE (yychar);  
1596 - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);  
1597 - YYSIZE_T yysize = yysize0;  
1598 - YYSIZE_T yysize1;  
1599 - int yysize_overflow = 0;  
1600 - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };  
1601 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];  
1602 - int yyx;  
1603 -  
1604 -# if 0  
1605 - /* This is so xgettext sees the translatable formats that are  
1606 - constructed on the fly. */  
1607 - YY_("syntax error, unexpected %s");  
1608 - YY_("syntax error, unexpected %s, expecting %s");  
1609 - YY_("syntax error, unexpected %s, expecting %s or %s");  
1610 - YY_("syntax error, unexpected %s, expecting %s or %s or %s");  
1611 - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");  
1612 -# endif  
1613 - char *yyfmt;  
1614 - char const *yyf;  
1615 - static char const yyunexpected[] = "syntax error, unexpected %s";  
1616 - static char const yyexpecting[] = ", expecting %s";  
1617 - static char const yyor[] = " or %s";  
1618 - char yyformat[sizeof yyunexpected  
1619 - + sizeof yyexpecting - 1  
1620 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)  
1621 - * (sizeof yyor - 1))];  
1622 - char const *yyprefix = yyexpecting;  
1623 -  
1624 - /* Start YYX at -YYN if negative to avoid negative indexes in  
1625 - YYCHECK. */  
1626 - int yyxbegin = yyn < 0 ? -yyn : 0;  
1627 -  
1628 - /* Stay within bounds of both yycheck and yytname. */  
1629 - int yychecklim = YYLAST - yyn + 1;  
1630 - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;  
1631 - int yycount = 1;  
1632 -  
1633 - yyarg[0] = yytname[yytype];  
1634 - yyfmt = yystpcpy (yyformat, yyunexpected);  
1635 -  
1636 - for (yyx = yyxbegin; yyx < yyxend; ++yyx)  
1637 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)  
1638 - {  
1639 - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)  
1640 - {  
1641 - yycount = 1;  
1642 - yysize = yysize0;  
1643 - yyformat[sizeof yyunexpected - 1] = '\0';  
1644 - break;  
1645 - }  
1646 - yyarg[yycount++] = yytname[yyx];  
1647 - yysize1 = yysize + yytnamerr (0, yytname[yyx]);  
1648 - yysize_overflow |= (yysize1 < yysize);  
1649 - yysize = yysize1;  
1650 - yyfmt = yystpcpy (yyfmt, yyprefix);  
1651 - yyprefix = yyor;  
1652 - }  
1653 -  
1654 - yyf = YY_(yyformat);  
1655 - yysize1 = yysize + yystrlen (yyf);  
1656 - yysize_overflow |= (yysize1 < yysize);  
1657 - yysize = yysize1;  
1658 -  
1659 - if (yysize_overflow)  
1660 - return YYSIZE_MAXIMUM;  
1661 -  
1662 - if (yyresult)  
1663 - {  
1664 - /* Avoid sprintf, as that infringes on the user's name space.  
1665 - Don't have undefined behavior even if the translation  
1666 - produced a string with the wrong number of "%s"s. */  
1667 - char *yyp = yyresult;  
1668 - int yyi = 0;  
1669 - while ((*yyp = *yyf) != '\0')  
1670 - {  
1671 - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)  
1672 - {  
1673 - yyp += yytnamerr (yyp, yyarg[yyi++]);  
1674 - yyf += 2;  
1675 - }  
1676 - else  
1677 - {  
1678 - yyp++;  
1679 - yyf++;  
1680 - }  
1681 - }  
1682 - }  
1683 - return yysize;  
1684 - }  
1685 -}  
1686 -#endif /* YYERROR_VERBOSE */  
1687 -  
1688 -  
1689 -/*-----------------------------------------------.  
1690 -| Release the memory associated to this symbol. |  
1691 -`-----------------------------------------------*/  
1692 -  
1693 -/*ARGSUSED*/  
1694 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1695 - || defined __cplusplus || defined _MSC_VER)  
1696 -static void  
1697 -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *parm)  
1698 -#else  
1699 -static void  
1700 -yydestruct (yymsg, yytype, yyvaluep, parm)  
1701 - const char *yymsg;  
1702 - int yytype;  
1703 - YYSTYPE *yyvaluep;  
1704 - void *parm;  
1705 -#endif  
1706 -{  
1707 - YYUSE (yyvaluep);  
1708 - YYUSE (parm);  
1709 -  
1710 - if (!yymsg)  
1711 - yymsg = "Deleting";  
1712 - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);  
1713 -  
1714 - switch (yytype)  
1715 - {  
1716 -  
1717 - default:  
1718 - break;  
1719 - }  
1720 -}  
1721 -  
1722 -  
1723 -/* Prevent warnings from -Wmissing-prototypes. */  
1724 -  
1725 -#ifdef YYPARSE_PARAM  
1726 -#if defined __STDC__ || defined __cplusplus  
1727 -int yyparse (void *YYPARSE_PARAM);  
1728 -#else  
1729 -int yyparse ();  
1730 -#endif  
1731 -#else /* ! YYPARSE_PARAM */  
1732 -#if defined __STDC__ || defined __cplusplus  
1733 -int yyparse (void *parm);  
1734 -#else  
1735 -int yyparse ();  
1736 -#endif  
1737 -#endif /* ! YYPARSE_PARAM */  
1738 -  
1739 -  
1740 -  
1741 -  
1742 -  
1743 -  
1744 -/*----------.  
1745 -| yyparse. |  
1746 -`----------*/  
1747 -  
1748 -#ifdef YYPARSE_PARAM  
1749 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1750 - || defined __cplusplus || defined _MSC_VER)  
1751 -int  
1752 -yyparse (void *YYPARSE_PARAM)  
1753 -#else  
1754 -int  
1755 -yyparse (YYPARSE_PARAM)  
1756 - void *YYPARSE_PARAM;  
1757 -#endif  
1758 -#else /* ! YYPARSE_PARAM */  
1759 -#if (defined __STDC__ || defined __C99__FUNC__ \  
1760 - || defined __cplusplus || defined _MSC_VER)  
1761 -int  
1762 -yyparse (void *parm)  
1763 -#else  
1764 -int  
1765 -yyparse (parm)  
1766 - void *parm;  
1767 -#endif  
1768 -#endif  
1769 -{  
1770 - /* The look-ahead symbol. */  
1771 -int yychar;  
1772 -  
1773 -/* The semantic value of the look-ahead symbol. */  
1774 -YYSTYPE yylval;  
1775 -  
1776 -/* Number of syntax errors so far. */  
1777 -int yynerrs;  
1778 -  
1779 - int yystate;  
1780 - int yyn;  
1781 - int yyresult;  
1782 - /* Number of tokens to shift before error messages enabled. */  
1783 - int yyerrstatus;  
1784 - /* Look-ahead token as an internal (translated) token number. */  
1785 - int yytoken = 0;  
1786 -#if YYERROR_VERBOSE  
1787 - /* Buffer for error messages, and its allocated size. */  
1788 - char yymsgbuf[128];  
1789 - char *yymsg = yymsgbuf;  
1790 - YYSIZE_T yymsg_alloc = sizeof yymsgbuf;  
1791 -#endif  
1792 -  
1793 - /* Three stacks and their tools:  
1794 - `yyss': related to states,  
1795 - `yyvs': related to semantic values,  
1796 - `yyls': related to locations.  
1797 -  
1798 - Refer to the stacks thru separate pointers, to allow yyoverflow  
1799 - to reallocate them elsewhere. */  
1800 -  
1801 - /* The state stack. */  
1802 - yytype_int16 yyssa[YYINITDEPTH];  
1803 - yytype_int16 *yyss = yyssa;  
1804 - yytype_int16 *yyssp;  
1805 -  
1806 - /* The semantic value stack. */  
1807 - YYSTYPE yyvsa[YYINITDEPTH];  
1808 - YYSTYPE *yyvs = yyvsa;  
1809 - YYSTYPE *yyvsp;  
1810 -  
1811 -  
1812 -  
1813 -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))  
1814 -  
1815 - YYSIZE_T yystacksize = YYINITDEPTH;  
1816 -  
1817 - /* The variables used to return semantic value and location from the  
1818 - action routines. */  
1819 - YYSTYPE yyval;  
1820 -  
1821 -  
1822 - /* The number of symbols on the RHS of the reduced rule.  
1823 - Keep to zero when no symbol should be popped. */  
1824 - int yylen = 0;  
1825 -  
1826 - YYDPRINTF ((stderr, "Starting parse\n"));  
1827 -  
1828 - yystate = 0;  
1829 - yyerrstatus = 0;  
1830 - yynerrs = 0;  
1831 - yychar = YYEMPTY; /* Cause a token to be read. */  
1832 -  
1833 - /* Initialize stack pointers.  
1834 - Waste one element of value and location stack  
1835 - so that they stay on the same level as the state stack.  
1836 - The wasted elements are never initialized. */  
1837 -  
1838 - yyssp = yyss;  
1839 - yyvsp = yyvs;  
1840 -  
1841 - goto yysetstate;  
1842 -  
1843 -/*------------------------------------------------------------.  
1844 -| yynewstate -- Push a new state, which is found in yystate. |  
1845 -`------------------------------------------------------------*/  
1846 - yynewstate:  
1847 - /* In all cases, when you get here, the value and location stacks  
1848 - have just been pushed. So pushing a state here evens the stacks. */  
1849 - yyssp++;  
1850 -  
1851 - yysetstate:  
1852 - *yyssp = yystate;  
1853 -  
1854 - if (yyss + yystacksize - 1 <= yyssp)  
1855 - {  
1856 - /* Get the current used size of the three stacks, in elements. */  
1857 - YYSIZE_T yysize = yyssp - yyss + 1;  
1858 -  
1859 -#ifdef yyoverflow  
1860 - {  
1861 - /* Give user a chance to reallocate the stack. Use copies of  
1862 - these so that the &'s don't force the real ones into  
1863 - memory. */  
1864 - YYSTYPE *yyvs1 = yyvs;  
1865 - yytype_int16 *yyss1 = yyss;  
1866 -  
1867 -  
1868 - /* Each stack pointer address is followed by the size of the  
1869 - data in use in that stack, in bytes. This used to be a  
1870 - conditional around just the two extra args, but that might  
1871 - be undefined if yyoverflow is a macro. */  
1872 - yyoverflow (YY_("memory exhausted"),  
1873 - &yyss1, yysize * sizeof (*yyssp),  
1874 - &yyvs1, yysize * sizeof (*yyvsp),  
1875 -  
1876 - &yystacksize);  
1877 -  
1878 - yyss = yyss1;  
1879 - yyvs = yyvs1;  
1880 - }  
1881 -#else /* no yyoverflow */  
1882 -# ifndef YYSTACK_RELOCATE  
1883 - goto yyexhaustedlab;  
1884 -# else  
1885 - /* Extend the stack our own way. */  
1886 - if (YYMAXDEPTH <= yystacksize)  
1887 - goto yyexhaustedlab;  
1888 - yystacksize *= 2;  
1889 - if (YYMAXDEPTH < yystacksize)  
1890 - yystacksize = YYMAXDEPTH;  
1891 -  
1892 - {  
1893 - yytype_int16 *yyss1 = yyss;  
1894 - union yyalloc *yyptr =  
1895 - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));  
1896 - if (! yyptr)  
1897 - goto yyexhaustedlab;  
1898 - YYSTACK_RELOCATE (yyss);  
1899 - YYSTACK_RELOCATE (yyvs);  
1900 -  
1901 -# undef YYSTACK_RELOCATE  
1902 - if (yyss1 != yyssa)  
1903 - YYSTACK_FREE (yyss1);  
1904 - }  
1905 -# endif  
1906 -#endif /* no yyoverflow */  
1907 -  
1908 - yyssp = yyss + yysize - 1;  
1909 - yyvsp = yyvs + yysize - 1;  
1910 -  
1911 -  
1912 - YYDPRINTF ((stderr, "Stack size increased to %lu\n",  
1913 - (unsigned long int) yystacksize));  
1914 -  
1915 - if (yyss + yystacksize - 1 <= yyssp)  
1916 - YYABORT;  
1917 - }  
1918 -  
1919 - YYDPRINTF ((stderr, "Entering state %d\n", yystate));  
1920 -  
1921 - goto yybackup;  
1922 -  
1923 -/*-----------.  
1924 -| yybackup. |  
1925 -`-----------*/  
1926 -yybackup:  
1927 -  
1928 - /* Do appropriate processing given the current state. Read a  
1929 - look-ahead token if we need one and don't already have one. */  
1930 -  
1931 - /* First try to decide what to do without reference to look-ahead token. */  
1932 - yyn = yypact[yystate];  
1933 - if (yyn == YYPACT_NINF)  
1934 - goto yydefault;  
1935 -  
1936 - /* Not known => get a look-ahead token if don't already have one. */  
1937 -  
1938 - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */  
1939 - if (yychar == YYEMPTY)  
1940 - {  
1941 - YYDPRINTF ((stderr, "Reading a token: "));  
1942 - yychar = YYLEX;  
1943 - }  
1944 -  
1945 - if (yychar <= YYEOF)  
1946 - {  
1947 - yychar = yytoken = YYEOF;  
1948 - YYDPRINTF ((stderr, "Now at end of input.\n"));  
1949 - }  
1950 - else  
1951 - {  
1952 - yytoken = YYTRANSLATE (yychar);  
1953 - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);  
1954 - }  
1955 -  
1956 - /* If the proper action on seeing token YYTOKEN is to reduce or to  
1957 - detect an error, take that action. */  
1958 - yyn += yytoken;  
1959 - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)  
1960 - goto yydefault;  
1961 - yyn = yytable[yyn];  
1962 - if (yyn <= 0)  
1963 - {  
1964 - if (yyn == 0 || yyn == YYTABLE_NINF)  
1965 - goto yyerrlab;  
1966 - yyn = -yyn;  
1967 - goto yyreduce;  
1968 - }  
1969 -  
1970 - if (yyn == YYFINAL)  
1971 - YYACCEPT;  
1972 -  
1973 - /* Count tokens shifted since error; after three, turn off error  
1974 - status. */  
1975 - if (yyerrstatus)  
1976 - yyerrstatus--;  
1977 -  
1978 - /* Shift the look-ahead token. */  
1979 - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);  
1980 -  
1981 - /* Discard the shifted token unless it is eof. */  
1982 - if (yychar != YYEOF)  
1983 - yychar = YYEMPTY;  
1984 -  
1985 - yystate = yyn;  
1986 - *++yyvsp = yylval;  
1987 -  
1988 - goto yynewstate;  
1989 -  
1990 -  
1991 -/*-----------------------------------------------------------.  
1992 -| yydefault -- do the default action for the current state. |  
1993 -`-----------------------------------------------------------*/  
1994 -yydefault:  
1995 - yyn = yydefact[yystate];  
1996 - if (yyn == 0)  
1997 - goto yyerrlab;  
1998 - goto yyreduce;  
1999 -  
2000 -  
2001 -/*-----------------------------.  
2002 -| yyreduce -- Do a reduction. |  
2003 -`-----------------------------*/  
2004 -yyreduce:  
2005 - /* yyn is the number of a rule to reduce with. */  
2006 - yylen = yyr2[yyn];  
2007 -  
2008 - /* If YYLEN is nonzero, implement the default value of the action:  
2009 - `$$ = $1'.  
2010 -  
2011 - Otherwise, the following line sets YYVAL to garbage.  
2012 - This behavior is undocumented and Bison  
2013 - users should not rely upon it. Assigning to YYVAL  
2014 - unconditionally makes the parser a bit smaller, and it avoids a  
2015 - GCC warning that YYVAL may be used uninitialized. */  
2016 - yyval = yyvsp[1-yylen];  
2017 -  
2018 -  
2019 - YY_REDUCE_PRINT (yyn);  
2020 - switch (yyn)  
2021 - {  
2022 - case 7:  
2023 -#line 442 "parser.yxx"  
2024 - { initfg(static_cast<ParserState*>(parm)); ;}  
2025 - break;  
2026 -  
2027 - case 8:  
2028 -#line 444 "parser.yxx"  
2029 - { initfg(static_cast<ParserState*>(parm)); ;}  
2030 - break;  
2031 -  
2032 - case 35:  
2033 -#line 504 "parser.yxx"  
2034 - {  
2035 - ParserState* pp = static_cast<ParserState*>(parm);  
2036 - bool print = (yyvsp[(5) - (6)].argVec)->hasAtom("output_var");  
2037 - bool introduced = (yyvsp[(5) - (6)].argVec)->hasAtom("var_is_introduced");  
2038 - pp->intvarTable.put((yyvsp[(4) - (6)].sValue), pp->intvars.size());  
2039 - if (print) {  
2040 - pp->output(std::string((yyvsp[(4) - (6)].sValue)), new AST::IntVar(pp->intvars.size()));  
2041 - }  
2042 - if ((yyvsp[(6) - (6)].oArg)()) {  
2043 - AST::Node* arg = (yyvsp[(6) - (6)].oArg).some();  
2044 - if (arg->isInt()) {  
2045 - pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue),  
2046 - new IntVarSpec(arg->getInt(),introduced)));  
2047 - } else if (arg->isIntVar()) {  
2048 - pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue),  
2049 - new IntVarSpec(Alias(arg->getIntVar()),introduced)));  
2050 - } else {  
2051 - yyassert(pp, false, "Invalid var int initializer.");  
2052 - }  
2053 - if (!pp->hadError)  
2054 - addDomainConstraint(pp, "int_in",  
2055 - new AST::IntVar(pp->intvars.size()-1), (yyvsp[(2) - (6)].oSet));  
2056 - delete arg;  
2057 - } else {  
2058 - pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue), new IntVarSpec((yyvsp[(2) - (6)].oSet),introduced)));  
2059 - }  
2060 - delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));  
2061 - ;}  
2062 - break;  
2063 -  
2064 - case 36:  
2065 -#line 533 "parser.yxx"  
2066 - {  
2067 - ParserState* pp = static_cast<ParserState*>(parm);  
2068 - bool print = (yyvsp[(5) - (6)].argVec)->hasAtom("output_var");  
2069 - bool introduced = (yyvsp[(5) - (6)].argVec)->hasAtom("var_is_introduced");  
2070 - pp->boolvarTable.put((yyvsp[(4) - (6)].sValue), pp->boolvars.size());  
2071 - if (print) {  
2072 - pp->output(std::string((yyvsp[(4) - (6)].sValue)), new AST::BoolVar(pp->boolvars.size()));  
2073 - }  
2074 - if ((yyvsp[(6) - (6)].oArg)()) {  
2075 - AST::Node* arg = (yyvsp[(6) - (6)].oArg).some();  
2076 - if (arg->isBool()) {  
2077 - pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue),  
2078 - new BoolVarSpec(arg->getBool(),introduced)));  
2079 - } else if (arg->isBoolVar()) {  
2080 - pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue),  
2081 - new BoolVarSpec(Alias(arg->getBoolVar()),introduced)));  
2082 - } else {  
2083 - yyassert(pp, false, "Invalid var bool initializer.");  
2084 - }  
2085 - if (!pp->hadError)  
2086 - addDomainConstraint(pp, "int_in",  
2087 - new AST::BoolVar(pp->boolvars.size()-1), (yyvsp[(2) - (6)].oSet));  
2088 - delete arg;  
2089 - } else {  
2090 - pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue), new BoolVarSpec((yyvsp[(2) - (6)].oSet),introduced)));  
2091 - }  
2092 - delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));  
2093 - ;}  
2094 - break;  
2095 -  
2096 - case 37:  
2097 -#line 562 "parser.yxx"  
2098 - { ParserState* pp = static_cast<ParserState*>(parm);  
2099 - yyassert(pp, false, "Floats not supported.");  
2100 - delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));  
2101 - ;}  
2102 - break;  
2103 -  
2104 - case 38:  
2105 -#line 567 "parser.yxx"  
2106 - {  
2107 - ParserState* pp = static_cast<ParserState*>(parm);  
2108 - bool print = (yyvsp[(7) - (8)].argVec)->hasAtom("output_var");  
2109 - bool introduced = (yyvsp[(7) - (8)].argVec)->hasAtom("var_is_introduced");  
2110 - pp->setvarTable.put((yyvsp[(6) - (8)].sValue), pp->setvars.size());  
2111 - if (print) {  
2112 - pp->output(std::string((yyvsp[(6) - (8)].sValue)), new AST::SetVar(pp->setvars.size()));  
2113 - }  
2114 - if ((yyvsp[(8) - (8)].oArg)()) {  
2115 - AST::Node* arg = (yyvsp[(8) - (8)].oArg).some();  
2116 - if (arg->isSet()) {  
2117 - pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue),  
2118 - new SetVarSpec(arg->getSet(),introduced)));  
2119 - } else if (arg->isSetVar()) {  
2120 - pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue),  
2121 - new SetVarSpec(Alias(arg->getSetVar()),introduced)));  
2122 - delete arg;  
2123 - } else {  
2124 - yyassert(pp, false, "Invalid var set initializer.");  
2125 - delete arg;  
2126 - }  
2127 - if (!pp->hadError)  
2128 - addDomainConstraint(pp, "set_subset",  
2129 - new AST::SetVar(pp->setvars.size()-1), (yyvsp[(4) - (8)].oSet));  
2130 - } else {  
2131 - pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue), new SetVarSpec((yyvsp[(4) - (8)].oSet),introduced)));  
2132 - }  
2133 - delete (yyvsp[(7) - (8)].argVec); free((yyvsp[(6) - (8)].sValue));  
2134 - ;}  
2135 - break;  
2136 -  
2137 - case 39:  
2138 -#line 597 "parser.yxx"  
2139 - {  
2140 - ParserState* pp = static_cast<ParserState*>(parm);  
2141 - yyassert(pp, (yyvsp[(6) - (6)].arg)->isInt(), "Invalid int initializer.");  
2142 - pp->intvals.put((yyvsp[(3) - (6)].sValue), (yyvsp[(6) - (6)].arg)->getInt());  
2143 - delete (yyvsp[(4) - (6)].argVec); free((yyvsp[(3) - (6)].sValue));  
2144 - ;}  
2145 - break;  
2146 -  
2147 - case 40:  
2148 -#line 604 "parser.yxx"  
2149 - {  
2150 - ParserState* pp = static_cast<ParserState*>(parm);  
2151 - yyassert(pp, (yyvsp[(6) - (6)].arg)->isBool(), "Invalid bool initializer.");  
2152 - pp->boolvals.put((yyvsp[(3) - (6)].sValue), (yyvsp[(6) - (6)].arg)->getBool());  
2153 - delete (yyvsp[(4) - (6)].argVec); free((yyvsp[(3) - (6)].sValue));  
2154 - ;}  
2155 - break;  
2156 -  
2157 - case 41:  
2158 -#line 611 "parser.yxx"  
2159 - {  
2160 - ParserState* pp = static_cast<ParserState*>(parm);  
2161 - yyassert(pp, (yyvsp[(8) - (8)].arg)->isSet(), "Invalid set initializer.");  
2162 - AST::SetLit* set = (yyvsp[(8) - (8)].arg)->getSet();  
2163 - pp->setvals.put((yyvsp[(5) - (8)].sValue), *set);  
2164 - delete set;  
2165 - delete (yyvsp[(6) - (8)].argVec); free((yyvsp[(5) - (8)].sValue));  
2166 - ;}  
2167 - break;  
2168 -  
2169 - case 42:  
2170 -#line 621 "parser.yxx"  
2171 - {  
2172 - ParserState* pp = static_cast<ParserState*>(parm);  
2173 - yyassert(pp, (yyvsp[(3) - (13)].iValue)==1, "Arrays must start at 1");  
2174 - if (!pp->hadError) {  
2175 - bool print = (yyvsp[(12) - (13)].argVec)->hasCall("output_array");  
2176 - vector<int> vars((yyvsp[(5) - (13)].iValue));  
2177 - if (!pp->hadError) {  
2178 - if ((yyvsp[(13) - (13)].oVarSpecVec)()) {  
2179 - vector<VarSpec*>* vsv = (yyvsp[(13) - (13)].oVarSpecVec).some();  
2180 - yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (13)].iValue)),  
2181 - "Initializer size does not match array dimension");  
2182 - if (!pp->hadError) {  
2183 - for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {  
2184 - IntVarSpec* ivsv = static_cast<IntVarSpec*>((*vsv)[i]);  
2185 - if (ivsv->alias) {  
2186 - vars[i] = ivsv->i;  
2187 - } else {  
2188 - vars[i] = pp->intvars.size();  
2189 - pp->intvars.push_back(varspec((yyvsp[(11) - (13)].sValue), ivsv));  
2190 - }  
2191 - if (!pp->hadError && (yyvsp[(9) - (13)].oSet)()) {  
2192 - Option<AST::SetLit*> opt =  
2193 - Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(9) - (13)].oSet).some()));  
2194 - addDomainConstraint(pp, "int_in",  
2195 - new AST::IntVar(vars[i]),  
2196 - opt);  
2197 - }  
2198 - }  
2199 - }  
2200 - delete vsv;  
2201 - } else {  
2202 - if ((yyvsp[(5) - (13)].iValue)>0) {  
2203 - IntVarSpec* ispec = new IntVarSpec((yyvsp[(9) - (13)].oSet),!print);  
2204 - string arrayname = "["; arrayname += (yyvsp[(11) - (13)].sValue);  
2205 - for (int i=0; i<(yyvsp[(5) - (13)].iValue)-1; i++) {  
2206 - vars[i] = pp->intvars.size();  
2207 - pp->intvars.push_back(varspec(arrayname, ispec));  
2208 - }  
2209 - vars[(yyvsp[(5) - (13)].iValue)-1] = pp->intvars.size();  
2210 - pp->intvars.push_back(varspec((yyvsp[(11) - (13)].sValue), ispec));  
2211 - }  
2212 - }  
2213 - }  
2214 - if (print) {  
2215 - AST::Array* a = new AST::Array();  
2216 - a->a.push_back(arrayOutput((yyvsp[(12) - (13)].argVec)->getCall("output_array")));  
2217 - AST::Array* output = new AST::Array();  
2218 - for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++)  
2219 - output->a.push_back(new AST::IntVar(vars[i]));  
2220 - a->a.push_back(output);  
2221 - a->a.push_back(new AST::String(")"));  
2222 - pp->output(std::string((yyvsp[(11) - (13)].sValue)), a);  
2223 - }  
2224 - pp->intvararrays.put((yyvsp[(11) - (13)].sValue), vars);  
2225 - }  
2226 - delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));  
2227 - ;}  
2228 - break;  
2229 -  
2230 - case 43:  
2231 -#line 680 "parser.yxx"  
2232 - {  
2233 - ParserState* pp = static_cast<ParserState*>(parm);  
2234 - bool print = (yyvsp[(12) - (13)].argVec)->hasCall("output_array");  
2235 - yyassert(pp, (yyvsp[(3) - (13)].iValue)==1, "Arrays must start at 1");  
2236 - if (!pp->hadError) {  
2237 - vector<int> vars((yyvsp[(5) - (13)].iValue));  
2238 - if ((yyvsp[(13) - (13)].oVarSpecVec)()) {  
2239 - vector<VarSpec*>* vsv = (yyvsp[(13) - (13)].oVarSpecVec).some();  
2240 - yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (13)].iValue)),  
2241 - "Initializer size does not match array dimension");  
2242 - if (!pp->hadError) {  
2243 - for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {  
2244 - BoolVarSpec* bvsv = static_cast<BoolVarSpec*>((*vsv)[i]);  
2245 - if (bvsv->alias)  
2246 - vars[i] = bvsv->i;  
2247 - else {  
2248 - vars[i] = pp->boolvars.size();  
2249 - pp->boolvars.push_back(varspec((yyvsp[(11) - (13)].sValue), (*vsv)[i]));  
2250 - }  
2251 - if (!pp->hadError && (yyvsp[(9) - (13)].oSet)()) {  
2252 - Option<AST::SetLit*> opt =  
2253 - Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(9) - (13)].oSet).some()));  
2254 - addDomainConstraint(pp, "int_in",  
2255 - new AST::BoolVar(vars[i]),  
2256 - opt);  
2257 - }  
2258 - }  
2259 - }  
2260 - delete vsv;  
2261 - } else {  
2262 - for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {  
2263 - vars[i] = pp->boolvars.size();  
2264 - pp->boolvars.push_back(varspec((yyvsp[(11) - (13)].sValue),  
2265 - new BoolVarSpec((yyvsp[(9) - (13)].oSet),!print)));  
2266 - }  
2267 - }  
2268 - if (print) {  
2269 - AST::Array* a = new AST::Array();  
2270 - a->a.push_back(arrayOutput((yyvsp[(12) - (13)].argVec)->getCall("output_array")));  
2271 - AST::Array* output = new AST::Array();  
2272 - for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++)  
2273 - output->a.push_back(new AST::BoolVar(vars[i]));  
2274 - a->a.push_back(output);  
2275 - a->a.push_back(new AST::String(")"));  
2276 - pp->output(std::string((yyvsp[(11) - (13)].sValue)), a);  
2277 - }  
2278 - pp->boolvararrays.put((yyvsp[(11) - (13)].sValue), vars);  
2279 - }  
2280 - delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));  
2281 - ;}  
2282 - break;  
2283 -  
2284 - case 44:  
2285 -#line 732 "parser.yxx"  
2286 - {  
2287 - ParserState* pp = static_cast<ParserState*>(parm);  
2288 - yyassert(pp, false, "Floats not supported.");  
2289 - delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));  
2290 - ;}  
2291 - break;  
2292 -  
2293 - case 45:  
2294 -#line 739 "parser.yxx"  
2295 - {  
2296 - ParserState* pp = static_cast<ParserState*>(parm);  
2297 - bool print = (yyvsp[(14) - (15)].argVec)->hasCall("output_array");  
2298 - yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");  
2299 - if (!pp->hadError) {  
2300 - vector<int> vars((yyvsp[(5) - (15)].iValue));  
2301 - if ((yyvsp[(15) - (15)].oVarSpecVec)()) {  
2302 - vector<VarSpec*>* vsv = (yyvsp[(15) - (15)].oVarSpecVec).some();  
2303 - yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),  
2304 - "Initializer size does not match array dimension");  
2305 - if (!pp->hadError) {  
2306 - for (int i=0; i<(yyvsp[(5) - (15)].iValue); i++) {  
2307 - SetVarSpec* svsv = static_cast<SetVarSpec*>((*vsv)[i]);  
2308 - if (svsv->alias)  
2309 - vars[i] = svsv->i;  
2310 - else {  
2311 - vars[i] = pp->setvars.size();  
2312 - pp->setvars.push_back(varspec((yyvsp[(13) - (15)].sValue), (*vsv)[i]));  
2313 - }  
2314 - if (!pp->hadError && (yyvsp[(11) - (15)].oSet)()) {  
2315 - Option<AST::SetLit*> opt =  
2316 - Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(11) - (15)].oSet).some()));  
2317 - addDomainConstraint(pp, "set_subset",  
2318 - new AST::SetVar(vars[i]),  
2319 - opt);  
2320 - }  
2321 - }  
2322 - }  
2323 - delete vsv;  
2324 - } else {  
2325 - if ((yyvsp[(5) - (15)].iValue)>0) {  
2326 - SetVarSpec* ispec = new SetVarSpec((yyvsp[(11) - (15)].oSet),!print);  
2327 - string arrayname = "["; arrayname += (yyvsp[(13) - (15)].sValue);  
2328 - for (int i=0; i<(yyvsp[(5) - (15)].iValue)-1; i++) {  
2329 - vars[i] = pp->setvars.size();  
2330 - pp->setvars.push_back(varspec(arrayname, ispec));  
2331 - }  
2332 - vars[(yyvsp[(5) - (15)].iValue)-1] = pp->setvars.size();  
2333 - pp->setvars.push_back(varspec((yyvsp[(13) - (15)].sValue), ispec));  
2334 - }  
2335 - }  
2336 - if (print) {  
2337 - AST::Array* a = new AST::Array();  
2338 - a->a.push_back(arrayOutput((yyvsp[(14) - (15)].argVec)->getCall("output_array")));  
2339 - AST::Array* output = new AST::Array();  
2340 - for (int i=0; i<(yyvsp[(5) - (15)].iValue); i++)  
2341 - output->a.push_back(new AST::SetVar(vars[i]));  
2342 - a->a.push_back(output);  
2343 - a->a.push_back(new AST::String(")"));  
2344 - pp->output(std::string((yyvsp[(13) - (15)].sValue)), a);  
2345 - }  
2346 - pp->setvararrays.put((yyvsp[(13) - (15)].sValue), vars);  
2347 - }  
2348 - delete (yyvsp[(14) - (15)].argVec); free((yyvsp[(13) - (15)].sValue));  
2349 - ;}  
2350 - break;  
2351 -  
2352 - case 46:  
2353 -#line 796 "parser.yxx"  
2354 - {  
2355 - ParserState* pp = static_cast<ParserState*>(parm);  
2356 - yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");  
2357 - yyassert(pp, (yyvsp[(14) - (15)].setValue)->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),  
2358 - "Initializer size does not match array dimension");  
2359 - if (!pp->hadError)  
2360 - pp->intvalarrays.put((yyvsp[(10) - (15)].sValue), *(yyvsp[(14) - (15)].setValue));  
2361 - delete (yyvsp[(14) - (15)].setValue);  
2362 - free((yyvsp[(10) - (15)].sValue));  
2363 - delete (yyvsp[(11) - (15)].argVec);  
2364 - ;}  
2365 - break;  
2366 -  
2367 - case 47:  
2368 -#line 809 "parser.yxx"  
2369 - {  
2370 - ParserState* pp = static_cast<ParserState*>(parm);  
2371 - yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");  
2372 - yyassert(pp, (yyvsp[(14) - (15)].setValue)->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),  
2373 - "Initializer size does not match array dimension");  
2374 - if (!pp->hadError)  
2375 - pp->boolvalarrays.put((yyvsp[(10) - (15)].sValue), *(yyvsp[(14) - (15)].setValue));  
2376 - delete (yyvsp[(14) - (15)].setValue);  
2377 - free((yyvsp[(10) - (15)].sValue));  
2378 - delete (yyvsp[(11) - (15)].argVec);  
2379 - ;}  
2380 - break;  
2381 -  
2382 - case 48:  
2383 -#line 822 "parser.yxx"  
2384 - {  
2385 - ParserState* pp = static_cast<ParserState*>(parm);  
2386 - yyassert(pp, false, "Floats not supported.");  
2387 - delete (yyvsp[(11) - (15)].argVec); free((yyvsp[(10) - (15)].sValue));  
2388 - ;}  
2389 - break;  
2390 -  
2391 - case 49:  
2392 -#line 829 "parser.yxx"  
2393 - {  
2394 - ParserState* pp = static_cast<ParserState*>(parm);  
2395 - yyassert(pp, (yyvsp[(3) - (17)].iValue)==1, "Arrays must start at 1");  
2396 - yyassert(pp, (yyvsp[(16) - (17)].setValueList)->size() == static_cast<unsigned int>((yyvsp[(5) - (17)].iValue)),  
2397 - "Initializer size does not match array dimension");  
2398 - if (!pp->hadError)  
2399 - pp->setvalarrays.put((yyvsp[(12) - (17)].sValue), *(yyvsp[(16) - (17)].setValueList));  
2400 - delete (yyvsp[(16) - (17)].setValueList);  
2401 - delete (yyvsp[(13) - (17)].argVec); free((yyvsp[(12) - (17)].sValue));  
2402 - ;}  
2403 - break;  
2404 -  
2405 - case 50:  
2406 -#line 842 "parser.yxx"  
2407 - {  
2408 - (yyval.varSpec) = new IntVarSpec((yyvsp[(1) - (1)].iValue),false);  
2409 - ;}  
2410 - break;  
2411 -  
2412 - case 51:  
2413 -#line 846 "parser.yxx"  
2414 - {  
2415 - int v = 0;  
2416 - ParserState* pp = static_cast<ParserState*>(parm);  
2417 - if (pp->intvarTable.get((yyvsp[(1) - (1)].sValue), v))  
2418 - (yyval.varSpec) = new IntVarSpec(Alias(v),false);  
2419 - else {  
2420 - pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)  
2421 - << " in line no. "  
2422 - << yyget_lineno(pp->yyscanner) << std::endl;  
2423 - pp->hadError = true;  
2424 - (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent  
2425 - }  
2426 - free((yyvsp[(1) - (1)].sValue));  
2427 - ;}  
2428 - break;  
2429 -  
2430 - case 52:  
2431 -#line 861 "parser.yxx"  
2432 - {  
2433 - vector<int> v;  
2434 - ParserState* pp = static_cast<ParserState*>(parm);  
2435 - if (pp->intvararrays.get((yyvsp[(1) - (4)].sValue), v)) {  
2436 - yyassert(pp,static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) > 0 &&  
2437 - static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) <= v.size(),  
2438 - "array access out of bounds");  
2439 - if (!pp->hadError)  
2440 - (yyval.varSpec) = new IntVarSpec(Alias(v[(yyvsp[(3) - (4)].iValue)-1]),false);  
2441 - else  
2442 - (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent  
2443 - } else {  
2444 - pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)  
2445 - << " in line no. "  
2446 - << yyget_lineno(pp->yyscanner) << std::endl;  
2447 - pp->hadError = true;  
2448 - (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent  
2449 - }  
2450 - free((yyvsp[(1) - (4)].sValue));  
2451 - ;}  
2452 - break;  
2453 -  
2454 - case 53:  
2455 -#line 884 "parser.yxx"  
2456 - { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}  
2457 - break;  
2458 -  
2459 - case 54:  
2460 -#line 886 "parser.yxx"  
2461 - { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}  
2462 - break;  
2463 -  
2464 - case 55:  
2465 -#line 890 "parser.yxx"  
2466 - { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}  
2467 - break;  
2468 -  
2469 - case 56:  
2470 -#line 892 "parser.yxx"  
2471 - { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}  
2472 - break;  
2473 -  
2474 - case 59:  
2475 -#line 897 "parser.yxx"  
2476 - { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}  
2477 - break;  
2478 -  
2479 - case 60:  
2480 -#line 901 "parser.yxx"  
2481 - { (yyval.varSpec) = new FloatVarSpec((yyvsp[(1) - (1)].dValue),false); ;}  
2482 - break;  
2483 -  
2484 - case 61:  
2485 -#line 903 "parser.yxx"  
2486 - {  
2487 - int v = 0;  
2488 - ParserState* pp = static_cast<ParserState*>(parm);  
2489 - if (pp->floatvarTable.get((yyvsp[(1) - (1)].sValue), v))  
2490 - (yyval.varSpec) = new FloatVarSpec(Alias(v),false);  
2491 - else {  
2492 - pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)  
2493 - << " in line no. "  
2494 - << yyget_lineno(pp->yyscanner) << std::endl;  
2495 - pp->hadError = true;  
2496 - (yyval.varSpec) = new FloatVarSpec(0.0,false);  
2497 - }  
2498 - free((yyvsp[(1) - (1)].sValue));  
2499 - ;}  
2500 - break;  
2501 -  
2502 - case 62:  
2503 -#line 918 "parser.yxx"  
2504 - {  
2505 - vector<int> v;  
2506 - ParserState* pp = static_cast<ParserState*>(parm);  
2507 - if (pp->floatvararrays.get((yyvsp[(1) - (4)].sValue), v)) {  
2508 - yyassert(pp,static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) > 0 &&  
2509 - static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) <= v.size(),  
2510 - "array access out of bounds");  
2511 - if (!pp->hadError)  
2512 - (yyval.varSpec) = new FloatVarSpec(Alias(v[(yyvsp[(3) - (4)].iValue)-1]),false);  
2513 - else  
2514 - (yyval.varSpec) = new FloatVarSpec(0.0,false);  
2515 - } else {  
2516 - pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)  
2517 - << " in line no. "  
2518 - << yyget_lineno(pp->yyscanner) << std::endl;  
2519 - pp->hadError = true;  
2520 - (yyval.varSpec) = new FloatVarSpec(0.0,false);  
2521 - }  
2522 - free((yyvsp[(1) - (4)].sValue));  
2523 - ;}  
2524 - break;  
2525 -  
2526 - case 63:  
2527 -#line 941 "parser.yxx"  
2528 - { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}  
2529 - break;  
2530 -  
2531 - case 64:  
2532 -#line 943 "parser.yxx"  
2533 - { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}  
2534 - break;  
2535 -  
2536 - case 65:  
2537 -#line 947 "parser.yxx"  
2538 - { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}  
2539 - break;  
2540 -  
2541 - case 66:  
2542 -#line 949 "parser.yxx"  
2543 - { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}  
2544 - break;  
2545 -  
2546 - case 67:  
2547 -#line 953 "parser.yxx"  
2548 - { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}  
2549 - break;  
2550 -  
2551 - case 68:  
2552 -#line 957 "parser.yxx"  
2553 - { (yyval.varSpec) = new BoolVarSpec((yyvsp[(1) - (1)].iValue),false); ;}  
2554 - break;  
2555 -  
2556 - case 69:  
2557 -#line 959 "parser.yxx"  
2558 - {  
2559 - int v = 0;  
2560 - ParserState* pp = static_cast<ParserState*>(parm);  
2561 - if (pp->boolvarTable.get((yyvsp[(1) - (1)].sValue), v))  
2562 - (yyval.varSpec) = new BoolVarSpec(Alias(v),false);  
2563 - else {  
2564 - pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)  
2565 - << " in line no. "  
2566 - << yyget_lineno(pp->yyscanner) << std::endl;  
2567 - pp->hadError = true;  
2568 - (yyval.varSpec) = new BoolVarSpec(false,false);  
2569 - }  
2570 - free((yyvsp[(1) - (1)].sValue));  
2571 - ;}  
2572 - break;  
2573 -  
2574 - case 70:  
2575 -#line 974 "parser.yxx"  
2576 - {  
2577 - vector<int> v;  
2578 - ParserState* pp = static_cast<ParserState*>(parm);  
2579 - if (pp->boolvararrays.get((yyvsp[(1) - (4)].sValue), v)) {  
2580 - yyassert(pp,static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) > 0 &&  
2581 - static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) <= v.size(),  
2582 - "array access out of bounds");  
2583 - if (!pp->hadError)  
2584 - (yyval.varSpec) = new BoolVarSpec(Alias(v[(yyvsp[(3) - (4)].iValue)-1]),false);  
2585 - else  
2586 - (yyval.varSpec) = new BoolVarSpec(false,false);  
2587 - } else {  
2588 - pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)  
2589 - << " in line no. "  
2590 - << yyget_lineno(pp->yyscanner) << std::endl;  
2591 - pp->hadError = true;  
2592 - (yyval.varSpec) = new BoolVarSpec(false,false);  
2593 - }  
2594 - free((yyvsp[(1) - (4)].sValue));  
2595 - ;}  
2596 - break;  
2597 -  
2598 - case 71:  
2599 -#line 997 "parser.yxx"  
2600 - { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}  
2601 - break;  
2602 -  
2603 - case 72:  
2604 -#line 999 "parser.yxx"  
2605 - { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}  
2606 - break;  
2607 -  
2608 - case 73:  
2609 -#line 1003 "parser.yxx"  
2610 - { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}  
2611 - break;  
2612 -  
2613 - case 74:  
2614 -#line 1005 "parser.yxx"  
2615 - { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}  
2616 - break;  
2617 -  
2618 - case 75:  
2619 -#line 1007 "parser.yxx"  
2620 - { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}  
2621 - break;  
2622 -  
2623 - case 76:  
2624 -#line 1011 "parser.yxx"  
2625 - { (yyval.varSpec) = new SetVarSpec((yyvsp[(1) - (1)].setLit),false); ;}  
2626 - break;  
2627 -  
2628 - case 77:  
2629 -#line 1013 "parser.yxx"  
2630 - {  
2631 - ParserState* pp = static_cast<ParserState*>(parm);  
2632 - int v = 0;  
2633 - if (pp->setvarTable.get((yyvsp[(1) - (1)].sValue), v))  
2634 - (yyval.varSpec) = new SetVarSpec(Alias(v),false);  
2635 - else {  
2636 - pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)  
2637 - << " in line no. "  
2638 - << yyget_lineno(pp->yyscanner) << std::endl;  
2639 - pp->hadError = true;  
2640 - (yyval.varSpec) = new SetVarSpec(Alias(0),false);  
2641 - }  
2642 - free((yyvsp[(1) - (1)].sValue));  
2643 - ;}  
2644 - break;  
2645 -  
2646 - case 78:  
2647 -#line 1028 "parser.yxx"  
2648 - {  
2649 - vector<int> v;  
2650 - ParserState* pp = static_cast<ParserState*>(parm);  
2651 - if (pp->setvararrays.get((yyvsp[(1) - (4)].sValue), v)) {  
2652 - yyassert(pp,static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) > 0 &&  
2653 - static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) <= v.size(),  
2654 - "array access out of bounds");  
2655 - if (!pp->hadError)  
2656 - (yyval.varSpec) = new SetVarSpec(Alias(v[(yyvsp[(3) - (4)].iValue)-1]),false);  
2657 - else  
2658 - (yyval.varSpec) = new SetVarSpec(Alias(0),false);  
2659 - } else {  
2660 - pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)  
2661 - << " in line no. "  
2662 - << yyget_lineno(pp->yyscanner) << std::endl;  
2663 - pp->hadError = true;  
2664 - (yyval.varSpec) = new SetVarSpec(Alias(0),false);  
2665 - }  
2666 - free((yyvsp[(1) - (4)].sValue));  
2667 - ;}  
2668 - break;  
2669 -  
2670 - case 79:  
2671 -#line 1051 "parser.yxx"  
2672 - { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}  
2673 - break;  
2674 -  
2675 - case 80:  
2676 -#line 1053 "parser.yxx"  
2677 - { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}  
2678 - break;  
2679 -  
2680 - case 81:  
2681 -#line 1057 "parser.yxx"  
2682 - { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}  
2683 - break;  
2684 -  
2685 - case 82:  
2686 -#line 1059 "parser.yxx"  
2687 - { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}  
2688 - break;  
2689 -  
2690 - case 83:  
2691 -#line 1062 "parser.yxx"  
2692 - { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}  
2693 - break;  
2694 -  
2695 - case 84:  
2696 -#line 1066 "parser.yxx"  
2697 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}  
2698 - break;  
2699 -  
2700 - case 85:  
2701 -#line 1068 "parser.yxx"  
2702 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}  
2703 - break;  
2704 -  
2705 - case 86:  
2706 -#line 1072 "parser.yxx"  
2707 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}  
2708 - break;  
2709 -  
2710 - case 87:  
2711 -#line 1074 "parser.yxx"  
2712 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}  
2713 - break;  
2714 -  
2715 - case 88:  
2716 -#line 1078 "parser.yxx"  
2717 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}  
2718 - break;  
2719 -  
2720 - case 89:  
2721 -#line 1080 "parser.yxx"  
2722 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}  
2723 - break;  
2724 -  
2725 - case 90:  
2726 -#line 1084 "parser.yxx"  
2727 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}  
2728 - break;  
2729 -  
2730 - case 91:  
2731 -#line 1086 "parser.yxx"  
2732 - { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}  
2733 - break;  
2734 -  
2735 - case 92:  
2736 -#line 1090 "parser.yxx"  
2737 - {  
2738 - ConExpr c((yyvsp[(2) - (6)].sValue), (yyvsp[(4) - (6)].argVec));  
2739 - ParserState *pp = static_cast<ParserState*>(parm);  
2740 - if (!pp->hadError) {  
2741 - try {  
2742 - pp->fg->postConstraint(c, (yyvsp[(6) - (6)].argVec));  
2743 - } catch (FlatZinc::Error& e) {  
2744 - yyerror(pp, e.toString().c_str());  
2745 - }  
2746 - }  
2747 - delete (yyvsp[(6) - (6)].argVec); free((yyvsp[(2) - (6)].sValue));  
2748 - ;}  
2749 - break;  
2750 -  
2751 - case 93:  
2752 -#line 1104 "parser.yxx"  
2753 - {  
2754 - ParserState *pp = static_cast<ParserState*>(parm);  
2755 - if (!pp->hadError) {  
2756 - try {  
2757 - pp->fg->solve((yyvsp[(2) - (3)].argVec));  
2758 - } catch (FlatZinc::Error& e) {  
2759 - yyerror(pp, e.toString().c_str());  
2760 - }  
2761 - } else {  
2762 - delete (yyvsp[(2) - (3)].argVec);  
2763 - }  
2764 - ;}  
2765 - break;  
2766 -  
2767 - case 94:  
2768 -#line 1117 "parser.yxx"  
2769 - {  
2770 - ParserState *pp = static_cast<ParserState*>(parm);  
2771 - if (!pp->hadError) {  
2772 - try {  
2773 - if ((yyvsp[(3) - (4)].bValue))  
2774 - pp->fg->minimize((yyvsp[(4) - (4)].iValue),(yyvsp[(2) - (4)].argVec));  
2775 - else  
2776 - pp->fg->maximize((yyvsp[(4) - (4)].iValue),(yyvsp[(2) - (4)].argVec));  
2777 - } catch (FlatZinc::Error& e) {  
2778 - yyerror(pp, e.toString().c_str());  
2779 - }  
2780 - } else {  
2781 - delete (yyvsp[(2) - (4)].argVec);  
2782 - }  
2783 - ;}  
2784 - break;  
2785 -  
2786 - case 95:  
2787 -#line 1139 "parser.yxx"  
2788 - { (yyval.oSet) = Option<AST::SetLit* >::none(); ;}  
2789 - break;  
2790 -  
2791 - case 96:  
2792 -#line 1141 "parser.yxx"  
2793 - { (yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit(*(yyvsp[(2) - (3)].setValue))); ;}  
2794 - break;  
2795 -  
2796 - case 97:  
2797 -#line 1143 "parser.yxx"  
2798 - {  
2799 - (yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit((yyvsp[(1) - (3)].iValue), (yyvsp[(3) - (3)].iValue)));  
2800 - ;}  
2801 - break;  
2802 -  
2803 - case 98:  
2804 -#line 1149 "parser.yxx"  
2805 - { (yyval.oSet) = Option<AST::SetLit* >::none(); ;}  
2806 - break;  
2807 -  
2808 - case 99:  
2809 -#line 1151 "parser.yxx"  
2810 - { bool haveTrue = false;  
2811 - bool haveFalse = false;  
2812 - for (int i=(yyvsp[(2) - (4)].setValue)->size(); i--;) {  
2813 - haveTrue |= ((*(yyvsp[(2) - (4)].setValue))[i] == 1);  
2814 - haveFalse |= ((*(yyvsp[(2) - (4)].setValue))[i] == 0);  
2815 - }  
2816 - delete (yyvsp[(2) - (4)].setValue);  
2817 - (yyval.oSet) = Option<AST::SetLit* >::some(  
2818 - new AST::SetLit(!haveFalse,haveTrue));  
2819 - ;}  
2820 - break;  
2821 -  
2822 - case 102:  
2823 -#line 1172 "parser.yxx"  
2824 - { (yyval.setLit) = new AST::SetLit(*(yyvsp[(2) - (3)].setValue)); ;}  
2825 - break;  
2826 -  
2827 - case 103:  
2828 -#line 1174 "parser.yxx"  
2829 - { (yyval.setLit) = new AST::SetLit((yyvsp[(1) - (3)].iValue), (yyvsp[(3) - (3)].iValue)); ;}  
2830 - break;  
2831 -  
2832 - case 104:  
2833 -#line 1180 "parser.yxx"  
2834 - { (yyval.setValue) = new vector<int>(0); ;}  
2835 - break;  
2836 -  
2837 - case 105:  
2838 -#line 1182 "parser.yxx"  
2839 - { (yyval.setValue) = (yyvsp[(1) - (2)].setValue); ;}  
2840 - break;  
2841 -  
2842 - case 106:  
2843 -#line 1186 "parser.yxx"  
2844 - { (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[(1) - (1)].iValue); ;}  
2845 - break;  
2846 -  
2847 - case 107:  
2848 -#line 1188 "parser.yxx"  
2849 - { (yyval.setValue) = (yyvsp[(1) - (3)].setValue); (yyval.setValue)->push_back((yyvsp[(3) - (3)].iValue)); ;}  
2850 - break;  
2851 -  
2852 - case 108:  
2853 -#line 1192 "parser.yxx"  
2854 - { (yyval.setValue) = new vector<int>(0); ;}  
2855 - break;  
2856 -  
2857 - case 109:  
2858 -#line 1194 "parser.yxx"  
2859 - { (yyval.setValue) = (yyvsp[(1) - (2)].setValue); ;}  
2860 - break;  
2861 -  
2862 - case 110:  
2863 -#line 1198 "parser.yxx"  
2864 - { (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[(1) - (1)].iValue); ;}  
2865 - break;  
2866 -  
2867 - case 111:  
2868 -#line 1200 "parser.yxx"  
2869 - { (yyval.setValue) = (yyvsp[(1) - (3)].setValue); (yyval.setValue)->push_back((yyvsp[(3) - (3)].iValue)); ;}  
2870 - break;  
2871 -  
2872 - case 112:  
2873 -#line 1204 "parser.yxx"  
2874 - { (yyval.floatSetValue) = new vector<double>(0); ;}  
2875 - break;  
2876 -  
2877 - case 113:  
2878 -#line 1206 "parser.yxx"  
2879 - { (yyval.floatSetValue) = (yyvsp[(1) - (2)].floatSetValue); ;}  
2880 - break;  
2881 -  
2882 - case 114:  
2883 -#line 1210 "parser.yxx"  
2884 - { (yyval.floatSetValue) = new vector<double>(1); (*(yyval.floatSetValue))[0] = (yyvsp[(1) - (1)].dValue); ;}  
2885 - break;  
2886 -  
2887 - case 115:  
2888 -#line 1212 "parser.yxx"  
2889 - { (yyval.floatSetValue) = (yyvsp[(1) - (3)].floatSetValue); (yyval.floatSetValue)->push_back((yyvsp[(3) - (3)].dValue)); ;}  
2890 - break;  
2891 -  
2892 - case 116:  
2893 -#line 1216 "parser.yxx"  
2894 - { (yyval.setValueList) = new vector<AST::SetLit>(0); ;}  
2895 - break;  
2896 -  
2897 - case 117:  
2898 -#line 1218 "parser.yxx"  
2899 - { (yyval.setValueList) = (yyvsp[(1) - (2)].setValueList); ;}  
2900 - break;  
2901 -  
2902 - case 118:  
2903 -#line 1222 "parser.yxx"  
2904 - { (yyval.setValueList) = new vector<AST::SetLit>(1); (*(yyval.setValueList))[0] = *(yyvsp[(1) - (1)].setLit); delete (yyvsp[(1) - (1)].setLit); ;}  
2905 - break;  
2906 -  
2907 - case 119:  
2908 -#line 1224 "parser.yxx"  
2909 - { (yyval.setValueList) = (yyvsp[(1) - (3)].setValueList); (yyval.setValueList)->push_back(*(yyvsp[(3) - (3)].setLit)); delete (yyvsp[(3) - (3)].setLit); ;}  
2910 - break;  
2911 -  
2912 - case 120:  
2913 -#line 1232 "parser.yxx"  
2914 - { (yyval.argVec) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}  
2915 - break;  
2916 -  
2917 - case 121:  
2918 -#line 1234 "parser.yxx"  
2919 - { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}  
2920 - break;  
2921 -  
2922 - case 122:  
2923 -#line 1238 "parser.yxx"  
2924 - { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}  
2925 - break;  
2926 -  
2927 - case 123:  
2928 -#line 1240 "parser.yxx"  
2929 - { (yyval.arg) = (yyvsp[(2) - (3)].argVec); ;}  
2930 - break;  
2931 -  
2932 - case 124:  
2933 -#line 1244 "parser.yxx"  
2934 - { (yyval.oArg) = Option<AST::Node*>::none(); ;}  
2935 - break;  
2936 -  
2937 - case 125:  
2938 -#line 1246 "parser.yxx"  
2939 - { (yyval.oArg) = Option<AST::Node*>::some((yyvsp[(2) - (2)].arg)); ;}  
2940 - break;  
2941 -  
2942 - case 126:  
2943 -#line 1250 "parser.yxx"  
2944 - { (yyval.arg) = new AST::BoolLit((yyvsp[(1) - (1)].iValue)); ;}  
2945 - break;  
2946 -  
2947 - case 127:  
2948 -#line 1252 "parser.yxx"  
2949 - { (yyval.arg) = new AST::IntLit((yyvsp[(1) - (1)].iValue)); ;}  
2950 - break;  
2951 -  
2952 - case 128:  
2953 -#line 1254 "parser.yxx"  
2954 - { (yyval.arg) = new AST::FloatLit((yyvsp[(1) - (1)].dValue)); ;}  
2955 - break;  
2956 -  
2957 - case 129:  
2958 -#line 1256 "parser.yxx"  
2959 - { (yyval.arg) = (yyvsp[(1) - (1)].setLit); ;}  
2960 - break;  
2961 -  
2962 - case 130:  
2963 -#line 1258 "parser.yxx"  
2964 - {  
2965 - vector<int> as;  
2966 - ParserState* pp = static_cast<ParserState*>(parm);  
2967 - if (pp->intvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
2968 - AST::Array *ia = new AST::Array(as.size());  
2969 - for (int i=as.size(); i--;)  
2970 - ia->a[i] = new AST::IntVar(as[i]);  
2971 - (yyval.arg) = ia;  
2972 - } else if (pp->boolvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
2973 - AST::Array *ia = new AST::Array(as.size());  
2974 - for (int i=as.size(); i--;)  
2975 - ia->a[i] = new AST::BoolVar(as[i]);  
2976 - (yyval.arg) = ia;  
2977 - } else if (pp->setvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
2978 - AST::Array *ia = new AST::Array(as.size());  
2979 - for (int i=as.size(); i--;)  
2980 - ia->a[i] = new AST::SetVar(as[i]);  
2981 - (yyval.arg) = ia;  
2982 - } else {  
2983 - std::vector<int> is;  
2984 - std::vector<AST::SetLit> isS;  
2985 - int ival = 0;  
2986 - bool bval = false;  
2987 - if (pp->intvalarrays.get((yyvsp[(1) - (1)].sValue), is)) {  
2988 - AST::Array *v = new AST::Array(is.size());  
2989 - for (int i=is.size(); i--;)  
2990 - v->a[i] = new AST::IntLit(is[i]);  
2991 - (yyval.arg) = v;  
2992 - } else if (pp->boolvalarrays.get((yyvsp[(1) - (1)].sValue), is)) {  
2993 - AST::Array *v = new AST::Array(is.size());  
2994 - for (int i=is.size(); i--;)  
2995 - v->a[i] = new AST::BoolLit(is[i]);  
2996 - (yyval.arg) = v;  
2997 - } else if (pp->setvalarrays.get((yyvsp[(1) - (1)].sValue), isS)) {  
2998 - AST::Array *v = new AST::Array(isS.size());  
2999 - for (int i=isS.size(); i--;)  
3000 - v->a[i] = new AST::SetLit(isS[i]);  
3001 - (yyval.arg) = v;  
3002 - } else if (pp->intvals.get((yyvsp[(1) - (1)].sValue), ival)) {  
3003 - (yyval.arg) = new AST::IntLit(ival);  
3004 - } else if (pp->boolvals.get((yyvsp[(1) - (1)].sValue), bval)) {  
3005 - (yyval.arg) = new AST::BoolLit(bval);  
3006 - } else {  
3007 - (yyval.arg) = getVarRefArg(pp,(yyvsp[(1) - (1)].sValue));  
3008 - }  
3009 - }  
3010 - free((yyvsp[(1) - (1)].sValue));  
3011 - ;}  
3012 - break;  
3013 -  
3014 - case 131:  
3015 -#line 1307 "parser.yxx"  
3016 - {  
3017 - ParserState* pp = static_cast<ParserState*>(parm);  
3018 - int i = -1;  
3019 - yyassert(pp, (yyvsp[(3) - (4)].arg)->isInt(i), "Non-integer array index.");  
3020 - if (!pp->hadError)  
3021 - (yyval.arg) = getArrayElement(static_cast<ParserState*>(parm),(yyvsp[(1) - (4)].sValue),i);  
3022 - else  
3023 - (yyval.arg) = new AST::IntLit(0); // keep things consistent  
3024 - free((yyvsp[(1) - (4)].sValue));  
3025 - ;}  
3026 - break;  
3027 -  
3028 - case 132:  
3029 -#line 1320 "parser.yxx"  
3030 - { (yyval.argVec) = new AST::Array(0); ;}  
3031 - break;  
3032 -  
3033 - case 133:  
3034 -#line 1322 "parser.yxx"  
3035 - { (yyval.argVec) = (yyvsp[(1) - (2)].argVec); ;}  
3036 - break;  
3037 -  
3038 - case 134:  
3039 -#line 1326 "parser.yxx"  
3040 - { (yyval.argVec) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}  
3041 - break;  
3042 -  
3043 - case 135:  
3044 -#line 1328 "parser.yxx"  
3045 - { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}  
3046 - break;  
3047 -  
3048 - case 136:  
3049 -#line 1336 "parser.yxx"  
3050 - {  
3051 - ParserState *pp = static_cast<ParserState*>(parm);  
3052 - if (!pp->intvarTable.get((yyvsp[(1) - (1)].sValue), (yyval.iValue))) {  
3053 - pp->err << "Error: unknown integer variable " << (yyvsp[(1) - (1)].sValue)  
3054 - << " in line no. "  
3055 - << yyget_lineno(pp->yyscanner) << std::endl;  
3056 - pp->hadError = true;  
3057 - }  
3058 - free((yyvsp[(1) - (1)].sValue));  
3059 - ;}  
3060 - break;  
3061 -  
3062 - case 137:  
3063 -#line 1347 "parser.yxx"  
3064 - {  
3065 - vector<int> tmp;  
3066 - ParserState *pp = static_cast<ParserState*>(parm);  
3067 - if (!pp->intvararrays.get((yyvsp[(1) - (4)].sValue), tmp)) {  
3068 - pp->err << "Error: unknown integer variable array " << (yyvsp[(1) - (4)].sValue)  
3069 - << " in line no. "  
3070 - << yyget_lineno(pp->yyscanner) << std::endl;  
3071 - pp->hadError = true;  
3072 - }  
3073 - if ((yyvsp[(3) - (4)].iValue) == 0 || static_cast<unsigned int>((yyvsp[(3) - (4)].iValue)) > tmp.size()) {  
3074 - pp->err << "Error: array index out of bounds for array " << (yyvsp[(1) - (4)].sValue)  
3075 - << " in line no. "  
3076 - << yyget_lineno(pp->yyscanner) << std::endl;  
3077 - pp->hadError = true;  
3078 - } else {  
3079 - (yyval.iValue) = tmp[(yyvsp[(3) - (4)].iValue)-1];  
3080 - }  
3081 - free((yyvsp[(1) - (4)].sValue));  
3082 - ;}  
3083 - break;  
3084 -  
3085 - case 140:  
3086 -#line 1377 "parser.yxx"  
3087 - { (yyval.argVec) = NULL; ;}  
3088 - break;  
3089 -  
3090 - case 141:  
3091 -#line 1379 "parser.yxx"  
3092 - { (yyval.argVec) = (yyvsp[(1) - (1)].argVec); ;}  
3093 - break;  
3094 -  
3095 - case 142:  
3096 -#line 1383 "parser.yxx"  
3097 - { (yyval.argVec) = new AST::Array((yyvsp[(2) - (2)].arg)); ;}  
3098 - break;  
3099 -  
3100 - case 143:  
3101 -#line 1385 "parser.yxx"  
3102 - { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}  
3103 - break;  
3104 -  
3105 - case 144:  
3106 -#line 1389 "parser.yxx"  
3107 - {  
3108 - (yyval.arg) = new AST::Call((yyvsp[(1) - (4)].sValue), AST::extractSingleton((yyvsp[(3) - (4)].arg))); free((yyvsp[(1) - (4)].sValue));  
3109 - ;}  
3110 - break;  
3111 -  
3112 - case 145:  
3113 -#line 1393 "parser.yxx"  
3114 - { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}  
3115 - break;  
3116 -  
3117 - case 146:  
3118 -#line 1397 "parser.yxx"  
3119 - { (yyval.arg) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}  
3120 - break;  
3121 -  
3122 - case 147:  
3123 -#line 1399 "parser.yxx"  
3124 - { (yyval.arg) = (yyvsp[(1) - (3)].arg); (yyval.arg)->append((yyvsp[(3) - (3)].arg)); ;}  
3125 - break;  
3126 -  
3127 - case 148:  
3128 -#line 1403 "parser.yxx"  
3129 - { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}  
3130 - break;  
3131 -  
3132 - case 149:  
3133 -#line 1405 "parser.yxx"  
3134 - { (yyval.arg) = (yyvsp[(2) - (3)].arg); ;}  
3135 - break;  
3136 -  
3137 - case 150:  
3138 -#line 1409 "parser.yxx"  
3139 - { (yyval.arg) = new AST::BoolLit((yyvsp[(1) - (1)].iValue)); ;}  
3140 - break;  
3141 -  
3142 - case 151:  
3143 -#line 1411 "parser.yxx"  
3144 - { (yyval.arg) = new AST::IntLit((yyvsp[(1) - (1)].iValue)); ;}  
3145 - break;  
3146 -  
3147 - case 152:  
3148 -#line 1413 "parser.yxx"  
3149 - { (yyval.arg) = new AST::FloatLit((yyvsp[(1) - (1)].dValue)); ;}  
3150 - break;  
3151 -  
3152 - case 153:  
3153 -#line 1415 "parser.yxx"  
3154 - { (yyval.arg) = (yyvsp[(1) - (1)].setLit); ;}  
3155 - break;  
3156 -  
3157 - case 154:  
3158 -#line 1417 "parser.yxx"  
3159 - {  
3160 - vector<int> as;  
3161 - ParserState* pp = static_cast<ParserState*>(parm);  
3162 - if (pp->intvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
3163 - AST::Array *ia = new AST::Array(as.size());  
3164 - for (int i=as.size(); i--;)  
3165 - ia->a[i] = new AST::IntVar(as[i]);  
3166 - (yyval.arg) = ia;  
3167 - } else if (pp->boolvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
3168 - AST::Array *ia = new AST::Array(as.size());  
3169 - for (int i=as.size(); i--;)  
3170 - ia->a[i] = new AST::BoolVar(as[i]);  
3171 - (yyval.arg) = ia;  
3172 - } else if (pp->setvararrays.get((yyvsp[(1) - (1)].sValue), as)) {  
3173 - AST::Array *ia = new AST::Array(as.size());  
3174 - for (int i=as.size(); i--;)  
3175 - ia->a[i] = new AST::SetVar(as[i]);  
3176 - (yyval.arg) = ia;  
3177 - } else {  
3178 - std::vector<int> is;  
3179 - int ival = 0;  
3180 - bool bval = false;  
3181 - if (pp->intvalarrays.get((yyvsp[(1) - (1)].sValue), is)) {  
3182 - AST::Array *v = new AST::Array(is.size());  
3183 - for (int i=is.size(); i--;)  
3184 - v->a[i] = new AST::IntLit(is[i]);  
3185 - (yyval.arg) = v;  
3186 - } else if (pp->boolvalarrays.get((yyvsp[(1) - (1)].sValue), is)) {  
3187 - AST::Array *v = new AST::Array(is.size());  
3188 - for (int i=is.size(); i--;)  
3189 - v->a[i] = new AST::BoolLit(is[i]);  
3190 - (yyval.arg) = v;  
3191 - } else if (pp->intvals.get((yyvsp[(1) - (1)].sValue), ival)) {  
3192 - (yyval.arg) = new AST::IntLit(ival);  
3193 - } else if (pp->boolvals.get((yyvsp[(1) - (1)].sValue), bval)) {  
3194 - (yyval.arg) = new AST::BoolLit(bval);  
3195 - } else {  
3196 - (yyval.arg) = getVarRefArg(pp,(yyvsp[(1) - (1)].sValue),true);  
3197 - }  
3198 - }  
3199 - free((yyvsp[(1) - (1)].sValue));  
3200 - ;}  
3201 - break;  
3202 -  
3203 - case 155:  
3204 -#line 1460 "parser.yxx"  
3205 - {  
3206 - ParserState* pp = static_cast<ParserState*>(parm);  
3207 - int i = -1;  
3208 - yyassert(pp, (yyvsp[(3) - (4)].arg)->isInt(i), "Non-integer array index.");  
3209 - if (!pp->hadError)  
3210 - (yyval.arg) = getArrayElement(static_cast<ParserState*>(parm),(yyvsp[(1) - (4)].sValue),i);  
3211 - else  
3212 - (yyval.arg) = new AST::IntLit(0); // keep things consistent  
3213 - free((yyvsp[(1) - (4)].sValue));  
3214 - ;}  
3215 - break;  
3216 -  
3217 - case 156:  
3218 -#line 1471 "parser.yxx"  
3219 - {  
3220 - (yyval.arg) = new AST::String((yyvsp[(1) - (1)].sValue));  
3221 - free((yyvsp[(1) - (1)].sValue));  
3222 - ;}  
3223 - break;  
3224 -  
3225 -  
3226 -/* Line 1267 of yacc.c. */  
3227 -#line 3228 "parser.tab.cpp"  
3228 - default: break;  
3229 - }  
3230 - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);  
3231 -  
3232 - YYPOPSTACK (yylen);  
3233 - yylen = 0;  
3234 - YY_STACK_PRINT (yyss, yyssp);  
3235 -  
3236 - *++yyvsp = yyval;  
3237 -  
3238 -  
3239 - /* Now `shift' the result of the reduction. Determine what state  
3240 - that goes to, based on the state we popped back to and the rule  
3241 - number reduced by. */  
3242 -  
3243 - yyn = yyr1[yyn];  
3244 -  
3245 - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;  
3246 - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)  
3247 - yystate = yytable[yystate];  
3248 - else  
3249 - yystate = yydefgoto[yyn - YYNTOKENS];  
3250 -  
3251 - goto yynewstate;  
3252 -  
3253 -  
3254 -/*------------------------------------.  
3255 -| yyerrlab -- here on detecting error |  
3256 -`------------------------------------*/  
3257 -yyerrlab:  
3258 - /* If not already recovering from an error, report this error. */  
3259 - if (!yyerrstatus)  
3260 - {  
3261 - ++yynerrs;  
3262 -#if ! YYERROR_VERBOSE  
3263 - yyerror (parm, YY_("syntax error"));  
3264 -#else  
3265 - {  
3266 - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);  
3267 - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)  
3268 - {  
3269 - YYSIZE_T yyalloc = 2 * yysize;  
3270 - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))  
3271 - yyalloc = YYSTACK_ALLOC_MAXIMUM;  
3272 - if (yymsg != yymsgbuf)  
3273 - YYSTACK_FREE (yymsg);  
3274 - yymsg = (char *) YYSTACK_ALLOC (yyalloc);  
3275 - if (yymsg)  
3276 - yymsg_alloc = yyalloc;  
3277 - else  
3278 - {  
3279 - yymsg = yymsgbuf;  
3280 - yymsg_alloc = sizeof yymsgbuf;  
3281 - }  
3282 - }  
3283 -  
3284 - if (0 < yysize && yysize <= yymsg_alloc)  
3285 - {  
3286 - (void) yysyntax_error (yymsg, yystate, yychar);  
3287 - yyerror (parm, yymsg);  
3288 - }  
3289 - else  
3290 - {  
3291 - yyerror (parm, YY_("syntax error"));  
3292 - if (yysize != 0)  
3293 - goto yyexhaustedlab;  
3294 - }  
3295 - }  
3296 -#endif  
3297 - }  
3298 -  
3299 -  
3300 -  
3301 - if (yyerrstatus == 3)  
3302 - {  
3303 - /* If just tried and failed to reuse look-ahead token after an  
3304 - error, discard it. */  
3305 -  
3306 - if (yychar <= YYEOF)  
3307 - {  
3308 - /* Return failure if at end of input. */  
3309 - if (yychar == YYEOF)  
3310 - YYABORT;  
3311 - }  
3312 - else  
3313 - {  
3314 - yydestruct ("Error: discarding",  
3315 - yytoken, &yylval, parm);  
3316 - yychar = YYEMPTY;  
3317 - }  
3318 - }  
3319 -  
3320 - /* Else will try to reuse look-ahead token after shifting the error  
3321 - token. */  
3322 - goto yyerrlab1;  
3323 -  
3324 -  
3325 -/*---------------------------------------------------.  
3326 -| yyerrorlab -- error raised explicitly by YYERROR. |  
3327 -`---------------------------------------------------*/  
3328 -yyerrorlab:  
3329 -  
3330 - /* Pacify compilers like GCC when the user code never invokes  
3331 - YYERROR and the label yyerrorlab therefore never appears in user  
3332 - code. */  
3333 - if (/*CONSTCOND*/ 0)  
3334 - goto yyerrorlab;  
3335 -  
3336 - /* Do not reclaim the symbols of the rule which action triggered  
3337 - this YYERROR. */  
3338 - YYPOPSTACK (yylen);  
3339 - yylen = 0;  
3340 - YY_STACK_PRINT (yyss, yyssp);  
3341 - yystate = *yyssp;  
3342 - goto yyerrlab1;  
3343 -  
3344 -  
3345 -/*-------------------------------------------------------------.  
3346 -| yyerrlab1 -- common code for both syntax error and YYERROR. |  
3347 -`-------------------------------------------------------------*/  
3348 -yyerrlab1:  
3349 - yyerrstatus = 3; /* Each real token shifted decrements this. */  
3350 -  
3351 - for (;;)  
3352 - {  
3353 - yyn = yypact[yystate];  
3354 - if (yyn != YYPACT_NINF)  
3355 - {  
3356 - yyn += YYTERROR;  
3357 - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)  
3358 - {  
3359 - yyn = yytable[yyn];  
3360 - if (0 < yyn)  
3361 - break;  
3362 - }  
3363 - }  
3364 -  
3365 - /* Pop the current state because it cannot handle the error token. */  
3366 - if (yyssp == yyss)  
3367 - YYABORT;  
3368 -  
3369 -  
3370 - yydestruct ("Error: popping",  
3371 - yystos[yystate], yyvsp, parm);  
3372 - YYPOPSTACK (1);  
3373 - yystate = *yyssp;  
3374 - YY_STACK_PRINT (yyss, yyssp);  
3375 - }  
3376 -  
3377 - if (yyn == YYFINAL)  
3378 - YYACCEPT;  
3379 -  
3380 - *++yyvsp = yylval;  
3381 -  
3382 -  
3383 - /* Shift the error token. */  
3384 - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);  
3385 -  
3386 - yystate = yyn;  
3387 - goto yynewstate;  
3388 -  
3389 -  
3390 -/*-------------------------------------.  
3391 -| yyacceptlab -- YYACCEPT comes here. |  
3392 -`-------------------------------------*/  
3393 -yyacceptlab:  
3394 - yyresult = 0;  
3395 - goto yyreturn;  
3396 -  
3397 -/*-----------------------------------.  
3398 -| yyabortlab -- YYABORT comes here. |  
3399 -`-----------------------------------*/  
3400 -yyabortlab:  
3401 - yyresult = 1;  
3402 - goto yyreturn;  
3403 -  
3404 -#ifndef yyoverflow  
3405 -/*-------------------------------------------------.  
3406 -| yyexhaustedlab -- memory exhaustion comes here. |  
3407 -`-------------------------------------------------*/  
3408 -yyexhaustedlab:  
3409 - yyerror (parm, YY_("memory exhausted"));  
3410 - yyresult = 2;  
3411 - /* Fall through. */  
3412 -#endif  
3413 -  
3414 -yyreturn:  
3415 - if (yychar != YYEOF && yychar != YYEMPTY)  
3416 - yydestruct ("Cleanup: discarding lookahead",  
3417 - yytoken, &yylval, parm);  
3418 - /* Do not reclaim the symbols of the rule which action triggered  
3419 - this YYABORT or YYACCEPT. */  
3420 - YYPOPSTACK (yylen);  
3421 - YY_STACK_PRINT (yyss, yyssp);  
3422 - while (yyssp != yyss)  
3423 - {  
3424 - yydestruct ("Cleanup: popping",  
3425 - yystos[*yyssp], yyvsp, parm);  
3426 - YYPOPSTACK (1);  
3427 - }  
3428 -#ifndef yyoverflow  
3429 - if (yyss != yyssa)  
3430 - YYSTACK_FREE (yyss);  
3431 -#endif  
3432 -#if YYERROR_VERBOSE  
3433 - if (yymsg != yymsgbuf)  
3434 - YYSTACK_FREE (yymsg);  
3435 -#endif  
3436 - /* Make sure YYID is used. */  
3437 - return YYID (yyresult);  
3438 -}  
3439 -  
3440 -  
3441 -  
fz/parser.tab.hh
@@ -1,164 +0,0 @@ @@ -1,164 +0,0 @@
1 -/* A Bison parser, made by GNU Bison 2.3. */  
2 -  
3 -/* Skeleton interface for Bison's Yacc-like parsers in C  
4 -  
5 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006  
6 - Free Software Foundation, Inc.  
7 -  
8 - This program is free software; you can redistribute it and/or modify  
9 - it under the terms of the GNU General Public License as published by  
10 - the Free Software Foundation; either version 2, or (at your option)  
11 - any later version.  
12 -  
13 - This program is distributed in the hope that it will be useful,  
14 - but WITHOUT ANY WARRANTY; without even the implied warranty of  
15 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
16 - GNU General Public License for more details.  
17 -  
18 - You should have received a copy of the GNU General Public License  
19 - along with this program; if not, write to the Free Software  
20 - Foundation, Inc., 51 Franklin Street, Fifth Floor,  
21 - Boston, MA 02110-1301, USA. */  
22 -  
23 -/* As a special exception, you may create a larger work that contains  
24 - part or all of the Bison parser skeleton and distribute that work  
25 - under terms of your choice, so long as that work isn't itself a  
26 - parser generator using the skeleton or a modified version thereof  
27 - as a parser skeleton. Alternatively, if you modify or redistribute  
28 - the parser skeleton itself, you may (at your option) remove this  
29 - special exception, which will cause the skeleton and the resulting  
30 - Bison output files to be licensed under the GNU General Public  
31 - License without this special exception.  
32 -  
33 - This special exception was added by the Free Software Foundation in  
34 - version 2.2 of Bison. */  
35 -  
36 -/* Tokens. */  
37 -#ifndef YYTOKENTYPE  
38 -# define YYTOKENTYPE  
39 - /* Put the tokens into the symbol table, so that GDB and other debuggers  
40 - know about them. */  
41 - enum yytokentype {  
42 - FZ_INT_LIT = 258,  
43 - FZ_BOOL_LIT = 259,  
44 - FZ_FLOAT_LIT = 260,  
45 - FZ_ID = 261,  
46 - FZ_U_ID = 262,  
47 - FZ_STRING_LIT = 263,  
48 - FZ_VAR = 264,  
49 - FZ_PAR = 265,  
50 - FZ_ANNOTATION = 266,  
51 - FZ_ANY = 267,  
52 - FZ_ARRAY = 268,  
53 - FZ_BOOL = 269,  
54 - FZ_CASE = 270,  
55 - FZ_COLONCOLON = 271,  
56 - FZ_CONSTRAINT = 272,  
57 - FZ_DEFAULT = 273,  
58 - FZ_DOTDOT = 274,  
59 - FZ_ELSE = 275,  
60 - FZ_ELSEIF = 276,  
61 - FZ_ENDIF = 277,  
62 - FZ_ENUM = 278,  
63 - FZ_FLOAT = 279,  
64 - FZ_FUNCTION = 280,  
65 - FZ_IF = 281,  
66 - FZ_INCLUDE = 282,  
67 - FZ_INT = 283,  
68 - FZ_LET = 284,  
69 - FZ_MAXIMIZE = 285,  
70 - FZ_MINIMIZE = 286,  
71 - FZ_OF = 287,  
72 - FZ_SATISFY = 288,  
73 - FZ_OUTPUT = 289,  
74 - FZ_PREDICATE = 290,  
75 - FZ_RECORD = 291,  
76 - FZ_SET = 292,  
77 - FZ_SHOW = 293,  
78 - FZ_SHOWCOND = 294,  
79 - FZ_SOLVE = 295,  
80 - FZ_STRING = 296,  
81 - FZ_TEST = 297,  
82 - FZ_THEN = 298,  
83 - FZ_TUPLE = 299,  
84 - FZ_TYPE = 300,  
85 - FZ_VARIANT_RECORD = 301,  
86 - FZ_WHERE = 302  
87 - };  
88 -#endif  
89 -/* Tokens. */  
90 -#define FZ_INT_LIT 258  
91 -#define FZ_BOOL_LIT 259  
92 -#define FZ_FLOAT_LIT 260  
93 -#define FZ_ID 261  
94 -#define FZ_U_ID 262  
95 -#define FZ_STRING_LIT 263  
96 -#define FZ_VAR 264  
97 -#define FZ_PAR 265  
98 -#define FZ_ANNOTATION 266  
99 -#define FZ_ANY 267  
100 -#define FZ_ARRAY 268  
101 -#define FZ_BOOL 269  
102 -#define FZ_CASE 270  
103 -#define FZ_COLONCOLON 271  
104 -#define FZ_CONSTRAINT 272  
105 -#define FZ_DEFAULT 273  
106 -#define FZ_DOTDOT 274  
107 -#define FZ_ELSE 275  
108 -#define FZ_ELSEIF 276  
109 -#define FZ_ENDIF 277  
110 -#define FZ_ENUM 278  
111 -#define FZ_FLOAT 279  
112 -#define FZ_FUNCTION 280  
113 -#define FZ_IF 281  
114 -#define FZ_INCLUDE 282  
115 -#define FZ_INT 283  
116 -#define FZ_LET 284  
117 -#define FZ_MAXIMIZE 285  
118 -#define FZ_MINIMIZE 286  
119 -#define FZ_OF 287  
120 -#define FZ_SATISFY 288  
121 -#define FZ_OUTPUT 289  
122 -#define FZ_PREDICATE 290  
123 -#define FZ_RECORD 291  
124 -#define FZ_SET 292  
125 -#define FZ_SHOW 293  
126 -#define FZ_SHOWCOND 294  
127 -#define FZ_SOLVE 295  
128 -#define FZ_STRING 296  
129 -#define FZ_TEST 297  
130 -#define FZ_THEN 298  
131 -#define FZ_TUPLE 299  
132 -#define FZ_TYPE 300  
133 -#define FZ_VARIANT_RECORD 301  
134 -#define FZ_WHERE 302  
135 -  
136 -  
137 -  
138 -  
139 -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED  
140 -typedef union YYSTYPE  
141 -#line 330 "parser.yxx"  
142 -{ int iValue; char* sValue; bool bValue; double dValue;  
143 - std::vector<int>* setValue;  
144 - FlatZinc::AST::SetLit* setLit;  
145 - std::vector<double>* floatSetValue;  
146 - std::vector<FlatZinc::AST::SetLit>* setValueList;  
147 - FlatZinc::Option<FlatZinc::AST::SetLit* > oSet;  
148 - FlatZinc::VarSpec* varSpec;  
149 - FlatZinc::Option<FlatZinc::AST::Node*> oArg;  
150 - std::vector<FlatZinc::VarSpec*>* varSpecVec;  
151 - FlatZinc::Option<std::vector<FlatZinc::VarSpec*>* > oVarSpecVec;  
152 - FlatZinc::AST::Node* arg;  
153 - FlatZinc::AST::Array* argVec;  
154 - }  
155 -/* Line 1529 of yacc.c. */  
156 -#line 157 "parser.tab.hpp"  
157 - YYSTYPE;  
158 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */  
159 -# define YYSTYPE_IS_DECLARED 1  
160 -# define YYSTYPE_IS_TRIVIAL 1  
161 -#endif  
162 -  
163 -  
164 -  
@@ -58,6 +58,7 @@ using namespace std; @@ -58,6 +58,7 @@ using namespace std;
58 58
59 int yyparse(void*); 59 int yyparse(void*);
60 int yylex(YYSTYPE*, void* scanner); 60 int yylex(YYSTYPE*, void* scanner);
  61 +//int yylex(YYSTYPE*);
61 int yylex_init (void** scanner); 62 int yylex_init (void** scanner);
62 int yylex_destroy (void* scanner); 63 int yylex_destroy (void* scanner);
63 int yyget_lineno (void* scanner); 64 int yyget_lineno (void* scanner);