Google OR-Tools: ortools/flatzinc/parser.tab.cc Source File

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49#define YYBISON 30802

50

51

52#define YYBISON_VERSION "3.8.2"

53

54

55#define YYSKELETON_NAME "yacc.c"

56

57

58#define YYPURE 2

59

60

61#define YYPUSH 0

62

63

64#define YYPULL 1

65

66

67#define YYSTYPE ORFZ_STYPE

68

69#define yyparse orfz_parse

70#define yylex orfz_lex

71#define yyerror orfz_error

72#define yydebug orfz_debug

73#define yynerrs orfz_nerrs

74

75#ifndef YY_CAST

76#ifdef __cplusplus

77#define YY_CAST(Type, Val) static_cast<Type>(Val)

78#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val)

79#else

80#define YY_CAST(Type, Val) ((Type)(Val))

81#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val))

82#endif

83#endif

84#ifndef YY_NULLPTR

85#if defined __cplusplus

86#if 201103L <= __cplusplus

87#define YY_NULLPTR nullptr

88#else

89#define YY_NULLPTR 0

90#endif

91#else

92#define YY_NULLPTR ((void*)0)

93#endif

94#endif

95

97

168

169

170#line 49 "ortools/flatzinc/parser.yy"

171

172#include <cstdint>

173

174#include "absl/log/check.h"

175#include "absl/strings/match.h"

176#include "absl/strings/str_format.h"

178

190

191#line 194 "parser.tab.cc"

192

193#ifdef short

194#undef short

195#endif

196

197

198

199

200

201#ifndef __PTRDIFF_MAX__

202#include <limits.h>

203#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__

204#include <stdint.h>

205#define YY_STDINT_H

206#endif

207#endif

208

209

210

211

212

213

214#ifdef __INT_LEAST8_MAX__

216#elif defined YY_STDINT_H

218#else

220#endif

221

222#ifdef __INT_LEAST16_MAX__

224#elif defined YY_STDINT_H

226#else

228#endif

229

230

231

232

233

234

235#ifdef __hpux

236#undef UINT_LEAST8_MAX

237#undef UINT_LEAST16_MAX

238#define UINT_LEAST8_MAX 255

239#define UINT_LEAST16_MAX 65535

240#endif

241

242#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__

244#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && \

245 UINT_LEAST8_MAX <= INT_MAX)

247#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX

249#else

251#endif

252

253#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__

255#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && \

256 UINT_LEAST16_MAX <= INT_MAX)

258#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX

260#else

262#endif

263

264#ifndef YYPTRDIFF_T

265#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__

266#define YYPTRDIFF_T __PTRDIFF_TYPE__

267#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__

268#elif defined PTRDIFF_MAX

269#ifndef ptrdiff_t

270#include <stddef.h>

271#endif

272#define YYPTRDIFF_T ptrdiff_t

273#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX

274#else

275#define YYPTRDIFF_T long

276#define YYPTRDIFF_MAXIMUM LONG_MAX

277#endif

278#endif

279

280#ifndef YYSIZE_T

281#ifdef __SIZE_TYPE__

282#define YYSIZE_T __SIZE_TYPE__

283#elif defined size_t

284#define YYSIZE_T size_t

285#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__

286#include <stddef.h>

287#define YYSIZE_T size_t

288#else

289#define YYSIZE_T unsigned

290#endif

291#endif

292

293#define YYSIZE_MAXIMUM \

294 YY_CAST(YYPTRDIFF_T, \

295 (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM \

296 : YY_CAST(YYSIZE_T, -1)))

297

298#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X))

299

300

302

303

305

306#ifndef YY_

307#if defined YYENABLE_NLS && YYENABLE_NLS

308#if ENABLE_NLS

309#include <libintl.h>

310#define YY_(Msgid) dgettext("bison-runtime", Msgid)

311#endif

312#endif

313#ifndef YY_

314#define YY_(Msgid) Msgid

315#endif

316#endif

317

318#ifndef YY_ATTRIBUTE_PURE

319#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)

320#define YY_ATTRIBUTE_PURE __attribute__((__pure__))

321#else

322#define YY_ATTRIBUTE_PURE

323#endif

324#endif

325

326#ifndef YY_ATTRIBUTE_UNUSED

327#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)

328#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__))

329#else

330#define YY_ATTRIBUTE_UNUSED

331#endif

332#endif

333

334

335#if !defined lint || defined __GNUC__

336#define YY_USE(E) ((void)(E))

337#else

338#define YY_USE(E)

339#endif

340

341

342#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__

343#if __GNUC__ * 100 + __GNUC_MINOR__ < 407

344#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \

345 _Pragma("GCC diagnostic push") \

346 _Pragma("GCC diagnostic ignored \"-Wuninitialized\"")

347#else

348#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \

349 _Pragma("GCC diagnostic push") \

350 _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \

351 _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")

352#endif

353#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")

354#else

355#define YY_INITIAL_VALUE(Value) Value

356#endif

357#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

358#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

359#define YY_IGNORE_MAYBE_UNINITIALIZED_END

360#endif

361#ifndef YY_INITIAL_VALUE

362#define YY_INITIAL_VALUE(Value)

363#endif

364

365#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__

366#define YY_IGNORE_USELESS_CAST_BEGIN \

367 _Pragma("GCC diagnostic push") \

368 _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"")

369#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop")

370#endif

371#ifndef YY_IGNORE_USELESS_CAST_BEGIN

372#define YY_IGNORE_USELESS_CAST_BEGIN

373#define YY_IGNORE_USELESS_CAST_END

374#endif

375

376#define YY_ASSERT(E) ((void)(0 && (E)))

377

378#if 1

379

380

381

382#ifdef YYSTACK_USE_ALLOCA

383#if YYSTACK_USE_ALLOCA

384#ifdef __GNUC__

385#define YYSTACK_ALLOC __builtin_alloca

386#elif defined __BUILTIN_VA_ARG_INCR

387#include <alloca.h>

388#elif defined _AIX

389#define YYSTACK_ALLOC __alloca

390#elif defined _MSC_VER

391#include <malloc.h>

392#define alloca _alloca

393#else

394#define YYSTACK_ALLOC alloca

395#if !defined _ALLOCA_H && !defined EXIT_SUCCESS

396#include <stdlib.h>

397

398#ifndef EXIT_SUCCESS

399#define EXIT_SUCCESS 0

400#endif

401#endif

402#endif

403#endif

404#endif

405

406#ifdef YYSTACK_ALLOC

407

408#define YYSTACK_FREE(Ptr) \

409 do { \

410 ; \

411 } while (0)

412#ifndef YYSTACK_ALLOC_MAXIMUM

413

414

415

416

417#define YYSTACK_ALLOC_MAXIMUM 4032

418#endif

419#else

420#define YYSTACK_ALLOC YYMALLOC

421#define YYSTACK_FREE YYFREE

422#ifndef YYSTACK_ALLOC_MAXIMUM

423#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM

424#endif

425#if (defined __cplusplus && !defined EXIT_SUCCESS && \

426 !((defined YYMALLOC || defined malloc) && \

427 (defined YYFREE || defined free)))

428#include <stdlib.h>

429#ifndef EXIT_SUCCESS

430#define EXIT_SUCCESS 0

431#endif

432#endif

433#ifndef YYMALLOC

434#define YYMALLOC malloc

435#if !defined malloc && !defined EXIT_SUCCESS

437#endif

438#endif

439#ifndef YYFREE

440#define YYFREE free

441#if !defined free && !defined EXIT_SUCCESS

442void free(void*);

443#endif

444#endif

445#endif

446#endif

447

448#if (!defined yyoverflow && \

449 (!defined __cplusplus || \

450 (defined ORFZ_STYPE_IS_TRIVIAL && ORFZ_STYPE_IS_TRIVIAL)))

451

452

457

458

459#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1)

460

461

462

463#define YYSTACK_BYTES(N) \

464 ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE)) + YYSTACK_GAP_MAXIMUM)

465

466#define YYCOPY_NEEDED 1

467

468

469

470

471

472

473#define YYSTACK_RELOCATE(Stack_alloc, Stack) \

474 do { \

475 YYPTRDIFF_T yynewbytes; \

476 YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \

477 Stack = &yyptr->Stack_alloc; \

478 yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \

479 yyptr += yynewbytes / YYSIZEOF(*yyptr); \

480 } while (0)

481

482#endif

