Changeset 1506
- Timestamp:
- Jun 21, 2012, 1:41:01 PM (11 years ago)
- Location:
- trunk/orbital
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/orbital/generated/mesh-parser.cpp
r1495 r1506 70 70 71 71 /* Line 299 of lalr1.cc */ 72 #line 6 3"mesh-parser.y"72 #line 64 "mesh-parser.y" 73 73 74 74 #include "../mesh-compiler.h" … … 466 466 467 467 /* Line 690 of lalr1.cc */ 468 #line 8 7"mesh-parser.y"468 #line 88 "mesh-parser.y" 469 469 { mc.m_mesh.OpenBrace(); } 470 470 break; … … 473 473 474 474 /* Line 690 of lalr1.cc */ 475 #line 9 1"mesh-parser.y"475 #line 92 "mesh-parser.y" 476 476 { mc.m_mesh.CloseBrace(); } 477 477 break; … … 480 480 481 481 /* Line 690 of lalr1.cc */ 482 #line 10 6"mesh-parser.y"482 #line 107 "mesh-parser.y" 483 483 { 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)); } 484 484 break; … … 487 487 488 488 /* Line 690 of lalr1.cc */ 489 #line 10 7"mesh-parser.y"489 #line 108 "mesh-parser.y" 490 490 { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); 491 491 vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); … … 496 496 497 497 /* Line 690 of lalr1.cc */ 498 #line 11 0"mesh-parser.y"498 #line 111 "mesh-parser.y" 499 499 { 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)); } 500 500 break; … … 503 503 504 504 /* Line 690 of lalr1.cc */ 505 #line 11 1"mesh-parser.y"505 #line 112 "mesh-parser.y" 506 506 { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); 507 507 vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); … … 512 512 513 513 /* Line 690 of lalr1.cc */ 514 #line 117 "mesh-parser.y" 514 #line 118 "mesh-parser.y" 515 { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); } 516 break; 517 518 case 19: 519 520 /* Line 690 of lalr1.cc */ 521 #line 119 "mesh-parser.y" 515 522 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 516 523 break; 517 524 518 case 19:519 520 /* Line 690 of lalr1.cc */ 521 #line 1 18"mesh-parser.y"525 case 20: 526 527 /* Line 690 of lalr1.cc */ 528 #line 120 "mesh-parser.y" 522 529 { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 523 530 break; 524 531 525 case 2 0:526 527 /* Line 690 of lalr1.cc */ 528 #line 1 19"mesh-parser.y"532 case 21: 533 534 /* Line 690 of lalr1.cc */ 535 #line 121 "mesh-parser.y" 529 536 { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 530 537 break; 531 538 532 case 2 1:533 534 /* Line 690 of lalr1.cc */ 535 #line 12 0"mesh-parser.y"539 case 22: 540 541 /* Line 690 of lalr1.cc */ 542 #line 122 "mesh-parser.y" 536 543 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 537 544 break; 538 545 539 case 2 2:540 541 /* Line 690 of lalr1.cc */ 542 #line 12 1"mesh-parser.y"546 case 23: 547 548 /* Line 690 of lalr1.cc */ 549 #line 123 "mesh-parser.y" 543 550 { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); } 544 551 break; 545 552 546 case 2 3:547 548 /* Line 690 of lalr1.cc */ 549 #line 12 2"mesh-parser.y"553 case 24: 554 555 /* Line 690 of lalr1.cc */ 556 #line 124 "mesh-parser.y" 550 557 { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); } 551 558 break; 552 559 553 case 2 4:554 555 /* Line 690 of lalr1.cc */ 556 #line 12 3"mesh-parser.y"560 case 25: 561 562 /* Line 690 of lalr1.cc */ 563 #line 125 "mesh-parser.y" 557 564 { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); } 558 565 break; 559 566 560 case 2 5:561 562 /* Line 690 of lalr1.cc */ 563 #line 12 4"mesh-parser.y"567 case 26: 568 569 /* Line 690 of lalr1.cc */ 570 #line 126 "mesh-parser.y" 564 571 { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 565 572 break; 566 573 567 case 2 6:568 569 /* Line 690 of lalr1.cc */ 570 #line 12 5"mesh-parser.y"574 case 27: 575 576 /* Line 690 of lalr1.cc */ 577 #line 127 "mesh-parser.y" 571 578 { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 572 579 break; 573 580 574 case 2 7:575 576 /* Line 690 of lalr1.cc */ 577 #line 12 6"mesh-parser.y"581 case 28: 582 583 /* Line 690 of lalr1.cc */ 584 #line 128 "mesh-parser.y" 578 585 { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 579 586 break; 580 587 581 case 2 8:582 583 /* Line 690 of lalr1.cc */ 584 #line 12 7"mesh-parser.y"588 case 29: 589 590 /* Line 690 of lalr1.cc */ 591 #line 129 "mesh-parser.y" 585 592 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 586 593 break; 587 594 588 case 29:589 590 /* Line 690 of lalr1.cc */ 591 #line 1 28"mesh-parser.y"595 case 30: 596 597 /* Line 690 of lalr1.cc */ 598 #line 130 "mesh-parser.y" 592 599 { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 593 600 break; 594 601 595 case 3 0:596 597 /* Line 690 of lalr1.cc */ 598 #line 1 29"mesh-parser.y"602 case 31: 603 604 /* Line 690 of lalr1.cc */ 605 #line 131 "mesh-parser.y" 599 606 { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 600 607 break; 601 608 602 case 3 1:603 604 /* Line 690 of lalr1.cc */ 605 #line 13 0"mesh-parser.y"609 case 32: 610 611 /* Line 690 of lalr1.cc */ 612 #line 132 "mesh-parser.y" 606 613 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 607 614 break; 608 615 609 case 3 2:610 611 /* Line 690 of lalr1.cc */ 612 #line 13 1"mesh-parser.y"616 case 33: 617 618 /* Line 690 of lalr1.cc */ 619 #line 133 "mesh-parser.y" 613 620 { mc.m_mesh.MirrorX(); } 614 621 break; 615 622 616 case 3 3:617 618 /* Line 690 of lalr1.cc */ 619 #line 13 2"mesh-parser.y"623 case 34: 624 625 /* Line 690 of lalr1.cc */ 626 #line 134 "mesh-parser.y" 620 627 { mc.m_mesh.MirrorY(); } 621 628 break; 622 629 623 case 3 4:624 625 /* Line 690 of lalr1.cc */ 626 #line 13 3"mesh-parser.y"630 case 35: 631 632 /* Line 690 of lalr1.cc */ 633 #line 135 "mesh-parser.y" 627 634 { mc.m_mesh.MirrorZ(); } 628 635 break; 629 636 630 case 3 5:631 632 /* Line 690 of lalr1.cc */ 633 #line 13 7"mesh-parser.y"637 case 36: 638 639 /* Line 690 of lalr1.cc */ 640 #line 139 "mesh-parser.y" 634 641 { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 635 642 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, … … 637 644 break; 638 645 639 case 3 6:640 641 /* Line 690 of lalr1.cc */ 642 #line 14 0"mesh-parser.y"646 case 37: 647 648 /* Line 690 of lalr1.cc */ 649 #line 142 "mesh-parser.y" 643 650 { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 644 651 break; 645 652 646 case 3 7:647 648 /* Line 690 of lalr1.cc */ 649 #line 14 1"mesh-parser.y"653 case 38: 654 655 /* Line 690 of lalr1.cc */ 656 #line 143 "mesh-parser.y" 650 657 { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 651 658 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 652 659 break; 653 660 654 case 3 8:655 656 /* Line 690 of lalr1.cc */ 657 #line 14 3"mesh-parser.y"661 case 39: 662 663 /* Line 690 of lalr1.cc */ 664 #line 145 "mesh-parser.y" 658 665 { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 659 666 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 660 667 break; 661 668 662 case 39:663 664 /* Line 690 of lalr1.cc */ 665 #line 14 5"mesh-parser.y"669 case 40: 670 671 /* Line 690 of lalr1.cc */ 672 #line 147 "mesh-parser.y" 666 673 { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, 667 674 vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 668 675 break; 669 676 670 case 4 0:671 672 /* Line 690 of lalr1.cc */ 673 #line 14 7"mesh-parser.y"677 case 41: 678 679 /* Line 690 of lalr1.cc */ 680 #line 149 "mesh-parser.y" 674 681 { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, 675 682 (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } 676 683 break; 677 684 678 case 4 1:679 680 /* Line 690 of lalr1.cc */ 681 #line 1 49"mesh-parser.y"685 case 42: 686 687 /* Line 690 of lalr1.cc */ 688 #line 151 "mesh-parser.y" 682 689 { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 683 690 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } 684 691 break; 685 692 686 case 4 2:687 688 /* Line 690 of lalr1.cc */ 689 #line 15 1"mesh-parser.y"693 case 43: 694 695 /* Line 690 of lalr1.cc */ 696 #line 153 "mesh-parser.y" 690 697 { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } 691 698 break; 692 699 693 case 4 3:694 695 /* Line 690 of lalr1.cc */ 696 #line 15 2"mesh-parser.y"700 case 44: 701 702 /* Line 690 of lalr1.cc */ 703 #line 154 "mesh-parser.y" 697 704 { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 698 705 break; 699 706 700 case 4 4:701 702 /* Line 690 of lalr1.cc */ 703 #line 15 3"mesh-parser.y"707 case 45: 708 709 /* Line 690 of lalr1.cc */ 710 #line 155 "mesh-parser.y" 704 711 { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 705 712 break; 706 713 707 case 4 5:708 709 /* Line 690 of lalr1.cc */ 710 #line 15 4"mesh-parser.y"714 case 46: 715 716 /* Line 690 of lalr1.cc */ 717 #line 156 "mesh-parser.y" 711 718 { 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, 712 719 (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); } 713 720 break; 714 721 715 case 4 6:716 717 /* Line 690 of lalr1.cc */ 718 #line 1 58"mesh-parser.y"722 case 47: 723 724 /* Line 690 of lalr1.cc */ 725 #line 160 "mesh-parser.y" 719 726 { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } 720 727 break; 721 728 722 case 4 7:723 724 /* Line 690 of lalr1.cc */ 725 #line 1 59"mesh-parser.y"729 case 48: 730 731 /* Line 690 of lalr1.cc */ 732 #line 161 "mesh-parser.y" 726 733 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } 727 734 break; 728 735 729 case 4 8:730 731 /* Line 690 of lalr1.cc */ 732 #line 16 0"mesh-parser.y"736 case 49: 737 738 /* Line 690 of lalr1.cc */ 739 #line 162 "mesh-parser.y" 733 740 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } 734 741 break; 735 742 736 case 49:737 738 /* Line 690 of lalr1.cc */ 739 #line 16 1"mesh-parser.y"743 case 50: 744 745 /* Line 690 of lalr1.cc */ 746 #line 163 "mesh-parser.y" 740 747 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } 741 748 break; 742 749 743 case 5 0:744 745 /* Line 690 of lalr1.cc */ 746 #line 16 2"mesh-parser.y"750 case 51: 751 752 /* Line 690 of lalr1.cc */ 753 #line 164 "mesh-parser.y" 747 754 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } 748 755 break; 749 756 750 case 5 1:751 752 /* Line 690 of lalr1.cc */ 753 #line 16 3"mesh-parser.y"757 case 52: 758 759 /* Line 690 of lalr1.cc */ 760 #line 165 "mesh-parser.y" 754 761 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } 755 762 break; 756 763 757 case 5 2:758 759 /* Line 690 of lalr1.cc */ 760 #line 16 4"mesh-parser.y"764 case 53: 765 766 /* Line 690 of lalr1.cc */ 767 #line 166 "mesh-parser.y" 761 768 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } 762 769 break; 763 770 764 case 5 3:765 766 /* Line 690 of lalr1.cc */ 767 #line 16 5"mesh-parser.y"771 case 54: 772 773 /* Line 690 of lalr1.cc */ 774 #line 167 "mesh-parser.y" 768 775 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } 769 776 break; 770 777 771 case 5 4:772 773 /* Line 690 of lalr1.cc */ 774 #line 1 68"mesh-parser.y"778 case 55: 779 780 /* Line 690 of lalr1.cc */ 781 #line 170 "mesh-parser.y" 775 782 { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } 776 783 break; 777 784 778 case 5 5:779 780 /* Line 690 of lalr1.cc */ 781 #line 1 69"mesh-parser.y"785 case 56: 786 787 /* Line 690 of lalr1.cc */ 788 #line 171 "mesh-parser.y" 782 789 { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } 783 790 break; … … 786 793 787 794 /* Line 690 of lalr1.cc */ 788 #line 7 89"generated/mesh-parser.cpp"795 #line 796 "generated/mesh-parser.cpp" 789 796 default: 790 797 break; … … 1060 1067 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1061 1068 STATE-NUM. */ 1062 const signed char MeshParser::yypact_ninf_ = -4 4;1069 const signed char MeshParser::yypact_ninf_ = -45; 1063 1070 const signed char 1064 1071 MeshParser::yypact_[] = 1065 1072 { 1066 3 3, 68, 73, -10, -10, -10, -10, -44, -10, -10,1067 -10, -10, -44, -10, -10, -10, -10, -44, -10, -10,1068 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,1069 -10, -44, 6, 9, 33, 33, 67, -44, -44, -44,1070 -4 4, -44, -44, -10, -10, -10, -10, -44, -44, -44,1071 -4 4, -44, -44, -44, -44, -44, -44, -44, -44, -44,1072 -4 4, -44, -44, -44, -44, -10, -10, -44, -44, -44,1073 -4 4, -44, -44, -44, -44, -44, -44, -10, -10, -44,1074 -44, -44, -44, -26, -44, -44, -44, -44, -44, -44,1075 -4 4, -44, -44, -44, -441073 34, -29, 70, -6, -6, -6, -6, -45, -6, -6, 1074 -6, -6, -45, -6, -6, -6, -6, -45, -6, -6, 1075 -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, 1076 -6, -6, -45, 12, 15, 34, 34, 69, -45, -45, 1077 -45, -45, -45, -45, -6, -6, -6, -6, -45, -45, 1078 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 1079 -45, -45, -45, -45, -45, -45, -45, -6, -6, -45, 1080 -45, -45, -45, -45, -45, -45, -45, -45, -45, -6, 1081 -6, -45, -45, -45, -45, -21, -45, -45, -45, -45, 1082 -45, -45, -45, -45, -45, -45, -45 1076 1083 }; 1077 1084 … … 1082 1089 MeshParser::yydefact_[] = 1083 1090 { 1084 0, 0, 0, 0, 0, 0, 0, 3 2, 0, 0,1085 0, 0, 3 3, 0, 0, 0, 0, 34, 0, 0,1091 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 1092 0, 0, 34, 0, 0, 0, 0, 35, 0, 0, 1086 1093 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1087 0, 7, 0, 0, 3, 0, 5, 9, 11, 12,1088 1 3, 54, 15, 0, 0, 0, 0, 14, 46, 17,1089 1 6, 18, 22, 25, 28, 19, 23, 26, 29, 20,1090 2 4, 27, 30, 21, 31, 0, 0, 35, 36, 37,1091 3 8, 39, 40, 41, 42, 43, 44, 0, 0, 45,1092 1, 2, 4, 0, 10, 55, 47, 48, 49, 50,1093 5 1, 52, 53, 8, 61094 0, 0, 7, 0, 0, 3, 0, 5, 9, 11, 1095 12, 13, 55, 15, 0, 0, 0, 0, 14, 47, 1096 17, 16, 19, 23, 26, 29, 20, 24, 27, 30, 1097 21, 25, 28, 31, 22, 32, 18, 0, 0, 36, 1098 37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 1099 0, 46, 1, 2, 4, 0, 10, 56, 48, 49, 1100 50, 51, 52, 53, 54, 8, 6 1094 1101 }; 1095 1102 … … 1098 1105 MeshParser::yypgoto_[] = 1099 1106 { 1100 -4 4, -44, -4, -44, -44, -44, -44, -22, -44, -44,1101 -4 4, 4, 38, 95, 3, -9, -11, -44, -44, -431107 -45, -45, -4, -45, -45, -45, -45, -17, -45, -45, 1108 -45, 5, 39, 98, 3, 8, -9, -45, -45, -44 1102 1109 }; 1103 1110 … … 1106 1113 MeshParser::yydefgoto_[] = 1107 1114 { 1108 -1, 3 2, 33, 34, 35, 94, 36, 37, 38, 39,1109 4 0, 44, 45, 46, 65, 66, 67, 78, 79, 481115 -1, 33, 34, 35, 36, 96, 37, 38, 39, 40, 1116 41, 45, 46, 47, 67, 68, 69, 80, 81, 49 1110 1117 }; 1111 1118 … … 1117 1124 MeshParser::yytable_[] = 1118 1125 { 1119 8 5, 86, 87, 88, 47, 50, 80, 51, 52, 81,1120 54, 93, 55, 56, 84, 58, 72, 59, 60, 77,1121 62, 0, 89, 90, 41, 69, 70, 71, 43, 73,1122 82, 83, 0, 0, 91, 92, 1, 2, 3, 4,1123 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,1124 1 5, 16, 17, 18, 19, 20, 21, 22, 23, 24,1125 2 5, 26, 27, 28, 29, 30, 75, 76, 0, 31,1126 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,1127 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,1128 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,1129 53, 0, 41, 42, 0, 57, 43, 41, 49, 0,1130 61, 43, 0, 63, 64, 0, 68, 0, 0, 0,1131 0, 0, 741126 87, 88, 89, 90, 48, 51, 42, 43, 52, 53, 1127 44, 55, 82, 56, 57, 83, 59, 95, 60, 61, 1128 86, 63, 79, 91, 92, 66, 71, 72, 73, 42, 1129 75, 84, 85, 44, 74, 93, 94, 1, 2, 3, 1130 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1131 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1132 24, 25, 26, 27, 28, 29, 30, 31, 77, 78, 1133 0, 32, 1, 2, 3, 4, 5, 6, 7, 8, 1134 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1135 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1136 29, 30, 31, 54, 0, 42, 50, 0, 58, 44, 1137 0, 0, 0, 62, 0, 0, 64, 65, 0, 0, 1138 70, 0, 0, 0, 0, 0, 76 1132 1139 }; 1133 1140 … … 1136 1143 MeshParser::yycheck_[] = 1137 1144 { 1138 4 3, 44, 45, 46, 1, 2, 0, 3, 4, 0,1139 6, 37, 8, 9, 36, 11, 25, 13, 14, 30,1140 16, -1, 65, 66, 34, 22, 23, 24, 38, 26,1141 34, 35, -1, -1, 77, 78, 3, 4, 5, 6,1142 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,1143 1 7, 18, 19, 20, 21, 22, 23, 24, 25, 26,1144 2 7, 28, 29, 30, 31, 32, 28, 29, -1, 36,1145 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,1146 1 3, 14, 15, 16, 17, 18, 19, 20, 21, 22,1147 2 3, 24, 25, 26, 27, 28, 29, 30, 31, 32,1148 5, -1, 34, 35, -1, 10, 38, 34, 35, -1,1149 15, 38, -1, 18, 19, -1, 21, -1, -1, -1,1150 -1, -1, 271145 44, 45, 46, 47, 1, 2, 35, 36, 3, 4, 1146 39, 6, 0, 8, 9, 0, 11, 38, 13, 14, 1147 37, 16, 31, 67, 68, 20, 23, 24, 25, 35, 1148 27, 35, 36, 39, 26, 79, 80, 3, 4, 5, 1149 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1150 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1151 26, 27, 28, 29, 30, 31, 32, 33, 29, 30, 1152 -1, 37, 3, 4, 5, 6, 7, 8, 9, 10, 1153 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1154 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1155 31, 32, 33, 5, -1, 35, 36, -1, 10, 39, 1156 -1, -1, -1, 15, -1, -1, 18, 19, -1, -1, 1157 22, -1, -1, -1, -1, -1, 28 1151 1158 }; 1152 1159 … … 1159 1166 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1160 1167 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1161 32, 3 6, 40, 41, 42, 43, 45, 46, 47, 48,1162 49, 34, 35, 38, 50, 51, 52, 53, 58, 35,1163 53, 50, 50, 52, 50, 50, 50, 52, 50, 50,1164 5 0, 52, 50, 52, 52, 53, 54, 55, 52, 53,1165 53, 5 3, 54, 53, 52, 51, 51, 55, 56, 57,1166 0, 0, 41, 41, 46, 58, 58, 58, 58, 58,1167 5 8, 58, 58, 37, 441168 32, 33, 37, 41, 42, 43, 44, 46, 47, 48, 1169 49, 50, 35, 36, 39, 51, 52, 53, 54, 59, 1170 36, 54, 51, 51, 53, 51, 51, 51, 53, 51, 1171 51, 51, 53, 51, 53, 53, 51, 54, 55, 56, 1172 53, 54, 54, 54, 55, 54, 53, 52, 52, 56, 1173 57, 58, 0, 0, 42, 42, 47, 59, 59, 59, 1174 59, 59, 59, 59, 59, 38, 45 1168 1175 }; 1169 1176 … … 1177 1184 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1178 1185 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1179 285, 286, 287, 288, 289, 290, 91, 93, 451186 285, 286, 287, 288, 289, 290, 291, 91, 93, 45 1180 1187 }; 1181 1188 #endif … … 1185 1192 MeshParser::yyr1_[] = 1186 1193 { 1187 0, 39, 40, 41, 41, 42, 42, 43, 44, 45,1188 4 5, 46, 46, 46, 47, 47, 47, 47, 48, 48,1189 4 8, 48, 48, 48, 48, 48, 48, 48, 48, 48,1190 4 8, 48, 48, 48, 48, 49, 49, 49, 49, 49,1191 49, 49, 49, 49, 49, 49, 50, 51, 52, 53,1192 54, 55, 56, 57, 58, 5 81194 0, 40, 41, 42, 42, 43, 43, 44, 45, 46, 1195 46, 47, 47, 47, 48, 48, 48, 48, 49, 49, 1196 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 1197 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 1198 50, 50, 50, 50, 50, 50, 50, 51, 52, 53, 1199 54, 55, 56, 57, 58, 59, 59 1193 1200 }; 1194 1201 … … 1200 1207 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1201 1208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1202 2, 2, 1, 1, 1, 2, 2, 2, 2, 2,1203 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,1204 2, 2, 2, 2, 1, 21209 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1210 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1211 2, 2, 2, 2, 2, 1, 2 1205 1212 }; 1206 1213 … … 1215 1222 "T_ROTATEY", "T_TAPERY", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ", 1216 1223 "T_ROTATEZ", "T_TAPERZ", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", 1217 "T_SCALE", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", 1218 "T_SPHERE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", 1219 "T_COG", "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", 1220 "mesh_description", "mesh_expression_list", "mesh_expression", 1221 "mesh_open", "mesh_close", "mesh_command_list", "mesh_command", 1222 "color_command", "transform_command", "primitive_command", "args1", 1223 "args2", "args3", "args4", "args5", "args6", "args7", "args8", "number", 0 1224 "T_SCALE", "T_CHAMFER", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX", 1225 "T_FLATCHAMFBOX", "T_SPHERE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC", 1226 "T_TRIANGLE", "T_QUAD", "T_COG", "T_ERROR", "NUMBER", "COLOR", "'['", 1227 "']'", "'-'", "$accept", "mesh_description", "mesh_expression_list", 1228 "mesh_expression", "mesh_open", "mesh_close", "mesh_command_list", 1229 "mesh_command", "color_command", "transform_command", 1230 "primitive_command", "args1", "args2", "args3", "args4", "args5", 1231 "args6", "args7", "args8", "number", 0 1224 1232 }; 1225 1233 #endif … … 1230 1238 MeshParser::yyrhs_[] = 1231 1239 { 1232 4 0, 0, -1, 41, 0, -1, 42, -1, 42, 41,1233 -1, 4 5, -1, 43, 41, 44, -1, 36, -1, 37,1234 -1, 4 6, -1, 45, 46, -1, 47, -1, 48, -1,1235 49, -1, 3, 53, -1, 3, 35, -1, 4, 53,1236 -1, 4, 3 5, -1, 5, 50, -1, 10, 50, -1,1237 1 5, 50, -1, 20, 52, -1, 6, 50, -1, 11,1238 5 0, -1, 16, 50, -1, 7, 52, -1, 12, 52,1239 -1, 1 7, 52, -1, 8, 50, -1, 13, 50, -1,1240 1 8, 50, -1, 21, 52, -1, 9, -1, 14, -1,1241 19, -1, 22, 55, -1, 23, 52, -1, 24, 53,1242 -1, 25, 5 3, -1, 26, 53, -1, 27, 54, -1,1243 28, 5 3, -1, 29, 52, -1, 30, 51, -1, 31,1244 5 1, -1, 32, 57, -1, 58, -1, 50, 58, -1,1245 51, 5 8, -1, 52, 58, -1, 53, 58, -1, 54,1246 5 8, -1, 55, 58, -1, 56, 58, -1, 34, -1,1247 38, 58, -11240 41, 0, -1, 42, 0, -1, 43, -1, 43, 42, 1241 -1, 46, -1, 44, 42, 45, -1, 37, -1, 38, 1242 -1, 47, -1, 46, 47, -1, 48, -1, 49, -1, 1243 50, -1, 3, 54, -1, 3, 36, -1, 4, 54, 1244 -1, 4, 36, -1, 22, 51, -1, 5, 51, -1, 1245 10, 51, -1, 15, 51, -1, 20, 53, -1, 6, 1246 51, -1, 11, 51, -1, 16, 51, -1, 7, 53, 1247 -1, 12, 53, -1, 17, 53, -1, 8, 51, -1, 1248 13, 51, -1, 18, 51, -1, 21, 53, -1, 9, 1249 -1, 14, -1, 19, -1, 23, 56, -1, 24, 53, 1250 -1, 25, 54, -1, 26, 54, -1, 27, 54, -1, 1251 28, 55, -1, 29, 54, -1, 30, 53, -1, 31, 1252 52, -1, 32, 52, -1, 33, 58, -1, 59, -1, 1253 51, 59, -1, 52, 59, -1, 53, 59, -1, 54, 1254 59, -1, 55, 59, -1, 56, 59, -1, 57, 59, 1255 -1, 35, -1, 39, 59, -1 1248 1256 }; 1249 1257 … … 1256 1264 23, 26, 28, 30, 32, 35, 38, 41, 44, 47, 1257 1265 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 1258 80, 83, 86, 8 8, 90, 92, 95, 98, 101, 104,1259 107, 110, 113, 116, 119, 122, 125, 12 7, 130, 133,1260 136, 139, 142, 145, 148, 15 01266 80, 83, 86, 89, 91, 93, 95, 98, 101, 104, 1267 107, 110, 113, 116, 119, 122, 125, 128, 130, 133, 1268 136, 139, 142, 145, 148, 151, 153 1261 1269 }; 1262 1270 … … 1265 1273 MeshParser::yyrline_[] = 1266 1274 { 1267 0, 7 3, 73, 77, 78, 82, 83, 87, 91, 95,1268 9 6, 100, 101, 102, 106, 107, 110, 111, 117, 118,1269 1 19, 120, 121, 122, 123, 124, 125, 126, 127, 128,1270 1 29, 130, 131, 132, 133, 137, 140, 141, 143, 145,1271 147, 149, 151, 15 2, 153, 154, 158, 159, 160, 161,1272 16 2, 163, 164, 165, 168, 1691275 0, 74, 74, 78, 79, 83, 84, 88, 92, 96, 1276 97, 101, 102, 103, 107, 108, 111, 112, 118, 119, 1277 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 1278 130, 131, 132, 133, 134, 135, 139, 142, 143, 145, 1279 147, 149, 151, 153, 154, 155, 156, 160, 161, 162, 1280 163, 164, 165, 166, 167, 170, 171 1273 1281 }; 1274 1282 … … 1314 1322 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1315 1323 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1316 2, 2, 2, 2, 2, 3 8, 2, 2, 2, 2,1317 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1318 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1319 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1320 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1321 2, 3 6, 2, 37, 2, 2, 2, 2, 2, 2,1324 2, 2, 2, 2, 2, 39, 2, 2, 2, 2, 1325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1328 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1329 2, 37, 2, 38, 2, 2, 2, 2, 2, 2, 1322 1330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1323 1331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 1339 1347 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1340 1348 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1341 35 1349 35, 36 1342 1350 }; 1343 1351 if ((unsigned int) t <= yyuser_token_number_max_) … … 1348 1356 1349 1357 const int MeshParser::yyeof_ = 0; 1350 const int MeshParser::yylast_ = 12 2;1358 const int MeshParser::yylast_ = 126; 1351 1359 const int MeshParser::yynnts_ = 20; 1352 1360 const int MeshParser::yyempty_ = -2; 1353 const int MeshParser::yyfinal_ = 8 0;1361 const int MeshParser::yyfinal_ = 82; 1354 1362 const int MeshParser::yyterror_ = 1; 1355 1363 const int MeshParser::yyerrcode_ = 256; 1356 const int MeshParser::yyntokens_ = 39;1357 1358 const unsigned int MeshParser::yyuser_token_number_max_ = 29 0;1364 const int MeshParser::yyntokens_ = 40; 1365 1366 const unsigned int MeshParser::yyuser_token_number_max_ = 291; 1359 1367 const MeshParser::token_number_type MeshParser::yyundef_token_ = 2; 1360 1368 … … 1363 1371 1364 1372 /* Line 1136 of lalr1.cc */ 1365 #line 13 66"generated/mesh-parser.cpp"1373 #line 1374 "generated/mesh-parser.cpp" 1366 1374 1367 1375 1368 1376 /* Line 1138 of lalr1.cc */ 1369 #line 17 2"mesh-parser.y"1377 #line 174 "mesh-parser.y" 1370 1378 1371 1379 -
trunk/orbital/generated/mesh-parser.h
r1495 r1506 119 119 T_TRANSLATE = 275, 120 120 T_SCALE = 276, 121 T_CYLINDER = 277, 122 T_BOX = 278, 123 T_SMOOTHCHAMFBOX = 279, 124 T_FLATCHAMFBOX = 280, 125 T_SPHERE = 281, 126 T_STAR = 282, 127 T_EXPANDEDSTAR = 283, 128 T_DISC = 284, 129 T_TRIANGLE = 285, 130 T_QUAD = 286, 131 T_COG = 287, 132 T_ERROR = 288, 133 NUMBER = 289, 134 COLOR = 290 121 T_CHAMFER = 277, 122 T_CYLINDER = 278, 123 T_BOX = 279, 124 T_SMOOTHCHAMFBOX = 280, 125 T_FLATCHAMFBOX = 281, 126 T_SPHERE = 282, 127 T_STAR = 283, 128 T_EXPANDEDSTAR = 284, 129 T_DISC = 285, 130 T_TRIANGLE = 286, 131 T_QUAD = 287, 132 T_COG = 288, 133 T_ERROR = 289, 134 NUMBER = 290, 135 COLOR = 291 135 136 }; 136 137 … … 312 313 313 314 /* Line 35 of lalr1.cc */ 314 #line 31 5"generated/mesh-parser.h"315 #line 316 "generated/mesh-parser.h" 315 316 316 317 -
trunk/orbital/generated/mesh-scanner.cpp
r1495 r1506 331 331 (yy_c_buf_p) = yy_cp; 332 332 333 #define YY_NUM_RULES 4 2334 #define YY_END_OF_BUFFER 4 3333 #define YY_NUM_RULES 43 334 #define YY_END_OF_BUFFER 44 335 335 /* This struct is not used in this scanner, 336 336 but its presence is necessary. */ … … 340 340 flex_int32_t yy_nxt; 341 341 }; 342 static yyconst flex_int16_t yy_accept[ 68] =342 static yyconst flex_int16_t yy_accept[70] = 343 343 { 0, 344 0, 0, 4 3, 41, 40, 39, 41, 41, 36, 41,345 3 5, 37, 38, 41, 41, 41, 16, 6, 0, 0,346 35, 35, 0, 21, 20, 27, 0, 0, 29, 25,347 2 8, 17, 18, 19, 7, 8, 9, 1, 13, 14,348 1 5, 0, 3, 4, 5, 0, 0, 35, 30, 26,349 0, 0, 0, 2, 10, 11, 12, 31, 23, 22,350 24, 32, 0, 33, 0, 34, 0344 0, 0, 44, 42, 41, 40, 42, 42, 37, 42, 345 36, 38, 39, 42, 42, 42, 42, 17, 7, 0, 346 0, 36, 36, 0, 22, 21, 28, 0, 0, 30, 347 26, 29, 3, 18, 19, 20, 8, 9, 10, 1, 348 14, 15, 16, 0, 4, 5, 6, 0, 0, 36, 349 31, 27, 0, 0, 0, 2, 11, 12, 13, 32, 350 24, 23, 25, 33, 0, 34, 0, 35, 0 351 351 } ; 352 352 … … 390 390 } ; 391 391 392 static yyconst flex_int16_t yy_base[7 6] =392 static yyconst flex_int16_t yy_base[78] = 393 393 { 0, 394 0, 0, 9 3, 94, 94, 94, 0, 22, 24, 84,395 26, 9 4, 94, 30, 10, 13, 34, 37, 0, 83,396 50, 59, 45, 94, 72, 94, 65, 74, 94, 55,397 94, 94, 94, 94, 94, 94, 94, 74, 94, 94,398 9 4, 44, 94, 94, 94, 0, 78, 77, 94, 94,399 71, 70, 63, 94, 94, 94, 94, 0, 94, 94,400 9 4, 0, 0, 0, 0, 94, 94, 79, 78, 77,401 7 6, 75, 72, 71, 54394 0, 0, 94, 95, 95, 95, 0, 22, 24, 85, 395 26, 95, 95, 30, 73, 10, 13, 34, 37, 0, 396 83, 50, 59, 45, 95, 72, 95, 65, 74, 95, 397 55, 95, 95, 95, 95, 95, 95, 95, 95, 74, 398 95, 95, 95, 44, 95, 95, 95, 0, 78, 77, 399 95, 95, 71, 70, 63, 95, 95, 95, 95, 0, 400 95, 95, 95, 0, 0, 0, 0, 95, 95, 79, 401 78, 77, 76, 75, 72, 71, 54 402 402 } ; 403 403 404 static yyconst flex_int16_t yy_def[7 6] =404 static yyconst flex_int16_t yy_def[78] = 405 405 { 0, 406 6 7, 1, 67, 67, 67, 67, 68, 67, 67, 67,407 6 7, 67, 67, 67, 67, 67, 67, 67, 69, 67,408 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,409 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,410 6 7, 67, 67, 67, 67, 70, 67, 67, 67, 67,411 6 7, 67, 67, 67, 67, 67, 67, 71, 67, 67,412 6 7, 72, 73, 74, 75, 67, 0, 67, 67, 67,413 6 7, 67, 67, 67, 67406 69, 1, 69, 69, 69, 69, 70, 69, 69, 69, 407 69, 69, 69, 69, 69, 69, 69, 69, 69, 71, 408 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 409 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 410 69, 69, 69, 69, 69, 69, 69, 72, 69, 69, 411 69, 69, 69, 69, 69, 69, 69, 69, 69, 73, 412 69, 69, 69, 74, 75, 76, 77, 69, 0, 69, 413 69, 69, 69, 69, 69, 69, 69 414 414 } ; 415 415 416 static yyconst flex_int16_t yy_nxt[12 3] =416 static yyconst flex_int16_t yy_nxt[124] = 417 417 { 0, 418 418 4, 5, 6, 7, 8, 9, 10, 11, 4, 12, 419 13, 14, 4, 4, 4, 4, 4, 4, 4, 15,420 4, 4, 1 6, 17, 18, 4, 4, 4, 20, 21,421 2 0, 21, 20, 21, 23, 32, 33, 34, 35, 36,422 3 7, 23, 24, 25, 26, 27, 28, 38, 42, 47,423 4 7, 29, 48, 30, 31, 66, 20, 21, 23, 39,424 4 0, 41, 43, 44, 45, 23, 22, 23, 52, 55,425 5 6, 57, 65, 64, 23, 53, 63, 62, 58, 46,426 19, 61, 60, 59, 48, 48, 54, 51, 50, 49,427 2 2, 22, 67, 3, 67, 67, 67, 67, 67, 67,428 429 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,430 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,431 6 7, 67419 13, 14, 4, 15, 4, 4, 4, 4, 4, 16, 420 4, 4, 17, 18, 19, 4, 4, 4, 21, 22, 421 21, 22, 21, 22, 24, 34, 35, 36, 37, 38, 422 39, 24, 25, 26, 27, 28, 29, 40, 44, 49, 423 49, 30, 50, 31, 32, 68, 21, 22, 24, 41, 424 42, 43, 45, 46, 47, 24, 23, 24, 54, 57, 425 58, 59, 67, 66, 24, 55, 65, 64, 60, 48, 426 20, 63, 62, 61, 50, 50, 56, 53, 52, 51, 427 23, 33, 23, 69, 3, 69, 69, 69, 69, 69, 428 429 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 430 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 431 69, 69, 69 432 432 } ; 433 433 434 static yyconst flex_int16_t yy_chk[12 3] =434 static yyconst flex_int16_t yy_chk[124] = 435 435 { 0, 436 436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 437 437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 438 438 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 439 9, 9, 11, 11, 11, 1 5, 15, 15, 16, 16,440 1 6, 11, 14, 14, 14, 14, 14, 17, 18, 23,441 2 3, 14, 23, 14, 14, 75, 21, 21, 21, 17,442 1 7, 17, 18, 18, 18, 21, 22, 22, 30, 42,443 4 2, 42, 74, 73, 22, 30, 72, 71, 70, 69,444 68, 53, 52, 51, 48, 47, 38, 28, 27, 25,445 2 0, 10, 3, 67, 67, 67, 67, 67, 67, 67,446 447 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,448 6 7, 67, 67, 67, 67, 67, 67, 67, 67, 67,449 6 7, 67439 9, 9, 11, 11, 11, 16, 16, 16, 17, 17, 440 17, 11, 14, 14, 14, 14, 14, 18, 19, 24, 441 24, 14, 24, 14, 14, 77, 22, 22, 22, 18, 442 18, 18, 19, 19, 19, 22, 23, 23, 31, 44, 443 44, 44, 76, 75, 23, 31, 74, 73, 72, 71, 444 70, 55, 54, 53, 50, 49, 40, 29, 28, 26, 445 21, 15, 10, 3, 69, 69, 69, 69, 69, 69, 446 447 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 448 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 449 69, 69, 69 450 450 } ; 451 451 … … 656 656 { 657 657 yy_current_state = (int) yy_def[yy_current_state]; 658 if ( yy_current_state >= 68)658 if ( yy_current_state >= 70 ) 659 659 yy_c = yy_meta[(unsigned int) yy_c]; 660 660 } … … 662 662 ++yy_cp; 663 663 } 664 while ( yy_current_state != 6 7);664 while ( yy_current_state != 69 ); 665 665 yy_cp = (yy_last_accepting_cpos); 666 666 yy_current_state = (yy_last_accepting_state); … … 695 695 YY_RULE_SETUP 696 696 #line 48 "mesh-scanner.l" 697 { return token::T_CHAMFER; } 698 YY_BREAK 699 case 4: 700 YY_RULE_SETUP 701 #line 49 "mesh-scanner.l" 697 702 { return token::T_TRANSLATEX; } 698 703 YY_BREAK 699 case 4:700 YY_RULE_SETUP 701 #line 49"mesh-scanner.l"704 case 5: 705 YY_RULE_SETUP 706 #line 50 "mesh-scanner.l" 702 707 { return token::T_TRANSLATEY; } 703 708 YY_BREAK 704 case 5:705 YY_RULE_SETUP 706 #line 5 0"mesh-scanner.l"709 case 6: 710 YY_RULE_SETUP 711 #line 51 "mesh-scanner.l" 707 712 { return token::T_TRANSLATEZ; } 708 713 YY_BREAK 709 case 6:710 YY_RULE_SETUP 711 #line 5 1"mesh-scanner.l"714 case 7: 715 YY_RULE_SETUP 716 #line 52 "mesh-scanner.l" 712 717 { return token::T_TRANSLATE; } 713 718 YY_BREAK 714 case 7:715 YY_RULE_SETUP 716 #line 5 2"mesh-scanner.l"719 case 8: 720 YY_RULE_SETUP 721 #line 53 "mesh-scanner.l" 717 722 { return token::T_ROTATEX; } 718 723 YY_BREAK 719 case 8:720 YY_RULE_SETUP 721 #line 5 3"mesh-scanner.l"724 case 9: 725 YY_RULE_SETUP 726 #line 54 "mesh-scanner.l" 722 727 { return token::T_ROTATEY; } 723 728 YY_BREAK 724 case 9:725 YY_RULE_SETUP 726 #line 5 4"mesh-scanner.l"729 case 10: 730 YY_RULE_SETUP 731 #line 55 "mesh-scanner.l" 727 732 { return token::T_ROTATEZ; } 728 733 YY_BREAK 729 case 1 0:730 YY_RULE_SETUP 731 #line 5 5"mesh-scanner.l"734 case 11: 735 YY_RULE_SETUP 736 #line 56 "mesh-scanner.l" 732 737 { return token::T_TAPERX; } 733 738 YY_BREAK 734 case 1 1:735 YY_RULE_SETUP 736 #line 5 6"mesh-scanner.l"739 case 12: 740 YY_RULE_SETUP 741 #line 57 "mesh-scanner.l" 737 742 { return token::T_TAPERY; } 738 743 YY_BREAK 739 case 1 2:740 YY_RULE_SETUP 741 #line 5 7"mesh-scanner.l"744 case 13: 745 YY_RULE_SETUP 746 #line 58 "mesh-scanner.l" 742 747 { return token::T_TAPERZ; } 743 748 YY_BREAK 744 case 1 3:745 YY_RULE_SETUP 746 #line 5 8"mesh-scanner.l"749 case 14: 750 YY_RULE_SETUP 751 #line 59 "mesh-scanner.l" 747 752 { return token::T_SCALEX; } 748 753 YY_BREAK 749 case 1 4:750 YY_RULE_SETUP 751 #line 59"mesh-scanner.l"754 case 15: 755 YY_RULE_SETUP 756 #line 60 "mesh-scanner.l" 752 757 { return token::T_SCALEY; } 753 758 YY_BREAK 754 case 1 5:755 YY_RULE_SETUP 756 #line 6 0"mesh-scanner.l"759 case 16: 760 YY_RULE_SETUP 761 #line 61 "mesh-scanner.l" 757 762 { return token::T_SCALEZ; } 758 763 YY_BREAK 759 case 1 6:760 YY_RULE_SETUP 761 #line 6 1"mesh-scanner.l"764 case 17: 765 YY_RULE_SETUP 766 #line 62 "mesh-scanner.l" 762 767 { return token::T_SCALE; } 763 768 YY_BREAK 764 case 1 7:765 YY_RULE_SETUP 766 #line 6 2"mesh-scanner.l"769 case 18: 770 YY_RULE_SETUP 771 #line 63 "mesh-scanner.l" 767 772 { return token::T_MIRRORX; } 768 773 YY_BREAK 769 case 1 8:770 YY_RULE_SETUP 771 #line 6 3"mesh-scanner.l"774 case 19: 775 YY_RULE_SETUP 776 #line 64 "mesh-scanner.l" 772 777 { return token::T_MIRRORY; } 773 778 YY_BREAK 774 case 19:775 YY_RULE_SETUP 776 #line 6 4"mesh-scanner.l"779 case 20: 780 YY_RULE_SETUP 781 #line 65 "mesh-scanner.l" 777 782 { return token::T_MIRRORZ; } 778 783 YY_BREAK 779 case 2 0:780 YY_RULE_SETUP 781 #line 6 6"mesh-scanner.l"784 case 21: 785 YY_RULE_SETUP 786 #line 67 "mesh-scanner.l" 782 787 { return token::T_CYLINDER; } 783 788 YY_BREAK 784 case 2 1:785 YY_RULE_SETUP 786 #line 6 7"mesh-scanner.l"789 case 22: 790 YY_RULE_SETUP 791 #line 68 "mesh-scanner.l" 787 792 { return token::T_BOX; } 788 793 YY_BREAK 789 case 2 2:790 YY_RULE_SETUP 791 #line 6 8"mesh-scanner.l"794 case 23: 795 YY_RULE_SETUP 796 #line 69 "mesh-scanner.l" 792 797 { return token::T_SMOOTHCHAMFBOX; } 793 798 YY_BREAK 794 case 2 3:795 YY_RULE_SETUP 796 #line 69"mesh-scanner.l"799 case 24: 800 YY_RULE_SETUP 801 #line 70 "mesh-scanner.l" 797 802 { return token::T_FLATCHAMFBOX; } 798 803 YY_BREAK 799 case 2 4:800 YY_RULE_SETUP 801 #line 7 0"mesh-scanner.l"804 case 25: 805 YY_RULE_SETUP 806 #line 71 "mesh-scanner.l" 802 807 { return token::T_SPHERE; } 803 808 YY_BREAK 804 case 2 5:805 YY_RULE_SETUP 806 #line 7 1"mesh-scanner.l"809 case 26: 810 YY_RULE_SETUP 811 #line 72 "mesh-scanner.l" 807 812 { return token::T_STAR; } 808 813 YY_BREAK 809 case 2 6:810 YY_RULE_SETUP 811 #line 7 2"mesh-scanner.l"814 case 27: 815 YY_RULE_SETUP 816 #line 73 "mesh-scanner.l" 812 817 { return token::T_EXPANDEDSTAR; } 813 818 YY_BREAK 814 case 2 7:815 YY_RULE_SETUP 816 #line 7 3"mesh-scanner.l"819 case 28: 820 YY_RULE_SETUP 821 #line 74 "mesh-scanner.l" 817 822 { return token::T_DISC; } 818 823 YY_BREAK 819 case 2 8:820 YY_RULE_SETUP 821 #line 7 4"mesh-scanner.l"824 case 29: 825 YY_RULE_SETUP 826 #line 75 "mesh-scanner.l" 822 827 { return token::T_TRIANGLE; } 823 828 YY_BREAK 824 case 29:825 YY_RULE_SETUP 826 #line 7 5"mesh-scanner.l"829 case 30: 830 YY_RULE_SETUP 831 #line 76 "mesh-scanner.l" 827 832 { return token::T_QUAD; } 828 833 YY_BREAK 829 case 3 0:830 YY_RULE_SETUP 831 #line 7 6"mesh-scanner.l"834 case 31: 835 YY_RULE_SETUP 836 #line 77 "mesh-scanner.l" 832 837 { return token::T_COG; } 833 838 YY_BREAK 834 case 3 1:835 YY_RULE_SETUP 836 #line 7 8"mesh-scanner.l"839 case 32: 840 YY_RULE_SETUP 841 #line 79 "mesh-scanner.l" 837 842 { 838 843 uint32_t tmp = strtol(yytext + 1, NULL, 16); … … 843 848 return token::COLOR; } 844 849 YY_BREAK 845 case 3 2:846 YY_RULE_SETUP 847 #line 8 5"mesh-scanner.l"850 case 33: 851 YY_RULE_SETUP 852 #line 86 "mesh-scanner.l" 848 853 { 849 854 uint32_t tmp = strtol(yytext + 1, NULL, 16); … … 854 859 return token::COLOR; } 855 860 YY_BREAK 856 case 3 3:857 YY_RULE_SETUP 858 #line 9 2"mesh-scanner.l"861 case 34: 862 YY_RULE_SETUP 863 #line 93 "mesh-scanner.l" 859 864 { 860 865 yylval->u32val = 0xffu … … 862 867 return token::COLOR; } 863 868 YY_BREAK 864 case 3 4:865 YY_RULE_SETUP 866 #line 9 6"mesh-scanner.l"869 case 35: 870 YY_RULE_SETUP 871 #line 97 "mesh-scanner.l" 867 872 { 868 873 yylval->u32val = (uint32_t)strtol(yytext + 1, NULL, 16); 869 874 return token::COLOR; } 870 875 YY_BREAK 871 case 3 5:872 YY_RULE_SETUP 873 #line 99"mesh-scanner.l"876 case 36: 877 YY_RULE_SETUP 878 #line 100 "mesh-scanner.l" 874 879 { 875 880 yylval->fval = atof(yytext); return token::NUMBER; } 876 881 YY_BREAK 877 case 3 6:878 YY_RULE_SETUP 879 #line 10 1"mesh-scanner.l"882 case 37: 883 YY_RULE_SETUP 884 #line 102 "mesh-scanner.l" 880 885 { return token_type('-'); } 881 886 YY_BREAK 882 case 3 7:883 YY_RULE_SETUP 884 #line 10 2"mesh-scanner.l"887 case 38: 888 YY_RULE_SETUP 889 #line 103 "mesh-scanner.l" 885 890 { return token_type('['); } 886 891 YY_BREAK 887 case 3 8:888 YY_RULE_SETUP 889 #line 10 3"mesh-scanner.l"892 case 39: 893 YY_RULE_SETUP 894 #line 104 "mesh-scanner.l" 890 895 { return token_type(']'); } 891 896 YY_BREAK 892 case 39:893 YY_RULE_SETUP894 #line 104 "mesh-scanner.l"895 { /* ignore this */ }896 YY_BREAK897 897 case 40: 898 /* rule 40 can match eol */899 898 YY_RULE_SETUP 900 899 #line 105 "mesh-scanner.l" … … 902 901 YY_BREAK 903 902 case 41: 903 /* rule 41 can match eol */ 904 904 YY_RULE_SETUP 905 905 #line 106 "mesh-scanner.l" 906 { /* ignore this */ } 907 YY_BREAK 908 case 42: 909 YY_RULE_SETUP 910 #line 107 "mesh-scanner.l" 906 911 { return token::T_ERROR; } 907 912 YY_BREAK 908 case 4 2:909 YY_RULE_SETUP 910 #line 10 8"mesh-scanner.l"913 case 43: 914 YY_RULE_SETUP 915 #line 109 "mesh-scanner.l" 911 916 ECHO; 912 917 YY_BREAK 913 #line 91 4"generated/mesh-scanner.cpp"918 #line 919 "generated/mesh-scanner.cpp" 914 919 case YY_STATE_EOF(INITIAL): 915 920 yyterminate(); … … 1293 1298 { 1294 1299 yy_current_state = (int) yy_def[yy_current_state]; 1295 if ( yy_current_state >= 68)1300 if ( yy_current_state >= 70 ) 1296 1301 yy_c = yy_meta[(unsigned int) yy_c]; 1297 1302 } … … 1321 1326 { 1322 1327 yy_current_state = (int) yy_def[yy_current_state]; 1323 if ( yy_current_state >= 68)1328 if ( yy_current_state >= 70 ) 1324 1329 yy_c = yy_meta[(unsigned int) yy_c]; 1325 1330 } 1326 1331 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1327 yy_is_jam = (yy_current_state == 6 7);1332 yy_is_jam = (yy_current_state == 69); 1328 1333 1329 1334 return yy_is_jam ? 0 : yy_current_state; … … 1812 1817 #define YYTABLES_NAME "yytables" 1813 1818 1814 #line 10 8"mesh-scanner.l"1819 #line 109 "mesh-scanner.l" 1815 1820 1816 1821 -
trunk/orbital/mesh-parser.y
r1495 r1506 48 48 %token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_SCALEZ T_MIRRORZ 49 49 %token T_TRANSLATE T_SCALE 50 %token T_CHAMFER 50 51 51 52 %token T_CYLINDER T_BOX T_SMOOTHCHAMFBOX T_FLATCHAMFBOX T_SPHERE T_STAR … … 115 116 116 117 transform_command: 117 T_TRANSLATEX args1 { mc.m_mesh.Translate(vec3($2.f0, 0, 0)); } 118 T_CHAMFER args1 { mc.m_mesh.Chamfer($2.f0); } 119 | T_TRANSLATEX args1 { mc.m_mesh.Translate(vec3($2.f0, 0, 0)); } 118 120 | T_TRANSLATEY args1 { mc.m_mesh.Translate(vec3(0, $2.f0, 0)); } 119 121 | T_TRANSLATEZ args1 { mc.m_mesh.Translate(vec3(0, 0, $2.f0)); } -
trunk/orbital/mesh-scanner.l
r1495 r1506 46 46 scb { return token::T_BGCOLOR; } 47 47 48 ch { return token::T_CHAMFER; } 48 49 tx { return token::T_TRANSLATEX; } 49 50 ty { return token::T_TRANSLATEY; } -
trunk/orbital/mesh.h
r1504 r1506 688 688 } 689 689 690 void Chamfer(float f) 691 { 692 (void)f; 693 } 694 690 695 private: 691 696 vec4 m_color, m_color2;
Note: See TracChangeset
for help on using the changeset viewer.