···
1
-
/* A Bison parser, made by GNU Bison 3.7.2. */
1
+
/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison implementation for Yacc-like parsers in C
5
-
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
5
+
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
This program is free software: you can redistribute it and/or modify
···
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, see <http://www.gnu.org/licenses/>. */
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
···
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
48
-
/* Identify Bison output. */
48
+
/* Identify Bison output, and Bison version. */
49
+
#define YYBISON 30706
51
-
/* Bison version. */
52
-
#define YYBISON_VERSION "3.7.2"
51
+
/* Bison version string. */
52
+
#define YYBISON_VERSION "3.7.6"
#define YYSKELETON_NAME "yacc.c"
···
/* First part of user prologue. */
70
-
#line 37 "../gecode/flatzinc/parser.yxx"
70
+
#line 37 "gecode/flatzinc/parser.yxx"
#define YYPARSE_PARAM parm
#define YYLEX_PARAM static_cast<ParserState*>(parm)->yyscanner
#include <gecode/flatzinc.hh>
#include <gecode/flatzinc/parser.hh>
#include <gecode/flatzinc/lastval.hh>
77
+
#include <gecode/flatzinc/complete.hh>
···
pp->fg->restart_status = IntVarArray(*(pp->fg), 1);
pp->fg->restart_status[0] = pp->fg->iv[pp->status_idx];
359
+
if (pp->complete_idx >= 0) {
360
+
pp->fg->restart_complete = BoolVarArray(*(pp->fg), 1);
361
+
pp->fg->restart_complete[0] = pp->fg->bv[pp->complete_idx];
362
+
pp->fg->complete_marker = std::make_shared<bool>(false);
363
+
Complete::post(*(pp->fg), pp->fg->restart_complete[0], pp->fg->complete_marker);
if (!(pp->int_uniform.empty())) {
pp->fg->int_uniform_var = IntVarArray(*(pp->fg), pp->int_uniform.size());
pp->fg->int_uniform_lb = new int[pp->int_uniform.size()];
···
535
-
#line 536 "gecode/flatzinc/parser.tab.cpp"
542
+
#line 543 "gecode/flatzinc/parser.tab.cpp"
···
typedef short yytype_int16;
739
+
/* Work around bug in HP-UX 11.23, which defines these macros
740
+
incorrectly for preprocessor constants. This workaround can likely
741
+
be removed in 2023, as HPE has promised support for HP-UX 11.23
742
+
(aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
743
+
<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
745
+
# undef UINT_LEAST8_MAX
746
+
# undef UINT_LEAST16_MAX
747
+
# define UINT_LEAST8_MAX 255
748
+
# define UINT_LEAST16_MAX 65535
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
···
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
829
-
# define YYUSE(E) ((void) (E))
848
+
# define YY_USE(E) ((void) (E))
831
-
# define YYUSE(E) /* empty */
850
+
# define YY_USE(E) /* empty */
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
···
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
1061
-
0, 604, 604, 606, 608, 611, 612, 614, 616, 619,
1062
-
620, 622, 624, 627, 628, 635, 638, 640, 643, 644,
1063
-
647, 651, 652, 653, 654, 657, 659, 661, 662, 665,
1064
-
666, 669, 670, 676, 676, 679, 711, 743, 782, 815,
1065
-
824, 834, 843, 855, 925, 991, 1062, 1130, 1151, 1171,
1066
-
1191, 1214, 1218, 1233, 1257, 1258, 1262, 1264, 1267, 1267,
1067
-
1269, 1273, 1275, 1290, 1313, 1314, 1318, 1320, 1324, 1328,
1068
-
1330, 1345, 1368, 1369, 1373, 1375, 1378, 1381, 1383, 1398,
1069
-
1421, 1422, 1426, 1428, 1431, 1436, 1437, 1442, 1443, 1448,
1070
-
1449, 1454, 1455, 1459, 1583, 1597, 1622, 1624, 1626, 1632,
1071
-
1634, 1647, 1649, 1658, 1660, 1667, 1668, 1672, 1674, 1679,
1072
-
1680, 1684, 1686, 1691, 1692, 1696, 1698, 1703, 1704, 1708,
1073
-
1710, 1718, 1720, 1724, 1726, 1731, 1732, 1736, 1738, 1740,
1074
-
1742, 1744, 1840, 1855, 1856, 1860, 1862, 1870, 1904, 1911,
1075
-
1918, 1944, 1945, 1953, 1954, 1958, 1960, 1964, 1968, 1972,
1076
-
1974, 1978, 1980, 1982, 1985, 1985, 1988, 1990, 1992, 1994,
1080
+
0, 611, 611, 613, 615, 618, 619, 621, 623, 626,
1081
+
627, 629, 631, 634, 635, 642, 645, 647, 650, 651,
1082
+
654, 658, 659, 660, 661, 664, 666, 668, 669, 672,
1083
+
673, 676, 677, 683, 683, 686, 718, 750, 789, 822,
1084
+
831, 841, 850, 862, 932, 998, 1069, 1137, 1158, 1178,
1085
+
1198, 1221, 1225, 1240, 1264, 1265, 1269, 1271, 1274, 1274,
1086
+
1276, 1280, 1282, 1297, 1320, 1321, 1325, 1327, 1331, 1335,
1087
+
1337, 1352, 1375, 1376, 1380, 1382, 1385, 1388, 1390, 1405,
1088
+
1428, 1429, 1433, 1435, 1438, 1443, 1444, 1449, 1450, 1455,
1089
+
1456, 1461, 1462, 1466, 1592, 1606, 1631, 1633, 1635, 1641,
1090
+
1643, 1656, 1658, 1667, 1669, 1676, 1677, 1681, 1683, 1688,
1091
+
1689, 1693, 1695, 1700, 1701, 1705, 1707, 1712, 1713, 1717,
1092
+
1719, 1727, 1729, 1733, 1735, 1740, 1741, 1745, 1747, 1749,
1093
+
1751, 1753, 1849, 1864, 1865, 1869, 1871, 1879, 1913, 1920,
1094
+
1927, 1953, 1954, 1962, 1963, 1967, 1969, 1973, 1977, 1981,
1095
+
1983, 1987, 1989, 1991, 1994, 1994, 1997, 1999, 2001, 2003,
···
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
1255
-
-1, 2, 3, 4, 14, 15, 36, 37, 5, 48,
1274
+
0, 2, 3, 4, 14, 15, 36, 37, 5, 48,
49, 50, 51, 52, 109, 110, 143, 16, 283, 284,
285, 83, 267, 293, 294, 295, 271, 288, 289, 290,
269, 323, 324, 325, 304, 256, 258, 260, 280, 38,
···
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, void *parm)
1529
+
YY_USE (yyoutput);
···
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YY_IGNORE_MAYBE_UNINITIALIZED_END
···
yydestruct (const char *yymsg,
yysymbol_kind_t yykind, YYSTYPE *yyvaluep, void *parm)
1919
+
YY_USE (yyvaluep);
YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YY_IGNORE_MAYBE_UNINITIALIZED_END
···
case 15: /* preddecl_item: FZ_PREDICATE FZ_ID '(' pred_arg_list ')' */
2177
-
#line 636 "../gecode/flatzinc/parser.yxx"
2196
+
#line 643 "gecode/flatzinc/parser.yxx"
{ free((yyvsp[-3].sValue)); }
2179
-
#line 2180 "gecode/flatzinc/parser.tab.cpp"
2198
+
#line 2199 "gecode/flatzinc/parser.tab.cpp"
case 20: /* pred_arg: pred_arg_type ':' FZ_ID */
2183
-
#line 648 "../gecode/flatzinc/parser.yxx"
2202
+
#line 655 "gecode/flatzinc/parser.yxx"
{ free((yyvsp[0].sValue)); }
2185
-
#line 2186 "gecode/flatzinc/parser.tab.cpp"
2204
+
#line 2205 "gecode/flatzinc/parser.tab.cpp"
case 25: /* pred_arg_simple_type: int_ti_expr_tail */
2189
-
#line 658 "../gecode/flatzinc/parser.yxx"
2208
+
#line 665 "gecode/flatzinc/parser.yxx"
{ if ((yyvsp[0].oSet)()) delete (yyvsp[0].oSet).some(); }
2191
-
#line 2192 "gecode/flatzinc/parser.tab.cpp"
2210
+
#line 2211 "gecode/flatzinc/parser.tab.cpp"
case 26: /* pred_arg_simple_type: FZ_SET FZ_OF int_ti_expr_tail */
2195
-
#line 660 "../gecode/flatzinc/parser.yxx"
2214
+
#line 667 "gecode/flatzinc/parser.yxx"
{ if ((yyvsp[0].oSet)()) delete (yyvsp[0].oSet).some(); }
2197
-
#line 2198 "gecode/flatzinc/parser.tab.cpp"
2216
+
#line 2217 "gecode/flatzinc/parser.tab.cpp"
case 35: /* vardecl_item: FZ_VAR int_ti_expr_tail ':' var_par_id annotations non_array_expr_opt */
2201
-
#line 680 "../gecode/flatzinc/parser.yxx"
2220
+
#line 687 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasAtom("output_var");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2233
-
#line 2234 "gecode/flatzinc/parser.tab.cpp"
2252
+
#line 2253 "gecode/flatzinc/parser.tab.cpp"
case 36: /* vardecl_item: FZ_VAR bool_ti_expr_tail ':' var_par_id annotations non_array_expr_opt */
2237
-
#line 712 "../gecode/flatzinc/parser.yxx"
2256
+
#line 719 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasAtom("output_var");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2269
-
#line 2270 "gecode/flatzinc/parser.tab.cpp"
2288
+
#line 2289 "gecode/flatzinc/parser.tab.cpp"
case 37: /* vardecl_item: FZ_VAR float_ti_expr_tail ':' var_par_id annotations non_array_expr_opt */
2273
-
#line 744 "../gecode/flatzinc/parser.yxx"
2292
+
#line 751 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasAtom("output_var");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2312
-
#line 2313 "gecode/flatzinc/parser.tab.cpp"
2331
+
#line 2332 "gecode/flatzinc/parser.tab.cpp"
case 38: /* vardecl_item: FZ_VAR FZ_SET FZ_OF int_ti_expr_tail ':' var_par_id annotations non_array_expr_opt */
2316
-
#line 783 "../gecode/flatzinc/parser.yxx"
2335
+
#line 790 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasAtom("output_var");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2349
-
#line 2350 "gecode/flatzinc/parser.tab.cpp"
2368
+
#line 2369 "gecode/flatzinc/parser.tab.cpp"
case 39: /* vardecl_item: FZ_INT ':' var_par_id annotations '=' non_array_expr */
2353
-
#line 816 "../gecode/flatzinc/parser.yxx"
2372
+
#line 823 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[0].arg)->isInt(), "Invalid int initializer");
···
delete (yyvsp[-2].argVec); free((yyvsp[-3].sValue));
2362
-
#line 2363 "gecode/flatzinc/parser.tab.cpp"
2381
+
#line 2382 "gecode/flatzinc/parser.tab.cpp"
case 40: /* vardecl_item: FZ_FLOAT ':' var_par_id annotations '=' non_array_expr */
2366
-
#line 825 "../gecode/flatzinc/parser.yxx"
2385
+
#line 832 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[0].arg)->isFloat(), "Invalid float initializer");
···
delete (yyvsp[-2].argVec); free((yyvsp[-3].sValue));
2376
-
#line 2377 "gecode/flatzinc/parser.tab.cpp"
2395
+
#line 2396 "gecode/flatzinc/parser.tab.cpp"
case 41: /* vardecl_item: FZ_BOOL ':' var_par_id annotations '=' non_array_expr */
2380
-
#line 835 "../gecode/flatzinc/parser.yxx"
2399
+
#line 842 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[0].arg)->isBool(), "Invalid bool initializer");
···
delete (yyvsp[-2].argVec); free((yyvsp[-3].sValue));
2389
-
#line 2390 "gecode/flatzinc/parser.tab.cpp"
2408
+
#line 2409 "gecode/flatzinc/parser.tab.cpp"
case 42: /* vardecl_item: FZ_SET FZ_OF FZ_INT ':' var_par_id annotations '=' non_array_expr */
2393
-
#line 844 "../gecode/flatzinc/parser.yxx"
2412
+
#line 851 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[0].arg)->isSet(), "Invalid set initializer");
···
delete (yyvsp[-2].argVec); free((yyvsp[-3].sValue));
2405
-
#line 2406 "gecode/flatzinc/parser.tab.cpp"
2424
+
#line 2425 "gecode/flatzinc/parser.tab.cpp"
case 43: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR int_ti_expr_tail ':' var_par_id annotations vardecl_int_var_array_init */
2409
-
#line 857 "../gecode/flatzinc/parser.yxx"
2428
+
#line 864 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-10].iValue)==1, "Arrays must start at 1");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2478
-
#line 2479 "gecode/flatzinc/parser.tab.cpp"
2497
+
#line 2498 "gecode/flatzinc/parser.tab.cpp"
case 44: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR bool_ti_expr_tail ':' var_par_id annotations vardecl_bool_var_array_init */
2482
-
#line 927 "../gecode/flatzinc/parser.yxx"
2501
+
#line 934 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasCall("output_array");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2547
-
#line 2548 "gecode/flatzinc/parser.tab.cpp"
2566
+
#line 2567 "gecode/flatzinc/parser.tab.cpp"
case 45: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR float_ti_expr_tail ':' var_par_id annotations vardecl_float_var_array_init */
2551
-
#line 994 "../gecode/flatzinc/parser.yxx"
2570
+
#line 1001 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-10].iValue)==1, "Arrays must start at 1");
···
if ((yyvsp[-4].oPFloat)()) delete (yyvsp[-4].oPFloat).some();
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2620
-
#line 2621 "gecode/flatzinc/parser.tab.cpp"
2639
+
#line 2640 "gecode/flatzinc/parser.tab.cpp"
case 46: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR FZ_SET FZ_OF int_ti_expr_tail ':' var_par_id annotations vardecl_set_var_array_init */
2624
-
#line 1064 "../gecode/flatzinc/parser.yxx"
2643
+
#line 1071 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
bool print = (yyvsp[-1].argVec) != NULL && (yyvsp[-1].argVec)->hasCall("output_array");
···
delete (yyvsp[-1].argVec); free((yyvsp[-2].sValue));
2691
-
#line 2692 "gecode/flatzinc/parser.tab.cpp"
2710
+
#line 2711 "gecode/flatzinc/parser.tab.cpp"
case 47: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_INT ':' var_par_id annotations '=' '[' int_list ']' */
2695
-
#line 1132 "../gecode/flatzinc/parser.yxx"
2714
+
#line 1139 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-12].iValue)==1, "Arrays must start at 1");
···
free((yyvsp[-5].sValue));
delete (yyvsp[-4].argVec);
2715
-
#line 2716 "gecode/flatzinc/parser.tab.cpp"
2734
+
#line 2735 "gecode/flatzinc/parser.tab.cpp"
case 48: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_BOOL ':' var_par_id annotations '=' '[' bool_list ']' */
2719
-
#line 1153 "../gecode/flatzinc/parser.yxx"
2738
+
#line 1160 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-12].iValue)==1, "Arrays must start at 1");
···
free((yyvsp[-5].sValue));
delete (yyvsp[-4].argVec);
2738
-
#line 2739 "gecode/flatzinc/parser.tab.cpp"
2757
+
#line 2758 "gecode/flatzinc/parser.tab.cpp"
case 49: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_FLOAT ':' var_par_id annotations '=' '[' float_list ']' */
2742
-
#line 1173 "../gecode/flatzinc/parser.yxx"
2761
+
#line 1180 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-12].iValue)==1, "Arrays must start at 1");
···
delete (yyvsp[-1].floatSetValue);
delete (yyvsp[-4].argVec); free((yyvsp[-5].sValue));
2761
-
#line 2762 "gecode/flatzinc/parser.tab.cpp"
2780
+
#line 2781 "gecode/flatzinc/parser.tab.cpp"
case 50: /* vardecl_item: FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_SET FZ_OF FZ_INT ':' var_par_id annotations '=' '[' set_literal_list ']' */
2765
-
#line 1193 "../gecode/flatzinc/parser.yxx"
2784
+
#line 1200 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
yyassert(pp, (yyvsp[-14].iValue)==1, "Arrays must start at 1");
···
delete (yyvsp[-1].setValueList);
delete (yyvsp[-4].argVec); free((yyvsp[-5].sValue));
2785
-
#line 2786 "gecode/flatzinc/parser.tab.cpp"
2804
+
#line 2805 "gecode/flatzinc/parser.tab.cpp"
case 51: /* int_init: FZ_INT_LIT */
2789
-
#line 1215 "../gecode/flatzinc/parser.yxx"
2808
+
#line 1222 "gecode/flatzinc/parser.yxx"
(yyval.varSpec) = new IntVarSpec((yyvsp[0].iValue),false,false);
2793
-
#line 2794 "gecode/flatzinc/parser.tab.cpp"
2812
+
#line 2813 "gecode/flatzinc/parser.tab.cpp"
case 52: /* int_init: var_par_id */
2797
-
#line 1219 "../gecode/flatzinc/parser.yxx"
2816
+
#line 1226 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
2812
-
#line 2813 "gecode/flatzinc/parser.tab.cpp"
2831
+
#line 2832 "gecode/flatzinc/parser.tab.cpp"
case 53: /* int_init: var_par_id '[' FZ_INT_LIT ']' */
2816
-
#line 1234 "../gecode/flatzinc/parser.yxx"
2835
+
#line 1241 "gecode/flatzinc/parser.yxx"
···
free((yyvsp[-3].sValue));
2837
-
#line 2838 "gecode/flatzinc/parser.tab.cpp"
2856
+
#line 2857 "gecode/flatzinc/parser.tab.cpp"
case 54: /* int_init_list: %empty */
2841
-
#line 1257 "../gecode/flatzinc/parser.yxx"
2860
+
#line 1264 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(0); }
2843
-
#line 2844 "gecode/flatzinc/parser.tab.cpp"
2862
+
#line 2863 "gecode/flatzinc/parser.tab.cpp"
case 55: /* int_init_list: int_init_list_head list_tail */
2847
-
#line 1259 "../gecode/flatzinc/parser.yxx"
2866
+
#line 1266 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
2849
-
#line 2850 "gecode/flatzinc/parser.tab.cpp"
2868
+
#line 2869 "gecode/flatzinc/parser.tab.cpp"
case 56: /* int_init_list_head: int_init */
2853
-
#line 1263 "../gecode/flatzinc/parser.yxx"
2872
+
#line 1270 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[0].varSpec); }
2855
-
#line 2856 "gecode/flatzinc/parser.tab.cpp"
2874
+
#line 2875 "gecode/flatzinc/parser.tab.cpp"
case 57: /* int_init_list_head: int_init_list_head ',' int_init */
2859
-
#line 1265 "../gecode/flatzinc/parser.yxx"
2878
+
#line 1272 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-2].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[0].varSpec)); }
2861
-
#line 2862 "gecode/flatzinc/parser.tab.cpp"
2880
+
#line 2881 "gecode/flatzinc/parser.tab.cpp"
case 60: /* int_var_array_literal: '[' int_init_list ']' */
2865
-
#line 1270 "../gecode/flatzinc/parser.yxx"
2884
+
#line 1277 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
2867
-
#line 2868 "gecode/flatzinc/parser.tab.cpp"
2886
+
#line 2887 "gecode/flatzinc/parser.tab.cpp"
case 61: /* float_init: FZ_FLOAT_LIT */
2871
-
#line 1274 "../gecode/flatzinc/parser.yxx"
2890
+
#line 1281 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpec) = new FloatVarSpec((yyvsp[0].dValue),false,false); }
2873
-
#line 2874 "gecode/flatzinc/parser.tab.cpp"
2892
+
#line 2893 "gecode/flatzinc/parser.tab.cpp"
case 62: /* float_init: var_par_id */
2877
-
#line 1276 "../gecode/flatzinc/parser.yxx"
2896
+
#line 1283 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
2892
-
#line 2893 "gecode/flatzinc/parser.tab.cpp"
2911
+
#line 2912 "gecode/flatzinc/parser.tab.cpp"
case 63: /* float_init: var_par_id '[' FZ_INT_LIT ']' */
2896
-
#line 1291 "../gecode/flatzinc/parser.yxx"
2915
+
#line 1298 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
free((yyvsp[-3].sValue));
2916
-
#line 2917 "gecode/flatzinc/parser.tab.cpp"
2935
+
#line 2936 "gecode/flatzinc/parser.tab.cpp"
case 64: /* float_init_list: %empty */
2920
-
#line 1313 "../gecode/flatzinc/parser.yxx"
2939
+
#line 1320 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(0); }
2922
-
#line 2923 "gecode/flatzinc/parser.tab.cpp"
2941
+
#line 2942 "gecode/flatzinc/parser.tab.cpp"
case 65: /* float_init_list: float_init_list_head list_tail */
2926
-
#line 1315 "../gecode/flatzinc/parser.yxx"
2945
+
#line 1322 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
2928
-
#line 2929 "gecode/flatzinc/parser.tab.cpp"
2947
+
#line 2948 "gecode/flatzinc/parser.tab.cpp"
case 66: /* float_init_list_head: float_init */
2932
-
#line 1319 "../gecode/flatzinc/parser.yxx"
2951
+
#line 1326 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[0].varSpec); }
2934
-
#line 2935 "gecode/flatzinc/parser.tab.cpp"
2953
+
#line 2954 "gecode/flatzinc/parser.tab.cpp"
case 67: /* float_init_list_head: float_init_list_head ',' float_init */
2938
-
#line 1321 "../gecode/flatzinc/parser.yxx"
2957
+
#line 1328 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-2].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[0].varSpec)); }
2940
-
#line 2941 "gecode/flatzinc/parser.tab.cpp"
2959
+
#line 2960 "gecode/flatzinc/parser.tab.cpp"
case 68: /* float_var_array_literal: '[' float_init_list ']' */
2944
-
#line 1325 "../gecode/flatzinc/parser.yxx"
2963
+
#line 1332 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
2946
-
#line 2947 "gecode/flatzinc/parser.tab.cpp"
2965
+
#line 2966 "gecode/flatzinc/parser.tab.cpp"
case 69: /* bool_init: FZ_BOOL_LIT */
2950
-
#line 1329 "../gecode/flatzinc/parser.yxx"
2969
+
#line 1336 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpec) = new BoolVarSpec((yyvsp[0].iValue),false,false); }
2952
-
#line 2953 "gecode/flatzinc/parser.tab.cpp"
2971
+
#line 2972 "gecode/flatzinc/parser.tab.cpp"
case 70: /* bool_init: var_par_id */
2956
-
#line 1331 "../gecode/flatzinc/parser.yxx"
2975
+
#line 1338 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
2971
-
#line 2972 "gecode/flatzinc/parser.tab.cpp"
2990
+
#line 2991 "gecode/flatzinc/parser.tab.cpp"
case 71: /* bool_init: var_par_id '[' FZ_INT_LIT ']' */
2975
-
#line 1346 "../gecode/flatzinc/parser.yxx"
2994
+
#line 1353 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
free((yyvsp[-3].sValue));
2995
-
#line 2996 "gecode/flatzinc/parser.tab.cpp"
3014
+
#line 3015 "gecode/flatzinc/parser.tab.cpp"
case 72: /* bool_init_list: %empty */
2999
-
#line 1368 "../gecode/flatzinc/parser.yxx"
3018
+
#line 1375 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(0); }
3001
-
#line 3002 "gecode/flatzinc/parser.tab.cpp"
3020
+
#line 3021 "gecode/flatzinc/parser.tab.cpp"
case 73: /* bool_init_list: bool_init_list_head list_tail */
3005
-
#line 1370 "../gecode/flatzinc/parser.yxx"
3024
+
#line 1377 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
3007
-
#line 3008 "gecode/flatzinc/parser.tab.cpp"
3026
+
#line 3027 "gecode/flatzinc/parser.tab.cpp"
case 74: /* bool_init_list_head: bool_init */
3011
-
#line 1374 "../gecode/flatzinc/parser.yxx"
3030
+
#line 1381 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[0].varSpec); }
3013
-
#line 3014 "gecode/flatzinc/parser.tab.cpp"
3032
+
#line 3033 "gecode/flatzinc/parser.tab.cpp"
case 75: /* bool_init_list_head: bool_init_list_head ',' bool_init */
3017
-
#line 1376 "../gecode/flatzinc/parser.yxx"
3036
+
#line 1383 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-2].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[0].varSpec)); }
3019
-
#line 3020 "gecode/flatzinc/parser.tab.cpp"
3038
+
#line 3039 "gecode/flatzinc/parser.tab.cpp"
case 76: /* bool_var_array_literal: '[' bool_init_list ']' */
3023
-
#line 1378 "../gecode/flatzinc/parser.yxx"
3042
+
#line 1385 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
3025
-
#line 3026 "gecode/flatzinc/parser.tab.cpp"
3044
+
#line 3045 "gecode/flatzinc/parser.tab.cpp"
case 77: /* set_init: set_literal */
3029
-
#line 1382 "../gecode/flatzinc/parser.yxx"
3048
+
#line 1389 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpec) = new SetVarSpec((yyvsp[0].setLit),false,false); }
3031
-
#line 3032 "gecode/flatzinc/parser.tab.cpp"
3050
+
#line 3051 "gecode/flatzinc/parser.tab.cpp"
case 78: /* set_init: var_par_id */
3035
-
#line 1384 "../gecode/flatzinc/parser.yxx"
3054
+
#line 1391 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
3050
-
#line 3051 "gecode/flatzinc/parser.tab.cpp"
3069
+
#line 3070 "gecode/flatzinc/parser.tab.cpp"
case 79: /* set_init: var_par_id '[' FZ_INT_LIT ']' */
3054
-
#line 1399 "../gecode/flatzinc/parser.yxx"
3073
+
#line 1406 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
free((yyvsp[-3].sValue));
3074
-
#line 3075 "gecode/flatzinc/parser.tab.cpp"
3093
+
#line 3094 "gecode/flatzinc/parser.tab.cpp"
case 80: /* set_init_list: %empty */
3078
-
#line 1421 "../gecode/flatzinc/parser.yxx"
3097
+
#line 1428 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(0); }
3080
-
#line 3081 "gecode/flatzinc/parser.tab.cpp"
3099
+
#line 3100 "gecode/flatzinc/parser.tab.cpp"
case 81: /* set_init_list: set_init_list_head list_tail */
3084
-
#line 1423 "../gecode/flatzinc/parser.yxx"
3103
+
#line 1430 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
3086
-
#line 3087 "gecode/flatzinc/parser.tab.cpp"
3105
+
#line 3106 "gecode/flatzinc/parser.tab.cpp"
case 82: /* set_init_list_head: set_init */
3090
-
#line 1427 "../gecode/flatzinc/parser.yxx"
3109
+
#line 1434 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[0].varSpec); }
3092
-
#line 3093 "gecode/flatzinc/parser.tab.cpp"
3111
+
#line 3112 "gecode/flatzinc/parser.tab.cpp"
case 83: /* set_init_list_head: set_init_list_head ',' set_init */
3096
-
#line 1429 "../gecode/flatzinc/parser.yxx"
3115
+
#line 1436 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-2].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[0].varSpec)); }
3098
-
#line 3099 "gecode/flatzinc/parser.tab.cpp"
3117
+
#line 3118 "gecode/flatzinc/parser.tab.cpp"
case 84: /* set_var_array_literal: '[' set_init_list ']' */
3102
-
#line 1432 "../gecode/flatzinc/parser.yxx"
3121
+
#line 1439 "gecode/flatzinc/parser.yxx"
{ (yyval.varSpecVec) = (yyvsp[-1].varSpecVec); }
3104
-
#line 3105 "gecode/flatzinc/parser.tab.cpp"
3123
+
#line 3124 "gecode/flatzinc/parser.tab.cpp"
case 85: /* vardecl_int_var_array_init: %empty */
3108
-
#line 1436 "../gecode/flatzinc/parser.yxx"
3127
+
#line 1443 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); }
3110
-
#line 3111 "gecode/flatzinc/parser.tab.cpp"
3129
+
#line 3130 "gecode/flatzinc/parser.tab.cpp"
case 86: /* vardecl_int_var_array_init: '=' int_var_array_literal */
3114
-
#line 1438 "../gecode/flatzinc/parser.yxx"
3133
+
#line 1445 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[0].varSpecVec)); }
3116
-
#line 3117 "gecode/flatzinc/parser.tab.cpp"
3135
+
#line 3136 "gecode/flatzinc/parser.tab.cpp"
case 87: /* vardecl_bool_var_array_init: %empty */
3120
-
#line 1442 "../gecode/flatzinc/parser.yxx"
3139
+
#line 1449 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); }
3122
-
#line 3123 "gecode/flatzinc/parser.tab.cpp"
3141
+
#line 3142 "gecode/flatzinc/parser.tab.cpp"
case 88: /* vardecl_bool_var_array_init: '=' bool_var_array_literal */
3126
-
#line 1444 "../gecode/flatzinc/parser.yxx"
3145
+
#line 1451 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[0].varSpecVec)); }
3128
-
#line 3129 "gecode/flatzinc/parser.tab.cpp"
3147
+
#line 3148 "gecode/flatzinc/parser.tab.cpp"
case 89: /* vardecl_float_var_array_init: %empty */
3132
-
#line 1448 "../gecode/flatzinc/parser.yxx"
3151
+
#line 1455 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); }
3134
-
#line 3135 "gecode/flatzinc/parser.tab.cpp"
3153
+
#line 3154 "gecode/flatzinc/parser.tab.cpp"
case 90: /* vardecl_float_var_array_init: '=' float_var_array_literal */
3138
-
#line 1450 "../gecode/flatzinc/parser.yxx"
3157
+
#line 1457 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[0].varSpecVec)); }
3140
-
#line 3141 "gecode/flatzinc/parser.tab.cpp"
3159
+
#line 3160 "gecode/flatzinc/parser.tab.cpp"
case 91: /* vardecl_set_var_array_init: %empty */
3144
-
#line 1454 "../gecode/flatzinc/parser.yxx"
3163
+
#line 1461 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); }
3146
-
#line 3147 "gecode/flatzinc/parser.tab.cpp"
3165
+
#line 3166 "gecode/flatzinc/parser.tab.cpp"
case 92: /* vardecl_set_var_array_init: '=' set_var_array_literal */
3150
-
#line 1456 "../gecode/flatzinc/parser.yxx"
3169
+
#line 1463 "gecode/flatzinc/parser.yxx"
{ (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[0].varSpecVec)); }
3152
-
#line 3153 "gecode/flatzinc/parser.tab.cpp"
3171
+
#line 3172 "gecode/flatzinc/parser.tab.cpp"
case 93: /* constraint_item: FZ_CONSTRAINT FZ_ID '(' flat_expr_list ')' annotations */
3156
-
#line 1460 "../gecode/flatzinc/parser.yxx"
3175
+
#line 1467 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
std::string cid((yyvsp[-4].sValue));
if (cid=="status" && (yyvsp[-2].argVec)->a[0]->isIntVar()) {
pp->status_idx = (yyvsp[-2].argVec)->a[0]->getIntVar();
3182
+
} else if (cid=="complete_reif" && (yyvsp[-2].argVec)->a[0]->isBoolVar()) {
3183
+
pp->complete_idx = (yyvsp[-2].argVec)->a[0]->getBoolVar();
} else if (cid=="int_lastval" && (yyvsp[-2].argVec)->a[0]->isIntVar() && (yyvsp[-2].argVec)->a[1]->isIntVar()) {
int base0 = getBaseIntVar(pp,(yyvsp[-2].argVec)->a[0]->getIntVar());
int base1 = getBaseIntVar(pp,(yyvsp[-2].argVec)->a[1]->getIntVar());
···
free((yyvsp[-4].sValue));
3279
-
#line 3280 "gecode/flatzinc/parser.tab.cpp"
3300
+
#line 3301 "gecode/flatzinc/parser.tab.cpp"
case 94: /* solve_item: FZ_SOLVE annotations FZ_SATISFY */
3283
-
#line 1584 "../gecode/flatzinc/parser.yxx"
3304
+
#line 1593 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
···
delete (yyvsp[-1].argVec);
3297
-
#line 3298 "gecode/flatzinc/parser.tab.cpp"
3318
+
#line 3319 "gecode/flatzinc/parser.tab.cpp"
case 95: /* solve_item: FZ_SOLVE annotations minmax solve_expr */
3301
-
#line 1598 "../gecode/flatzinc/parser.yxx"
3322
+
#line 1607 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
···
delete (yyvsp[-2].argVec);
3320
-
#line 3321 "gecode/flatzinc/parser.tab.cpp"
3341
+
#line 3342 "gecode/flatzinc/parser.tab.cpp"
case 96: /* int_ti_expr_tail: FZ_INT */
3324
-
#line 1623 "../gecode/flatzinc/parser.yxx"
3345
+
#line 1632 "gecode/flatzinc/parser.yxx"
{ (yyval.oSet) = Option<AST::SetLit* >::none(); }
3326
-
#line 3327 "gecode/flatzinc/parser.tab.cpp"
3347
+
#line 3348 "gecode/flatzinc/parser.tab.cpp"
case 97: /* int_ti_expr_tail: '{' int_list '}' */
3330
-
#line 1625 "../gecode/flatzinc/parser.yxx"
3351
+
#line 1634 "gecode/flatzinc/parser.yxx"
{ (yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit(*(yyvsp[-1].setValue))); }
3332
-
#line 3333 "gecode/flatzinc/parser.tab.cpp"
3353
+
#line 3354 "gecode/flatzinc/parser.tab.cpp"
case 98: /* int_ti_expr_tail: FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT */
3336
-
#line 1627 "../gecode/flatzinc/parser.yxx"
3357
+
#line 1636 "gecode/flatzinc/parser.yxx"
(yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit((yyvsp[-2].iValue), (yyvsp[0].iValue)));
3340
-
#line 3341 "gecode/flatzinc/parser.tab.cpp"
3361
+
#line 3362 "gecode/flatzinc/parser.tab.cpp"
case 99: /* bool_ti_expr_tail: FZ_BOOL */
3344
-
#line 1633 "../gecode/flatzinc/parser.yxx"
3365
+
#line 1642 "gecode/flatzinc/parser.yxx"
{ (yyval.oSet) = Option<AST::SetLit* >::none(); }
3346
-
#line 3347 "gecode/flatzinc/parser.tab.cpp"
3367
+
#line 3368 "gecode/flatzinc/parser.tab.cpp"
case 100: /* bool_ti_expr_tail: '{' bool_list_head list_tail '}' */
3350
-
#line 1635 "../gecode/flatzinc/parser.yxx"
3371
+
#line 1644 "gecode/flatzinc/parser.yxx"
for (int i=(yyvsp[-2].setValue)->size(); i--;) {
···
(yyval.oSet) = Option<AST::SetLit* >::some(
new AST::SetLit(!haveFalse,haveTrue));
3361
-
#line 3362 "gecode/flatzinc/parser.tab.cpp"
3382
+
#line 3383 "gecode/flatzinc/parser.tab.cpp"
case 101: /* float_ti_expr_tail: FZ_FLOAT */
3365
-
#line 1648 "../gecode/flatzinc/parser.yxx"
3386
+
#line 1657 "gecode/flatzinc/parser.yxx"
{ (yyval.oPFloat) = Option<std::pair<double,double>* >::none(); }
3367
-
#line 3368 "gecode/flatzinc/parser.tab.cpp"
3388
+
#line 3389 "gecode/flatzinc/parser.tab.cpp"
case 102: /* float_ti_expr_tail: FZ_FLOAT_LIT FZ_DOTDOT FZ_FLOAT_LIT */
3371
-
#line 1650 "../gecode/flatzinc/parser.yxx"
3392
+
#line 1659 "gecode/flatzinc/parser.yxx"
{ std::pair<double,double>* dom = new std::pair<double,double>((yyvsp[-2].dValue),(yyvsp[0].dValue));
(yyval.oPFloat) = Option<std::pair<double,double>* >::some(dom); }
3374
-
#line 3375 "gecode/flatzinc/parser.tab.cpp"
3395
+
#line 3396 "gecode/flatzinc/parser.tab.cpp"
case 103: /* set_literal: '{' int_list '}' */
3378
-
#line 1659 "../gecode/flatzinc/parser.yxx"
3399
+
#line 1668 "gecode/flatzinc/parser.yxx"
{ (yyval.setLit) = new AST::SetLit(*(yyvsp[-1].setValue)); }
3380
-
#line 3381 "gecode/flatzinc/parser.tab.cpp"
3401
+
#line 3402 "gecode/flatzinc/parser.tab.cpp"
case 104: /* set_literal: FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT */
3384
-
#line 1661 "../gecode/flatzinc/parser.yxx"
3405
+
#line 1670 "gecode/flatzinc/parser.yxx"
{ (yyval.setLit) = new AST::SetLit((yyvsp[-2].iValue), (yyvsp[0].iValue)); }
3386
-
#line 3387 "gecode/flatzinc/parser.tab.cpp"
3407
+
#line 3408 "gecode/flatzinc/parser.tab.cpp"
case 105: /* int_list: %empty */
3390
-
#line 1667 "../gecode/flatzinc/parser.yxx"
3411
+
#line 1676 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = new vector<int>(0); }
3392
-
#line 3393 "gecode/flatzinc/parser.tab.cpp"
3413
+
#line 3414 "gecode/flatzinc/parser.tab.cpp"
case 106: /* int_list: int_list_head list_tail */
3396
-
#line 1669 "../gecode/flatzinc/parser.yxx"
3417
+
#line 1678 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = (yyvsp[-1].setValue); }
3398
-
#line 3399 "gecode/flatzinc/parser.tab.cpp"
3419
+
#line 3420 "gecode/flatzinc/parser.tab.cpp"
case 107: /* int_list_head: FZ_INT_LIT */
3402
-
#line 1673 "../gecode/flatzinc/parser.yxx"
3423
+
#line 1682 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[0].iValue); }
3404
-
#line 3405 "gecode/flatzinc/parser.tab.cpp"
3425
+
#line 3426 "gecode/flatzinc/parser.tab.cpp"
case 108: /* int_list_head: int_list_head ',' FZ_INT_LIT */
3408
-
#line 1675 "../gecode/flatzinc/parser.yxx"
3429
+
#line 1684 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = (yyvsp[-2].setValue); (yyval.setValue)->push_back((yyvsp[0].iValue)); }
3410
-
#line 3411 "gecode/flatzinc/parser.tab.cpp"
3431
+
#line 3432 "gecode/flatzinc/parser.tab.cpp"
case 109: /* bool_list: %empty */
3414
-
#line 1679 "../gecode/flatzinc/parser.yxx"
3435
+
#line 1688 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = new vector<int>(0); }
3416
-
#line 3417 "gecode/flatzinc/parser.tab.cpp"
3437
+
#line 3438 "gecode/flatzinc/parser.tab.cpp"
case 110: /* bool_list: bool_list_head list_tail */
3420
-
#line 1681 "../gecode/flatzinc/parser.yxx"
3441
+
#line 1690 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = (yyvsp[-1].setValue); }
3422
-
#line 3423 "gecode/flatzinc/parser.tab.cpp"
3443
+
#line 3444 "gecode/flatzinc/parser.tab.cpp"
case 111: /* bool_list_head: FZ_BOOL_LIT */
3426
-
#line 1685 "../gecode/flatzinc/parser.yxx"
3447
+
#line 1694 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[0].iValue); }
3428
-
#line 3429 "gecode/flatzinc/parser.tab.cpp"
3449
+
#line 3450 "gecode/flatzinc/parser.tab.cpp"
case 112: /* bool_list_head: bool_list_head ',' FZ_BOOL_LIT */
3432
-
#line 1687 "../gecode/flatzinc/parser.yxx"
3453
+
#line 1696 "gecode/flatzinc/parser.yxx"
{ (yyval.setValue) = (yyvsp[-2].setValue); (yyval.setValue)->push_back((yyvsp[0].iValue)); }
3434
-
#line 3435 "gecode/flatzinc/parser.tab.cpp"
3455
+
#line 3456 "gecode/flatzinc/parser.tab.cpp"
case 113: /* float_list: %empty */
3438
-
#line 1691 "../gecode/flatzinc/parser.yxx"
3459
+
#line 1700 "gecode/flatzinc/parser.yxx"
{ (yyval.floatSetValue) = new vector<double>(0); }
3440
-
#line 3441 "gecode/flatzinc/parser.tab.cpp"
3461
+
#line 3462 "gecode/flatzinc/parser.tab.cpp"
case 114: /* float_list: float_list_head list_tail */
3444
-
#line 1693 "../gecode/flatzinc/parser.yxx"
3465
+
#line 1702 "gecode/flatzinc/parser.yxx"
{ (yyval.floatSetValue) = (yyvsp[-1].floatSetValue); }
3446
-
#line 3447 "gecode/flatzinc/parser.tab.cpp"
3467
+
#line 3468 "gecode/flatzinc/parser.tab.cpp"
case 115: /* float_list_head: FZ_FLOAT_LIT */
3450
-
#line 1697 "../gecode/flatzinc/parser.yxx"
3471
+
#line 1706 "gecode/flatzinc/parser.yxx"
{ (yyval.floatSetValue) = new vector<double>(1); (*(yyval.floatSetValue))[0] = (yyvsp[0].dValue); }
3452
-
#line 3453 "gecode/flatzinc/parser.tab.cpp"
3473
+
#line 3474 "gecode/flatzinc/parser.tab.cpp"
case 116: /* float_list_head: float_list_head ',' FZ_FLOAT_LIT */
3456
-
#line 1699 "../gecode/flatzinc/parser.yxx"
3477
+
#line 1708 "gecode/flatzinc/parser.yxx"
{ (yyval.floatSetValue) = (yyvsp[-2].floatSetValue); (yyval.floatSetValue)->push_back((yyvsp[0].dValue)); }
3458
-
#line 3459 "gecode/flatzinc/parser.tab.cpp"
3479
+
#line 3480 "gecode/flatzinc/parser.tab.cpp"
case 117: /* set_literal_list: %empty */
3462
-
#line 1703 "../gecode/flatzinc/parser.yxx"
3483
+
#line 1712 "gecode/flatzinc/parser.yxx"
{ (yyval.setValueList) = new vector<AST::SetLit>(0); }
3464
-
#line 3465 "gecode/flatzinc/parser.tab.cpp"
3485
+
#line 3486 "gecode/flatzinc/parser.tab.cpp"
case 118: /* set_literal_list: set_literal_list_head list_tail */
3468
-
#line 1705 "../gecode/flatzinc/parser.yxx"
3489
+
#line 1714 "gecode/flatzinc/parser.yxx"
{ (yyval.setValueList) = (yyvsp[-1].setValueList); }
3470
-
#line 3471 "gecode/flatzinc/parser.tab.cpp"
3491
+
#line 3492 "gecode/flatzinc/parser.tab.cpp"
case 119: /* set_literal_list_head: set_literal */
3474
-
#line 1709 "../gecode/flatzinc/parser.yxx"
3495
+
#line 1718 "gecode/flatzinc/parser.yxx"
{ (yyval.setValueList) = new vector<AST::SetLit>(1); (*(yyval.setValueList))[0] = *(yyvsp[0].setLit); delete (yyvsp[0].setLit); }
3476
-
#line 3477 "gecode/flatzinc/parser.tab.cpp"
3497
+
#line 3498 "gecode/flatzinc/parser.tab.cpp"
case 120: /* set_literal_list_head: set_literal_list_head ',' set_literal */
3480
-
#line 1711 "../gecode/flatzinc/parser.yxx"
3501
+
#line 1720 "gecode/flatzinc/parser.yxx"
{ (yyval.setValueList) = (yyvsp[-2].setValueList); (yyval.setValueList)->push_back(*(yyvsp[0].setLit)); delete (yyvsp[0].setLit); }
3482
-
#line 3483 "gecode/flatzinc/parser.tab.cpp"
3503
+
#line 3504 "gecode/flatzinc/parser.tab.cpp"
case 121: /* flat_expr_list: flat_expr */
3486
-
#line 1719 "../gecode/flatzinc/parser.yxx"
3507
+
#line 1728 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = new AST::Array((yyvsp[0].arg)); }
3488
-
#line 3489 "gecode/flatzinc/parser.tab.cpp"
3509
+
#line 3510 "gecode/flatzinc/parser.tab.cpp"
case 122: /* flat_expr_list: flat_expr_list ',' flat_expr */
3492
-
#line 1721 "../gecode/flatzinc/parser.yxx"
3513
+
#line 1730 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = (yyvsp[-2].argVec); (yyval.argVec)->append((yyvsp[0].arg)); }
3494
-
#line 3495 "gecode/flatzinc/parser.tab.cpp"
3515
+
#line 3516 "gecode/flatzinc/parser.tab.cpp"
case 123: /* flat_expr: non_array_expr */
3498
-
#line 1725 "../gecode/flatzinc/parser.yxx"
3519
+
#line 1734 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[0].arg); }
3500
-
#line 3501 "gecode/flatzinc/parser.tab.cpp"
3521
+
#line 3522 "gecode/flatzinc/parser.tab.cpp"
case 124: /* flat_expr: '[' non_array_expr_list ']' */
3504
-
#line 1727 "../gecode/flatzinc/parser.yxx"
3525
+
#line 1736 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[-1].argVec); }
3506
-
#line 3507 "gecode/flatzinc/parser.tab.cpp"
3527
+
#line 3528 "gecode/flatzinc/parser.tab.cpp"
case 125: /* non_array_expr_opt: %empty */
3510
-
#line 1731 "../gecode/flatzinc/parser.yxx"
3531
+
#line 1740 "gecode/flatzinc/parser.yxx"
{ (yyval.oArg) = Option<AST::Node*>::none(); }
3512
-
#line 3513 "gecode/flatzinc/parser.tab.cpp"
3533
+
#line 3534 "gecode/flatzinc/parser.tab.cpp"
case 126: /* non_array_expr_opt: '=' non_array_expr */
3516
-
#line 1733 "../gecode/flatzinc/parser.yxx"
3537
+
#line 1742 "gecode/flatzinc/parser.yxx"
{ (yyval.oArg) = Option<AST::Node*>::some((yyvsp[0].arg)); }
3518
-
#line 3519 "gecode/flatzinc/parser.tab.cpp"
3539
+
#line 3540 "gecode/flatzinc/parser.tab.cpp"
case 127: /* non_array_expr: FZ_BOOL_LIT */
3522
-
#line 1737 "../gecode/flatzinc/parser.yxx"
3543
+
#line 1746 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::BoolLit((yyvsp[0].iValue)); }
3524
-
#line 3525 "gecode/flatzinc/parser.tab.cpp"
3545
+
#line 3546 "gecode/flatzinc/parser.tab.cpp"
case 128: /* non_array_expr: FZ_INT_LIT */
3528
-
#line 1739 "../gecode/flatzinc/parser.yxx"
3549
+
#line 1748 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::IntLit((yyvsp[0].iValue)); }
3530
-
#line 3531 "gecode/flatzinc/parser.tab.cpp"
3551
+
#line 3552 "gecode/flatzinc/parser.tab.cpp"
case 129: /* non_array_expr: FZ_FLOAT_LIT */
3534
-
#line 1741 "../gecode/flatzinc/parser.yxx"
3555
+
#line 1750 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::FloatLit((yyvsp[0].dValue)); }
3536
-
#line 3537 "gecode/flatzinc/parser.tab.cpp"
3557
+
#line 3558 "gecode/flatzinc/parser.tab.cpp"
case 130: /* non_array_expr: set_literal */
3540
-
#line 1743 "../gecode/flatzinc/parser.yxx"
3561
+
#line 1752 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[0].setLit); }
3542
-
#line 3543 "gecode/flatzinc/parser.tab.cpp"
3563
+
#line 3564 "gecode/flatzinc/parser.tab.cpp"
case 131: /* non_array_expr: var_par_id */
3546
-
#line 1745 "../gecode/flatzinc/parser.yxx"
3567
+
#line 1754 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
3642
-
#line 3643 "gecode/flatzinc/parser.tab.cpp"
3663
+
#line 3664 "gecode/flatzinc/parser.tab.cpp"
case 132: /* non_array_expr: var_par_id '[' non_array_expr ']' */
3646
-
#line 1841 "../gecode/flatzinc/parser.yxx"
3667
+
#line 1850 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
free((yyvsp[-3].sValue));
3658
-
#line 3659 "gecode/flatzinc/parser.tab.cpp"
3679
+
#line 3680 "gecode/flatzinc/parser.tab.cpp"
case 133: /* non_array_expr_list: %empty */
3662
-
#line 1855 "../gecode/flatzinc/parser.yxx"
3683
+
#line 1864 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = new AST::Array(0); }
3664
-
#line 3665 "gecode/flatzinc/parser.tab.cpp"
3685
+
#line 3686 "gecode/flatzinc/parser.tab.cpp"
case 134: /* non_array_expr_list: non_array_expr_list_head list_tail */
3668
-
#line 1857 "../gecode/flatzinc/parser.yxx"
3689
+
#line 1866 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = (yyvsp[-1].argVec); }
3670
-
#line 3671 "gecode/flatzinc/parser.tab.cpp"
3691
+
#line 3692 "gecode/flatzinc/parser.tab.cpp"
case 135: /* non_array_expr_list_head: non_array_expr */
3674
-
#line 1861 "../gecode/flatzinc/parser.yxx"
3695
+
#line 1870 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = new AST::Array((yyvsp[0].arg)); }
3676
-
#line 3677 "gecode/flatzinc/parser.tab.cpp"
3697
+
#line 3698 "gecode/flatzinc/parser.tab.cpp"
case 136: /* non_array_expr_list_head: non_array_expr_list_head ',' non_array_expr */
3680
-
#line 1863 "../gecode/flatzinc/parser.yxx"
3701
+
#line 1872 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = (yyvsp[-2].argVec); (yyval.argVec)->append((yyvsp[0].arg)); }
3682
-
#line 3683 "gecode/flatzinc/parser.tab.cpp"
3703
+
#line 3704 "gecode/flatzinc/parser.tab.cpp"
case 137: /* solve_expr: var_par_id */
3686
-
#line 1871 "../gecode/flatzinc/parser.yxx"
3707
+
#line 1880 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
···
3720
-
#line 3721 "gecode/flatzinc/parser.tab.cpp"
3741
+
#line 3742 "gecode/flatzinc/parser.tab.cpp"
case 138: /* solve_expr: FZ_INT_LIT */
3724
-
#line 1905 "../gecode/flatzinc/parser.yxx"
3745
+
#line 1914 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
pp->intvars.push_back(varspec("OBJ_CONST_INTRODUCED",
new IntVarSpec(0,true,false)));
(yyval.iValue) = pp->intvars.size()-1;
3731
-
#line 3732 "gecode/flatzinc/parser.tab.cpp"
3752
+
#line 3753 "gecode/flatzinc/parser.tab.cpp"
case 139: /* solve_expr: FZ_FLOAT_LIT */
3735
-
#line 1912 "../gecode/flatzinc/parser.yxx"
3756
+
#line 1921 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
pp->intvars.push_back(varspec("OBJ_CONST_INTRODUCED",
new IntVarSpec(0,true,false)));
(yyval.iValue) = pp->intvars.size()-1;
3742
-
#line 3743 "gecode/flatzinc/parser.tab.cpp"
3763
+
#line 3764 "gecode/flatzinc/parser.tab.cpp"
case 140: /* solve_expr: var_par_id '[' FZ_INT_LIT ']' */
3746
-
#line 1919 "../gecode/flatzinc/parser.yxx"
3767
+
#line 1928 "gecode/flatzinc/parser.yxx"
ParserState *pp = static_cast<ParserState*>(parm);
···
free((yyvsp[-3].sValue));
3770
-
#line 3771 "gecode/flatzinc/parser.tab.cpp"
3791
+
#line 3792 "gecode/flatzinc/parser.tab.cpp"
case 143: /* annotations: %empty */
3774
-
#line 1953 "../gecode/flatzinc/parser.yxx"
3795
+
#line 1962 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = NULL; }
3776
-
#line 3777 "gecode/flatzinc/parser.tab.cpp"
3797
+
#line 3798 "gecode/flatzinc/parser.tab.cpp"
case 144: /* annotations: annotations_head */
3780
-
#line 1955 "../gecode/flatzinc/parser.yxx"
3801
+
#line 1964 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = (yyvsp[0].argVec); }
3782
-
#line 3783 "gecode/flatzinc/parser.tab.cpp"
3803
+
#line 3804 "gecode/flatzinc/parser.tab.cpp"
case 145: /* annotations_head: FZ_COLONCOLON annotation */
3786
-
#line 1959 "../gecode/flatzinc/parser.yxx"
3807
+
#line 1968 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = new AST::Array((yyvsp[0].arg)); }
3788
-
#line 3789 "gecode/flatzinc/parser.tab.cpp"
3809
+
#line 3810 "gecode/flatzinc/parser.tab.cpp"
case 146: /* annotations_head: annotations_head FZ_COLONCOLON annotation */
3792
-
#line 1961 "../gecode/flatzinc/parser.yxx"
3813
+
#line 1970 "gecode/flatzinc/parser.yxx"
{ (yyval.argVec) = (yyvsp[-2].argVec); (yyval.argVec)->append((yyvsp[0].arg)); }
3794
-
#line 3795 "gecode/flatzinc/parser.tab.cpp"
3815
+
#line 3816 "gecode/flatzinc/parser.tab.cpp"
case 147: /* annotation: FZ_ID '(' annotation_list ')' */
3798
-
#line 1965 "../gecode/flatzinc/parser.yxx"
3819
+
#line 1974 "gecode/flatzinc/parser.yxx"
(yyval.arg) = new AST::Call((yyvsp[-3].sValue), AST::extractSingleton((yyvsp[-1].arg))); free((yyvsp[-3].sValue));
3802
-
#line 3803 "gecode/flatzinc/parser.tab.cpp"
3823
+
#line 3824 "gecode/flatzinc/parser.tab.cpp"
case 148: /* annotation: annotation_expr */
3806
-
#line 1969 "../gecode/flatzinc/parser.yxx"
3827
+
#line 1978 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[0].arg); }
3808
-
#line 3809 "gecode/flatzinc/parser.tab.cpp"
3829
+
#line 3830 "gecode/flatzinc/parser.tab.cpp"
case 149: /* annotation_list: annotation */
3812
-
#line 1973 "../gecode/flatzinc/parser.yxx"
3833
+
#line 1982 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::Array((yyvsp[0].arg)); }
3814
-
#line 3815 "gecode/flatzinc/parser.tab.cpp"
3835
+
#line 3836 "gecode/flatzinc/parser.tab.cpp"
case 150: /* annotation_list: annotation_list ',' annotation */
3818
-
#line 1975 "../gecode/flatzinc/parser.yxx"
3839
+
#line 1984 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[-2].arg); (yyval.arg)->append((yyvsp[0].arg)); }
3820
-
#line 3821 "gecode/flatzinc/parser.tab.cpp"
3841
+
#line 3842 "gecode/flatzinc/parser.tab.cpp"
case 151: /* annotation_expr: ann_non_array_expr */
3824
-
#line 1979 "../gecode/flatzinc/parser.yxx"
3845
+
#line 1988 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[0].arg); }
3826
-
#line 3827 "gecode/flatzinc/parser.tab.cpp"
3847
+
#line 3848 "gecode/flatzinc/parser.tab.cpp"
case 152: /* annotation_expr: '[' ']' */
3830
-
#line 1981 "../gecode/flatzinc/parser.yxx"
3851
+
#line 1990 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::Array(); }
3832
-
#line 3833 "gecode/flatzinc/parser.tab.cpp"
3853
+
#line 3854 "gecode/flatzinc/parser.tab.cpp"
case 153: /* annotation_expr: '[' annotation_list annotation_list_tail ']' */
3836
-
#line 1983 "../gecode/flatzinc/parser.yxx"
3857
+
#line 1992 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[-2].arg); }
3838
-
#line 3839 "gecode/flatzinc/parser.tab.cpp"
3859
+
#line 3860 "gecode/flatzinc/parser.tab.cpp"
case 156: /* ann_non_array_expr: FZ_BOOL_LIT */
3842
-
#line 1989 "../gecode/flatzinc/parser.yxx"
3863
+
#line 1998 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::BoolLit((yyvsp[0].iValue)); }
3844
-
#line 3845 "gecode/flatzinc/parser.tab.cpp"
3865
+
#line 3866 "gecode/flatzinc/parser.tab.cpp"
case 157: /* ann_non_array_expr: FZ_INT_LIT */
3848
-
#line 1991 "../gecode/flatzinc/parser.yxx"
3869
+
#line 2000 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::IntLit((yyvsp[0].iValue)); }
3850
-
#line 3851 "gecode/flatzinc/parser.tab.cpp"
3871
+
#line 3872 "gecode/flatzinc/parser.tab.cpp"
case 158: /* ann_non_array_expr: FZ_FLOAT_LIT */
3854
-
#line 1993 "../gecode/flatzinc/parser.yxx"
3875
+
#line 2002 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = new AST::FloatLit((yyvsp[0].dValue)); }
3856
-
#line 3857 "gecode/flatzinc/parser.tab.cpp"
3877
+
#line 3878 "gecode/flatzinc/parser.tab.cpp"
case 159: /* ann_non_array_expr: set_literal */
3860
-
#line 1995 "../gecode/flatzinc/parser.yxx"
3881
+
#line 2004 "gecode/flatzinc/parser.yxx"
{ (yyval.arg) = (yyvsp[0].setLit); }
3862
-
#line 3863 "gecode/flatzinc/parser.tab.cpp"
3883
+
#line 3884 "gecode/flatzinc/parser.tab.cpp"
case 160: /* ann_non_array_expr: var_par_id */
3866
-
#line 1997 "../gecode/flatzinc/parser.yxx"
3887
+
#line 2006 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
(yyval.arg) = getVarRefArg(pp,(yyvsp[0].sValue),true);
3972
-
#line 3973 "gecode/flatzinc/parser.tab.cpp"
3993
+
#line 3994 "gecode/flatzinc/parser.tab.cpp"
case 161: /* ann_non_array_expr: var_par_id '[' ann_non_array_expr ']' */
3976
-
#line 2103 "../gecode/flatzinc/parser.yxx"
3997
+
#line 2112 "gecode/flatzinc/parser.yxx"
ParserState* pp = static_cast<ParserState*>(parm);
···
(yyval.arg) = new AST::IntLit(0); // keep things consistent
free((yyvsp[-3].sValue));
3987
-
#line 3988 "gecode/flatzinc/parser.tab.cpp"
4008
+
#line 4009 "gecode/flatzinc/parser.tab.cpp"
case 162: /* ann_non_array_expr: FZ_STRING_LIT */
3991
-
#line 2114 "../gecode/flatzinc/parser.yxx"
4012
+
#line 2123 "gecode/flatzinc/parser.yxx"
(yyval.arg) = new AST::String((yyvsp[0].sValue));
3996
-
#line 3997 "gecode/flatzinc/parser.tab.cpp"
4017
+
#line 4018 "gecode/flatzinc/parser.tab.cpp"
4000
-
#line 4001 "gecode/flatzinc/parser.tab.cpp"
4021
+
#line 4022 "gecode/flatzinc/parser.tab.cpp"