483

484#if defined YYCOPY_NEEDED && YYCOPY_NEEDED

485

486

487#ifndef YYCOPY

488#if defined __GNUC__ && 1 < __GNUC__

489#define YYCOPY(Dst, Src, Count) \

490 __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src)))

491#else

492#define YYCOPY(Dst, Src, Count) \

493 do { \

494 YYPTRDIFF_T yyi; \

495 for (yyi = 0; yyi < (Count); yyi++) (Dst)[yyi] = (Src)[yyi]; \

496 } while (0)

497#endif

498#endif

499#endif

500

501

502#define YYFINAL 3

503

504#define YYLAST 292

505

506

507#define YYNTOKENS 32

508

509#define YYNNTS 32

510

511#define YYNRULES 101

512

513#define YYNSTATES 233

514

515

516#define YYMAXUTOK 276

517

518

519

520#define YYTRANSLATE(YYX) \

521 (0 <= (YYX) && (YYX) <= YYMAXUTOK \

522 ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) \

523 : YYSYMBOL_YYUNDEF)

524

525

526

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};

542

543#if ORFZ_DEBUG

544

546 0, 118, 118, 125, 129, 130, 135, 138, 139, 142, 143, 144, 145, 148, 149,

547 152, 153, 160, 161, 164, 183, 198, 209, 224, 235, 250, 300, 385, 386, 389,

548 390, 391, 394, 398, 404, 405, 406, 409, 414, 429, 450, 451, 452, 453, 460,

549 461, 462, 463, 470, 471, 476, 477, 478, 481, 482, 485, 486, 487, 492, 493,

550 496, 497, 498, 503, 504, 505, 510, 511, 514, 515, 521, 525, 531, 532, 535,

551 549, 550, 553, 554, 555, 556, 557, 562, 588, 605, 653, 662, 666, 669, 670,

552 673, 674, 679, 680, 681, 695, 704, 710, 739, 748, 756, 767};

553#endif

554

556#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State])

557

558#if 1

559

560

562

563

564

565static const char* const yytname[] = {"\"end of file\"",

566 "error",

567 "\"invalid token\"",

568 "ARRAY",

569 "TOKEN_BOOL",

570 "CONSTRAINT",

571 "TOKEN_FLOAT",

572 "TOKEN_INT",

573 "MAXIMIZE",

574 "MINIMIZE",

575 "OF",

576 "PREDICATE",

577 "SATISFY",

578 "SET",

579 "SOLVE",

580 "VAR",

581 "DOTDOT",

582 "COLONCOLON",

583 "IVALUE",

584 "SVALUE",

585 "IDENTIFIER",

586 "DVALUE",

587 "';'",

588 "'('",

589 "')'",

590 "','",

591 "':'",

592 "'['",

593 "']'",

594 "'='",

595 "'{'",

596 "'}'",

597 "$accept",

598 "model",

599 "predicates",

600 "predicate",

601 "predicate_arguments",

602 "predicate_argument",

603 "predicate_array_argument",

604 "predicate_ints",

605 "variable_or_constant_declarations",

606 "variable_or_constant_declaration",

607 "optional_var_or_value",

608 "optional_var_or_value_array",

609 "var_or_value_array",

610 "var_or_value",

611 "int_domain",

612 "set_domain",

613 "float_domain",

614 "domain",

615 "integers",

616 "integer",

617 "floats",

618 "float",

619 "const_literal",

620 "const_literals",

621 "constraints",

622 "constraint",

623 "arguments",

624 "argument",

625 "annotations",

626 "annotation_arguments",

627 "annotation",

628 "solve",

630

634#endif

635

636#define YYPACT_NINF (-192)

637

638#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF)

639

640#define YYTABLE_NINF (-19)

641

642#define yytable_value_is_error(Yyn) 0

643

644

645

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};

667

668

669

670

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};

685

686

688 -192, -192, -192, -192, 215, -192, -192, 98, -192, -192, -192,

689 -192, 38, -108, 104, 106, 107, -7, -50, 236, -192, 25,

690 -191, -192, -192, -192, -192, -72, -56, 118, -76, -192};

691

692

694 0, 1, 2, 6, 44, 45, 82, 83, 7, 20, 115, 206, 128, 129, 21, 22,

695 23, 46, 34, 35, 218, 219, 120, 214, 25, 40, 99, 100, 60, 137, 138, 41};

696

697

698

699

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};

721

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,

741 -1, -1, -1, -1, 56};

742

743

744

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};

759

760

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};

768

769

770

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};

777

779

780#define yyerrok (yyerrstatus = 0)

781#define yyclearin (yychar = ORFZ_EMPTY)

782

783#define YYACCEPT goto yyacceptlab

784#define YYABORT goto yyabortlab

785#define YYERROR goto yyerrorlab

786#define YYNOMEM goto yyexhaustedlab

787

788#define YYRECOVERING() (!!yyerrstatus)

789

790#define YYBACKUP(Token, Value) \

791 do \

792 if (yychar == ORFZ_EMPTY) { \

793 yychar = (Token); \

794 yylval = (Value); \

795 YYPOPSTACK(yylen); \

796 yystate = *yyssp; \

797 goto yybackup; \

798 } else { \

799 yyerror(context, model, ok, scanner, \

800 YY_("syntax error: cannot back up")); \

801 YYERROR; \

802 } \

803 while (0)

804

805

806

807#define YYERRCODE ORFZ_UNDEF

808

809

810#if ORFZ_DEBUG

811

812#ifndef YYFPRINTF

813#include <stdio.h>

814#define YYFPRINTF fprintf

815#endif

816

817#define YYDPRINTF(Args) \

818 do { \

819 if (yydebug) YYFPRINTF Args; \

820 } while (0)

821

822#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \

823 do { \

824 if (yydebug) { \

825 YYFPRINTF(stderr, "%s ", Title); \

826 yy_symbol_print(stderr, Kind, Value, context, model, ok, scanner); \

827 YYFPRINTF(stderr, "\n"); \

828 } \

829 } while (0)

830

831

832

833

834

835static void yy_symbol_value_print(

839 FILE* yyoutput = yyo;

845 if (!yyvaluep) return;

849}

850

851

852

853

854

855static void yy_symbol_print(FILE* yyo, yysymbol_kind_t yykind,

856 YYSTYPE const* const yyvaluep,

859 void* scanner) {

860 YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm",

862

863 yy_symbol_value_print(yyo, yykind, yyvaluep, context, model, ok, scanner);

864 YYFPRINTF(yyo, ")");

865}

866

867

868

869

870

871

873 YYFPRINTF(stderr, "Stack now");

874 for (; yybottom <= yytop; yybottom++) {

875 int yybot = *yybottom;

876 YYFPRINTF(stderr, " %d", yybot);

877 }

878 YYFPRINTF(stderr, "\n");

879}

880

881#define YY_STACK_PRINT(Bottom, Top) \

882 do { \

883 if (yydebug) yy_stack_print((Bottom), (Top)); \

884 } while (0)

885

886

887

888

889

890static void yy_reduce_print(yy_state_t* yyssp, YYSTYPE* yyvsp, int yyrule,

893 void* scanner) {

894 int yylno = yyrline[yyrule];

895 int yynrhs = yyr2[yyrule];

896 int yyi;

897 YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1,

898 yylno);

899

900 for (yyi = 0; yyi < yynrhs; yyi++) {

901 YYFPRINTF(stderr, " $%d = ", yyi + 1);

903 &yyvsp[(yyi + 1) - (yynrhs)], context, model, ok, scanner);

904 YYFPRINTF(stderr, "\n");

905 }

906}

907

908#define YY_REDUCE_PRINT(Rule) \

909 do { \

910 if (yydebug) \

911 yy_reduce_print(yyssp, yyvsp, Rule, context, model, ok, scanner); \

912 } while (0)

913

914

915

917#else

918#define YYDPRINTF(Args) ((void)0)

919#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)

920#define YY_STACK_PRINT(Bottom, Top)

921#define YY_REDUCE_PRINT(Rule)

922#endif

923

924

925#ifndef YYINITDEPTH

926#define YYINITDEPTH 200

927#endif

928

929

930

931

932

933

934

935

936#ifndef YYMAXDEPTH

937#define YYMAXDEPTH 10000

938#endif

939

940

945

946

947

948

949

950

951

954

955 int yycount = 0;

958

959

960

