Changeset 1442 for trunk/orbital/generated/mesh-parser.cpp
- Timestamp:
- Jun 7, 2012, 1:38:10 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/orbital/generated/mesh-parser.cpp
r1437 r1442 1 /* A Bison parser, made by GNU Bison 2. 5. */1 /* A Bison parser, made by GNU Bison 2.4.2. */ 2 2 3 3 /* Skeleton implementation for Bison LALR(1) parsers in C++ 4 4 5 Copyright (C) 2002-201 1Free Software Foundation, Inc.5 Copyright (C) 2002-2010 Free Software Foundation, Inc. 6 6 7 7 This program is free software: you can redistribute it and/or modify … … 36 36 /* First part of user declarations. */ 37 37 38 /* Line 293of lalr1.cc */38 /* Line 310 of lalr1.cc */ 39 39 #line 1 "mesh-parser.y" 40 40 … … 61 61 62 62 63 /* Line 293of lalr1.cc */63 /* Line 310 of lalr1.cc */ 64 64 #line 65 "generated/mesh-parser.cpp" 65 65 … … 69 69 /* User implementation prologue. */ 70 70 71 /* Line 299of lalr1.cc */72 #line 6 4"mesh-parser.y"71 /* Line 316 of lalr1.cc */ 72 #line 63 "mesh-parser.y" 73 73 74 74 #include "../mesh-compiler.h" … … 78 78 79 79 80 /* Line 299of lalr1.cc */80 /* Line 316 of lalr1.cc */ 81 81 #line 82 "generated/mesh-parser.cpp" 82 82 … … 93 93 #endif 94 94 95 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].96 If N is 0, then set CURRENT to the empty location which ends97 the previous symbol: RHS[0] (always defined). */98 99 #define YYRHSLOC(Rhs, K) ((Rhs)[K])100 #ifndef YYLLOC_DEFAULT101 # define YYLLOC_DEFAULT(Current, Rhs, N) \102 do \103 if (N) \104 { \105 (Current).begin = YYRHSLOC (Rhs, 1).begin; \106 (Current).end = YYRHSLOC (Rhs, N).end; \107 } \108 else \109 { \110 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \111 } \112 while (false)113 #endif114 115 95 /* Suppress unused-variable warnings by "using" E. */ 116 96 #define YYUSE(e) ((void) (e)) … … 164 144 namespace orbital { 165 145 166 /* Line 382 of lalr1.cc */ 167 #line 168 "generated/mesh-parser.cpp" 146 /* Line 379 of lalr1.cc */ 147 #line 148 "generated/mesh-parser.cpp" 148 #if YYERROR_VERBOSE 168 149 169 150 /* Return YYSTR after stripping away unnecessary quotes and … … 204 185 } 205 186 187 #endif 206 188 207 189 /// Build a parser object. … … 304 286 #endif 305 287 306 inline bool307 MeshParser::yy_pact_value_is_default_ (int yyvalue)308 {309 return yyvalue == yypact_ninf_;310 }311 312 inline bool313 MeshParser::yy_table_value_is_error_ (int yyvalue)314 {315 return yyvalue == yytable_ninf_;316 }317 318 288 int 319 289 MeshParser::parse () … … 337 307 location_type yylloc; 338 308 /// The locations where the error started and ended. 339 location_type yyerror_range[ 3];309 location_type yyerror_range[2]; 340 310 341 311 /// $$. … … 375 345 /* Try to take a decision without lookahead. */ 376 346 yyn = yypact_[yystate]; 377 if (yy _pact_value_is_default_ (yyn))347 if (yyn == yypact_ninf_) 378 348 goto yydefault; 379 349 … … 408 378 if (yyn <= 0) 409 379 { 410 if (yy _table_value_is_error_ (yyn))411 380 if (yyn == 0 || yyn == yytable_ninf_) 381 goto yyerrlab; 412 382 yyn = -yyn; 413 383 goto yyreduce; … … 465 435 case 7: 466 436 467 /* Line 6 90of lalr1.cc */468 #line 8 8"mesh-parser.y"437 /* Line 677 of lalr1.cc */ 438 #line 87 "mesh-parser.y" 469 439 { mc.m_mesh.OpenBrace(); } 470 440 break; … … 472 442 case 8: 473 443 474 /* Line 6 90of lalr1.cc */475 #line 9 2"mesh-parser.y"444 /* Line 677 of lalr1.cc */ 445 #line 91 "mesh-parser.y" 476 446 { mc.m_mesh.CloseBrace(); } 477 447 break; 478 448 449 case 14: 450 451 /* Line 677 of lalr1.cc */ 452 #line 106 "mesh-parser.y" 453 { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 454 break; 455 479 456 case 15: 480 457 481 /* Line 690 of lalr1.cc */ 482 #line 108 "mesh-parser.y" 483 { mc.m_mesh.MeshConvert(); } 484 break; 485 486 case 16: 487 488 /* Line 690 of lalr1.cc */ 489 #line 109 "mesh-parser.y" 490 { /* TODO */ } 491 break; 492 493 case 17: 494 495 /* Line 690 of lalr1.cc */ 496 #line 113 "mesh-parser.y" 497 { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 498 break; 499 500 case 18: 501 502 /* Line 690 of lalr1.cc */ 503 #line 114 "mesh-parser.y" 458 /* Line 677 of lalr1.cc */ 459 #line 107 "mesh-parser.y" 504 460 { uint16_t x = (uint16_t)(yysemantic_stack_[(2) - (2)].u32val); 505 461 vec4 v(x >> 12, (x >> 8) & 0xf, (x >> 4) & 0xf, x & 0xf); … … 507 463 break; 508 464 509 case 1 9:510 511 /* Line 6 90of lalr1.cc */512 #line 11 7"mesh-parser.y"465 case 16: 466 467 /* Line 677 of lalr1.cc */ 468 #line 110 "mesh-parser.y" 513 469 { mc.m_mesh.SetCurColor2(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 514 470 break; 515 471 516 case 20:517 518 /* Line 6 90of lalr1.cc */519 #line 11 8"mesh-parser.y"472 case 17: 473 474 /* Line 677 of lalr1.cc */ 475 #line 111 "mesh-parser.y" 520 476 { uint16_t x = (uint16_t)(yysemantic_stack_[(2) - (2)].u32val); 521 477 vec4 v(x >> 12, (x >> 8) & 0xf, (x >> 4) & 0xf, x & 0xf); … … 523 479 break; 524 480 481 case 18: 482 483 /* Line 677 of lalr1.cc */ 484 #line 117 "mesh-parser.y" 485 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 486 break; 487 488 case 19: 489 490 /* Line 677 of lalr1.cc */ 491 #line 118 "mesh-parser.y" 492 { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 493 break; 494 495 case 20: 496 497 /* Line 677 of lalr1.cc */ 498 #line 119 "mesh-parser.y" 499 { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 500 break; 501 525 502 case 21: 526 503 527 /* Line 690 of lalr1.cc */ 504 /* Line 677 of lalr1.cc */ 505 #line 120 "mesh-parser.y" 506 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 507 break; 508 509 case 22: 510 511 /* Line 677 of lalr1.cc */ 512 #line 121 "mesh-parser.y" 513 { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); } 514 break; 515 516 case 23: 517 518 /* Line 677 of lalr1.cc */ 519 #line 122 "mesh-parser.y" 520 { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); } 521 break; 522 523 case 24: 524 525 /* Line 677 of lalr1.cc */ 526 #line 123 "mesh-parser.y" 527 { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); } 528 break; 529 530 case 25: 531 532 /* Line 677 of lalr1.cc */ 528 533 #line 124 "mesh-parser.y" 529 { mc.m_mesh.T ranslate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }530 break; 531 532 case 2 2:533 534 /* Line 6 90of lalr1.cc */534 { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 535 break; 536 537 case 26: 538 539 /* Line 677 of lalr1.cc */ 535 540 #line 125 "mesh-parser.y" 536 { mc.m_mesh.T ranslate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }537 break; 538 539 case 2 3:540 541 /* Line 6 90of lalr1.cc */541 { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 542 break; 543 544 case 27: 545 546 /* Line 677 of lalr1.cc */ 542 547 #line 126 "mesh-parser.y" 543 { mc.m_mesh.T ranslate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }544 break; 545 546 case 2 4:547 548 /* Line 6 90of lalr1.cc */548 { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 549 break; 550 551 case 28: 552 553 /* Line 677 of lalr1.cc */ 549 554 #line 127 "mesh-parser.y" 550 { mc.m_mesh. Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }551 break; 552 553 case 2 5:554 555 /* Line 6 90of lalr1.cc */555 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 556 break; 557 558 case 29: 559 560 /* Line 677 of lalr1.cc */ 556 561 #line 128 "mesh-parser.y" 557 { mc.m_mesh. RotateX((yysemantic_stack_[(2) - (2)].args).f0); }558 break; 559 560 case 26:561 562 /* Line 6 90of lalr1.cc */562 { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 563 break; 564 565 case 30: 566 567 /* Line 677 of lalr1.cc */ 563 568 #line 129 "mesh-parser.y" 564 { mc.m_mesh. RotateY((yysemantic_stack_[(2) - (2)].args).f0); }565 break; 566 567 case 27:568 569 /* Line 6 90of lalr1.cc */569 { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 570 break; 571 572 case 31: 573 574 /* Line 677 of lalr1.cc */ 570 575 #line 130 "mesh-parser.y" 571 { mc.m_mesh. RotateZ((yysemantic_stack_[(2) - (2)].args).f0); }572 break; 573 574 case 28:575 576 /* Line 6 90of lalr1.cc */576 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 577 break; 578 579 case 32: 580 581 /* Line 677 of lalr1.cc */ 577 582 #line 131 "mesh-parser.y" 578 { mc.m_mesh. TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }579 break; 580 581 case 29:582 583 /* Line 6 90of lalr1.cc */583 { mc.m_mesh.MirrorX(); } 584 break; 585 586 case 33: 587 588 /* Line 677 of lalr1.cc */ 584 589 #line 132 "mesh-parser.y" 585 { mc.m_mesh. TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }586 break; 587 588 case 3 0:589 590 /* Line 6 90of lalr1.cc */590 { mc.m_mesh.MirrorY(); } 591 break; 592 593 case 34: 594 595 /* Line 677 of lalr1.cc */ 591 596 #line 133 "mesh-parser.y" 592 { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 593 break; 594 595 case 31: 596 597 /* Line 690 of lalr1.cc */ 598 #line 134 "mesh-parser.y" 599 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 600 break; 601 602 case 32: 603 604 /* Line 690 of lalr1.cc */ 605 #line 135 "mesh-parser.y" 606 { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 607 break; 608 609 case 33: 610 611 /* Line 690 of lalr1.cc */ 612 #line 136 "mesh-parser.y" 613 { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 614 break; 615 616 case 34: 617 618 /* Line 690 of lalr1.cc */ 597 { mc.m_mesh.MirrorZ(); } 598 break; 599 600 case 35: 601 602 /* Line 677 of lalr1.cc */ 619 603 #line 137 "mesh-parser.y" 620 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }621 break;622 623 case 35:624 625 /* Line 690 of lalr1.cc */626 #line 138 "mesh-parser.y"627 { mc.m_mesh.MirrorX(); }628 break;629 630 case 36:631 632 /* Line 690 of lalr1.cc */633 #line 139 "mesh-parser.y"634 { mc.m_mesh.MirrorY(); }635 break;636 637 case 37:638 639 /* Line 690 of lalr1.cc */640 #line 140 "mesh-parser.y"641 { mc.m_mesh.MirrorZ(); }642 break;643 644 case 38:645 646 /* Line 690 of lalr1.cc */647 #line 144 "mesh-parser.y"648 604 { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 649 605 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, … … 651 607 break; 652 608 653 case 3 9:654 655 /* Line 6 90of lalr1.cc */656 #line 14 7"mesh-parser.y"609 case 36: 610 611 /* Line 677 of lalr1.cc */ 612 #line 140 "mesh-parser.y" 657 613 { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 658 614 break; 659 615 660 case 40:661 662 /* Line 6 90of lalr1.cc */663 #line 14 8"mesh-parser.y"616 case 37: 617 618 /* Line 677 of lalr1.cc */ 619 #line 141 "mesh-parser.y" 664 620 { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 665 621 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 666 622 break; 667 623 668 case 41:669 670 /* Line 6 90of lalr1.cc */671 #line 1 50"mesh-parser.y"624 case 38: 625 626 /* Line 677 of lalr1.cc */ 627 #line 143 "mesh-parser.y" 672 628 { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 673 629 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 674 630 break; 675 631 676 case 42:677 678 /* Line 6 90of lalr1.cc */679 #line 1 52"mesh-parser.y"632 case 39: 633 634 /* Line 677 of lalr1.cc */ 635 #line 145 "mesh-parser.y" 680 636 { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, 681 637 vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 682 638 break; 683 639 684 case 4 3:685 686 /* Line 6 90of lalr1.cc */687 #line 1 54"mesh-parser.y"640 case 40: 641 642 /* Line 677 of lalr1.cc */ 643 #line 147 "mesh-parser.y" 688 644 { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, 689 645 (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } 690 646 break; 691 647 692 case 4 4:693 694 /* Line 6 90of lalr1.cc */695 #line 1 56"mesh-parser.y"648 case 41: 649 650 /* Line 677 of lalr1.cc */ 651 #line 149 "mesh-parser.y" 696 652 { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 697 653 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } 698 654 break; 699 655 656 case 42: 657 658 /* Line 677 of lalr1.cc */ 659 #line 151 "mesh-parser.y" 660 { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } 661 break; 662 663 case 43: 664 665 /* Line 677 of lalr1.cc */ 666 #line 152 "mesh-parser.y" 667 { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 668 break; 669 670 case 44: 671 672 /* Line 677 of lalr1.cc */ 673 #line 153 "mesh-parser.y" 674 { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 675 break; 676 700 677 case 45: 701 678 702 /* Line 690 of lalr1.cc */ 703 #line 158 "mesh-parser.y" 704 { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } 705 break; 706 707 case 46: 708 709 /* Line 690 of lalr1.cc */ 710 #line 159 "mesh-parser.y" 711 { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 712 break; 713 714 case 47: 715 716 /* Line 690 of lalr1.cc */ 717 #line 160 "mesh-parser.y" 718 { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 719 break; 720 721 case 48: 722 723 /* Line 690 of lalr1.cc */ 724 #line 161 "mesh-parser.y" 679 /* Line 677 of lalr1.cc */ 680 #line 154 "mesh-parser.y" 725 681 { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, 726 682 (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6, (int)(yysemantic_stack_[(2) - (2)].args).f7); } 727 683 break; 728 684 685 case 46: 686 687 /* Line 677 of lalr1.cc */ 688 #line 158 "mesh-parser.y" 689 { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } 690 break; 691 692 case 47: 693 694 /* Line 677 of lalr1.cc */ 695 #line 159 "mesh-parser.y" 696 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } 697 break; 698 699 case 48: 700 701 /* Line 677 of lalr1.cc */ 702 #line 160 "mesh-parser.y" 703 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } 704 break; 705 729 706 case 49: 730 707 731 /* Line 690 of lalr1.cc */ 708 /* Line 677 of lalr1.cc */ 709 #line 161 "mesh-parser.y" 710 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } 711 break; 712 713 case 50: 714 715 /* Line 677 of lalr1.cc */ 716 #line 162 "mesh-parser.y" 717 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } 718 break; 719 720 case 51: 721 722 /* Line 677 of lalr1.cc */ 723 #line 163 "mesh-parser.y" 724 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } 725 break; 726 727 case 52: 728 729 /* Line 677 of lalr1.cc */ 730 #line 164 "mesh-parser.y" 731 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } 732 break; 733 734 case 53: 735 736 /* Line 677 of lalr1.cc */ 732 737 #line 165 "mesh-parser.y" 733 { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } 734 break; 735 736 case 50: 737 738 /* Line 690 of lalr1.cc */ 739 #line 166 "mesh-parser.y" 740 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } 741 break; 742 743 case 51: 744 745 /* Line 690 of lalr1.cc */ 746 #line 167 "mesh-parser.y" 747 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } 748 break; 749 750 case 52: 751 752 /* Line 690 of lalr1.cc */ 738 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } 739 break; 740 741 case 54: 742 743 /* Line 677 of lalr1.cc */ 753 744 #line 168 "mesh-parser.y" 754 { (yyval. args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); }755 break; 756 757 case 5 3:758 759 /* Line 6 90of lalr1.cc */745 { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } 746 break; 747 748 case 55: 749 750 /* Line 677 of lalr1.cc */ 760 751 #line 169 "mesh-parser.y" 761 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); }762 break;763 764 case 54:765 766 /* Line 690 of lalr1.cc */767 #line 170 "mesh-parser.y"768 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); }769 break;770 771 case 55:772 773 /* Line 690 of lalr1.cc */774 #line 171 "mesh-parser.y"775 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); }776 break;777 778 case 56:779 780 /* Line 690 of lalr1.cc */781 #line 172 "mesh-parser.y"782 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); }783 break;784 785 case 57:786 787 /* Line 690 of lalr1.cc */788 #line 175 "mesh-parser.y"789 { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); }790 break;791 792 case 58:793 794 /* Line 690 of lalr1.cc */795 #line 176 "mesh-parser.y"796 752 { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } 797 753 break; … … 799 755 800 756 801 /* Line 6 90of lalr1.cc */802 #line 803"generated/mesh-parser.cpp"757 /* Line 677 of lalr1.cc */ 758 #line 759 "generated/mesh-parser.cpp" 803 759 default: 804 760 break; 805 761 } 806 /* User semantic actions sometimes alter yychar, and that requires807 that yytoken be updated with the new translation. We take the808 approach of translating immediately before every use of yytoken.809 One alternative is translating here after every semantic action,810 but that translation would be missed if the semantic action811 invokes YYABORT, YYACCEPT, or YYERROR immediately after altering812 yychar. In the case of YYABORT or YYACCEPT, an incorrect813 destructor might then be invoked immediately. In the case of814 YYERROR, subsequent parser actions might lead to an incorrect815 destructor call or verbose syntax error message before the816 lookahead is translated. */817 762 YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); 818 763 … … 838 783 `------------------------------------*/ 839 784 yyerrlab: 840 /* Make sure we have latest lookahead translation. See comments at841 user semantic actions for why this is necessary. */842 yytoken = yytranslate_ (yychar);843 844 785 /* If not already recovering from an error, report this error. */ 845 786 if (!yyerrstatus_) 846 787 { 847 788 ++yynerrs_; 848 if (yychar == yyempty_)849 yytoken = yyempty_;850 789 error (yylloc, yysyntax_error_ (yystate, yytoken)); 851 790 } 852 791 853 yyerror_range[ 1] = yylloc;792 yyerror_range[0] = yylloc; 854 793 if (yyerrstatus_ == 3) 855 794 { … … 886 825 goto yyerrorlab; 887 826 888 yyerror_range[ 1] = yylocation_stack_[yylen - 1];827 yyerror_range[0] = yylocation_stack_[yylen - 1]; 889 828 /* Do not reclaim the symbols of the rule which action triggered 890 829 this YYERROR. */ … … 903 842 { 904 843 yyn = yypact_[yystate]; 905 if ( !yy_pact_value_is_default_ (yyn))844 if (yyn != yypact_ninf_) 906 845 { 907 846 yyn += yyterror_; … … 918 857 YYABORT; 919 858 920 yyerror_range[ 1] = yylocation_stack_[0];859 yyerror_range[0] = yylocation_stack_[0]; 921 860 yydestruct_ ("Error: popping", 922 861 yystos_[yystate], … … 927 866 } 928 867 929 yyerror_range[ 2] = yylloc;868 yyerror_range[1] = yylloc; 930 869 // Using YYLLOC is tempting, but would change the location of 931 870 // the lookahead. YYLOC is available though. 932 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);871 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); 933 872 yysemantic_stack_.push (yylval); 934 873 yylocation_stack_.push (yyloc); … … 953 892 yyreturn: 954 893 if (yychar != yyempty_) 955 { 956 /* Make sure we have latest lookahead translation. See comments 957 at user semantic actions for why this is necessary. */ 958 yytoken = yytranslate_ (yychar); 959 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, 960 &yylloc); 961 } 894 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); 962 895 963 896 /* Do not reclaim the symbols of the rule which action triggered … … 978 911 // Generate an error message. 979 912 std::string 980 MeshParser::yysyntax_error_ (int yystate, int yytoken) 981 { 982 std::string yyres; 983 // Number of reported tokens (one for the "unexpected", one per 984 // "expected"). 985 size_t yycount = 0; 986 // Its maximum. 987 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 988 // Arguments of yyformat. 989 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 990 991 /* There are many possibilities here to consider: 992 - If this state is a consistent state with a default action, then 993 the only way this function was invoked is if the default action 994 is an error action. In that case, don't check for expected 995 tokens because there are none. 996 - The only way there can be no lookahead present (in yytoken) is 997 if this state is a consistent state with a default action. 998 Thus, detecting the absence of a lookahead is sufficient to 999 determine that there is no unexpected or expected token to 1000 report. In that case, just report a simple "syntax error". 1001 - Don't assume there isn't a lookahead just because this state is 1002 a consistent state with a default action. There might have 1003 been a previous inconsistent state, consistent state with a 1004 non-default action, or user semantic action that manipulated 1005 yychar. 1006 - Of course, the expected token list depends on states to have 1007 correct lookahead information, and it depends on the parser not 1008 to perform extra reductions after fetching a lookahead from the 1009 scanner and before detecting a syntax error. Thus, state 1010 merging (from LALR or IELR) and default reductions corrupt the 1011 expected token list. However, the list is correct for 1012 canonical LR with one exception: it will still contain any 1013 token that will not be accepted due to an error action in a 1014 later state. 1015 */ 1016 if (yytoken != yyempty_) 913 MeshParser::yysyntax_error_ (int yystate, int tok) 914 { 915 std::string res; 916 YYUSE (yystate); 917 #if YYERROR_VERBOSE 918 int yyn = yypact_[yystate]; 919 if (yypact_ninf_ < yyn && yyn <= yylast_) 1017 920 { 1018 yyarg[yycount++] = yytname_[yytoken]; 1019 int yyn = yypact_[yystate]; 1020 if (!yy_pact_value_is_default_ (yyn)) 1021 { 1022 /* Start YYX at -YYN if negative to avoid negative indexes in 1023 YYCHECK. In other words, skip the first -YYN actions for 1024 this state because they are default actions. */ 1025 int yyxbegin = yyn < 0 ? -yyn : 0; 1026 /* Stay within bounds of both yycheck and yytname. */ 1027 int yychecklim = yylast_ - yyn + 1; 1028 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 1029 for (int yyx = yyxbegin; yyx < yyxend; ++yyx) 1030 if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ 1031 && !yy_table_value_is_error_ (yytable_[yyx + yyn])) 1032 { 1033 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1034 { 1035 yycount = 1; 1036 break; 1037 } 1038 else 1039 yyarg[yycount++] = yytname_[yyx]; 1040 } 1041 } 921 /* Start YYX at -YYN if negative to avoid negative indexes in 922 YYCHECK. */ 923 int yyxbegin = yyn < 0 ? -yyn : 0; 924 925 /* Stay within bounds of both yycheck and yytname. */ 926 int yychecklim = yylast_ - yyn + 1; 927 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 928 int count = 0; 929 for (int x = yyxbegin; x < yyxend; ++x) 930 if (yycheck_[x + yyn] == x && x != yyterror_) 931 ++count; 932 933 // FIXME: This method of building the message is not compatible 934 // with internationalization. It should work like yacc.c does it. 935 // That is, first build a string that looks like this: 936 // "syntax error, unexpected %s or %s or %s" 937 // Then, invoke YY_ on this string. 938 // Finally, use the string as a format to output 939 // yytname_[tok], etc. 940 // Until this gets fixed, this message appears in English only. 941 res = "syntax error, unexpected "; 942 res += yytnamerr_ (yytname_[tok]); 943 if (count < 5) 944 { 945 count = 0; 946 for (int x = yyxbegin; x < yyxend; ++x) 947 if (yycheck_[x + yyn] == x && x != yyterror_) 948 { 949 res += (!count++) ? ", expecting " : " or "; 950 res += yytnamerr_ (yytname_[x]); 951 } 952 } 1042 953 } 1043 1044 char const* yyformat = 0; 1045 switch (yycount) 1046 { 1047 #define YYCASE_(N, S) \ 1048 case N: \ 1049 yyformat = S; \ 1050 break 1051 YYCASE_(0, YY_("syntax error")); 1052 YYCASE_(1, YY_("syntax error, unexpected %s")); 1053 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1054 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1055 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1056 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1057 #undef YYCASE_ 1058 } 1059 1060 // Argument number. 1061 size_t yyi = 0; 1062 for (char const* yyp = yyformat; *yyp; ++yyp) 1063 if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) 1064 { 1065 yyres += yytnamerr_ (yyarg[yyi++]); 1066 ++yyp; 1067 } 1068 else 1069 yyres += *yyp; 1070 return yyres; 954 else 955 #endif 956 res = YY_("syntax error"); 957 return res; 1071 958 } 1072 959 … … 1074 961 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1075 962 STATE-NUM. */ 1076 const signed char MeshParser::yypact_ninf_ = -4 7;963 const signed char MeshParser::yypact_ninf_ = -44; 1077 964 const signed char 1078 965 MeshParser::yypact_[] = 1079 966 { 1080 33, -47, -47, 70, 75, -11, -11, -11, -11, -47,1081 -1 1, -11, -11, -11, -47, -11, -11, -11, -11, -47,1082 -1 1, -11, -11, -11, -11, -11, -11, -11, -11, -11,1083 -1 1, -11, -11, -47, 6, 9, 33, 33, 68, -47,1084 -4 7, -47, -47, -47, -47, -47, -11, -11, -11, -11,1085 -4 7, -47, -47, -47, -47, -47, -47, -47, -47, -47,1086 -4 7, -47, -47, -47, -47, -47, -47, -47, -11, -11,1087 -4 7, -47, -47, -47, -47, -47, -47, -47, -47, -47,1088 - 11, -11, -47, -47, -47, -47, -27, -47, -47, -47,1089 -4 7, -47, -47, -47, -47, -47, -47, -471090 }; 1091 1092 /* YYDEFACT[S] -- default r eduction number in state S. Performed when1093 YYTABLE doesn't specify something else to do. Zero means the1094 default is anerror. */967 33, 68, 73, -10, -10, -10, -10, -44, -10, -10, 968 -10, -10, -44, -10, -10, -10, -10, -44, -10, -10, 969 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 970 -10, -44, 6, 9, 33, 33, 67, -44, -44, -44, 971 -44, -44, -44, -10, -10, -10, -10, -44, -44, -44, 972 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 973 -44, -44, -44, -44, -44, -10, -10, -44, -44, -44, 974 -44, -44, -44, -44, -44, -44, -44, -10, -10, -44, 975 -44, -44, -44, -26, -44, -44, -44, -44, -44, -44, 976 -44, -44, -44, -44, -44 977 }; 978 979 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 980 doesn't specify something else to do. Zero means the default is an 981 error. */ 1095 982 const unsigned char 1096 983 MeshParser::yydefact_[] = 1097 984 { 1098 0, 15, 16, 0, 0, 0, 0, 0, 0, 35,1099 0, 0, 0, 0, 36, 0, 0, 0, 0, 37,985 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 986 0, 0, 33, 0, 0, 0, 0, 34, 0, 0, 1100 987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1101 0, 0, 0, 7, 0, 0, 3, 0, 5, 9,1102 1 1, 12, 13, 14, 57, 18, 0, 0, 0, 0,1103 1 7, 49, 20, 19, 21, 25, 28, 31, 22, 26,1104 2 9, 32, 23, 27, 30, 33, 24, 34, 0, 0,1105 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,1106 0, 0, 48, 1, 2, 4, 0, 10, 58, 50,1107 51, 52, 53, 54, 55, 56,8, 6988 0, 7, 0, 0, 3, 0, 5, 9, 11, 12, 989 13, 54, 15, 0, 0, 0, 0, 14, 46, 17, 990 16, 18, 22, 25, 28, 19, 23, 26, 29, 20, 991 24, 27, 30, 21, 31, 0, 0, 35, 36, 37, 992 38, 39, 40, 41, 42, 43, 44, 0, 0, 45, 993 1, 2, 4, 0, 10, 55, 47, 48, 49, 50, 994 51, 52, 53, 8, 6 1108 995 }; 1109 996 … … 1112 999 MeshParser::yypgoto_[] = 1113 1000 { 1114 -47, -47, -6, -47, -47, -47, -47, -24, -47, -47, 1115 -47, -47, 2, 38, 96, 1, -8, -16, -47, -47, 1116 -46 1001 -44, -44, -4, -44, -44, -44, -44, -22, -44, -44, 1002 -44, 4, 38, 95, 3, -9, -11, -44, -44, -43 1117 1003 }; 1118 1004 … … 1121 1007 MeshParser::yydefgoto_[] = 1122 1008 { 1123 -1, 34, 35, 36, 37, 97, 38, 39, 40, 41, 1124 42, 43, 47, 48, 49, 68, 69, 70, 81, 82, 1125 51 1009 -1, 32, 33, 34, 35, 94, 36, 37, 38, 39, 1010 40, 44, 45, 46, 65, 66, 67, 78, 79, 48 1126 1011 }; 1127 1012 1128 1013 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 1129 1014 positive, shift that token. If negative, reduce the rule which 1130 number is the opposite. If YYTABLE_NINF_, syntax error. */1015 number is the opposite. If zero, do what YYDEFACT says. */ 1131 1016 const signed char MeshParser::yytable_ninf_ = -1; 1132 1017 const unsigned char 1133 1018 MeshParser::yytable_[] = 1134 1019 { 1135 8 8, 89, 90, 91, 50, 53, 83, 54, 55, 84,1136 5 7, 96, 58, 59, 87, 61, 80, 62, 63, 75,1137 6 5, 0, 92, 93, 44, 72, 73, 74, 46, 76,1138 8 5, 86, 0, 0, 94, 95, 1, 2, 3, 4,1020 85, 86, 87, 88, 47, 50, 80, 51, 52, 81, 1021 54, 93, 55, 56, 84, 58, 72, 59, 60, 77, 1022 62, 0, 89, 90, 41, 69, 70, 71, 43, 73, 1023 82, 83, 0, 0, 91, 92, 1, 2, 3, 4, 1139 1024 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1140 1025 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1141 25, 26, 27, 28, 29, 30, 31, 32, 78, 79,1142 33, 1, 2, 3, 4, 5, 6, 7, 8, 9,1143 1 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,1144 2 0, 21, 22, 23, 24, 25, 26, 27, 28, 29,1145 30, 31, 32, 56, 0, 44, 45, 0, 60, 46,1146 44, 52, 0, 64, 46, 0, 66, 67, 0, 71,1147 0, 0, 0, 0, 0, 771026 25, 26, 27, 28, 29, 30, 75, 76, 0, 31, 1027 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1028 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1029 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1030 53, 0, 41, 42, 0, 57, 43, 41, 49, 0, 1031 61, 43, 0, 63, 64, 0, 68, 0, 0, 0, 1032 0, 0, 74 1148 1033 }; 1149 1034 … … 1152 1037 MeshParser::yycheck_[] = 1153 1038 { 1154 4 6, 47, 48, 49, 3, 4, 0, 5, 6, 0,1155 8, 38, 10, 11, 38, 13, 32, 15, 16, 27,1156 1 8, -1, 68, 69, 35, 24, 25, 26, 39, 28,1157 3 6, 37, -1, -1, 80, 81, 3, 4, 5, 6,1039 43, 44, 45, 46, 1, 2, 0, 3, 4, 0, 1040 6, 37, 8, 9, 36, 11, 25, 13, 14, 30, 1041 16, -1, 65, 66, 34, 22, 23, 24, 38, 26, 1042 34, 35, -1, -1, 77, 78, 3, 4, 5, 6, 1158 1043 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1159 1044 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1160 27, 28, 29, 30, 31, 32, 33, 34, 30, 31,1161 37, 3, 4, 5, 6, 7, 8, 9, 10, 11,1162 1 2, 13, 14, 15, 16, 17, 18, 19, 20, 21,1163 2 2, 23, 24, 25, 26, 27, 28, 29, 30, 31,1164 32, 33, 34, 7, -1, 35, 36, -1, 12, 39,1165 35, 36, -1, 17, 39, -1, 20, 21, -1, 23,1166 -1, -1, -1, -1, -1, 291045 27, 28, 29, 30, 31, 32, 28, 29, -1, 36, 1046 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1047 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1048 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1049 5, -1, 34, 35, -1, 10, 38, 34, 35, -1, 1050 15, 38, -1, 18, 19, -1, 21, -1, -1, -1, 1051 -1, -1, 27 1167 1052 }; 1168 1053 … … 1175 1060 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1176 1061 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1177 32, 3 3, 34, 37, 41, 42, 43, 44, 46, 47,1178 4 8, 49, 50, 51, 35, 36, 39, 52, 53, 54,1179 5 5, 60, 36, 55, 52, 52, 54, 52, 52, 52,1180 5 4, 52, 52, 52, 54, 52, 54, 54, 55, 56,1181 5 7, 54, 55, 55, 55, 56, 55, 54, 53, 53,1182 57, 58, 59, 0, 0, 42, 42, 47, 60, 60,1183 60, 60, 60, 60, 60, 60, 38, 451062 32, 36, 40, 41, 42, 43, 45, 46, 47, 48, 1063 49, 34, 35, 38, 50, 51, 52, 53, 58, 35, 1064 53, 50, 50, 52, 50, 50, 50, 52, 50, 50, 1065 50, 52, 50, 52, 52, 53, 54, 55, 52, 53, 1066 53, 53, 54, 53, 52, 51, 51, 55, 56, 57, 1067 0, 0, 41, 41, 46, 58, 58, 58, 58, 58, 1068 58, 58, 58, 37, 44 1184 1069 }; 1185 1070 … … 1193 1078 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1194 1079 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1195 285, 286, 287, 288, 289, 290, 291,91, 93, 451080 285, 286, 287, 288, 289, 290, 91, 93, 45 1196 1081 }; 1197 1082 #endif … … 1201 1086 MeshParser::yyr1_[] = 1202 1087 { 1203 0, 40, 41, 42, 42, 43, 43, 44, 45, 46,1204 4 6, 47, 47, 47, 47, 48, 48, 49, 49, 49,1205 4 9, 50, 50, 50, 50, 50, 50, 50, 50, 50,1206 50, 50, 50, 50, 50, 50, 50, 50, 51, 51,1207 51, 51, 51, 51, 51, 51, 51, 51, 51, 52,1208 5 3, 54, 55, 56, 57, 58, 59, 60, 601088 0, 39, 40, 41, 41, 42, 42, 43, 44, 45, 1089 45, 46, 46, 46, 47, 47, 47, 47, 48, 48, 1090 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 1091 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 1092 49, 49, 49, 49, 49, 49, 50, 51, 52, 53, 1093 54, 55, 56, 57, 58, 58 1209 1094 }; 1210 1095 … … 1214 1099 { 1215 1100 0, 2, 2, 1, 2, 1, 3, 1, 1, 1, 1216 2, 1, 1, 1, 1, 1, 1, 2, 2, 2,1217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1218 2, 2, 2, 2, 2, 1, 1, 1, 2, 2,1219 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,1220 2, 2, 2, 2, 2, 2, 2,1, 21101 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1103 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1104 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1105 2, 2, 2, 2, 1, 2 1221 1106 }; 1222 1107 … … 1227 1112 const MeshParser::yytname_[] = 1228 1113 { 1229 "T_END", "error", "$undefined", "T_INITRB", "T_FREERB", "T_COLOR", 1230 "T_BGCOLOR", "T_TRANSLATEX", "T_ROTATEX", "T_TAPERX", "T_SCALEX", 1231 "T_MIRRORX", "T_TRANSLATEY", "T_ROTATEY", "T_TAPERY", "T_SCALEY", 1232 "T_MIRRORY", "T_TRANSLATEZ", "T_ROTATEZ", "T_TAPERZ", "T_SCALEZ", 1233 "T_MIRRORZ", "T_TRANSLATE", "T_SCALE", "T_CYLINDER", "T_BOX", 1234 "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_STAR", 1235 "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "NUMBER", 1236 "COLOR", "'['", "']'", "'-'", "$accept", "mesh_description", 1237 "mesh_expression_list", "mesh_expression", "mesh_open", "mesh_close", 1238 "mesh_command_list", "mesh_command", "rb_command", "color_command", 1239 "transform_command", "primitive_command", "args1", "args2", "args3", 1240 "args4", "args5", "args6", "args7", "args8", "number", 0 1114 "T_END", "error", "$undefined", "T_COLOR", "T_BGCOLOR", "T_TRANSLATEX", 1115 "T_ROTATEX", "T_TAPERX", "T_SCALEX", "T_MIRRORX", "T_TRANSLATEY", 1116 "T_ROTATEY", "T_TAPERY", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ", 1117 "T_ROTATEZ", "T_TAPERZ", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", 1118 "T_SCALE", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", 1119 "T_SPHERE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", 1120 "T_COG", "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", 1121 "mesh_description", "mesh_expression_list", "mesh_expression", 1122 "mesh_open", "mesh_close", "mesh_command_list", "mesh_command", 1123 "color_command", "transform_command", "primitive_command", "args1", 1124 "args2", "args3", "args4", "args5", "args6", "args7", "args8", "number", 0 1241 1125 }; 1242 1126 #endif … … 1247 1131 MeshParser::yyrhs_[] = 1248 1132 { 1249 4 1, 0, -1, 42, 0, -1, 43, -1, 43, 42,1250 -1, 4 6, -1, 44, 42, 45, -1, 37, -1, 38,1251 -1, 4 7, -1, 46, 47, -1, 48, -1, 49, -1,1252 50, -1, 51, -1, 3, -1, 4, -1, 5, 55,1253 -1, 5, 36, -1, 6, 55, -1, 6, 36, -1,1254 7, 52, -1, 12, 52, -1, 17, 52, -1, 22,1255 5 4, -1, 8, 52, -1, 13, 52, -1, 18, 52,1256 -1, 9, 54, -1, 14, 54, -1, 19, 54, -1,1257 1 0, 52, -1, 15, 52, -1, 20, 52, -1, 23,1258 54, -1, 11, -1, 16, -1, 21, -1, 24, 57,1259 -1, 25, 5 4, -1, 26, 55, -1, 27, 55, -1,1260 28, 5 5, -1, 29, 56, -1, 30, 55, -1, 31,1261 5 4, -1, 32, 53, -1, 33, 53, -1, 34, 59,1262 -1, 60, -1, 52, 60, -1, 53, 60, -1, 54,1263 60, -1, 55, 60, -1, 56, 60, -1, 57, 60,1264 -1, 58, 60, -1, 35, -1, 39, 60, -11133 40, 0, -1, 41, 0, -1, 42, -1, 42, 41, 1134 -1, 45, -1, 43, 41, 44, -1, 36, -1, 37, 1135 -1, 46, -1, 45, 46, -1, 47, -1, 48, -1, 1136 49, -1, 3, 53, -1, 3, 35, -1, 4, 53, 1137 -1, 4, 35, -1, 5, 50, -1, 10, 50, -1, 1138 15, 50, -1, 20, 52, -1, 6, 50, -1, 11, 1139 50, -1, 16, 50, -1, 7, 52, -1, 12, 52, 1140 -1, 17, 52, -1, 8, 50, -1, 13, 50, -1, 1141 18, 50, -1, 21, 52, -1, 9, -1, 14, -1, 1142 19, -1, 22, 55, -1, 23, 52, -1, 24, 53, 1143 -1, 25, 53, -1, 26, 53, -1, 27, 54, -1, 1144 28, 53, -1, 29, 52, -1, 30, 51, -1, 31, 1145 51, -1, 32, 57, -1, 58, -1, 50, 58, -1, 1146 51, 58, -1, 52, 58, -1, 53, 58, -1, 54, 1147 58, -1, 55, 58, -1, 56, 58, -1, 34, -1, 1148 38, 58, -1 1265 1149 }; 1266 1150 … … 1271 1155 { 1272 1156 0, 0, 3, 6, 8, 11, 13, 17, 19, 21, 1273 23, 26, 28, 30, 32, 3 4, 36, 38, 41, 44,1274 47, 50, 53, 56, 59, 62, 65, 68, 71, 74,1275 77, 80, 83, 86, 89, 92, 94, 96, 98, 101,1276 10 4, 107, 110, 113, 116, 119, 122, 125, 128, 131,1277 13 3, 136, 139, 142, 145, 148, 151, 154, 1561157 23, 26, 28, 30, 32, 35, 38, 41, 44, 47, 1158 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 1159 80, 83, 86, 88, 90, 92, 95, 98, 101, 104, 1160 107, 110, 113, 116, 119, 122, 125, 127, 130, 133, 1161 136, 139, 142, 145, 148, 150 1278 1162 }; 1279 1163 … … 1282 1166 MeshParser::yyrline_[] = 1283 1167 { 1284 0, 7 4, 74, 78, 79, 83, 84, 88, 92, 96,1285 9 7, 101, 102, 103, 104, 108, 109, 113, 114, 117,1286 11 8, 124, 125, 126, 127, 128, 129, 130, 131, 132,1287 1 33, 134, 135, 136, 137, 138, 139, 140, 144, 147,1288 14 8, 150, 152, 154, 156, 158, 159, 160, 161, 165,1289 16 6, 167, 168, 169, 170, 171, 172, 175, 1761168 0, 73, 73, 77, 78, 82, 83, 87, 91, 95, 1169 96, 100, 101, 102, 106, 107, 110, 111, 117, 118, 1170 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 1171 129, 130, 131, 132, 133, 137, 140, 141, 143, 145, 1172 147, 149, 151, 152, 153, 154, 158, 159, 160, 161, 1173 162, 163, 164, 165, 168, 169 1290 1174 }; 1291 1175 … … 1331 1215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1332 1216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1333 2, 2, 2, 2, 2, 3 9, 2, 2, 2, 2,1334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1338 2, 3 7, 2, 38, 2, 2, 2, 2, 2, 2,1217 2, 2, 2, 2, 2, 38, 2, 2, 2, 2, 1218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1222 2, 36, 2, 37, 2, 2, 2, 2, 2, 2, 1339 1223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1340 1224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 1356 1240 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1357 1241 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1358 35 , 361242 35 1359 1243 }; 1360 1244 if ((unsigned int) t <= yyuser_token_number_max_) … … 1365 1249 1366 1250 const int MeshParser::yyeof_ = 0; 1367 const int MeshParser::yylast_ = 12 5;1368 const int MeshParser::yynnts_ = 2 1;1251 const int MeshParser::yylast_ = 122; 1252 const int MeshParser::yynnts_ = 20; 1369 1253 const int MeshParser::yyempty_ = -2; 1370 const int MeshParser::yyfinal_ = 8 3;1254 const int MeshParser::yyfinal_ = 80; 1371 1255 const int MeshParser::yyterror_ = 1; 1372 1256 const int MeshParser::yyerrcode_ = 256; 1373 const int MeshParser::yyntokens_ = 40;1374 1375 const unsigned int MeshParser::yyuser_token_number_max_ = 29 1;1257 const int MeshParser::yyntokens_ = 39; 1258 1259 const unsigned int MeshParser::yyuser_token_number_max_ = 290; 1376 1260 const MeshParser::token_number_type MeshParser::yyundef_token_ = 2; 1377 1261 … … 1379 1263 } // orbital 1380 1264 1381 /* Line 1 136of lalr1.cc */1382 #line 1 383"generated/mesh-parser.cpp"1383 1384 1385 /* Line 1 138of lalr1.cc */1386 #line 17 9"mesh-parser.y"1265 /* Line 1053 of lalr1.cc */ 1266 #line 1267 "generated/mesh-parser.cpp" 1267 1268 1269 /* Line 1055 of lalr1.cc */ 1270 #line 172 "mesh-parser.y" 1387 1271 1388 1272
Note: See TracChangeset
for help on using the changeset viewer.