Changeset 2116
- Timestamp:
- Nov 26, 2012, 11:54:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/easymesh/easymesh-parser.y
r1875 r2116 48 48 %token T_TRANSLATEY T_ROTATEY T_TAPERY T_SCALEY T_MIRRORY 49 49 %token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_SCALEZ T_MIRRORZ 50 %token T_TRANSLATE T_SCALE 50 %token T_TRANSLATE T_SCALE T_TOGGLESCALEWINDING 51 51 %token T_CHAMFER 52 52 … … 135 135 | T_MIRRORY { mc.m_mesh.MirrorY(); } 136 136 | T_MIRRORZ { mc.m_mesh.MirrorZ(); } 137 | T_TOGGLESCALEWINDING { mc.m_mesh.ToggleScaleWinding(); } 137 138 ; 138 139 -
trunk/src/easymesh/easymesh-scanner.l
r1910 r2116 67 67 sz { return token::T_SCALEZ; } 68 68 s { return token::T_SCALE; } 69 tsw { return token::T_TOGGLESCALEWINDING; } 69 70 mx { return token::T_MIRRORX; } 70 71 my { return token::T_MIRRORY; } -
trunk/src/easymesh/easymesh.cpp
r2077 r2116 42 42 43 43 EasyMesh::EasyMesh() 44 : m_color(0), m_color2(0) 44 : m_color(0), m_color2(0), m_ignore_winding_on_scale(0) 45 45 { 46 46 m_cursors.Push(0, 0); … … 131 131 } 132 132 133 void EasyMesh::ToggleScaleWinding() 134 { 135 m_ignore_winding_on_scale = !m_ignore_winding_on_scale; 136 } 137 133 138 void EasyMesh::SetCurColor(vec4 const &color) 134 139 { … … 321 326 322 327 /* Flip winding if the scaling involves mirroring */ 323 if ( s.x * s.y * s.z < 0)328 if (!m_ignore_winding_on_scale && s.x * s.y * s.z < 0) 324 329 { 325 330 for (int i = m_cursors.Last().m2; i < m_indices.Count(); i += 3) -
trunk/src/easymesh/easymesh.h
r1875 r2116 36 36 void CloseBrace(); 37 37 38 void ToggleScaleWinding(); 38 39 void SetCurColor(vec4 const &color); 39 40 void SetCurColor2(vec4 const &color); … … 94 95 Array<vec3, vec3, vec4> m_vert; 95 96 Array<int, int> m_cursors; 97 bool m_ignore_winding_on_scale; 96 98 97 99 /* FIXME: put this in a separate class so that we can copy meshes. */ -
trunk/src/generated/easymesh-parser.cpp
r1875 r2116 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 "easymesh/easymesh-parser.y" 40 40 … … 62 62 63 63 64 /* Line 293of lalr1.cc */64 /* Line 310 of lalr1.cc */ 65 65 #line 66 "generated/easymesh-parser.cpp" 66 66 … … 70 70 /* User implementation prologue. */ 71 71 72 /* Line 299of lalr1.cc */72 /* Line 316 of lalr1.cc */ 73 73 #line 65 "easymesh/easymesh-parser.y" 74 74 … … 79 79 80 80 81 /* Line 299of lalr1.cc */81 /* Line 316 of lalr1.cc */ 82 82 #line 83 "generated/easymesh-parser.cpp" 83 83 … … 94 94 #endif 95 95 96 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].97 If N is 0, then set CURRENT to the empty location which ends98 the previous symbol: RHS[0] (always defined). */99 100 #define YYRHSLOC(Rhs, K) ((Rhs)[K])101 #ifndef YYLLOC_DEFAULT102 # define YYLLOC_DEFAULT(Current, Rhs, N) \103 do \104 if (N) \105 { \106 (Current).begin = YYRHSLOC (Rhs, 1).begin; \107 (Current).end = YYRHSLOC (Rhs, N).end; \108 } \109 else \110 { \111 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \112 } \113 while (false)114 #endif115 116 96 /* Suppress unused-variable warnings by "using" E. */ 117 97 #define YYUSE(e) ((void) (e)) … … 165 145 namespace lol { 166 146 167 /* Line 382 of lalr1.cc */ 168 #line 169 "generated/easymesh-parser.cpp" 147 /* Line 379 of lalr1.cc */ 148 #line 149 "generated/easymesh-parser.cpp" 149 #if YYERROR_VERBOSE 169 150 170 151 /* Return YYSTR after stripping away unnecessary quotes and … … 205 186 } 206 187 188 #endif 207 189 208 190 /// Build a parser object. … … 305 287 #endif 306 288 307 inline bool308 EasyMeshParser::yy_pact_value_is_default_ (int yyvalue)309 {310 return yyvalue == yypact_ninf_;311 }312 313 inline bool314 EasyMeshParser::yy_table_value_is_error_ (int yyvalue)315 {316 return yyvalue == yytable_ninf_;317 }318 319 289 int 320 290 EasyMeshParser::parse () … … 338 308 location_type yylloc; 339 309 /// The locations where the error started and ended. 340 location_type yyerror_range[ 3];310 location_type yyerror_range[2]; 341 311 342 312 /// $$. … … 376 346 /* Try to take a decision without lookahead. */ 377 347 yyn = yypact_[yystate]; 378 if (yy _pact_value_is_default_ (yyn))348 if (yyn == yypact_ninf_) 379 349 goto yydefault; 380 350 … … 409 379 if (yyn <= 0) 410 380 { 411 if (yy _table_value_is_error_ (yyn))412 381 if (yyn == 0 || yyn == yytable_ninf_) 382 goto yyerrlab; 413 383 yyn = -yyn; 414 384 goto yyreduce; … … 466 436 case 7: 467 437 468 /* Line 6 90of lalr1.cc */438 /* Line 677 of lalr1.cc */ 469 439 #line 89 "easymesh/easymesh-parser.y" 470 440 { mc.m_mesh.OpenBrace(); } … … 473 443 case 8: 474 444 475 /* Line 6 90of lalr1.cc */445 /* Line 677 of lalr1.cc */ 476 446 #line 93 "easymesh/easymesh-parser.y" 477 447 { mc.m_mesh.CloseBrace(); } … … 480 450 case 14: 481 451 482 /* Line 6 90of lalr1.cc */452 /* Line 677 of lalr1.cc */ 483 453 #line 108 "easymesh/easymesh-parser.y" 484 454 { 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)); } … … 487 457 case 15: 488 458 489 /* Line 6 90of lalr1.cc */459 /* Line 677 of lalr1.cc */ 490 460 #line 109 "easymesh/easymesh-parser.y" 491 461 { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); … … 496 466 case 16: 497 467 498 /* Line 6 90of lalr1.cc */468 /* Line 677 of lalr1.cc */ 499 469 #line 112 "easymesh/easymesh-parser.y" 500 470 { 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)); } … … 503 473 case 17: 504 474 505 /* Line 6 90of lalr1.cc */475 /* Line 677 of lalr1.cc */ 506 476 #line 113 "easymesh/easymesh-parser.y" 507 477 { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); … … 512 482 case 18: 513 483 514 /* Line 6 90of lalr1.cc */484 /* Line 677 of lalr1.cc */ 515 485 #line 119 "easymesh/easymesh-parser.y" 516 486 { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); } … … 519 489 case 19: 520 490 521 /* Line 6 90of lalr1.cc */491 /* Line 677 of lalr1.cc */ 522 492 #line 120 "easymesh/easymesh-parser.y" 523 493 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); } … … 526 496 case 20: 527 497 528 /* Line 6 90of lalr1.cc */498 /* Line 677 of lalr1.cc */ 529 499 #line 121 "easymesh/easymesh-parser.y" 530 500 { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); } … … 533 503 case 21: 534 504 535 /* Line 6 90of lalr1.cc */505 /* Line 677 of lalr1.cc */ 536 506 #line 122 "easymesh/easymesh-parser.y" 537 507 { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); } … … 540 510 case 22: 541 511 542 /* Line 6 90of lalr1.cc */512 /* Line 677 of lalr1.cc */ 543 513 #line 123 "easymesh/easymesh-parser.y" 544 514 { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } … … 547 517 case 23: 548 518 549 /* Line 6 90of lalr1.cc */519 /* Line 677 of lalr1.cc */ 550 520 #line 124 "easymesh/easymesh-parser.y" 551 521 { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); } … … 554 524 case 24: 555 525 556 /* Line 6 90of lalr1.cc */526 /* Line 677 of lalr1.cc */ 557 527 #line 125 "easymesh/easymesh-parser.y" 558 528 { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); } … … 561 531 case 25: 562 532 563 /* Line 6 90of lalr1.cc */533 /* Line 677 of lalr1.cc */ 564 534 #line 126 "easymesh/easymesh-parser.y" 565 535 { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); } … … 568 538 case 26: 569 539 570 /* Line 6 90of lalr1.cc */540 /* Line 677 of lalr1.cc */ 571 541 #line 127 "easymesh/easymesh-parser.y" 572 542 { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } … … 575 545 case 27: 576 546 577 /* Line 6 90of lalr1.cc */547 /* Line 677 of lalr1.cc */ 578 548 #line 128 "easymesh/easymesh-parser.y" 579 549 { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } … … 582 552 case 28: 583 553 584 /* Line 6 90of lalr1.cc */554 /* Line 677 of lalr1.cc */ 585 555 #line 129 "easymesh/easymesh-parser.y" 586 556 { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } … … 589 559 case 29: 590 560 591 /* Line 6 90of lalr1.cc */561 /* Line 677 of lalr1.cc */ 592 562 #line 130 "easymesh/easymesh-parser.y" 593 563 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); } … … 596 566 case 30: 597 567 598 /* Line 6 90of lalr1.cc */568 /* Line 677 of lalr1.cc */ 599 569 #line 131 "easymesh/easymesh-parser.y" 600 570 { mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); } … … 603 573 case 31: 604 574 605 /* Line 6 90of lalr1.cc */575 /* Line 677 of lalr1.cc */ 606 576 #line 132 "easymesh/easymesh-parser.y" 607 577 { mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); } … … 610 580 case 32: 611 581 612 /* Line 6 90of lalr1.cc */582 /* Line 677 of lalr1.cc */ 613 583 #line 133 "easymesh/easymesh-parser.y" 614 584 { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } … … 617 587 case 33: 618 588 619 /* Line 6 90of lalr1.cc */589 /* Line 677 of lalr1.cc */ 620 590 #line 134 "easymesh/easymesh-parser.y" 621 591 { mc.m_mesh.MirrorX(); } … … 624 594 case 34: 625 595 626 /* Line 6 90of lalr1.cc */596 /* Line 677 of lalr1.cc */ 627 597 #line 135 "easymesh/easymesh-parser.y" 628 598 { mc.m_mesh.MirrorY(); } … … 631 601 case 35: 632 602 633 /* Line 6 90of lalr1.cc */603 /* Line 677 of lalr1.cc */ 634 604 #line 136 "easymesh/easymesh-parser.y" 635 605 { mc.m_mesh.MirrorZ(); } … … 638 608 case 36: 639 609 640 /* Line 690 of lalr1.cc */ 641 #line 140 "easymesh/easymesh-parser.y" 610 /* Line 677 of lalr1.cc */ 611 #line 137 "easymesh/easymesh-parser.y" 612 { mc.m_mesh.ToggleScaleWinding(); } 613 break; 614 615 case 37: 616 617 /* Line 677 of lalr1.cc */ 618 #line 141 "easymesh/easymesh-parser.y" 642 619 { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 643 620 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, … … 645 622 break; 646 623 647 case 3 7:648 649 /* Line 6 90of lalr1.cc */650 #line 14 3"easymesh/easymesh-parser.y"624 case 38: 625 626 /* Line 677 of lalr1.cc */ 627 #line 144 "easymesh/easymesh-parser.y" 651 628 { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } 652 629 break; 653 630 654 case 3 8:655 656 /* Line 6 90of lalr1.cc */657 #line 14 4"easymesh/easymesh-parser.y"631 case 39: 632 633 /* Line 677 of lalr1.cc */ 634 #line 145 "easymesh/easymesh-parser.y" 658 635 { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 659 636 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 660 637 break; 661 638 662 case 39:663 664 /* Line 6 90of lalr1.cc */665 #line 14 6"easymesh/easymesh-parser.y"639 case 40: 640 641 /* Line 677 of lalr1.cc */ 642 #line 147 "easymesh/easymesh-parser.y" 666 643 { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 667 644 (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } 668 645 break; 669 646 670 case 4 0:671 672 /* Line 6 90of lalr1.cc */673 #line 14 8"easymesh/easymesh-parser.y"647 case 41: 648 649 /* Line 677 of lalr1.cc */ 650 #line 149 "easymesh/easymesh-parser.y" 674 651 { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, 675 652 vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); } 676 653 break; 677 654 678 case 4 1:679 680 /* Line 6 90of lalr1.cc */681 #line 15 0"easymesh/easymesh-parser.y"655 case 42: 656 657 /* Line 677 of lalr1.cc */ 658 #line 151 "easymesh/easymesh-parser.y" 682 659 { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 683 660 break; 684 661 685 case 4 2:686 687 /* Line 6 90of lalr1.cc */688 #line 15 1"easymesh/easymesh-parser.y"662 case 43: 663 664 /* Line 677 of lalr1.cc */ 665 #line 152 "easymesh/easymesh-parser.y" 689 666 { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } 690 667 break; 691 668 692 case 4 3:693 694 /* Line 6 90of lalr1.cc */695 #line 15 2"easymesh/easymesh-parser.y"669 case 44: 670 671 /* Line 677 of lalr1.cc */ 672 #line 153 "easymesh/easymesh-parser.y" 696 673 { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, 697 674 (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } 698 675 break; 699 676 700 case 4 4:701 702 /* Line 6 90of lalr1.cc */703 #line 15 4"easymesh/easymesh-parser.y"677 case 45: 678 679 /* Line 677 of lalr1.cc */ 680 #line 155 "easymesh/easymesh-parser.y" 704 681 { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, 705 682 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } 706 683 break; 707 684 708 case 4 5:709 710 /* Line 6 90of lalr1.cc */711 #line 15 6"easymesh/easymesh-parser.y"685 case 46: 686 687 /* Line 677 of lalr1.cc */ 688 #line 157 "easymesh/easymesh-parser.y" 712 689 { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } 713 690 break; 714 691 715 case 4 6:716 717 /* Line 6 90of lalr1.cc */718 #line 15 7"easymesh/easymesh-parser.y"692 case 47: 693 694 /* Line 677 of lalr1.cc */ 695 #line 158 "easymesh/easymesh-parser.y" 719 696 { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 720 697 break; 721 698 722 case 4 7:723 724 /* Line 6 90of lalr1.cc */725 #line 15 8"easymesh/easymesh-parser.y"699 case 48: 700 701 /* Line 677 of lalr1.cc */ 702 #line 159 "easymesh/easymesh-parser.y" 726 703 { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } 727 704 break; 728 705 729 case 4 8:730 731 /* Line 6 90of lalr1.cc */732 #line 1 59"easymesh/easymesh-parser.y"706 case 49: 707 708 /* Line 677 of lalr1.cc */ 709 #line 160 "easymesh/easymesh-parser.y" 733 710 { 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, 734 711 (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); } 735 712 break; 736 713 737 case 49:738 739 /* Line 6 90of lalr1.cc */740 #line 16 3"easymesh/easymesh-parser.y"714 case 50: 715 716 /* Line 677 of lalr1.cc */ 717 #line 164 "easymesh/easymesh-parser.y" 741 718 { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } 742 719 break; 743 720 744 case 5 0:745 746 /* Line 6 90of lalr1.cc */747 #line 16 4"easymesh/easymesh-parser.y"721 case 51: 722 723 /* Line 677 of lalr1.cc */ 724 #line 165 "easymesh/easymesh-parser.y" 748 725 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } 749 726 break; 750 727 751 case 5 1:752 753 /* Line 6 90of lalr1.cc */754 #line 16 5"easymesh/easymesh-parser.y"728 case 52: 729 730 /* Line 677 of lalr1.cc */ 731 #line 166 "easymesh/easymesh-parser.y" 755 732 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } 756 733 break; 757 734 758 case 5 2:759 760 /* Line 6 90of lalr1.cc */761 #line 16 6"easymesh/easymesh-parser.y"735 case 53: 736 737 /* Line 677 of lalr1.cc */ 738 #line 167 "easymesh/easymesh-parser.y" 762 739 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } 763 740 break; 764 741 765 case 5 3:766 767 /* Line 6 90of lalr1.cc */768 #line 16 7"easymesh/easymesh-parser.y"742 case 54: 743 744 /* Line 677 of lalr1.cc */ 745 #line 168 "easymesh/easymesh-parser.y" 769 746 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } 770 747 break; 771 748 772 case 5 4:773 774 /* Line 6 90of lalr1.cc */775 #line 16 8"easymesh/easymesh-parser.y"749 case 55: 750 751 /* Line 677 of lalr1.cc */ 752 #line 169 "easymesh/easymesh-parser.y" 776 753 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } 777 754 break; 778 755 779 case 5 5:780 781 /* Line 6 90of lalr1.cc */782 #line 1 69"easymesh/easymesh-parser.y"756 case 56: 757 758 /* Line 677 of lalr1.cc */ 759 #line 170 "easymesh/easymesh-parser.y" 783 760 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } 784 761 break; 785 762 786 case 5 6:787 788 /* Line 6 90of lalr1.cc */789 #line 17 0"easymesh/easymesh-parser.y"763 case 57: 764 765 /* Line 677 of lalr1.cc */ 766 #line 171 "easymesh/easymesh-parser.y" 790 767 { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } 791 768 break; 792 769 793 case 5 7:794 795 /* Line 6 90of lalr1.cc */796 #line 17 3"easymesh/easymesh-parser.y"770 case 58: 771 772 /* Line 677 of lalr1.cc */ 773 #line 174 "easymesh/easymesh-parser.y" 797 774 { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } 798 775 break; 799 776 800 case 5 8:801 802 /* Line 6 90of lalr1.cc */803 #line 17 4"easymesh/easymesh-parser.y"777 case 59: 778 779 /* Line 677 of lalr1.cc */ 780 #line 175 "easymesh/easymesh-parser.y" 804 781 { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } 805 782 break; … … 807 784 808 785 809 /* Line 6 90of lalr1.cc */810 #line 811"generated/easymesh-parser.cpp"786 /* Line 677 of lalr1.cc */ 787 #line 788 "generated/easymesh-parser.cpp" 811 788 default: 812 789 break; 813 790 } 814 /* User semantic actions sometimes alter yychar, and that requires815 that yytoken be updated with the new translation. We take the816 approach of translating immediately before every use of yytoken.817 One alternative is translating here after every semantic action,818 but that translation would be missed if the semantic action819 invokes YYABORT, YYACCEPT, or YYERROR immediately after altering820 yychar. In the case of YYABORT or YYACCEPT, an incorrect821 destructor might then be invoked immediately. In the case of822 YYERROR, subsequent parser actions might lead to an incorrect823 destructor call or verbose syntax error message before the824 lookahead is translated. */825 791 YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); 826 792 … … 846 812 `------------------------------------*/ 847 813 yyerrlab: 848 /* Make sure we have latest lookahead translation. See comments at849 user semantic actions for why this is necessary. */850 yytoken = yytranslate_ (yychar);851 852 814 /* If not already recovering from an error, report this error. */ 853 815 if (!yyerrstatus_) 854 816 { 855 817 ++yynerrs_; 856 if (yychar == yyempty_)857 yytoken = yyempty_;858 818 error (yylloc, yysyntax_error_ (yystate, yytoken)); 859 819 } 860 820 861 yyerror_range[ 1] = yylloc;821 yyerror_range[0] = yylloc; 862 822 if (yyerrstatus_ == 3) 863 823 { … … 894 854 goto yyerrorlab; 895 855 896 yyerror_range[ 1] = yylocation_stack_[yylen - 1];856 yyerror_range[0] = yylocation_stack_[yylen - 1]; 897 857 /* Do not reclaim the symbols of the rule which action triggered 898 858 this YYERROR. */ … … 911 871 { 912 872 yyn = yypact_[yystate]; 913 if ( !yy_pact_value_is_default_ (yyn))873 if (yyn != yypact_ninf_) 914 874 { 915 875 yyn += yyterror_; … … 926 886 YYABORT; 927 887 928 yyerror_range[ 1] = yylocation_stack_[0];888 yyerror_range[0] = yylocation_stack_[0]; 929 889 yydestruct_ ("Error: popping", 930 890 yystos_[yystate], … … 935 895 } 936 896 937 yyerror_range[ 2] = yylloc;897 yyerror_range[1] = yylloc; 938 898 // Using YYLLOC is tempting, but would change the location of 939 899 // the lookahead. YYLOC is available though. 940 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);900 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); 941 901 yysemantic_stack_.push (yylval); 942 902 yylocation_stack_.push (yyloc); … … 961 921 yyreturn: 962 922 if (yychar != yyempty_) 963 { 964 /* Make sure we have latest lookahead translation. See comments 965 at user semantic actions for why this is necessary. */ 966 yytoken = yytranslate_ (yychar); 967 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, 968 &yylloc); 969 } 923 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); 970 924 971 925 /* Do not reclaim the symbols of the rule which action triggered … … 986 940 // Generate an error message. 987 941 std::string 988 EasyMeshParser::yysyntax_error_ (int yystate, int yytoken) 989 { 990 std::string yyres; 991 // Number of reported tokens (one for the "unexpected", one per 992 // "expected"). 993 size_t yycount = 0; 994 // Its maximum. 995 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 996 // Arguments of yyformat. 997 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 998 999 /* There are many possibilities here to consider: 1000 - If this state is a consistent state with a default action, then 1001 the only way this function was invoked is if the default action 1002 is an error action. In that case, don't check for expected 1003 tokens because there are none. 1004 - The only way there can be no lookahead present (in yytoken) is 1005 if this state is a consistent state with a default action. 1006 Thus, detecting the absence of a lookahead is sufficient to 1007 determine that there is no unexpected or expected token to 1008 report. In that case, just report a simple "syntax error". 1009 - Don't assume there isn't a lookahead just because this state is 1010 a consistent state with a default action. There might have 1011 been a previous inconsistent state, consistent state with a 1012 non-default action, or user semantic action that manipulated 1013 yychar. 1014 - Of course, the expected token list depends on states to have 1015 correct lookahead information, and it depends on the parser not 1016 to perform extra reductions after fetching a lookahead from the 1017 scanner and before detecting a syntax error. Thus, state 1018 merging (from LALR or IELR) and default reductions corrupt the 1019 expected token list. However, the list is correct for 1020 canonical LR with one exception: it will still contain any 1021 token that will not be accepted due to an error action in a 1022 later state. 1023 */ 1024 if (yytoken != yyempty_) 942 EasyMeshParser::yysyntax_error_ (int yystate, int tok) 943 { 944 std::string res; 945 YYUSE (yystate); 946 #if YYERROR_VERBOSE 947 int yyn = yypact_[yystate]; 948 if (yypact_ninf_ < yyn && yyn <= yylast_) 1025 949 { 1026 yyarg[yycount++] = yytname_[yytoken]; 1027 int yyn = yypact_[yystate]; 1028 if (!yy_pact_value_is_default_ (yyn)) 1029 { 1030 /* Start YYX at -YYN if negative to avoid negative indexes in 1031 YYCHECK. In other words, skip the first -YYN actions for 1032 this state because they are default actions. */ 1033 int yyxbegin = yyn < 0 ? -yyn : 0; 1034 /* Stay within bounds of both yycheck and yytname. */ 1035 int yychecklim = yylast_ - yyn + 1; 1036 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 1037 for (int yyx = yyxbegin; yyx < yyxend; ++yyx) 1038 if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ 1039 && !yy_table_value_is_error_ (yytable_[yyx + yyn])) 1040 { 1041 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1042 { 1043 yycount = 1; 1044 break; 1045 } 1046 else 1047 yyarg[yycount++] = yytname_[yyx]; 1048 } 1049 } 950 /* Start YYX at -YYN if negative to avoid negative indexes in 951 YYCHECK. */ 952 int yyxbegin = yyn < 0 ? -yyn : 0; 953 954 /* Stay within bounds of both yycheck and yytname. */ 955 int yychecklim = yylast_ - yyn + 1; 956 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 957 int count = 0; 958 for (int x = yyxbegin; x < yyxend; ++x) 959 if (yycheck_[x + yyn] == x && x != yyterror_) 960 ++count; 961 962 // FIXME: This method of building the message is not compatible 963 // with internationalization. It should work like yacc.c does it. 964 // That is, first build a string that looks like this: 965 // "syntax error, unexpected %s or %s or %s" 966 // Then, invoke YY_ on this string. 967 // Finally, use the string as a format to output 968 // yytname_[tok], etc. 969 // Until this gets fixed, this message appears in English only. 970 res = "syntax error, unexpected "; 971 res += yytnamerr_ (yytname_[tok]); 972 if (count < 5) 973 { 974 count = 0; 975 for (int x = yyxbegin; x < yyxend; ++x) 976 if (yycheck_[x + yyn] == x && x != yyterror_) 977 { 978 res += (!count++) ? ", expecting " : " or "; 979 res += yytnamerr_ (yytname_[x]); 980 } 981 } 1050 982 } 1051 1052 char const* yyformat = 0; 1053 switch (yycount) 1054 { 1055 #define YYCASE_(N, S) \ 1056 case N: \ 1057 yyformat = S; \ 1058 break 1059 YYCASE_(0, YY_("syntax error")); 1060 YYCASE_(1, YY_("syntax error, unexpected %s")); 1061 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1062 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1063 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1064 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1065 #undef YYCASE_ 1066 } 1067 1068 // Argument number. 1069 size_t yyi = 0; 1070 for (char const* yyp = yyformat; *yyp; ++yyp) 1071 if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) 1072 { 1073 yyres += yytnamerr_ (yyarg[yyi++]); 1074 ++yyp; 1075 } 1076 else 1077 yyres += *yyp; 1078 return yyres; 983 else 984 #endif 985 res = YY_("syntax error"); 986 return res; 1079 987 } 1080 988 … … 1082 990 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1083 991 STATE-NUM. */ 1084 const signed char EasyMeshParser::yypact_ninf_ = - 47;992 const signed char EasyMeshParser::yypact_ninf_ = -10; 1085 993 const signed char 1086 994 EasyMeshParser::yypact_[] = 1087 995 { 1088 35, -26, 85, -31, -31, -31, -31, -47, -31, -31,1089 -31, -31, -47, -31, -31, -31, -31, -47, -31, -31,1090 - 31, -31, -31, -31, -31, -31, -31, -31, -31, -31,1091 -31, -31, -31, -31, -47, 5, 13, 35, 35, 72,1092 -47, -47, -47, -47, -47, -47, -31, -31, -31, -31,1093 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,1094 - 47, -47, -47, -47, -47, -47, -47, -47, -47, -31,1095 -31, -47, -47, -47, -47, -47, -47, -47, -47, -47,1096 - 47, -47, -31, -31, -47, -47, -47, -47, -47, -24,1097 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,1098 - 47996 -3, 11, 87, 6, 6, 6, 6, -10, 6, 6, 997 6, 6, -10, 6, 6, 6, 6, -10, 6, 6, 998 -10, 6, 6, 6, 6, 6, 6, 6, 6, 6, 999 6, 6, 6, 6, 6, -10, 36, 43, -3, -3, 1000 73, -10, -10, -10, -10, -10, -10, 6, 6, 6, 1001 6, -10, -10, -10, -10, -10, -10, -10, -10, -10, 1002 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 1003 6, 6, -10, -10, -10, -10, -10, -10, -10, -10, 1004 -10, -10, -10, 6, 6, -10, -10, -10, -10, -10, 1005 10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 1006 -10, -10 1099 1007 }; 1100 1008 1101 /* YYDEFACT[S] -- default r eduction number in state S. Performed when1102 YYTABLE doesn't specify something else to do. Zero means the1103 default is anerror. */1009 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 1010 doesn't specify something else to do. Zero means the default is an 1011 error. */ 1104 1012 const unsigned char 1105 1013 EasyMeshParser::yydefact_[] = … … 1107 1015 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 1108 1016 0, 0, 34, 0, 0, 0, 0, 35, 0, 0, 1109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1110 0, 0, 0, 0, 7, 0, 0, 3, 0, 5,1111 9, 11, 12, 13, 57, 15, 0, 0, 0, 0,1112 14, 49, 17, 16, 19, 23, 26, 29, 20, 24,1113 2 7, 30, 21, 25, 28, 31, 22, 32, 18, 0,1114 0, 36, 37, 38, 39, 40, 41, 43, 44, 45,1115 46, 47, 0, 0, 48, 42, 1, 2, 4, 0,1116 10, 58, 50, 51, 52, 53, 54, 55, 56, 8,1117 61017 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1018 0, 0, 0, 0, 0, 7, 0, 0, 3, 0, 1019 5, 9, 11, 12, 13, 58, 15, 0, 0, 0, 1020 0, 14, 50, 17, 16, 19, 23, 26, 29, 20, 1021 24, 27, 30, 21, 25, 28, 31, 22, 32, 18, 1022 0, 0, 37, 38, 39, 40, 41, 42, 44, 45, 1023 46, 47, 48, 0, 0, 49, 43, 1, 2, 4, 1024 0, 10, 59, 51, 52, 53, 54, 55, 56, 57, 1025 8, 6 1118 1026 }; 1119 1027 … … 1122 1030 EasyMeshParser::yypgoto_[] = 1123 1031 { 1124 - 47, -47, -18, -47, -47, -47, -47, -17, -47, -47,1125 - 47, 105, -4, -1, 6, 8, 1, -47, -47, -461032 -10, -10, -4, -10, -10, -10, -10, 14, -10, -10, 1033 -10, 107, 26, 37, 44, 31, 30, -10, -10, -9 1126 1034 }; 1127 1035 … … 1130 1038 EasyMeshParser::yydefgoto_[] = 1131 1039 { 1132 -1, 3 5, 36, 37, 38, 100, 39, 40, 41, 42,1133 4 3, 47, 48, 49, 69, 70, 71, 83, 84, 511040 -1, 36, 37, 38, 39, 101, 40, 41, 42, 43, 1041 44, 48, 49, 50, 70, 71, 72, 84, 85, 52 1134 1042 }; 1135 1043 1136 1044 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 1137 1045 positive, shift that token. If negative, reduce the rule which 1138 number is the opposite. If YYTABLE_NINF_, syntax error. */1046 number is the opposite. If zero, do what YYDEFACT says. */ 1139 1047 const signed char EasyMeshParser::yytable_ninf_ = -1; 1140 1048 const unsigned char 1141 1049 EasyMeshParser::yytable_[] = 1142 1050 { 1143 91, 92, 93, 94, 56, 86, 44, 50, 53, 60,1144 46, 44, 45, 87, 64, 46, 99, 66, 67, 88,1145 89, 72, 90, 95, 96, 76, 80, 81, 79, 73,1146 74, 75, 85, 82, 78, 77, 97, 98, 1, 2,1147 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,1148 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,1149 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,1150 33, 0, 0, 0, 34, 1, 2, 3, 4, 5,1151 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,1152 1 6, 17, 18, 19, 20, 21, 22, 23, 24, 25,1153 2 6, 27, 28, 29, 30, 31, 32, 33, 54, 55,1154 0, 57, 0, 58, 59, 0, 61, 0, 62, 63,1155 0, 65, 44, 52, 0, 68, 461051 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1052 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1053 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1054 31, 32, 33, 34, 89, 90, 87, 35, 92, 93, 1055 94, 95, 57, 88, 45, 51, 54, 61, 47, 45, 1056 46, 100, 65, 47, 91, 67, 68, 81, 82, 78, 1057 73, 96, 97, 83, 77, 0, 0, 80, 74, 75, 1058 76, 86, 0, 79, 98, 99, 1, 2, 3, 4, 1059 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1060 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1061 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1062 55, 56, 0, 58, 0, 59, 60, 0, 62, 0, 1063 63, 64, 0, 66, 0, 45, 53, 0, 69, 47 1156 1064 }; 1157 1065 … … 1160 1068 EasyMeshParser::yycheck_[] = 1161 1069 { 1162 46, 47, 48, 49, 5, 0, 37, 1, 2, 10,1163 41, 37, 38, 0, 15, 41, 40, 18, 19, 37,1164 38, 22, 39, 69, 70, 26, 30, 31, 29, 23,1165 24, 25, 33, 32, 28, 27, 82, 83, 3, 4,1166 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,1167 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,1168 2 5, 26, 27, 28, 29, 30, 31, 32, 33, 34,1169 35, -1, -1, -1, 39, 3, 4, 5, 6, 7,1170 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,1171 1 8, 19, 20, 21, 22, 23, 24, 25, 26, 27,1172 2 8, 29, 30, 31, 32, 33, 34, 35, 3, 4,1173 -1, 6, -1, 8, 9, -1, 11, -1, 13, 14,1174 -1, 16, 37, 38, -1, 20, 411070 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1071 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1072 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1073 33, 34, 35, 36, 38, 39, 0, 40, 47, 48, 1074 49, 50, 5, 0, 38, 1, 2, 10, 42, 38, 1075 39, 41, 15, 42, 40, 18, 19, 31, 32, 28, 1076 23, 70, 71, 33, 27, -1, -1, 30, 24, 25, 1077 26, 34, -1, 29, 83, 84, 3, 4, 5, 6, 1078 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1079 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1080 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1081 3, 4, -1, 6, -1, 8, 9, -1, 11, -1, 1082 13, 14, -1, 16, -1, 38, 39, -1, 21, 42 1175 1083 }; 1176 1084 … … 1183 1091 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1184 1092 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1185 32, 33, 34, 35, 3 9, 43, 44, 45, 46, 48,1186 49, 50, 51, 52, 37, 38, 41, 53, 54, 55,1187 56, 61, 38, 56, 53, 53, 55, 53, 53, 53,1188 5 5, 53, 53, 53, 55, 53, 55, 55, 53, 56,1189 57, 58, 5 5, 56, 56, 56, 55, 57, 56, 55,1190 5 4, 54, 58, 59, 60, 55, 0, 0, 44, 44,1191 4 9, 61, 61, 61, 61, 61, 61, 61, 61, 40,1192 4 71093 32, 33, 34, 35, 36, 40, 44, 45, 46, 47, 1094 49, 50, 51, 52, 53, 38, 39, 42, 54, 55, 1095 56, 57, 62, 39, 57, 54, 54, 56, 54, 54, 1096 54, 56, 54, 54, 54, 56, 54, 56, 56, 54, 1097 57, 58, 59, 56, 57, 57, 57, 56, 58, 57, 1098 56, 55, 55, 59, 60, 61, 56, 0, 0, 45, 1099 45, 50, 62, 62, 62, 62, 62, 62, 62, 62, 1100 41, 48 1193 1101 }; 1194 1102 … … 1202 1110 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1203 1111 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1204 285, 286, 287, 288, 289, 290, 291, 292, 293, 91,1205 9 3, 451112 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 1113 91, 93, 45 1206 1114 }; 1207 1115 #endif … … 1211 1119 EasyMeshParser::yyr1_[] = 1212 1120 { 1213 0, 4 2, 43, 44, 44, 45, 45, 46, 47, 48,1214 4 8, 49, 49, 49, 50, 50, 50, 50, 51, 51,1215 5 1, 51, 51, 51, 51, 51, 51, 51, 51, 51,1216 5 1, 51, 51, 51, 51, 51, 52, 52, 52, 52,1217 5 2, 52, 52, 52, 52, 52, 52, 52, 52, 53,1218 54, 55, 56, 57, 58, 59, 60, 61, 6 11121 0, 43, 44, 45, 45, 46, 46, 47, 48, 49, 1122 49, 50, 50, 50, 51, 51, 51, 51, 52, 52, 1123 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 1124 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 1125 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 1126 54, 55, 56, 57, 58, 59, 60, 61, 62, 62 1219 1127 }; 1220 1128 … … 1226 1134 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1227 1135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1228 2, 2, 2, 1, 1, 1, 2, 2, 2, 2,1229 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,1230 2, 2, 2, 2, 2, 2, 2, 1, 21136 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1138 1, 2, 2, 2, 2, 2, 2, 2, 1, 2 1231 1139 }; 1232 1140 … … 1241 1149 "T_ROTATEY", "T_TAPERY", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ", 1242 1150 "T_ROTATEZ", "T_TAPERZ", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", 1243 "T_SCALE", "T_ CHAMFER", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX",1244 "T_ FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", "T_STAR", "T_EXPANDEDSTAR",1245 "T_ DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS", "T_ERROR",1246 " NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", "mesh_description",1247 "mesh_ expression_list", "mesh_expression", "mesh_open", "mesh_close",1248 "mesh_ command_list", "mesh_command", "color_command",1249 " transform_command", "primitive_command", "args1", "args2", "args3",1250 "args 4", "args5", "args6", "args7", "args8", "number", 01151 "T_SCALE", "T_TOGGLESCALEWINDING", "T_CHAMFER", "T_CYLINDER", "T_BOX", 1152 "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", "T_STAR", 1153 "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS", 1154 "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", 1155 "mesh_description", "mesh_expression_list", "mesh_expression", 1156 "mesh_open", "mesh_close", "mesh_command_list", "mesh_command", 1157 "color_command", "transform_command", "primitive_command", "args1", 1158 "args2", "args3", "args4", "args5", "args6", "args7", "args8", "number", 0 1251 1159 }; 1252 1160 #endif … … 1257 1165 EasyMeshParser::yyrhs_[] = 1258 1166 { 1259 4 3, 0, -1, 44, 0, -1, 45, -1, 45, 44,1260 -1, 4 8, -1, 46, 44, 47, -1, 39, -1, 40,1261 -1, 49, -1, 48, 49, -1, 50, -1, 51, -1,1262 5 2, -1, 3, 56, -1, 3, 38, -1, 4, 56,1263 -1, 4, 3 8, -1, 22, 53, -1, 5, 53, -1,1264 10, 5 3, -1, 15, 53, -1, 20, 55, -1, 6,1265 5 3, -1, 11, 53, -1, 16, 53, -1, 7, 55,1266 -1, 12, 5 5, -1, 17, 55, -1, 8, 53, -1,1267 13, 5 3, -1, 18, 53, -1, 21, 55, -1, 9,1268 -1, 14, -1, 19, -1, 2 3, 58, -1, 24, 55,1269 -1, 25, 56, -1, 26, 56, -1, 27, 56, -1,1270 28, 55, -1, 35, 55, -1, 29, 57, -1, 30,1271 56, -1, 31, 55, -1, 32, 54, -1, 33, 54,1272 -1, 34, 60, -1, 61, -1, 53, 61, -1, 54,1273 61, -1, 55, 61, -1, 56, 61, -1, 57, 61,1274 -1, 58, 61, -1, 59, 61, -1, 37, -1, 41,1275 61, -11167 44, 0, -1, 45, 0, -1, 46, -1, 46, 45, 1168 -1, 49, -1, 47, 45, 48, -1, 40, -1, 41, 1169 -1, 50, -1, 49, 50, -1, 51, -1, 52, -1, 1170 53, -1, 3, 57, -1, 3, 39, -1, 4, 57, 1171 -1, 4, 39, -1, 23, 54, -1, 5, 54, -1, 1172 10, 54, -1, 15, 54, -1, 20, 56, -1, 6, 1173 54, -1, 11, 54, -1, 16, 54, -1, 7, 56, 1174 -1, 12, 56, -1, 17, 56, -1, 8, 54, -1, 1175 13, 54, -1, 18, 54, -1, 21, 56, -1, 9, 1176 -1, 14, -1, 19, -1, 22, -1, 24, 59, -1, 1177 25, 56, -1, 26, 57, -1, 27, 57, -1, 28, 1178 57, -1, 29, 56, -1, 36, 56, -1, 30, 58, 1179 -1, 31, 57, -1, 32, 56, -1, 33, 55, -1, 1180 34, 55, -1, 35, 61, -1, 62, -1, 54, 62, 1181 -1, 55, 62, -1, 56, 62, -1, 57, 62, -1, 1182 58, 62, -1, 59, 62, -1, 60, 62, -1, 38, 1183 -1, 42, 62, -1 1276 1184 }; 1277 1185 … … 1284 1192 23, 26, 28, 30, 32, 35, 38, 41, 44, 47, 1285 1193 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 1286 80, 83, 86, 89, 91, 93, 95, 9 8, 101, 104,1287 10 7, 110, 113, 116, 119, 122, 125, 128, 131, 134,1288 136, 13 9, 142, 145, 148, 151, 154, 157, 1591194 80, 83, 86, 89, 91, 93, 95, 97, 100, 103, 1195 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 1196 136, 138, 141, 144, 147, 150, 153, 156, 159, 161 1289 1197 }; 1290 1198 … … 1296 1204 98, 102, 103, 104, 108, 109, 112, 113, 119, 120, 1297 1205 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 1298 131, 132, 133, 134, 135, 136, 1 40, 143, 144, 146,1299 14 8, 150, 151, 152, 154, 156, 157, 158, 159, 163,1300 164, 165, 166, 167, 168, 169, 170, 17 3, 1741206 131, 132, 133, 134, 135, 136, 137, 141, 144, 145, 1207 147, 149, 151, 152, 153, 155, 157, 158, 159, 160, 1208 164, 165, 166, 167, 168, 169, 170, 171, 174, 175 1301 1209 }; 1302 1210 … … 1342 1250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1343 1251 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1344 2, 2, 2, 2, 2, 4 1, 2, 2, 2, 2,1345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1349 2, 39, 2, 40, 2, 2, 2, 2, 2, 2,1252 2, 2, 2, 2, 2, 42, 2, 2, 2, 2, 1253 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1254 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1255 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1256 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1257 2, 40, 2, 41, 2, 2, 2, 2, 2, 2, 1350 1258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1351 1259 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 1367 1275 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1368 1276 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1369 35, 36, 37, 38 1277 35, 36, 37, 38, 39 1370 1278 }; 1371 1279 if ((unsigned int) t <= yyuser_token_number_max_) … … 1376 1284 1377 1285 const int EasyMeshParser::yyeof_ = 0; 1378 const int EasyMeshParser::yylast_ = 12 6;1286 const int EasyMeshParser::yylast_ = 129; 1379 1287 const int EasyMeshParser::yynnts_ = 20; 1380 1288 const int EasyMeshParser::yyempty_ = -2; 1381 const int EasyMeshParser::yyfinal_ = 8 6;1289 const int EasyMeshParser::yyfinal_ = 87; 1382 1290 const int EasyMeshParser::yyterror_ = 1; 1383 1291 const int EasyMeshParser::yyerrcode_ = 256; 1384 const int EasyMeshParser::yyntokens_ = 4 2;1385 1386 const unsigned int EasyMeshParser::yyuser_token_number_max_ = 29 3;1292 const int EasyMeshParser::yyntokens_ = 43; 1293 1294 const unsigned int EasyMeshParser::yyuser_token_number_max_ = 294; 1387 1295 const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; 1388 1296 … … 1390 1298 } // lol 1391 1299 1392 /* Line 1 136of lalr1.cc */1393 #line 13 94"generated/easymesh-parser.cpp"1394 1395 1396 /* Line 1 138of lalr1.cc */1397 #line 17 7"easymesh/easymesh-parser.y"1300 /* Line 1053 of lalr1.cc */ 1301 #line 1302 "generated/easymesh-parser.cpp" 1302 1303 1304 /* Line 1055 of lalr1.cc */ 1305 #line 178 "easymesh/easymesh-parser.y" 1398 1306 1399 1307 -
trunk/src/generated/easymesh-parser.h
r1875 r2116 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 interface 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 … … 41 41 #include <iostream> 42 42 #include "stack.hh" 43 44 45 namespace lol { 46 47 /* Line 34 of lalr1.cc */ 48 #line 49 "generated/easymesh-parser.h" 49 class position; 50 class location; 51 52 } // lol 53 54 /* Line 34 of lalr1.cc */ 55 #line 56 "generated/easymesh-parser.h" 56 43 57 #include "location.hh" 44 58 … … 61 75 #endif 62 76 77 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 78 If N is 0, then set CURRENT to the empty location which ends 79 the previous symbol: RHS[0] (always defined). */ 80 81 #ifndef YYLLOC_DEFAULT 82 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 83 do { \ 84 if (N) \ 85 { \ 86 (Current).begin = (Rhs)[1].begin; \ 87 (Current).end = (Rhs)[N].end; \ 88 } \ 89 else \ 90 { \ 91 (Current).begin = (Current).end = (Rhs)[0].end; \ 92 } \ 93 } while (false) 94 #endif 95 63 96 64 97 namespace lol { 65 98 66 /* Line 3 5of lalr1.cc */67 #line 68"generated/easymesh-parser.h"99 /* Line 34 of lalr1.cc */ 100 #line 101 "generated/easymesh-parser.h" 68 101 69 102 /// A Bison parser. … … 76 109 { 77 110 78 /* Line 3 5of lalr1.cc */111 /* Line 34 of lalr1.cc */ 79 112 #line 36 "easymesh/easymesh-parser.y" 80 113 … … 86 119 87 120 88 /* Line 3 5of lalr1.cc */89 #line 90"generated/easymesh-parser.h"121 /* Line 34 of lalr1.cc */ 122 #line 123 "generated/easymesh-parser.h" 90 123 }; 91 124 #else … … 119 152 T_TRANSLATE = 275, 120 153 T_SCALE = 276, 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_CAPSULE = 283, 128 T_STAR = 284, 129 T_EXPANDEDSTAR = 285, 130 T_DISC = 286, 131 T_TRIANGLE = 287, 132 T_QUAD = 288, 133 T_COG = 289, 134 T_TORUS = 290, 135 T_ERROR = 291, 136 NUMBER = 292, 137 COLOR = 293 154 T_TOGGLESCALEWINDING = 277, 155 T_CHAMFER = 278, 156 T_CYLINDER = 279, 157 T_BOX = 280, 158 T_SMOOTHCHAMFBOX = 281, 159 T_FLATCHAMFBOX = 282, 160 T_SPHERE = 283, 161 T_CAPSULE = 284, 162 T_STAR = 285, 163 T_EXPANDEDSTAR = 286, 164 T_DISC = 287, 165 T_TRIANGLE = 288, 166 T_QUAD = 289, 167 T_COG = 290, 168 T_TORUS = 291, 169 T_ERROR = 292, 170 NUMBER = 293, 171 COLOR = 294 138 172 }; 139 173 … … 209 243 location_stack_type yylocation_stack_; 210 244 211 /// Whether the given \c yypact_ value indicates a defaulted state.212 /// \param yyvalue the value to check213 static bool yy_pact_value_is_default_ (int yyvalue);214 215 /// Whether the given \c yytable_ value indicates a syntax error.216 /// \param yyvalue the value to check217 static bool yy_table_value_is_error_ (int yyvalue);218 219 245 /// Internal symbol numbers. 220 246 typedef unsigned char token_number_type; … … 224 250 static const signed char yypact_ninf_; 225 251 226 /// For a state, default r eduction number.252 /// For a state, default rule to reduce. 227 253 /// Unless\a yytable_ specifies something else to do. 228 254 /// Zero means the default is an error. … … 255 281 #endif 256 282 283 #if YYERROR_VERBOSE 257 284 /// Convert the symbol name \a n to a form suitable for a diagnostic. 258 static std::string yytnamerr_ (const char *n); 285 virtual std::string yytnamerr_ (const char *n); 286 #endif 259 287 260 288 #if YYDEBUG … … 314 342 } // lol 315 343 316 /* Line 3 5of lalr1.cc */317 #line 3 18"generated/easymesh-parser.h"344 /* Line 34 of lalr1.cc */ 345 #line 346 "generated/easymesh-parser.h" 318 346 319 347 -
trunk/src/generated/easymesh-scanner.cpp
r1910 r2116 331 331 (yy_c_buf_p) = yy_cp; 332 332 333 #define YY_NUM_RULES 4 5334 #define YY_END_OF_BUFFER 4 6333 #define YY_NUM_RULES 46 334 #define YY_END_OF_BUFFER 47 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[7 3] =342 static yyconst flex_int16_t yy_accept[75] = 343 343 { 0, 344 0, 0, 4 6, 44, 43, 42, 44, 44, 39, 44,345 3 8, 40, 41, 44, 44, 44, 44, 17, 7, 0,346 0, 3 8, 38, 0, 21, 22, 25, 0, 0, 28,347 29, 32, 3, 18, 19, 20, 8, 9, 10, 1,348 14, 15, 16, 0, 4, 5, 6, 0, 0, 38,349 0, 24, 26, 0, 0, 0, 33, 2, 11, 12,350 1 3, 34, 23, 27, 30, 31, 35, 0, 36, 0,351 37, 0 344 0, 0, 47, 45, 44, 43, 45, 45, 40, 45, 345 39, 41, 42, 45, 45, 45, 45, 17, 7, 0, 346 0, 39, 39, 0, 22, 23, 26, 0, 0, 29, 347 30, 33, 3, 19, 20, 21, 8, 9, 10, 1, 348 14, 15, 16, 0, 0, 4, 5, 6, 0, 0, 349 39, 0, 25, 27, 0, 0, 0, 34, 2, 11, 350 12, 13, 18, 35, 24, 28, 31, 32, 36, 0, 351 37, 0, 38, 0 352 352 } ; 353 353 … … 366 366 367 367 17, 18, 19, 20, 1, 1, 1, 1, 21, 1, 368 22, 23, 24, 25, 26, 27, 1, 1, 1, 28,369 29, 30, 1, 1, 1, 1, 1, 1, 1, 1,368 22, 23, 24, 25, 26, 27, 1, 1, 28, 29, 369 30, 31, 1, 1, 1, 1, 1, 1, 1, 1, 370 370 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 371 371 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 384 384 } ; 385 385 386 static yyconst flex_int32_t yy_meta[3 1] =386 static yyconst flex_int32_t yy_meta[32] = 387 387 { 0, 388 388 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 389 389 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 391 1 391 392 } ; 392 393 393 static yyconst flex_int16_t yy_base[8 1] =394 static yyconst flex_int16_t yy_base[83] = 394 395 { 0, 395 0, 0, 99, 100, 100, 100, 0, 24, 26, 90, 396 28, 100, 100, 32, 77, 11, 14, 36, 24, 0, 397 88, 53, 59, 66, 100, 49, 100, 69, 79, 100, 398 58, 71, 100, 100, 100, 100, 100, 100, 100, 78, 399 100, 100, 100, 49, 100, 100, 100, 0, 83, 82, 400 66, 100, 100, 74, 73, 66, 100, 100, 100, 100, 401 100, 0, 100, 100, 100, 100, 0, 0, 0, 0, 402 100, 100, 83, 82, 81, 80, 78, 73, 55, 53 396 0, 0, 102, 103, 103, 103, 0, 25, 27, 93, 397 29, 103, 103, 33, 80, 11, 14, 23, 48, 0, 398 91, 48, 54, 61, 103, 57, 103, 72, 82, 103, 399 57, 74, 103, 103, 103, 103, 103, 103, 103, 81, 400 103, 103, 103, 52, 66, 103, 103, 103, 0, 85, 401 84, 68, 103, 103, 76, 75, 68, 103, 103, 103, 402 103, 103, 103, 0, 103, 103, 103, 103, 0, 0, 403 0, 0, 103, 103, 85, 84, 83, 82, 73, 71, 404 66, 61 403 405 } ; 404 406 405 static yyconst flex_int16_t yy_def[8 1] =407 static yyconst flex_int16_t yy_def[83] = 406 408 { 0, 407 72, 1, 72, 72, 72, 72, 73, 72, 72, 72, 408 72, 72, 72, 72, 72, 72, 72, 72, 72, 74, 409 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 410 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 411 72, 72, 72, 72, 72, 72, 72, 75, 72, 72, 412 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 413 72, 76, 72, 72, 72, 72, 77, 78, 79, 80, 414 72, 0, 72, 72, 72, 72, 72, 72, 72, 72 409 74, 1, 74, 74, 74, 74, 75, 74, 74, 74, 410 74, 74, 74, 74, 74, 74, 74, 74, 74, 76, 411 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 412 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 413 74, 74, 74, 74, 74, 74, 74, 74, 77, 74, 414 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 415 74, 74, 74, 78, 74, 74, 74, 74, 79, 80, 416 81, 82, 74, 0, 74, 74, 74, 74, 74, 74, 417 74, 74 415 418 } ; 416 419 417 static yyconst flex_int16_t yy_nxt[13 1] =420 static yyconst flex_int16_t yy_nxt[135] = 418 421 { 0, 419 422 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 420 423 12, 13, 14, 4, 15, 4, 4, 4, 4, 4, 421 424 16, 4, 4, 4, 17, 18, 19, 4, 4, 4, 422 21, 22, 21, 22, 21, 22, 44, 24, 34, 35, 423 36, 37, 38, 39, 24, 25, 26, 27, 28, 29, 424 40, 45, 46, 47, 71, 30, 70, 31, 32, 21, 425 22, 51, 24, 41, 42, 43, 23, 52, 24, 24, 426 49, 49, 55, 50, 69, 24, 59, 60, 61, 68, 427 56, 67, 62, 48, 20, 66, 65, 64, 63, 50, 428 50, 58, 57, 54, 53, 23, 33, 23, 72, 3, 429 430 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 431 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 432 72, 72, 72, 72, 72, 72, 72, 72, 72, 72 425 4, 21, 22, 21, 22, 21, 22, 40, 24, 34, 426 35, 36, 37, 38, 39, 24, 25, 26, 27, 28, 427 29, 41, 42, 43, 21, 22, 30, 24, 31, 32, 428 44, 23, 73, 24, 24, 50, 50, 72, 51, 52, 429 24, 56, 71, 45, 70, 53, 46, 47, 48, 57, 430 60, 61, 62, 69, 64, 49, 20, 68, 67, 66, 431 65, 51, 51, 63, 59, 58, 55, 54, 23, 33, 432 433 23, 74, 3, 74, 74, 74, 74, 74, 74, 74, 434 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 435 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 436 74, 74, 74, 74 433 437 } ; 434 438 435 static yyconst flex_int16_t yy_chk[13 1] =439 static yyconst flex_int16_t yy_chk[135] = 436 440 { 0, 437 441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 438 442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 439 443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 440 8, 8, 9, 9, 11, 11, 19, 11, 16, 16, 441 16, 17, 17, 17, 11, 14, 14, 14, 14, 14, 442 18, 19, 19, 19, 80, 14, 79, 14, 14, 22, 443 22, 26, 22, 18, 18, 18, 23, 26, 23, 22, 444 24, 24, 31, 24, 78, 23, 44, 44, 44, 77, 445 31, 76, 75, 74, 73, 56, 55, 54, 51, 50, 446 49, 40, 32, 29, 28, 21, 15, 10, 3, 72, 447 448 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 449 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 450 72, 72, 72, 72, 72, 72, 72, 72, 72, 72 444 1, 8, 8, 9, 9, 11, 11, 18, 11, 16, 445 16, 16, 17, 17, 17, 11, 14, 14, 14, 14, 446 14, 18, 18, 18, 22, 22, 14, 22, 14, 14, 447 19, 23, 82, 23, 22, 24, 24, 81, 24, 26, 448 23, 31, 80, 19, 79, 26, 19, 19, 19, 31, 449 44, 44, 44, 78, 77, 76, 75, 57, 56, 55, 450 52, 51, 50, 45, 40, 32, 29, 28, 21, 15, 451 452 10, 3, 74, 74, 74, 74, 74, 74, 74, 74, 453 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 454 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 455 74, 74, 74, 74 451 456 } ; 452 457 … … 497 502 #define YY_NO_UNISTD_H 498 503 #define YY_USER_ACTION yylloc->columns(yyleng); 499 #line 50 0"generated/easymesh-scanner.cpp"504 #line 505 "generated/easymesh-scanner.cpp" 500 505 501 506 #define INITIAL 0 … … 610 615 611 616 612 #line 61 3"generated/easymesh-scanner.cpp"617 #line 618 "generated/easymesh-scanner.cpp" 613 618 614 619 if ( !(yy_init) ) … … 663 668 { 664 669 yy_current_state = (int) yy_def[yy_current_state]; 665 if ( yy_current_state >= 7 3)670 if ( yy_current_state >= 75 ) 666 671 yy_c = yy_meta[(unsigned int) yy_c]; 667 672 } … … 669 674 ++yy_cp; 670 675 } 671 while ( yy_current_state != 7 2);676 while ( yy_current_state != 74 ); 672 677 yy_cp = (yy_last_accepting_cpos); 673 678 yy_current_state = (yy_last_accepting_state); … … 777 782 YY_RULE_SETUP 778 783 #line 69 "easymesh/easymesh-scanner.l" 784 { return token::T_TOGGLESCALEWINDING; } 785 YY_BREAK 786 case 19: 787 YY_RULE_SETUP 788 #line 70 "easymesh/easymesh-scanner.l" 779 789 { return token::T_MIRRORX; } 780 790 YY_BREAK 781 case 19:782 YY_RULE_SETUP 783 #line 7 0"easymesh/easymesh-scanner.l"791 case 20: 792 YY_RULE_SETUP 793 #line 71 "easymesh/easymesh-scanner.l" 784 794 { return token::T_MIRRORY; } 785 795 YY_BREAK 786 case 2 0:787 YY_RULE_SETUP 788 #line 7 1"easymesh/easymesh-scanner.l"796 case 21: 797 YY_RULE_SETUP 798 #line 72 "easymesh/easymesh-scanner.l" 789 799 { return token::T_MIRRORZ; } 790 800 YY_BREAK 791 case 2 1:792 YY_RULE_SETUP 793 #line 7 3"easymesh/easymesh-scanner.l"801 case 22: 802 YY_RULE_SETUP 803 #line 74 "easymesh/easymesh-scanner.l" 794 804 { return token::T_BOX; } 795 805 YY_BREAK 796 case 2 2:797 YY_RULE_SETUP 798 #line 7 4"easymesh/easymesh-scanner.l"806 case 23: 807 YY_RULE_SETUP 808 #line 75 "easymesh/easymesh-scanner.l" 799 809 { return token::T_CYLINDER; } 800 810 YY_BREAK 801 case 2 3:802 YY_RULE_SETUP 803 #line 7 5"easymesh/easymesh-scanner.l"811 case 24: 812 YY_RULE_SETUP 813 #line 76 "easymesh/easymesh-scanner.l" 804 814 { return token::T_CAPSULE; } 805 815 YY_BREAK 806 case 2 4:807 YY_RULE_SETUP 808 #line 7 6"easymesh/easymesh-scanner.l"816 case 25: 817 YY_RULE_SETUP 818 #line 77 "easymesh/easymesh-scanner.l" 809 819 { return token::T_COG; } 810 820 YY_BREAK 811 case 2 5:812 YY_RULE_SETUP 813 #line 7 7"easymesh/easymesh-scanner.l"821 case 26: 822 YY_RULE_SETUP 823 #line 78 "easymesh/easymesh-scanner.l" 814 824 { return token::T_DISC; } 815 825 YY_BREAK 816 case 2 6:817 YY_RULE_SETUP 818 #line 7 8"easymesh/easymesh-scanner.l"826 case 27: 827 YY_RULE_SETUP 828 #line 79 "easymesh/easymesh-scanner.l" 819 829 { return token::T_EXPANDEDSTAR; } 820 830 YY_BREAK 821 case 2 7:822 YY_RULE_SETUP 823 #line 79"easymesh/easymesh-scanner.l"831 case 28: 832 YY_RULE_SETUP 833 #line 80 "easymesh/easymesh-scanner.l" 824 834 { return token::T_FLATCHAMFBOX; } 825 835 YY_BREAK 826 case 2 8:827 YY_RULE_SETUP 828 #line 8 0"easymesh/easymesh-scanner.l"836 case 29: 837 YY_RULE_SETUP 838 #line 81 "easymesh/easymesh-scanner.l" 829 839 { return token::T_QUAD; } 830 840 YY_BREAK 831 case 29:832 YY_RULE_SETUP 833 #line 8 1"easymesh/easymesh-scanner.l"841 case 30: 842 YY_RULE_SETUP 843 #line 82 "easymesh/easymesh-scanner.l" 834 844 { return token::T_STAR; } 835 845 YY_BREAK 836 case 3 0:837 YY_RULE_SETUP 838 #line 8 2"easymesh/easymesh-scanner.l"846 case 31: 847 YY_RULE_SETUP 848 #line 83 "easymesh/easymesh-scanner.l" 839 849 { return token::T_SMOOTHCHAMFBOX; } 840 850 YY_BREAK 841 case 3 1:842 YY_RULE_SETUP 843 #line 8 3"easymesh/easymesh-scanner.l"851 case 32: 852 YY_RULE_SETUP 853 #line 84 "easymesh/easymesh-scanner.l" 844 854 { return token::T_SPHERE; } 845 855 YY_BREAK 846 case 3 2:847 YY_RULE_SETUP 848 #line 8 4"easymesh/easymesh-scanner.l"856 case 33: 857 YY_RULE_SETUP 858 #line 85 "easymesh/easymesh-scanner.l" 849 859 { return token::T_TRIANGLE; } 850 860 YY_BREAK 851 case 3 3:852 YY_RULE_SETUP 853 #line 8 5"easymesh/easymesh-scanner.l"861 case 34: 862 YY_RULE_SETUP 863 #line 86 "easymesh/easymesh-scanner.l" 854 864 { return token::T_TORUS; } 855 865 YY_BREAK 856 case 3 4:857 YY_RULE_SETUP 858 #line 8 7"easymesh/easymesh-scanner.l"866 case 35: 867 YY_RULE_SETUP 868 #line 88 "easymesh/easymesh-scanner.l" 859 869 { 860 870 uint32_t tmp = std::strtol(yytext + 1, NULL, 16); … … 865 875 return token::COLOR; } 866 876 YY_BREAK 867 case 3 5:868 YY_RULE_SETUP 869 #line 9 4"easymesh/easymesh-scanner.l"877 case 36: 878 YY_RULE_SETUP 879 #line 95 "easymesh/easymesh-scanner.l" 870 880 { 871 881 uint32_t tmp = std::strtol(yytext + 1, NULL, 16); … … 876 886 return token::COLOR; } 877 887 YY_BREAK 878 case 3 6:879 YY_RULE_SETUP 880 #line 10 1"easymesh/easymesh-scanner.l"888 case 37: 889 YY_RULE_SETUP 890 #line 102 "easymesh/easymesh-scanner.l" 881 891 { 882 892 yylval->u32val = 0xffu … … 884 894 return token::COLOR; } 885 895 YY_BREAK 886 case 3 7:887 YY_RULE_SETUP 888 #line 10 5"easymesh/easymesh-scanner.l"896 case 38: 897 YY_RULE_SETUP 898 #line 106 "easymesh/easymesh-scanner.l" 889 899 { 890 900 yylval->u32val = (uint32_t)std::strtol(yytext + 1, NULL, 16); 891 901 return token::COLOR; } 892 902 YY_BREAK 893 case 3 8:894 YY_RULE_SETUP 895 #line 10 8"easymesh/easymesh-scanner.l"903 case 39: 904 YY_RULE_SETUP 905 #line 109 "easymesh/easymesh-scanner.l" 896 906 { 897 907 yylval->fval = std::atof(yytext); return token::NUMBER; } 898 908 YY_BREAK 899 case 39:900 YY_RULE_SETUP 901 #line 11 0"easymesh/easymesh-scanner.l"909 case 40: 910 YY_RULE_SETUP 911 #line 111 "easymesh/easymesh-scanner.l" 902 912 { return token_type('-'); } 903 913 YY_BREAK 904 case 4 0:905 YY_RULE_SETUP 906 #line 11 1"easymesh/easymesh-scanner.l"914 case 41: 915 YY_RULE_SETUP 916 #line 112 "easymesh/easymesh-scanner.l" 907 917 { return token_type('['); } 908 918 YY_BREAK 909 case 4 1:910 YY_RULE_SETUP 911 #line 11 2"easymesh/easymesh-scanner.l"919 case 42: 920 YY_RULE_SETUP 921 #line 113 "easymesh/easymesh-scanner.l" 912 922 { return token_type(']'); } 913 923 YY_BREAK 914 case 42:915 YY_RULE_SETUP916 #line 113 "easymesh/easymesh-scanner.l"917 { /* ignore this */ }918 YY_BREAK919 924 case 43: 920 /* rule 43 can match eol */921 925 YY_RULE_SETUP 922 926 #line 114 "easymesh/easymesh-scanner.l" … … 924 928 YY_BREAK 925 929 case 44: 930 /* rule 44 can match eol */ 926 931 YY_RULE_SETUP 927 932 #line 115 "easymesh/easymesh-scanner.l" 933 { /* ignore this */ } 934 YY_BREAK 935 case 45: 936 YY_RULE_SETUP 937 #line 116 "easymesh/easymesh-scanner.l" 928 938 { return token::T_ERROR; } 929 939 YY_BREAK 930 case 4 5:931 YY_RULE_SETUP 932 #line 11 7"easymesh/easymesh-scanner.l"940 case 46: 941 YY_RULE_SETUP 942 #line 118 "easymesh/easymesh-scanner.l" 933 943 ECHO; 934 944 YY_BREAK 935 #line 9 36 "generated/easymesh-scanner.cpp"945 #line 946 "generated/easymesh-scanner.cpp" 936 946 case YY_STATE_EOF(INITIAL): 937 947 yyterminate(); … … 1315 1325 { 1316 1326 yy_current_state = (int) yy_def[yy_current_state]; 1317 if ( yy_current_state >= 7 3)1327 if ( yy_current_state >= 75 ) 1318 1328 yy_c = yy_meta[(unsigned int) yy_c]; 1319 1329 } … … 1343 1353 { 1344 1354 yy_current_state = (int) yy_def[yy_current_state]; 1345 if ( yy_current_state >= 7 3)1355 if ( yy_current_state >= 75 ) 1346 1356 yy_c = yy_meta[(unsigned int) yy_c]; 1347 1357 } 1348 1358 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1349 yy_is_jam = (yy_current_state == 7 2);1359 yy_is_jam = (yy_current_state == 74); 1350 1360 1351 1361 return yy_is_jam ? 0 : yy_current_state; … … 1834 1844 #define YYTABLES_NAME "yytables" 1835 1845 1836 #line 11 7"easymesh/easymesh-scanner.l"1846 #line 118 "easymesh/easymesh-scanner.l" 1837 1847 1838 1848 -
trunk/src/generated/location.hh
r1510 r2116 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 /* Locations for Bison parsers in C++ 4 4 5 Copyright (C) 2002-2007, 2009-201 1Free Software Foundation, Inc.5 Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc. 6 6 7 7 This program is free software: you can redistribute it and/or modify -
trunk/src/generated/lolfx-parser.cpp
r1937 r2116 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 "gpu/lolfx-parser.y" 40 40 … … 59 59 60 60 61 /* Line 293of lalr1.cc */61 /* Line 310 of lalr1.cc */ 62 62 #line 63 "generated/lolfx-parser.cpp" 63 63 … … 67 67 /* User implementation prologue. */ 68 68 69 /* Line 299of lalr1.cc */69 /* Line 316 of lalr1.cc */ 70 70 #line 241 "gpu/lolfx-parser.y" 71 71 … … 76 76 77 77 78 /* Line 299of lalr1.cc */78 /* Line 316 of lalr1.cc */ 79 79 #line 80 "generated/lolfx-parser.cpp" 80 80 … … 91 91 #endif 92 92 93 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].94 If N is 0, then set CURRENT to the empty location which ends95 the previous symbol: RHS[0] (always defined). */96 97 #define YYRHSLOC(Rhs, K) ((Rhs)[K])98 #ifndef YYLLOC_DEFAULT99 # define YYLLOC_DEFAULT(Current, Rhs, N) \100 do \101 if (N) \102 { \103 (Current).begin = YYRHSLOC (Rhs, 1).begin; \104 (Current).end = YYRHSLOC (Rhs, N).end; \105 } \106 else \107 { \108 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \109 } \110 while (false)111 #endif112 113 93 /* Suppress unused-variable warnings by "using" E. */ 114 94 #define YYUSE(e) ((void) (e)) … … 162 142 namespace lol { 163 143 164 /* Line 382 of lalr1.cc */ 165 #line 166 "generated/lolfx-parser.cpp" 144 /* Line 379 of lalr1.cc */ 145 #line 146 "generated/lolfx-parser.cpp" 146 #if YYERROR_VERBOSE 166 147 167 148 /* Return YYSTR after stripping away unnecessary quotes and … … 202 183 } 203 184 185 #endif 204 186 205 187 /// Build a parser object. … … 302 284 #endif 303 285 304 inline bool305 LolFxParser::yy_pact_value_is_default_ (int yyvalue)306 {307 return yyvalue == yypact_ninf_;308 }309 310 inline bool311 LolFxParser::yy_table_value_is_error_ (int yyvalue)312 {313 return yyvalue == yytable_ninf_;314 }315 316 286 int 317 287 LolFxParser::parse () … … 335 305 location_type yylloc; 336 306 /// The locations where the error started and ended. 337 location_type yyerror_range[ 3];307 location_type yyerror_range[2]; 338 308 339 309 /// $$. … … 373 343 /* Try to take a decision without lookahead. */ 374 344 yyn = yypact_[yystate]; 375 if (yy _pact_value_is_default_ (yyn))345 if (yyn == yypact_ninf_) 376 346 goto yydefault; 377 347 … … 406 376 if (yyn <= 0) 407 377 { 408 if (yy _table_value_is_error_ (yyn))409 378 if (yyn == 0 || yyn == yytable_ninf_) 379 goto yyerrlab; 410 380 yyn = -yyn; 411 381 goto yyreduce; … … 463 433 case 202: 464 434 465 /* Line 6 90of lalr1.cc */435 /* Line 677 of lalr1.cc */ 466 436 #line 728 "gpu/lolfx-parser.y" 467 437 { std::cout << "New tech " << std::endl; } … … 470 440 case 203: 471 441 472 /* Line 6 90of lalr1.cc */442 /* Line 677 of lalr1.cc */ 473 443 #line 736 "gpu/lolfx-parser.y" 474 444 { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } … … 477 447 case 204: 478 448 479 /* Line 6 90of lalr1.cc */449 /* Line 677 of lalr1.cc */ 480 450 #line 737 "gpu/lolfx-parser.y" 481 451 { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } … … 484 454 case 207: 485 455 486 /* Line 6 90of lalr1.cc */456 /* Line 677 of lalr1.cc */ 487 457 #line 750 "gpu/lolfx-parser.y" 488 458 { std::cout << "New pass " << std::endl; } … … 491 461 case 226: 492 462 493 /* Line 6 90of lalr1.cc */463 /* Line 677 of lalr1.cc */ 494 464 #line 786 "gpu/lolfx-parser.y" 495 465 { std::cout << "new shader" << std::endl; } … … 498 468 499 469 500 /* Line 6 90of lalr1.cc */501 #line 502 "generated/lolfx-parser.cpp"470 /* Line 677 of lalr1.cc */ 471 #line 472 "generated/lolfx-parser.cpp" 502 472 default: 503 473 break; 504 474 } 505 /* User semantic actions sometimes alter yychar, and that requires506 that yytoken be updated with the new translation. We take the507 approach of translating immediately before every use of yytoken.508 One alternative is translating here after every semantic action,509 but that translation would be missed if the semantic action510 invokes YYABORT, YYACCEPT, or YYERROR immediately after altering511 yychar. In the case of YYABORT or YYACCEPT, an incorrect512 destructor might then be invoked immediately. In the case of513 YYERROR, subsequent parser actions might lead to an incorrect514 destructor call or verbose syntax error message before the515 lookahead is translated. */516 475 YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); 517 476 … … 537 496 `------------------------------------*/ 538 497 yyerrlab: 539 /* Make sure we have latest lookahead translation. See comments at540 user semantic actions for why this is necessary. */541 yytoken = yytranslate_ (yychar);542 543 498 /* If not already recovering from an error, report this error. */ 544 499 if (!yyerrstatus_) 545 500 { 546 501 ++yynerrs_; 547 if (yychar == yyempty_)548 yytoken = yyempty_;549 502 error (yylloc, yysyntax_error_ (yystate, yytoken)); 550 503 } 551 504 552 yyerror_range[ 1] = yylloc;505 yyerror_range[0] = yylloc; 553 506 if (yyerrstatus_ == 3) 554 507 { … … 585 538 goto yyerrorlab; 586 539 587 yyerror_range[ 1] = yylocation_stack_[yylen - 1];540 yyerror_range[0] = yylocation_stack_[yylen - 1]; 588 541 /* Do not reclaim the symbols of the rule which action triggered 589 542 this YYERROR. */ … … 602 555 { 603 556 yyn = yypact_[yystate]; 604 if ( !yy_pact_value_is_default_ (yyn))557 if (yyn != yypact_ninf_) 605 558 { 606 559 yyn += yyterror_; … … 617 570 YYABORT; 618 571 619 yyerror_range[ 1] = yylocation_stack_[0];572 yyerror_range[0] = yylocation_stack_[0]; 620 573 yydestruct_ ("Error: popping", 621 574 yystos_[yystate], … … 626 579 } 627 580 628 yyerror_range[ 2] = yylloc;581 yyerror_range[1] = yylloc; 629 582 // Using YYLLOC is tempting, but would change the location of 630 583 // the lookahead. YYLOC is available though. 631 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);584 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); 632 585 yysemantic_stack_.push (yylval); 633 586 yylocation_stack_.push (yyloc); … … 652 605 yyreturn: 653 606 if (yychar != yyempty_) 654 { 655 /* Make sure we have latest lookahead translation. See comments 656 at user semantic actions for why this is necessary. */ 657 yytoken = yytranslate_ (yychar); 658 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, 659 &yylloc); 660 } 607 yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); 661 608 662 609 /* Do not reclaim the symbols of the rule which action triggered … … 677 624 // Generate an error message. 678 625 std::string 679 LolFxParser::yysyntax_error_ (int yystate, int yytoken)626 LolFxParser::yysyntax_error_ (int yystate, int tok) 680 627 { 681 std::string yyres; 682 // Number of reported tokens (one for the "unexpected", one per 683 // "expected"). 684 size_t yycount = 0; 685 // Its maximum. 686 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 687 // Arguments of yyformat. 688 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 689 690 /* There are many possibilities here to consider: 691 - If this state is a consistent state with a default action, then 692 the only way this function was invoked is if the default action 693 is an error action. In that case, don't check for expected 694 tokens because there are none. 695 - The only way there can be no lookahead present (in yytoken) is 696 if this state is a consistent state with a default action. 697 Thus, detecting the absence of a lookahead is sufficient to 698 determine that there is no unexpected or expected token to 699 report. In that case, just report a simple "syntax error". 700 - Don't assume there isn't a lookahead just because this state is 701 a consistent state with a default action. There might have 702 been a previous inconsistent state, consistent state with a 703 non-default action, or user semantic action that manipulated 704 yychar. 705 - Of course, the expected token list depends on states to have 706 correct lookahead information, and it depends on the parser not 707 to perform extra reductions after fetching a lookahead from the 708 scanner and before detecting a syntax error. Thus, state 709 merging (from LALR or IELR) and default reductions corrupt the 710 expected token list. However, the list is correct for 711 canonical LR with one exception: it will still contain any 712 token that will not be accepted due to an error action in a 713 later state. 714 */ 715 if (yytoken != yyempty_) 628 std::string res; 629 YYUSE (yystate); 630 #if YYERROR_VERBOSE 631 int yyn = yypact_[yystate]; 632 if (yypact_ninf_ < yyn && yyn <= yylast_) 716 633 { 717 yyarg[yycount++] = yytname_[yytoken]; 718 int yyn = yypact_[yystate]; 719 if (!yy_pact_value_is_default_ (yyn)) 720 { 721 /* Start YYX at -YYN if negative to avoid negative indexes in 722 YYCHECK. In other words, skip the first -YYN actions for 723 this state because they are default actions. */ 724 int yyxbegin = yyn < 0 ? -yyn : 0; 725 /* Stay within bounds of both yycheck and yytname. */ 726 int yychecklim = yylast_ - yyn + 1; 727 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 728 for (int yyx = yyxbegin; yyx < yyxend; ++yyx) 729 if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ 730 && !yy_table_value_is_error_ (yytable_[yyx + yyn])) 731 { 732 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 733 { 734 yycount = 1; 735 break; 736 } 737 else 738 yyarg[yycount++] = yytname_[yyx]; 739 } 740 } 634 /* Start YYX at -YYN if negative to avoid negative indexes in 635 YYCHECK. */ 636 int yyxbegin = yyn < 0 ? -yyn : 0; 637 638 /* Stay within bounds of both yycheck and yytname. */ 639 int yychecklim = yylast_ - yyn + 1; 640 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; 641 int count = 0; 642 for (int x = yyxbegin; x < yyxend; ++x) 643 if (yycheck_[x + yyn] == x && x != yyterror_) 644 ++count; 645 646 // FIXME: This method of building the message is not compatible 647 // with internationalization. It should work like yacc.c does it. 648 // That is, first build a string that looks like this: 649 // "syntax error, unexpected %s or %s or %s" 650 // Then, invoke YY_ on this string. 651 // Finally, use the string as a format to output 652 // yytname_[tok], etc. 653 // Until this gets fixed, this message appears in English only. 654 res = "syntax error, unexpected "; 655 res += yytnamerr_ (yytname_[tok]); 656 if (count < 5) 657 { 658 count = 0; 659 for (int x = yyxbegin; x < yyxend; ++x) 660 if (yycheck_[x + yyn] == x && x != yyterror_) 661 { 662 res += (!count++) ? ", expecting " : " or "; 663 res += yytnamerr_ (yytname_[x]); 664 } 665 } 741 666 } 742 743 char const* yyformat = 0; 744 switch (yycount) 745 { 746 #define YYCASE_(N, S) \ 747 case N: \ 748 yyformat = S; \ 749 break 750 YYCASE_(0, YY_("syntax error")); 751 YYCASE_(1, YY_("syntax error, unexpected %s")); 752 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 753 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 754 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 755 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 756 #undef YYCASE_ 757 } 758 759 // Argument number. 760 size_t yyi = 0; 761 for (char const* yyp = yyformat; *yyp; ++yyp) 762 if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) 763 { 764 yyres += yytnamerr_ (yyarg[yyi++]); 765 ++yyp; 766 } 767 else 768 yyres += *yyp; 769 return yyres; 667 else 668 #endif 669 res = YY_("syntax error"); 670 return res; 770 671 } 771 672 … … 846 747 }; 847 748 848 /* YYDEFACT[S] -- default r eduction number in state S. Performed when849 YYTABLE doesn't specify something else to do. Zero means the850 default is anerror. */749 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 750 doesn't specify something else to do. Zero means the default is an 751 error. */ 851 752 const unsigned short int 852 753 LolFxParser::yydefact_[] = … … 955 856 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 956 857 positive, shift that token. If negative, reduce the rule which 957 number is the opposite. If YYTABLE_NINF_, syntax error. */858 number is the opposite. If zero, do what YYDEFACT says. */ 958 859 const short int LolFxParser::yytable_ninf_ = -323; 959 860 const short int … … 3891 3792 } // lol 3892 3793 3893 /* Line 1 136of lalr1.cc */3894 #line 3 895"generated/lolfx-parser.cpp"3895 3896 3897 /* Line 1 138of lalr1.cc */3794 /* Line 1053 of lalr1.cc */ 3795 #line 3796 "generated/lolfx-parser.cpp" 3796 3797 3798 /* Line 1055 of lalr1.cc */ 3898 3799 #line 1298 "gpu/lolfx-parser.y" 3899 3800 -
trunk/src/generated/lolfx-parser.h
r1930 r2116 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 interface 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 … … 41 41 #include <iostream> 42 42 #include "stack.hh" 43 44 45 namespace lol { 46 47 /* Line 34 of lalr1.cc */ 48 #line 49 "generated/lolfx-parser.h" 49 class position; 50 class location; 51 52 } // lol 53 54 /* Line 34 of lalr1.cc */ 55 #line 56 "generated/lolfx-parser.h" 56 43 57 #include "location.hh" 44 58 … … 61 75 #endif 62 76 77 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 78 If N is 0, then set CURRENT to the empty location which ends 79 the previous symbol: RHS[0] (always defined). */ 80 81 #ifndef YYLLOC_DEFAULT 82 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 83 do { \ 84 if (N) \ 85 { \ 86 (Current).begin = (Rhs)[1].begin; \ 87 (Current).end = (Rhs)[N].end; \ 88 } \ 89 else \ 90 { \ 91 (Current).begin = (Current).end = (Rhs)[0].end; \ 92 } \ 93 } while (false) 94 #endif 95 63 96 64 97 namespace lol { 65 98 66 /* Line 3 5of lalr1.cc */67 #line 68"generated/lolfx-parser.h"99 /* Line 34 of lalr1.cc */ 100 #line 101 "generated/lolfx-parser.h" 68 101 69 102 /// A Bison parser. … … 76 109 { 77 110 78 /* Line 3 5of lalr1.cc */111 /* Line 34 of lalr1.cc */ 79 112 #line 34 "gpu/lolfx-parser.y" 80 113 … … 86 119 87 120 88 /* Line 3 5of lalr1.cc */89 #line 90"generated/lolfx-parser.h"121 /* Line 34 of lalr1.cc */ 122 #line 123 "generated/lolfx-parser.h" 90 123 }; 91 124 #else … … 608 641 location_stack_type yylocation_stack_; 609 642 610 /// Whether the given \c yypact_ value indicates a defaulted state.611 /// \param yyvalue the value to check612 static bool yy_pact_value_is_default_ (int yyvalue);613 614 /// Whether the given \c yytable_ value indicates a syntax error.615 /// \param yyvalue the value to check616 static bool yy_table_value_is_error_ (int yyvalue);617 618 643 /// Internal symbol numbers. 619 644 typedef unsigned short int token_number_type; … … 623 648 static const short int yypact_ninf_; 624 649 625 /// For a state, default r eduction number.650 /// For a state, default rule to reduce. 626 651 /// Unless\a yytable_ specifies something else to do. 627 652 /// Zero means the default is an error. … … 654 679 #endif 655 680 681 #if YYERROR_VERBOSE 656 682 /// Convert the symbol name \a n to a form suitable for a diagnostic. 657 static std::string yytnamerr_ (const char *n); 683 virtual std::string yytnamerr_ (const char *n); 684 #endif 658 685 659 686 #if YYDEBUG … … 713 740 } // lol 714 741 715 /* Line 3 5of lalr1.cc */716 #line 7 17"generated/lolfx-parser.h"742 /* Line 34 of lalr1.cc */ 743 #line 744 "generated/lolfx-parser.h" 717 744 718 745 -
trunk/src/generated/position.hh
r1510 r2116 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 /* Positions for Bison parsers in C++ 4 4 5 Copyright (C) 2002-2007, 2009-201 1Free Software Foundation, Inc.5 Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc. 6 6 7 7 This program is free software: you can redistribute it and/or modify -
trunk/src/generated/stack.hh
r1510 r2116 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 /* Stack handling for Bison 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 … … 39 39 namespace lol { 40 40 41 /* Line 1 149of lalr1.cc */41 /* Line 1066 of lalr1.cc */ 42 42 #line 43 "generated/stack.hh" 43 43 template <class T, class S = std::deque<T> > … … 129 129 } // lol 130 130 131 /* Line 1 235of lalr1.cc */131 /* Line 1152 of lalr1.cc */ 132 132 #line 133 "generated/stack.hh" 133 133 -
trunk/test/PhysicObject.h
r1912 r2116 117 117 //MeshRand << "[sc#ada afcb2 2 2 -.1]"; 118 118 //MeshRand << "[sc#aad afcb2 2 2 -.1]"; 119 MeshRand << "[sc#add afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";120 MeshRand << "[sc#dad afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";121 MeshRand << "[sc#dda afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";122 MeshRand << "[sc#daa afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";123 MeshRand << "[sc#ada afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";124 MeshRand << "[sc#aad afcb1.7 1.7 1.7 0][sc#000 afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]";119 MeshRand << "[sc#add afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 120 MeshRand << "[sc#dad afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 121 MeshRand << "[sc#dda afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 122 MeshRand << "[sc#daa afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 123 MeshRand << "[sc#ada afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 124 MeshRand << "[sc#aad afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; 125 125 126 126 int SphereLimit = MeshRand.Count();
Note: See TracChangeset
for help on using the changeset viewer.