961 int yyxbegin = yyn < 0 ? -yyn : 0;

962

963 int yychecklim = YYLAST - yyn + 1;

965 int yyx;

966 for (yyx = yyxbegin; yyx < yyxend; ++yyx)

969 if (!yyarg)

970 ++yycount;

971 else if (yycount == yyargn)

972 return 0;

973 else

975 }

976 }

977 if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY;

978 return yycount;

979}

980

981#ifndef yystrlen

982#if defined __GLIBC__ && defined _STRING_H

983#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S)))

984#else

985

988 for (yylen = 0; yystr[yylen]; yylen++) continue;

989 return yylen;

990}

991#endif

992#endif

993

994#ifndef yystpcpy

995#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE

996#define yystpcpy stpcpy

997#else

998

999

1000static char* yystpcpy(char* yydest, const char* yysrc) {

1001 char* yyd = yydest;

1002 const char* yys = yysrc;

1003

1004 while ((*yyd++ = *yys++) != '\0') continue;

1005

1006 return yyd - 1;

1007}

1008#endif

1009#endif

1010

1011#ifndef yytnamerr

1012

1013

1014

1015

1016

1017

1018

1020 if (*yystr == '"') {

1022 char const* yyp = yystr;

1023 for (;;) switch (*++yyp) {

1024 case '\'':

1025 case ',':

1026 goto do_not_strip_quotes;

1027

1028 case '\\':

1029 if (*++yyp != '\\')

1030 goto do_not_strip_quotes;

1031 else

1032 goto append;

1033

1034 append:

1035 default:

1036 if (yyres) yyres[yyn] = *yyp;

1037 yyn++;

1038 break;

1039

1040 case '"':

1041 if (yyres) yyres[yyn] = '\0';

1042 return yyn;

1043 }

1044 do_not_strip_quotes:;

1045 }

1046

1047 if (yyres)

1048 return yystpcpy(yyres, yystr) - yyres;

1049 else

1051}

1052#endif

1053

1056

1057 int yycount = 0;

1058

1059

1060

1061

1062

1063

1064

1065

1066

1067

1068

1069

1070

1071

1072

1073

1074

1075

1076

1077

1078

1079

1080

1082 int yyn;

1083 if (yyarg) yyarg[yycount] = yyctx->yytoken;

1084 ++yycount;

1086 yyargn - 1);

1089 else

1090 yycount += yyn;

1091 }

1092 return yycount;

1093}

1094

1095

1096

1097

1098

1099

1100

1101

1102

1105 enum { YYARGS_MAX = 5 };

1106

1108

1109

1111

1113

1114

1117

1118 switch (yycount) {

1119#define YYCASE_(N, S) \

1120 case N: \

1121 yyformat = S; \

1122 break

1123 default:

1125 YYCASE_(1, YY_("syntax error, unexpected %s"));

1126 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));

1127 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));

1128 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));

1130 5,

1131 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));

1132#undef YYCASE_

1133 }

1134

1135

1136

1137 yysize = yystrlen(yyformat) - 2 * yycount + 1;

1138 {

1139 int yyi;

1140 for (yyi = 0; yyi < yycount; ++yyi) {

1143 yysize = yysize1;

1144 else

1146 }

1147 }

1148

1149 if (*yymsg_alloc < yysize) {

1150 *yymsg_alloc = 2 * yysize;

1153 return -1;

1154 }

1155

1156

1157

1158

1159 {

1160 char* yyp = *yymsg;

1161 int yyi = 0;

1162 while ((*yyp = *yyformat) != '\0')

1163 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) {

1165 yyformat += 2;

1166 } else {

1167 ++yyp;

1168 ++yyformat;

1169 }

1170 }

1171 return 0;

1172}

1173

1174

1175

1176

1177

1182 void* scanner) {

1188 if (!yymsg) yymsg = "Deleting";

1190

1194}

1195

1196

1197

1198

1199

1202

1203 int yychar;

1204

1205

1206

1207

1210

1211

1213

1215

1216 int yyerrstatus = 0;

1217

1218

1219

1220

1221

1223

1224

1228

1229

1233

1234 int yyn;

1235

1236 int yyresult;

1237

1239

1240

1242

1243

1244 char yymsgbuf[128];

1245 char* yymsg = yymsgbuf;

1246 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;

1247

1248#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))

1249

1250

1251

1252 int yylen = 0;

1253

1254 YYDPRINTF((stderr, "Starting parse\n"));

1255

1256 yychar = ORFZ_EMPTY;

1257

1258 goto yysetstate;

1259

1260

1261

1262

1263yynewstate:

1264

1265

1266 yyssp++;

1267

1268

1269

1270

1271yysetstate:

1272 YYDPRINTF((stderr, "Entering state %d\n", yystate));

1278

1279 if (yyss + yystacksize - 1 <= yyssp)

1280#if !defined yyoverflow && !defined YYSTACK_RELOCATE

1282#else

1283 {

1284

1286

1287#if defined yyoverflow

1288 {

1289

1290

1291

1294

1295

1296

1297

1298

1299 yyoverflow(YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF(*yyssp),

1300 &yyvs1, yysize * YYSIZEOF(*yyvsp), &yystacksize);

1301 yyss = yyss1;

1302 yyvs = yyvs1;

1303 }

1304#else

1305

1307 yystacksize *= 2;

1309

1310 {

1318#undef YYSTACK_RELOCATE

1320 }

1321#endif

1322

1323 yyssp = yyss + yysize - 1;

1324 yyvsp = yyvs + yysize - 1;

1325

1328 (stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize)));

1330

1331 if (yyss + yystacksize - 1 <= yyssp) YYABORT;

1332 }

1333#endif

1334

1336

1337 goto yybackup;

1338

1339

1340

1341

1342yybackup:

1343

1344

1345

1346

1347 yyn = yypact[yystate];

1349

1350

1351

1352

1354 YYDPRINTF((stderr, "Reading a token\n"));

1356 }

1357

1361 YYDPRINTF((stderr, "Now at end of input.\n"));

1363

1364

1365

1366

1369 goto yyerrlab1;

1370 } else {

1373 }

1374

1375

1376

1377 yyn += yytoken;

1378 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault;

1380 if (yyn <= 0) {

1382 yyn = -yyn;

1383 goto yyreduce;

1384 }

1385

1386

1387

1388 if (yyerrstatus) yyerrstatus--;

1389

1390

1392 yystate = yyn;

1396

1397

1399 goto yynewstate;

1400

1401

1402

1403

1404yydefault:

1406 if (yyn == 0) goto yyerrlab;

1407 goto yyreduce;

1408

1409

1410

1411

1412yyreduce:

1413

1414 yylen = yyr2[yyn];

1415

1416

1417

1418

1419

1420

1421

1422

1423

1424 yyval = yyvsp[1 - yylen];

1425

1427 switch (yyn) {

1428 case 4:

1429#line 129 "ortools/flatzinc/parser.yy"

1430 {

1432 }

1433#line 1595 "parser.tab.cc"

1434 break;

1435

1436 case 19:

1437

1438#line 164 "ortools/flatzinc/parser.yy"

1439 {

1440

1441

1443 const std::string& identifier = (yyvsp[-3].string_value);

1444 const Domain& assignment = (yyvsp[0].domain);

1445 std::vector<Annotation>* const annotations = (yyvsp[-2].annotations);

1446

1448

1449 context->domain_map[identifier] = assignment;

1450 } else {

1451 const int64_t value = assignment.values.front();

1452 CHECK(domain.Contains(value));

1453 context->integer_map[identifier] = value;

1454 }

1455 delete annotations;

1456 }

1457#line 1619 "parser.tab.cc"

1458 break;

1459

1460 case 20:

1461

1462

1463#line 184 "ortools/flatzinc/parser.yy"

1464 {

1465 std::vector<Annotation>* const annotations = (yyvsp[-4].annotations);

1466

1467 CHECK_EQ((yyvsp[-12].integer_value), 1)

1468 << "Only [1..n] array are supported here.";

1469 const int64_t num_constants = (yyvsp[-10].integer_value);

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());

1474

1476 delete assignments;

1477 delete annotations;

1478 }

1479#line 1638 "parser.tab.cc"

1480 break;

1481

1482 case 21:

1483

1484#line 199 "ortools/flatzinc/parser.yy"

