···
1
-
/* A Bison parser, made by GNU Bison 2.3. */
1
+
/* A Bison parser, made by GNU Bison 3.7.6. */
3
-
/* Skeleton implementation for Bison's Yacc-like parsers in C
3
+
/* Bison implementation for Yacc-like parsers in C
5
-
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
-
Free Software Foundation, Inc.
5
+
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
8
-
This program is free software; you can redistribute it and/or modify
8
+
This program is free software: you can redistribute it and/or modify
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)
10
+
the Free Software Foundation, either version 3 of the License, or
11
+
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
···
GNU General Public License for more details.
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. */
19
+
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
···
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
37
+
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38
+
especially those whose name start with YY_ or yy_. They are
39
+
private implementation details that can be changed or removed. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
···
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
46
-
/* Identify Bison output. */
48
+
/* Identify Bison output, and Bison version. */
49
+
#define YYBISON 30706
49
-
/* Bison version. */
50
-
#define YYBISON_VERSION "2.3"
51
+
/* Bison version string. */
52
+
#define YYBISON_VERSION "3.7.6"
#define YYSKELETON_NAME "yacc.c"
···
58
-
/* Using locations. */
59
-
#define YYLSP_NEEDED 1
61
-
/* Substitute the variable and function names. */
62
-
#define yyparse mzn_yyparse
63
-
#define yylex mzn_yylex
64
-
#define yyerror mzn_yyerror
65
-
#define yylval mzn_yylval
66
-
#define yychar mzn_yychar
67
-
#define yydebug mzn_yydebug
68
-
#define yynerrs mzn_yynerrs
69
-
#define yylloc mzn_yylloc
73
-
# define YYTOKENTYPE
74
-
/* Put the tokens into the symbol table, so that GDB and other debuggers
78
-
MZN_INTEGER_LITERAL = 258,
79
-
MZN_BOOL_LITERAL = 259,
80
-
MZN_FLOAT_LITERAL = 260,
81
-
MZN_IDENTIFIER = 261,
82
-
MZN_QUOTED_IDENTIFIER = 262,
83
-
MZN_STRING_LITERAL = 263,
84
-
MZN_STRING_QUOTE_START = 264,
85
-
MZN_STRING_QUOTE_MID = 265,
86
-
MZN_STRING_QUOTE_END = 266,
87
-
MZN_TI_IDENTIFIER = 267,
88
-
MZN_TI_ENUM_IDENTIFIER = 268,
89
-
MZN_DOC_COMMENT = 269,
90
-
MZN_DOC_FILE_COMMENT = 270,
95
-
MZN_ANNOTATION = 275,
100
-
MZN_CONSTRAINT = 280,
107
-
MZN_FUNCTION = 287,
110
-
MZN_INFINITY = 290,
114
-
MZN_MAXIMIZE = 294,
115
-
MZN_MINIMIZE = 295,
120
-
MZN_PREDICATE = 300,
129
-
MZN_UNDERSCORE = 309,
130
-
MZN_VARIANT_RECORD = 310,
132
-
MZN_LEFT_BRACKET = 312,
133
-
MZN_LEFT_2D_BRACKET = 313,
134
-
MZN_RIGHT_BRACKET = 314,
135
-
MZN_RIGHT_2D_BRACKET = 315,
136
-
FLATZINC_IDENTIFIER = 316,
137
-
MZN_INVALID_INTEGER_LITERAL = 317,
138
-
MZN_INVALID_FLOAT_LITERAL = 318,
139
-
MZN_UNTERMINATED_STRING = 319,
140
-
MZN_END_OF_LINE_IN_STRING = 320,
141
-
MZN_INVALID_NULL = 321,
157
-
MZN_SUPERSET = 337,
164
-
MZN_WEAK_PLUS = 344,
165
-
MZN_WEAK_MINUS = 345,
170
-
MZN_INTERSECT = 350,
171
-
MZN_WEAK_MULT = 351,
174
-
MZN_PLUSPLUS = 354,
175
-
MZN_COLONCOLON = 355,
177
-
MZN_EQUIV_QUOTED = 357,
178
-
MZN_IMPL_QUOTED = 358,
179
-
MZN_RIMPL_QUOTED = 359,
180
-
MZN_OR_QUOTED = 360,
181
-
MZN_XOR_QUOTED = 361,
182
-
MZN_AND_QUOTED = 362,
183
-
MZN_LE_QUOTED = 363,
184
-
MZN_GR_QUOTED = 364,
185
-
MZN_LQ_QUOTED = 365,
186
-
MZN_GQ_QUOTED = 366,
187
-
MZN_EQ_QUOTED = 367,
188
-
MZN_NQ_QUOTED = 368,
189
-
MZN_IN_QUOTED = 369,
190
-
MZN_SUBSET_QUOTED = 370,
191
-
MZN_SUPERSET_QUOTED = 371,
192
-
MZN_UNION_QUOTED = 372,
193
-
MZN_DIFF_QUOTED = 373,
194
-
MZN_SYMDIFF_QUOTED = 374,
195
-
MZN_DOTDOT_QUOTED = 375,
196
-
MZN_PLUS_QUOTED = 376,
197
-
MZN_MINUS_QUOTED = 377,
198
-
MZN_MULT_QUOTED = 378,
199
-
MZN_DIV_QUOTED = 379,
200
-
MZN_IDIV_QUOTED = 380,
201
-
MZN_MOD_QUOTED = 381,
202
-
MZN_INTERSECT_QUOTED = 382,
203
-
MZN_POW_QUOTED = 383,
204
-
MZN_NOT_QUOTED = 384,
205
-
MZN_COLONCOLON_QUOTED = 385,
206
-
MZN_PLUSPLUS_QUOTED = 386
211
-
#define MZN_INTEGER_LITERAL 258
212
-
#define MZN_BOOL_LITERAL 259
213
-
#define MZN_FLOAT_LITERAL 260
214
-
#define MZN_IDENTIFIER 261
215
-
#define MZN_QUOTED_IDENTIFIER 262
216
-
#define MZN_STRING_LITERAL 263
217
-
#define MZN_STRING_QUOTE_START 264
218
-
#define MZN_STRING_QUOTE_MID 265
219
-
#define MZN_STRING_QUOTE_END 266
220
-
#define MZN_TI_IDENTIFIER 267
221
-
#define MZN_TI_ENUM_IDENTIFIER 268
222
-
#define MZN_DOC_COMMENT 269
223
-
#define MZN_DOC_FILE_COMMENT 270
224
-
#define MZN_VAR 271
225
-
#define MZN_PAR 272
226
-
#define MZN_ABSENT 273
227
-
#define MZN_ANN 274
228
-
#define MZN_ANNOTATION 275
229
-
#define MZN_ANY 276
230
-
#define MZN_ARRAY 277
231
-
#define MZN_BOOL 278
232
-
#define MZN_CASE 279
233
-
#define MZN_CONSTRAINT 280
234
-
#define MZN_DEFAULT 281
235
-
#define MZN_ELSE 282
236
-
#define MZN_ELSEIF 283
237
-
#define MZN_ENDIF 284
238
-
#define MZN_ENUM 285
239
-
#define MZN_FLOAT 286
240
-
#define MZN_FUNCTION 287
242
-
#define MZN_INCLUDE 289
243
-
#define MZN_INFINITY 290
244
-
#define MZN_INT 291
245
-
#define MZN_LET 292
246
-
#define MZN_LIST 293
247
-
#define MZN_MAXIMIZE 294
248
-
#define MZN_MINIMIZE 295
250
-
#define MZN_OPT 297
251
-
#define MZN_SATISFY 298
252
-
#define MZN_OUTPUT 299
253
-
#define MZN_PREDICATE 300
254
-
#define MZN_RECORD 301
255
-
#define MZN_SET 302
256
-
#define MZN_SOLVE 303
257
-
#define MZN_STRING 304
258
-
#define MZN_TEST 305
259
-
#define MZN_THEN 306
260
-
#define MZN_TUPLE 307
261
-
#define MZN_TYPE 308
262
-
#define MZN_UNDERSCORE 309
263
-
#define MZN_VARIANT_RECORD 310
264
-
#define MZN_WHERE 311
265
-
#define MZN_LEFT_BRACKET 312
266
-
#define MZN_LEFT_2D_BRACKET 313
267
-
#define MZN_RIGHT_BRACKET 314
268
-
#define MZN_RIGHT_2D_BRACKET 315
269
-
#define FLATZINC_IDENTIFIER 316
270
-
#define MZN_INVALID_INTEGER_LITERAL 317
271
-
#define MZN_INVALID_FLOAT_LITERAL 318
272
-
#define MZN_UNTERMINATED_STRING 319
273
-
#define MZN_END_OF_LINE_IN_STRING 320
274
-
#define MZN_INVALID_NULL 321
275
-
#define MZN_EQUIV 322
276
-
#define MZN_IMPL 323
277
-
#define MZN_RIMPL 324
279
-
#define MZN_XOR 326
280
-
#define MZN_AND 327
287
-
#define MZN_WEAK_EQ 334
289
-
#define MZN_SUBSET 336
290
-
#define MZN_SUPERSET 337
291
-
#define MZN_UNION 338
292
-
#define MZN_DIFF 339
293
-
#define MZN_SYMDIFF 340
294
-
#define MZN_DOTDOT 341
295
-
#define MZN_PLUS 342
296
-
#define MZN_MINUS 343
297
-
#define MZN_WEAK_PLUS 344
298
-
#define MZN_WEAK_MINUS 345
299
-
#define MZN_MULT 346
300
-
#define MZN_DIV 347
301
-
#define MZN_IDIV 348
302
-
#define MZN_MOD 349
303
-
#define MZN_INTERSECT 350
304
-
#define MZN_WEAK_MULT 351
305
-
#define MZN_POW 352
306
-
#define MZN_NOT 353
307
-
#define MZN_PLUSPLUS 354
308
-
#define MZN_COLONCOLON 355
309
-
#define PREC_ANNO 356
310
-
#define MZN_EQUIV_QUOTED 357
311
-
#define MZN_IMPL_QUOTED 358
312
-
#define MZN_RIMPL_QUOTED 359
313
-
#define MZN_OR_QUOTED 360
314
-
#define MZN_XOR_QUOTED 361
315
-
#define MZN_AND_QUOTED 362
316
-
#define MZN_LE_QUOTED 363
317
-
#define MZN_GR_QUOTED 364
318
-
#define MZN_LQ_QUOTED 365
319
-
#define MZN_GQ_QUOTED 366
320
-
#define MZN_EQ_QUOTED 367
321
-
#define MZN_NQ_QUOTED 368
322
-
#define MZN_IN_QUOTED 369
323
-
#define MZN_SUBSET_QUOTED 370
324
-
#define MZN_SUPERSET_QUOTED 371
325
-
#define MZN_UNION_QUOTED 372
326
-
#define MZN_DIFF_QUOTED 373
327
-
#define MZN_SYMDIFF_QUOTED 374
328
-
#define MZN_DOTDOT_QUOTED 375
329
-
#define MZN_PLUS_QUOTED 376
330
-
#define MZN_MINUS_QUOTED 377
331
-
#define MZN_MULT_QUOTED 378
332
-
#define MZN_DIV_QUOTED 379
333
-
#define MZN_IDIV_QUOTED 380
334
-
#define MZN_MOD_QUOTED 381
335
-
#define MZN_INTERSECT_QUOTED 382
336
-
#define MZN_POW_QUOTED 383
337
-
#define MZN_NOT_QUOTED 384
338
-
#define MZN_COLONCOLON_QUOTED 385
339
-
#define MZN_PLUSPLUS_QUOTED 386
67
+
/* Substitute the variable and function names. */
68
+
#define yyparse mzn_yyparse
69
+
#define yylex mzn_yylex
70
+
#define yyerror mzn_yyerror
71
+
#define yydebug mzn_yydebug
72
+
#define yynerrs mzn_yynerrs
344
-
/* Copy the first part of user declarations. */
74
+
/* First part of user prologue. */
#define SCANNER static_cast<ParserState*>(parm)->yyscanner
···
using namespace MiniZinc;
#define YYLLOC_DEFAULT(Current, Rhs, N) \
368
-
Current.filename(Rhs[1].filename()); \
369
-
Current.first_line(Rhs[1].first_line()); \
370
-
Current.first_column(Rhs[1].first_column()); \
371
-
Current.last_line(Rhs[N].last_line()); \
372
-
Current.last_column(Rhs[N].last_column());
97
+
(Current).filename(Rhs[1].filename()); \
98
+
(Current).first_line(Rhs[1].first_line()); \
99
+
(Current).first_column(Rhs[1].first_column()); \
100
+
(Current).last_line(Rhs[N].last_line()); \
101
+
(Current).last_column(Rhs[N].last_column());
int mzn_yylex(YYSTYPE*, YYLTYPE*, void* scanner);
···
426
-
/* Enabling traces. */
156
+
# ifdef __cplusplus
157
+
# define YY_CAST(Type, Val) static_cast<Type> (Val)
158
+
# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
160
+
# define YY_CAST(Type, Val) ((Type) (Val))
161
+
# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
164
+
# ifndef YY_NULLPTR
165
+
# if defined __cplusplus
166
+
# if 201103L <= __cplusplus
167
+
# define YY_NULLPTR nullptr
169
+
# define YY_NULLPTR 0
172
+
# define YY_NULLPTR ((void*)0)
431
-
/* Enabling verbose error messages. */
432
-
#ifdef YYERROR_VERBOSE
433
-
# undef YYERROR_VERBOSE
434
-
# define YYERROR_VERBOSE 1
436
-
# define YYERROR_VERBOSE 1
176
+
#include <minizinc/parser.tab.hh>
178
+
enum yysymbol_kind_t
180
+
YYSYMBOL_YYEMPTY = -2,
181
+
YYSYMBOL_YYEOF = 0, /* "end of file" */
182
+
YYSYMBOL_YYerror = 1, /* error */
183
+
YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
184
+
YYSYMBOL_MZN_INTEGER_LITERAL = 3, /* "integer literal" */
185
+
YYSYMBOL_MZN_BOOL_LITERAL = 4, /* "bool literal" */
186
+
YYSYMBOL_MZN_FLOAT_LITERAL = 5, /* "float literal" */
187
+
YYSYMBOL_MZN_IDENTIFIER = 6, /* "identifier" */
188
+
YYSYMBOL_MZN_QUOTED_IDENTIFIER = 7, /* "quoted identifier" */
189
+
YYSYMBOL_MZN_STRING_LITERAL = 8, /* "string literal" */
190
+
YYSYMBOL_MZN_STRING_QUOTE_START = 9, /* "interpolated string start" */
191
+
YYSYMBOL_MZN_STRING_QUOTE_MID = 10, /* "interpolated string middle" */
192
+
YYSYMBOL_MZN_STRING_QUOTE_END = 11, /* "interpolated string end" */
193
+
YYSYMBOL_MZN_TI_IDENTIFIER = 12, /* "type-inst identifier" */
194
+
YYSYMBOL_MZN_TI_ENUM_IDENTIFIER = 13, /* "type-inst enum identifier" */
195
+
YYSYMBOL_MZN_DOC_COMMENT = 14, /* "documentation comment" */
196
+
YYSYMBOL_MZN_DOC_FILE_COMMENT = 15, /* "file-level documentation comment" */
197
+
YYSYMBOL_MZN_VAR = 16, /* "var" */
198
+
YYSYMBOL_MZN_PAR = 17, /* "par" */
199
+
YYSYMBOL_MZN_ABSENT = 18, /* "<>" */
200
+
YYSYMBOL_MZN_ANN = 19, /* "ann" */
201
+
YYSYMBOL_MZN_ANNOTATION = 20, /* "annotation" */
202
+
YYSYMBOL_MZN_ANY = 21, /* "any" */
203
+
YYSYMBOL_MZN_ARRAY = 22, /* "array" */
204
+
YYSYMBOL_MZN_BOOL = 23, /* "bool" */
205
+
YYSYMBOL_MZN_CASE = 24, /* "case" */
206
+
YYSYMBOL_MZN_CONSTRAINT = 25, /* "constraint" */
207
+
YYSYMBOL_MZN_DEFAULT = 26, /* "default" */
208
+
YYSYMBOL_MZN_ELSE = 27, /* "else" */
209
+
YYSYMBOL_MZN_ELSEIF = 28, /* "elseif" */
210
+
YYSYMBOL_MZN_ENDIF = 29, /* "endif" */
211
+
YYSYMBOL_MZN_ENUM = 30, /* "enum" */
212
+
YYSYMBOL_MZN_FLOAT = 31, /* "float" */
213
+
YYSYMBOL_MZN_FUNCTION = 32, /* "function" */
214
+
YYSYMBOL_MZN_IF = 33, /* "if" */
215
+
YYSYMBOL_MZN_INCLUDE = 34, /* "include" */
216
+
YYSYMBOL_MZN_INFINITY = 35, /* "infinity" */
217
+
YYSYMBOL_MZN_INT = 36, /* "int" */
218
+
YYSYMBOL_MZN_LET = 37, /* "let" */
219
+
YYSYMBOL_MZN_LIST = 38, /* "list" */
220
+
YYSYMBOL_MZN_MAXIMIZE = 39, /* "maximize" */
221
+
YYSYMBOL_MZN_MINIMIZE = 40, /* "minimize" */
222
+
YYSYMBOL_MZN_OF = 41, /* "of" */
223
+
YYSYMBOL_MZN_OPT = 42, /* "opt" */
224
+
YYSYMBOL_MZN_SATISFY = 43, /* "satisfy" */
225
+
YYSYMBOL_MZN_OUTPUT = 44, /* "output" */
226
+
YYSYMBOL_MZN_PREDICATE = 45, /* "predicate" */
227
+
YYSYMBOL_MZN_RECORD = 46, /* "record" */
228
+
YYSYMBOL_MZN_SET = 47, /* "set" */
229
+
YYSYMBOL_MZN_SOLVE = 48, /* "solve" */
230
+
YYSYMBOL_MZN_STRING = 49, /* "string" */
231
+
YYSYMBOL_MZN_TEST = 50, /* "test" */
232
+
YYSYMBOL_MZN_THEN = 51, /* "then" */
233
+
YYSYMBOL_MZN_TUPLE = 52, /* "tuple" */
234
+
YYSYMBOL_MZN_TYPE = 53, /* "type" */
235
+
YYSYMBOL_MZN_UNDERSCORE = 54, /* "_" */
236
+
YYSYMBOL_MZN_VARIANT_RECORD = 55, /* "variant_record" */
237
+
YYSYMBOL_MZN_WHERE = 56, /* "where" */
238
+
YYSYMBOL_MZN_LEFT_BRACKET = 57, /* "[" */
239
+
YYSYMBOL_MZN_LEFT_2D_BRACKET = 58, /* "[|" */
240
+
YYSYMBOL_MZN_RIGHT_BRACKET = 59, /* "]" */
241
+
YYSYMBOL_MZN_RIGHT_2D_BRACKET = 60, /* "|]" */
242
+
YYSYMBOL_FLATZINC_IDENTIFIER = 61, /* FLATZINC_IDENTIFIER */
243
+
YYSYMBOL_MZN_INVALID_INTEGER_LITERAL = 62, /* "invalid integer literal" */
244
+
YYSYMBOL_MZN_INVALID_FLOAT_LITERAL = 63, /* "invalid float literal" */
245
+
YYSYMBOL_MZN_UNTERMINATED_STRING = 64, /* "unterminated string" */
246
+
YYSYMBOL_MZN_END_OF_LINE_IN_STRING = 65, /* "end of line inside string literal" */
247
+
YYSYMBOL_MZN_INVALID_NULL = 66, /* "null character" */
248
+
YYSYMBOL_MZN_EQUIV = 67, /* "<->" */
249
+
YYSYMBOL_MZN_IMPL = 68, /* "->" */
250
+
YYSYMBOL_MZN_RIMPL = 69, /* "<-" */
251
+
YYSYMBOL_MZN_OR = 70, /* "\\/" */
252
+
YYSYMBOL_MZN_XOR = 71, /* "xor" */
253
+
YYSYMBOL_MZN_AND = 72, /* "/\\" */
254
+
YYSYMBOL_MZN_LE = 73, /* "<" */
255
+
YYSYMBOL_MZN_GR = 74, /* ">" */
256
+
YYSYMBOL_MZN_LQ = 75, /* "<=" */
257
+
YYSYMBOL_MZN_GQ = 76, /* ">=" */
258
+
YYSYMBOL_MZN_EQ = 77, /* "=" */
259
+
YYSYMBOL_MZN_NQ = 78, /* "!=" */
260
+
YYSYMBOL_MZN_WEAK_EQ = 79, /* "~=" */
261
+
YYSYMBOL_MZN_IN = 80, /* "in" */
262
+
YYSYMBOL_MZN_SUBSET = 81, /* "subset" */
263
+
YYSYMBOL_MZN_SUPERSET = 82, /* "superset" */
264
+
YYSYMBOL_MZN_UNION = 83, /* "union" */
265
+
YYSYMBOL_MZN_DIFF = 84, /* "diff" */
266
+
YYSYMBOL_MZN_SYMDIFF = 85, /* "symdiff" */
267
+
YYSYMBOL_MZN_DOTDOT = 86, /* ".." */
268
+
YYSYMBOL_MZN_PLUS = 87, /* "+" */
269
+
YYSYMBOL_MZN_MINUS = 88, /* "-" */
270
+
YYSYMBOL_MZN_WEAK_PLUS = 89, /* "~+" */
271
+
YYSYMBOL_MZN_WEAK_MINUS = 90, /* "~-" */
272
+
YYSYMBOL_MZN_MULT = 91, /* "*" */
273
+
YYSYMBOL_MZN_DIV = 92, /* "/" */
274
+
YYSYMBOL_MZN_IDIV = 93, /* "div" */
275
+
YYSYMBOL_MZN_MOD = 94, /* "mod" */
276
+
YYSYMBOL_MZN_INTERSECT = 95, /* "intersect" */
277
+
YYSYMBOL_MZN_WEAK_MULT = 96, /* "~*" */
278
+
YYSYMBOL_MZN_POW = 97, /* "^" */
279
+
YYSYMBOL_MZN_NOT = 98, /* "not" */
280
+
YYSYMBOL_MZN_PLUSPLUS = 99, /* "++" */
281
+
YYSYMBOL_MZN_COLONCOLON = 100, /* "::" */
282
+
YYSYMBOL_PREC_ANNO = 101, /* PREC_ANNO */
283
+
YYSYMBOL_MZN_EQUIV_QUOTED = 102, /* "'<->'" */
284
+
YYSYMBOL_MZN_IMPL_QUOTED = 103, /* "'->'" */
285
+
YYSYMBOL_MZN_RIMPL_QUOTED = 104, /* "'<-'" */
286
+
YYSYMBOL_MZN_OR_QUOTED = 105, /* "'\\/'" */
287
+
YYSYMBOL_MZN_XOR_QUOTED = 106, /* "'xor'" */
288
+
YYSYMBOL_MZN_AND_QUOTED = 107, /* "'/\\'" */
289
+
YYSYMBOL_MZN_LE_QUOTED = 108, /* "'<'" */
290
+
YYSYMBOL_MZN_GR_QUOTED = 109, /* "'>'" */
291
+
YYSYMBOL_MZN_LQ_QUOTED = 110, /* "'<='" */
292
+
YYSYMBOL_MZN_GQ_QUOTED = 111, /* "'>='" */
293
+
YYSYMBOL_MZN_EQ_QUOTED = 112, /* "'='" */
294
+
YYSYMBOL_MZN_NQ_QUOTED = 113, /* "'!='" */
295
+
YYSYMBOL_MZN_IN_QUOTED = 114, /* "'in'" */
296
+
YYSYMBOL_MZN_SUBSET_QUOTED = 115, /* "'subset'" */
297
+
YYSYMBOL_MZN_SUPERSET_QUOTED = 116, /* "'superset'" */
298
+
YYSYMBOL_MZN_UNION_QUOTED = 117, /* "'union'" */
299
+
YYSYMBOL_MZN_DIFF_QUOTED = 118, /* "'diff'" */
300
+
YYSYMBOL_MZN_SYMDIFF_QUOTED = 119, /* "'symdiff'" */
301
+
YYSYMBOL_MZN_DOTDOT_QUOTED = 120, /* "'..'" */
302
+
YYSYMBOL_MZN_PLUS_QUOTED = 121, /* "'+'" */
303
+
YYSYMBOL_MZN_MINUS_QUOTED = 122, /* "'-'" */
304
+
YYSYMBOL_MZN_MULT_QUOTED = 123, /* "'*'" */
305
+
YYSYMBOL_MZN_DIV_QUOTED = 124, /* "'/'" */
306
+
YYSYMBOL_MZN_IDIV_QUOTED = 125, /* "'div'" */
307
+
YYSYMBOL_MZN_MOD_QUOTED = 126, /* "'mod'" */
308
+
YYSYMBOL_MZN_INTERSECT_QUOTED = 127, /* "'intersect'" */
309
+
YYSYMBOL_MZN_POW_QUOTED = 128, /* "'^'" */
310
+
YYSYMBOL_MZN_NOT_QUOTED = 129, /* "'not'" */
311
+
YYSYMBOL_MZN_COLONCOLON_QUOTED = 130, /* "'::'" */
312
+
YYSYMBOL_MZN_PLUSPLUS_QUOTED = 131, /* "'++'" */
313
+
YYSYMBOL_132_ = 132, /* ';' */
314
+
YYSYMBOL_133_ = 133, /* '{' */
315
+
YYSYMBOL_134_ = 134, /* '}' */
316
+
YYSYMBOL_135_ = 135, /* '(' */
317
+
YYSYMBOL_136_ = 136, /* ')' */
318
+
YYSYMBOL_137_ = 137, /* ',' */
319
+
YYSYMBOL_138_ = 138, /* ':' */
320
+
YYSYMBOL_139_ = 139, /* '|' */
321
+
YYSYMBOL_YYACCEPT = 140, /* $accept */
322
+
YYSYMBOL_model = 141, /* model */
323
+
YYSYMBOL_item_list = 142, /* item_list */
324
+
YYSYMBOL_item_list_head = 143, /* item_list_head */
325
+
YYSYMBOL_doc_file_comments = 144, /* doc_file_comments */
326
+
YYSYMBOL_semi_or_none = 145, /* semi_or_none */
327
+
YYSYMBOL_item = 146, /* item */
328
+
YYSYMBOL_item_tail = 147, /* item_tail */
329
+
YYSYMBOL_error_item_start = 148, /* error_item_start */
330
+
YYSYMBOL_include_item = 149, /* include_item */
331
+
YYSYMBOL_vardecl_item = 150, /* vardecl_item */
332
+
YYSYMBOL_string_lit_list = 151, /* string_lit_list */
333
+
YYSYMBOL_enum_id_list = 152, /* enum_id_list */
334
+
YYSYMBOL_assign_item = 153, /* assign_item */
335
+
YYSYMBOL_constraint_item = 154, /* constraint_item */
336
+
YYSYMBOL_solve_item = 155, /* solve_item */
337
+
YYSYMBOL_output_item = 156, /* output_item */
338
+
YYSYMBOL_predicate_item = 157, /* predicate_item */
339
+
YYSYMBOL_function_item = 158, /* function_item */
340
+
YYSYMBOL_annotation_item = 159, /* annotation_item */
341
+
YYSYMBOL_operation_item_tail = 160, /* operation_item_tail */
342
+
YYSYMBOL_params = 161, /* params */
343
+
YYSYMBOL_params_list = 162, /* params_list */
344
+
YYSYMBOL_params_list_head = 163, /* params_list_head */
345
+
YYSYMBOL_comma_or_none = 164, /* comma_or_none */
346
+
YYSYMBOL_ti_expr_and_id_or_anon = 165, /* ti_expr_and_id_or_anon */
347
+
YYSYMBOL_ti_expr_and_id = 166, /* ti_expr_and_id */
348
+
YYSYMBOL_ti_expr_list = 167, /* ti_expr_list */
349
+
YYSYMBOL_ti_expr_list_head = 168, /* ti_expr_list_head */
350
+
YYSYMBOL_ti_expr = 169, /* ti_expr */
351
+
YYSYMBOL_base_ti_expr = 170, /* base_ti_expr */
352
+
YYSYMBOL_opt_opt = 171, /* opt_opt */
353
+
YYSYMBOL_base_ti_expr_tail = 172, /* base_ti_expr_tail */
354
+
YYSYMBOL_array_access_expr_list = 173, /* array_access_expr_list */
355
+
YYSYMBOL_array_access_expr_list_head = 174, /* array_access_expr_list_head */
356
+
YYSYMBOL_array_access_expr = 175, /* array_access_expr */
357
+
YYSYMBOL_expr_list = 176, /* expr_list */
358
+
YYSYMBOL_expr_list_head = 177, /* expr_list_head */
359
+
YYSYMBOL_set_expr = 178, /* set_expr */
360
+
YYSYMBOL_expr = 179, /* expr */
361
+
YYSYMBOL_expr_atom_head = 180, /* expr_atom_head */
362
+
YYSYMBOL_expr_atom_head_nonstring = 181, /* expr_atom_head_nonstring */
363
+
YYSYMBOL_string_expr = 182, /* string_expr */
364
+
YYSYMBOL_string_quote_rest = 183, /* string_quote_rest */
365
+
YYSYMBOL_array_access_tail = 184, /* array_access_tail */
366
+
YYSYMBOL_set_literal = 185, /* set_literal */
367
+
YYSYMBOL_set_comp = 186, /* set_comp */
368
+
YYSYMBOL_comp_tail = 187, /* comp_tail */
369
+
YYSYMBOL_generator_list = 188, /* generator_list */
370
+
YYSYMBOL_generator_list_head = 189, /* generator_list_head */
371
+
YYSYMBOL_generator = 190, /* generator */
372
+
YYSYMBOL_generator_eq = 191, /* generator_eq */
373
+
YYSYMBOL_id_list = 192, /* id_list */
374
+
YYSYMBOL_id_list_head = 193, /* id_list_head */
375
+
YYSYMBOL_simple_array_literal = 194, /* simple_array_literal */
376
+
YYSYMBOL_simple_array_literal_2d = 195, /* simple_array_literal_2d */
377
+
YYSYMBOL_simple_array_literal_3d_list = 196, /* simple_array_literal_3d_list */
378
+
YYSYMBOL_simple_array_literal_2d_list = 197, /* simple_array_literal_2d_list */
379
+
YYSYMBOL_simple_array_comp = 198, /* simple_array_comp */
380
+
YYSYMBOL_if_then_else_expr = 199, /* if_then_else_expr */
381
+
YYSYMBOL_elseif_list = 200, /* elseif_list */
382
+
YYSYMBOL_quoted_op = 201, /* quoted_op */
383
+
YYSYMBOL_quoted_op_call = 202, /* quoted_op_call */
384
+
YYSYMBOL_call_expr = 203, /* call_expr */
385
+
YYSYMBOL_comp_or_expr = 204, /* comp_or_expr */
386
+
YYSYMBOL_comp_or_expr_head = 205, /* comp_or_expr_head */
387
+
YYSYMBOL_let_expr = 206, /* let_expr */
388
+
YYSYMBOL_let_vardecl_item_list = 207, /* let_vardecl_item_list */
389
+
YYSYMBOL_comma_or_semi = 208, /* comma_or_semi */
390
+
YYSYMBOL_let_vardecl_item = 209, /* let_vardecl_item */
391
+
YYSYMBOL_annotations = 210, /* annotations */
392
+
YYSYMBOL_annotation_expr = 211, /* annotation_expr */
393
+
YYSYMBOL_ne_annotations = 212, /* ne_annotations */
394
+
YYSYMBOL_id_or_quoted_op = 213 /* id_or_quoted_op */
396
+
typedef enum yysymbol_kind_t yysymbol_kind_t;
439
-
/* Enabling the token table. */
440
-
#ifndef YYTOKEN_TABLE
441
-
# define YYTOKEN_TABLE 0
444
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
445
-
typedef union YYSTYPE
447
-
{ long long int iValue; char* sValue; bool bValue; double dValue;
448
-
MiniZinc::Item* item;
449
-
MiniZinc::VarDecl* vardeclexpr;
450
-
std::vector<MiniZinc::VarDecl*>* vardeclexpr_v;
451
-
MiniZinc::TypeInst* tiexpr;
452
-
std::vector<MiniZinc::TypeInst*>* tiexpr_v;
453
-
MiniZinc::Expression* expression;
454
-
std::vector<MiniZinc::Expression*>* expression_v;
455
-
std::vector<std::vector<MiniZinc::Expression*> >* expression_vv;
456
-
std::vector<std::vector<std::vector<MiniZinc::Expression*> > >* expression_vvv;
457
-
MiniZinc::Generator* generator;
458
-
std::vector<MiniZinc::Generator>* generator_v;
459
-
std::vector<std::string>* string_v;
460
-
std::vector<std::pair<MiniZinc::Expression*,MiniZinc::Expression*> >* expression_p;
461
-
MiniZinc::Generators* generators;
463
-
/* Line 193 of yacc.c. */
466
-
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
467
-
# define YYSTYPE_IS_DECLARED 1
468
-
# define YYSTYPE_IS_TRIVIAL 1
471
-
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
472
-
typedef struct YYLTYPE
479
-
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
480
-
# define YYLTYPE_IS_DECLARED 1
481
-
# define YYLTYPE_IS_TRIVIAL 1
405
+
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
406
+
<limits.h> and (if available) <stdint.h> are included
407
+
so that the code can choose integer types of a good width. */
409
+
#ifndef __PTRDIFF_MAX__
410
+
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
411
+
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
412
+
# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
413
+
# define YY_STDINT_H
417
+
/* Narrow types that promote to a signed type and that can represent a
418
+
signed or unsigned integer of at least N bits. In tables they can
419
+
save space and decrease cache pressure. Promoting to a signed type
420
+
helps avoid bugs in integer arithmetic. */
485
-
/* Copy the second part of user declarations. */
422
+
#ifdef __INT_LEAST8_MAX__
423
+
typedef __INT_LEAST8_TYPE__ yytype_int8;
424
+
#elif defined YY_STDINT_H
425
+
typedef int_least8_t yytype_int8;
427
+
typedef signed char yytype_int8;
488
-
/* Line 216 of yacc.c. */
430
+
#ifdef __INT_LEAST16_MAX__
431
+
typedef __INT_LEAST16_TYPE__ yytype_int16;
432
+
#elif defined YY_STDINT_H
433
+
typedef int_least16_t yytype_int16;
435
+
typedef short yytype_int16;
495
-
#ifdef YYTYPE_UINT8
496
-
typedef YYTYPE_UINT8 yytype_uint8;
498
-
typedef unsigned char yytype_uint8;
438
+
/* Work around bug in HP-UX 11.23, which defines these macros
439
+
incorrectly for preprocessor constants. This workaround can likely
440
+
be removed in 2023, as HPE has promised support for HP-UX 11.23
441
+
(aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
442
+
<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
444
+
# undef UINT_LEAST8_MAX
445
+
# undef UINT_LEAST16_MAX
446
+
# define UINT_LEAST8_MAX 255
447
+
# define UINT_LEAST16_MAX 65535
502
-
typedef YYTYPE_INT8 yytype_int8;
503
-
#elif (defined __STDC__ || defined __C99__FUNC__ \
504
-
|| defined __cplusplus || defined _MSC_VER)
505
-
typedef signed char yytype_int8;
450
+
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
451
+
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
452
+
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
453
+
&& UINT_LEAST8_MAX <= INT_MAX)
454
+
typedef uint_least8_t yytype_uint8;
455
+
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
456
+
typedef unsigned char yytype_uint8;
507
-
typedef short int yytype_int8;
458
+
typedef short yytype_uint8;
510
-
#ifdef YYTYPE_UINT16
511
-
typedef YYTYPE_UINT16 yytype_uint16;
461
+
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
462
+
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
463
+
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
464
+
&& UINT_LEAST16_MAX <= INT_MAX)
465
+
typedef uint_least16_t yytype_uint16;
466
+
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
467
+
typedef unsigned short yytype_uint16;
513
-
typedef unsigned short int yytype_uint16;
469
+
typedef int yytype_uint16;
516
-
#ifdef YYTYPE_INT16
517
-
typedef YYTYPE_INT16 yytype_int16;
519
-
typedef short int yytype_int16;
472
+
#ifndef YYPTRDIFF_T
473
+
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
474
+
# define YYPTRDIFF_T __PTRDIFF_TYPE__
475
+
# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
476
+
# elif defined PTRDIFF_MAX
478
+
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
480
+
# define YYPTRDIFF_T ptrdiff_t
481
+
# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
483
+
# define YYPTRDIFF_T long
484
+
# define YYPTRDIFF_MAXIMUM LONG_MAX
···
# define YYSIZE_T __SIZE_TYPE__
527
-
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
528
-
|| defined __cplusplus || defined _MSC_VER)
493
+
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
532
-
# define YYSIZE_T unsigned int
497
+
# define YYSIZE_T unsigned
536
-
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
501
+
#define YYSIZE_MAXIMUM \
502
+
YY_CAST (YYPTRDIFF_T, \
503
+
(YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
504
+
? YYPTRDIFF_MAXIMUM \
505
+
: YY_CAST (YYSIZE_T, -1)))
507
+
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
510
+
/* Stored state numbers (used for stacks). */
511
+
typedef yytype_int16 yy_state_t;
513
+
/* State numbers in computations. */
514
+
typedef int yy_state_fast_t;
# if defined YYENABLE_NLS && YYENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
542
-
# define YY_(msgid) dgettext ("bison-runtime", msgid)
520
+
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
546
-
# define YY_(msgid) msgid
524
+
# define YY_(Msgid) Msgid
529
+
#ifndef YY_ATTRIBUTE_PURE
530
+
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
531
+
# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
533
+
# define YY_ATTRIBUTE_PURE
537
+
#ifndef YY_ATTRIBUTE_UNUSED
538
+
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
539
+
# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
541
+
# define YY_ATTRIBUTE_UNUSED
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
552
-
# define YYUSE(e) ((void) (e))
547
+
# define YY_USE(E) ((void) (E))
554
-
# define YYUSE(e) /* empty */
549
+
# define YY_USE(E) /* empty */
557
-
/* Identity function, used to suppress warnings about constant conditions. */
559
-
# define YYID(n) (n)
552
+
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
553
+
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
554
+
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
555
+
_Pragma ("GCC diagnostic push") \
556
+
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
557
+
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
558
+
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
559
+
_Pragma ("GCC diagnostic pop")
561
-
#if (defined __STDC__ || defined __C99__FUNC__ \
562
-
|| defined __cplusplus || defined _MSC_VER)
561
+
# define YY_INITIAL_VALUE(Value) Value
563
+
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
564
+
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
565
+
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
567
+
#ifndef YY_INITIAL_VALUE
568
+
# define YY_INITIAL_VALUE(Value) /* Nothing. */
575
-
#if ! defined yyoverflow || YYERROR_VERBOSE
571
+
#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
572
+
# define YY_IGNORE_USELESS_CAST_BEGIN \
573
+
_Pragma ("GCC diagnostic push") \
574
+
_Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
575
+
# define YY_IGNORE_USELESS_CAST_END \
576
+
_Pragma ("GCC diagnostic pop")
578
+
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
579
+
# define YY_IGNORE_USELESS_CAST_BEGIN
580
+
# define YY_IGNORE_USELESS_CAST_END
584
+
#define YY_ASSERT(E) ((void) (0 && (E)))
/* The parser invokes alloca or malloc; define the necessary symbols. */
···
# define YYSTACK_ALLOC alloca
592
-
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
593
-
|| defined __cplusplus || defined _MSC_VER)
603
+
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
596
-
# define _STDLIB_H 1
605
+
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
606
+
# ifndef EXIT_SUCCESS
607
+
# define EXIT_SUCCESS 0
···
604
-
/* Pacify GCC's `empty if-body' warning. */
605
-
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
615
+
/* Pacify GCC's 'empty if-body' warning. */
616
+
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
···
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
619
-
# if (defined __cplusplus && ! defined _STDLIB_H \
630
+
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
621
-
&& (defined YYFREE || defined free)))
632
+
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
624
-
# define _STDLIB_H 1
634
+
# ifndef EXIT_SUCCESS
635
+
# define EXIT_SUCCESS 0
629
-
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
630
-
|| defined __cplusplus || defined _MSC_VER)
640
+
# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
636
-
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
637
-
|| defined __cplusplus || defined _MSC_VER)
646
+
# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
642
-
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
647
-
|| (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
648
-
&& defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
655
+
|| (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
656
+
&& defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
661
+
yy_state_t yyss_alloc;
662
+
YYSTYPE yyvs_alloc;
663
+
YYLTYPE yyls_alloc;
/* The size of the maximum gap between one aligned stack and the next. */
659
-
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
667
+
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
# define YYSTACK_BYTES(N) \
664
-
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
672
+
((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
673
+
+ YYSIZEOF (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
667
-
/* Copy COUNT objects from FROM to TO. The source and destination do
670
-
# if defined __GNUC__ && 1 < __GNUC__
671
-
# define YYCOPY(To, From, Count) \
672
-
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
674
-
# define YYCOPY(To, From, Count) \
678
-
for (yyi = 0; yyi < (Count); yyi++) \
679
-
(To)[yyi] = (From)[yyi]; \
676
+
# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
690
-
# define YYSTACK_RELOCATE(Stack) \
693
-
YYSIZE_T yynewbytes; \
694
-
YYCOPY (&yyptr->Stack, Stack, yysize); \
695
-
Stack = &yyptr->Stack; \
696
-
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
697
-
yyptr += yynewbytes / sizeof (*yyptr); \
683
+
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
686
+
YYPTRDIFF_T yynewbytes; \
687
+
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
688
+
Stack = &yyptr->Stack_alloc; \
689
+
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
690
+
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
696
+
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
697
+
/* Copy COUNT objects from SRC to DST. The source and destination do
700
+
# if defined __GNUC__ && 1 < __GNUC__
701
+
# define YYCOPY(Dst, Src, Count) \
702
+
__builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
704
+
# define YYCOPY(Dst, Src, Count) \
708
+
for (yyi = 0; yyi < (Count); yyi++) \
709
+
(Dst)[yyi] = (Src)[yyi]; \
714
+
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
/* YYLAST -- Last index in YYTABLE. */
···
/* YYNRULES -- Number of rules. */
714
-
/* YYNRULES -- Number of states. */
727
+
/* YYNSTATES -- Number of states. */
717
-
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
718
-
#define YYUNDEFTOK 2
730
+
/* YYMAXUTOK -- Last valid token kind. */
721
-
#define YYTRANSLATE(YYX) \
722
-
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
724
-
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
734
+
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
735
+
as returned by yylex, with out-of-bounds checking. */
736
+
#define YYTRANSLATE(YYX) \
737
+
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
738
+
? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
739
+
: YYSYMBOL_YYUNDEF)
741
+
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
742
+
as returned by yylex. */
static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
···
769
-
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
771
-
static const yytype_uint16 yyprhs[] =
787
+
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
788
+
static const yytype_int16 yyrline[] =
773
-
0, 0, 3, 5, 6, 9, 11, 14, 18, 23,
774
-
26, 30, 32, 35, 36, 38, 41, 43, 45, 47,
775
-
49, 51, 53, 55, 57, 59, 61, 63, 65, 67,
776
-
69, 71, 73, 75, 77, 79, 82, 85, 90, 93,
777
-
100, 107, 115, 116, 118, 122, 123, 125, 129, 133,
778
-
136, 141, 145, 150, 155, 158, 164, 170, 178, 187,
779
-
191, 197, 198, 201, 202, 206, 210, 211, 214, 216,
780
-
220, 221, 223, 225, 227, 231, 234, 236, 240, 242,
781
-
249, 253, 255, 258, 262, 266, 271, 277, 283, 284,
782
-
286, 288, 290, 292, 294, 296, 298, 300, 302, 305,
783
-
307, 311, 313, 315, 318, 321, 324, 326, 330, 332,
784
-
336, 340, 344, 348, 352, 359, 363, 367, 371, 375,
785
-
379, 383, 387, 391, 395, 399, 403, 407, 411, 415,
786
-
418, 421, 423, 427, 431, 435, 439, 443, 447, 451,
787
-
455, 459, 463, 467, 471, 475, 479, 483, 487, 491,
788
-
495, 499, 503, 510, 514, 518, 522, 526, 530, 534,
789
-
538, 542, 546, 550, 554, 558, 562, 566, 569, 572,
790
-
575, 577, 579, 583, 588, 590, 593, 595, 598, 600,
791
-
602, 604, 606, 608, 610, 613, 615, 618, 620, 623,
792
-
625, 628, 630, 633, 635, 638, 640, 642, 645, 647,
793
-
650, 653, 657, 661, 666, 669, 673, 679, 681, 684,
794
-
686, 688, 692, 696, 700, 706, 710, 716, 720, 723,
795
-
725, 729, 732, 736, 739, 743, 748, 752, 755, 759,
796
-
765, 767, 771, 777, 783, 792, 793, 799, 801, 803,
797
-
805, 807, 809, 811, 813, 815, 817, 819, 821, 823,
798
-
825, 827, 829, 831, 833, 835, 837, 839, 841, 843,
799
-
845, 847, 849, 851, 853, 855, 862, 867, 871, 873,
800
-
878, 886, 889, 891, 895, 899, 905, 912, 920, 922,
801
-
924, 928, 932, 934, 936, 939, 944, 945, 947, 949,
802
-
951, 954, 958, 960, 962, 964, 966, 968, 970, 972,
803
-
974, 976, 978, 980, 982, 984, 986, 988, 990, 992,
804
-
994, 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012,
790
+
0, 273, 273, 275, 277, 280, 289, 298, 307, 316,
791
+
318, 321, 329, 338, 338, 340, 356, 360, 362, 364,
792
+
365, 367, 369, 371, 373, 375, 378, 378, 378, 379,
793
+
379, 379, 379, 379, 380, 383, 407, 413, 420, 428,
794
+
438, 450, 465, 466, 470, 478, 479, 483, 487, 493,
795
+
495, 502, 507, 512, 519, 523, 531, 541, 548, 557,
796
+
569, 577, 578, 583, 584, 586, 591, 592, 596, 600,
797
+
605, 605, 608, 610, 614, 619, 623, 625, 629, 630,
798
+
636, 645, 648, 656, 664, 673, 682, 691, 704, 705,
799
+
709, 711, 713, 715, 717, 719, 721, 726, 732, 735,
800
+
737, 741, 743, 745, 754, 765, 768, 770, 776, 777,
801
+
779, 781, 783, 785, 794, 803, 805, 807, 809, 811,
802
+
813, 815, 817, 819, 821, 826, 831, 836, 841, 847,
803
+
849, 862, 863, 865, 867, 869, 871, 873, 875, 877,
804
+
879, 881, 883, 885, 887, 889, 891, 893, 895, 897,
805
+
899, 901, 910, 919, 921, 923, 925, 927, 929, 931,
806
+
933, 935, 937, 942, 947, 952, 957, 963, 965, 972,
807
+
984, 986, 990, 992, 994, 996, 999, 1001, 1004, 1006,
808
+
1008, 1010, 1012, 1014, 1015, 1018, 1019, 1022, 1023, 1026,
809
+
1027, 1030, 1031, 1034, 1035, 1038, 1039, 1040, 1045, 1047,
810
+
1053, 1058, 1066, 1073, 1082, 1084, 1089, 1095, 1098, 1101,
811
+
1103, 1105, 1111, 1113, 1115, 1123, 1125, 1128, 1131, 1134,
812
+
1136, 1140, 1142, 1146, 1148, 1159, 1170, 1210, 1213, 1218,
813
+
1225, 1230, 1234, 1240, 1247, 1263, 1264, 1268, 1270, 1272,
814
+
1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288, 1290, 1292,
815
+
1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312,
816
+
1314, 1316, 1318, 1320, 1322, 1326, 1334, 1366, 1368, 1369,
817
+
1389, 1444, 1447, 1453, 1459, 1461, 1465, 1472, 1481, 1483,
818
+
1491, 1493, 1502, 1502, 1505, 1511, 1522, 1523, 1526, 1528,
819
+
1532, 1536, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554,
820
+
1556, 1558, 1560, 1562, 1564, 1566, 1568, 1570, 1572, 1574,
821
+
1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592, 1594,
808
-
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
809
-
static const yytype_int16 yyrhs[] =
811
-
141, 0, -1, 142, -1, -1, 143, 145, -1, 146,
812
-
-1, 144, 146, -1, 143, 132, 146, -1, 143, 132,
813
-
144, 146, -1, 146, 148, -1, 1, 132, 146, -1,
814
-
15, -1, 144, 15, -1, -1, 132, -1, 14, 147,
815
-
-1, 147, -1, 149, -1, 150, -1, 153, -1, 154,
816
-
-1, 155, -1, 156, -1, 157, -1, 158, -1, 159,
817
-
-1, 34, -1, 30, -1, 44, -1, 25, -1, 48,
818
-
-1, 45, -1, 32, -1, 50, -1, 20, -1, 34,
819
-
8, -1, 166, 210, -1, 166, 210, 77, 179, -1,
820
-
30, 6, -1, 30, 6, 77, 133, 152, 134, -1,
821
-
30, 6, 77, 57, 151, 59, -1, 30, 6, 77,
822
-
6, 135, 179, 136, -1, -1, 8, -1, 151, 137,
823
-
8, -1, -1, 6, -1, 152, 137, 6, -1, 6,
824
-
77, 179, -1, 25, 179, -1, 25, 100, 182, 179,
825
-
-1, 48, 210, 43, -1, 48, 210, 40, 179, -1,
826
-
48, 210, 39, 179, -1, 44, 179, -1, 45, 6,
827
-
161, 210, 160, -1, 50, 6, 161, 210, 160, -1,
828
-
32, 169, 138, 213, 161, 210, 160, -1, 169, 138,
829
-
6, 135, 162, 136, 210, 160, -1, 20, 6, 161,
830
-
-1, 20, 6, 161, 77, 179, -1, -1, 77, 179,
831
-
-1, -1, 135, 162, 136, -1, 135, 1, 136, -1,
832
-
-1, 163, 164, -1, 165, -1, 163, 137, 165, -1,
833
-
-1, 137, -1, 166, -1, 169, -1, 169, 138, 6,
834
-
-1, 168, 164, -1, 169, -1, 168, 137, 169, -1,
835
-
170, -1, 22, 57, 167, 59, 41, 170, -1, 38,
836
-
41, 170, -1, 172, -1, 42, 172, -1, 17, 171,
837
-
172, -1, 16, 171, 172, -1, 171, 47, 41, 172,
838
-
-1, 17, 171, 47, 41, 172, -1, 16, 171, 47,
839
-
41, 172, -1, -1, 42, -1, 36, -1, 23, -1,
840
-
31, -1, 49, -1, 19, -1, 178, -1, 12, -1,
841
-
13, -1, 174, 164, -1, 175, -1, 174, 137, 175,
842
-
-1, 179, -1, 86, -1, 86, 179, -1, 179, 86,
843
-
-1, 177, 164, -1, 179, -1, 177, 137, 179, -1,
844
-
180, -1, 178, 100, 211, -1, 178, 83, 178, -1,
845
-
178, 84, 178, -1, 178, 85, 178, -1, 178, 86,
846
-
178, -1, 120, 135, 179, 137, 179, 136, -1, 178,
847
-
95, 178, -1, 178, 99, 178, -1, 178, 87, 178,
848
-
-1, 178, 88, 178, -1, 178, 91, 178, -1, 178,
849
-
92, 178, -1, 178, 93, 178, -1, 178, 94, 178,
850
-
-1, 178, 97, 178, -1, 178, 89, 178, -1, 178,
851
-
90, 178, -1, 178, 96, 178, -1, 178, 79, 178,
852
-
-1, 178, 7, 178, -1, 87, 178, -1, 88, 178,
853
-
-1, 180, -1, 179, 100, 211, -1, 179, 67, 179,
854
-
-1, 179, 68, 179, -1, 179, 69, 179, -1, 179,
855
-
70, 179, -1, 179, 71, 179, -1, 179, 72, 179,
856
-
-1, 179, 73, 179, -1, 179, 74, 179, -1, 179,
857
-
75, 179, -1, 179, 76, 179, -1, 179, 77, 179,
858
-
-1, 179, 78, 179, -1, 179, 80, 179, -1, 179,
859
-
81, 179, -1, 179, 82, 179, -1, 179, 83, 179,
860
-
-1, 179, 84, 179, -1, 179, 85, 179, -1, 179,
861
-
86, 179, -1, 120, 135, 179, 137, 179, 136, -1,
862
-
179, 95, 179, -1, 179, 99, 179, -1, 179, 87,
863
-
179, -1, 179, 88, 179, -1, 179, 91, 179, -1,
864
-
179, 92, 179, -1, 179, 93, 179, -1, 179, 94,
865
-
179, -1, 179, 97, 179, -1, 179, 89, 179, -1,
866
-
179, 90, 179, -1, 179, 96, 179, -1, 179, 79,
867
-
179, -1, 179, 7, 179, -1, 98, 179, -1, 87,
868
-
179, -1, 88, 179, -1, 181, -1, 182, -1, 135,
869
-
179, 136, -1, 135, 179, 136, 184, -1, 6, -1,
870
-
6, 184, -1, 54, -1, 54, 184, -1, 4, -1,
871
-
3, -1, 35, -1, 5, -1, 18, -1, 185, -1,
872
-
185, 184, -1, 186, -1, 186, 184, -1, 194, -1,
873
-
194, 184, -1, 195, -1, 195, 184, -1, 198, -1,
874
-
198, 184, -1, 199, -1, 199, 184, -1, 206, -1,
875
-
203, -1, 203, 184, -1, 8, -1, 9, 183, -1,
876
-
177, 11, -1, 177, 10, 183, -1, 57, 173, 59,
877
-
-1, 184, 57, 173, 59, -1, 133, 134, -1, 133,
878
-
176, 134, -1, 133, 179, 139, 187, 134, -1, 188,
879
-
-1, 189, 164, -1, 190, -1, 191, -1, 191, 56,
880
-
179, -1, 189, 137, 190, -1, 189, 137, 191, -1,
881
-
189, 137, 191, 56, 179, -1, 192, 80, 179, -1,
882
-
192, 80, 179, 56, 179, -1, 6, 77, 179, -1,
883
-
193, 164, -1, 6, -1, 193, 137, 6, -1, 57,
884
-
59, -1, 57, 176, 59, -1, 58, 60, -1, 58,
885
-
197, 60, -1, 58, 197, 139, 60, -1, 58, 196,
886
-
60, -1, 139, 139, -1, 139, 197, 139, -1, 196,
887
-
137, 139, 197, 139, -1, 176, -1, 197, 139, 176,
888
-
-1, 57, 179, 139, 187, 59, -1, 33, 179, 51,
889
-
179, 29, -1, 33, 179, 51, 179, 200, 27, 179,
890
-
29, -1, -1, 200, 28, 179, 51, 179, -1, 102,
891
-
-1, 103, -1, 104, -1, 105, -1, 106, -1, 107,
892
-
-1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
893
-
-1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
894
-
-1, 118, -1, 119, -1, 121, -1, 122, -1, 123,
895
-
-1, 128, -1, 124, -1, 125, -1, 126, -1, 127,
896
-
-1, 131, -1, 129, -1, 201, 135, 179, 137, 179,
897
-
136, -1, 201, 135, 179, 136, -1, 6, 135, 136,
898
-
-1, 202, -1, 6, 135, 204, 136, -1, 6, 135,
899
-
204, 136, 135, 179, 136, -1, 205, 164, -1, 179,
900
-
-1, 179, 56, 179, -1, 205, 137, 179, -1, 205,
901
-
137, 179, 56, 179, -1, 37, 133, 207, 134, 80,
902
-
179, -1, 37, 133, 207, 208, 134, 80, 179, -1,
903
-
209, -1, 154, -1, 207, 208, 209, -1, 207, 208,
904
-
154, -1, 137, -1, 132, -1, 166, 210, -1, 166,
905
-
210, 77, 179, -1, -1, 212, -1, 181, -1, 182,
906
-
-1, 100, 211, -1, 212, 100, 211, -1, 6, -1,
907
-
102, -1, 103, -1, 104, -1, 105, -1, 106, -1,
908
-
107, -1, 108, -1, 109, -1, 110, -1, 111, -1,
909
-
112, -1, 113, -1, 114, -1, 115, -1, 116, -1,
910
-
117, -1, 118, -1, 119, -1, 120, -1, 121, -1,
911
-
122, -1, 123, -1, 128, -1, 124, -1, 125, -1,
912
-
126, -1, 127, -1, 129, -1, 131, -1
826
+
/** Accessing symbol of state STATE. */
827
+
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
915
-
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
916
-
static const yytype_uint16 yyrline[] =
918
-
0, 269, 269, 271, 273, 276, 285, 294, 303, 312,
919
-
314, 317, 325, 334, 334, 336, 352, 356, 358, 360,
920
-
361, 363, 365, 367, 369, 371, 374, 374, 374, 375,
921
-
375, 375, 375, 375, 376, 379, 403, 409, 416, 424,
922
-
434, 446, 461, 462, 466, 474, 475, 479, 483, 489,
923
-
491, 498, 503, 508, 515, 519, 527, 537, 544, 553,
924
-
565, 573, 574, 579, 580, 582, 587, 588, 592, 596,
925
-
601, 601, 604, 606, 610, 615, 619, 621, 625, 626,
926
-
632, 641, 644, 652, 660, 669, 678, 687, 700, 701,
927
-
705, 707, 709, 711, 713, 715, 717, 722, 728, 731,
928
-
733, 737, 739, 741, 750, 761, 764, 766, 772, 773,
929
-
775, 777, 779, 781, 790, 799, 801, 803, 805, 807,
930
-
809, 811, 813, 815, 817, 822, 827, 832, 837, 843,
931
-
845, 858, 859, 861, 863, 865, 867, 869, 871, 873,
932
-
875, 877, 879, 881, 883, 885, 887, 889, 891, 893,
933
-
895, 897, 906, 915, 917, 919, 921, 923, 925, 927,
934
-
929, 931, 933, 938, 943, 948, 953, 959, 961, 968,
935
-
980, 982, 986, 988, 990, 992, 995, 997, 1000, 1002,
936
-
1004, 1006, 1008, 1010, 1011, 1014, 1015, 1018, 1019, 1022,
937
-
1023, 1026, 1027, 1030, 1031, 1034, 1035, 1036, 1041, 1043,
938
-
1049, 1054, 1062, 1069, 1078, 1080, 1085, 1091, 1094, 1097,
939
-
1099, 1101, 1107, 1109, 1111, 1119, 1121, 1124, 1127, 1130,
940
-
1132, 1136, 1138, 1142, 1144, 1155, 1166, 1206, 1209, 1214,
941
-
1221, 1226, 1230, 1236, 1243, 1259, 1260, 1264, 1266, 1268,
942
-
1270, 1272, 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288,
943
-
1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308,
944
-
1310, 1312, 1314, 1316, 1318, 1322, 1330, 1362, 1364, 1365,
945
-
1385, 1440, 1443, 1449, 1455, 1457, 1461, 1468, 1477, 1479,
946
-
1487, 1489, 1498, 1498, 1501, 1507, 1518, 1519, 1522, 1524,
947
-
1528, 1532, 1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550,
948
-
1552, 1554, 1556, 1558, 1560, 1562, 1564, 1566, 1568, 1570,
949
-
1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590,
830
+
/* The user-facing name of the symbol whose (internal) number is
831
+
YYSYMBOL. No bounds checking. */
832
+
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
954
-
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
959
-
"\"end of file\"", "error", "$undefined", "\"integer literal\"",
838
+
"\"end of file\"", "error", "\"invalid token\"", "\"integer literal\"",
"\"bool literal\"", "\"float literal\"", "\"identifier\"",
"\"quoted identifier\"", "\"string literal\"",
"\"interpolated string start\"", "\"interpolated string middle\"",
···
"elseif_list", "quoted_op", "quoted_op_call", "call_expr",
"comp_or_expr", "comp_or_expr_head", "let_expr", "let_vardecl_item_list",
"comma_or_semi", "let_vardecl_item", "annotations", "annotation_expr",
1009
-
"ne_annotations", "id_or_quoted_op", 0
888
+
"ne_annotations", "id_or_quoted_op", YY_NULLPTR
891
+
static const char *
892
+
yysymbol_name (yysymbol_kind_t yysymbol)
894
+
return yytname[yysymbol];
1014
-
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1015
-
token YYLEX-NUM. */
1016
-
static const yytype_uint16 yytoknum[] =
899
+
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
900
+
(internal) symbol number NUM (which must be that of a token). */
901
+
static const yytype_int16 yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
···
375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 59, 123, 125, 40, 41, 44, 58, 124
1035
-
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1036
-
static const yytype_uint8 yyr1[] =
1038
-
0, 140, 141, 142, 142, 143, 143, 143, 143, 143,
1039
-
143, 144, 144, 145, 145, 146, 146, 147, 147, 147,
1040
-
147, 147, 147, 147, 147, 147, 148, 148, 148, 148,
1041
-
148, 148, 148, 148, 148, 149, 150, 150, 150, 150,
1042
-
150, 150, 151, 151, 151, 152, 152, 152, 153, 154,
1043
-
154, 155, 155, 155, 156, 157, 157, 158, 158, 159,
1044
-
159, 160, 160, 161, 161, 161, 162, 162, 163, 163,
1045
-
164, 164, 165, 165, 166, 167, 168, 168, 169, 169,
1046
-
169, 170, 170, 170, 170, 170, 170, 170, 171, 171,
1047
-
172, 172, 172, 172, 172, 172, 172, 172, 173, 174,
1048
-
174, 175, 175, 175, 175, 176, 177, 177, 178, 178,
1049
-
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1050
-
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1051
-
178, 179, 179, 179, 179, 179, 179, 179, 179, 179,
1052
-
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
1053
-
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
1054
-
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
1055
-
180, 180, 181, 181, 181, 181, 181, 181, 181, 181,
1056
-
181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1057
-
181, 181, 181, 181, 181, 181, 181, 181, 182, 182,
1058
-
183, 183, 184, 184, 185, 185, 186, 187, 188, 189,
1059
-
189, 189, 189, 189, 189, 190, 190, 191, 192, 193,
1060
-
193, 194, 194, 195, 195, 195, 195, 196, 196, 196,
1061
-
197, 197, 198, 199, 199, 200, 200, 201, 201, 201,
1062
-
201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
1063
-
201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
1064
-
201, 201, 201, 201, 201, 202, 202, 203, 203, 203,
1065
-
203, 204, 205, 205, 205, 205, 206, 206, 207, 207,
1066
-
207, 207, 208, 208, 209, 209, 210, 210, 211, 211,
1067
-
212, 212, 213, 213, 213, 213, 213, 213, 213, 213,
1068
-
213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
1069
-
213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
920
+
#define YYPACT_NINF (-402)
1073
-
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1074
-
static const yytype_uint8 yyr2[] =
1076
-
0, 2, 1, 0, 2, 1, 2, 3, 4, 2,
1077
-
3, 1, 2, 0, 1, 2, 1, 1, 1, 1,
1078
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1079
-
1, 1, 1, 1, 1, 2, 2, 4, 2, 6,
1080
-
6, 7, 0, 1, 3, 0, 1, 3, 3, 2,
1081
-
4, 3, 4, 4, 2, 5, 5, 7, 8, 3,
1082
-
5, 0, 2, 0, 3, 3, 0, 2, 1, 3,
1083
-
0, 1, 1, 1, 3, 2, 1, 3, 1, 6,
1084
-
3, 1, 2, 3, 3, 4, 5, 5, 0, 1,
1085
-
1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
1086
-
3, 1, 1, 2, 2, 2, 1, 3, 1, 3,
1087
-
3, 3, 3, 3, 6, 3, 3, 3, 3, 3,
1088
-
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
1089
-
2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
1090
-
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1091
-
3, 3, 6, 3, 3, 3, 3, 3, 3, 3,
1092
-
3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
1093
-
1, 1, 3, 4, 1, 2, 1, 2, 1, 1,
1094
-
1, 1, 1, 1, 2, 1, 2, 1, 2, 1,
1095
-
2, 1, 2, 1, 2, 1, 1, 2, 1, 2,
1096
-
2, 3, 3, 4, 2, 3, 5, 1, 2, 1,
1097
-
1, 3, 3, 3, 5, 3, 5, 3, 2, 1,
1098
-
3, 2, 3, 2, 3, 4, 3, 2, 3, 5,
1099
-
1, 3, 5, 5, 8, 0, 5, 1, 1, 1,
1100
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1101
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1102
-
1, 1, 1, 1, 1, 6, 4, 3, 1, 4,
1103
-
7, 2, 1, 3, 3, 5, 6, 7, 1, 1,
1104
-
3, 3, 1, 1, 2, 4, 0, 1, 1, 1,
1105
-
2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1106
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1107
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
922
+
#define yypact_value_is_default(Yyn) \
923
+
((Yyn) == YYPACT_NINF)
1111
-
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1112
-
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1113
-
means the default is an error. */
1114
-
static const yytype_uint16 yydefact[] =
1116
-
0, 0, 179, 178, 181, 174, 198, 0, 96, 97,
1117
-
88, 11, 88, 88, 182, 94, 0, 0, 91, 0,
1118
-
0, 92, 88, 0, 0, 180, 90, 0, 0, 89,
1119
-
0, 0, 286, 93, 0, 176, 0, 0, 0, 0,
1120
-
237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
1121
-
247, 248, 249, 250, 251, 252, 253, 254, 0, 255,
1122
-
256, 257, 259, 260, 261, 262, 258, 264, 263, 0,
1123
-
0, 0, 2, 13, 88, 5, 16, 17, 18, 19,
1124
-
20, 21, 22, 23, 24, 25, 286, 0, 78, 0,
1125
-
81, 95, 108, 170, 171, 183, 185, 187, 189, 191,
1126
-
193, 0, 268, 196, 195, 88, 0, 0, 0, 175,
1127
-
174, 0, 0, 0, 0, 0, 106, 131, 199, 15,
1128
-
89, 0, 0, 63, 88, 0, 49, 38, 0, 0,
1129
-
35, 88, 88, 82, 54, 63, 0, 0, 287, 63,
1130
-
177, 221, 0, 70, 106, 223, 0, 230, 0, 0,
1131
-
129, 130, 0, 204, 0, 106, 0, 1, 14, 4,
1132
-
12, 6, 34, 29, 27, 32, 26, 28, 31, 30,
1133
-
33, 9, 36, 0, 0, 0, 0, 0, 0, 0,
1134
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1135
-
0, 0, 0, 0, 184, 186, 188, 190, 192, 194,
1136
-
0, 197, 10, 102, 0, 70, 99, 101, 48, 267,
1137
-
272, 0, 70, 0, 168, 169, 167, 0, 0, 200,
1138
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1139
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1140
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1141
-
0, 0, 0, 0, 0, 0, 84, 0, 83, 0,
1142
-
59, 0, 70, 76, 0, 0, 0, 0, 279, 286,
1143
-
0, 0, 278, 80, 286, 288, 289, 290, 0, 0,
1144
-
51, 0, 286, 222, 71, 105, 0, 227, 0, 226,
1145
-
0, 224, 0, 0, 205, 0, 172, 88, 7, 0,
1146
-
74, 0, 128, 127, 110, 111, 112, 113, 117, 118,
1147
-
124, 125, 119, 120, 121, 122, 115, 126, 123, 116,
1148
-
109, 0, 103, 202, 71, 98, 104, 0, 269, 71,
1149
-
271, 0, 0, 201, 107, 166, 133, 134, 135, 136,
1150
-
137, 138, 139, 140, 141, 142, 143, 144, 165, 145,
1151
-
146, 147, 148, 149, 150, 151, 155, 156, 162, 163,
1152
-
157, 158, 159, 160, 153, 164, 161, 154, 132, 0,
1153
-
0, 0, 0, 70, 68, 72, 73, 0, 0, 71,
1154
-
75, 50, 0, 42, 45, 292, 293, 294, 295, 296,
1155
-
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
1156
-
307, 308, 309, 310, 311, 312, 313, 314, 316, 317,
1157
-
318, 319, 315, 320, 321, 63, 235, 284, 0, 283,
1158
-
0, 282, 88, 61, 53, 52, 291, 61, 219, 0,
1159
-
207, 70, 209, 210, 0, 70, 228, 0, 225, 231,
1160
-
0, 0, 173, 8, 37, 66, 85, 266, 0, 100,
1161
-
273, 0, 274, 203, 0, 87, 86, 65, 64, 71,
1162
-
67, 60, 88, 77, 0, 43, 0, 46, 0, 286,
1163
-
233, 0, 0, 74, 0, 0, 281, 280, 0, 55,
1164
-
56, 0, 232, 71, 208, 0, 0, 71, 218, 0,
1165
-
0, 206, 0, 0, 0, 0, 0, 69, 79, 0,
1166
-
40, 0, 39, 0, 61, 0, 0, 285, 276, 0,
1167
-
62, 217, 212, 213, 211, 215, 220, 229, 114, 286,
1168
-
265, 270, 275, 152, 41, 44, 47, 57, 0, 0,
1169
-
277, 0, 0, 61, 234, 0, 214, 216, 58, 236
925
+
#define YYTABLE_NINF (-89)
1172
-
/* YYDEFGOTO[NTERM-NUM]. */
1173
-
static const yytype_int16 yydefgoto[] =
1175
-
-1, 71, 72, 73, 74, 159, 75, 76, 171, 77,
1176
-
78, 466, 468, 79, 80, 81, 82, 83, 84, 85,
1177
-
479, 260, 372, 373, 285, 374, 86, 261, 262, 87,
1178
-
88, 89, 90, 204, 205, 206, 147, 143, 91, 116,
1179
-
117, 93, 94, 118, 109, 95, 96, 429, 430, 431,
1180
-
432, 433, 434, 435, 97, 98, 148, 149, 99, 100,
1181
-
471, 101, 102, 103, 211, 212, 104, 271, 422, 272,
1182
-
137, 277, 138, 415
927
+
#define yytable_value_is_error(Yyn) \
928
+
((Yyn) == YYTABLE_NINF)
1185
-
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1187
-
#define YYPACT_NINF -402
930
+
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
static const yytype_int16 yypact[] =
823, -103, -402, -402, -402, -8, -402, 3485, -402, -402,
···
4739, 3485, 3485, 166, -402, 3485, 4739, 4739, -402, 4739
1246
-
/* YYPGOTO[NTERM-NUM]. */
990
+
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
991
+
Performed when YYTABLE does not specify something else to do. Zero
992
+
means the default is an error. */
993
+
static const yytype_int16 yydefact[] =
995
+
0, 0, 179, 178, 181, 174, 198, 0, 96, 97,
996
+
88, 11, 88, 88, 182, 94, 0, 0, 91, 0,
997
+
0, 92, 88, 0, 0, 180, 90, 0, 0, 89,
998
+
0, 0, 286, 93, 0, 176, 0, 0, 0, 0,
999
+
237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
1000
+
247, 248, 249, 250, 251, 252, 253, 254, 0, 255,
1001
+
256, 257, 259, 260, 261, 262, 258, 264, 263, 0,
1002
+
0, 0, 2, 13, 88, 5, 16, 17, 18, 19,
1003
+
20, 21, 22, 23, 24, 25, 286, 0, 78, 0,
1004
+
81, 95, 108, 170, 171, 183, 185, 187, 189, 191,
1005
+
193, 0, 268, 196, 195, 88, 0, 0, 0, 175,
1006
+
174, 0, 0, 0, 0, 0, 106, 131, 199, 15,
1007
+
89, 0, 0, 63, 88, 0, 49, 38, 0, 0,
1008
+
35, 88, 88, 82, 54, 63, 0, 0, 287, 63,
1009
+
177, 221, 0, 70, 106, 223, 0, 230, 0, 0,
1010
+
129, 130, 0, 204, 0, 106, 0, 1, 14, 4,
1011
+
12, 6, 34, 29, 27, 32, 26, 28, 31, 30,
1012
+
33, 9, 36, 0, 0, 0, 0, 0, 0, 0,
1013
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1014
+
0, 0, 0, 0, 184, 186, 188, 190, 192, 194,
1015
+
0, 197, 10, 102, 0, 70, 99, 101, 48, 267,
1016
+
272, 0, 70, 0, 168, 169, 167, 0, 0, 200,
1017
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1018
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1019
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1020
+
0, 0, 0, 0, 0, 0, 84, 0, 83, 0,
1021
+
59, 0, 70, 76, 0, 0, 0, 0, 279, 286,
1022
+
0, 0, 278, 80, 286, 288, 289, 290, 0, 0,
1023
+
51, 0, 286, 222, 71, 105, 0, 227, 0, 226,
1024
+
0, 224, 0, 0, 205, 0, 172, 88, 7, 0,
1025
+
74, 0, 128, 127, 110, 111, 112, 113, 117, 118,
1026
+
124, 125, 119, 120, 121, 122, 115, 126, 123, 116,
1027
+
109, 0, 103, 202, 71, 98, 104, 0, 269, 71,
1028
+
271, 0, 0, 201, 107, 166, 133, 134, 135, 136,
1029
+
137, 138, 139, 140, 141, 142, 143, 144, 165, 145,
1030
+
146, 147, 148, 149, 150, 151, 155, 156, 162, 163,
1031
+
157, 158, 159, 160, 153, 164, 161, 154, 132, 0,
1032
+
0, 0, 0, 70, 68, 72, 73, 0, 0, 71,
1033
+
75, 50, 0, 42, 45, 292, 293, 294, 295, 296,
1034
+
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
1035
+
307, 308, 309, 310, 311, 312, 313, 314, 316, 317,
1036
+
318, 319, 315, 320, 321, 63, 235, 284, 0, 283,
1037
+
0, 282, 88, 61, 53, 52, 291, 61, 219, 0,
1038
+
207, 70, 209, 210, 0, 70, 228, 0, 225, 231,
1039
+
0, 0, 173, 8, 37, 66, 85, 266, 0, 100,
1040
+
273, 0, 274, 203, 0, 87, 86, 65, 64, 71,
1041
+
67, 60, 88, 77, 0, 43, 0, 46, 0, 286,
1042
+
233, 0, 0, 74, 0, 0, 281, 280, 0, 55,
1043
+
56, 0, 232, 71, 208, 0, 0, 71, 218, 0,
1044
+
0, 206, 0, 0, 0, 0, 0, 69, 79, 0,
1045
+
40, 0, 39, 0, 61, 0, 0, 285, 276, 0,
1046
+
62, 217, 212, 213, 211, 215, 220, 229, 114, 286,
1047
+
265, 270, 275, 152, 41, 44, 47, 57, 0, 0,
1048
+
277, 0, 0, 61, 234, 0, 214, 216, 58, 236
1051
+
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
-402, -402, -402, -402, 117, -402, -62, 267, -402, -402,
···
1259
-
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1260
-
positive, shift that token. If negative, reduce the rule which
1261
-
number is the opposite. If zero, do what YYDEFACT says.
1262
-
If YYTABLE_NINF, syntax error. */
1263
-
#define YYTABLE_NINF -89
1064
+
/* YYDEFGOTO[NTERM-NUM]. */
1065
+
static const yytype_int16 yydefgoto[] =
1067
+
0, 71, 72, 73, 74, 159, 75, 76, 171, 77,
1068
+
78, 466, 468, 79, 80, 81, 82, 83, 84, 85,
1069
+
479, 260, 372, 373, 285, 374, 86, 261, 262, 87,
1070
+
88, 89, 90, 204, 205, 206, 147, 143, 91, 116,
1071
+
117, 93, 94, 118, 109, 95, 96, 429, 430, 431,
1072
+
432, 433, 434, 435, 97, 98, 148, 149, 99, 100,
1073
+
471, 101, 102, 103, 211, 212, 104, 271, 422, 272,
1074
+
137, 277, 138, 415
1077
+
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1078
+
positive, shift that token. If negative, reduce the rule whose
1079
+
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
126, 142, 273, 172, 129, 128, 269, 133, 268, 288,
···
92, 93, 94, 95, 96, 97, -1, 99, 100
2284
-
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2285
-
symbol of state STATE-NUM. */
2100
+
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2101
+
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
0, 1, 3, 4, 5, 6, 8, 9, 12, 13,
···
179, 56, 56, 210, 29, 51, 179, 179, 160, 179
2344
-
#define yyerrok (yyerrstatus = 0)
2345
-
#define yyclearin (yychar = YYEMPTY)
2346
-
#define YYEMPTY (-2)
2160
+
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2161
+
static const yytype_uint8 yyr1[] =
2163
+
0, 140, 141, 142, 142, 143, 143, 143, 143, 143,
2164
+
143, 144, 144, 145, 145, 146, 146, 147, 147, 147,
2165
+
147, 147, 147, 147, 147, 147, 148, 148, 148, 148,
2166
+
148, 148, 148, 148, 148, 149, 150, 150, 150, 150,
2167
+
150, 150, 151, 151, 151, 152, 152, 152, 153, 154,
2168
+
154, 155, 155, 155, 156, 157, 157, 158, 158, 159,
2169
+
159, 160, 160, 161, 161, 161, 162, 162, 163, 163,
2170
+
164, 164, 165, 165, 166, 167, 168, 168, 169, 169,
2171
+
169, 170, 170, 170, 170, 170, 170, 170, 171, 171,
2172
+
172, 172, 172, 172, 172, 172, 172, 172, 173, 174,
2173
+
174, 175, 175, 175, 175, 176, 177, 177, 178, 178,
2174
+
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
2175
+
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
2176
+
178, 179, 179, 179, 179, 179, 179, 179, 179, 179,
2177
+
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
2178
+
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
2179
+
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
2180
+
180, 180, 181, 181, 181, 181, 181, 181, 181, 181,
2181
+
181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
2182
+
181, 181, 181, 181, 181, 181, 181, 181, 182, 182,
2183
+
183, 183, 184, 184, 185, 185, 186, 187, 188, 189,
2184
+
189, 189, 189, 189, 189, 190, 190, 191, 192, 193,
2185
+
193, 194, 194, 195, 195, 195, 195, 196, 196, 196,
2186
+
197, 197, 198, 199, 199, 200, 200, 201, 201, 201,
2187
+
201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
2188
+
201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
2189
+
201, 201, 201, 201, 201, 202, 202, 203, 203, 203,
2190
+
203, 204, 205, 205, 205, 205, 206, 206, 207, 207,
2191
+
207, 207, 208, 208, 209, 209, 210, 210, 211, 211,
2192
+
212, 212, 213, 213, 213, 213, 213, 213, 213, 213,
2193
+
213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
2194
+
213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
2349
-
#define YYACCEPT goto yyacceptlab
2350
-
#define YYABORT goto yyabortlab
2351
-
#define YYERROR goto yyerrorlab
2198
+
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
2199
+
static const yytype_int8 yyr2[] =
2201
+
0, 2, 1, 0, 2, 1, 2, 3, 4, 2,
2202
+
3, 1, 2, 0, 1, 2, 1, 1, 1, 1,
2203
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2204
+
1, 1, 1, 1, 1, 2, 2, 4, 2, 6,
2205
+
6, 7, 0, 1, 3, 0, 1, 3, 3, 2,
2206
+
4, 3, 4, 4, 2, 5, 5, 7, 8, 3,
2207
+
5, 0, 2, 0, 3, 3, 0, 2, 1, 3,
2208
+
0, 1, 1, 1, 3, 2, 1, 3, 1, 6,
2209
+
3, 1, 2, 3, 3, 4, 5, 5, 0, 1,
2210
+
1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
2211
+
3, 1, 1, 2, 2, 2, 1, 3, 1, 3,
2212
+
3, 3, 3, 3, 6, 3, 3, 3, 3, 3,
2213
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
2214
+
2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
2215
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2216
+
3, 3, 6, 3, 3, 3, 3, 3, 3, 3,
2217
+
3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
2218
+
1, 1, 3, 4, 1, 2, 1, 2, 1, 1,
2219
+
1, 1, 1, 1, 2, 1, 2, 1, 2, 1,
2220
+
2, 1, 2, 1, 2, 1, 1, 2, 1, 2,
2221
+
2, 3, 3, 4, 2, 3, 5, 1, 2, 1,
2222
+
1, 3, 3, 3, 5, 3, 5, 3, 2, 1,
2223
+
3, 2, 3, 2, 3, 4, 3, 2, 3, 5,
2224
+
1, 3, 5, 5, 8, 0, 5, 1, 1, 1,
2225
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2226
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2227
+
1, 1, 1, 1, 1, 6, 4, 3, 1, 4,
2228
+
7, 2, 1, 3, 3, 5, 6, 7, 1, 1,
2229
+
3, 3, 1, 1, 2, 4, 0, 1, 1, 1,
2230
+
2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2231
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2232
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2354
-
/* Like YYERROR except do call yyerror. This remains here temporarily
2355
-
to ease the transition to the new meaning of YYERROR, for GCC.
2356
-
Once GCC version 2 has supplanted version 1, this can go. */
2237
+
enum { YYENOMEM = -2 };
2358
-
#define YYFAIL goto yyerrlab
2239
+
#define yyerrok (yyerrstatus = 0)
2240
+
#define yyclearin (yychar = YYEMPTY)
2360
-
#define YYRECOVERING() (!!yyerrstatus)
2242
+
#define YYACCEPT goto yyacceptlab
2243
+
#define YYABORT goto yyabortlab
2244
+
#define YYERROR goto yyerrorlab
2362
-
#define YYBACKUP(Token, Value) \
2364
-
if (yychar == YYEMPTY && yylen == 1) \
2366
-
yychar = (Token); \
2367
-
yylval = (Value); \
2368
-
yytoken = YYTRANSLATE (yychar); \
2374
-
yyerror (&yylloc, parm, YY_("syntax error: cannot back up")); \
2247
+
#define YYRECOVERING() (!!yyerrstatus)
2380
-
#define YYTERROR 1
2381
-
#define YYERRCODE 256
2249
+
#define YYBACKUP(Token, Value) \
2251
+
if (yychar == YYEMPTY) \
2253
+
yychar = (Token); \
2254
+
yylval = (Value); \
2255
+
YYPOPSTACK (yylen); \
2256
+
yystate = *yyssp; \
2261
+
yyerror (&yylloc, parm, YY_("syntax error: cannot back up")); \
2266
+
/* Backward compatibility with an undocumented macro.
2267
+
Use YYerror or YYUNDEF. */
2268
+
#define YYERRCODE YYUNDEF
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
2388
-
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2390
-
# define YYLLOC_DEFAULT(Current, Rhs, N) \
2394
-
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2395
-
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2396
-
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2397
-
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2401
-
(Current).first_line = (Current).last_line = \
2402
-
YYRHSLOC (Rhs, 0).last_line; \
2403
-
(Current).first_column = (Current).last_column = \
2404
-
YYRHSLOC (Rhs, 0).last_column; \
2275
+
# define YYLLOC_DEFAULT(Current, Rhs, N) \
2279
+
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2280
+
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2281
+
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2282
+
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2286
+
(Current).first_line = (Current).last_line = \
2287
+
YYRHSLOC (Rhs, 0).last_line; \
2288
+
(Current).first_column = (Current).last_column = \
2289
+
YYRHSLOC (Rhs, 0).last_column; \
2294
+
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
2297
+
/* Enable debugging if requested. */
2300
+
# ifndef YYFPRINTF
2301
+
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2302
+
# define YYFPRINTF fprintf
2305
+
# define YYDPRINTF(Args) \
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
2414
-
#ifndef YY_LOCATION_PRINT
2415
-
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2416
-
# define YY_LOCATION_PRINT(File, Loc) \
2417
-
fprintf (File, "%d.%d-%d.%d", \
2418
-
(Loc).first_line, (Loc).first_column, \
2419
-
(Loc).last_line, (Loc).last_column)
2421
-
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2316
+
# ifndef YY_LOCATION_PRINT
2317
+
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2319
+
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
2426
-
/* YYLEX -- calling `yylex' with the right arguments. */
2321
+
YY_ATTRIBUTE_UNUSED
2323
+
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
2326
+
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
2327
+
if (0 <= yylocp->first_line)
2329
+
res += YYFPRINTF (yyo, "%d", yylocp->first_line);
2330
+
if (0 <= yylocp->first_column)
2331
+
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
2333
+
if (0 <= yylocp->last_line)
2335
+
if (yylocp->first_line < yylocp->last_line)
2337
+
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
2339
+
res += YYFPRINTF (yyo, ".%d", end_col);
2341
+
else if (0 <= end_col && yylocp->first_column < end_col)
2342
+
res += YYFPRINTF (yyo, "-%d", end_col);
2428
-
#ifdef YYLEX_PARAM
2429
-
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
2431
-
# define YYLEX yylex (&yylval, &yylloc, SCANNER)
2347
+
# define YY_LOCATION_PRINT(File, Loc) \
2348
+
yy_location_print_ (File, &(Loc))
2434
-
/* Enable debugging if requested. */
2351
+
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2353
+
# endif /* !defined YY_LOCATION_PRINT */
2437
-
# ifndef YYFPRINTF
2438
-
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2439
-
# define YYFPRINTF fprintf
2442
-
# define YYDPRINTF(Args) \
2446
-
} while (YYID (0))
2356
+
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
2360
+
YYFPRINTF (stderr, "%s ", Title); \
2361
+
yy_symbol_print (stderr, \
2362
+
Kind, Value, Location, parm); \
2363
+
YYFPRINTF (stderr, "\n"); \
2448
-
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2452
-
YYFPRINTF (stderr, "%s ", Title); \
2453
-
yy_symbol_print (stderr, \
2454
-
Type, Value, Location, parm); \
2455
-
YYFPRINTF (stderr, "\n"); \
2457
-
} while (YYID (0))
2460
-
/*--------------------------------.
2461
-
| Print this symbol on YYOUTPUT. |
2462
-
`--------------------------------*/
2368
+
/*-----------------------------------.
2369
+
| Print this symbol's value on YYO. |
2370
+
`-----------------------------------*/
2465
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2466
-
|| defined __cplusplus || defined _MSC_VER)
2468
-
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *parm)
2471
-
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parm)
2474
-
YYSTYPE const * const yyvaluep;
2475
-
YYLTYPE const * const yylocationp;
2373
+
yy_symbol_value_print (FILE *yyo,
2374
+
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *parm)
2376
+
FILE *yyoutput = yyo;
2377
+
YY_USE (yyoutput);
2378
+
YY_USE (yylocationp);
2481
-
YYUSE (yylocationp);
2484
-
if (yytype < YYNTOKENS)
2485
-
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2383
+
if (yykind < YYNTOKENS)
2384
+
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
2386
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2388
+
YY_IGNORE_MAYBE_UNINITIALIZED_END
2497
-
/*--------------------------------.
2498
-
| Print this symbol on YYOUTPUT. |
2499
-
`--------------------------------*/
2392
+
/*---------------------------.
2393
+
| Print this symbol on YYO. |
2394
+
`---------------------------*/
2501
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2502
-
|| defined __cplusplus || defined _MSC_VER)
2504
-
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *parm)
2507
-
yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parm)
2510
-
YYSTYPE const * const yyvaluep;
2511
-
YYLTYPE const * const yylocationp;
2397
+
yy_symbol_print (FILE *yyo,
2398
+
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *parm)
2515
-
if (yytype < YYNTOKENS)
2516
-
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2518
-
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2400
+
YYFPRINTF (yyo, "%s %s (",
2401
+
yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
2520
-
YY_LOCATION_PRINT (yyoutput, *yylocationp);
2521
-
YYFPRINTF (yyoutput, ": ");
2522
-
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parm);
2523
-
YYFPRINTF (yyoutput, ")");
2403
+
YY_LOCATION_PRINT (yyo, *yylocationp);
2404
+
YYFPRINTF (yyo, ": ");
2405
+
yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, parm);
2406
+
YYFPRINTF (yyo, ")");
/*------------------------------------------------------------------.
···
`------------------------------------------------------------------*/
2531
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2532
-
|| defined __cplusplus || defined _MSC_VER)
2534
-
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
2537
-
yy_stack_print (bottom, top)
2538
-
yytype_int16 *bottom;
2539
-
yytype_int16 *top;
2415
+
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
YYFPRINTF (stderr, "Stack now");
2543
-
for (; bottom <= top; ++bottom)
2544
-
YYFPRINTF (stderr, " %d", *bottom);
2418
+
for (; yybottom <= yytop; yybottom++)
2420
+
int yybot = *yybottom;
2421
+
YYFPRINTF (stderr, " %d", yybot);
YYFPRINTF (stderr, "\n");
2548
-
# define YY_STACK_PRINT(Bottom, Top) \
2551
-
yy_stack_print ((Bottom), (Top)); \
2552
-
} while (YYID (0))
2426
+
# define YY_STACK_PRINT(Bottom, Top) \
2429
+
yy_stack_print ((Bottom), (Top)); \
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
2559
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2560
-
|| defined __cplusplus || defined _MSC_VER)
2562
-
yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *parm)
2565
-
yy_reduce_print (yyvsp, yylsp, yyrule, parm)
2438
+
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
2439
+
int yyrule, void *parm)
2441
+
int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
2574
-
unsigned long int yylno = yyrline[yyrule];
2575
-
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
2576
-
yyrule - 1, yylno);
2444
+
YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
2445
+
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
2580
-
fprintf (stderr, " $%d = ", yyi + 1);
2581
-
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
2582
-
&(yyvsp[(yyi + 1) - (yynrhs)])
2583
-
, &(yylsp[(yyi + 1) - (yynrhs)]) , parm);
2584
-
fprintf (stderr, "\n");
2449
+
YYFPRINTF (stderr, " $%d = ", yyi + 1);
2450
+
yy_symbol_print (stderr,
2451
+
YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
2452
+
&yyvsp[(yyi + 1) - (yynrhs)],
2453
+
&(yylsp[(yyi + 1) - (yynrhs)]), parm);
2454
+
YYFPRINTF (stderr, "\n");
2588
-
# define YY_REDUCE_PRINT(Rule) \
2591
-
yy_reduce_print (yyvsp, yylsp, Rule, parm); \
2592
-
} while (YYID (0))
2458
+
# define YY_REDUCE_PRINT(Rule) \
2461
+
yy_reduce_print (yyssp, yyvsp, yylsp, Rule, parm); \
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
2598
-
# define YYDPRINTF(Args)
2599
-
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2468
+
# define YYDPRINTF(Args) ((void) 0)
2469
+
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
/* YYINITDEPTH -- initial size of the parser's stacks. */
2606
-
#ifndef YYINITDEPTH
2476
+
#ifndef YYINITDEPTH
···
# define YYMAXDEPTH 10000
2623
-
#if YYERROR_VERBOSE
2492
+
/* Context of a parse error. */
2495
+
yy_state_t *yyssp;
2496
+
yysymbol_kind_t yytoken;
2626
-
# if defined __GLIBC__ && defined _STRING_H
2627
-
# define yystrlen strlen
2500
+
/* Put in YYARG at most YYARGN of the expected tokens given the
2501
+
current YYCTX, and return the number of tokens stored in YYARG. If
2502
+
YYARG is null, return the number of expected tokens (guaranteed to
2503
+
be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
2504
+
Return 0 if there are more than YYARGN expected tokens, yet fill
2505
+
YYARG up to YYARGN. */
2507
+
yypcontext_expected_tokens (const yypcontext_t *yyctx,
2508
+
yysymbol_kind_t yyarg[], int yyargn)
2510
+
/* Actual size of YYARG. */
2512
+
int yyn = yypact[+*yyctx->yyssp];
2513
+
if (!yypact_value_is_default (yyn))
2515
+
/* Start YYX at -YYN if negative to avoid negative indexes in
2516
+
YYCHECK. In other words, skip the first -YYN actions for
2517
+
this state because they are default actions. */
2518
+
int yyxbegin = yyn < 0 ? -yyn : 0;
2519
+
/* Stay within bounds of both yycheck and yytname. */
2520
+
int yychecklim = YYLAST - yyn + 1;
2521
+
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2523
+
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2524
+
if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
2525
+
&& !yytable_value_is_error (yytable[yyx + yyn]))
2529
+
else if (yycount == yyargn)
2532
+
yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
2535
+
if (yyarg && yycount == 0 && 0 < yyargn)
2536
+
yyarg[0] = YYSYMBOL_YYEMPTY;
2544
+
# if defined __GLIBC__ && defined _STRING_H
2545
+
# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
/* Return the length of YYSTR. */
2630
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2631
-
|| defined __cplusplus || defined _MSC_VER)
2548
+
static YYPTRDIFF_T
yystrlen (const char *yystr)
2637
-
const char *yystr;
2551
+
YYPTRDIFF_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
2649
-
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2650
-
# define yystpcpy stpcpy
2560
+
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2561
+
# define yystpcpy stpcpy
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2654
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2655
-
|| defined __cplusplus || defined _MSC_VER)
yystpcpy (char *yydest, const char *yysrc)
2660
-
yystpcpy (yydest, yysrc)
2662
-
const char *yysrc;
···
2676
-
# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
···
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
2587
+
static YYPTRDIFF_T
yytnamerr (char *yyres, const char *yystr)
2592
+
YYPTRDIFF_T yyn = 0;
2697
-
goto do_not_strip_quotes;
2599
+
goto do_not_strip_quotes;
2602
+
if (*++yyp != '\\')
2603
+
goto do_not_strip_quotes;
2700
-
if (*++yyp != '\\')
2701
-
goto do_not_strip_quotes;
2702
-
/* Fall through. */
2705
-
yyres[yyn] = *yyp;
2610
+
yyres[yyn] = *yyp;
2711
-
yyres[yyn] = '\0';
2616
+
yyres[yyn] = '\0';
2623
+
return yystpcpy (yyres, yystr) - yyres;
2720
-
return yystpcpy (yyres, yystr) - yyres;
2724
-
/* Copy into YYRESULT an error message about the unexpected token
2725
-
YYCHAR while in state YYSTATE. Return the number of bytes copied,
2726
-
including the terminating null byte. If YYRESULT is null, do not
2727
-
copy anything; just return the number of bytes that would be
2728
-
copied. As a special case, return 0 if an ordinary "syntax error"
2729
-
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2730
-
size calculation. */
2732
-
yysyntax_error (char *yyresult, int yystate, int yychar)
2631
+
yy_syntax_error_arguments (const yypcontext_t *yyctx,
2632
+
yysymbol_kind_t yyarg[], int yyargn)
2734
-
int yyn = yypact[yystate];
2736
-
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2634
+
/* Actual size of YYARG. */
2636
+
/* There are many possibilities here to consider:
2637
+
- If this state is a consistent state with a default action, then
2638
+
the only way this function was invoked is if the default action
2639
+
is an error action. In that case, don't check for expected
2640
+
tokens because there are none.
2641
+
- The only way there can be no lookahead present (in yychar) is if
2642
+
this state is a consistent state with a default action. Thus,
2643
+
detecting the absence of a lookahead is sufficient to determine
2644
+
that there is no unexpected or expected token to report. In that
2645
+
case, just report a simple "syntax error".
2646
+
- Don't assume there isn't a lookahead just because this state is a
2647
+
consistent state with a default action. There might have been a
2648
+
previous inconsistent state, consistent state with a non-default
2649
+
action, or user semantic action that manipulated yychar.
2650
+
- Of course, the expected token list depends on states to have
2651
+
correct lookahead information, and it depends on the parser not
2652
+
to perform extra reductions after fetching a lookahead from the
2653
+
scanner and before detecting a syntax error. Thus, state merging
2654
+
(from LALR or IELR) and default reductions corrupt the expected
2655
+
token list. However, the list is correct for canonical LR with
2656
+
one exception: it will still contain any token that will not be
2657
+
accepted due to an error action in a later state.
2659
+
if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
2740
-
int yytype = YYTRANSLATE (yychar);
2741
-
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2742
-
YYSIZE_T yysize = yysize0;
2744
-
int yysize_overflow = 0;
2745
-
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2746
-
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2663
+
yyarg[yycount] = yyctx->yytoken;
2665
+
yyn = yypcontext_expected_tokens (yyctx,
2666
+
yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2667
+
if (yyn == YYENOMEM)
2750
-
/* This is so xgettext sees the translatable formats that are
2751
-
constructed on the fly. */
2752
-
YY_("syntax error, unexpected %s");
2753
-
YY_("syntax error, unexpected %s, expecting %s");
2754
-
YY_("syntax error, unexpected %s, expecting %s or %s");
2755
-
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2756
-
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2760
-
static char const yyunexpected[] = "syntax error, unexpected %s";
2761
-
static char const yyexpecting[] = ", expecting %s";
2762
-
static char const yyor[] = " or %s";
2763
-
char yyformat[sizeof yyunexpected
2764
-
+ sizeof yyexpecting - 1
2765
-
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2766
-
* (sizeof yyor - 1))];
2767
-
char const *yyprefix = yyexpecting;
2675
+
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
2676
+
about the unexpected token YYTOKEN for the state stack whose top is
2769
-
/* Start YYX at -YYN if negative to avoid negative indexes in
2771
-
int yyxbegin = yyn < 0 ? -yyn : 0;
2679
+
Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
2680
+
not large enough to hold the message. In that case, also set
2681
+
*YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
2682
+
required number of bytes is too large to store. */
2684
+
yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
2685
+
const yypcontext_t *yyctx)
2687
+
enum { YYARGS_MAX = 5 };
2688
+
/* Internationalized format string. */
2689
+
const char *yyformat = YY_NULLPTR;
2690
+
/* Arguments of yyformat: reported tokens (one for the "unexpected",
2691
+
one per "expected"). */
2692
+
yysymbol_kind_t yyarg[YYARGS_MAX];
2693
+
/* Cumulated lengths of YYARG. */
2694
+
YYPTRDIFF_T yysize = 0;
2773
-
/* Stay within bounds of both yycheck and yytname. */
2774
-
int yychecklim = YYLAST - yyn + 1;
2775
-
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2696
+
/* Actual size of YYARG. */
2697
+
int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
2698
+
if (yycount == YYENOMEM)
2778
-
yyarg[0] = yytname[yytype];
2779
-
yyfmt = yystpcpy (yyformat, yyunexpected);
2703
+
#define YYCASE_(N, S) \
2707
+
default: /* Avoid compiler warnings. */
2708
+
YYCASE_(0, YY_("syntax error"));
2709
+
YYCASE_(1, YY_("syntax error, unexpected %s"));
2710
+
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2711
+
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2712
+
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2713
+
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2781
-
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2782
-
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2784
-
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2788
-
yyformat[sizeof yyunexpected - 1] = '\0';
2791
-
yyarg[yycount++] = yytname[yyx];
2792
-
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2793
-
yysize_overflow |= (yysize1 < yysize);
2795
-
yyfmt = yystpcpy (yyfmt, yyprefix);
2717
+
/* Compute error message size. Don't count the "%s"s, but reserve
2718
+
room for the terminator. */
2719
+
yysize = yystrlen (yyformat) - 2 * yycount + 1;
2722
+
for (yyi = 0; yyi < yycount; ++yyi)
2724
+
YYPTRDIFF_T yysize1
2725
+
= yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
2726
+
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
2799
-
yyf = YY_(yyformat);
2800
-
yysize1 = yysize + yystrlen (yyf);
2801
-
yysize_overflow |= (yysize1 < yysize);
2733
+
if (*yymsg_alloc < yysize)
2735
+
*yymsg_alloc = 2 * yysize;
2736
+
if (! (yysize <= *yymsg_alloc
2737
+
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2738
+
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2804
-
if (yysize_overflow)
2805
-
return YYSIZE_MAXIMUM;
2742
+
/* Avoid sprintf, as that infringes on the user's name space.
2743
+
Don't have undefined behavior even if the translation
2744
+
produced a string with the wrong number of "%s"s. */
2746
+
char *yyp = *yymsg;
2748
+
while ((*yyp = *yyformat) != '\0')
2749
+
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2751
+
yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
2809
-
/* Avoid sprintf, as that infringes on the user's name space.
2810
-
Don't have undefined behavior even if the translation
2811
-
produced a string with the wrong number of "%s"s. */
2812
-
char *yyp = yyresult;
2814
-
while ((*yyp = *yyf) != '\0')
2816
-
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2818
-
yyp += yytnamerr (yyp, yyarg[yyi++]);
2831
-
#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
2839
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2840
-
|| defined __cplusplus || defined _MSC_VER)
2842
-
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *parm)
2845
-
yydestruct (yymsg, yytype, yyvaluep, yylocationp, parm)
2846
-
const char *yymsg;
2848
-
YYSTYPE *yyvaluep;
2849
-
YYLTYPE *yylocationp;
2769
+
yydestruct (const char *yymsg,
2770
+
yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *parm)
2854
-
YYUSE (yylocationp);
2772
+
YY_USE (yyvaluep);
2773
+
YY_USE (yylocationp);
2859
-
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2777
+
YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2779
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2781
+
YY_IGNORE_MAYBE_UNINITIALIZED_END
2870
-
/* Prevent warnings from -Wmissing-prototypes. */
2872
-
#ifdef YYPARSE_PARAM
2873
-
#if defined __STDC__ || defined __cplusplus
2874
-
int yyparse (void *YYPARSE_PARAM);
2878
-
#else /* ! YYPARSE_PARAM */
2879
-
#if defined __STDC__ || defined __cplusplus
2880
-
int yyparse (void *parm);
2884
-
#endif /* ! YYPARSE_PARAM */
···
2895
-
#ifdef YYPARSE_PARAM
2896
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2897
-
|| defined __cplusplus || defined _MSC_VER)
2899
-
yyparse (void *YYPARSE_PARAM)
2902
-
yyparse (YYPARSE_PARAM)
2903
-
void *YYPARSE_PARAM;
2905
-
#else /* ! YYPARSE_PARAM */
2906
-
#if (defined __STDC__ || defined __C99__FUNC__ \
2907
-
|| defined __cplusplus || defined _MSC_VER)
2917
-
/* The look-ahead symbol. */
2796
+
/* Lookahead token kind. */
2920
-
/* The semantic value of the look-ahead symbol. */
2923
-
/* Number of syntax errors so far. */
2925
-
/* Location data for the look-ahead symbol. */
2800
+
/* The semantic value of the lookahead symbol. */
2801
+
/* Default value used for initialization, for pacifying older GCCs
2802
+
or non-GCC compilers. */
2803
+
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2804
+
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
2931
-
/* Number of tokens to shift before error messages enabled. */
2933
-
/* Look-ahead token as an internal (translated) token number. */
2935
-
#if YYERROR_VERBOSE
2936
-
/* Buffer for error messages, and its allocated size. */
2937
-
char yymsgbuf[128];
2938
-
char *yymsg = yymsgbuf;
2939
-
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2806
+
/* Location data for the lookahead symbol. */
2807
+
static YYLTYPE yyloc_default
2808
+
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2812
+
YYLTYPE yylloc = yyloc_default;
2942
-
/* Three stacks and their tools:
2943
-
`yyss': related to states,
2944
-
`yyvs': related to semantic values,
2945
-
`yyls': related to locations.
2814
+
/* Number of syntax errors so far. */
2947
-
Refer to the stacks thru separate pointers, to allow yyoverflow
2948
-
to reallocate them elsewhere. */
2817
+
yy_state_fast_t yystate = 0;
2818
+
/* Number of tokens to shift before error messages enabled. */
2819
+
int yyerrstatus = 0;
2950
-
/* The state stack. */
2951
-
yytype_int16 yyssa[YYINITDEPTH];
2952
-
yytype_int16 *yyss = yyssa;
2953
-
yytype_int16 *yyssp;
2821
+
/* Refer to the stacks through separate pointers, to allow yyoverflow
2822
+
to reallocate them elsewhere. */
2955
-
/* The semantic value stack. */
2956
-
YYSTYPE yyvsa[YYINITDEPTH];
2957
-
YYSTYPE *yyvs = yyvsa;
2825
+
YYPTRDIFF_T yystacksize = YYINITDEPTH;
2960
-
/* The location stack. */
2961
-
YYLTYPE yylsa[YYINITDEPTH];
2962
-
YYLTYPE *yyls = yylsa;
2964
-
/* The locations where the error started and ended. */
2965
-
YYLTYPE yyerror_range[2];
2827
+
/* The state stack: array, bottom, top. */
2828
+
yy_state_t yyssa[YYINITDEPTH];
2829
+
yy_state_t *yyss = yyssa;
2830
+
yy_state_t *yyssp = yyss;
2967
-
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
2832
+
/* The semantic value stack: array, bottom, top. */
2833
+
YYSTYPE yyvsa[YYINITDEPTH];
2834
+
YYSTYPE *yyvs = yyvsa;
2835
+
YYSTYPE *yyvsp = yyvs;
2969
-
YYSIZE_T yystacksize = YYINITDEPTH;
2837
+
/* The location stack: array, bottom, top. */
2838
+
YYLTYPE yylsa[YYINITDEPTH];
2839
+
YYLTYPE *yyls = yylsa;
2840
+
YYLTYPE *yylsp = yyls;
2843
+
/* The return value of yyparse. */
2845
+
/* Lookahead symbol kind. */
2846
+
yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
2852
+
/* The locations where the error started and ended. */
2853
+
YYLTYPE yyerror_range[3];
2855
+
/* Buffer for error messages, and its allocated size. */
2856
+
char yymsgbuf[128];
2857
+
char *yymsg = yymsgbuf;
2858
+
YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
2860
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
YYDPRINTF ((stderr, "Starting parse\n"));
2985
-
yychar = YYEMPTY; /* Cause a token to be read. */
2987
-
/* Initialize stack pointers.
2988
-
Waste one element of value and location stack
2989
-
so that they stay on the same level as the state stack.
2990
-
The wasted elements are never initialized. */
2995
-
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2996
-
/* Initialize the default location before parsing starts. */
2997
-
yylloc.first_line = yylloc.last_line = 1;
2998
-
yylloc.first_column = yylloc.last_column = 0;
3002
-
/* User initialization code. */
2868
+
yychar = YYEMPTY; /* Cause a token to be read. */
2870
+
/* User initialization code. */
yylloc.filename(ASTString(static_cast<ParserState*>(parm)->filename));
3008
-
/* Line 1078 of yacc.c. */
/*------------------------------------------------------------.
3014
-
| yynewstate -- Push a new state, which is found in yystate. |
2882
+
| yynewstate -- push a new state, which is found in yystate. |
`------------------------------------------------------------*/
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
2890
+
/*--------------------------------------------------------------------.
2891
+
| yysetstate -- set current state (the top of the stack) to yystate. |
2892
+
`--------------------------------------------------------------------*/
2894
+
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2895
+
YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
2896
+
YY_IGNORE_USELESS_CAST_BEGIN
2897
+
*yyssp = YY_CAST (yy_state_t, yystate);
2898
+
YY_IGNORE_USELESS_CAST_END
2899
+
YY_STACK_PRINT (yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
2902
+
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
2903
+
goto yyexhaustedlab;
/* Get the current used size of the three stacks, in elements. */
3027
-
YYSIZE_T yysize = yyssp - yyss + 1;
2907
+
YYPTRDIFF_T yysize = yyssp - yyss + 1;
2909
+
# if defined yyoverflow
3031
-
/* Give user a chance to reallocate the stack. Use copies of
3032
-
these so that the &'s don't force the real ones into
3034
-
YYSTYPE *yyvs1 = yyvs;
3035
-
yytype_int16 *yyss1 = yyss;
3036
-
YYLTYPE *yyls1 = yyls;
2911
+
/* Give user a chance to reallocate the stack. Use copies of
2912
+
these so that the &'s don't force the real ones into
2914
+
yy_state_t *yyss1 = yyss;
2915
+
YYSTYPE *yyvs1 = yyvs;
2916
+
YYLTYPE *yyls1 = yyls;
3038
-
/* Each stack pointer address is followed by the size of the
3039
-
data in use in that stack, in bytes. This used to be a
3040
-
conditional around just the two extra args, but that might
3041
-
be undefined if yyoverflow is a macro. */
3042
-
yyoverflow (YY_("memory exhausted"),
3043
-
&yyss1, yysize * sizeof (*yyssp),
3044
-
&yyvs1, yysize * sizeof (*yyvsp),
3045
-
&yyls1, yysize * sizeof (*yylsp),
2918
+
/* Each stack pointer address is followed by the size of the
2919
+
data in use in that stack, in bytes. This used to be a
2920
+
conditional around just the two extra args, but that might
2921
+
be undefined if yyoverflow is a macro. */
2922
+
yyoverflow (YY_("memory exhausted"),
2923
+
&yyss1, yysize * YYSIZEOF (*yyssp),
2924
+
&yyvs1, yysize * YYSIZEOF (*yyvsp),
2925
+
&yyls1, yysize * YYSIZEOF (*yylsp),
3051
-
#else /* no yyoverflow */
3052
-
# ifndef YYSTACK_RELOCATE
3053
-
goto yyexhaustedlab;
2931
+
# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
3057
-
goto yyexhaustedlab;
2934
+
goto yyexhaustedlab;
if (YYMAXDEPTH < yystacksize)
3060
-
yystacksize = YYMAXDEPTH;
2937
+
yystacksize = YYMAXDEPTH;
3063
-
yytype_int16 *yyss1 = yyss;
3064
-
union yyalloc *yyptr =
3065
-
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3067
-
goto yyexhaustedlab;
3068
-
YYSTACK_RELOCATE (yyss);
3069
-
YYSTACK_RELOCATE (yyvs);
3070
-
YYSTACK_RELOCATE (yyls);
2940
+
yy_state_t *yyss1 = yyss;
2941
+
union yyalloc *yyptr =
2942
+
YY_CAST (union yyalloc *,
2943
+
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
2945
+
goto yyexhaustedlab;
2946
+
YYSTACK_RELOCATE (yyss_alloc, yyss);
2947
+
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2948
+
YYSTACK_RELOCATE (yyls_alloc, yyls);
3072
-
if (yyss1 != yyssa)
3073
-
YYSTACK_FREE (yyss1);
2950
+
if (yyss1 != yyssa)
2951
+
YYSTACK_FREE (yyss1);
3076
-
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
3082
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3083
-
(unsigned long int) yystacksize));
2959
+
YY_IGNORE_USELESS_CAST_BEGIN
2960
+
YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2961
+
YY_CAST (long, yystacksize)));
2962
+
YY_IGNORE_USELESS_CAST_END
if (yyss + yystacksize - 1 <= yyssp)
2967
+
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
3089
-
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2969
+
if (yystate == YYFINAL)
/* Do appropriate processing given the current state. Read a
3099
-
look-ahead token if we need one and don't already have one. */
2980
+
lookahead token if we need one and don't already have one. */
3101
-
/* First try to decide what to do without reference to look-ahead token. */
2982
+
/* First try to decide what to do without reference to lookahead token. */
3103
-
if (yyn == YYPACT_NINF)
2984
+
if (yypact_value_is_default (yyn))
3106
-
/* Not known => get a look-ahead token if don't already have one. */
2987
+
/* Not known => get a lookahead token if don't already have one. */
3108
-
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2989
+
/* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
3111
-
YYDPRINTF ((stderr, "Reading a token: "));
2992
+
YYDPRINTF ((stderr, "Reading a token\n"));
2993
+
yychar = yylex (&yylval, &yylloc, SCANNER);
3115
-
if (yychar <= YYEOF)
2996
+
if (yychar <= END)
3117
-
yychar = yytoken = YYEOF;
2999
+
yytoken = YYSYMBOL_YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
3002
+
else if (yychar == YYerror)
3004
+
/* The scanner already issued an error message, process directly
3005
+
to error recovery. But do not keep the error token as
3006
+
lookahead, it is too special and may lead us to an endless
3007
+
loop in error recovery. */
3009
+
yytoken = YYSYMBOL_YYerror;
3010
+
yyerror_range[1] = yylloc;
···
3134
-
if (yyn == 0 || yyn == YYTABLE_NINF)
3027
+
if (yytable_value_is_error (yyn))
3140
-
if (yyn == YYFINAL)
/* Count tokens shifted since error; after three, turn off error
3148
-
/* Shift the look-ahead token. */
3038
+
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3151
-
/* Discard the shifted token unless it is eof. */
3152
-
if (yychar != YYEOF)
3041
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3043
+
YY_IGNORE_MAYBE_UNINITIALIZED_END
3046
+
/* Discard the shifted token. */
···
/*-----------------------------.
3172
-
| yyreduce -- Do a reduction. |
3062
+
| yyreduce -- do a reduction. |
`-----------------------------*/
/* yyn is the number of a rule to reduce with. */
/* If YYLEN is nonzero, implement the default value of the action:
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
···
GCC warning that YYVAL may be used uninitialized. */
3188
-
/* Default location. */
3078
+
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
3080
+
yyerror_range[1] = yyloc;
3084
+
case 5: /* item_list_head: item */
ParserState* pp = static_cast<ParserState*>(parm);
3197
-
if ((yyvsp[(1) - (1)].item)) {
3198
-
pp->model->addItem((yyvsp[(1) - (1)].item));
3087
+
if ((yyvsp[0].item)) {
3088
+
pp->model->addItem((yyvsp[0].item));
3095
+
case 6: /* item_list_head: doc_file_comments item */
ParserState* pp = static_cast<ParserState*>(parm);
3209
-
if ((yyvsp[(2) - (2)].item)) {
3210
-
pp->model->addItem((yyvsp[(2) - (2)].item));
3098
+
if ((yyvsp[0].item)) {
3099
+
pp->model->addItem((yyvsp[0].item));
3106
+
case 7: /* item_list_head: item_list_head ';' item */
ParserState* pp = static_cast<ParserState*>(parm);
3221
-
if ((yyvsp[(3) - (3)].item)) {
3222
-
pp->model->addItem((yyvsp[(3) - (3)].item));
3109
+
if ((yyvsp[0].item)) {
3110
+
pp->model->addItem((yyvsp[0].item));
3117
+
case 8: /* item_list_head: item_list_head ';' doc_file_comments item */
ParserState* pp = static_cast<ParserState*>(parm);
3233
-
if ((yyvsp[(4) - (4)].item)) {
3234
-
pp->model->addItem((yyvsp[(4) - (4)].item));
3120
+
if ((yyvsp[0].item)) {
3121
+
pp->model->addItem((yyvsp[0].item));
3243
-
{ yyerror(&(yylsp[(2) - (2)]), parm, "unexpected item, expecting ';' or end of file"); YYERROR; ;}
3128
+
case 9: /* item_list_head: item error_item_start */
3129
+
{ yyerror(&(yylsp[0]), parm, "unexpected item, expecting ';' or end of file"); YYERROR; }
3132
+
case 11: /* doc_file_comments: "file-level documentation comment" */
ParserState* pp = static_cast<ParserState*>(parm);
3250
-
if (pp->parseDocComments && (yyvsp[(1) - (1)].sValue)) {
3251
-
pp->model->addDocComment((yyvsp[(1) - (1)].sValue));
3135
+
if (pp->parseDocComments && (yyvsp[0].sValue)) {
3136
+
pp->model->addDocComment((yyvsp[0].sValue));
3253
-
free((yyvsp[(1) - (1)].sValue));
3138
+
free((yyvsp[0].sValue));
3142
+
case 12: /* doc_file_comments: doc_file_comments "file-level documentation comment" */
ParserState* pp = static_cast<ParserState*>(parm);
3261
-
if (pp->parseDocComments && (yyvsp[(2) - (2)].sValue)) {
3262
-
pp->model->addDocComment((yyvsp[(2) - (2)].sValue));
3145
+
if (pp->parseDocComments && (yyvsp[0].sValue)) {
3146
+
pp->model->addDocComment((yyvsp[0].sValue));
3264
-
free((yyvsp[(2) - (2)].sValue));
3148
+
free((yyvsp[0].sValue));
3270
-
{ (yyval.item) = (yyvsp[(2) - (2)].item);
3152
+
case 15: /* item: "documentation comment" item_tail */
3153
+
{ (yyval.item) = (yyvsp[0].item);
ParserState* pp = static_cast<ParserState*>(parm);
if (FunctionI* fi = Item::dyn_cast<FunctionI>((yyval.item))) {
if (pp->parseDocComments) {
3274
-
fi->ann().add(createDocComment((yylsp[(1) - (2)]),(yyvsp[(1) - (2)].sValue)));
3157
+
fi->ann().add(createDocComment((yylsp[-1]),(yyvsp[-1].sValue)));
} else if (VarDeclI* vdi = Item::dyn_cast<VarDeclI>((yyval.item))) {
if (pp->parseDocComments) {
3278
-
vdi->e()->addAnnotation(createDocComment((yylsp[(1) - (2)]),(yyvsp[(1) - (2)].sValue)));
3161
+
vdi->e()->addAnnotation(createDocComment((yylsp[-1]),(yyvsp[-1].sValue)));
3281
-
yyerror(&(yylsp[(2) - (2)]), parm, "documentation comments are only supported for function, predicate and variable declarations");
3164
+
yyerror(&(yylsp[0]), parm, "documentation comments are only supported for function, predicate and variable declarations");
3283
-
free((yyvsp[(1) - (2)].sValue));
3166
+
free((yyvsp[-1].sValue));
3289
-
{ (yyval.item) = (yyvsp[(1) - (1)].item); ;}
3170
+
case 16: /* item: item_tail */
3171
+
{ (yyval.item) = (yyvsp[0].item); }
3294
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"include") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3174
+
case 17: /* item_tail: include_item */
3175
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"include") ? (yyvsp[0].item) : NULL; }
3299
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"variable declaration") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3178
+
case 18: /* item_tail: vardecl_item */
3179
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"variable declaration") ? (yyvsp[0].item) : NULL; }
3304
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"constraint") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3182
+
case 20: /* item_tail: constraint_item */
3183
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"constraint") ? (yyvsp[0].item) : NULL; }
3309
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"solve") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3186
+
case 21: /* item_tail: solve_item */
3187
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"solve") ? (yyvsp[0].item) : NULL; }
3314
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"output") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3190
+
case 22: /* item_tail: output_item */
3191
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"output") ? (yyvsp[0].item) : NULL; }
3319
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"predicate") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3194
+
case 23: /* item_tail: predicate_item */
3195
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"predicate") ? (yyvsp[0].item) : NULL; }
3324
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"predicate") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3198
+
case 24: /* item_tail: function_item */
3199
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"predicate") ? (yyvsp[0].item) : NULL; }
3329
-
{ (yyval.item)=notInDatafile(&(yyloc),parm,"annotation") ? (yyvsp[(1) - (1)].item) : NULL; ;}
3202
+
case 25: /* item_tail: annotation_item */
3203
+
{ (yyval.item)=notInDatafile(&(yyloc),parm,"annotation") ? (yyvsp[0].item) : NULL; }
3334
-
{ ParserState* pp = static_cast<ParserState*>(parm);
3335
-
map<string,Model*>::iterator ret = pp->seenModels.find((yyvsp[(2) - (2)].sValue));
3336
-
IncludeI* ii = new IncludeI((yyloc),ASTString((yyvsp[(2) - (2)].sValue)));
3206
+
case 35: /* include_item: "include" "string literal" */
3207
+
{ ParserState* pp = static_cast<ParserState*>(parm);
3208
+
map<string,Model*>::iterator ret = pp->seenModels.find((yyvsp[0].sValue));
3209
+
IncludeI* ii = new IncludeI((yyloc),ASTString((yyvsp[0].sValue)));
if (ret == pp->seenModels.end()) {
im->setParent(pp->model);
3341
-
im->setFilename((yyvsp[(2) - (2)].sValue));
3214
+
im->setFilename((yyvsp[0].sValue));
string fpath = FileUtils::dir_name(pp->filename);
string fbase = FileUtils::base_name(pp->filename);
3346
-
ParseWorkItem pm(im, ii, fpath, (yyvsp[(2) - (2)].sValue));
3219
+
ParseWorkItem pm(im, ii, fpath, (yyvsp[0].sValue));
3349
-
pp->seenModels.insert(pair<string,Model*>((yyvsp[(2) - (2)].sValue),im));
3222
+
pp->seenModels.insert(pair<string,Model*>((yyvsp[0].sValue),im));
ii->m(ret->second, false);
3353
-
free((yyvsp[(2) - (2)].sValue));
3226
+
free((yyvsp[0].sValue));
3359
-
{ if ((yyvsp[(1) - (2)].vardeclexpr) && (yyvsp[(2) - (2)].expression_v)) (yyvsp[(1) - (2)].vardeclexpr)->addAnnotations(*(yyvsp[(2) - (2)].expression_v));
3360
-
if ((yyvsp[(1) - (2)].vardeclexpr))
3361
-
(yyval.item) = new VarDeclI((yyloc),(yyvsp[(1) - (2)].vardeclexpr));
3362
-
delete (yyvsp[(2) - (2)].expression_v);
3230
+
case 36: /* vardecl_item: ti_expr_and_id annotations */
3231
+
{ if ((yyvsp[-1].vardeclexpr) && (yyvsp[0].expression_v)) (yyvsp[-1].vardeclexpr)->addAnnotations(*(yyvsp[0].expression_v));
3232
+
if ((yyvsp[-1].vardeclexpr))
3233
+
(yyval.item) = new VarDeclI((yyloc),(yyvsp[-1].vardeclexpr));
3234
+
delete (yyvsp[0].expression_v);
3368
-
{ if ((yyvsp[(1) - (4)].vardeclexpr)) (yyvsp[(1) - (4)].vardeclexpr)->e((yyvsp[(4) - (4)].expression));
3369
-
if ((yyvsp[(1) - (4)].vardeclexpr) && (yyvsp[(2) - (4)].expression_v)) (yyvsp[(1) - (4)].vardeclexpr)->addAnnotations(*(yyvsp[(2) - (4)].expression_v));
3370
-
if ((yyvsp[(1) - (4)].vardeclexpr))
3371
-
(yyval.item) = new VarDeclI((yyloc),(yyvsp[(1) - (4)].vardeclexpr));
3372
-
delete (yyvsp[(2) - (4)].expression_v);
3238
+
case 37: /* vardecl_item: ti_expr_and_id annotations "=" expr */
3239
+
{ if ((yyvsp[-3].vardeclexpr)) (yyvsp[-3].vardeclexpr)->e((yyvsp[0].expression));
3240
+
if ((yyvsp[-3].vardeclexpr) && (yyvsp[-2].expression_v)) (yyvsp[-3].vardeclexpr)->addAnnotations(*(yyvsp[-2].expression_v));
3241
+
if ((yyvsp[-3].vardeclexpr))
3242
+
(yyval.item) = new VarDeclI((yyloc),(yyvsp[-3].vardeclexpr));
3243
+
delete (yyvsp[-2].expression_v);
3247
+
case 38: /* vardecl_item: "enum" "identifier" */
TypeInst* ti = new TypeInst((yyloc),Type::parsetint());
3381
-
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[(2) - (2)].sValue));
3382
-
free((yyvsp[(2) - (2)].sValue));
3251
+
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[0].sValue));
3252
+
free((yyvsp[0].sValue));
(yyval.item) = new VarDeclI((yyloc),vd);
3257
+
case 39: /* vardecl_item: "enum" "identifier" "=" '{' enum_id_list '}' */
TypeInst* ti = new TypeInst((yyloc),Type::parsetint());
3392
-
SetLit* sl = new SetLit((yyloc), *(yyvsp[(5) - (6)].expression_v));
3393
-
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[(2) - (6)].sValue),sl);
3394
-
free((yyvsp[(2) - (6)].sValue));
3395
-
delete (yyvsp[(5) - (6)].expression_v);
3261
+
SetLit* sl = new SetLit((yyloc), *(yyvsp[-1].expression_v));
3262
+
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[-4].sValue),sl);
3263
+
free((yyvsp[-4].sValue));
3264
+
delete (yyvsp[-1].expression_v);
(yyval.item) = new VarDeclI((yyloc),vd);
3269
+
case 40: /* vardecl_item: "enum" "identifier" "=" "[" string_lit_list "]" */
TypeInst* ti = new TypeInst((yyloc),Type::parsetint());
vector<Expression*> args;
3406
-
args.push_back(new ArrayLit((yyloc),*(yyvsp[(5) - (6)].expression_v)));
3274
+
args.push_back(new ArrayLit((yyloc),*(yyvsp[-1].expression_v)));
Call* sl = new Call((yyloc), constants().ids.anonEnumFromStrings, args);
3408
-
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[(2) - (6)].sValue),sl);
3409
-
free((yyvsp[(2) - (6)].sValue));
3410
-
delete (yyvsp[(5) - (6)].expression_v);
3276
+
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[-4].sValue),sl);
3277
+
free((yyvsp[-4].sValue));
3278
+
delete (yyvsp[-1].expression_v);
(yyval.item) = new VarDeclI((yyloc),vd);
3283
+
case 41: /* vardecl_item: "enum" "identifier" "=" "identifier" '(' expr ')' */
TypeInst* ti = new TypeInst((yyloc),Type::parsetint());
vector<Expression*> args;
3421
-
args.push_back((yyvsp[(6) - (7)].expression));
3422
-
Call* sl = new Call((yyloc), ASTString((yyvsp[(4) - (7)].sValue)), args);
3423
-
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[(2) - (7)].sValue),sl);
3424
-
free((yyvsp[(2) - (7)].sValue));
3425
-
free((yyvsp[(4) - (7)].sValue));
3288
+
args.push_back((yyvsp[-1].expression));
3289
+
Call* sl = new Call((yyloc), ASTString((yyvsp[-3].sValue)), args);
3290
+
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[-5].sValue),sl);
3291
+
free((yyvsp[-5].sValue));
3292
+
free((yyvsp[-3].sValue));
(yyval.item) = new VarDeclI((yyloc),vd);
3432
-
{ (yyval.expression_v) = new std::vector<Expression*>(); ;}
3297
+
case 42: /* string_lit_list: %empty */
3298
+
{ (yyval.expression_v) = new std::vector<Expression*>(); }
3437
-
{ (yyval.expression_v) = new std::vector<Expression*>();
3438
-
(yyval.expression_v)->push_back(new StringLit((yyloc), (yyvsp[(1) - (1)].sValue))); free((yyvsp[(1) - (1)].sValue));
3301
+
case 43: /* string_lit_list: "string literal" */
3302
+
{ (yyval.expression_v) = new std::vector<Expression*>();
3303
+
(yyval.expression_v)->push_back(new StringLit((yyloc), (yyvsp[0].sValue))); free((yyvsp[0].sValue));
3444
-
{ (yyval.expression_v) = (yyvsp[(1) - (3)].expression_v);
3445
-
if ((yyval.expression_v)) (yyval.expression_v)->push_back(new StringLit((yyloc), (yyvsp[(3) - (3)].sValue)));
3446
-
free((yyvsp[(3) - (3)].sValue));
3307
+
case 44: /* string_lit_list: string_lit_list ',' "string literal" */
3308
+
{ (yyval.expression_v) = (yyvsp[-2].expression_v);
3309
+
if ((yyval.expression_v)) (yyval.expression_v)->push_back(new StringLit((yyloc), (yyvsp[0].sValue)));
3310
+
free((yyvsp[0].sValue));
3452
-
{ (yyval.expression_v) = new std::vector<Expression*>(); ;}
3314
+
case 45: /* enum_id_list: %empty */
3315
+
{ (yyval.expression_v) = new std::vector<Expression*>(); }
3457
-
{ (yyval.expression_v) = new std::vector<Expression*>();
3458
-
(yyval.expression_v)->push_back(new Id((yyloc),(yyvsp[(1) - (1)].sValue),NULL)); free((yyvsp[(1) - (1)].sValue));
3318
+
case 46: /* enum_id_list: "identifier" */
3319
+
{ (yyval.expression_v) = new std::vector<Expression*>();
3320
+
(yyval.expression_v)->push_back(new Id((yyloc),(yyvsp[0].sValue),NULL)); free((yyvsp[0].sValue));
3464
-
{ (yyval.expression_v) = (yyvsp[(1) - (3)].expression_v); if ((yyval.expression_v)) (yyval.expression_v)->push_back(new Id((yyloc),(yyvsp[(3) - (3)].sValue),NULL)); free((yyvsp[(3) - (3)].sValue)); ;}
3324
+
case 47: /* enum_id_list: enum_id_list ',' "identifier" */
3325
+
{ (yyval.expression_v) = (yyvsp[-2].expression_v); if ((yyval.expression_v)) (yyval.expression_v)->push_back(new Id((yyloc),(yyvsp[0].sValue),NULL)); free((yyvsp[0].sValue)); }
3469
-
{ (yyval.item) = new AssignI((yyloc),(yyvsp[(1) - (3)].sValue),(yyvsp[(3) - (3)].expression));
3470
-
free((yyvsp[(1) - (3)].sValue));
3328
+
case 48: /* assign_item: "identifier" "=" expr */
3329
+
{ (yyval.item) = new AssignI((yyloc),(yyvsp[-2].sValue),(yyvsp[0].expression));
3330
+
free((yyvsp[-2].sValue));
3476
-
{ (yyval.item) = new ConstraintI((yyloc),(yyvsp[(2) - (2)].expression));;}
3334
+
case 49: /* constraint_item: "constraint" expr */
3335
+
{ (yyval.item) = new ConstraintI((yyloc),(yyvsp[0].expression));}
3481
-
{ (yyval.item) = new ConstraintI((yyloc),(yyvsp[(4) - (4)].expression));
3482
-
if ((yyvsp[(4) - (4)].expression) && (yyvsp[(3) - (4)].expression))
3483
-
(yyval.item)->cast<ConstraintI>()->e()->ann().add(new Call((yylsp[(2) - (4)]), ASTString("mzn_constraint_name"), {(yyvsp[(3) - (4)].expression)}));
3338
+
case 50: /* constraint_item: "constraint" "::" string_expr expr */
3339
+
{ (yyval.item) = new ConstraintI((yyloc),(yyvsp[0].expression));
3340
+
if ((yyvsp[0].expression) && (yyvsp[-1].expression))
3341
+
(yyval.item)->cast<ConstraintI>()->e()->ann().add(new Call((yylsp[-2]), ASTString("mzn_constraint_name"), {(yyvsp[-1].expression)}));
3489
-
{ (yyval.item) = SolveI::sat((yyloc));
3490
-
if ((yyval.item) && (yyvsp[(2) - (3)].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[(2) - (3)].expression_v));
3491
-
delete (yyvsp[(2) - (3)].expression_v);
3345
+
case 51: /* solve_item: "solve" annotations "satisfy" */
3346
+
{ (yyval.item) = SolveI::sat((yyloc));
3347
+
if ((yyval.item) && (yyvsp[-1].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[-1].expression_v));
3348
+
delete (yyvsp[-1].expression_v);
3497
-
{ (yyval.item) = SolveI::min((yyloc),(yyvsp[(4) - (4)].expression));
3498
-
if ((yyval.item) && (yyvsp[(2) - (4)].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[(2) - (4)].expression_v));
3499
-
delete (yyvsp[(2) - (4)].expression_v);
3352
+
case 52: /* solve_item: "solve" annotations "minimize" expr */
3353
+
{ (yyval.item) = SolveI::min((yyloc),(yyvsp[0].expression));
3354
+
if ((yyval.item) && (yyvsp[-2].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[-2].expression_v));
3355
+
delete (yyvsp[-2].expression_v);
3505
-
{ (yyval.item) = SolveI::max((yyloc),(yyvsp[(4) - (4)].expression));
3506
-
if ((yyval.item) && (yyvsp[(2) - (4)].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[(2) - (4)].expression_v));
3507
-
delete (yyvsp[(2) - (4)].expression_v);
3359
+
case 53: /* solve_item: "solve" annotations "maximize" expr */
3360
+
{ (yyval.item) = SolveI::max((yyloc),(yyvsp[0].expression));
3361
+
if ((yyval.item) && (yyvsp[-2].expression_v)) (yyval.item)->cast<SolveI>()->ann().add(*(yyvsp[-2].expression_v));
3362
+
delete (yyvsp[-2].expression_v);
3513
-
{ (yyval.item) = new OutputI((yyloc),(yyvsp[(2) - (2)].expression));;}
3366
+
case 54: /* output_item: "output" expr */
3367
+
{ (yyval.item) = new OutputI((yyloc),(yyvsp[0].expression));}
3518
-
{ if ((yyvsp[(3) - (5)].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[(2) - (5)].sValue),new TypeInst((yyloc),
3519
-
Type::varbool()),*(yyvsp[(3) - (5)].vardeclexpr_v),(yyvsp[(5) - (5)].expression));
3520
-
if ((yyval.item) && (yyvsp[(4) - (5)].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[(4) - (5)].expression_v));
3521
-
free((yyvsp[(2) - (5)].sValue));
3522
-
delete (yyvsp[(3) - (5)].vardeclexpr_v);
3523
-
delete (yyvsp[(4) - (5)].expression_v);
3370
+
case 55: /* predicate_item: "predicate" "identifier" params annotations operation_item_tail */
3371
+
{ if ((yyvsp[-2].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[-3].sValue),new TypeInst((yyloc),
3372
+
Type::varbool()),*(yyvsp[-2].vardeclexpr_v),(yyvsp[0].expression));
3373
+
if ((yyval.item) && (yyvsp[-1].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[-1].expression_v));
3374
+
free((yyvsp[-3].sValue));
3375
+
delete (yyvsp[-2].vardeclexpr_v);
3376
+
delete (yyvsp[-1].expression_v);
3529
-
{ if ((yyvsp[(3) - (5)].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[(2) - (5)].sValue),new TypeInst((yyloc),
3530
-
Type::parbool()),*(yyvsp[(3) - (5)].vardeclexpr_v),(yyvsp[(5) - (5)].expression));
3531
-
if ((yyval.item) && (yyvsp[(4) - (5)].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[(4) - (5)].expression_v));
3532
-
free((yyvsp[(2) - (5)].sValue));
3533
-
delete (yyvsp[(3) - (5)].vardeclexpr_v);
3534
-
delete (yyvsp[(4) - (5)].expression_v);
3380
+
case 56: /* predicate_item: "test" "identifier" params annotations operation_item_tail */
3381
+
{ if ((yyvsp[-2].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[-3].sValue),new TypeInst((yyloc),
3382
+
Type::parbool()),*(yyvsp[-2].vardeclexpr_v),(yyvsp[0].expression));
3383
+
if ((yyval.item) && (yyvsp[-1].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[-1].expression_v));
3384
+
free((yyvsp[-3].sValue));
3385
+
delete (yyvsp[-2].vardeclexpr_v);
3386
+
delete (yyvsp[-1].expression_v);
3540
-
{ if ((yyvsp[(5) - (7)].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[(4) - (7)].sValue),(yyvsp[(2) - (7)].tiexpr),*(yyvsp[(5) - (7)].vardeclexpr_v),(yyvsp[(7) - (7)].expression));
3541
-
if ((yyval.item) && (yyvsp[(6) - (7)].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[(6) - (7)].expression_v));
3542
-
free((yyvsp[(4) - (7)].sValue));
3543
-
delete (yyvsp[(5) - (7)].vardeclexpr_v);
3544
-
delete (yyvsp[(6) - (7)].expression_v);
3390
+
case 57: /* function_item: "function" ti_expr ':' id_or_quoted_op params annotations operation_item_tail */
3391
+
{ if ((yyvsp[-2].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[-3].sValue),(yyvsp[-5].tiexpr),*(yyvsp[-2].vardeclexpr_v),(yyvsp[0].expression));
3392
+
if ((yyval.item) && (yyvsp[-1].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[-1].expression_v));
3393
+
free((yyvsp[-3].sValue));
3394
+
delete (yyvsp[-2].vardeclexpr_v);
3395
+
delete (yyvsp[-1].expression_v);
3550
-
{ if ((yyvsp[(5) - (8)].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[(3) - (8)].sValue),(yyvsp[(1) - (8)].tiexpr),*(yyvsp[(5) - (8)].vardeclexpr_v),(yyvsp[(8) - (8)].expression));
3551
-
if ((yyval.item) && (yyvsp[(7) - (8)].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[(7) - (8)].expression_v));
3552
-
free((yyvsp[(3) - (8)].sValue));
3553
-
delete (yyvsp[(5) - (8)].vardeclexpr_v);
3554
-
delete (yyvsp[(7) - (8)].expression_v);
3399
+
case 58: /* function_item: ti_expr ':' "identifier" '(' params_list ')' annotations operation_item_tail */
3400
+
{ if ((yyvsp[-3].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[-5].sValue),(yyvsp[-7].tiexpr),*(yyvsp[-3].vardeclexpr_v),(yyvsp[0].expression));
3401
+
if ((yyval.item) && (yyvsp[-1].expression_v)) (yyval.item)->cast<FunctionI>()->ann().add(*(yyvsp[-1].expression_v));
3402
+
free((yyvsp[-5].sValue));
3403
+
delete (yyvsp[-3].vardeclexpr_v);
3404
+
delete (yyvsp[-1].expression_v);
3561
-
TypeInst* ti=new TypeInst((yylsp[(1) - (3)]),Type::ann());
3562
-
if ((yyvsp[(3) - (3)].vardeclexpr_v)==NULL || (yyvsp[(3) - (3)].vardeclexpr_v)->empty()) {
3563
-
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[(2) - (3)].sValue));
3408
+
case 59: /* annotation_item: "annotation" "identifier" params */
3410
+
TypeInst* ti=new TypeInst((yylsp[-2]),Type::ann());
3411
+
if ((yyvsp[0].vardeclexpr_v)==NULL || (yyvsp[0].vardeclexpr_v)->empty()) {
3412
+
VarDecl* vd = new VarDecl((yyloc),ti,(yyvsp[-1].sValue));
(yyval.item) = new VarDeclI((yyloc),vd);
3566
-
(yyval.item) = new FunctionI((yyloc),(yyvsp[(2) - (3)].sValue),ti,*(yyvsp[(3) - (3)].vardeclexpr_v),NULL);
3415
+
(yyval.item) = new FunctionI((yyloc),(yyvsp[-1].sValue),ti,*(yyvsp[0].vardeclexpr_v),NULL);
3568
-
free((yyvsp[(2) - (3)].sValue));
3569
-
delete (yyvsp[(3) - (3)].vardeclexpr_v);
3417
+
free((yyvsp[-1].sValue));
3418
+
delete (yyvsp[0].vardeclexpr_v);
3575
-
{ TypeInst* ti=new TypeInst((yylsp[(1) - (5)]),Type::ann());
3576
-
if ((yyvsp[(3) - (5)].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[(2) - (5)].sValue),ti,*(yyvsp[(3) - (5)].vardeclexpr_v),(yyvsp[(5) - (5)].expression));
3577
-
delete (yyvsp[(3) - (5)].vardeclexpr_v);
3422
+
case 60: /* annotation_item: "annotation" "identifier" params "=" expr */
3423
+
{ TypeInst* ti=new TypeInst((yylsp[-4]),Type::ann());
3424
+
if ((yyvsp[-2].vardeclexpr_v)) (yyval.item) = new FunctionI((yyloc),(yyvsp[-3].sValue),ti,*(yyvsp[-2].vardeclexpr_v),(yyvsp[0].expression));
3425
+
delete (yyvsp[-2].vardeclexpr_v);
3583
-
{ (yyval.expression)=NULL; ;}
3429
+
case 61: /* operation_item_tail: %empty */
3430
+
{ (yyval.expression)=NULL; }
3588
-
{ (yyval.expression)=(yyvsp[(2) - (2)].expression); ;}
3433
+
case 62: /* operation_item_tail: "=" expr */
3434
+
{ (yyval.expression)=(yyvsp[0].expression); }
3593
-
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); ;}
3437
+
case 63: /* params: %empty */
3438
+
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); }
3598
-
{ (yyval.vardeclexpr_v)=(yyvsp[(2) - (3)].vardeclexpr_v); ;}
3441
+
case 64: /* params: '(' params_list ')' */
3442
+
{ (yyval.vardeclexpr_v)=(yyvsp[-1].vardeclexpr_v); }
3603
-
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); ;}
3445
+
case 65: /* params: '(' error ')' */
3446
+
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); }
3608
-
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); ;}
3449
+
case 66: /* params_list: %empty */
3450
+
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>(); }
3613
-
{ (yyval.vardeclexpr_v)=(yyvsp[(1) - (2)].vardeclexpr_v); ;}
3453
+
case 67: /* params_list: params_list_head comma_or_none */
3454
+
{ (yyval.vardeclexpr_v)=(yyvsp[-1].vardeclexpr_v); }
3618
-
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>();
3619
-
if ((yyvsp[(1) - (1)].vardeclexpr)) (yyvsp[(1) - (1)].vardeclexpr)->toplevel(false);
3620
-
if ((yyvsp[(1) - (1)].vardeclexpr)) (yyval.vardeclexpr_v)->push_back((yyvsp[(1) - (1)].vardeclexpr)); ;}
3457
+
case 68: /* params_list_head: ti_expr_and_id_or_anon */
3458
+
{ (yyval.vardeclexpr_v)=new vector<VarDecl*>();
3459
+
if ((yyvsp[0].vardeclexpr)) (yyvsp[0].vardeclexpr)->toplevel(false);
3460
+
if ((yyvsp[0].vardeclexpr)) (yyval.vardeclexpr_v)->push_back((yyvsp[0].vardeclexpr)); }
3625
-
{ (yyval.vardeclexpr_v)=(yyvsp[(1) - (3)].vardeclexpr_v);
3626
-
if ((yyvsp[(3) - (3)].vardeclexpr)) (yyvsp[(3) - (3)].vardeclexpr)->toplevel(false);
3627
-
if ((yyvsp[(1) - (3)].vardeclexpr_v) && (yyvsp[(3) - (3)].vardeclexpr)) (yyvsp[(1) - (3)].vardeclexpr_v)->push_back((yyvsp[(3) - (3)].vardeclexpr)); ;}
3463
+
case 69: /* params_list_head: params_list_head ',' ti_expr_and_id_or_anon */
3464
+
{ (yyval.vardeclexpr_v)=(yyvsp[-2].vardeclexpr_v);
3465
+
if ((yyvsp[0].vardeclexpr)) (yyvsp[0].vardeclexpr)->toplevel(false);
3466
+
if ((yyvsp[-2].vardeclexpr_v) && (yyvsp[0].vardeclexpr)) (yyvsp[-2].vardeclexpr_v)->push_back((yyvsp[0].vardeclexpr)); }
3632
-
{ (yyval.vardeclexpr)=(yyvsp[(1) - (1)].vardeclexpr); ;}
3469
+
case 72: /* ti_expr_and_id_or_anon: ti_expr_and_id */
3470
+
{ (yyval.vardeclexpr)=(yyvsp[0].vardeclexpr); }
3637
-
{ if ((yyvsp[(1) - (1)].tiexpr)) (yyval.vardeclexpr)=new VarDecl((yyloc), (yyvsp[(1) - (1)].tiexpr), ""); ;}
3473
+
case 73: /* ti_expr_and_id_or_anon: ti_expr */
3474
+
{ if ((yyvsp[0].tiexpr)) (yyval.vardeclexpr)=new VarDecl((yyloc), (yyvsp[0].tiexpr), ""); }
3642
-
{ if ((yyvsp[(1) - (3)].tiexpr) && (yyvsp[(3) - (3)].sValue)) (yyval.vardeclexpr) = new VarDecl((yyloc), (yyvsp[(1) - (3)].tiexpr), (yyvsp[(3) - (3)].sValue));
3643
-
free((yyvsp[(3) - (3)].sValue));
3477
+
case 74: /* ti_expr_and_id: ti_expr ':' "identifier" */
3478
+
{ if ((yyvsp[-2].tiexpr) && (yyvsp[0].sValue)) (yyval.vardeclexpr) = new VarDecl((yyloc), (yyvsp[-2].tiexpr), (yyvsp[0].sValue));
3479
+
free((yyvsp[0].sValue));
3649
-
{ (yyval.tiexpr_v)=(yyvsp[(1) - (2)].tiexpr_v); ;}
3483
+
case 75: /* ti_expr_list: ti_expr_list_head comma_or_none */
3484
+
{ (yyval.tiexpr_v)=(yyvsp[-1].tiexpr_v); }
3654
-
{ (yyval.tiexpr_v)=new vector<TypeInst*>(); (yyval.tiexpr_v)->push_back((yyvsp[(1) - (1)].tiexpr)); ;}
3487
+
case 76: /* ti_expr_list_head: ti_expr */
3488
+
{ (yyval.tiexpr_v)=new vector<TypeInst*>(); (yyval.tiexpr_v)->push_back((yyvsp[0].tiexpr)); }
3659
-
{ (yyval.tiexpr_v)=(yyvsp[(1) - (3)].tiexpr_v); if ((yyvsp[(1) - (3)].tiexpr_v) && (yyvsp[(3) - (3)].tiexpr)) (yyvsp[(1) - (3)].tiexpr_v)->push_back((yyvsp[(3) - (3)].tiexpr)); ;}
3491
+
case 77: /* ti_expr_list_head: ti_expr_list_head ',' ti_expr */
3492
+
{ (yyval.tiexpr_v)=(yyvsp[-2].tiexpr_v); if ((yyvsp[-2].tiexpr_v) && (yyvsp[0].tiexpr)) (yyvsp[-2].tiexpr_v)->push_back((yyvsp[0].tiexpr)); }
3665
-
(yyval.tiexpr) = (yyvsp[(6) - (6)].tiexpr);
3666
-
if ((yyval.tiexpr) && (yyvsp[(3) - (6)].tiexpr_v)) (yyval.tiexpr)->setRanges(*(yyvsp[(3) - (6)].tiexpr_v));
3667
-
delete (yyvsp[(3) - (6)].tiexpr_v);
3495
+
case 79: /* ti_expr: "array" "[" ti_expr_list "]" "of" base_ti_expr */
3497
+
(yyval.tiexpr) = (yyvsp[0].tiexpr);
3498
+
if ((yyval.tiexpr) && (yyvsp[-3].tiexpr_v)) (yyval.tiexpr)->setRanges(*(yyvsp[-3].tiexpr_v));
3499
+
delete (yyvsp[-3].tiexpr_v);
3674
-
(yyval.tiexpr) = (yyvsp[(3) - (3)].tiexpr);
3503
+
case 80: /* ti_expr: "list" "of" base_ti_expr */
3505
+
(yyval.tiexpr) = (yyvsp[0].tiexpr);
std::vector<TypeInst*> ti(1);
ti[0] = new TypeInst((yyloc),Type::parint());
if ((yyval.tiexpr)) (yyval.tiexpr)->setRanges(ti);
3683
-
{ (yyval.tiexpr) = (yyvsp[(1) - (1)].tiexpr);
3512
+
case 81: /* base_ti_expr: base_ti_expr_tail */
3513
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
3689
-
{ (yyval.tiexpr) = (yyvsp[(2) - (2)].tiexpr);
3517
+
case 82: /* base_ti_expr: "opt" base_ti_expr_tail */
3518
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
Type tt = (yyval.tiexpr)->type();
tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3700
-
{ (yyval.tiexpr) = (yyvsp[(3) - (3)].tiexpr);
3701
-
if ((yyval.tiexpr) && (yyvsp[(2) - (3)].bValue)) {
3527
+
case 83: /* base_ti_expr: "par" opt_opt base_ti_expr_tail */
3528
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
3529
+
if ((yyval.tiexpr) && (yyvsp[-1].bValue)) {
Type tt = (yyval.tiexpr)->type();
tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3711
-
{ (yyval.tiexpr) = (yyvsp[(3) - (3)].tiexpr);
3537
+
case 84: /* base_ti_expr: "var" opt_opt base_ti_expr_tail */
3538
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
Type tt = (yyval.tiexpr)->type();
3715
-
if ((yyvsp[(2) - (3)].bValue)) tt.ot(Type::OT_OPTIONAL);
3542
+
if ((yyvsp[-1].bValue)) tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3723
-
{ (yyval.tiexpr) = (yyvsp[(4) - (4)].tiexpr);
3548
+
case 85: /* base_ti_expr: opt_opt "set" "of" base_ti_expr_tail */
3549
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
Type tt = (yyval.tiexpr)->type();
3727
-
if ((yyvsp[(1) - (4)].bValue)) tt.ot(Type::OT_OPTIONAL);
3553
+
if ((yyvsp[-3].bValue)) tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3735
-
{ (yyval.tiexpr) = (yyvsp[(5) - (5)].tiexpr);
3559
+
case 86: /* base_ti_expr: "par" opt_opt "set" "of" base_ti_expr_tail */
3560
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
Type tt = (yyval.tiexpr)->type();
3739
-
if ((yyvsp[(2) - (5)].bValue)) tt.ot(Type::OT_OPTIONAL);
3564
+
if ((yyvsp[-3].bValue)) tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3747
-
{ (yyval.tiexpr) = (yyvsp[(5) - (5)].tiexpr);
3570
+
case 87: /* base_ti_expr: "var" opt_opt "set" "of" base_ti_expr_tail */
3571
+
{ (yyval.tiexpr) = (yyvsp[0].tiexpr);
Type tt = (yyval.tiexpr)->type();
3752
-
if ((yyvsp[(2) - (5)].bValue)) tt.ot(Type::OT_OPTIONAL);
3576
+
if ((yyvsp[-3].bValue)) tt.ot(Type::OT_OPTIONAL);
(yyval.tiexpr)->type(tt);
3760
-
{ (yyval.bValue) = false; ;}
3582
+
case 88: /* opt_opt: %empty */
3583
+
{ (yyval.bValue) = false; }
3765
-
{ (yyval.bValue) = true; ;}
3586
+
case 89: /* opt_opt: "opt" */
3587
+
{ (yyval.bValue) = true; }
3770
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parint()); ;}
3590
+
case 90: /* base_ti_expr_tail: "int" */
3591
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parint()); }
3775
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parbool()); ;}
3594
+
case 91: /* base_ti_expr_tail: "bool" */
3595
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parbool()); }
3780
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parfloat()); ;}
3598
+
case 92: /* base_ti_expr_tail: "float" */
3599
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parfloat()); }
3785
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parstring()); ;}
3602
+
case 93: /* base_ti_expr_tail: "string" */
3603
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parstring()); }
3790
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::ann()); ;}
3606
+
case 94: /* base_ti_expr_tail: "ann" */
3607
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::ann()); }
3795
-
{ if ((yyvsp[(1) - (1)].expression)) (yyval.tiexpr) = new TypeInst((yyloc),Type(),(yyvsp[(1) - (1)].expression)); ;}
3610
+
case 95: /* base_ti_expr_tail: set_expr */
3611
+
{ if ((yyvsp[0].expression)) (yyval.tiexpr) = new TypeInst((yyloc),Type(),(yyvsp[0].expression)); }
3800
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::top(),
3801
-
new TIId((yyloc), (yyvsp[(1) - (1)].sValue)));
3802
-
free((yyvsp[(1) - (1)].sValue));
3614
+
case 96: /* base_ti_expr_tail: "type-inst identifier" */
3615
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::top(),
3616
+
new TIId((yyloc), (yyvsp[0].sValue)));
3617
+
free((yyvsp[0].sValue));
3808
-
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parint(),
3809
-
new TIId((yyloc), (yyvsp[(1) - (1)].sValue)));
3810
-
free((yyvsp[(1) - (1)].sValue));
3621
+
case 97: /* base_ti_expr_tail: "type-inst enum identifier" */
3622
+
{ (yyval.tiexpr) = new TypeInst((yyloc),Type::parint(),
3623
+
new TIId((yyloc), (yyvsp[0].sValue)));
3624
+
free((yyvsp[0].sValue));
3816
-
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; (yyval.expression_v)->push_back((yyvsp[(1) - (1)].expression)); ;}
3628
+
case 99: /* array_access_expr_list_head: array_access_expr */
3629
+
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; (yyval.expression_v)->push_back((yyvsp[0].expression)); }
3821
-
{ (yyval.expression_v)=(yyvsp[(1) - (3)].expression_v); if ((yyval.expression_v) && (yyvsp[(3) - (3)].expression)) (yyval.expression_v)->push_back((yyvsp[(3) - (3)].expression)); ;}
3632
+
case 100: /* array_access_expr_list_head: array_access_expr_list_head ',' array_access_expr */
3633
+
{ (yyval.expression_v)=(yyvsp[-2].expression_v); if ((yyval.expression_v) && (yyvsp[0].expression)) (yyval.expression_v)->push_back((yyvsp[0].expression)); }
3826
-
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); ;}
3636
+
case 101: /* array_access_expr: expr */
3637
+
{ (yyval.expression) = (yyvsp[0].expression); }
3831
-
{ (yyval.expression)=new SetLit((yyloc), IntSetVal::a(-IntVal::infinity(),IntVal::infinity())); ;}
3640
+
case 102: /* array_access_expr: ".." */
3641
+
{ (yyval.expression)=new SetLit((yyloc), IntSetVal::a(-IntVal::infinity(),IntVal::infinity())); }
3836
-
{ if ((yyvsp[(2) - (2)].expression)==NULL) {
3644
+
case 103: /* array_access_expr: ".." expr */
3645
+
{ if ((yyvsp[0].expression)==NULL) {
(yyval.expression) = NULL;
3838
-
} else if ((yyvsp[(2) - (2)].expression)->isa<IntLit>()) {
3839
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a(-IntVal::infinity(),(yyvsp[(2) - (2)].expression)->cast<IntLit>()->v()));
3647
+
} else if ((yyvsp[0].expression)->isa<IntLit>()) {
3648
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a(-IntVal::infinity(),(yyvsp[0].expression)->cast<IntLit>()->v()));
3841
-
(yyval.expression)=new BinOp((yyloc), IntLit::a(-IntVal::infinity()), BOT_DOTDOT, (yyvsp[(2) - (2)].expression));
3650
+
(yyval.expression)=new BinOp((yyloc), IntLit::a(-IntVal::infinity()), BOT_DOTDOT, (yyvsp[0].expression));
3848
-
{ if ((yyvsp[(1) - (2)].expression)==NULL) {
3655
+
case 104: /* array_access_expr: expr ".." */
3656
+
{ if ((yyvsp[-1].expression)==NULL) {
(yyval.expression) = NULL;
3850
-
} else if ((yyvsp[(1) - (2)].expression)->isa<IntLit>()) {
3851
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[(1) - (2)].expression)->cast<IntLit>()->v(),IntVal::infinity()));
3658
+
} else if ((yyvsp[-1].expression)->isa<IntLit>()) {
3659
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[-1].expression)->cast<IntLit>()->v(),IntVal::infinity()));
3853
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (2)].expression), BOT_DOTDOT, IntLit::a(IntVal::infinity()));
3661
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-1].expression), BOT_DOTDOT, IntLit::a(IntVal::infinity()));
3860
-
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; (yyval.expression_v)->push_back((yyvsp[(1) - (1)].expression)); ;}
3666
+
case 106: /* expr_list_head: expr */
3667
+
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; (yyval.expression_v)->push_back((yyvsp[0].expression)); }
3865
-
{ (yyval.expression_v)=(yyvsp[(1) - (3)].expression_v); if ((yyval.expression_v) && (yyvsp[(3) - (3)].expression)) (yyval.expression_v)->push_back((yyvsp[(3) - (3)].expression)); ;}
3670
+
case 107: /* expr_list_head: expr_list_head ',' expr */
3671
+
{ (yyval.expression_v)=(yyvsp[-2].expression_v); if ((yyval.expression_v) && (yyvsp[0].expression)) (yyval.expression_v)->push_back((yyvsp[0].expression)); }
3870
-
{ if ((yyvsp[(1) - (3)].expression) && (yyvsp[(3) - (3)].expression)) (yyvsp[(1) - (3)].expression)->addAnnotation((yyvsp[(3) - (3)].expression)); (yyval.expression)=(yyvsp[(1) - (3)].expression); ;}
3674
+
case 109: /* set_expr: set_expr "::" annotation_expr */
3675
+
{ if ((yyvsp[-2].expression) && (yyvsp[0].expression)) (yyvsp[-2].expression)->addAnnotation((yyvsp[0].expression)); (yyval.expression)=(yyvsp[-2].expression); }
3875
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_UNION, (yyvsp[(3) - (3)].expression)); ;}
3678
+
case 110: /* set_expr: set_expr "union" set_expr */
3679
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_UNION, (yyvsp[0].expression)); }
3880
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DIFF, (yyvsp[(3) - (3)].expression)); ;}
3682
+
case 111: /* set_expr: set_expr "diff" set_expr */
3683
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DIFF, (yyvsp[0].expression)); }
3885
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_SYMDIFF, (yyvsp[(3) - (3)].expression)); ;}
3686
+
case 112: /* set_expr: set_expr "symdiff" set_expr */
3687
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_SYMDIFF, (yyvsp[0].expression)); }
3890
-
{ if ((yyvsp[(1) - (3)].expression)==NULL || (yyvsp[(3) - (3)].expression)==NULL) {
3690
+
case 113: /* set_expr: set_expr ".." set_expr */
3691
+
{ if ((yyvsp[-2].expression)==NULL || (yyvsp[0].expression)==NULL) {
(yyval.expression) = NULL;
3892
-
} else if ((yyvsp[(1) - (3)].expression)->isa<IntLit>() && (yyvsp[(3) - (3)].expression)->isa<IntLit>()) {
3893
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[(1) - (3)].expression)->cast<IntLit>()->v(),(yyvsp[(3) - (3)].expression)->cast<IntLit>()->v()));
3693
+
} else if ((yyvsp[-2].expression)->isa<IntLit>() && (yyvsp[0].expression)->isa<IntLit>()) {
3694
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[-2].expression)->cast<IntLit>()->v(),(yyvsp[0].expression)->cast<IntLit>()->v()));
3895
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DOTDOT, (yyvsp[(3) - (3)].expression));
3696
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DOTDOT, (yyvsp[0].expression));
3902
-
{ if ((yyvsp[(3) - (6)].expression)==NULL || (yyvsp[(5) - (6)].expression)==NULL) {
3701
+
case 114: /* set_expr: "'..'" '(' expr ',' expr ')' */
3702
+
{ if ((yyvsp[-3].expression)==NULL || (yyvsp[-1].expression)==NULL) {
(yyval.expression) = NULL;
3904
-
} else if ((yyvsp[(3) - (6)].expression)->isa<IntLit>() && (yyvsp[(5) - (6)].expression)->isa<IntLit>()) {
3905
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[(3) - (6)].expression)->cast<IntLit>()->v(),(yyvsp[(5) - (6)].expression)->cast<IntLit>()->v()));
3704
+
} else if ((yyvsp[-3].expression)->isa<IntLit>() && (yyvsp[-1].expression)->isa<IntLit>()) {
3705
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[-3].expression)->cast<IntLit>()->v(),(yyvsp[-1].expression)->cast<IntLit>()->v()));
3907
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(3) - (6)].expression), BOT_DOTDOT, (yyvsp[(5) - (6)].expression));
3707
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-3].expression), BOT_DOTDOT, (yyvsp[-1].expression));
3914
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_INTERSECT, (yyvsp[(3) - (3)].expression)); ;}
3712
+
case 115: /* set_expr: set_expr "intersect" set_expr */
3713
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_INTERSECT, (yyvsp[0].expression)); }
3919
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_PLUSPLUS, (yyvsp[(3) - (3)].expression)); ;}
3716
+
case 116: /* set_expr: set_expr "++" set_expr */
3717
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_PLUSPLUS, (yyvsp[0].expression)); }
3924
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_PLUS, (yyvsp[(3) - (3)].expression)); ;}
3720
+
case 117: /* set_expr: set_expr "+" set_expr */
3721
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_PLUS, (yyvsp[0].expression)); }
3929
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MINUS, (yyvsp[(3) - (3)].expression)); ;}
3724
+
case 118: /* set_expr: set_expr "-" set_expr */
3725
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MINUS, (yyvsp[0].expression)); }
3934
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MULT, (yyvsp[(3) - (3)].expression)); ;}
3728
+
case 119: /* set_expr: set_expr "*" set_expr */
3729
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MULT, (yyvsp[0].expression)); }
3939
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DIV, (yyvsp[(3) - (3)].expression)); ;}
3732
+
case 120: /* set_expr: set_expr "/" set_expr */
3733
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DIV, (yyvsp[0].expression)); }
3944
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_IDIV, (yyvsp[(3) - (3)].expression)); ;}
3736
+
case 121: /* set_expr: set_expr "div" set_expr */
3737
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_IDIV, (yyvsp[0].expression)); }
3949
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MOD, (yyvsp[(3) - (3)].expression)); ;}
3740
+
case 122: /* set_expr: set_expr "mod" set_expr */
3741
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MOD, (yyvsp[0].expression)); }
3954
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_POW, (yyvsp[(3) - (3)].expression)); ;}
3744
+
case 123: /* set_expr: set_expr "^" set_expr */
3745
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_POW, (yyvsp[0].expression)); }
3959
-
{ vector<Expression*> args;
3960
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3748
+
case 124: /* set_expr: set_expr "~+" set_expr */
3749
+
{ vector<Expression*> args;
3750
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~+"), args);
3967
-
{ vector<Expression*> args;
3968
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3755
+
case 125: /* set_expr: set_expr "~-" set_expr */
3756
+
{ vector<Expression*> args;
3757
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~-"), args);
3975
-
{ vector<Expression*> args;
3976
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3762
+
case 126: /* set_expr: set_expr "~*" set_expr */
3763
+
{ vector<Expression*> args;
3764
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~*"), args);
3983
-
{ vector<Expression*> args;
3984
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3769
+
case 127: /* set_expr: set_expr "~=" set_expr */
3770
+
{ vector<Expression*> args;
3771
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~="), args);
3991
-
{ vector<Expression*> args;
3992
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3993
-
(yyval.expression)=new Call((yyloc), (yyvsp[(2) - (3)].sValue), args);
3994
-
free((yyvsp[(2) - (3)].sValue));
3776
+
case 128: /* set_expr: set_expr "quoted identifier" set_expr */
3777
+
{ vector<Expression*> args;
3778
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
3779
+
(yyval.expression)=new Call((yyloc), (yyvsp[-1].sValue), args);
3780
+
free((yyvsp[-1].sValue));
4000
-
{ (yyval.expression)=new UnOp((yyloc), UOT_PLUS, (yyvsp[(2) - (2)].expression)); ;}
3784
+
case 129: /* set_expr: "+" set_expr */
3785
+
{ (yyval.expression)=new UnOp((yyloc), UOT_PLUS, (yyvsp[0].expression)); }
4005
-
{ if ((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<IntLit>()) {
4006
-
(yyval.expression) = IntLit::a(-(yyvsp[(2) - (2)].expression)->cast<IntLit>()->v());
4007
-
} else if ((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<FloatLit>()) {
4008
-
(yyval.expression) = FloatLit::a(-(yyvsp[(2) - (2)].expression)->cast<FloatLit>()->v());
3788
+
case 130: /* set_expr: "-" set_expr */
3789
+
{ if ((yyvsp[0].expression) && (yyvsp[0].expression)->isa<IntLit>()) {
3790
+
(yyval.expression) = IntLit::a(-(yyvsp[0].expression)->cast<IntLit>()->v());
3791
+
} else if ((yyvsp[0].expression) && (yyvsp[0].expression)->isa<FloatLit>()) {
3792
+
(yyval.expression) = FloatLit::a(-(yyvsp[0].expression)->cast<FloatLit>()->v());
4010
-
(yyval.expression)=new UnOp((yyloc), UOT_MINUS, (yyvsp[(2) - (2)].expression));
3794
+
(yyval.expression)=new UnOp((yyloc), UOT_MINUS, (yyvsp[0].expression));
4017
-
{ if ((yyvsp[(1) - (3)].expression) && (yyvsp[(3) - (3)].expression)) (yyvsp[(1) - (3)].expression)->addAnnotation((yyvsp[(3) - (3)].expression)); (yyval.expression)=(yyvsp[(1) - (3)].expression); ;}
3799
+
case 132: /* expr: expr "::" annotation_expr */
3800
+
{ if ((yyvsp[-2].expression) && (yyvsp[0].expression)) (yyvsp[-2].expression)->addAnnotation((yyvsp[0].expression)); (yyval.expression)=(yyvsp[-2].expression); }
4022
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_EQUIV, (yyvsp[(3) - (3)].expression)); ;}
3803
+
case 133: /* expr: expr "<->" expr */
3804
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_EQUIV, (yyvsp[0].expression)); }
4027
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_IMPL, (yyvsp[(3) - (3)].expression)); ;}
3807
+
case 134: /* expr: expr "->" expr */
3808
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_IMPL, (yyvsp[0].expression)); }
4032
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_RIMPL, (yyvsp[(3) - (3)].expression)); ;}
3811
+
case 135: /* expr: expr "<-" expr */
3812
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_RIMPL, (yyvsp[0].expression)); }
4037
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_OR, (yyvsp[(3) - (3)].expression)); ;}
3815
+
case 136: /* expr: expr "\\/" expr */
3816
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_OR, (yyvsp[0].expression)); }
4042
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_XOR, (yyvsp[(3) - (3)].expression)); ;}
3819
+
case 137: /* expr: expr "xor" expr */
3820
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_XOR, (yyvsp[0].expression)); }
4047
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_AND, (yyvsp[(3) - (3)].expression)); ;}
3823
+
case 138: /* expr: expr "/\\" expr */
3824
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_AND, (yyvsp[0].expression)); }
4052
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_LE, (yyvsp[(3) - (3)].expression)); ;}
3827
+
case 139: /* expr: expr "<" expr */
3828
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_LE, (yyvsp[0].expression)); }
4057
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_GR, (yyvsp[(3) - (3)].expression)); ;}
3831
+
case 140: /* expr: expr ">" expr */
3832
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_GR, (yyvsp[0].expression)); }
4062
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_LQ, (yyvsp[(3) - (3)].expression)); ;}
3835
+
case 141: /* expr: expr "<=" expr */
3836
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_LQ, (yyvsp[0].expression)); }
4067
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_GQ, (yyvsp[(3) - (3)].expression)); ;}
3839
+
case 142: /* expr: expr ">=" expr */
3840
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_GQ, (yyvsp[0].expression)); }
4072
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_EQ, (yyvsp[(3) - (3)].expression)); ;}
3843
+
case 143: /* expr: expr "=" expr */
3844
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_EQ, (yyvsp[0].expression)); }
4077
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_NQ, (yyvsp[(3) - (3)].expression)); ;}
3847
+
case 144: /* expr: expr "!=" expr */
3848
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_NQ, (yyvsp[0].expression)); }
4082
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_IN, (yyvsp[(3) - (3)].expression)); ;}
3851
+
case 145: /* expr: expr "in" expr */
3852
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_IN, (yyvsp[0].expression)); }
4087
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_SUBSET, (yyvsp[(3) - (3)].expression)); ;}
3855
+
case 146: /* expr: expr "subset" expr */
3856
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_SUBSET, (yyvsp[0].expression)); }
4092
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_SUPERSET, (yyvsp[(3) - (3)].expression)); ;}
3859
+
case 147: /* expr: expr "superset" expr */
3860
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_SUPERSET, (yyvsp[0].expression)); }
4097
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_UNION, (yyvsp[(3) - (3)].expression)); ;}
3863
+
case 148: /* expr: expr "union" expr */
3864
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_UNION, (yyvsp[0].expression)); }
4102
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DIFF, (yyvsp[(3) - (3)].expression)); ;}
3867
+
case 149: /* expr: expr "diff" expr */
3868
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DIFF, (yyvsp[0].expression)); }
4107
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_SYMDIFF, (yyvsp[(3) - (3)].expression)); ;}
3871
+
case 150: /* expr: expr "symdiff" expr */
3872
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_SYMDIFF, (yyvsp[0].expression)); }
4112
-
{ if ((yyvsp[(1) - (3)].expression)==NULL || (yyvsp[(3) - (3)].expression)==NULL) {
3875
+
case 151: /* expr: expr ".." expr */
3876
+
{ if ((yyvsp[-2].expression)==NULL || (yyvsp[0].expression)==NULL) {
(yyval.expression) = NULL;
4114
-
} else if ((yyvsp[(1) - (3)].expression)->isa<IntLit>() && (yyvsp[(3) - (3)].expression)->isa<IntLit>()) {
4115
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[(1) - (3)].expression)->cast<IntLit>()->v(),(yyvsp[(3) - (3)].expression)->cast<IntLit>()->v()));
3878
+
} else if ((yyvsp[-2].expression)->isa<IntLit>() && (yyvsp[0].expression)->isa<IntLit>()) {
3879
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[-2].expression)->cast<IntLit>()->v(),(yyvsp[0].expression)->cast<IntLit>()->v()));
4117
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DOTDOT, (yyvsp[(3) - (3)].expression));
3881
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DOTDOT, (yyvsp[0].expression));
4124
-
{ if ((yyvsp[(3) - (6)].expression)==NULL || (yyvsp[(5) - (6)].expression)==NULL) {
3886
+
case 152: /* expr: "'..'" '(' expr ',' expr ')' */
3887
+
{ if ((yyvsp[-3].expression)==NULL || (yyvsp[-1].expression)==NULL) {
(yyval.expression) = NULL;
4126
-
} else if ((yyvsp[(3) - (6)].expression)->isa<IntLit>() && (yyvsp[(5) - (6)].expression)->isa<IntLit>()) {
4127
-
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[(3) - (6)].expression)->cast<IntLit>()->v(),(yyvsp[(5) - (6)].expression)->cast<IntLit>()->v()));
3889
+
} else if ((yyvsp[-3].expression)->isa<IntLit>() && (yyvsp[-1].expression)->isa<IntLit>()) {
3890
+
(yyval.expression)=new SetLit((yyloc), IntSetVal::a((yyvsp[-3].expression)->cast<IntLit>()->v(),(yyvsp[-1].expression)->cast<IntLit>()->v()));
4129
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(3) - (6)].expression), BOT_DOTDOT, (yyvsp[(5) - (6)].expression));
3892
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-3].expression), BOT_DOTDOT, (yyvsp[-1].expression));
4136
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_INTERSECT, (yyvsp[(3) - (3)].expression)); ;}
3897
+
case 153: /* expr: expr "intersect" expr */
3898
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_INTERSECT, (yyvsp[0].expression)); }
4141
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_PLUSPLUS, (yyvsp[(3) - (3)].expression)); ;}
3901
+
case 154: /* expr: expr "++" expr */
3902
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_PLUSPLUS, (yyvsp[0].expression)); }
4146
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_PLUS, (yyvsp[(3) - (3)].expression)); ;}
3905
+
case 155: /* expr: expr "+" expr */
3906
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_PLUS, (yyvsp[0].expression)); }
4151
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MINUS, (yyvsp[(3) - (3)].expression)); ;}
3909
+
case 156: /* expr: expr "-" expr */
3910
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MINUS, (yyvsp[0].expression)); }
4156
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MULT, (yyvsp[(3) - (3)].expression)); ;}
3913
+
case 157: /* expr: expr "*" expr */
3914
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MULT, (yyvsp[0].expression)); }
4161
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_DIV, (yyvsp[(3) - (3)].expression)); ;}
3917
+
case 158: /* expr: expr "/" expr */
3918
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_DIV, (yyvsp[0].expression)); }
4166
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_IDIV, (yyvsp[(3) - (3)].expression)); ;}
3921
+
case 159: /* expr: expr "div" expr */
3922
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_IDIV, (yyvsp[0].expression)); }
4171
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_MOD, (yyvsp[(3) - (3)].expression)); ;}
3925
+
case 160: /* expr: expr "mod" expr */
3926
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_MOD, (yyvsp[0].expression)); }
4176
-
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[(1) - (3)].expression), BOT_POW, (yyvsp[(3) - (3)].expression)); ;}
3929
+
case 161: /* expr: expr "^" expr */
3930
+
{ (yyval.expression)=new BinOp((yyloc), (yyvsp[-2].expression), BOT_POW, (yyvsp[0].expression)); }
4181
-
{ vector<Expression*> args;
4182
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3933
+
case 162: /* expr: expr "~+" expr */
3934
+
{ vector<Expression*> args;
3935
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~+"), args);
4189
-
{ vector<Expression*> args;
4190
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3940
+
case 163: /* expr: expr "~-" expr */
3941
+
{ vector<Expression*> args;
3942
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~-"), args);
4197
-
{ vector<Expression*> args;
4198
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3947
+
case 164: /* expr: expr "~*" expr */
3948
+
{ vector<Expression*> args;
3949
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~*"), args);
4205
-
{ vector<Expression*> args;
4206
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
3954
+
case 165: /* expr: expr "~=" expr */
3955
+
{ vector<Expression*> args;
3956
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
(yyval.expression)=new Call((yyloc), ASTString("~="), args);
4213
-
{ vector<Expression*> args;
4214
-
args.push_back((yyvsp[(1) - (3)].expression)); args.push_back((yyvsp[(3) - (3)].expression));
4215
-
(yyval.expression)=new Call((yyloc), (yyvsp[(2) - (3)].sValue), args);
4216
-
free((yyvsp[(2) - (3)].sValue));
3961
+
case 166: /* expr: expr "quoted identifier" expr */
3962
+
{ vector<Expression*> args;
3963
+
args.push_back((yyvsp[-2].expression)); args.push_back((yyvsp[0].expression));
3964
+
(yyval.expression)=new Call((yyloc), (yyvsp[-1].sValue), args);
3965
+
free((yyvsp[-1].sValue));
4222
-
{ (yyval.expression)=new UnOp((yyloc), UOT_NOT, (yyvsp[(2) - (2)].expression)); ;}
3969
+
case 167: /* expr: "not" expr */
3970
+
{ (yyval.expression)=new UnOp((yyloc), UOT_NOT, (yyvsp[0].expression)); }
4227
-
{ if (((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<IntLit>()) || ((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<FloatLit>())) {
4228
-
(yyval.expression) = (yyvsp[(2) - (2)].expression);
3973
+
case 168: /* expr: "+" expr */
3974
+
{ if (((yyvsp[0].expression) && (yyvsp[0].expression)->isa<IntLit>()) || ((yyvsp[0].expression) && (yyvsp[0].expression)->isa<FloatLit>())) {
3975
+
(yyval.expression) = (yyvsp[0].expression);
4230
-
(yyval.expression)=new UnOp((yyloc), UOT_PLUS, (yyvsp[(2) - (2)].expression));
3977
+
(yyval.expression)=new UnOp((yyloc), UOT_PLUS, (yyvsp[0].expression));
4237
-
{ if ((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<IntLit>()) {
4238
-
(yyval.expression) = IntLit::a(-(yyvsp[(2) - (2)].expression)->cast<IntLit>()->v());
4239
-
} else if ((yyvsp[(2) - (2)].expression) && (yyvsp[(2) - (2)].expression)->isa<FloatLit>()) {
4240
-
(yyval.expression) = FloatLit::a(-(yyvsp[(2) - (2)].expression)->cast<FloatLit>()->v());
3982
+
case 169: /* expr: "-" expr */
3983
+
{ if ((yyvsp[0].expression) && (yyvsp[0].expression)->isa<IntLit>()) {
3984
+
(yyval.expression) = IntLit::a(-(yyvsp[0].expression)->cast<IntLit>()->v());
3985
+
} else if ((yyvsp[0].expression) && (yyvsp[0].expression)->isa<FloatLit>()) {
3986
+
(yyval.expression) = FloatLit::a(-(yyvsp[0].expression)->cast<FloatLit>()->v());
4242
-
(yyval.expression)=new UnOp((yyloc), UOT_MINUS, (yyvsp[(2) - (2)].expression));
3988
+
(yyval.expression)=new UnOp((yyloc), UOT_MINUS, (yyvsp[0].expression));
4249
-
{ (yyval.expression)=(yyvsp[(1) - (1)].expression); ;}
3993
+
case 170: /* expr_atom_head: expr_atom_head_nonstring */
3994
+
{ (yyval.expression)=(yyvsp[0].expression); }
4254
-
{ (yyval.expression)=(yyvsp[(1) - (1)].expression); ;}
3997
+
case 171: /* expr_atom_head: string_expr */
3998
+
{ (yyval.expression)=(yyvsp[0].expression); }
4259
-
{ (yyval.expression)=(yyvsp[(2) - (3)].expression); ;}
4001
+
case 172: /* expr_atom_head_nonstring: '(' expr ')' */
4002
+
{ (yyval.expression)=(yyvsp[-1].expression); }
4264
-
{ if ((yyvsp[(4) - (4)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(2) - (4)].expression), *(yyvsp[(4) - (4)].expression_vv)); delete (yyvsp[(4) - (4)].expression_vv); ;}
4005
+
case 173: /* expr_atom_head_nonstring: '(' expr ')' array_access_tail */
4006
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-2].expression), *(yyvsp[0].expression_vv)); delete (yyvsp[0].expression_vv); }
4269
-
{ (yyval.expression)=new Id((yyloc), (yyvsp[(1) - (1)].sValue), NULL); free((yyvsp[(1) - (1)].sValue)); ;}
4009
+
case 174: /* expr_atom_head_nonstring: "identifier" */
4010
+
{ (yyval.expression)=new Id((yyloc), (yyvsp[0].sValue), NULL); free((yyvsp[0].sValue)); }
4274
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), new Id((yylsp[(1) - (2)]),(yyvsp[(1) - (2)].sValue),NULL), *(yyvsp[(2) - (2)].expression_vv));
4275
-
free((yyvsp[(1) - (2)].sValue)); delete (yyvsp[(2) - (2)].expression_vv); ;}
4013
+
case 175: /* expr_atom_head_nonstring: "identifier" array_access_tail */
4014
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), new Id((yylsp[-1]),(yyvsp[-1].sValue),NULL), *(yyvsp[0].expression_vv));
4015
+
free((yyvsp[-1].sValue)); delete (yyvsp[0].expression_vv); }
4280
-
{ (yyval.expression)=new AnonVar((yyloc)); ;}
4018
+
case 176: /* expr_atom_head_nonstring: "_" */
4019
+
{ (yyval.expression)=new AnonVar((yyloc)); }
4285
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), new AnonVar((yyloc)), *(yyvsp[(2) - (2)].expression_vv));
4286
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4022
+
case 177: /* expr_atom_head_nonstring: "_" array_access_tail */
4023
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), new AnonVar((yyloc)), *(yyvsp[0].expression_vv));
4024
+
delete (yyvsp[0].expression_vv); }
4291
-
{ (yyval.expression)=constants().boollit(((yyvsp[(1) - (1)].iValue)!=0)); ;}
4027
+
case 178: /* expr_atom_head_nonstring: "bool literal" */
4028
+
{ (yyval.expression)=constants().boollit(((yyvsp[0].iValue)!=0)); }
4296
-
{ (yyval.expression)=IntLit::a((yyvsp[(1) - (1)].iValue)); ;}
4031
+
case 179: /* expr_atom_head_nonstring: "integer literal" */
4032
+
{ (yyval.expression)=IntLit::a((yyvsp[0].iValue)); }
4301
-
{ (yyval.expression)=IntLit::a(IntVal::infinity()); ;}
4035
+
case 180: /* expr_atom_head_nonstring: "infinity" */
4036
+
{ (yyval.expression)=IntLit::a(IntVal::infinity()); }
4306
-
{ (yyval.expression)=FloatLit::a((yyvsp[(1) - (1)].dValue)); ;}
4039
+
case 181: /* expr_atom_head_nonstring: "float literal" */
4040
+
{ (yyval.expression)=FloatLit::a((yyvsp[0].dValue)); }
4311
-
{ (yyval.expression)=constants().absent; ;}
4043
+
case 182: /* expr_atom_head_nonstring: "<>" */
4044
+
{ (yyval.expression)=constants().absent; }
4316
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4317
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4047
+
case 184: /* expr_atom_head_nonstring: set_literal array_access_tail */
4048
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4049
+
delete (yyvsp[0].expression_vv); }
4322
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4323
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4052
+
case 186: /* expr_atom_head_nonstring: set_comp array_access_tail */
4053
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4054
+
delete (yyvsp[0].expression_vv); }
4328
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4329
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4057
+
case 188: /* expr_atom_head_nonstring: simple_array_literal array_access_tail */
4058
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4059
+
delete (yyvsp[0].expression_vv); }
4334
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4335
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4062
+
case 190: /* expr_atom_head_nonstring: simple_array_literal_2d array_access_tail */
4063
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4064
+
delete (yyvsp[0].expression_vv); }
4340
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4341
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4067
+
case 192: /* expr_atom_head_nonstring: simple_array_comp array_access_tail */
4068
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4069
+
delete (yyvsp[0].expression_vv); }
4346
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4347
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4072
+
case 194: /* expr_atom_head_nonstring: if_then_else_expr array_access_tail */
4073
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4074
+
delete (yyvsp[0].expression_vv); }
4352
-
{ if ((yyvsp[(2) - (2)].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[(1) - (2)].expression), *(yyvsp[(2) - (2)].expression_vv));
4353
-
delete (yyvsp[(2) - (2)].expression_vv); ;}
4077
+
case 197: /* expr_atom_head_nonstring: call_expr array_access_tail */
4078
+
{ if ((yyvsp[0].expression_vv)) (yyval.expression)=createArrayAccess((yyloc), (yyvsp[-1].expression), *(yyvsp[0].expression_vv));
4079
+
delete (yyvsp[0].expression_vv); }
4358
-
{ (yyval.expression)=new StringLit((yyloc), (yyvsp[(1) - (1)].sValue)); free((yyvsp[(1) - (1)].sValue)); ;}
4082
+
case 198: /* string_expr: "string literal" */
4083
+
{ (yyval.expression)=new StringLit((yyloc), (yyvsp[0].sValue)); free((yyvsp[0].sValue)); }
4363
-
{ (yyval.expression)=new BinOp((yyloc), new StringLit((yyloc), (yyvsp[(1) - (2)].sValue)), BOT_PLUSPLUS, (yyvsp[(2) - (2)].expression));
4364
-
free((yyvsp[(1) - (2)].sValue));
4086
+
case 199: /* string_expr: "interpolated string start" string_quote_rest */
4087
+
{ (yyval.expression)=new BinOp((yyloc), new StringLit((yyloc), (yyvsp[-1].sValue)), BOT_PLUSPLUS, (yyvsp[0].expression));
4088
+
free((yyvsp[-1].sValue));
4370
-
{ if ((yyvsp[(1) - (2)].expression_v)) (yyval.expression)=new BinOp((yyloc), new Call((yyloc), ASTString("format"), *(yyvsp[(1) - (2)].expression_v)), BOT_PLUSPLUS, new StringLit((yyloc),(yyvsp[(2) - (2)].sValue)));
4371
-
free((yyvsp[(2) - (2)].sValue));
4372
-
delete (yyvsp[(1) - (2)].expression_v);
4092
+
case 200: /* string_quote_rest: expr_list_head "interpolated string end" */
4093
+
{ if ((yyvsp[-1].expression_v)) (yyval.expression)=new BinOp((yyloc), new Call((yyloc), ASTString("format"), *(yyvsp[-1].expression_v)), BOT_PLUSPLUS, new StringLit((yyloc),(yyvsp[0].sValue)));
4094
+
free((yyvsp[0].sValue));
4095
+
delete (yyvsp[-1].expression_v);
4378
-
{ if ((yyvsp[(1) - (3)].expression_v)) (yyval.expression)=new BinOp((yyloc), new Call((yyloc), ASTString("format"), *(yyvsp[(1) - (3)].expression_v)), BOT_PLUSPLUS,
4379
-
new BinOp((yyloc), new StringLit((yyloc),(yyvsp[(2) - (3)].sValue)), BOT_PLUSPLUS, (yyvsp[(3) - (3)].expression)));
4380
-
free((yyvsp[(2) - (3)].sValue));
4381
-
delete (yyvsp[(1) - (3)].expression_v);
4099
+
case 201: /* string_quote_rest: expr_list_head "interpolated string middle" string_quote_rest */
4100
+
{ if ((yyvsp[-2].expression_v)) (yyval.expression)=new BinOp((yyloc), new Call((yyloc), ASTString("format"), *(yyvsp[-2].expression_v)), BOT_PLUSPLUS,
4101
+
new BinOp((yyloc), new StringLit((yyloc),(yyvsp[-1].sValue)), BOT_PLUSPLUS, (yyvsp[0].expression)));
4102
+
free((yyvsp[-1].sValue));
4103
+
delete (yyvsp[-2].expression_v);
4387
-
{ (yyval.expression_vv)=new std::vector<std::vector<Expression*> >();
4388
-
if ((yyvsp[(2) - (3)].expression_v)) {
4389
-
(yyval.expression_vv)->push_back(*(yyvsp[(2) - (3)].expression_v));
4390
-
delete (yyvsp[(2) - (3)].expression_v);
4107
+
case 202: /* array_access_tail: "[" array_access_expr_list "]" */
4108
+
{ (yyval.expression_vv)=new std::vector<std::vector<Expression*> >();
4109
+
if ((yyvsp[-1].expression_v)) {
4110
+
(yyval.expression_vv)->push_back(*(yyvsp[-1].expression_v));
4111
+
delete (yyvsp[-1].expression_v);
4397
-
{ (yyval.expression_vv)=(yyvsp[(1) - (4)].expression_vv);
4398
-
if ((yyval.expression_vv) && (yyvsp[(3) - (4)].expression_v)) {
4399
-
(yyval.expression_vv)->push_back(*(yyvsp[(3) - (4)].expression_v));
4400
-
delete (yyvsp[(3) - (4)].expression_v);
4116
+
case 203: /* array_access_tail: array_access_tail "[" array_access_expr_list "]" */
4117
+
{ (yyval.expression_vv)=(yyvsp[-3].expression_vv);
4118
+
if ((yyval.expression_vv) && (yyvsp[-1].expression_v)) {
4119
+
(yyval.expression_vv)->push_back(*(yyvsp[-1].expression_v));
4120
+
delete (yyvsp[-1].expression_v);
4407
-
{ (yyval.expression) = new SetLit((yyloc), std::vector<Expression*>()); ;}
4125
+
case 204: /* set_literal: '{' '}' */
4126
+
{ (yyval.expression) = new SetLit((yyloc), std::vector<Expression*>()); }
4412
-
{ if ((yyvsp[(2) - (3)].expression_v)) (yyval.expression) = new SetLit((yyloc), *(yyvsp[(2) - (3)].expression_v));
4413
-
delete (yyvsp[(2) - (3)].expression_v); ;}
4129
+
case 205: /* set_literal: '{' expr_list '}' */
4130
+
{ if ((yyvsp[-1].expression_v)) (yyval.expression) = new SetLit((yyloc), *(yyvsp[-1].expression_v));
4131
+
delete (yyvsp[-1].expression_v); }
4418
-
{ if ((yyvsp[(4) - (5)].generators)) (yyval.expression) = new Comprehension((yyloc), (yyvsp[(2) - (5)].expression), *(yyvsp[(4) - (5)].generators), true);
4419
-
delete (yyvsp[(4) - (5)].generators);
4134
+
case 206: /* set_comp: '{' expr '|' comp_tail '}' */
4135
+
{ if ((yyvsp[-1].generators)) (yyval.expression) = new Comprehension((yyloc), (yyvsp[-3].expression), *(yyvsp[-1].generators), true);
4136
+
delete (yyvsp[-1].generators);
4425
-
{ if ((yyvsp[(1) - (1)].generator_v)) (yyval.generators)=new Generators; (yyval.generators)->_g = *(yyvsp[(1) - (1)].generator_v); delete (yyvsp[(1) - (1)].generator_v); ;}
4140
+
case 207: /* comp_tail: generator_list */
4141
+
{ if ((yyvsp[0].generator_v)) (yyval.generators)=new Generators; (yyval.generators)->_g = *(yyvsp[0].generator_v); delete (yyvsp[0].generator_v); }
4430
-
{ (yyval.generator_v)=new std::vector<Generator>; if ((yyvsp[(1) - (1)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(1) - (1)].generator)); delete (yyvsp[(1) - (1)].generator); ;}
4144
+
case 209: /* generator_list_head: generator */
4145
+
{ (yyval.generator_v)=new std::vector<Generator>; if ((yyvsp[0].generator)) (yyval.generator_v)->push_back(*(yyvsp[0].generator)); delete (yyvsp[0].generator); }
4435
-
{ (yyval.generator_v)=new std::vector<Generator>; if ((yyvsp[(1) - (1)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(1) - (1)].generator)); delete (yyvsp[(1) - (1)].generator); ;}
4148
+
case 210: /* generator_list_head: generator_eq */
4149
+
{ (yyval.generator_v)=new std::vector<Generator>; if ((yyvsp[0].generator)) (yyval.generator_v)->push_back(*(yyvsp[0].generator)); delete (yyvsp[0].generator); }
4440
-
{ (yyval.generator_v)=new std::vector<Generator>;
4441
-
if ((yyvsp[(1) - (3)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(1) - (3)].generator));
4442
-
if ((yyvsp[(1) - (3)].generator) && (yyvsp[(3) - (3)].expression)) (yyval.generator_v)->push_back(Generator((yyval.generator_v)->size(),(yyvsp[(3) - (3)].expression)));
4443
-
delete (yyvsp[(1) - (3)].generator);
4152
+
case 211: /* generator_list_head: generator_eq "where" expr */
4153
+
{ (yyval.generator_v)=new std::vector<Generator>;
4154
+
if ((yyvsp[-2].generator)) (yyval.generator_v)->push_back(*(yyvsp[-2].generator));
4155
+
if ((yyvsp[-2].generator) && (yyvsp[0].expression)) (yyval.generator_v)->push_back(Generator((yyval.generator_v)->size(),(yyvsp[0].expression)));
4156
+
delete (yyvsp[-2].generator);
4449
-
{ (yyval.generator_v)=(yyvsp[(1) - (3)].generator_v); if ((yyval.generator_v) && (yyvsp[(3) - (3)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(3) - (3)].generator)); delete (yyvsp[(3) - (3)].generator); ;}
4160
+
case 212: /* generator_list_head: generator_list_head ',' generator */
4161
+
{ (yyval.generator_v)=(yyvsp[-2].generator_v); if ((yyval.generator_v) && (yyvsp[0].generator)) (yyval.generator_v)->push_back(*(yyvsp[0].generator)); delete (yyvsp[0].generator); }
4454
-
{ (yyval.generator_v)=(yyvsp[(1) - (3)].generator_v); if ((yyval.generator_v) && (yyvsp[(3) - (3)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(3) - (3)].generator)); delete (yyvsp[(3) - (3)].generator); ;}
4164
+
case 213: /* generator_list_head: generator_list_head ',' generator_eq */
4165
+
{ (yyval.generator_v)=(yyvsp[-2].generator_v); if ((yyval.generator_v) && (yyvsp[0].generator)) (yyval.generator_v)->push_back(*(yyvsp[0].generator)); delete (yyvsp[0].generator); }
4459
-
{ (yyval.generator_v)=(yyvsp[(1) - (5)].generator_v);
4460
-
if ((yyval.generator_v) && (yyvsp[(3) - (5)].generator)) (yyval.generator_v)->push_back(*(yyvsp[(3) - (5)].generator));
4461
-
if ((yyval.generator_v) && (yyvsp[(3) - (5)].generator) && (yyvsp[(5) - (5)].expression)) (yyval.generator_v)->push_back(Generator((yyval.generator_v)->size(),(yyvsp[(5) - (5)].expression)));
4462
-
delete (yyvsp[(3) - (5)].generator);
4168
+
case 214: /* generator_list_head: generator_list_head ',' generator_eq "where" expr */
4169
+
{ (yyval.generator_v)=(yyvsp[-4].generator_v);
4170
+
if ((yyval.generator_v) && (yyvsp[-2].generator)) (yyval.generator_v)->push_back(*(yyvsp[-2].generator));
4171
+
if ((yyval.generator_v) && (yyvsp[-2].generator) && (yyvsp[0].expression)) (yyval.generator_v)->push_back(Generator((yyval.generator_v)->size(),(yyvsp[0].expression)));
4172
+
delete (yyvsp[-2].generator);
4468
-
{ if ((yyvsp[(1) - (3)].string_v) && (yyvsp[(3) - (3)].expression)) (yyval.generator)=new Generator(*(yyvsp[(1) - (3)].string_v),(yyvsp[(3) - (3)].expression),NULL); else (yyval.generator)=NULL; delete (yyvsp[(1) - (3)].string_v); ;}
4176
+
case 215: /* generator: id_list "in" expr */
4177
+
{ if ((yyvsp[-2].string_v) && (yyvsp[0].expression)) (yyval.generator)=new Generator(*(yyvsp[-2].string_v),(yyvsp[0].expression),NULL); else (yyval.generator)=NULL; delete (yyvsp[-2].string_v); }
4473
-
{ if ((yyvsp[(1) - (5)].string_v) && (yyvsp[(3) - (5)].expression)) (yyval.generator)=new Generator(*(yyvsp[(1) - (5)].string_v),(yyvsp[(3) - (5)].expression),(yyvsp[(5) - (5)].expression)); else (yyval.generator)=NULL; delete (yyvsp[(1) - (5)].string_v); ;}
4180
+
case 216: /* generator: id_list "in" expr "where" expr */
4181
+
{ if ((yyvsp[-4].string_v) && (yyvsp[-2].expression)) (yyval.generator)=new Generator(*(yyvsp[-4].string_v),(yyvsp[-2].expression),(yyvsp[0].expression)); else (yyval.generator)=NULL; delete (yyvsp[-4].string_v); }
4478
-
{ if ((yyvsp[(3) - (3)].expression)) (yyval.generator)=new Generator({(yyvsp[(1) - (3)].sValue)},NULL,(yyvsp[(3) - (3)].expression)); else (yyval.generator)=NULL; free((yyvsp[(1) - (3)].sValue)); ;}
4184
+
case 217: /* generator_eq: "identifier" "=" expr */
4185
+
{ if ((yyvsp[0].expression)) (yyval.generator)=new Generator({(yyvsp[-2].sValue)},NULL,(yyvsp[0].expression)); else (yyval.generator)=NULL; free((yyvsp[-2].sValue)); }
4483
-
{ (yyval.string_v)=new std::vector<std::string>; (yyval.string_v)->push_back((yyvsp[(1) - (1)].sValue)); free((yyvsp[(1) - (1)].sValue)); ;}
4188
+
case 219: /* id_list_head: "identifier" */
4189
+
{ (yyval.string_v)=new std::vector<std::string>; (yyval.string_v)->push_back((yyvsp[0].sValue)); free((yyvsp[0].sValue)); }
4488
-
{ (yyval.string_v)=(yyvsp[(1) - (3)].string_v); if ((yyval.string_v) && (yyvsp[(3) - (3)].sValue)) (yyval.string_v)->push_back((yyvsp[(3) - (3)].sValue)); free((yyvsp[(3) - (3)].sValue)); ;}
4192
+
case 220: /* id_list_head: id_list_head ',' "identifier" */
4193
+
{ (yyval.string_v)=(yyvsp[-2].string_v); if ((yyval.string_v) && (yyvsp[0].sValue)) (yyval.string_v)->push_back((yyvsp[0].sValue)); free((yyvsp[0].sValue)); }
4493
-
{ (yyval.expression)=new ArrayLit((yyloc), std::vector<MiniZinc::Expression*>()); ;}
4196
+
case 221: /* simple_array_literal: "[" "]" */
4197
+
{ (yyval.expression)=new ArrayLit((yyloc), std::vector<MiniZinc::Expression*>()); }
4498
-
{ if ((yyvsp[(2) - (3)].expression_v)) (yyval.expression)=new ArrayLit((yyloc), *(yyvsp[(2) - (3)].expression_v)); delete (yyvsp[(2) - (3)].expression_v); ;}
4200
+
case 222: /* simple_array_literal: "[" expr_list "]" */
4201
+
{ if ((yyvsp[-1].expression_v)) (yyval.expression)=new ArrayLit((yyloc), *(yyvsp[-1].expression_v)); delete (yyvsp[-1].expression_v); }
4503
-
{ (yyval.expression)=new ArrayLit((yyloc), std::vector<std::vector<Expression*> >()); ;}
4204
+
case 223: /* simple_array_literal_2d: "[|" "|]" */
4205
+
{ (yyval.expression)=new ArrayLit((yyloc), std::vector<std::vector<Expression*> >()); }
4508
-
{ if ((yyvsp[(2) - (3)].expression_vv)) {
4509
-
(yyval.expression)=new ArrayLit((yyloc), *(yyvsp[(2) - (3)].expression_vv));
4510
-
for (unsigned int i=1; i<(yyvsp[(2) - (3)].expression_vv)->size(); i++)
4511
-
if ((*(yyvsp[(2) - (3)].expression_vv))[i].size() != (*(yyvsp[(2) - (3)].expression_vv))[i-1].size())
4512
-
yyerror(&(yylsp[(2) - (3)]), parm, "syntax error, all sub-arrays of 2d array literal must have the same length");
4513
-
delete (yyvsp[(2) - (3)].expression_vv);
4208
+
case 224: /* simple_array_literal_2d: "[|" simple_array_literal_2d_list "|]" */
4209
+
{ if ((yyvsp[-1].expression_vv)) {
4210
+
(yyval.expression)=new ArrayLit((yyloc), *(yyvsp[-1].expression_vv));
4211
+
for (unsigned int i=1; i<(yyvsp[-1].expression_vv)->size(); i++)
4212
+
if ((*(yyvsp[-1].expression_vv))[i].size() != (*(yyvsp[-1].expression_vv))[i-1].size())
4213
+
yyerror(&(yylsp[-1]), parm, "syntax error, all sub-arrays of 2d array literal must have the same length");
4214
+
delete (yyvsp[-1].expression_vv);
(yyval.expression) = NULL;
4522
-
{ if ((yyvsp[(2) - (4)].expression_vv)) {
4523
-
(yyval.expression)=new ArrayLit((yyloc), *(yyvsp[(2) - (4)].expression_vv));
4524
-
for (unsigned int i=1; i<(yyvsp[(2) - (4)].expression_vv)->size(); i++)
4525
-
if ((*(yyvsp[(2) - (4)].expression_vv))[i].size() != (*(yyvsp[(2) - (4)].expression_vv))[i-1].size())
4526
-
yyerror(&(yylsp[(2) - (4)]), parm, "syntax error, all sub-arrays of 2d array literal must have the same length");
4527
-
delete (yyvsp[(2) - (4)].expression_vv);
4221
+
case 225: /* simple_array_literal_2d: "[|" simple_array_literal_2d_list '|' "|]" */
4222
+
{ if ((yyvsp[-2].expression_vv)) {
4223
+
(yyval.expression)=new ArrayLit((yyloc), *(yyvsp[-2].expression_vv));
4224
+
for (unsigned int i=1; i<(yyvsp[-2].expression_vv)->size(); i++)
4225
+
if ((*(yyvsp[-2].expression_vv))[i].size() != (*(yyvsp[-2].expression_vv))[i-1].size())
4226
+
yyerror(&(yylsp[-2]), parm, "syntax error, all sub-arrays of 2d array literal must have the same length");
4227
+
delete (yyvsp[-2].expression_vv);
(yyval.expression) = NULL;
4234
+
case 226: /* simple_array_literal_2d: "[|" simple_array_literal_3d_list "|]" */
4537
-
if ((yyvsp[(2) - (3)].expression_vvv)) {
4236
+
if ((yyvsp[-1].expression_vvv)) {
std::vector<std::pair<int,int> > dims(3);
4539
-
dims[0] = std::pair<int,int>(1,static_cast<int>((yyvsp[(2) - (3)].expression_vvv)->size()));
4540
-
if ((yyvsp[(2) - (3)].expression_vvv)->size()==0) {
4238
+
dims[0] = std::pair<int,int>(1,static_cast<int>((yyvsp[-1].expression_vvv)->size()));
4239
+
if ((yyvsp[-1].expression_vvv)->size()==0) {
dims[1] = std::pair<int,int>(1,0);
dims[2] = std::pair<int,int>(1,0);
4544
-
dims[1] = std::pair<int,int>(1,static_cast<int>((*(yyvsp[(2) - (3)].expression_vvv))[0].size()));
4545
-
if ((*(yyvsp[(2) - (3)].expression_vvv))[0].size()==0) {
4243
+
dims[1] = std::pair<int,int>(1,static_cast<int>((*(yyvsp[-1].expression_vvv))[0].size()));
4244
+
if ((*(yyvsp[-1].expression_vvv))[0].size()==0) {
dims[2] = std::pair<int,int>(1,0);
4548
-
dims[2] = std::pair<int,int>(1,static_cast<int>((*(yyvsp[(2) - (3)].expression_vvv))[0][0].size()));
4247
+
dims[2] = std::pair<int,int>(1,static_cast<int>((*(yyvsp[-1].expression_vvv))[0][0].size()));
std::vector<Expression*> a;
for (int i=0; i<dims[0].second; i++) {
4553
-
if ((*(yyvsp[(2) - (3)].expression_vvv))[i].size() != dims[1].second) {
4554
-
yyerror(&(yylsp[(2) - (3)]), parm, "syntax error, all sub-arrays of 3d array literal must have the same length");
4252
+
if ((*(yyvsp[-1].expression_vvv))[i].size() != dims[1].second) {
4253
+
yyerror(&(yylsp[-1]), parm, "syntax error, all sub-arrays of 3d array literal must have the same length");
for (int j=0; j<dims[1].second; j++) {
4557
-
if ((*(yyvsp[(2) - (3)].expression_vvv))[i][j].size() != dims[2].second) {
4558
-
yyerror(&(yylsp[(2) - (3)]), parm, "syntax error, all sub-arrays of 3d array literal must have the same length");
4256
+
if ((*(yyvsp[-1].expression_vvv))[i][j].size() != dims[2].second) {
4257
+
yyerror(&(yylsp[-1]), parm, "syntax error, all sub-arrays of 3d array literal must have the same length");
for (int k=0; k<dims[2].second; k++) {
4561
-
a.push_back((*(yyvsp[(2) - (3)].expression_vvv))[i][j][k]);
4260
+
a.push_back((*(yyvsp[-1].expression_vvv))[i][j][k]);
(yyval.expression) = new ArrayLit((yyloc),a,dims);
4568
-
delete (yyvsp[(2) - (3)].expression_vvv);
4267
+
delete (yyvsp[-1].expression_vvv);
(yyval.expression) = NULL;
4577
-
{ (yyval.expression_vvv)=new std::vector<std::vector<std::vector<MiniZinc::Expression*> > >;
4274
+
case 227: /* simple_array_literal_3d_list: '|' '|' */
4275
+
{ (yyval.expression_vvv)=new std::vector<std::vector<std::vector<MiniZinc::Expression*> > >;
4583
-
{ (yyval.expression_vvv)=new std::vector<std::vector<std::vector<MiniZinc::Expression*> > >;
4584
-
if ((yyvsp[(2) - (3)].expression_vv)) (yyval.expression_vvv)->push_back(*(yyvsp[(2) - (3)].expression_vv));
4585
-
delete (yyvsp[(2) - (3)].expression_vv);
4279
+
case 228: /* simple_array_literal_3d_list: '|' simple_array_literal_2d_list '|' */
4280
+
{ (yyval.expression_vvv)=new std::vector<std::vector<std::vector<MiniZinc::Expression*> > >;
4281
+
if ((yyvsp[-1].expression_vv)) (yyval.expression_vvv)->push_back(*(yyvsp[-1].expression_vv));
4282
+
delete (yyvsp[-1].expression_vv);
4591
-
{ (yyval.expression_vvv)=(yyvsp[(1) - (5)].expression_vvv);
4592
-
if ((yyval.expression_vvv) && (yyvsp[(4) - (5)].expression_vv)) (yyval.expression_vvv)->push_back(*(yyvsp[(4) - (5)].expression_vv));
4593
-
delete (yyvsp[(4) - (5)].expression_vv);
4286
+
case 229: /* simple_array_literal_3d_list: simple_array_literal_3d_list ',' '|' simple_array_literal_2d_list '|' */
4287
+
{ (yyval.expression_vvv)=(yyvsp[-4].expression_vvv);
4288
+
if ((yyval.expression_vvv) && (yyvsp[-1].expression_vv)) (yyval.expression_vvv)->push_back(*(yyvsp[-1].expression_vv));
4289
+
delete (yyvsp[-1].expression_vv);
4599
-
{ (yyval.expression_vv)=new std::vector<std::vector<MiniZinc::Expression*> >;
4600
-
if ((yyvsp[(1) - (1)].expression_v)) (yyval.expression_vv)->push_back(*(yyvsp[(1) - (1)].expression_v));
4601
-
delete (yyvsp[(1) - (1)].expression_v);
4293
+
case 230: /* simple_array_literal_2d_list: expr_list */
4294
+
{ (yyval.expression_vv)=new std::vector<std::vector<MiniZinc::Expression*> >;
4295
+
if ((yyvsp[0].expression_v)) (yyval.expression_vv)->push_back(*(yyvsp[0].expression_v));
4296
+
delete (yyvsp[0].expression_v);
4607
-
{ (yyval.expression_vv)=(yyvsp[(1) - (3)].expression_vv); if ((yyval.expression_vv) && (yyvsp[(3) - (3)].expression_v)) (yyval.expression_vv)->push_back(*(yyvsp[(3) - (3)].expression_v)); delete (yyvsp[(3) - (3)].expression_v); ;}
4300
+
case 231: /* simple_array_literal_2d_list: simple_array_literal_2d_list '|' expr_list */
4301
+
{ (yyval.expression_vv)=(yyvsp[-2].expression_vv); if ((yyval.expression_vv) && (yyvsp[0].expression_v)) (yyval.expression_vv)->push_back(*(yyvsp[0].expression_v)); delete (yyvsp[0].expression_v); }
4612
-
{ if ((yyvsp[(4) - (5)].generators)) (yyval.expression)=new Comprehension((yyloc), (yyvsp[(2) - (5)].expression), *(yyvsp[(4) - (5)].generators), false);
4613
-
delete (yyvsp[(4) - (5)].generators);
4304
+
case 232: /* simple_array_comp: "[" expr '|' comp_tail "]" */
4305
+
{ if ((yyvsp[-1].generators)) (yyval.expression)=new Comprehension((yyloc), (yyvsp[-3].expression), *(yyvsp[-1].generators), false);
4306
+
delete (yyvsp[-1].generators);
4310
+
case 233: /* if_then_else_expr: "if" expr "then" expr "endif" */
std::vector<Expression*> iexps;
4621
-
iexps.push_back((yyvsp[(2) - (5)].expression));
4622
-
iexps.push_back((yyvsp[(4) - (5)].expression));
4313
+
iexps.push_back((yyvsp[-3].expression));
4314
+
iexps.push_back((yyvsp[-1].expression));
(yyval.expression)=new ITE((yyloc), iexps, NULL);
4319
+
case 234: /* if_then_else_expr: "if" expr "then" expr elseif_list "else" expr "endif" */
std::vector<Expression*> iexps;
4631
-
iexps.push_back((yyvsp[(2) - (8)].expression));
4632
-
iexps.push_back((yyvsp[(4) - (8)].expression));
4633
-
if ((yyvsp[(5) - (8)].expression_v)) {
4634
-
for (unsigned int i=0; i<(yyvsp[(5) - (8)].expression_v)->size(); i+=2) {
4635
-
iexps.push_back((*(yyvsp[(5) - (8)].expression_v))[i]);
4636
-
iexps.push_back((*(yyvsp[(5) - (8)].expression_v))[i+1]);
4322
+
iexps.push_back((yyvsp[-6].expression));
4323
+
iexps.push_back((yyvsp[-4].expression));
4324
+
if ((yyvsp[-3].expression_v)) {
4325
+
for (unsigned int i=0; i<(yyvsp[-3].expression_v)->size(); i+=2) {
4326
+
iexps.push_back((*(yyvsp[-3].expression_v))[i]);
4327
+
iexps.push_back((*(yyvsp[-3].expression_v))[i+1]);
4639
-
(yyval.expression)=new ITE((yyloc), iexps,(yyvsp[(7) - (8)].expression));
4640
-
delete (yyvsp[(5) - (8)].expression_v);
4330
+
(yyval.expression)=new ITE((yyloc), iexps,(yyvsp[-1].expression));
4331
+
delete (yyvsp[-3].expression_v);
4646
-
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; ;}
4335
+
case 235: /* elseif_list: %empty */
4336
+
{ (yyval.expression_v)=new std::vector<MiniZinc::Expression*>; }
4651
-
{ (yyval.expression_v)=(yyvsp[(1) - (5)].expression_v); if ((yyval.expression_v) && (yyvsp[(3) - (5)].expression) && (yyvsp[(5) - (5)].expression)) { (yyval.expression_v)->push_back((yyvsp[(3) - (5)].expression)); (yyval.expression_v)->push_back((yyvsp[(5) - (5)].expression)); } ;}
4339
+
case 236: /* elseif_list: elseif_list "elseif" expr "then" expr */
4340
+
{ (yyval.expression_v)=(yyvsp[-4].expression_v); if ((yyval.expression_v) && (yyvsp[-2].expression) && (yyvsp[0].expression)) { (yyval.expression_v)->push_back((yyvsp[-2].expression)); (yyval.expression_v)->push_back((yyvsp[0].expression)); } }
4656
-
{ (yyval.iValue)=BOT_EQUIV; ;}
4343
+
case 237: /* quoted_op: "'<->'" */
4344
+
{ (yyval.iValue)=BOT_EQUIV; }
4661
-
{ (yyval.iValue)=BOT_IMPL; ;}
4347
+
case 238: /* quoted_op: "'->'" */
4348
+
{ (yyval.iValue)=BOT_IMPL; }
4666
-
{ (yyval.iValue)=BOT_RIMPL; ;}
4351
+
case 239: /* quoted_op: "'<-'" */
4352
+
{ (yyval.iValue)=BOT_RIMPL; }
4671
-
{ (yyval.iValue)=BOT_OR; ;}
4355
+
case 240: /* quoted_op: "'\\/'" */
4356
+
{ (yyval.iValue)=BOT_OR; }
4676
-
{ (yyval.iValue)=BOT_XOR; ;}
4359
+
case 241: /* quoted_op: "'xor'" */
4360
+
{ (yyval.iValue)=BOT_XOR; }
4681
-
{ (yyval.iValue)=BOT_AND; ;}
4363
+
case 242: /* quoted_op: "'/\\'" */
4364
+
{ (yyval.iValue)=BOT_AND; }
4686
-
{ (yyval.iValue)=BOT_LE; ;}
4367
+
case 243: /* quoted_op: "'<'" */
4368
+
{ (yyval.iValue)=BOT_LE; }
4691
-
{ (yyval.iValue)=BOT_GR; ;}
4371
+
case 244: /* quoted_op: "'>'" */
4372
+
{ (yyval.iValue)=BOT_GR; }
4696
-
{ (yyval.iValue)=BOT_LQ; ;}
4375
+
case 245: /* quoted_op: "'<='" */
4376
+
{ (yyval.iValue)=BOT_LQ; }
4701
-
{ (yyval.iValue)=BOT_GQ; ;}
4379
+
case 246: /* quoted_op: "'>='" */
4380
+
{ (yyval.iValue)=BOT_GQ; }
4706
-
{ (yyval.iValue)=BOT_EQ; ;}
4383
+
case 247: /* quoted_op: "'='" */
4384
+
{ (yyval.iValue)=BOT_EQ; }
4711
-
{ (yyval.iValue)=BOT_NQ; ;}
4387
+
case 248: /* quoted_op: "'!='" */
4388
+
{ (yyval.iValue)=BOT_NQ; }
4716
-
{ (yyval.iValue)=BOT_IN; ;}
4391
+
case 249: /* quoted_op: "'in'" */
4392
+
{ (yyval.iValue)=BOT_IN; }
4721
-
{ (yyval.iValue)=BOT_SUBSET; ;}
4395
+
case 250: /* quoted_op: "'subset'" */
4396
+
{ (yyval.iValue)=BOT_SUBSET; }
4726
-
{ (yyval.iValue)=BOT_SUPERSET; ;}
4399
+
case 251: /* quoted_op: "'superset'" */
4400
+
{ (yyval.iValue)=BOT_SUPERSET; }
4731
-
{ (yyval.iValue)=BOT_UNION; ;}
4403
+
case 252: /* quoted_op: "'union'" */
4404
+
{ (yyval.iValue)=BOT_UNION; }
4736
-
{ (yyval.iValue)=BOT_DIFF; ;}
4407
+
case 253: /* quoted_op: "'diff'" */
4408
+
{ (yyval.iValue)=BOT_DIFF; }
4741
-
{ (yyval.iValue)=BOT_SYMDIFF; ;}
4411
+
case 254: /* quoted_op: "'symdiff'" */
4412
+
{ (yyval.iValue)=BOT_SYMDIFF; }
4746
-
{ (yyval.iValue)=BOT_PLUS; ;}
4415
+
case 255: /* quoted_op: "'+'" */
4416
+
{ (yyval.iValue)=BOT_PLUS; }
4751
-
{ (yyval.iValue)=BOT_MINUS; ;}
4419
+
case 256: /* quoted_op: "'-'" */
4420
+
{ (yyval.iValue)=BOT_MINUS; }
4756
-
{ (yyval.iValue)=BOT_MULT; ;}
4423
+
case 257: /* quoted_op: "'*'" */
4424
+
{ (yyval.iValue)=BOT_MULT; }
4761
-
{ (yyval.iValue)=BOT_POW; ;}
4427
+
case 258: /* quoted_op: "'^'" */
4428
+
{ (yyval.iValue)=BOT_POW; }
4766
-
{ (yyval.iValue)=BOT_DIV; ;}
4431
+
case 259: /* quoted_op: "'/'" */
4432
+
{ (yyval.iValue)=BOT_DIV; }
4771
-
{ (yyval.iValue)=BOT_IDIV; ;}
4435
+
case 260: /* quoted_op: "'div'" */
4436
+
{ (yyval.iValue)=BOT_IDIV; }
4776
-
{ (yyval.iValue)=BOT_MOD; ;}
4439
+
case 261: /* quoted_op: "'mod'" */
4440
+
{ (yyval.iValue)=BOT_MOD; }
4781
-
{ (yyval.iValue)=BOT_INTERSECT; ;}
4443
+
case 262: /* quoted_op: "'intersect'" */
4444
+
{ (yyval.iValue)=BOT_INTERSECT; }
4786
-
{ (yyval.iValue)=BOT_PLUSPLUS; ;}
4447
+
case 263: /* quoted_op: "'++'" */
4448
+
{ (yyval.iValue)=BOT_PLUSPLUS; }
4791
-
{ (yyval.iValue)=-1; ;}
4451
+
case 264: /* quoted_op: "'not'" */
4452
+
{ (yyval.iValue)=-1; }
4796
-
{ if ((yyvsp[(1) - (6)].iValue)==-1) {
4455
+
case 265: /* quoted_op_call: quoted_op '(' expr ',' expr ')' */
4456
+
{ if ((yyvsp[-5].iValue)==-1) {
4798
-
yyerror(&(yylsp[(3) - (6)]), parm, "syntax error, unary operator with two arguments");
4458
+
yyerror(&(yylsp[-3]), parm, "syntax error, unary operator with two arguments");
4800
-
(yyval.expression)=new BinOp((yyloc), (yyvsp[(3) - (6)].expression),static_cast<BinOpType>((yyvsp[(1) - (6)].iValue)),(yyvsp[(5) - (6)].expression));
4460
+
(yyval.expression)=new BinOp((yyloc), (yyvsp[-3].expression),static_cast<BinOpType>((yyvsp[-5].iValue)),(yyvsp[-1].expression));
4808
-
switch ((yyvsp[(1) - (4)].iValue)) {
4465
+
case 266: /* quoted_op_call: quoted_op '(' expr ')' */
4467
+
switch ((yyvsp[-3].iValue)) {
···
4819
-
yyerror(&(yylsp[(3) - (4)]), parm, "syntax error, binary operator with unary argument list");
4478
+
yyerror(&(yylsp[-1]), parm, "syntax error, binary operator with unary argument list");
4825
-
if (uot==UOT_PLUS && (yyvsp[(3) - (4)].expression) && ((yyvsp[(3) - (4)].expression)->isa<IntLit>() || (yyvsp[(3) - (4)].expression)->isa<FloatLit>())) {
4826
-
(yyval.expression) = (yyvsp[(3) - (4)].expression);
4827
-
} else if (uot==UOT_MINUS && (yyvsp[(3) - (4)].expression) && (yyvsp[(3) - (4)].expression)->isa<IntLit>()) {
4828
-
(yyval.expression) = IntLit::a(-(yyvsp[(3) - (4)].expression)->cast<IntLit>()->v());
4829
-
} else if (uot==UOT_MINUS && (yyvsp[(3) - (4)].expression) && (yyvsp[(3) - (4)].expression)->isa<FloatLit>()) {
4830
-
(yyval.expression) = FloatLit::a(-(yyvsp[(3) - (4)].expression)->cast<FloatLit>()->v());
4484
+
if (uot==UOT_PLUS && (yyvsp[-1].expression) && ((yyvsp[-1].expression)->isa<IntLit>() || (yyvsp[-1].expression)->isa<FloatLit>())) {
4485
+
(yyval.expression) = (yyvsp[-1].expression);
4486
+
} else if (uot==UOT_MINUS && (yyvsp[-1].expression) && (yyvsp[-1].expression)->isa<IntLit>()) {
4487
+
(yyval.expression) = IntLit::a(-(yyvsp[-1].expression)->cast<IntLit>()->v());
4488
+
} else if (uot==UOT_MINUS && (yyvsp[-1].expression) && (yyvsp[-1].expression)->isa<FloatLit>()) {
4489
+
(yyval.expression) = FloatLit::a(-(yyvsp[-1].expression)->cast<FloatLit>()->v());
4832
-
(yyval.expression)=new UnOp((yyloc), static_cast<UnOpType>(uot),(yyvsp[(3) - (4)].expression));
4491
+
(yyval.expression)=new UnOp((yyloc), static_cast<UnOpType>(uot),(yyvsp[-1].expression));
4840
-
{ (yyval.expression)=new Call((yyloc), (yyvsp[(1) - (3)].sValue), std::vector<Expression*>()); free((yyvsp[(1) - (3)].sValue)); ;}
4497
+
case 267: /* call_expr: "identifier" '(' ')' */
4498
+
{ (yyval.expression)=new Call((yyloc), (yyvsp[-2].sValue), std::vector<Expression*>()); free((yyvsp[-2].sValue)); }
4846
-
if ((yyvsp[(3) - (4)].expression_p)!=NULL) {
4501
+
case 269: /* call_expr: "identifier" '(' comp_or_expr ')' */
4503
+
if ((yyvsp[-1].expression_p)!=NULL) {
std::vector<Expression*> args;
4849
-
for (unsigned int i=0; i<(yyvsp[(3) - (4)].expression_p)->size(); i++) {
4850
-
if ((*(yyvsp[(3) - (4)].expression_p))[i].second) {
4851
-
yyerror(&(yylsp[(3) - (4)]), parm, "syntax error, 'where' expression outside generator call");
4506
+
for (unsigned int i=0; i<(yyvsp[-1].expression_p)->size(); i++) {
4507
+
if ((*(yyvsp[-1].expression_p))[i].second) {
4508
+
yyerror(&(yylsp[-1]), parm, "syntax error, 'where' expression outside generator call");
4855
-
args.push_back((*(yyvsp[(3) - (4)].expression_p))[i].first);
4512
+
args.push_back((*(yyvsp[-1].expression_p))[i].first);
4858
-
(yyval.expression)=new Call((yyloc), (yyvsp[(1) - (4)].sValue), args);
4515
+
(yyval.expression)=new Call((yyloc), (yyvsp[-3].sValue), args);
4861
-
free((yyvsp[(1) - (4)].sValue));
4862
-
delete (yyvsp[(3) - (4)].expression_p);
4518
+
free((yyvsp[-3].sValue));
4519
+
delete (yyvsp[-1].expression_p);
4523
+
case 270: /* call_expr: "identifier" '(' comp_or_expr ')' '(' expr ')' */
4871
-
if ((yyvsp[(3) - (7)].expression_p)) {
4872
-
for (unsigned int i=0; i<(yyvsp[(3) - (7)].expression_p)->size(); i++) {
4873
-
if (Id* id = Expression::dyn_cast<Id>((*(yyvsp[(3) - (7)].expression_p))[i].first)) {
4874
-
if ((*(yyvsp[(3) - (7)].expression_p))[i].second) {
4875
-
ParserLocation loc = (*(yyvsp[(3) - (7)].expression_p))[i].second->loc().parserLocation();
4527
+
if ((yyvsp[-4].expression_p)) {
4528
+
for (unsigned int i=0; i<(yyvsp[-4].expression_p)->size(); i++) {
4529
+
if (Id* id = Expression::dyn_cast<Id>((*(yyvsp[-4].expression_p))[i].first)) {
4530
+
if ((*(yyvsp[-4].expression_p))[i].second) {
4531
+
ParserLocation loc = (*(yyvsp[-4].expression_p))[i].second->loc().parserLocation();
yyerror(&loc, parm, "illegal where expression in generator call");
4880
-
if (BinOp* boe = Expression::dyn_cast<BinOp>((*(yyvsp[(3) - (7)].expression_p))[i].first)) {
4536
+
if (BinOp* boe = Expression::dyn_cast<BinOp>((*(yyvsp[-4].expression_p))[i].first)) {
if (boe->lhs() && boe->rhs()) {
Id* id = Expression::dyn_cast<Id>(boe->lhs());
if (id && boe->op() == BOT_IN) {
4885
-
gens.push_back(Generator(ids,boe->rhs(),(*(yyvsp[(3) - (7)].expression_p))[i].second));
4541
+
gens.push_back(Generator(ids,boe->rhs(),(*(yyvsp[-4].expression_p))[i].second));
} else if (id && boe->op() == BOT_EQ && ids.empty()) {
gens.push_back(Generator(ids,NULL,boe->rhs()));
4890
-
if ((*(yyvsp[(3) - (7)].expression_p))[i].second) {
4891
-
gens.push_back(Generator(gens.size(),(*(yyvsp[(3) - (7)].expression_p))[i].second));
4546
+
if ((*(yyvsp[-4].expression_p))[i].second) {
4547
+
gens.push_back(Generator(gens.size(),(*(yyvsp[-4].expression_p))[i].second));
4895
-
ParserLocation loc = (*(yyvsp[(3) - (7)].expression_p))[i].first->loc().parserLocation();
4551
+
ParserLocation loc = (*(yyvsp[-4].expression_p))[i].first->loc().parserLocation();
yyerror(&loc, parm, "illegal expression in generator call");
4900
-
ParserLocation loc = (*(yyvsp[(3) - (7)].expression_p))[i].first->loc().parserLocation();
4556
+
ParserLocation loc = (*(yyvsp[-4].expression_p))[i].first->loc().parserLocation();
yyerror(&loc, parm, "illegal expression in generator call");
4907
-
yyerror(&(yylsp[(3) - (7)]), parm, "illegal expression in generator call");
4563
+
yyerror(&(yylsp[-4]), parm, "illegal expression in generator call");
ParserState* pp = static_cast<ParserState*>(parm);
Generators g; g._g = gens;
4914
-
Comprehension* ac = new Comprehension((yyloc), (yyvsp[(6) - (7)].expression),g,false);
4570
+
Comprehension* ac = new Comprehension((yyloc), (yyvsp[-1].expression),g,false);
vector<Expression*> args; args.push_back(ac);
4916
-
(yyval.expression)=new Call((yyloc), (yyvsp[(1) - (7)].sValue), args);
4572
+
(yyval.expression)=new Call((yyloc), (yyvsp[-6].sValue), args);
4918
-
free((yyvsp[(1) - (7)].sValue));
4919
-
delete (yyvsp[(3) - (7)].expression_p);
4574
+
free((yyvsp[-6].sValue));
4575
+
delete (yyvsp[-4].expression_p);
4925
-
{ (yyval.expression_p)=new vector<pair<Expression*,Expression*> >;
4926
-
if ((yyvsp[(1) - (1)].expression)) {
4927
-
(yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[(1) - (1)].expression),NULL));
4579
+
case 272: /* comp_or_expr_head: expr */
4580
+
{ (yyval.expression_p)=new vector<pair<Expression*,Expression*> >;
4581
+
if ((yyvsp[0].expression)) {
4582
+
(yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[0].expression),NULL));
4934
-
{ (yyval.expression_p)=new vector<pair<Expression*,Expression*> >;
4935
-
if ((yyvsp[(1) - (3)].expression) && (yyvsp[(3) - (3)].expression)) {
4936
-
(yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[(1) - (3)].expression),(yyvsp[(3) - (3)].expression)));
4587
+
case 273: /* comp_or_expr_head: expr "where" expr */
4588
+
{ (yyval.expression_p)=new vector<pair<Expression*,Expression*> >;
4589
+
if ((yyvsp[-2].expression) && (yyvsp[0].expression)) {
4590
+
(yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[-2].expression),(yyvsp[0].expression)));
4943
-
{ (yyval.expression_p)=(yyvsp[(1) - (3)].expression_p); if ((yyval.expression_p) && (yyvsp[(3) - (3)].expression)) (yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[(3) - (3)].expression),NULL)); ;}
4595
+
case 274: /* comp_or_expr_head: comp_or_expr_head ',' expr */
4596
+
{ (yyval.expression_p)=(yyvsp[-2].expression_p); if ((yyval.expression_p) && (yyvsp[0].expression)) (yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[0].expression),NULL)); }
4948
-
{ (yyval.expression_p)=(yyvsp[(1) - (5)].expression_p); if ((yyval.expression_p) && (yyvsp[(3) - (5)].expression) && (yyvsp[(5) - (5)].expression)) (yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[(3) - (5)].expression),(yyvsp[(5) - (5)].expression))); ;}
4599
+
case 275: /* comp_or_expr_head: comp_or_expr_head ',' expr "where" expr */
4600
+
{ (yyval.expression_p)=(yyvsp[-4].expression_p); if ((yyval.expression_p) && (yyvsp[-2].expression) && (yyvsp[0].expression)) (yyval.expression_p)->push_back(pair<Expression*,Expression*>((yyvsp[-2].expression),(yyvsp[0].expression))); }
4953
-
{ if ((yyvsp[(3) - (6)].expression_v) && (yyvsp[(6) - (6)].expression)) {
4954
-
(yyval.expression)=new Let((yyloc), *(yyvsp[(3) - (6)].expression_v), (yyvsp[(6) - (6)].expression)); delete (yyvsp[(3) - (6)].expression_v);
4603
+
case 276: /* let_expr: "let" '{' let_vardecl_item_list '}' "in" expr */
4604
+
{ if ((yyvsp[-3].expression_v) && (yyvsp[0].expression)) {
4605
+
(yyval.expression)=new Let((yyloc), *(yyvsp[-3].expression_v), (yyvsp[0].expression)); delete (yyvsp[-3].expression_v);
4963
-
{ if ((yyvsp[(3) - (7)].expression_v) && (yyvsp[(7) - (7)].expression)) {
4964
-
(yyval.expression)=new Let((yyloc), *(yyvsp[(3) - (7)].expression_v), (yyvsp[(7) - (7)].expression)); delete (yyvsp[(3) - (7)].expression_v);
4612
+
case 277: /* let_expr: "let" '{' let_vardecl_item_list comma_or_semi '}' "in" expr */
4613
+
{ if ((yyvsp[-4].expression_v) && (yyvsp[0].expression)) {
4614
+
(yyval.expression)=new Let((yyloc), *(yyvsp[-4].expression_v), (yyvsp[0].expression)); delete (yyvsp[-4].expression_v);
4973
-
{ (yyval.expression_v)=new vector<Expression*>; (yyval.expression_v)->push_back((yyvsp[(1) - (1)].vardeclexpr)); ;}
4621
+
case 278: /* let_vardecl_item_list: let_vardecl_item */
4622
+
{ (yyval.expression_v)=new vector<Expression*>; (yyval.expression_v)->push_back((yyvsp[0].vardeclexpr)); }
4978
-
{ (yyval.expression_v)=new vector<Expression*>;
4979
-
if ((yyvsp[(1) - (1)].item)) {
4980
-
ConstraintI* ce = (yyvsp[(1) - (1)].item)->cast<ConstraintI>();
4625
+
case 279: /* let_vardecl_item_list: constraint_item */
4626
+
{ (yyval.expression_v)=new vector<Expression*>;
4627
+
if ((yyvsp[0].item)) {
4628
+
ConstraintI* ce = (yyvsp[0].item)->cast<ConstraintI>();
(yyval.expression_v)->push_back(ce->e());
4989
-
{ (yyval.expression_v)=(yyvsp[(1) - (3)].expression_v); if ((yyval.expression_v) && (yyvsp[(3) - (3)].vardeclexpr)) (yyval.expression_v)->push_back((yyvsp[(3) - (3)].vardeclexpr)); ;}
4635
+
case 280: /* let_vardecl_item_list: let_vardecl_item_list comma_or_semi let_vardecl_item */
4636
+
{ (yyval.expression_v)=(yyvsp[-2].expression_v); if ((yyval.expression_v) && (yyvsp[0].vardeclexpr)) (yyval.expression_v)->push_back((yyvsp[0].vardeclexpr)); }
4994
-
{ (yyval.expression_v)=(yyvsp[(1) - (3)].expression_v);
4995
-
if ((yyval.expression_v) && (yyvsp[(3) - (3)].item)) {
4996
-
ConstraintI* ce = (yyvsp[(3) - (3)].item)->cast<ConstraintI>();
4639
+
case 281: /* let_vardecl_item_list: let_vardecl_item_list comma_or_semi constraint_item */
4640
+
{ (yyval.expression_v)=(yyvsp[-2].expression_v);
4641
+
if ((yyval.expression_v) && (yyvsp[0].item)) {
4642
+
ConstraintI* ce = (yyvsp[0].item)->cast<ConstraintI>();
(yyval.expression_v)->push_back(ce->e());
5005
-
{ (yyval.vardeclexpr) = (yyvsp[(1) - (2)].vardeclexpr);
4649
+
case 284: /* let_vardecl_item: ti_expr_and_id annotations */
4650
+
{ (yyval.vardeclexpr) = (yyvsp[-1].vardeclexpr);
if ((yyval.vardeclexpr)) (yyval.vardeclexpr)->toplevel(false);
5007
-
if ((yyval.vardeclexpr) && (yyvsp[(2) - (2)].expression_v)) (yyval.vardeclexpr)->addAnnotations(*(yyvsp[(2) - (2)].expression_v));
5008
-
delete (yyvsp[(2) - (2)].expression_v);
4652
+
if ((yyval.vardeclexpr) && (yyvsp[0].expression_v)) (yyval.vardeclexpr)->addAnnotations(*(yyvsp[0].expression_v));
4653
+
delete (yyvsp[0].expression_v);
5014
-
{ if ((yyvsp[(1) - (4)].vardeclexpr)) (yyvsp[(1) - (4)].vardeclexpr)->e((yyvsp[(4) - (4)].expression));
5015
-
(yyval.vardeclexpr) = (yyvsp[(1) - (4)].vardeclexpr);
4657
+
case 285: /* let_vardecl_item: ti_expr_and_id annotations "=" expr */
4658
+
{ if ((yyvsp[-3].vardeclexpr)) (yyvsp[-3].vardeclexpr)->e((yyvsp[0].expression));
4659
+
(yyval.vardeclexpr) = (yyvsp[-3].vardeclexpr);
if ((yyval.vardeclexpr)) (yyval.vardeclexpr)->loc((yyloc));
if ((yyval.vardeclexpr)) (yyval.vardeclexpr)->toplevel(false);
5018
-
if ((yyval.vardeclexpr) && (yyvsp[(2) - (4)].expression_v)) (yyval.vardeclexpr)->addAnnotations(*(yyvsp[(2) - (4)].expression_v));
5019
-
delete (yyvsp[(2) - (4)].expression_v);
4662
+
if ((yyval.vardeclexpr) && (yyvsp[-2].expression_v)) (yyval.vardeclexpr)->addAnnotations(*(yyvsp[-2].expression_v));
4663
+
delete (yyvsp[-2].expression_v);
5025
-
{ (yyval.expression_v)=NULL; ;}
4667
+
case 286: /* annotations: %empty */
4668
+
{ (yyval.expression_v)=NULL; }
5030
-
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); ;}
4671
+
case 288: /* annotation_expr: expr_atom_head_nonstring */
4672
+
{ (yyval.expression) = (yyvsp[0].expression); }
5035
-
{ (yyval.expression) = new Call((yylsp[(1) - (1)]), ASTString("mzn_expression_name"), {(yyvsp[(1) - (1)].expression)}); ;}
4675
+
case 289: /* annotation_expr: string_expr */
4676
+
{ (yyval.expression) = new Call((yylsp[0]), ASTString("mzn_expression_name"), {(yyvsp[0].expression)}); }
5040
-
{ (yyval.expression_v)=new std::vector<Expression*>(1);
5041
-
(*(yyval.expression_v))[0] = (yyvsp[(2) - (2)].expression);
4679
+
case 290: /* ne_annotations: "::" annotation_expr */
4680
+
{ (yyval.expression_v)=new std::vector<Expression*>(1);
4681
+
(*(yyval.expression_v))[0] = (yyvsp[0].expression);
5047
-
{ (yyval.expression_v)=(yyvsp[(1) - (3)].expression_v); if ((yyval.expression_v)) (yyval.expression_v)->push_back((yyvsp[(3) - (3)].expression)); ;}
4685
+
case 291: /* ne_annotations: ne_annotations "::" annotation_expr */
4686
+
{ (yyval.expression_v)=(yyvsp[-2].expression_v); if ((yyval.expression_v)) (yyval.expression_v)->push_back((yyvsp[0].expression)); }
5052
-
{ (yyval.sValue)=(yyvsp[(1) - (1)].sValue); ;}
4689
+
case 292: /* id_or_quoted_op: "identifier" */
4690
+
{ (yyval.sValue)=(yyvsp[0].sValue); }
5057
-
{ (yyval.sValue)=strdup("'<->'"); ;}
4693
+
case 293: /* id_or_quoted_op: "'<->'" */
4694
+
{ (yyval.sValue)=strdup("'<->'"); }
5062
-
{ (yyval.sValue)=strdup("'->'"); ;}
4697
+
case 294: /* id_or_quoted_op: "'->'" */
4698
+
{ (yyval.sValue)=strdup("'->'"); }
5067
-
{ (yyval.sValue)=strdup("'<-'"); ;}
4701
+
case 295: /* id_or_quoted_op: "'<-'" */
4702
+
{ (yyval.sValue)=strdup("'<-'"); }
5072
-
{ (yyval.sValue)=strdup("'\\/'"); ;}
4705
+
case 296: /* id_or_quoted_op: "'\\/'" */
4706
+
{ (yyval.sValue)=strdup("'\\/'"); }
5077
-
{ (yyval.sValue)=strdup("'xor'"); ;}
4709
+
case 297: /* id_or_quoted_op: "'xor'" */
4710
+
{ (yyval.sValue)=strdup("'xor'"); }
5082
-
{ (yyval.sValue)=strdup("'/\\'"); ;}
4713
+
case 298: /* id_or_quoted_op: "'/\\'" */
4714
+
{ (yyval.sValue)=strdup("'/\\'"); }
5087
-
{ (yyval.sValue)=strdup("'<'"); ;}
4717
+
case 299: /* id_or_quoted_op: "'<'" */
4718
+
{ (yyval.sValue)=strdup("'<'"); }
5092
-
{ (yyval.sValue)=strdup("'>'"); ;}
4721
+
case 300: /* id_or_quoted_op: "'>'" */
4722
+
{ (yyval.sValue)=strdup("'>'"); }
5097
-
{ (yyval.sValue)=strdup("'<='"); ;}
4725
+
case 301: /* id_or_quoted_op: "'<='" */
4726
+
{ (yyval.sValue)=strdup("'<='"); }
5102
-
{ (yyval.sValue)=strdup("'>='"); ;}
4729
+
case 302: /* id_or_quoted_op: "'>='" */
4730
+
{ (yyval.sValue)=strdup("'>='"); }
5107
-
{ (yyval.sValue)=strdup("'='"); ;}
4733
+
case 303: /* id_or_quoted_op: "'='" */
4734
+
{ (yyval.sValue)=strdup("'='"); }
5112
-
{ (yyval.sValue)=strdup("'!='"); ;}
4737
+
case 304: /* id_or_quoted_op: "'!='" */
4738
+
{ (yyval.sValue)=strdup("'!='"); }
5117
-
{ (yyval.sValue)=strdup("'in'"); ;}
4741
+
case 305: /* id_or_quoted_op: "'in'" */
4742
+
{ (yyval.sValue)=strdup("'in'"); }
5122
-
{ (yyval.sValue)=strdup("'subset'"); ;}
4745
+
case 306: /* id_or_quoted_op: "'subset'" */
4746
+
{ (yyval.sValue)=strdup("'subset'"); }
5127
-
{ (yyval.sValue)=strdup("'superset'"); ;}
4749
+
case 307: /* id_or_quoted_op: "'superset'" */
4750
+
{ (yyval.sValue)=strdup("'superset'"); }
5132
-
{ (yyval.sValue)=strdup("'union'"); ;}
4753
+
case 308: /* id_or_quoted_op: "'union'" */
4754
+
{ (yyval.sValue)=strdup("'union'"); }
5137
-
{ (yyval.sValue)=strdup("'diff'"); ;}
4757
+
case 309: /* id_or_quoted_op: "'diff'" */
4758
+
{ (yyval.sValue)=strdup("'diff'"); }
5142
-
{ (yyval.sValue)=strdup("'symdiff'"); ;}
4761
+
case 310: /* id_or_quoted_op: "'symdiff'" */
4762
+
{ (yyval.sValue)=strdup("'symdiff'"); }
5147
-
{ (yyval.sValue)=strdup("'..'"); ;}
4765
+
case 311: /* id_or_quoted_op: "'..'" */
4766
+
{ (yyval.sValue)=strdup("'..'"); }
5152
-
{ (yyval.sValue)=strdup("'+'"); ;}
4769
+
case 312: /* id_or_quoted_op: "'+'" */
4770
+
{ (yyval.sValue)=strdup("'+'"); }
5157
-
{ (yyval.sValue)=strdup("'-'"); ;}
4773
+
case 313: /* id_or_quoted_op: "'-'" */
4774
+
{ (yyval.sValue)=strdup("'-'"); }
5162
-
{ (yyval.sValue)=strdup("'*'"); ;}
4777
+
case 314: /* id_or_quoted_op: "'*'" */
4778
+
{ (yyval.sValue)=strdup("'*'"); }
5167
-
{ (yyval.sValue)=strdup("'^'"); ;}
4781
+
case 315: /* id_or_quoted_op: "'^'" */
4782
+
{ (yyval.sValue)=strdup("'^'"); }
5172
-
{ (yyval.sValue)=strdup("'/'"); ;}
4785
+
case 316: /* id_or_quoted_op: "'/'" */
4786
+
{ (yyval.sValue)=strdup("'/'"); }
5177
-
{ (yyval.sValue)=strdup("'div'"); ;}
4789
+
case 317: /* id_or_quoted_op: "'div'" */
4790
+
{ (yyval.sValue)=strdup("'div'"); }
5182
-
{ (yyval.sValue)=strdup("'mod'"); ;}
4793
+
case 318: /* id_or_quoted_op: "'mod'" */
4794
+
{ (yyval.sValue)=strdup("'mod'"); }
5187
-
{ (yyval.sValue)=strdup("'intersect'"); ;}
4797
+
case 319: /* id_or_quoted_op: "'intersect'" */
4798
+
{ (yyval.sValue)=strdup("'intersect'"); }
5192
-
{ (yyval.sValue)=strdup("'not'"); ;}
4801
+
case 320: /* id_or_quoted_op: "'not'" */
4802
+
{ (yyval.sValue)=strdup("'not'"); }
5197
-
{ (yyval.sValue)=strdup("'++'"); ;}
4805
+
case 321: /* id_or_quoted_op: "'++'" */
4806
+
{ (yyval.sValue)=strdup("'++'"); }
5201
-
/* Line 1267 of yacc.c. */
5205
-
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4813
+
/* User semantic actions sometimes alter yychar, and that requires
4814
+
that yytoken be updated with the new translation. We take the
4815
+
approach of translating immediately before every use of yytoken.
4816
+
One alternative is translating here after every semantic action,
4817
+
but that translation would be missed if the semantic action invokes
4818
+
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4819
+
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4820
+
incorrect destructor might then be invoked immediately. In the
4821
+
case of YYERROR or YYBACKUP, subsequent parser actions might lead
4822
+
to an incorrect destructor call or verbose syntax error message
4823
+
before the lookahead is translated. */
4824
+
YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
5209
-
YY_STACK_PRINT (yyss, yyssp);
5214
-
/* Now `shift' the result of the reduction. Determine what state
4832
+
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
5220
-
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5221
-
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5222
-
yystate = yytable[yystate];
5224
-
yystate = yydefgoto[yyn - YYNTOKENS];
4836
+
const int yylhs = yyr1[yyn] - YYNTOKENS;
4837
+
const int yyi = yypgoto[yylhs] + *yyssp;
4838
+
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
4840
+
: yydefgoto[yylhs]);
5229
-
/*------------------------------------.
5230
-
| yyerrlab -- here on detecting error |
5231
-
`------------------------------------*/
4846
+
/*--------------------------------------.
4847
+
| yyerrlab -- here on detecting error. |
4848
+
`--------------------------------------*/
4850
+
/* Make sure we have latest lookahead translation. See comments at
4851
+
user semantic actions for why this is necessary. */
4852
+
yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
5237
-
#if ! YYERROR_VERBOSE
5238
-
yyerror (&yylloc, parm, YY_("syntax error"));
5241
-
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5242
-
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5244
-
YYSIZE_T yyalloc = 2 * yysize;
5245
-
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5246
-
yyalloc = YYSTACK_ALLOC_MAXIMUM;
5247
-
if (yymsg != yymsgbuf)
5248
-
YYSTACK_FREE (yymsg);
5249
-
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5251
-
yymsg_alloc = yyalloc;
5255
-
yymsg_alloc = sizeof yymsgbuf;
5259
-
if (0 < yysize && yysize <= yymsg_alloc)
5261
-
(void) yysyntax_error (yymsg, yystate, yychar);
5262
-
yyerror (&yylloc, parm, yymsg);
5266
-
yyerror (&yylloc, parm, YY_("syntax error"));
5268
-
goto yyexhaustedlab;
4858
+
yypcontext_t yyctx
4859
+
= {yyssp, yytoken, &yylloc};
4860
+
char const *yymsgp = YY_("syntax error");
4861
+
int yysyntax_error_status;
4862
+
yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
4863
+
if (yysyntax_error_status == 0)
4865
+
else if (yysyntax_error_status == -1)
4867
+
if (yymsg != yymsgbuf)
4868
+
YYSTACK_FREE (yymsg);
4869
+
yymsg = YY_CAST (char *,
4870
+
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
4873
+
yysyntax_error_status
4874
+
= yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
4880
+
yymsg_alloc = sizeof yymsgbuf;
4881
+
yysyntax_error_status = YYENOMEM;
4884
+
yyerror (&yylloc, parm, yymsgp);
4885
+
if (yysyntax_error_status == YYENOMEM)
4886
+
goto yyexhaustedlab;
5274
-
yyerror_range[0] = yylloc;
4890
+
yyerror_range[1] = yylloc;
5278
-
/* If just tried and failed to reuse look-ahead token after an
5279
-
error, discard it. */
4893
+
/* If just tried and failed to reuse lookahead token after an
4894
+
error, discard it. */
5281
-
if (yychar <= YYEOF)
5283
-
/* Return failure if at end of input. */
5284
-
if (yychar == YYEOF)
4896
+
if (yychar <= END)
4898
+
/* Return failure if at end of input. */
4899
+
if (yychar == END)
5289
-
yydestruct ("Error: discarding",
5290
-
yytoken, &yylval, &yylloc, parm);
4904
+
yydestruct ("Error: discarding",
4905
+
yytoken, &yylval, &yylloc, parm);
5295
-
/* Else will try to reuse look-ahead token after shifting the error
4910
+
/* Else will try to reuse lookahead token after shifting the error
···
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
4919
+
/* Pacify compilers when the user code never invokes YYERROR and the
4920
+
label yyerrorlab therefore never appears in user code. */
5305
-
/* Pacify compilers like GCC when the user code never invokes
5306
-
YYERROR and the label yyerrorlab therefore never appears in user
5308
-
if (/*CONSTCOND*/ 0)
5311
-
yyerror_range[0] = yylsp[1-yylen];
5312
-
/* Do not reclaim the symbols of the rule which action triggered
4924
+
/* Do not reclaim the symbols of the rule whose action triggered
···
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
5325
-
yyerrstatus = 3; /* Each real token shifted decrements this. */
4937
+
yyerrstatus = 3; /* Each real token shifted decrements this. */
4939
+
/* Pop stack until we find a state that shifts the error token. */
5330
-
if (yyn != YYPACT_NINF)
5333
-
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5335
-
yyn = yytable[yyn];
4943
+
if (!yypact_value_is_default (yyn))
4945
+
yyn += YYSYMBOL_YYerror;
4946
+
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
4948
+
yyn = yytable[yyn];
/* Pop the current state because it cannot handle the error token. */
5345
-
yyerror_range[0] = *yylsp;
4958
+
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
5347
-
yystos[yystate], yyvsp, yylsp, parm);
4960
+
YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, parm);
YY_STACK_PRINT (yyss, yyssp);
5353
-
if (yyn == YYFINAL)
4966
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4968
+
YY_IGNORE_MAYBE_UNINITIALIZED_END
5358
-
yyerror_range[1] = yylloc;
5359
-
/* Using YYLLOC is tempting, but would change the location of
5360
-
the look-ahead. YYLOC is available though. */
5361
-
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
4970
+
yyerror_range[2] = yylloc;
4972
+
YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
/* Shift the error token. */
5365
-
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4975
+
YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
···
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
···
5385
-
#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyerror (&yylloc, parm, YY_("memory exhausted"));
5392
-
/* Fall through. */
5008
+
/*-------------------------------------------------------.
5009
+
| yyreturn -- parsing is finished, clean up and return. |
5010
+
`-------------------------------------------------------*/
5396
-
if (yychar != YYEOF && yychar != YYEMPTY)
5397
-
yydestruct ("Cleanup: discarding lookahead",
5398
-
yytoken, &yylval, &yylloc, parm);
5399
-
/* Do not reclaim the symbols of the rule which action triggered
5012
+
if (yychar != YYEMPTY)
5014
+
/* Make sure we have latest lookahead translation. See comments at
5015
+
user semantic actions for why this is necessary. */
5016
+
yytoken = YYTRANSLATE (yychar);
5017
+
yydestruct ("Cleanup: discarding lookahead",
5018
+
yytoken, &yylval, &yylloc, parm);
5020
+
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YY_STACK_PRINT (yyss, yyssp);
yydestruct ("Cleanup: popping",
5406
-
yystos[*yyssp], yyvsp, yylsp, parm);
5027
+
YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, parm);
5413
-
#if YYERROR_VERBOSE
5417
-
/* Make sure YYID is used. */
5418
-
return YYID (yyresult);