528 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 23, 24, 2, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 22,
531 2, 29, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 27, 2, 28, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 30, 2, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
541 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
647 -192, 29, 7, -192, -15, 24, 41, 20, -192, 66, -192, 69,
648 -192, -192, -192, 115, 87, 90, 116, 113, 152, -192, -192, -192,
649 153, 54, 49, 178, 12, 166, 179, 177, -192, 172, 9, -192,
650 -192, 180, 181, -192, 182, 183, 175, 87, 184, 185, 186, 187,
651 -192, -192, 190, 113, 189, -192, -192, 193, 113, -192, -192, 191,
652 156, -192, -192, 58, 192, -192, 49, 195, 198, 199, 47, -192,
653 194, -192, 14, 83, 83, 83, -192, 100, 188, 203, 196, -192,
654 200, -192, -192, 197, -192, -192, 22, -192, 91, 205, -192, 201,
655 -192, 122, 113, 124, -192, -192, -192, 207, -192, 154, 96, 113,
656 -192, 219, 209, 220, -192, 221, 141, -192, 213, 206, -192, 27,
657 -192, 214, 216, 222, 208, -192, -192, 113, 155, -192, 120, -192,
658 83, 218, 100, 223, -192, 157, -192, 144, -192, -192, 67, 77,
659 -192, 224, 225, -192, 145, -192, 211, 226, 227, 147, 141, -192,
660 -192, 229, -192, -192, 142, 212, 100, -192, -192, 87, 228, 87,
661 230, 231, 232, -192, 233, -192, -192, -192, 234, -192, -192, -192,
662 -192, -192, 237, 217, 238, 235, 239, 240, -192, -192, 245, -192,
663 246, -192, -192, -192, -192, -192, 32, 37, 70, 105, 241, 242,
664 243, 244, -192, 135, 91, 108, 126, -192, 159, -192, 161, 247,
665 -192, -192, 163, -192, -192, 165, -192, 91, -192, 249, 174, -192,
666 -192, -192, 248, -192, -192};
672 5, 0, 0, 1, 0, 0, 0, 73, 4, 0, 3, 0, 40, 48, 41, 0, 0, 0,
673 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 54,
674 17, 0, 0, 87, 0, 0, 0, 0, 0, 8, 0, 0, 44, 45, 0, 0, 0, 42,
675 49, 0, 0, 43, 87, 0, 0, 72, 2, 0, 0, 6, 0, 0, 0, 0, 0, 87,
676 0, 53, 0, 0, 0, 0, 99, 0, 16, 0, 0, 13, 0, 7, 9, 0, 46, 47,
677 28, 57, 0, 77, 79, 82, 78, 0, 0, 0, 76, 101, 100, 92, 93, 94, 0, 0,
678 86, 0, 0, 0, 10, 0, 0, 25, 63, 68, 67, 0, 19, 0, 0, 34, 38, 35,
679 85, 0, 0, 33, 0, 87, 0, 0, 0, 0, 98, 0, 89, 0, 15, 14, 0, 0,
680 27, 0, 0, 66, 0, 80, 0, 0, 0, 0, 0, 84, 81, 74, 75, 90, 0, 0,
681 0, 97, 91, 0, 0, 0, 0, 0, 0, 64, 0, 65, 83, 36, 0, 37, 32, 95,
682 96, 88, 0, 0, 0, 0, 0, 0, 69, 39, 0, 11, 0, 87, 87, 87, 12, 87,
683 0, 0, 0, 31, 0, 0, 0, 0, 26, 0, 0, 0, 0, 21, 0, 71, 0, 61,
684 60, 23, 0, 59, 30, 0, 20, 0, 24, 0, 0, 22, 29, 70, 0, 58, 62};
701 24, 70, 74, 108, 101, 102, 144, 8, 4, 29, -18, -18, -18, -18, -18,
702 90, 48, 213, 5, 49, -18, -18, -18, 11, 12, -18, 13, 14, -18, 3,
703 50, 79, 229, 15, 56, 16, 64, -18, 17, 79, 57, 18, 51, 92, 9,
704 32, 178, 33, 130, 79, 19, 114, 42, 12, 79, 13, 14, 139, 147, 38,
705 158, 202, 15, 10, 43, 80, 203, 17, 39, 148, 18, 12, 56, 13, 14,
706 157, 81, 153, 89, 19, 15, 12, 165, 13, 14, 17, 181, 79, 18, 26,
707 15, 12, 167, 13, 14, 17, 27, 19, 18, 204, 15, 93, 94, 95, 96,
708 17, 30, 19, 18, 116, 97, 117, 118, 98, 103, 104, 105, 19, 103, 104,
709 105, 119, 79, 106, 136, 28, 107, 106, 215, 216, 107, 32, 31, 33, 205,
710 166, 217, 198, 199, 200, 123, 201, 124, 125, 123, 56, 124, 125, 131, 132,
711 126, 156, 127, 32, 220, 33, 127, 212, 182, 123, 184, 124, 125, 211, 76,
712 77, 179, 162, 78, 56, 56, 127, 56, 79, 36, 164, 173, 134, 177, 37,
713 154, 135, 162, 155, 56, 163, 223, 222, 226, 224, 154, 227, 52, 228, 215,
714 216, 47, 53, 54, 55, 58, 59, 63, 68, 61, 62, 69, 140, 65, 71,
715 66, 72, 67, 109, 75, 86, 87, 88, 84, 110, 112, 121, 91, 133, 111,
716 113, 80, 141, 122, 145, 142, 143, 149, 146, 150, 152, 159, 191, 151, 174,
717 180, 161, 171, 172, 175, 176, 79, 168, 221, 169, 170, 231, 160, 0, 183,
718 193, 185, 186, 187, 194, 195, 188, 189, 190, 192, 196, 197, 230, 207, 208,
719 209, 210, 0, 0, 225, 0, 232, 0, 0, 0, 0, 85, 0, 0, 0,
720 0, 0, 0, 0, 0, 0, 0, 73};
723 7, 51, 58, 79, 76, 77, 114, 22, 1, 16, 3, 4, 5, 6, 7, 71,
724 4, 208, 11, 7, 13, 14, 15, 3, 4, 18, 6, 7, 21, 0, 18, 17,
725 223, 13, 25, 15, 43, 30, 18, 17, 31, 21, 30, 29, 20, 18, 154, 20,
726 98, 17, 30, 29, 3, 4, 17, 6, 7, 107, 31, 5, 132, 29, 13, 22,
727 15, 7, 29, 18, 14, 119, 21, 4, 25, 6, 7, 131, 18, 127, 31, 30,
728 13, 4, 15, 6, 7, 18, 162, 17, 21, 23, 13, 4, 15, 6, 7, 18,
729 27, 30, 21, 29, 13, 18, 19, 20, 21, 18, 16, 30, 21, 18, 27, 20,
730 21, 30, 18, 19, 20, 30, 18, 19, 20, 30, 17, 27, 28, 10, 30, 27,
731 20, 21, 30, 18, 16, 20, 29, 142, 28, 193, 194, 195, 18, 197, 20, 21,
732 18, 25, 20, 21, 24, 25, 28, 31, 30, 18, 28, 20, 30, 207, 165, 18,
733 167, 20, 21, 28, 8, 9, 24, 25, 12, 25, 25, 30, 25, 17, 22, 31,
734 31, 23, 31, 26, 25, 27, 25, 28, 25, 28, 25, 28, 25, 28, 25, 28,
735 26, 28, 20, 21, 18, 18, 21, 27, 20, 20, 27, 16, 22, 22, 16, 109,
736 24, 20, 25, 18, 26, 25, 23, 20, 18, 18, 26, 16, 20, 16, 28, 16,
737 28, 28, 7, 18, 27, 16, 10, 10, 18, 27, 18, 27, 18, 20, 16, 28,
738 28, 18, 18, 18, 18, 18, 17, 143, 210, 143, 143, 226, 134, -1, 26, 20,
739 26, 26, 26, 20, 20, 28, 28, 26, 26, 20, 20, 18, 27, 27, 27, 27,
740 -1, -1, 27, -1, 28, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1,
746 0, 33, 34, 0, 1, 11, 35, 40, 22, 20, 22, 3, 4, 6, 7, 13, 15, 18,
747 21, 30, 41, 46, 47, 48, 49, 56, 23, 27, 10, 49, 16, 16, 18, 20, 50, 51,
748 22, 26, 5, 14, 57, 63, 3, 15, 36, 37, 49, 18, 4, 7, 18, 30, 26, 18,
749 21, 27, 25, 31, 20, 20, 60, 22, 22, 27, 49, 24, 25, 26, 16, 16, 50, 20,
750 18, 51, 60, 23, 8, 9, 12, 17, 7, 18, 38, 39, 26, 36, 20, 18, 18, 31,
751 60, 28, 29, 18, 19, 20, 21, 27, 30, 58, 59, 59, 59, 18, 19, 20, 27, 30,
752 62, 25, 16, 28, 20, 28, 29, 42, 18, 20, 21, 30, 54, 16, 27, 18, 20, 21,
753 28, 30, 44, 45, 50, 24, 25, 16, 23, 27, 28, 61, 62, 50, 39, 18, 10, 10,
754 45, 16, 27, 31, 50, 18, 18, 16, 27, 50, 25, 28, 31, 60, 59, 18, 61, 18,
755 25, 28, 31, 15, 49, 15, 46, 47, 48, 18, 18, 31, 28, 18, 18, 31, 45, 24,
756 28, 62, 49, 26, 49, 26, 26, 26, 28, 28, 26, 20, 26, 20, 20, 20, 20, 20,
757 60, 60, 60, 60, 29, 29, 29, 29, 43, 27, 27, 27, 27, 28, 50, 54, 55, 20,
758 21, 28, 52, 53, 28, 44, 28, 25, 28, 27, 25, 28, 28, 54, 18, 53, 28};
762 0, 32, 33, 34, 34, 34, 35, 36, 36, 37, 37, 37, 37, 38, 38, 39, 39,
763 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 43, 43, 43, 44, 44,
764 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 49,
765 49, 49, 50, 50, 51, 51, 51, 52, 52, 53, 53, 53, 54, 54, 54, 54, 54,
766 54, 54, 55, 55, 56, 56, 57, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59,
767 59, 60, 60, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63};
772 0, 2, 5, 3, 3, 0, 5, 3, 1, 3, 4, 8, 9, 1, 3, 3, 1, 3, 0, 6, 15,
773 14, 15, 14, 15, 6, 13, 2, 0, 4, 3, 0, 3, 1, 1, 1, 3, 3, 1, 4, 1, 1,
774 3, 3, 3, 3, 5, 5, 1, 3, 1, 1, 1, 3, 1, 1, 1, 4, 3, 1, 1, 1, 4,
775 1, 3, 3, 2, 1, 1, 4, 3, 1, 3, 0, 6, 3, 1, 1, 1, 1, 3, 3, 1, 4,
776 3, 2, 3, 0, 3, 1, 3, 3, 1, 1, 1, 4, 4, 3, 2, 3, 4, 4};
1216 int yyerrstatus = 0;
1245 char* yymsg = yymsgbuf;
1248#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1254 YYDPRINTF((stderr,
"Starting parse\n"));
1272 YYDPRINTF((stderr,
"Entering state %d\n", yystate));
1279 if (yyss + yystacksize - 1 <= yyssp)
1280#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1287#if defined yyoverflow
1299 yyoverflow(
YY_(
"memory exhausted"), &yyss1, yysize *
YYSIZEOF(*yyssp),
1300 &yyvs1, yysize *
YYSIZEOF(*yyvsp), &yystacksize);
1318#undef YYSTACK_RELOCATE
1323 yyssp = yyss + yysize - 1;
1324 yyvsp = yyvs + yysize - 1;
1328 (stderr,
"Stack size increased to %ld\n",
YY_CAST(
long, yystacksize)));
1331 if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
1354 YYDPRINTF((stderr,
"Reading a token\n"));
1361 YYDPRINTF((stderr,
"Now at end of input.\n"));
1378 if (yyn < 0 ||
YYLAST < yyn ||
yycheck[yyn] != yytoken)
goto yydefault;
1388 if (yyerrstatus) yyerrstatus--;
1406 if (yyn == 0)
goto yyerrlab;
1424 yyval = yyvsp[1 - yylen];
1429#line 129 "ortools/flatzinc/parser.yy"
1433#line 1595 "parser.tab.cc"
1438#line 164 "ortools/flatzinc/parser.yy"
1443 const std::string& identifier = (yyvsp[-3].
string_value);
1445 std::vector<Annotation>*
const annotations = (yyvsp[-2].
annotations);
1449 context->
domain_map[identifier] = assignment;
1451 const int64_t value = assignment.
values.front();
1457#line 1619 "parser.tab.cc"
1463#line 184 "ortools/flatzinc/parser.yy"
1465 std::vector<Annotation>*
const annotations = (yyvsp[-4].
annotations);
1467 CHECK_EQ((yyvsp[-12].integer_value), 1)
1468 <<
"Only [1..n] array are supported here.";
1470 const std::string& identifier = (yyvsp[-5].
string_value);
1471 const std::vector<int64_t>*
const assignments = (yyvsp[-1].
integers);
1472 CHECK(assignments !=
nullptr);
1473 CHECK_EQ(num_constants, assignments->size());
1479#line 1638 "parser.tab.cc"
1484#line 199 "ortools/flatzinc/parser.yy"
1486 std::vector<Annotation>*
const annotations = (yyvsp[-3].
annotations);
1488 CHECK_EQ((yyvsp[-11].integer_value), 1)
1489 <<
"Only [1..n] array are supported here.";
1491 CHECK_EQ(num_constants, 0) <<
"Empty arrays should have a size of 0";
1492 const std::string& identifier = (yyvsp[-4].
string_value);
1496#line 1653 "parser.tab.cc"
1502#line 210 "ortools/flatzinc/parser.yy"
1504 std::vector<Annotation>*
const annotations = (yyvsp[-4].
annotations);
1506 CHECK_EQ((yyvsp[-12].integer_value), 1)
1507 <<
"Only [1..n] array are supported here.";
1509 const std::string& identifier = (yyvsp[-5].
string_value);
1510 const std::vector<double>*
const assignments = (yyvsp[-1].
doubles);
1511 CHECK(assignments !=
nullptr);
1512 CHECK_EQ(num_constants, assignments->size());
1518#line 1672 "parser.tab.cc"
1523#line 225 "ortools/flatzinc/parser.yy"
1525 std::vector<Annotation>*
const annotations = (yyvsp[-3].
annotations);
1527 CHECK_EQ((yyvsp[-11].integer_value), 1)
1528 <<
"Only [1..n] array are supported here.";
1530 CHECK_EQ(num_constants, 0) <<
"Empty arrays should have a size of 0";
1531 const std::string& identifier = (yyvsp[-4].
string_value);
1535#line 1687 "parser.tab.cc"
1541#line 236 "ortools/flatzinc/parser.yy"
1544 CHECK_EQ((yyvsp[-12].integer_value), 1)
1545 <<
"Only [1..n] array are supported here.";
1548 const std::string& identifier = (yyvsp[-5].
string_value);
1549 const std::vector<Domain>*
const assignments = (yyvsp[-1].
domains);
1550 const std::vector<Annotation>*
const annotations =
1552 CHECK(assignments !=
nullptr);
1553 CHECK_EQ(num_domains, assignments->size());
1558#line 1706 "parser.tab.cc"
1563#line 250 "ortools/flatzinc/parser.yy"
1570 const std::string& identifier = (yyvsp[-2].
string_value);
1571 std::vector<Annotation>*
const annotations = (yyvsp[-1].
annotations);
1573 const bool introduced = ContainsId(annotations,
"var_is_introduced") ||
1574 absl::StartsWith(identifier,
"X_INTRODUCED");
1577 var = model->
AddVariable(identifier, domain, introduced);
1579 }
else if (assignment.
variable ==
nullptr) {
1601 var->
Merge(identifier, domain, introduced);
1607 if (ContainsId(annotations,
"output_var")) {
1613#line 1761 "parser.tab.cc"
1619#line 301 "ortools/flatzinc/parser.yy"
1624 CHECK_EQ((yyvsp[-10].integer_value), 1);
1627 const std::string& identifier = (yyvsp[-2].
string_value);
1628 std::vector<Annotation>*
const annotations = (yyvsp[-1].
annotations);
1629 std::vector<VarRefOrValue>*
const assignments =
1631 CHECK(assignments ==
nullptr || assignments->size() == num_vars);
1632 const bool introduced = ContainsId(annotations,
"var_is_introduced") ||
1633 absl::StartsWith(identifier,
"X_INTRODUCED");
1635 std::vector<Variable*> vars(num_vars,
nullptr);
1637 for (
int i = 0; i < num_vars; ++i) {
1638 const std::string var_name =
1639 absl::StrFormat(
"%s[%d]", identifier, i + 1);
1640 if (assignments ==
nullptr) {
1641 vars[i] = model->
AddVariable(var_name, domain, introduced);
1642 }
else if ((*assignments)[i].variable ==
nullptr) {
1643 if ((*assignments)[i].is_float) {
1645 const double value = (*assignments)[i].float_value;
1648 }
else if ((*assignments)[i].is_domain) {
1655 vars[i] = model->
AddVariable(var_name, (*assignments)[i].domain,
1659 const int64_t value = (*assignments)[i].value;
1665 Variable*
const var = (*assignments)[i].variable;
1666 CHECK(var !=
nullptr);
1668 vars[i]->Merge(var_name, domain, introduced);
1679 if (annotations !=
nullptr) {
1680 for (
int i = 0; i < annotations->size(); ++i) {
1688 std::vector<SolutionOutputSpecs::Bounds> bounds;
1689 for (
int a = 0; a < list.
annotations.size(); ++a) {
1693 bound.interval_min, bound.interval_max));
1703#line 1848 "parser.tab.cc"
1707#line 385 "ortools/flatzinc/parser.yy"
1711#line 1854 "parser.tab.cc"
1715#line 386 "ortools/flatzinc/parser.yy"
1719#line 1860 "parser.tab.cc"
1723#line 389 "ortools/flatzinc/parser.yy"
1727#line 1866 "parser.tab.cc"
1731#line 390 "ortools/flatzinc/parser.yy"
1735#line 1872 "parser.tab.cc"
1739#line 391 "ortools/flatzinc/parser.yy"
1743#line 1878 "parser.tab.cc"
1747#line 394 "ortools/flatzinc/parser.yy"
1752#line 1887 "parser.tab.cc"
1756#line 398 "ortools/flatzinc/parser.yy"
1761#line 1896 "parser.tab.cc"
1765#line 404 "ortools/flatzinc/parser.yy"
1769#line 1902 "parser.tab.cc"
1773#line 405 "ortools/flatzinc/parser.yy"
1777#line 1908 "parser.tab.cc"
1781#line 406 "ortools/flatzinc/parser.yy"
1784 (yyvsp[-2].integer_value), (yyvsp[0].integer_value)));
1786#line 1916 "parser.tab.cc"
1790#line 409 "ortools/flatzinc/parser.yy"
1792 CHECK((yyvsp[-1].integers) !=
nullptr);
1797#line 1926 "parser.tab.cc"
1801#line 414 "ortools/flatzinc/parser.yy"
1808 }
else if (context->
float_map.contains(
id)) {
1815 LOG(ERROR) <<
"Unknown symbol " << id;
1820#line 1946 "parser.tab.cc"
1824#line 429 "ortools/flatzinc/parser.yy"
1839 LOG(ERROR) <<
"Unknown symbol " << id;
1844#line 1970 "parser.tab.cc"
1848#line 450 "ortools/flatzinc/parser.yy"
1852#line 1976 "parser.tab.cc"
1856#line 451 "ortools/flatzinc/parser.yy"
1860#line 1982 "parser.tab.cc"
1864#line 452 "ortools/flatzinc/parser.yy"
1869#line 1988 "parser.tab.cc"
1873#line 453 "ortools/flatzinc/parser.yy"
1875 CHECK((yyvsp[-1].integers) !=
nullptr);
1879#line 1998 "parser.tab.cc"
1883#line 460 "ortools/flatzinc/parser.yy"
1887#line 2004 "parser.tab.cc"
1891#line 461 "ortools/flatzinc/parser.yy"
1895#line 2010 "parser.tab.cc"
1899#line 462 "ortools/flatzinc/parser.yy"
1902 (yyvsp[0].integer_value));
1904#line 2016 "parser.tab.cc"
1908#line 463 "ortools/flatzinc/parser.yy"
1910 CHECK((yyvsp[-1].integers) !=
nullptr);
1915#line 2026 "parser.tab.cc"
1919#line 470 "ortools/flatzinc/parser.yy"
1923#line 2032 "parser.tab.cc"
1927#line 471 "ortools/flatzinc/parser.yy"
1930 (yyvsp[0].double_value));
1932#line 2040 "parser.tab.cc"
1936#line 476 "ortools/flatzinc/parser.yy"
1938 (yyval.
domain) = (yyvsp[0].domain);
1940#line 2046 "parser.tab.cc"
1944#line 477 "ortools/flatzinc/parser.yy"
1946 (yyval.
domain) = (yyvsp[0].domain);
1948#line 2052 "parser.tab.cc"
1952#line 478 "ortools/flatzinc/parser.yy"
1954 (yyval.
domain) = (yyvsp[0].domain);
1956#line 2058 "parser.tab.cc"
1960#line 481 "ortools/flatzinc/parser.yy"
1962 (yyval.
integers) = (yyvsp[-2].integers);
1963 (yyval.
integers)->emplace_back((yyvsp[0].integer_value));
1965#line 2064 "parser.tab.cc"
1969#line 482 "ortools/flatzinc/parser.yy"
1971 (yyval.
integers) =
new std::vector<int64_t>();
1972 (yyval.
integers)->emplace_back((yyvsp[0].integer_value));
1974#line 2070 "parser.tab.cc"
1978#line 485 "ortools/flatzinc/parser.yy"
1982#line 2076 "parser.tab.cc"
1986#line 486 "ortools/flatzinc/parser.yy"
1990#line 2082 "parser.tab.cc"
1994#line 487 "ortools/flatzinc/parser.yy"
2000#line 2090 "parser.tab.cc"
2004#line 492 "ortools/flatzinc/parser.yy"
2006 (yyval.
doubles) = (yyvsp[-2].doubles);
2007 (yyval.
doubles)->emplace_back((yyvsp[0].double_value));
2009#line 2096 "parser.tab.cc"
2013#line 493 "ortools/flatzinc/parser.yy"
2015 (yyval.
doubles) =
new std::vector<double>();
2016 (yyval.
doubles)->emplace_back((yyvsp[0].double_value));
2018#line 2102 "parser.tab.cc"
2022#line 496 "ortools/flatzinc/parser.yy"
2026#line 2108 "parser.tab.cc"
2030#line 497 "ortools/flatzinc/parser.yy"
2034#line 2114 "parser.tab.cc"
2038#line 498 "ortools/flatzinc/parser.yy"
2044#line 2122 "parser.tab.cc"
2048#line 503 "ortools/flatzinc/parser.yy"
2052#line 2128 "parser.tab.cc"
2056#line 504 "ortools/flatzinc/parser.yy"
2061#line 2134 "parser.tab.cc"
2065#line 505 "ortools/flatzinc/parser.yy"
2067 CHECK((yyvsp[-1].integers) !=
nullptr);
2071#line 2144 "parser.tab.cc"
2075#line 510 "ortools/flatzinc/parser.yy"
2079#line 2150 "parser.tab.cc"
2083#line 511 "ortools/flatzinc/parser.yy"
2087#line 2158 "parser.tab.cc"
2091#line 514 "ortools/flatzinc/parser.yy"
2096#line 2164 "parser.tab.cc"
2100#line 515 "ortools/flatzinc/parser.yy"
2106#line 2173 "parser.tab.cc"
2110#line 521 "ortools/flatzinc/parser.yy"
2112 (yyval.
domains) = (yyvsp[-2].domains);
2113 (yyval.
domains)->emplace_back((yyvsp[0].domain));
2115#line 2182 "parser.tab.cc"
2119#line 525 "ortools/flatzinc/parser.yy"
2121 (yyval.
domains) =
new std::vector<Domain>();
2122 (yyval.
domains)->emplace_back((yyvsp[0].domain));
2124#line 2188 "parser.tab.cc"
2129#line 535 "ortools/flatzinc/parser.yy"
2131 const std::string& identifier = (yyvsp[-4].
string_value);
2132 CHECK((yyvsp[-2].args) !=
nullptr) <<
"Missing argument in constraint";
2133 const std::vector<Argument>& arguments = *(yyvsp[-2].
args);
2134 std::vector<Annotation>*
const annotations = (yyvsp[0].
annotations);
2137 ContainsId(annotations,
"domain"),
2138 ContainsId(annotations,
"symmetry_breaking"),
2139 ContainsId(annotations,
"redundant"));
2141 delete (yyvsp[-2].
args);
2143#line 2205 "parser.tab.cc"
2147#line 549 "ortools/flatzinc/parser.yy"
2149 (yyval.
args) = (yyvsp[-2].args);
2150 (yyval.
args)->emplace_back((yyvsp[0].arg));
2152#line 2211 "parser.tab.cc"
2156#line 550 "ortools/flatzinc/parser.yy"
2158 (yyval.
args) =
new std::vector<Argument>();
2159 (yyval.
args)->emplace_back((yyvsp[0].arg));
2161#line 2217 "parser.tab.cc"
2165#line 553 "ortools/flatzinc/parser.yy"
2169#line 2223 "parser.tab.cc"
2173#line 554 "ortools/flatzinc/parser.yy"
2177#line 2229 "parser.tab.cc"
2181#line 555 "ortools/flatzinc/parser.yy"
2185#line 2235 "parser.tab.cc"
2189#line 556 "ortools/flatzinc/parser.yy"
2192 (yyvsp[0].integer_value));
2194#line 2241 "parser.tab.cc"
2198#line 557 "ortools/flatzinc/parser.yy"
2200 CHECK((yyvsp[-1].integers) !=
nullptr);
2204#line 2251 "parser.tab.cc"
2208#line 562 "ortools/flatzinc/parser.yy"
2215 }
else if (context->
float_map.contains(
id)) {
2216 const double d = context->
float_map.at(
id);
2225 }
else if (context->
domain_map.contains(
id)) {
2230 <<
"Unknown identifier: " << id;
2235#line 2282 "parser.tab.cc"
2239#line 588 "ortools/flatzinc/parser.yy"
2251 <<
"Unknown identifier: " << id;
2256#line 2304 "parser.tab.cc"
2260#line 605 "ortools/flatzinc/parser.yy"
2262 std::vector<VarRefOrValue>*
const arguments =
2264 CHECK(arguments !=
nullptr);
2265 bool has_variables =
false;
2266 bool has_floats =
false;
2267 for (
int i = 0; i < arguments->size(); ++i) {
2268 if ((*arguments)[i].variable !=
nullptr) {
2269 has_variables =
true;
2271 if ((*arguments)[i].is_float) {
2275 if (has_variables) {
2276 std::vector<Variable*> vars;
2277 vars.reserve(arguments->size());
2278 for (
int i = 0; i < arguments->size(); ++i) {
2289 }
else if (has_floats) {
2290 std::vector<double> values;
2291 values.reserve(arguments->size());
2293 if (data.is_float) {
2294 values.push_back(data.float_value);
2296 values.push_back(data.value);
2301 std::vector<int64_t> values;
2302 values.reserve(arguments->size());
2304 values.push_back(data.value);
2310#line 2357 "parser.tab.cc"
2314#line 653 "ortools/flatzinc/parser.yy"
2318#line 2365 "parser.tab.cc"
2322#line 662 "ortools/flatzinc/parser.yy"
2324 (yyval.
annotations) = (yyvsp[-2].annotations) !=
nullptr
2326 :
new std::vector<Annotation>();
2327 (yyval.
annotations)->emplace_back((yyvsp[0].annotation));
2329#line 2374 "parser.tab.cc"
2333#line 666 "ortools/flatzinc/parser.yy"
2337#line 2380 "parser.tab.cc"
2341#line 669 "ortools/flatzinc/parser.yy"
2344 (yyval.
annotations)->emplace_back((yyvsp[0].annotation));
2346#line 2386 "parser.tab.cc"
2350#line 670 "ortools/flatzinc/parser.yy"
2352 (yyval.
annotations) =
new std::vector<Annotation>();
2353 (yyval.
annotations)->emplace_back((yyvsp[0].annotation));
2355#line 2392 "parser.tab.cc"
2359#line 673 "ortools/flatzinc/parser.yy"
2362 (yyvsp[0].integer_value));
2364#line 2398 "parser.tab.cc"
2368#line 674 "ortools/flatzinc/parser.yy"
2370 CHECK((yyvsp[-1].integers) !=
nullptr);
2375#line 2408 "parser.tab.cc"
2379#line 679 "ortools/flatzinc/parser.yy"
2383#line 2414 "parser.tab.cc"
2387#line 680 "ortools/flatzinc/parser.yy"
2391#line 2420 "parser.tab.cc"
2395#line 681 "ortools/flatzinc/parser.yy"
2413#line 2439 "parser.tab.cc"
2417#line 695 "ortools/flatzinc/parser.yy"
2419 std::vector<Annotation>*
const annotations = (yyvsp[-1].
annotations);
2420 if (annotations !=
nullptr) {
2422 (yyvsp[-3].string_value), std::move(*annotations));
2428#line 2453 "parser.tab.cc"
2432#line 704 "ortools/flatzinc/parser.yy"
2440#line 2464 "parser.tab.cc"
2444#line 710 "ortools/flatzinc/parser.yy"
2446 std::vector<Annotation>*
const annotations = (yyvsp[-1].
annotations);
2447 if (annotations !=
nullptr && !annotations->empty()) {
2448 bool all_integers =
true;
2449 bool all_vars =
true;
2455 std::vector<int64_t> values;
2457 values.push_back(ann.interval_min);
2460 }
else if (all_vars) {
2461 std::vector<Variable*> vars;
2463 vars.push_back(ann.variables[0]);
2475#line 2498 "parser.tab.cc"
2479#line 739 "ortools/flatzinc/parser.yy"
2483#line 2506 "parser.tab.cc"
2487#line 748 "ortools/flatzinc/parser.yy"
2489 if ((yyvsp[-1].annotations) !=
nullptr) {
2490 model->
Satisfy(std::move(*(yyvsp[-1].annotations)));
2493 model->
Satisfy(std::vector<Annotation>());
2496#line 2519 "parser.tab.cc"
2500#line 756 "ortools/flatzinc/parser.yy"
2503 ? (yyvsp[0].arg).Var()
2505 if ((yyvsp[-2].annotations) !=
nullptr) {
2506 model->
Minimize(obj_var, std::move(*(yyvsp[-2].annotations)));
2509 model->
Minimize(obj_var, std::vector<Annotation>());
2512#line 2535 "parser.tab.cc"
2516#line 767 "ortools/flatzinc/parser.yy"
2519 ? (yyvsp[0].arg).Var()
2521 if ((yyvsp[-2].annotations) !=
nullptr) {
2522 model->
Maximize(obj_var, std::move(*(yyvsp[-2].annotations)));
2525 model->
Maximize(obj_var, std::vector<Annotation>());
2528#line 2551 "parser.tab.cc"
2531#line 2555 "parser.tab.cc"
2560 const int yyi =
yypgoto[yylhs] + *yyssp;
2561 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
2580 char const* yymsgp =
YY_(
"syntax error");
2581 int yysyntax_error_status;
2582 yysyntax_error_status =
yysyntax_error(&yymsg_alloc, &yymsg, &yyctx);
2583 if (yysyntax_error_status == 0)
2585 else if (yysyntax_error_status == -1) {
2589 yysyntax_error_status =
yysyntax_error(&yymsg_alloc, &yymsg, &yyctx);
2593 yymsg_alloc =
sizeof yymsgbuf;
2597 yyerror(context, model, ok, scanner, yymsgp);
2602 if (yyerrstatus == 3) {
2658 model, ok, scanner);
2692 yyerror(context, model, ok, scanner,
YY_(
"memory exhausted"));
2705 model, ok, scanner);
2711 while (yyssp != yyss) {
2713 model, ok, scanner);