1485 {

1486 std::vector<Annotation>* const annotations = (yyvsp[-3].annotations);

1487

1488 CHECK_EQ((yyvsp[-11].integer_value), 1)

1489 << "Only [1..n] array are supported here.";

1490 const int64_t num_constants = (yyvsp[-9].integer_value);

1491 CHECK_EQ(num_constants, 0) << "Empty arrays should have a size of 0";

1492 const std::string& identifier = (yyvsp[-4].string_value);

1493 context->integer_array_map[identifier] = std::vector<int64_t>();

1494 delete annotations;

1495 }

1496#line 1653 "parser.tab.cc"

1497 break;

1498

1499 case 22:

1500

1501

1502#line 210 "ortools/flatzinc/parser.yy"

1503 {

1504 std::vector<Annotation>* const annotations = (yyvsp[-4].annotations);

1505

1506 CHECK_EQ((yyvsp[-12].integer_value), 1)

1507 << "Only [1..n] array are supported here.";

1508 const int64_t num_constants = (yyvsp[-10].integer_value);

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());

1513

1515 delete assignments;

1516 delete annotations;

1517 }

1518#line 1672 "parser.tab.cc"

1519 break;

1520

1521 case 23:

1522

1523#line 225 "ortools/flatzinc/parser.yy"

1524 {

1525 std::vector<Annotation>* const annotations = (yyvsp[-3].annotations);

1526

1527 CHECK_EQ((yyvsp[-11].integer_value), 1)

1528 << "Only [1..n] array are supported here.";

1529 const int64_t num_constants = (yyvsp[-9].integer_value);

1530 CHECK_EQ(num_constants, 0) << "Empty arrays should have a size of 0";

1531 const std::string& identifier = (yyvsp[-4].string_value);

1532 context->float_array_map[identifier] = std::vector<double>();

1533 delete annotations;

1534 }

1535#line 1687 "parser.tab.cc"

1536 break;

1537

1538 case 24:

1539

1540

1541#line 236 "ortools/flatzinc/parser.yy"

1542 {

1543

1544 CHECK_EQ((yyvsp[-12].integer_value), 1)

1545 << "Only [1..n] array are supported here.";

1546 const int64_t num_domains = (yyvsp[-10].integer_value);

1547

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());

1555 delete assignments;

1556 delete annotations;

1557 }

1558#line 1706 "parser.tab.cc"

1559 break;

1560

1561 case 25:

1562

1563#line 250 "ortools/flatzinc/parser.yy"

1564 {

1565

1566

1567

1568

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");

1576 if (!assignment.defined) {

1577 var = model->AddVariable(identifier, domain, introduced);

1579 } else if (assignment.variable == nullptr) {

1581

1582 const double value = assignment.float_value;

1584 introduced);

1585 } else if (assignment.is_domain) {

1586

1587

1588

1589

1590

1591

1592 var = model->AddVariable(identifier, assignment.domain, introduced,

1594 } else {

1598 }

1599 } else {

1601 var->Merge(identifier, domain, introduced);

1602 }

1603

1604

1605

1607 if (ContainsId(annotations, "output_var")) {

1610 }

1611 delete annotations;

1612 }

1613#line 1761 "parser.tab.cc"

1614 break;

1615

1616 case 26:

1617

1618

1619#line 301 "ortools/flatzinc/parser.yy"

1620 {

1621

1622

1623

1624 CHECK_EQ((yyvsp[-10].integer_value), 1);

1625 const int64_t num_vars = (yyvsp[-8].integer_value);

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");

1634

1635 std::vector<Variable*> vars(num_vars, nullptr);

1636

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) {

1644

1645 const double value = (*assignments)[i].float_value;

1647 introduced);

1648 } else if ((*assignments)[i].is_domain) {

1649

1650

1651

1652

1653

1654

1655 vars[i] = model->AddVariable(var_name, (*assignments)[i].domain,

1656 introduced, domain.is_a_set);

1657 } else {

1658

1659 const int64_t value = (*assignments)[i].value;

1660 CHECK(domain.Contains(value));

1662 introduced);

1663 }

1664 } else {

1665 Variable* const var = (*assignments)[i].variable;

1666 CHECK(var != nullptr);

1667 vars[i] = var;

1668 vars[i]->Merge(var_name, domain, introduced);

1669 }

1670 }

1671 delete assignments;

1672

1673

1675

1676

1677

1678

1679 if (annotations != nullptr) {

1680 for (int i = 0; i < annotations->size(); ++i) {

1681 const Annotation& ann = (*annotations)[i];

1683

1687

1688 std::vector<SolutionOutputSpecs::Bounds> bounds;

1689 for (int a = 0; a < list.annotations.size(); ++a) {

1693 bound.interval_min, bound.interval_max));

1694 }

1695

1698 }

1699 }

1700 delete annotations;

1701 }

1702 }

1703#line 1848 "parser.tab.cc"

1704 break;

1705

1706 case 27:

1707#line 385 "ortools/flatzinc/parser.yy"

1708 {

1709 (yyval.var_or_value) = (yyvsp[0].var_or_value);

1710 }

1711#line 1854 "parser.tab.cc"

1712 break;

1713

1714 case 28:

1715#line 386 "ortools/flatzinc/parser.yy"

1716 {

1718 }

1719#line 1860 "parser.tab.cc"

1720 break;

1721

1722 case 29:

1723#line 389 "ortools/flatzinc/parser.yy"

1724 {

1726 }

1727#line 1866 "parser.tab.cc"

1728 break;

1729

1730 case 30:

1731#line 390 "ortools/flatzinc/parser.yy"

1732 {

1734 }

1735#line 1872 "parser.tab.cc"

1736 break;

1737

1738 case 31:

1739#line 391 "ortools/flatzinc/parser.yy"

1740 {

1742 }

1743#line 1878 "parser.tab.cc"

1744 break;

1745

1746 case 32:

1747#line 394 "ortools/flatzinc/parser.yy"

1748 {

1751 }

1752#line 1887 "parser.tab.cc"

1753 break;

1754

1755 case 33:

1756#line 398 "ortools/flatzinc/parser.yy"

1757 {

1760 }

1761#line 1896 "parser.tab.cc"

1762 break;

1763

1764 case 34:

1765#line 404 "ortools/flatzinc/parser.yy"

1766 {

1768 }

1769#line 1902 "parser.tab.cc"

1770 break;

1771

1772 case 35:

1773#line 405 "ortools/flatzinc/parser.yy"

1774 {

1776 }

1777#line 1908 "parser.tab.cc"

1778 break;

1779

1780 case 36:

1781#line 406 "ortools/flatzinc/parser.yy"

1782 {

1784 (yyvsp[-2].integer_value), (yyvsp[0].integer_value)));

1785 }

1786#line 1916 "parser.tab.cc"

1787 break;

1788

1789 case 37:

1790#line 409 "ortools/flatzinc/parser.yy"

1791 {

1792 CHECK((yyvsp[-1].integers) != nullptr);

1795 delete (yyvsp[-1].integers);

1796 }

1797#line 1926 "parser.tab.cc"

1798 break;

1799

1800 case 38:

1801#line 414 "ortools/flatzinc/parser.yy"

1802 {

1803

1804 const std::string& id = (yyvsp[0].string_value);

1805 if (context->integer_map.contains(id)) {

1808 } else if (context->float_map.contains(id)) {

1811 } else if (context->variable_map.contains(id)) {

1814 } else {

1815 LOG(ERROR) << "Unknown symbol " << id;

1817 *ok = false;

1818 }

1819 }

1820#line 1946 "parser.tab.cc"

1821 break;

1822

1823 case 39:

1824#line 429 "ortools/flatzinc/parser.yy"

1825 {

1826

1827 const std::string& id = (yyvsp[-3].string_value);

1828 const int64_t value = (yyvsp[-1].integer_value);

1838 } else {

1839 LOG(ERROR) << "Unknown symbol " << id;

1841 *ok = false;

1842 }

1843 }

1844#line 1970 "parser.tab.cc"

1845 break;

1846

1847 case 40:

1848#line 450 "ortools/flatzinc/parser.yy"

1849 {

1851 }

1852#line 1976 "parser.tab.cc"

1853 break;

1854

1855 case 41:

1856#line 451 "ortools/flatzinc/parser.yy"

1857 {

1859 }

1860#line 1982 "parser.tab.cc"

1861 break;

1862

1863 case 42:

1864#line 452 "ortools/flatzinc/parser.yy"

