Changeset 1428
- Timestamp:
- May 31, 2012, 1:28:26 PM (9 years ago)
- Location:
- trunk/orbital
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/orbital/generated/mesh-parser.cpp
r1425 r1428 70 70 71 71 /* Line 299 of lalr1.cc */ 72 #line 6 1"mesh-parser.y"72 #line 62 "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.Flush(); } 470 470 break; … … 473 473 474 474 /* Line 690 of lalr1.cc */ 475 #line 8 8"mesh-parser.y"475 #line 89 "mesh-parser.y" 476 476 { mc.m_mesh.MeshConvert(); } 477 477 break; … … 480 480 481 481 /* Line 690 of lalr1.cc */ 482 #line 89"mesh-parser.y"482 #line 90 "mesh-parser.y" 483 483 { /* TODO */ } 484 484 break; … … 487 487 488 488 /* Line 690 of lalr1.cc */ 489 #line 9 3"mesh-parser.y"489 #line 94 "mesh-parser.y" 490 490 { 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)); } 491 491 break; … … 494 494 495 495 /* Line 690 of lalr1.cc */ 496 #line 94 "mesh-parser.y" 496 #line 95 "mesh-parser.y" 497 { uint32_t x = (uint32_t)(yysemantic_stack_[(2) - (2)].fval); 498 u8vec4 v; 499 memcpy(&v, &x, sizeof(x)); 500 mc.m_mesh.SetCurColor(vec4(v) * (0.1 / 15)); } 501 break; 502 503 case 14: 504 505 /* Line 690 of lalr1.cc */ 506 #line 99 "mesh-parser.y" 497 507 { 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)); } 498 508 break; 499 509 500 case 14: 501 502 /* Line 690 of lalr1.cc */ 503 #line 98 "mesh-parser.y" 510 case 15: 511 512 /* Line 690 of lalr1.cc */ 513 #line 100 "mesh-parser.y" 514 { uint32_t x = (uint32_t)(yysemantic_stack_[(2) - (2)].fval); 515 u8vec4 v; 516 memcpy(&v, &x, sizeof(x)); 517 mc.m_mesh.SetCurColor(vec4(v) * (0.1 / 15)); } 518 break; 519 520 case 16: 521 522 /* Line 690 of lalr1.cc */ 523 #line 107 "mesh-parser.y" 504 524 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 505 525 break; 506 526 507 case 1 5:508 509 /* Line 690 of lalr1.cc */ 510 #line 99"mesh-parser.y"527 case 17: 528 529 /* Line 690 of lalr1.cc */ 530 #line 108 "mesh-parser.y" 511 531 { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 512 532 break; 513 533 514 case 1 6:515 516 /* Line 690 of lalr1.cc */ 517 #line 10 0"mesh-parser.y"534 case 18: 535 536 /* Line 690 of lalr1.cc */ 537 #line 109 "mesh-parser.y" 518 538 { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 519 539 break; 520 540 521 case 1 7:522 523 /* Line 690 of lalr1.cc */ 524 #line 1 01"mesh-parser.y"541 case 19: 542 543 /* Line 690 of lalr1.cc */ 544 #line 110 "mesh-parser.y" 525 545 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 526 546 break; 527 547 528 case 18:529 530 /* Line 690 of lalr1.cc */ 531 #line 1 02"mesh-parser.y"548 case 20: 549 550 /* Line 690 of lalr1.cc */ 551 #line 111 "mesh-parser.y" 532 552 { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); } 533 553 break; 534 554 535 case 19:536 537 /* Line 690 of lalr1.cc */ 538 #line 1 03"mesh-parser.y"555 case 21: 556 557 /* Line 690 of lalr1.cc */ 558 #line 112 "mesh-parser.y" 539 559 { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); } 540 560 break; 541 561 542 case 2 0:543 544 /* Line 690 of lalr1.cc */ 545 #line 1 04"mesh-parser.y"562 case 22: 563 564 /* Line 690 of lalr1.cc */ 565 #line 113 "mesh-parser.y" 546 566 { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); } 547 567 break; 548 568 549 case 2 1:550 551 /* Line 690 of lalr1.cc */ 552 #line 1 05"mesh-parser.y"569 case 23: 570 571 /* Line 690 of lalr1.cc */ 572 #line 114 "mesh-parser.y" 553 573 { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 554 574 break; 555 575 556 case 2 2:557 558 /* Line 690 of lalr1.cc */ 559 #line 1 06"mesh-parser.y"576 case 24: 577 578 /* Line 690 of lalr1.cc */ 579 #line 115 "mesh-parser.y" 560 580 { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 561 581 break; 562 582 563 case 2 3:564 565 /* Line 690 of lalr1.cc */ 566 #line 1 07"mesh-parser.y"583 case 25: 584 585 /* Line 690 of lalr1.cc */ 586 #line 116 "mesh-parser.y" 567 587 { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 568 588 break; 569 589 570 case 2 4:571 572 /* Line 690 of lalr1.cc */ 573 #line 1 08"mesh-parser.y"590 case 26: 591 592 /* Line 690 of lalr1.cc */ 593 #line 117 "mesh-parser.y" 574 594 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } 575 595 break; 576 596 577 case 2 5:578 579 /* Line 690 of lalr1.cc */ 580 #line 1 09"mesh-parser.y"597 case 27: 598 599 /* Line 690 of lalr1.cc */ 600 #line 118 "mesh-parser.y" 581 601 { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } 582 602 break; 583 603 584 case 2 6:585 586 /* Line 690 of lalr1.cc */ 587 #line 11 0"mesh-parser.y"604 case 28: 605 606 /* Line 690 of lalr1.cc */ 607 #line 119 "mesh-parser.y" 588 608 { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } 589 609 break; 590 610 591 case 2 7:592 593 /* Line 690 of lalr1.cc */ 594 #line 1 11"mesh-parser.y"611 case 29: 612 613 /* Line 690 of lalr1.cc */ 614 #line 120 "mesh-parser.y" 595 615 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 596 616 break; 597 617 598 case 28:599 600 /* Line 690 of lalr1.cc */ 601 #line 1 12"mesh-parser.y"618 case 30: 619 620 /* Line 690 of lalr1.cc */ 621 #line 121 "mesh-parser.y" 602 622 { mc.m_mesh.MirrorX(); } 603 623 break; 604 624 605 case 29:606 607 /* Line 690 of lalr1.cc */ 608 #line 1 13"mesh-parser.y"625 case 31: 626 627 /* Line 690 of lalr1.cc */ 628 #line 122 "mesh-parser.y" 609 629 { mc.m_mesh.MirrorY(); } 610 630 break; 611 631 612 case 3 0:613 614 /* Line 690 of lalr1.cc */ 615 #line 1 14"mesh-parser.y"632 case 32: 633 634 /* Line 690 of lalr1.cc */ 635 #line 123 "mesh-parser.y" 616 636 { mc.m_mesh.MirrorZ(); } 617 637 break; 618 638 619 case 3 1:620 621 /* Line 690 of lalr1.cc */ 622 #line 1 18"mesh-parser.y"639 case 33: 640 641 /* Line 690 of lalr1.cc */ 642 #line 127 "mesh-parser.y" 623 643 { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 624 644 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, … … 626 646 break; 627 647 628 case 3 2:629 630 /* Line 690 of lalr1.cc */ 631 #line 1 21"mesh-parser.y"648 case 34: 649 650 /* Line 690 of lalr1.cc */ 651 #line 130 "mesh-parser.y" 632 652 { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 633 653 break; 634 654 635 case 3 3:636 637 /* Line 690 of lalr1.cc */ 638 #line 1 22"mesh-parser.y"655 case 35: 656 657 /* Line 690 of lalr1.cc */ 658 #line 131 "mesh-parser.y" 639 659 { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 640 660 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 641 661 break; 642 662 643 case 3 4:644 645 /* Line 690 of lalr1.cc */ 646 #line 1 24"mesh-parser.y"663 case 36: 664 665 /* Line 690 of lalr1.cc */ 666 #line 133 "mesh-parser.y" 647 667 { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 648 668 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 649 669 break; 650 670 651 case 3 5:652 653 /* Line 690 of lalr1.cc */ 654 #line 1 26"mesh-parser.y"671 case 37: 672 673 /* Line 690 of lalr1.cc */ 674 #line 135 "mesh-parser.y" 655 675 { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, 656 676 vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 657 677 break; 658 678 659 case 3 6:660 661 /* Line 690 of lalr1.cc */ 662 #line 1 28"mesh-parser.y"679 case 38: 680 681 /* Line 690 of lalr1.cc */ 682 #line 137 "mesh-parser.y" 663 683 { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, 664 684 (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } 665 685 break; 666 686 667 case 3 7:668 669 /* Line 690 of lalr1.cc */ 670 #line 13 0"mesh-parser.y"687 case 39: 688 689 /* Line 690 of lalr1.cc */ 690 #line 139 "mesh-parser.y" 671 691 { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 672 692 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } 673 693 break; 674 694 675 case 38:676 677 /* Line 690 of lalr1.cc */ 678 #line 1 32"mesh-parser.y"695 case 40: 696 697 /* Line 690 of lalr1.cc */ 698 #line 141 "mesh-parser.y" 679 699 { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } 680 700 break; 681 701 682 case 39:683 684 /* Line 690 of lalr1.cc */ 685 #line 1 33"mesh-parser.y"702 case 41: 703 704 /* Line 690 of lalr1.cc */ 705 #line 142 "mesh-parser.y" 686 706 { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 687 707 break; 688 708 689 case 4 0:690 691 /* Line 690 of lalr1.cc */ 692 #line 1 34"mesh-parser.y"709 case 42: 710 711 /* Line 690 of lalr1.cc */ 712 #line 143 "mesh-parser.y" 693 713 { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 694 714 break; 695 715 696 case 4 1:697 698 /* Line 690 of lalr1.cc */ 699 #line 1 35"mesh-parser.y"716 case 43: 717 718 /* Line 690 of lalr1.cc */ 719 #line 144 "mesh-parser.y" 700 720 { 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, 701 721 (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); } 702 722 break; 703 723 704 case 4 2:705 706 /* Line 690 of lalr1.cc */ 707 #line 1 39"mesh-parser.y"724 case 44: 725 726 /* Line 690 of lalr1.cc */ 727 #line 148 "mesh-parser.y" 708 728 { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } 709 729 break; 710 730 711 case 4 3:712 713 /* Line 690 of lalr1.cc */ 714 #line 14 0"mesh-parser.y"731 case 45: 732 733 /* Line 690 of lalr1.cc */ 734 #line 149 "mesh-parser.y" 715 735 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(3) - (3)].fval); } 716 736 break; 717 737 718 case 4 4:719 720 /* Line 690 of lalr1.cc */ 721 #line 1 41"mesh-parser.y"738 case 46: 739 740 /* Line 690 of lalr1.cc */ 741 #line 150 "mesh-parser.y" 722 742 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(3) - (3)].fval); } 723 743 break; 724 744 725 case 4 5:726 727 /* Line 690 of lalr1.cc */ 728 #line 1 42"mesh-parser.y"745 case 47: 746 747 /* Line 690 of lalr1.cc */ 748 #line 151 "mesh-parser.y" 729 749 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(3) - (3)].fval); } 730 750 break; 731 751 732 case 4 6:733 734 /* Line 690 of lalr1.cc */ 735 #line 1 43"mesh-parser.y"752 case 48: 753 754 /* Line 690 of lalr1.cc */ 755 #line 152 "mesh-parser.y" 736 756 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(3) - (3)].fval); } 737 757 break; 738 758 739 case 4 7:740 741 /* Line 690 of lalr1.cc */ 742 #line 1 44"mesh-parser.y"759 case 49: 760 761 /* Line 690 of lalr1.cc */ 762 #line 153 "mesh-parser.y" 743 763 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(3) - (3)].fval); } 744 764 break; 745 765 746 case 48:747 748 /* Line 690 of lalr1.cc */ 749 #line 1 45"mesh-parser.y"766 case 50: 767 768 /* Line 690 of lalr1.cc */ 769 #line 154 "mesh-parser.y" 750 770 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(3) - (3)].fval); } 751 771 break; 752 772 753 case 49:754 755 /* Line 690 of lalr1.cc */ 756 #line 1 46"mesh-parser.y"773 case 51: 774 775 /* Line 690 of lalr1.cc */ 776 #line 155 "mesh-parser.y" 757 777 { (yyval.args) = (yysemantic_stack_[(3) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(3) - (3)].fval); } 758 778 break; 759 779 760 case 5 0:761 762 /* Line 690 of lalr1.cc */ 763 #line 1 49"mesh-parser.y"780 case 52: 781 782 /* Line 690 of lalr1.cc */ 783 #line 158 "mesh-parser.y" 764 784 { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } 765 785 break; 766 786 767 case 5 1:768 769 /* Line 690 of lalr1.cc */ 770 #line 15 0"mesh-parser.y"787 case 53: 788 789 /* Line 690 of lalr1.cc */ 790 #line 159 "mesh-parser.y" 771 791 { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } 772 792 break; … … 775 795 776 796 /* Line 690 of lalr1.cc */ 777 #line 7 78 "generated/mesh-parser.cpp"797 #line 798 "generated/mesh-parser.cpp" 778 798 default: 779 799 break; … … 1049 1069 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1050 1070 STATE-NUM. */ 1051 const signed char MeshParser::yypact_ninf_ = -4 3;1071 const signed char MeshParser::yypact_ninf_ = -44; 1052 1072 const signed char 1053 1073 MeshParser::yypact_[] = 1054 1074 { 1055 -1, -4 3, -43, -43, 12, 12, 12, 12, 12, 12,1056 -4 3, 12, 12, 12, 12, -43, 12, 12, 12, 12,1057 -4 3, 12, 12, 12, 12, 12, 12, 12, 12, 12,1058 1 2, 12, 12, 12, 37, 1, -43, -43, -43, -43,1059 -4 3, -43, 12, 2, 10, 16, -43, -43, -43, -43,1060 -4 3, -43, -43, -43, -43, -43, -43, -43, -43, -43,1061 -4 3, -43, -43, 18, 24, -43, -43, -43, -43, -43,1062 -4 3, -43, -43, -43, -43, 27, 29, -43, -43, -43,1063 -1, -43, 12, 12, 12, 12, 12, 12, 12, -43,1064 -43, -43, -43, -43, -43, -43, -431075 -1, -44, -44, -44, 14, 45, 16, 16, 16, 16, 1076 -44, 16, 16, 16, 16, -44, 16, 16, 16, 16, 1077 -44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1078 16, 16, 16, 16, 40, 1, -44, -44, -44, -44, 1079 -44, -44, -44, 16, 10, 23, 26, -44, -44, -44, 1080 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 1081 -44, -44, -44, -44, -44, 28, 36, -44, -44, -44, 1082 -44, -44, -44, -44, -44, -44, -44, 38, 47, -44, 1083 -44, -44, -1, -44, 16, 16, 16, 16, 16, 16, 1084 16, -44, -44, -44, -44, -44, -44, -44, -44 1065 1085 }; 1066 1086 … … 1072 1092 { 1073 1093 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 1074 28, 0, 0, 0, 0, 29, 0, 0, 0, 0,1075 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1094 30, 0, 0, 0, 0, 31, 0, 0, 0, 0, 1095 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1076 1096 0, 0, 0, 0, 0, 0, 3, 5, 6, 7, 1077 8, 5 0, 0, 0, 0, 0, 12, 42, 13, 14,1078 1 8, 21, 24, 15, 19, 22, 25, 16, 20, 23,1079 2 6, 17, 27, 0, 0, 31, 32, 33, 34, 35,1080 36, 37, 38, 39, 40, 0, 0, 41, 1, 2,1081 0, 51, 0, 0, 0, 0, 0, 0, 0, 4,1082 43, 44, 45, 46, 47, 48, 491097 8, 52, 13, 0, 0, 0, 0, 12, 44, 15, 1098 14, 16, 20, 23, 26, 17, 21, 24, 27, 18, 1099 22, 25, 28, 19, 29, 0, 0, 33, 34, 35, 1100 36, 37, 38, 39, 40, 41, 42, 0, 0, 43, 1101 1, 2, 0, 53, 0, 0, 0, 0, 0, 0, 1102 0, 4, 45, 46, 47, 48, 49, 50, 51 1083 1103 }; 1084 1104 … … 1087 1107 MeshParser::yypgoto_[] = 1088 1108 { 1089 -4 3, -43, -43, -11, -43, -43, -43, -43, 61, 20,1090 41, 31, 46, 43, -43, -43, -421109 -44, -44, -44, -13, -44, -44, -44, -44, 61, 6, 1110 41, 31, 51, 50, -44, -44, -43 1091 1111 }; 1092 1112 … … 1095 1115 MeshParser::yydefgoto_[] = 1096 1116 { 1097 -1, 34, 35, 36, 37, 38, 39, 40, 4 3, 44,1098 4 5, 63, 64, 65, 76, 77, 471117 -1, 34, 35, 36, 37, 38, 39, 40, 44, 45, 1118 46, 65, 66, 67, 78, 79, 48 1099 1119 }; 1100 1120 … … 1106 1126 MeshParser::yytable_[] = 1107 1127 { 1108 8 1, 79, 1, 2, 3, 4, 5, 6, 7, 8,1128 83, 81, 1, 2, 3, 4, 5, 6, 7, 8, 1109 1129 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1110 1130 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1111 29, 30, 31, 32, 33, 4 6, 48, 78, 80, 82,1112 90, 91, 92, 93, 94, 95, 96, 83, 41, 51,1113 4 2, 73, 74, 84, 55, 85, 67, 68, 69, 59,1114 7 1, 86, 61, 62, 87, 66, 88, 49, 50, 89,1115 5 2, 72, 53, 54, 70, 56, 75, 57, 58, 0,1116 6 01131 29, 30, 31, 32, 33, 47, 50, 75, 76, 82, 1132 80, 92, 93, 94, 95, 96, 97, 98, 84, 53, 1133 41, 42, 41, 43, 57, 43, 69, 70, 71, 61, 1134 73, 85, 63, 64, 86, 68, 87, 51, 52, 91, 1135 54, 74, 55, 56, 88, 58, 89, 59, 60, 72, 1136 62, 41, 49, 77, 43, 90 1117 1137 }; 1118 1138 1119 1139 /* YYCHECK. */ 1120 const signed char1140 const unsigned char 1121 1141 MeshParser::yycheck_[] = 1122 1142 { 1123 4 2, 0, 3, 4, 5, 6, 7, 8, 9, 10,1143 43, 0, 3, 4, 5, 6, 7, 8, 9, 10, 1124 1144 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1125 1145 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1126 31, 32, 33, 34, 35, 4, 5, 0, 37, 37,1127 82, 83, 84, 85, 86, 87, 88, 37, 36, 8,1128 3 8, 31, 32, 37, 13, 37, 25, 26, 27, 18,1129 29, 3 7, 21, 22, 37, 24, 37, 6, 7, 80,1130 9, 30, 11, 12, 28, 14, 33, 16, 17, -1,1131 19 1146 31, 32, 33, 34, 35, 4, 5, 31, 32, 38, 1147 0, 84, 85, 86, 87, 88, 89, 90, 38, 8, 1148 36, 37, 36, 39, 13, 39, 25, 26, 27, 18, 1149 29, 38, 21, 22, 38, 24, 38, 6, 7, 82, 1150 9, 30, 11, 12, 38, 14, 38, 16, 17, 28, 1151 19, 36, 37, 33, 39, 38 1132 1152 }; 1133 1153 … … 1140 1160 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1141 1161 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1142 32, 33, 34, 35, 4 0, 41, 42, 43, 44, 45,1143 4 6, 36, 38, 47, 48, 49, 50, 55, 50, 47,1144 47, 49, 47, 47, 47, 49, 47, 47, 47, 49,1145 4 7, 49, 49, 50, 51, 52, 49, 50, 50, 50,1146 51, 5 0, 49, 48, 48, 52, 53, 54, 0, 0,1147 37, 55, 37, 37, 37, 37, 37, 37, 37, 42,1148 55, 55, 55, 55, 55, 55, 551162 32, 33, 34, 35, 41, 42, 43, 44, 45, 46, 1163 47, 36, 37, 39, 48, 49, 50, 51, 56, 37, 1164 51, 48, 48, 50, 48, 48, 48, 50, 48, 48, 1165 48, 50, 48, 50, 50, 51, 52, 53, 50, 51, 1166 51, 51, 52, 51, 50, 49, 49, 53, 54, 55, 1167 0, 0, 38, 56, 38, 38, 38, 38, 38, 38, 1168 38, 43, 56, 56, 56, 56, 56, 56, 56 1149 1169 }; 1150 1170 … … 1158 1178 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1159 1179 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1160 285, 286, 287, 288, 289, 290, 291, 44, 451180 285, 286, 287, 288, 289, 290, 291, 292, 44, 45 1161 1181 }; 1162 1182 #endif … … 1166 1186 MeshParser::yyr1_[] = 1167 1187 { 1168 0, 39, 40, 41, 41, 42, 42, 42, 42, 43,1169 4 3, 43, 44, 44, 45, 45, 45, 45, 45, 45,1170 4 5, 45, 45, 45, 45, 45, 45, 45, 45, 45,1171 4 5, 46, 46, 46, 46, 46, 46, 46, 46, 46,1172 4 6, 46, 47, 48, 49, 50, 51, 52, 53, 54,1173 5 5, 551188 0, 40, 41, 42, 42, 43, 43, 43, 43, 44, 1189 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 1190 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 1191 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 1192 47, 47, 47, 47, 48, 49, 50, 51, 52, 53, 1193 54, 55, 56, 56 1174 1194 }; 1175 1195 … … 1180 1200 0, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1181 1201 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1182 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,1183 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,1184 2, 2, 1, 3, 3, 3, 3, 3, 3, 3,1185 1, 21202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1203 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1204 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 1205 3, 3, 1, 2 1186 1206 }; 1187 1207 … … 1199 1219 "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_STAR", 1200 1220 "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "NUMBER", 1201 " ','", "'-'", "$accept", "mesh_description", "mesh_command_list",1202 "mesh_command ", "rb_command", "color_command", "transform_command",1203 " primitive_command", "args1", "args2", "args3", "args4", "args5",1204 "args 6", "args7", "args8", "number", 01221 "COLOR", "','", "'-'", "$accept", "mesh_description", 1222 "mesh_command_list", "mesh_command", "rb_command", "color_command", 1223 "transform_command", "primitive_command", "args1", "args2", "args3", 1224 "args4", "args5", "args6", "args7", "args8", "number", 0 1205 1225 }; 1206 1226 #endif … … 1211 1231 MeshParser::yyrhs_[] = 1212 1232 { 1213 40, 0, -1, 41, 0, -1, 42, -1, 41, 37, 1214 42, -1, 43, -1, 44, -1, 45, -1, 46, -1, 1215 3, -1, 4, -1, 5, -1, 6, 50, -1, 7, 1216 50, -1, 8, 47, -1, 13, 47, -1, 18, 47, 1217 -1, 23, 49, -1, 9, 47, -1, 14, 47, -1, 1218 19, 47, -1, 10, 49, -1, 15, 49, -1, 20, 1219 49, -1, 11, 47, -1, 16, 47, -1, 21, 47, 1220 -1, 24, 49, -1, 12, -1, 17, -1, 22, -1, 1221 25, 52, -1, 26, 49, -1, 27, 50, -1, 28, 1222 50, -1, 29, 50, -1, 30, 51, -1, 31, 50, 1223 -1, 32, 49, -1, 33, 48, -1, 34, 48, -1, 1224 35, 54, -1, 55, -1, 47, 37, 55, -1, 48, 1225 37, 55, -1, 49, 37, 55, -1, 50, 37, 55, 1226 -1, 51, 37, 55, -1, 52, 37, 55, -1, 53, 1227 37, 55, -1, 36, -1, 38, 55, -1 1233 41, 0, -1, 42, 0, -1, 43, -1, 42, 38, 1234 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, 1235 3, -1, 4, -1, 5, -1, 6, 51, -1, 6, 1236 37, -1, 7, 51, -1, 7, 37, -1, 8, 48, 1237 -1, 13, 48, -1, 18, 48, -1, 23, 50, -1, 1238 9, 48, -1, 14, 48, -1, 19, 48, -1, 10, 1239 50, -1, 15, 50, -1, 20, 50, -1, 11, 48, 1240 -1, 16, 48, -1, 21, 48, -1, 24, 50, -1, 1241 12, -1, 17, -1, 22, -1, 25, 53, -1, 26, 1242 50, -1, 27, 51, -1, 28, 51, -1, 29, 51, 1243 -1, 30, 52, -1, 31, 51, -1, 32, 50, -1, 1244 33, 49, -1, 34, 49, -1, 35, 55, -1, 56, 1245 -1, 48, 38, 56, -1, 49, 38, 56, -1, 50, 1246 38, 56, -1, 51, 38, 56, -1, 52, 38, 56, 1247 -1, 53, 38, 56, -1, 54, 38, 56, -1, 36, 1248 -1, 39, 56, -1 1228 1249 }; 1229 1250 … … 1235 1256 0, 0, 3, 6, 8, 12, 14, 16, 18, 20, 1236 1257 22, 24, 26, 29, 32, 35, 38, 41, 44, 47, 1237 50, 53, 56, 59, 62, 65, 68, 71, 74, 7 6,1238 78, 80, 83, 86, 89, 92, 95, 98, 101, 104,1239 107, 110, 113, 11 5, 119, 123, 127, 131, 135, 139,1240 14 3, 1451258 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 1259 80, 82, 84, 86, 89, 92, 95, 98, 101, 104, 1260 107, 110, 113, 116, 119, 121, 125, 129, 133, 137, 1261 141, 145, 149, 151 1241 1262 }; 1242 1263 … … 1245 1266 MeshParser::yyrline_[] = 1246 1267 { 1247 0, 7 1, 71, 75, 76, 80, 81, 82, 83, 87,1248 8 8, 89, 93, 94, 98, 99, 100, 101, 102, 103,1249 1 04, 105, 106, 107, 108, 109, 110, 111, 112, 113,1250 1 14, 118, 121, 122, 124, 126, 128, 130, 132, 133,1251 1 34, 135, 139, 140, 141, 142, 143, 144, 145, 146,1252 1 49, 1501268 0, 72, 72, 76, 77, 81, 82, 83, 84, 88, 1269 89, 90, 94, 95, 99, 100, 107, 108, 109, 110, 1270 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1271 121, 122, 123, 127, 130, 131, 133, 135, 137, 139, 1272 141, 142, 143, 144, 148, 149, 150, 151, 152, 153, 1273 154, 155, 158, 159 1253 1274 }; 1254 1275 … … 1294 1315 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1295 1316 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1296 2, 2, 2, 2, 3 7, 38, 2, 2, 2, 2,1317 2, 2, 2, 2, 38, 39, 2, 2, 2, 2, 1297 1318 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1298 1319 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 1319 1340 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1320 1341 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1321 35, 36 1342 35, 36, 37 1322 1343 }; 1323 1344 if ((unsigned int) t <= yyuser_token_number_max_) … … 1328 1349 1329 1350 const int MeshParser::yyeof_ = 0; 1330 const int MeshParser::yylast_ = 8 0;1351 const int MeshParser::yylast_ = 85; 1331 1352 const int MeshParser::yynnts_ = 17; 1332 1353 const int MeshParser::yyempty_ = -2; 1333 const int MeshParser::yyfinal_ = 78;1354 const int MeshParser::yyfinal_ = 80; 1334 1355 const int MeshParser::yyterror_ = 1; 1335 1356 const int MeshParser::yyerrcode_ = 256; 1336 const int MeshParser::yyntokens_ = 39;1337 1338 const unsigned int MeshParser::yyuser_token_number_max_ = 29 1;1357 const int MeshParser::yyntokens_ = 40; 1358 1359 const unsigned int MeshParser::yyuser_token_number_max_ = 292; 1339 1360 const MeshParser::token_number_type MeshParser::yyundef_token_ = 2; 1340 1361 … … 1343 1364 1344 1365 /* Line 1136 of lalr1.cc */ 1345 #line 13 46"generated/mesh-parser.cpp"1366 #line 1367 "generated/mesh-parser.cpp" 1346 1367 1347 1368 1348 1369 /* Line 1138 of lalr1.cc */ 1349 #line 1 53"mesh-parser.y"1370 #line 162 "mesh-parser.y" 1350 1371 1351 1372 -
trunk/orbital/generated/mesh-parser.h
r1425 r1428 131 131 T_QUAD = 289, 132 132 T_COG = 290, 133 NUMBER = 291 133 NUMBER = 291, 134 COLOR = 292 134 135 }; 135 136 … … 236 237 static const signed char yytable_ninf_; 237 238 238 static const signed char yycheck_[];239 static const unsigned char yycheck_[]; 239 240 240 241 /// For a state, its accessing symbol. … … 311 312 312 313 /* Line 35 of lalr1.cc */ 313 #line 31 4"generated/mesh-parser.h"314 #line 315 "generated/mesh-parser.h" 314 315 315 316 -
trunk/orbital/generated/mesh-scanner.cpp
r1425 r1428 331 331 (yy_c_buf_p) = yy_cp; 332 332 333 #define YY_NUM_RULES 3 8334 #define YY_END_OF_BUFFER 39333 #define YY_NUM_RULES 39 334 #define YY_END_OF_BUFFER 40 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[6 4] =342 static yyconst flex_int16_t yy_accept[69] = 343 343 { 0, 344 0, 0, 39, 38, 37, 38, 36, 35, 37, 34,345 3 8, 38, 38, 38, 38, 19, 9, 0, 34, 34,346 0, 24, 23, 30, 0, 0, 32, 28, 31, 1,347 0, 0, 20, 21, 22, 10, 11, 12, 4, 16,348 17, 18, 0, 6, 7, 8, 0, 34, 33, 29,349 0, 0, 0, 3, 2, 5, 13, 14, 15, 26,350 25, 27, 0344 0, 0, 40, 39, 38, 39, 39, 37, 36, 38, 345 35, 39, 39, 39, 39, 39, 19, 9, 0, 0, 346 35, 35, 0, 24, 23, 30, 0, 0, 32, 28, 347 31, 1, 0, 0, 20, 21, 22, 10, 11, 12, 348 4, 16, 17, 18, 0, 6, 7, 8, 0, 0, 349 35, 33, 29, 0, 0, 0, 3, 2, 5, 13, 350 14, 15, 0, 26, 25, 27, 34, 0 351 351 } ; 352 352 … … 356 356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 357 357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,359 1, 1, 3, 4, 5, 6, 1, 7, 7, 7,360 7, 7, 7, 7, 7, 7, 7, 1, 1, 1,361 1, 1, 1, 1, 1, 1, 1, 1, 8, 1,358 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 359 1, 1, 4, 5, 6, 7, 1, 8, 8, 8, 360 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, 361 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 362 362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 363 363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 364 1, 1, 1, 1, 1, 1, 9, 10, 11, 12,365 366 1 3, 14, 15, 16, 17, 1, 1, 18, 19, 1,367 1, 2 0, 21, 22, 23, 24, 1, 1, 1, 25,368 2 6, 27, 1, 1, 1, 1, 1, 1, 1, 1,364 1, 1, 1, 1, 1, 1, 10, 11, 12, 13, 365 366 14, 15, 16, 17, 18, 1, 1, 19, 20, 1, 367 1, 21, 22, 23, 24, 25, 1, 1, 1, 26, 368 27, 28, 1, 1, 1, 1, 1, 1, 1, 1, 369 369 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 370 370 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 383 383 } ; 384 384 385 static yyconst flex_int32_t yy_meta[28] = 385 static yyconst flex_int32_t yy_meta[29] = 386 { 0, 387 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 388 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 389 1, 1, 1, 1, 1, 1, 1, 1 390 } ; 391 392 static yyconst flex_int16_t yy_base[73] = 393 { 0, 394 0, 0, 94, 95, 95, 0, 22, 95, 24, 85, 395 26, 30, 27, 69, 10, 21, 39, 43, 0, 83, 396 49, 64, 56, 95, 74, 95, 65, 76, 95, 47, 397 95, 95, 76, 75, 95, 95, 95, 95, 95, 95, 398 74, 95, 95, 95, 48, 95, 95, 95, 0, 76, 399 75, 95, 95, 71, 70, 63, 95, 95, 95, 95, 400 95, 95, 0, 95, 95, 95, 95, 95, 77, 75, 401 59, 37 402 } ; 403 404 static yyconst flex_int16_t yy_def[73] = 405 { 0, 406 68, 1, 68, 68, 68, 69, 68, 68, 68, 68, 407 68, 68, 68, 68, 68, 68, 68, 68, 70, 68, 408 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 409 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 410 68, 68, 68, 68, 68, 68, 68, 68, 71, 68, 411 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 412 68, 68, 72, 68, 68, 68, 68, 0, 68, 68, 413 68, 68 414 } ; 415 416 static yyconst flex_int16_t yy_nxt[124] = 417 { 0, 418 4, 5, 6, 7, 8, 9, 10, 11, 4, 12, 419 4, 4, 4, 4, 13, 4, 4, 14, 4, 15, 420 4, 4, 16, 17, 18, 4, 4, 4, 20, 21, 421 20, 21, 20, 21, 23, 35, 36, 37, 67, 23, 422 24, 25, 26, 27, 28, 32, 38, 39, 40, 33, 423 41, 29, 45, 30, 31, 20, 21, 23, 55, 50, 424 63, 50, 23, 51, 42, 43, 44, 56, 46, 47, 425 48, 22, 23, 60, 61, 62, 49, 23, 19, 66, 426 65, 64, 51, 51, 59, 58, 57, 54, 53, 52, 427 22, 34, 22, 68, 3, 68, 68, 68, 68, 68, 428 429 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 430 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 431 68, 68, 68 432 } ; 433 434 static yyconst flex_int16_t yy_chk[124] = 386 435 { 0, 387 436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 388 437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 389 1, 1, 1, 1, 1, 1, 1 390 } ; 391 392 static yyconst flex_int16_t yy_base[64] = 393 { 0, 394 0, 0, 89, 90, 90, 22, 90, 24, 81, 26, 395 30, 27, 65, 10, 21, 39, 43, 79, 49, 64, 396 56, 90, 70, 90, 61, 72, 90, 47, 90, 90, 397 72, 71, 90, 90, 90, 90, 90, 90, 70, 90, 398 90, 90, 48, 90, 90, 90, 72, 71, 90, 90, 399 66, 50, 22, 90, 90, 90, 90, 90, 90, 90, 400 90, 90, 90 401 } ; 402 403 static yyconst flex_int16_t yy_def[64] = 404 { 0, 405 63, 1, 63, 63, 63, 63, 63, 63, 63, 63, 406 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 407 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 408 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 409 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 410 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 411 63, 63, 0 412 } ; 413 414 static yyconst flex_int16_t yy_nxt[118] = 415 { 0, 416 4, 5, 6, 7, 8, 9, 10, 4, 11, 4, 417 4, 4, 4, 12, 4, 4, 13, 4, 14, 4, 418 4, 15, 16, 17, 4, 4, 4, 18, 19, 18, 419 19, 18, 19, 21, 33, 34, 35, 62, 21, 22, 420 23, 24, 25, 26, 30, 36, 37, 38, 31, 39, 421 27, 43, 28, 29, 18, 19, 21, 52, 47, 61, 422 47, 21, 48, 40, 41, 42, 53, 44, 45, 46, 423 20, 21, 57, 58, 59, 60, 21, 48, 48, 56, 424 55, 54, 51, 50, 49, 20, 32, 20, 63, 3, 425 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 426 427 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 428 63, 63, 63, 63, 63, 63, 63 429 } ; 430 431 static yyconst flex_int16_t yy_chk[118] = 432 { 0, 433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 435 1, 1, 1, 1, 1, 1, 1, 6, 6, 8, 436 8, 10, 10, 10, 14, 14, 14, 53, 10, 11, 437 11, 11, 11, 11, 12, 15, 15, 15, 12, 16, 438 11, 17, 11, 11, 19, 19, 19, 28, 21, 52, 439 21, 19, 21, 16, 16, 16, 28, 17, 17, 17, 440 20, 20, 43, 43, 43, 51, 20, 48, 47, 39, 441 32, 31, 26, 25, 23, 18, 13, 9, 3, 63, 442 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 443 444 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 445 63, 63, 63, 63, 63, 63, 63 438 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 439 9, 9, 11, 11, 11, 15, 15, 15, 72, 11, 440 12, 12, 12, 12, 12, 13, 16, 16, 16, 13, 441 17, 12, 18, 12, 12, 21, 21, 21, 30, 23, 442 71, 23, 21, 23, 17, 17, 17, 30, 18, 18, 443 18, 22, 22, 45, 45, 45, 70, 22, 69, 56, 444 55, 54, 51, 50, 41, 34, 33, 28, 27, 25, 445 20, 14, 10, 3, 68, 68, 68, 68, 68, 68, 446 447 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 448 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 449 68, 68, 68 446 450 } ; 447 451 … … 486 490 #define YY_NO_UNISTD_H 487 491 #define YY_USER_ACTION yylloc->columns(yyleng); 488 #line 4 89"generated/mesh-scanner.cpp"492 #line 493 "generated/mesh-scanner.cpp" 489 493 490 494 #define INITIAL 0 … … 599 603 600 604 601 #line 60 2"generated/mesh-scanner.cpp"605 #line 606 "generated/mesh-scanner.cpp" 602 606 603 607 if ( !(yy_init) ) … … 652 656 { 653 657 yy_current_state = (int) yy_def[yy_current_state]; 654 if ( yy_current_state >= 6 4)658 if ( yy_current_state >= 69 ) 655 659 yy_c = yy_meta[(unsigned int) yy_c]; 656 660 } … … 658 662 ++yy_cp; 659 663 } 660 while ( yy_current_state != 6 3);664 while ( yy_current_state != 68 ); 661 665 yy_cp = (yy_last_accepting_cpos); 662 666 yy_current_state = (yy_last_accepting_state); … … 847 851 #line 82 "mesh-scanner.l" 848 852 { 853 char buf[] = "0x____"; 854 sprintf(buf + 2, "%s", yytext + 1); 855 yylval->fval = atof(buf); 856 return token::COLOR; 857 } 858 YY_BREAK 859 case 35: 860 YY_RULE_SETUP 861 #line 88 "mesh-scanner.l" 862 { 849 863 yylval->fval = atof(yytext); return token::NUMBER; } 850 864 YY_BREAK 851 case 3 5:852 YY_RULE_SETUP 853 #line 84"mesh-scanner.l"865 case 36: 866 YY_RULE_SETUP 867 #line 90 "mesh-scanner.l" 854 868 { return token_type('-'); } 855 869 YY_BREAK 856 case 3 6:857 YY_RULE_SETUP 858 #line 85"mesh-scanner.l"870 case 37: 871 YY_RULE_SETUP 872 #line 91 "mesh-scanner.l" 859 873 { return token_type(','); } 860 874 YY_BREAK 861 case 3 7:862 /* rule 3 7can match eol */863 YY_RULE_SETUP 864 #line 86"mesh-scanner.l"875 case 38: 876 /* rule 38 can match eol */ 877 YY_RULE_SETUP 878 #line 92 "mesh-scanner.l" 865 879 { /* ignore everything else */ } 866 880 YY_BREAK 867 case 3 8:868 YY_RULE_SETUP 869 #line 88"mesh-scanner.l"881 case 39: 882 YY_RULE_SETUP 883 #line 94 "mesh-scanner.l" 870 884 ECHO; 871 885 YY_BREAK 872 #line 8 73"generated/mesh-scanner.cpp"886 #line 887 "generated/mesh-scanner.cpp" 873 887 case YY_STATE_EOF(INITIAL): 874 888 yyterminate(); … … 1252 1266 { 1253 1267 yy_current_state = (int) yy_def[yy_current_state]; 1254 if ( yy_current_state >= 6 4)1268 if ( yy_current_state >= 69 ) 1255 1269 yy_c = yy_meta[(unsigned int) yy_c]; 1256 1270 } … … 1280 1294 { 1281 1295 yy_current_state = (int) yy_def[yy_current_state]; 1282 if ( yy_current_state >= 6 4)1296 if ( yy_current_state >= 69 ) 1283 1297 yy_c = yy_meta[(unsigned int) yy_c]; 1284 1298 } 1285 1299 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1286 yy_is_jam = (yy_current_state == 6 3);1300 yy_is_jam = (yy_current_state == 68); 1287 1301 1288 1302 return yy_is_jam ? 0 : yy_current_state; … … 1771 1785 #define YYTABLES_NAME "yytables" 1772 1786 1773 #line 88"mesh-scanner.l"1787 #line 94 "mesh-scanner.l" 1774 1788 1775 1789 -
trunk/orbital/mesh-parser.y
r1425 r1428 55 55 56 56 %token <fval> NUMBER 57 %token <fval> COLOR 57 58 58 59 %type <fval> number … … 92 93 color_command: 93 94 T_COLOR args4 { mc.m_mesh.SetCurColor(vec4($2.f0, $2.f1, $2.f2, $2.f3)); } 95 | T_COLOR COLOR { uint32_t x = (uint32_t)$2; 96 u8vec4 v; 97 memcpy(&v, &x, sizeof(x)); 98 mc.m_mesh.SetCurColor(vec4(v) * (0.1 / 15)); } 94 99 | T_BGCOLOR args4 { mc.m_mesh.SetCurColor2(vec4($2.f0, $2.f1, $2.f2, $2.f3)); } 100 | T_BGCOLOR COLOR { uint32_t x = (uint32_t)$2; 101 u8vec4 v; 102 memcpy(&v, &x, sizeof(x)); 103 mc.m_mesh.SetCurColor(vec4(v) * (0.1 / 15)); } 95 104 ; 96 105 -
trunk/orbital/mesh-scanner.l
r1425 r1428 80 80 acg { return token::T_COG; } 81 81 82 #[0-9a-f]{4} { 83 char buf[] = "0x____"; 84 sprintf(buf + 2, "%s", yytext + 1); 85 yylval->fval = atof(buf); 86 return token::COLOR; 87 } 82 88 [-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)? { 83 89 yylval->fval = atof(yytext); return token::NUMBER; }
Note: See TracChangeset
for help on using the changeset viewer.