1865 {

1867 Domain::Interval((yyvsp[-2].integer_value), (yyvsp[0].integer_value));

1868 }

1869#line 1988 "parser.tab.cc"

1870 break;

1871

1872 case 43:

1873#line 453 "ortools/flatzinc/parser.yy"

1874 {

1875 CHECK((yyvsp[-1].integers) != nullptr);

1877 delete (yyvsp[-1].integers);

1878 }

1879#line 1998 "parser.tab.cc"

1880 break;

1881

1882 case 44:

1883#line 460 "ortools/flatzinc/parser.yy"

1884 {

1886 }

1887#line 2004 "parser.tab.cc"

1888 break;

1889

1890 case 45:

1891#line 461 "ortools/flatzinc/parser.yy"

1892 {

1894 }

1895#line 2010 "parser.tab.cc"

1896 break;

1897

1898 case 46:

1899#line 462 "ortools/flatzinc/parser.yy"

1900 {

1902 (yyvsp[0].integer_value));

1903 }

1904#line 2016 "parser.tab.cc"

1905 break;

1906

1907 case 47:

1908#line 463 "ortools/flatzinc/parser.yy"

1909 {

1910 CHECK((yyvsp[-1].integers) != nullptr);

1913 delete (yyvsp[-1].integers);

1914 }

1915#line 2026 "parser.tab.cc"

1916 break;

1917

1918 case 48:

1919#line 470 "ortools/flatzinc/parser.yy"

1920 {

1922 }

1923#line 2032 "parser.tab.cc"

1924 break;

1925

1926 case 49:

1927#line 471 "ortools/flatzinc/parser.yy"

1928 {

1930 (yyvsp[0].double_value));

1931 }

1932#line 2040 "parser.tab.cc"

1933 break;

1934

1935 case 50:

1936#line 476 "ortools/flatzinc/parser.yy"

1937 {

1938 (yyval.domain) = (yyvsp[0].domain);

1939 }

1940#line 2046 "parser.tab.cc"

1941 break;

1942

1943 case 51:

1944#line 477 "ortools/flatzinc/parser.yy"

1945 {

1946 (yyval.domain) = (yyvsp[0].domain);

1947 }

1948#line 2052 "parser.tab.cc"

1949 break;

1950

1951 case 52:

1952#line 478 "ortools/flatzinc/parser.yy"

1953 {

1954 (yyval.domain) = (yyvsp[0].domain);

1955 }

1956#line 2058 "parser.tab.cc"

1957 break;

1958

1959 case 53:

1960#line 481 "ortools/flatzinc/parser.yy"

1961 {

1962 (yyval.integers) = (yyvsp[-2].integers);

1963 (yyval.integers)->emplace_back((yyvsp[0].integer_value));

1964 }

1965#line 2064 "parser.tab.cc"

1966 break;

1967

1968 case 54:

1969#line 482 "ortools/flatzinc/parser.yy"

1970 {

1971 (yyval.integers) = new std::vector<int64_t>();

1972 (yyval.integers)->emplace_back((yyvsp[0].integer_value));

1973 }

1974#line 2070 "parser.tab.cc"

1975 break;

1976

1977 case 55:

1978#line 485 "ortools/flatzinc/parser.yy"

1979 {

1980 (yyval.integer_value) = (yyvsp[0].integer_value);

1981 }

1982#line 2076 "parser.tab.cc"

1983 break;

1984

1985 case 56:

1986#line 486 "ortools/flatzinc/parser.yy"

1987 {

1989 }

1990#line 2082 "parser.tab.cc"

1991 break;

1992

1993 case 57:

1994#line 487 "ortools/flatzinc/parser.yy"

1995 {

1999 }

2000#line 2090 "parser.tab.cc"

2001 break;

2002

2003 case 58:

2004#line 492 "ortools/flatzinc/parser.yy"

2005 {

2006 (yyval.doubles) = (yyvsp[-2].doubles);

2007 (yyval.doubles)->emplace_back((yyvsp[0].double_value));

2008 }

2009#line 2096 "parser.tab.cc"

2010 break;

2011

2012 case 59:

2013#line 493 "ortools/flatzinc/parser.yy"

2014 {

2015 (yyval.doubles) = new std::vector<double>();

2016 (yyval.doubles)->emplace_back((yyvsp[0].double_value));

2017 }

2018#line 2102 "parser.tab.cc"

2019 break;

2020

2021 case 60:

2022#line 496 "ortools/flatzinc/parser.yy"

2023 {

2024 (yyval.double_value) = (yyvsp[0].double_value);

2025 }

2026#line 2108 "parser.tab.cc"

2027 break;

2028

2029 case 61:

2030#line 497 "ortools/flatzinc/parser.yy"

2031 {

2033 }

2034#line 2114 "parser.tab.cc"

2035 break;

2036

2037 case 62:

2038#line 498 "ortools/flatzinc/parser.yy"

2039 {

2043 }

2044#line 2122 "parser.tab.cc"

2045 break;

2046

2047 case 63:

2048#line 503 "ortools/flatzinc/parser.yy"

2049 {

2051 }

2052#line 2128 "parser.tab.cc"

2053 break;

2054

2055 case 64:

2056#line 504 "ortools/flatzinc/parser.yy"

2057 {

2059 Domain::Interval((yyvsp[-2].integer_value), (yyvsp[0].integer_value));

2060 }

2061#line 2134 "parser.tab.cc"

2062 break;

2063

2064 case 65:

2065#line 505 "ortools/flatzinc/parser.yy"

2066 {

2067 CHECK((yyvsp[-1].integers) != nullptr);

2069 delete (yyvsp[-1].integers);

2070 }

2071#line 2144 "parser.tab.cc"

2072 break;

2073

2074 case 66:

2075#line 510 "ortools/flatzinc/parser.yy"

2076 {

2078 }

2079#line 2150 "parser.tab.cc"

2080 break;

2081

2082 case 67:

2083#line 511 "ortools/flatzinc/parser.yy"

2084 {

2086 }

2087#line 2158 "parser.tab.cc"

2088 break;

2089

2090 case 68:

2091#line 514 "ortools/flatzinc/parser.yy"

2092 {

2095 }

2096#line 2164 "parser.tab.cc"

2097 break;

2098

2099 case 69:

2100#line 515 "ortools/flatzinc/parser.yy"

2101 {

2105 }

2106#line 2173 "parser.tab.cc"

2107 break;

2108

2109 case 70:

2110#line 521 "ortools/flatzinc/parser.yy"

2111 {

2112 (yyval.domains) = (yyvsp[-2].domains);

2113 (yyval.domains)->emplace_back((yyvsp[0].domain));

2114 }

2115#line 2182 "parser.tab.cc"

2116 break;

2117

2118 case 71:

2119#line 525 "ortools/flatzinc/parser.yy"

2120 {

2121 (yyval.domains) = new std::vector<Domain>();

2122 (yyval.domains)->emplace_back((yyvsp[0].domain));

2123 }

2124#line 2188 "parser.tab.cc"

2125 break;

2126

2127 case 74:

2128

2129#line 535 "ortools/flatzinc/parser.yy"

2130 {

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);

2135

2137 ContainsId(annotations, "domain"),

2138 ContainsId(annotations, "symmetry_breaking"),

2139 ContainsId(annotations, "redundant"));

2140 delete annotations;

2141 delete (yyvsp[-2].args);

2142 }

2143#line 2205 "parser.tab.cc"

2144 break;

2145

2146 case 75:

2147#line 549 "ortools/flatzinc/parser.yy"

2148 {

2149 (yyval.args) = (yyvsp[-2].args);

2150 (yyval.args)->emplace_back((yyvsp[0].arg));

2151 }

2152#line 2211 "parser.tab.cc"

2153 break;

2154

2155 case 76:

2156#line 550 "ortools/flatzinc/parser.yy"

2157 {

2158 (yyval.args) = new std::vector<Argument>();

2159 (yyval.args)->emplace_back((yyvsp[0].arg));

2160 }

2161#line 2217 "parser.tab.cc"

2162 break;

2163

2164 case 77:

2165#line 553 "ortools/flatzinc/parser.yy"

2166 {

2168 }

2169#line 2223 "parser.tab.cc"

2170 break;

2171

2172 case 78:

2173#line 554 "ortools/flatzinc/parser.yy"

2174 {

2176 }

2177#line 2229 "parser.tab.cc"

2178 break;

2179

2180 case 79:

2181#line 555 "ortools/flatzinc/parser.yy"

2182 {

2184 }

2185#line 2235 "parser.tab.cc"

2186 break;

2187

2188 case 80:

2189#line 556 "ortools/flatzinc/parser.yy"

2190 {

2192 (yyvsp[0].integer_value));

2193 }

2194#line 2241 "parser.tab.cc"

2195 break;

2196

2197 case 81:

2198#line 557 "ortools/flatzinc/parser.yy"

2199 {

2200 CHECK((yyvsp[-1].integers) != nullptr);

2202 delete (yyvsp[-1].integers);

2203 }

2204#line 2251 "parser.tab.cc"

2205 break;

2206

2207 case 82:

2208#line 562 "ortools/flatzinc/parser.yy"

2209 {

2210 const std::string& id = (yyvsp[0].string_value);

2211 if (context->integer_map.contains(id)) {

2215 } else if (context->float_map.contains(id)) {

2216 const double d = context->float_map.at(id);

2219 const auto& double_values = context->float_array_map.at(id);

2221 } else if (context->variable_map.contains(id)) {

2225 } else if (context->domain_map.contains(id)) {

2228 } else {

2230 << "Unknown identifier: " << id;

2231 const std::vector<Domain>& d = context->domain_array_map.at(id);

2233 }

2234 }

2235#line 2282 "parser.tab.cc"

2236 break;

2237

2238 case 83:

2239#line 588 "ortools/flatzinc/parser.yy"

2240 {

2241 const std::string& id = (yyvsp[-3].string_value);

2242 const int64_t index = (yyvsp[-1].integer_value);

2247 (yyval.arg) =

2249 } else {

2251 << "Unknown identifier: " << id;

2254 }

2255 }

2256#line 2304 "parser.tab.cc"

2257 break;

2258

2259 case 84:

2260#line 605 "ortools/flatzinc/parser.yy"

2261 {

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;

2270 }

2271 if ((*arguments)[i].is_float) {

2272 has_floats = true;

2273 }

2274 }

2275 if (has_variables) {

2276 std::vector<Variable*> vars;

2277 vars.reserve(arguments->size());

2278 for (int i = 0; i < arguments->size(); ++i) {

2280 if (data.variable != nullptr) {

2281 vars.push_back(data.variable);

2282 } else if (!data.is_float) {

2284 } else {

2286 }

2287 }

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);

2295 } else {

2296 values.push_back(data.value);

2297 }

2298 }

2300 } else {

2301 std::vector<int64_t> values;

2302 values.reserve(arguments->size());

2304 values.push_back(data.value);

2305 }

2307 }

2308 delete arguments;

2309 }

2310#line 2357 "parser.tab.cc"

2311 break;

2312

2313 case 85:

2314#line 653 "ortools/flatzinc/parser.yy"

2315 {

2317 }

2318#line 2365 "parser.tab.cc"

2319 break;

2320

2321 case 86:

2322#line 662 "ortools/flatzinc/parser.yy"

2323 {

2324 (yyval.annotations) = (yyvsp[-2].annotations) != nullptr

2326 : new std::vector<Annotation>();

2327 (yyval.annotations)->emplace_back((yyvsp[0].annotation));

2328 }

2329#line 2374 "parser.tab.cc"

2330 break;

2331

2332 case 87:

2333#line 666 "ortools/flatzinc/parser.yy"

2334 {

2336 }

2337#line 2380 "parser.tab.cc"

2338 break;

2339

2340 case 88:

2341#line 669 "ortools/flatzinc/parser.yy"

2342 {

2343 (yyval.annotations) = (yyvsp[-2].annotations);

2344 (yyval.annotations)->emplace_back((yyvsp[0].annotation));

2345 }

2346#line 2386 "parser.tab.cc"

2347 break;

2348

2349 case 89:

2350#line 670 "ortools/flatzinc/parser.yy"

2351 {

2352 (yyval.annotations) = new std::vector<Annotation>();

2353 (yyval.annotations)->emplace_back((yyvsp[0].annotation));

2354 }

2355#line 2392 "parser.tab.cc"

2356 break;

2357

2358 case 90:

2359#line 673 "ortools/flatzinc/parser.yy"

2360 {

2362 (yyvsp[0].integer_value));

2363 }

2364#line 2398 "parser.tab.cc"

2365 break;

2366

2367 case 91:

2368#line 674 "ortools/flatzinc/parser.yy"

2369 {

2370 CHECK((yyvsp[-1].integers) != nullptr);

2373 delete (yyvsp[-1].integers);

2374 }

2375#line 2408 "parser.tab.cc"

2376 break;

2377

2378 case 92:

2379#line 679 "ortools/flatzinc/parser.yy"

2380 {

2382 }

2383#line 2414 "parser.tab.cc"

2384 break;

2385

2386 case 93:

2387#line 680 "ortools/flatzinc/parser.yy"

2388 {

2390 }

2391#line 2420 "parser.tab.cc"

2392 break;

2393

2394 case 94:

2395#line 681 "ortools/flatzinc/parser.yy"

2396 {

2397 const std::string& id = (yyvsp[0].string_value);

2403 } else if (context->integer_map.contains(id)) {

2409 } else {

2411 }

2412 }

2413#line 2439 "parser.tab.cc"

2414 break;

2415

2416 case 95:

2417#line 695 "ortools/flatzinc/parser.yy"

2418 {

2419 std::vector<Annotation>* const annotations = (yyvsp[-1].annotations);

2420 if (annotations != nullptr) {

2422 (yyvsp[-3].string_value), std::move(*annotations));

2423 delete annotations;

2424 } else {

2426 }

2427 }

2428#line 2453 "parser.tab.cc"

2429 break;

2430

2431 case 96:

2432#line 704 "ortools/flatzinc/parser.yy"

2433 {

2435 << "Unknown identifier: " << (yyvsp[-3].string_value);

2439 }

2440#line 2464 "parser.tab.cc"

2441 break;

2442

2443 case 97:

2444#line 710 "ortools/flatzinc/parser.yy"

2445 {

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;

2450 for (const Annotation& ann : *annotations) {

2453 }

2454 if (all_integers) {

2455 std::vector<int64_t> values;

2456 for (const Annotation& ann : *annotations) {

2457 values.push_back(ann.interval_min);

2458 }

2460 } else if (all_vars) {

2461 std::vector<Variable*> vars;

2462 for (const Annotation& ann : *annotations) {

2463 vars.push_back(ann.variables[0]);

2464 }

2466 } else {

2469 }

2470 delete annotations;

2471 } else {

2473 }

2474 }

2475#line 2498 "parser.tab.cc"

2476 break;

2477

2478 case 98:

2479#line 739 "ortools/flatzinc/parser.yy"

2480 {

2482 }

2483#line 2506 "parser.tab.cc"

2484 break;

2485

2486 case 99:

2487#line 748 "ortools/flatzinc/parser.yy"

2488 {

2489 if ((yyvsp[-1].annotations) != nullptr) {

2490 model->Satisfy(std::move(*(yyvsp[-1].annotations)));

2492 } else {

2493 model->Satisfy(std::vector<Annotation>());

2494 }

2495 }

2496#line 2519 "parser.tab.cc"

2497 break;

2498

2499 case 100:

2500#line 756 "ortools/flatzinc/parser.yy"

2501 {

2503 ? (yyvsp[0].arg).Var()

2504 : model->AddConstant((yyvsp[0].arg).Value());

2505 if ((yyvsp[-2].annotations) != nullptr) {

2506 model->Minimize(obj_var, std::move(*(yyvsp[-2].annotations)));

2508 } else {

2509 model->Minimize(obj_var, std::vector<Annotation>());

2510 }

2511 }

2512#line 2535 "parser.tab.cc"

2513 break;

2514

2515 case 101:

2516#line 767 "ortools/flatzinc/parser.yy"

2517 {

2519 ? (yyvsp[0].arg).Var()

2520 : model->AddConstant((yyvsp[0].arg).Value());

2521 if ((yyvsp[-2].annotations) != nullptr) {

2522 model->Maximize(obj_var, std::move(*(yyvsp[-2].annotations)));

2524 } else {

2525 model->Maximize(obj_var, std::vector<Annotation>());

2526 }

2527 }

2528#line 2551 "parser.tab.cc"

2529 break;

2530

2531#line 2555 "parser.tab.cc"

2532

2533 default:

2534 break;

2535 }

2536

2537

2538

2539

2540

2541

2542

2543

2544

2545

2546

2548 &yyloc);

2549

2551 yylen = 0;

2552

2553 *++yyvsp = yyval;

2554

2555

2556

2557

2558 {

2560 const int yyi = yypgoto[yylhs] + *yyssp;

2561 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp

2564 }

2565

2566 goto yynewstate;

2567

2568

2569

2570

2571yyerrlab:

2572

2573

2575

2576 if (!yyerrstatus) {

2578 {

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)

2584 yymsgp = yymsg;

2585 else if (yysyntax_error_status == -1) {

2588 if (yymsg) {

2589 yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx);

2590 yymsgp = yymsg;

2591 } else {

2592 yymsg = yymsgbuf;

2593 yymsg_alloc = sizeof yymsgbuf;

2594 yysyntax_error_status = YYENOMEM;

2595 }

2596 }

2597 yyerror(context, model, ok, scanner, yymsgp);

2599 }

2600 }

2601

2602 if (yyerrstatus == 3) {

2603

2604

2605

2607

2609 } else {

2610 yydestruct("Error: discarding", yytoken, &yylval, context, model, ok,

2611 scanner);

2613 }

2614 }

2615

2616

2617

2618 goto yyerrlab1;

2619

2620

2621

2622

2623yyerrorlab:

2624

2625

2628

2629

2630

2632 yylen = 0;

2634 yystate = *yyssp;

2635 goto yyerrlab1;

2636

2637

2638

2639

2640yyerrlab1:

2641 yyerrstatus = 3;

2642

2643

2644 for (;;) {

2645 yyn = yypact[yystate];

2650 if (0 < yyn) break;

2651 }

2652 }

2653

2654

2655 if (yyssp == yyss) YYABORT;

2656

2658 model, ok, scanner);

2660 yystate = *yyssp;

2662 }

2663

2667

2668

2670

2671 yystate = yyn;

2672 goto yynewstate;

2673

2674

2675

2676

2677yyacceptlab:

2678 yyresult = 0;

2679 goto yyreturnlab;

2680

2681

2682

2683

2684yyabortlab:

2685 yyresult = 1;

2686 goto yyreturnlab;

2687

2688

2689

2690

2691yyexhaustedlab:

2692 yyerror(context, model, ok, scanner, YY_("memory exhausted"));

2693 yyresult = 2;

2694 goto yyreturnlab;

2695

2696

2697

2698

2699yyreturnlab:

2701

2702

2704 yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, context,

2705 model, ok, scanner);

2706 }

2707

2708

2711 while (yyssp != yyss) {

2713 model, ok, scanner);

2715 }

2716#ifndef yyoverflow

2718#endif

2720 return yyresult;

2721}

2722

2723#line 779 "ortools/flatzinc/parser.yy"

void AddConstraint(absl::string_view id, std::vector< Argument > arguments, bool is_domain, bool symmetry, bool redundant)

Variable * AddVariable(absl::string_view name, const Domain &domain, bool defined, bool set_is_fixed=false)

Variable * AddFloatConstant(double value)

void AddOutput(SolutionOutputSpecs output)

void Maximize(Variable *obj, std::vector< Annotation > search_annotations)

void Satisfy(std::vector< Annotation > search_annotations)

void Minimize(Variable *obj, std::vector< Annotation > search_annotations)

Variable * AddConstant(int64_t value)

const T & Lookup(const std::vector< T > &v, int index)

int64_t ConvertAsIntegerOrDie(double d)

static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED

Definition parser.tab.cc:631

static YYPTRDIFF_T yystrlen(const char *yystr)

Definition parser.tab.cc:986

const T & Lookup(const std::vector< T > &v, int index)

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition parser.tab.cc:358

#define YYMAXDEPTH

Definition parser.tab.cc:937

static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, operations_research::fz::ParserContext *context, operations_research::fz::Model *model, bool *ok, void *scanner)

Definition parser.tab.cc:1178

#define YYSTACK_FREE

Definition parser.tab.cc:421

static const yytype_int8 yytranslate[]

Definition parser.tab.cc:527

yysymbol_kind_t

Definition parser.tab.cc:98

@ YYSYMBOL_integer

Definition parser.tab.cc:153

@ YYSYMBOL_25_

Definition parser.tab.cc:125

@ YYSYMBOL_YYUNDEF

Definition parser.tab.cc:102

@ YYSYMBOL_const_literals

Definition parser.tab.cc:157

@ YYSYMBOL_optional_var_or_value_array

Definition parser.tab.cc:145

@ YYSYMBOL_float_domain

Definition parser.tab.cc:150

@ YYSYMBOL_var_or_value_array

Definition parser.tab.cc:146

@ YYSYMBOL_var_or_value

Definition parser.tab.cc:147

@ YYSYMBOL_DVALUE

Definition parser.tab.cc:121

@ YYSYMBOL_SVALUE

Definition parser.tab.cc:119

@ YYSYMBOL_26_

Definition parser.tab.cc:126

@ YYSYMBOL_YYerror

Definition parser.tab.cc:101

@ YYSYMBOL_SET

Definition parser.tab.cc:113

@ YYSYMBOL_IVALUE

Definition parser.tab.cc:118

@ YYSYMBOL_predicate

Definition parser.tab.cc:135

@ YYSYMBOL_SATISFY

Definition parser.tab.cc:112

@ YYSYMBOL_29_

Definition parser.tab.cc:129

@ YYSYMBOL_TOKEN_FLOAT

Definition parser.tab.cc:106

@ YYSYMBOL_28_

Definition parser.tab.cc:128

@ YYSYMBOL_variable_or_constant_declarations

Definition parser.tab.cc:140

@ YYSYMBOL_annotation

Definition parser.tab.cc:164

@ YYSYMBOL_predicate_arguments

Definition parser.tab.cc:136

@ YYSYMBOL_constraints

Definition parser.tab.cc:158

@ YYSYMBOL_variable_or_constant_declaration

Definition parser.tab.cc:142

@ YYSYMBOL_annotations

Definition parser.tab.cc:162

@ YYSYMBOL_floats

Definition parser.tab.cc:154

@ YYSYMBOL_model

Definition parser.tab.cc:133

@ YYSYMBOL_integers

Definition parser.tab.cc:152

@ YYSYMBOL_solve

Definition parser.tab.cc:165

@ YYSYMBOL_arguments

Definition parser.tab.cc:160

@ YYSYMBOL_optional_var_or_value

Definition parser.tab.cc:144

@ YYSYMBOL_predicate_array_argument

Definition parser.tab.cc:138

@ YYSYMBOL_annotation_arguments

Definition parser.tab.cc:163

@ YYSYMBOL_DOTDOT

Definition parser.tab.cc:116

@ YYSYMBOL_TOKEN_INT

Definition parser.tab.cc:107

@ YYSYMBOL_VAR

Definition parser.tab.cc:115

@ YYSYMBOL_set_domain

Definition parser.tab.cc:149

@ YYSYMBOL_TOKEN_BOOL

Definition parser.tab.cc:104

@ YYSYMBOL_constraint

Definition parser.tab.cc:159

@ YYSYMBOL_MINIMIZE

Definition parser.tab.cc:109

@ YYSYMBOL_ARRAY

Definition parser.tab.cc:103

@ YYSYMBOL_float

Definition parser.tab.cc:155

@ YYSYMBOL_predicate_argument

Definition parser.tab.cc:137

@ YYSYMBOL_COLONCOLON

Definition parser.tab.cc:117

@ YYSYMBOL_const_literal

Definition parser.tab.cc:156

@ YYSYMBOL_predicate_ints

Definition parser.tab.cc:139

@ YYSYMBOL_YYACCEPT

Definition parser.tab.cc:132

@ YYSYMBOL_30_

Definition parser.tab.cc:130

@ YYSYMBOL_23_

Definition parser.tab.cc:123

@ YYSYMBOL_domain

Definition parser.tab.cc:151

@ YYSYMBOL_YYEOF

Definition parser.tab.cc:100

@ YYSYMBOL_OF

Definition parser.tab.cc:110

@ YYSYMBOL_22_

Definition parser.tab.cc:122

@ YYSYMBOL_24_

Definition parser.tab.cc:124

@ YYSYMBOL_27_

Definition parser.tab.cc:127

@ YYSYMBOL_argument

Definition parser.tab.cc:161

@ YYSYMBOL_YYEMPTY

Definition parser.tab.cc:99

@ YYSYMBOL_IDENTIFIER

Definition parser.tab.cc:120

@ YYSYMBOL_predicates

Definition parser.tab.cc:134

@ YYSYMBOL_int_domain

Definition parser.tab.cc:148

@ YYSYMBOL_PREDICATE

Definition parser.tab.cc:111

@ YYSYMBOL_31_

Definition parser.tab.cc:131

@ YYSYMBOL_CONSTRAINT

Definition parser.tab.cc:105

@ YYSYMBOL_MAXIMIZE

Definition parser.tab.cc:108

@ YYSYMBOL_SOLVE

Definition parser.tab.cc:114

#define yyerrok

Definition parser.tab.cc:780

#define YY_ASSERT(E)

Definition parser.tab.cc:376

#define YY_(Msgid)

Definition parser.tab.cc:314

#define YYNOMEM

Definition parser.tab.cc:786

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition parser.tab.cc:359

static const yytype_int8 yydefact[]

Definition parser.tab.cc:671

#define YYNSTATES

Definition parser.tab.cc:513

#define YYSTYPE

Definition parser.tab.cc:67

#define YY_IGNORE_USELESS_CAST_END

Definition parser.tab.cc:373

short yytype_int16

Definition parser.tab.cc:227

#define YYABORT

Definition parser.tab.cc:784

#define YYSTACK_BYTES(N)

Definition parser.tab.cc:463

yytype_uint8 yy_state_t

Definition parser.tab.cc:301

#define YY_REDUCE_PRINT(Rule)

Definition parser.tab.cc:921

#define YY_CAST(Type, Val)

Definition parser.tab.cc:80

static const yytype_int16 yypact[]

Definition parser.tab.cc:646

#define yylex

Definition parser.tab.cc:70

static const yytype_uint8 yydefgoto[]

Definition parser.tab.cc:693

#define YY_NULLPTR

Definition parser.tab.cc:92

#define YYFINAL

Definition parser.tab.cc:502

#define YY_ACCESSING_SYMBOL(State)

Definition parser.tab.cc:556

#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)

Definition parser.tab.cc:919

static const yytype_int16 yypgoto[]

Definition parser.tab.cc:687

#define YY_INITIAL_VALUE(Value)

Definition parser.tab.cc:355

static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr)

Definition parser.tab.cc:1019

#define yyparse

Definition parser.tab.cc:69

#define YYNTOKENS

Definition parser.tab.cc:507

unsigned char yytype_uint8

Definition parser.tab.cc:248

#define YY_STACK_PRINT(Bottom, Top)

Definition parser.tab.cc:920

#define YYSIZE_T

Definition parser.tab.cc:289

#define YYSTACK_ALLOC_MAXIMUM

Definition parser.tab.cc:423

#define yydebug

Definition parser.tab.cc:72

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition parser.tab.cc:372

static const yytype_int8 yyr2[]

Definition parser.tab.cc:771

#define YYPTRDIFF_T

Definition parser.tab.cc:275

#define yynerrs

Definition parser.tab.cc:73

static const yytype_int16 yytable[]

Definition parser.tab.cc:700

#define YYACCEPT

Definition parser.tab.cc:783

#define yytable_value_is_error(Yyn)

Definition parser.tab.cc:642

@ YYENOMEM

Definition parser.tab.cc:778

#define YYTRANSLATE(YYX)

Definition parser.tab.cc:520

static const yytype_int8 yystos[]

Definition parser.tab.cc:745

#define YY_ATTRIBUTE_UNUSED

Definition parser.tab.cc:330

static const char *const yytname[]

Definition parser.tab.cc:565

static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)

Definition parser.tab.cc:952

static const yytype_int8 yyr1[]

Definition parser.tab.cc:761

static char * yystpcpy(char *yydest, const char *yysrc)

Definition parser.tab.cc:1000

int yy_state_fast_t

Definition parser.tab.cc:304

unsigned short yytype_uint16

Definition parser.tab.cc:259

#define YYLAST

Definition parser.tab.cc:504

#define YYSTACK_RELOCATE(Stack_alloc, Stack)

Definition parser.tab.cc:473

#define yypact_value_is_default(Yyn)

Definition parser.tab.cc:638

#define YYINITDEPTH

Definition parser.tab.cc:926

static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)

Definition parser.tab.cc:1054

signed char yytype_int8

Definition parser.tab.cc:219

#define YYERROR

Definition parser.tab.cc:785

#define YYSIZEOF(X)

Definition parser.tab.cc:298

static const yytype_int16 yycheck[]

Definition parser.tab.cc:722

#define YYSTACK_ALLOC

Definition parser.tab.cc:420

#define YYDPRINTF(Args)

Definition parser.tab.cc:918

#define YY_USE(E)

Definition parser.tab.cc:336

#define yyerror

Definition parser.tab.cc:71

static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx)

Definition parser.tab.cc:1103

static Annotation String(absl::string_view str)

static Annotation FunctionCall(absl::string_view id)

static Annotation FunctionCallWithArguments(absl::string_view id, std::vector< Annotation > args)

static Annotation Empty()

static Annotation AnnotationList(std::vector< Annotation > list)

static Annotation IntegerList(const std::vector< int64_t > &values)

static Annotation VarRefArray(std::vector< Variable * > variables)

static Annotation Identifier(absl::string_view id)

static Annotation VarRef(Variable *var)

static Annotation IntegerValue(int64_t value)

static Annotation Interval(int64_t interval_min, int64_t interval_max)

static Argument FloatList(std::vector< double > floats)

static Argument FloatValue(double value)

static Argument VoidArgument()

static Argument IntegerValue(int64_t value)

static Argument Interval(int64_t imin, int64_t imax)

static Argument FromDomain(const Domain &domain)

static Argument IntegerList(std::vector< int64_t > values)

static Argument VarRef(Variable *var)

static Argument DomainList(std::vector< Domain > domains)

static Argument VarRefArray(std::vector< Variable * > vars)

static Domain AllFloats()

static Domain IntegerList(std::vector< int64_t > values)

static Domain IntegerValue(int64_t value)

static Domain FloatValue(double value)

static Domain EmptyDomain()

static Domain FloatInterval(double lb, double ub)

static Domain SetOfBoolean()

static Domain Interval(int64_t included_min, int64_t included_max)

static Domain SetOfAllInt64()

static Domain SetOfInterval(int64_t included_min, int64_t included_max)

static Domain SetOfIntegerList(std::vector< int64_t > values)

static SolutionOutputSpecs MultiDimensionalArray(absl::string_view name, std::vector< Bounds > bounds, std::vector< Variable * > flat_variables, bool display_as_boolean)

static SolutionOutputSpecs SingleVariable(absl::string_view name, Variable *variable, bool display_as_boolean)

static VarRefOrValue VarRef(Variable *var)

static VarRefOrValue DomainValue(Domain domain)

static VarRefOrValue FloatValue(double value)

static VarRefOrValue Undefined()

static VarRefOrValue Value(int64_t value)

bool IsFunctionCallWithIdentifier(absl::string_view identifier) const

std::vector< Annotation > annotations

std::vector< int64_t > values

bool Contains(int64_t value) const

std::vector< double > * doubles

std::vector< Annotation > * annotations

std::vector< int64_t > * integers

std::vector< Domain > * domains

std::vector< Argument > * args

std::vector< VarRefOrValue > * var_or_value_array

VarRefOrValue var_or_value

absl::flat_hash_map< std::string, std::vector< Variable * > > variable_array_map

absl::flat_hash_map< std::string, Domain > domain_map

absl::flat_hash_map< std::string, int64_t > integer_map

absl::flat_hash_map< std::string, std::vector< double > > float_array_map

absl::flat_hash_map< std::string, Variable * > variable_map

absl::flat_hash_map< std::string, std::vector< Domain > > domain_array_map

absl::flat_hash_map< std::string, double > float_map

absl::flat_hash_map< std::string, std::vector< int64_t > > integer_array_map

bool Merge(absl::string_view other_name, const Domain &other_domain, bool other_temporary)

yysymbol_kind_t yytoken

Definition parser.tab.cc:943

yy_state_t * yyssp

Definition parser.tab.cc:942

YYSTYPE yyvs_alloc

Definition parser.tab.cc:455

yy_state_t yyss_alloc

Definition parser.tab.cc:454