Changeset 1506


Ignore:
Timestamp:
Jun 21, 2012, 1:41:01 PM (11 years ago)
Author:
sam
Message:

orbital: add "ch" command to create chamfers.

Location:
trunk/orbital
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/generated/mesh-parser.cpp

    r1495 r1506  
    7070
    7171/* Line 299 of lalr1.cc  */
    72 #line 63 "mesh-parser.y"
     72#line 64 "mesh-parser.y"
    7373
    7474#include "../mesh-compiler.h"
     
    466466
    467467/* Line 690 of lalr1.cc  */
    468 #line 87 "mesh-parser.y"
     468#line 88 "mesh-parser.y"
    469469    { mc.m_mesh.OpenBrace(); }
    470470    break;
     
    473473
    474474/* Line 690 of lalr1.cc  */
    475 #line 91 "mesh-parser.y"
     475#line 92 "mesh-parser.y"
    476476    { mc.m_mesh.CloseBrace(); }
    477477    break;
     
    480480
    481481/* Line 690 of lalr1.cc  */
    482 #line 106 "mesh-parser.y"
     482#line 107 "mesh-parser.y"
    483483    { 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)); }
    484484    break;
     
    487487
    488488/* Line 690 of lalr1.cc  */
    489 #line 107 "mesh-parser.y"
     489#line 108 "mesh-parser.y"
    490490    { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
    491491                      vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
     
    496496
    497497/* Line 690 of lalr1.cc  */
    498 #line 110 "mesh-parser.y"
     498#line 111 "mesh-parser.y"
    499499    { 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)); }
    500500    break;
     
    503503
    504504/* Line 690 of lalr1.cc  */
    505 #line 111 "mesh-parser.y"
     505#line 112 "mesh-parser.y"
    506506    { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
    507507                      vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
     
    512512
    513513/* Line 690 of lalr1.cc  */
    514 #line 117 "mesh-parser.y"
     514#line 118 "mesh-parser.y"
     515    { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); }
     516    break;
     517
     518  case 19:
     519
     520/* Line 690 of lalr1.cc  */
     521#line 119 "mesh-parser.y"
    515522    { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
    516523    break;
    517524
    518   case 19:
    519 
    520 /* Line 690 of lalr1.cc  */
    521 #line 118 "mesh-parser.y"
     525  case 20:
     526
     527/* Line 690 of lalr1.cc  */
     528#line 120 "mesh-parser.y"
    522529    { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
    523530    break;
    524531
    525   case 20:
    526 
    527 /* Line 690 of lalr1.cc  */
    528 #line 119 "mesh-parser.y"
     532  case 21:
     533
     534/* Line 690 of lalr1.cc  */
     535#line 121 "mesh-parser.y"
    529536    { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
    530537    break;
    531538
    532   case 21:
    533 
    534 /* Line 690 of lalr1.cc  */
    535 #line 120 "mesh-parser.y"
     539  case 22:
     540
     541/* Line 690 of lalr1.cc  */
     542#line 122 "mesh-parser.y"
    536543    { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
    537544    break;
    538545
    539   case 22:
    540 
    541 /* Line 690 of lalr1.cc  */
    542 #line 121 "mesh-parser.y"
     546  case 23:
     547
     548/* Line 690 of lalr1.cc  */
     549#line 123 "mesh-parser.y"
    543550    { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); }
    544551    break;
    545552
    546   case 23:
    547 
    548 /* Line 690 of lalr1.cc  */
    549 #line 122 "mesh-parser.y"
     553  case 24:
     554
     555/* Line 690 of lalr1.cc  */
     556#line 124 "mesh-parser.y"
    550557    { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); }
    551558    break;
    552559
    553   case 24:
    554 
    555 /* Line 690 of lalr1.cc  */
    556 #line 123 "mesh-parser.y"
     560  case 25:
     561
     562/* Line 690 of lalr1.cc  */
     563#line 125 "mesh-parser.y"
    557564    { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); }
    558565    break;
    559566
    560   case 25:
    561 
    562 /* Line 690 of lalr1.cc  */
    563 #line 124 "mesh-parser.y"
     567  case 26:
     568
     569/* Line 690 of lalr1.cc  */
     570#line 126 "mesh-parser.y"
    564571    { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
    565572    break;
    566573
    567   case 26:
    568 
    569 /* Line 690 of lalr1.cc  */
    570 #line 125 "mesh-parser.y"
     574  case 27:
     575
     576/* Line 690 of lalr1.cc  */
     577#line 127 "mesh-parser.y"
    571578    { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
    572579    break;
    573580
    574   case 27:
    575 
    576 /* Line 690 of lalr1.cc  */
    577 #line 126 "mesh-parser.y"
     581  case 28:
     582
     583/* Line 690 of lalr1.cc  */
     584#line 128 "mesh-parser.y"
    578585    { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
    579586    break;
    580587
    581   case 28:
    582 
    583 /* Line 690 of lalr1.cc  */
    584 #line 127 "mesh-parser.y"
     588  case 29:
     589
     590/* Line 690 of lalr1.cc  */
     591#line 129 "mesh-parser.y"
    585592    { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
    586593    break;
    587594
    588   case 29:
    589 
    590 /* Line 690 of lalr1.cc  */
    591 #line 128 "mesh-parser.y"
     595  case 30:
     596
     597/* Line 690 of lalr1.cc  */
     598#line 130 "mesh-parser.y"
    592599    { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
    593600    break;
    594601
    595   case 30:
    596 
    597 /* Line 690 of lalr1.cc  */
    598 #line 129 "mesh-parser.y"
     602  case 31:
     603
     604/* Line 690 of lalr1.cc  */
     605#line 131 "mesh-parser.y"
    599606    { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
    600607    break;
    601608
    602   case 31:
    603 
    604 /* Line 690 of lalr1.cc  */
    605 #line 130 "mesh-parser.y"
     609  case 32:
     610
     611/* Line 690 of lalr1.cc  */
     612#line 132 "mesh-parser.y"
    606613    { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
    607614    break;
    608615
    609   case 32:
    610 
    611 /* Line 690 of lalr1.cc  */
    612 #line 131 "mesh-parser.y"
     616  case 33:
     617
     618/* Line 690 of lalr1.cc  */
     619#line 133 "mesh-parser.y"
    613620    { mc.m_mesh.MirrorX(); }
    614621    break;
    615622
    616   case 33:
    617 
    618 /* Line 690 of lalr1.cc  */
    619 #line 132 "mesh-parser.y"
     623  case 34:
     624
     625/* Line 690 of lalr1.cc  */
     626#line 134 "mesh-parser.y"
    620627    { mc.m_mesh.MirrorY(); }
    621628    break;
    622629
    623   case 34:
    624 
    625 /* Line 690 of lalr1.cc  */
    626 #line 133 "mesh-parser.y"
     630  case 35:
     631
     632/* Line 690 of lalr1.cc  */
     633#line 135 "mesh-parser.y"
    627634    { mc.m_mesh.MirrorZ(); }
    628635    break;
    629636
    630   case 35:
    631 
    632 /* Line 690 of lalr1.cc  */
    633 #line 137 "mesh-parser.y"
     637  case 36:
     638
     639/* Line 690 of lalr1.cc  */
     640#line 139 "mesh-parser.y"
    634641    { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
    635642                                                 (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3,
     
    637644    break;
    638645
    639   case 36:
    640 
    641 /* Line 690 of lalr1.cc  */
    642 #line 140 "mesh-parser.y"
     646  case 37:
     647
     648/* Line 690 of lalr1.cc  */
     649#line 142 "mesh-parser.y"
    643650    { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
    644651    break;
    645652
    646   case 37:
    647 
    648 /* Line 690 of lalr1.cc  */
    649 #line 141 "mesh-parser.y"
     653  case 38:
     654
     655/* Line 690 of lalr1.cc  */
     656#line 143 "mesh-parser.y"
    650657    { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
    651658                                                            (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
    652659    break;
    653660
    654   case 38:
    655 
    656 /* Line 690 of lalr1.cc  */
    657 #line 143 "mesh-parser.y"
     661  case 39:
     662
     663/* Line 690 of lalr1.cc  */
     664#line 145 "mesh-parser.y"
    658665    { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
    659666                                                          (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
    660667    break;
    661668
    662   case 39:
    663 
    664 /* Line 690 of lalr1.cc  */
    665 #line 145 "mesh-parser.y"
     669  case 40:
     670
     671/* Line 690 of lalr1.cc  */
     672#line 147 "mesh-parser.y"
    666673    { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0,
    667674                                               vec3((yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); }
    668675    break;
    669676
    670   case 40:
    671 
    672 /* Line 690 of lalr1.cc  */
    673 #line 147 "mesh-parser.y"
     677  case 41:
     678
     679/* Line 690 of lalr1.cc  */
     680#line 149 "mesh-parser.y"
    674681    { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2,
    675682                                             (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); }
    676683    break;
    677684
    678   case 41:
    679 
    680 /* Line 690 of lalr1.cc  */
    681 #line 149 "mesh-parser.y"
     685  case 42:
     686
     687/* Line 690 of lalr1.cc  */
     688#line 151 "mesh-parser.y"
    682689    { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
    683690                                                     (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
    684691    break;
    685692
    686   case 42:
    687 
    688 /* Line 690 of lalr1.cc  */
    689 #line 151 "mesh-parser.y"
     693  case 43:
     694
     695/* Line 690 of lalr1.cc  */
     696#line 153 "mesh-parser.y"
    690697    { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); }
    691698    break;
    692699
    693   case 43:
    694 
    695 /* Line 690 of lalr1.cc  */
    696 #line 152 "mesh-parser.y"
     700  case 44:
     701
     702/* Line 690 of lalr1.cc  */
     703#line 154 "mesh-parser.y"
    697704    { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
    698705    break;
    699706
    700   case 44:
    701 
    702 /* Line 690 of lalr1.cc  */
    703 #line 153 "mesh-parser.y"
     707  case 45:
     708
     709/* Line 690 of lalr1.cc  */
     710#line 155 "mesh-parser.y"
    704711    { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
    705712    break;
    706713
    707   case 45:
    708 
    709 /* Line 690 of lalr1.cc  */
    710 #line 154 "mesh-parser.y"
     714  case 46:
     715
     716/* Line 690 of lalr1.cc  */
     717#line 156 "mesh-parser.y"
    711718    { 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,
    712719                                            (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); }
    713720    break;
    714721
    715   case 46:
    716 
    717 /* Line 690 of lalr1.cc  */
    718 #line 158 "mesh-parser.y"
     722  case 47:
     723
     724/* Line 690 of lalr1.cc  */
     725#line 160 "mesh-parser.y"
    719726    { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); }
    720727    break;
    721728
    722   case 47:
    723 
    724 /* Line 690 of lalr1.cc  */
    725 #line 159 "mesh-parser.y"
     729  case 48:
     730
     731/* Line 690 of lalr1.cc  */
     732#line 161 "mesh-parser.y"
    726733    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); }
    727734    break;
    728735
    729   case 48:
    730 
    731 /* Line 690 of lalr1.cc  */
    732 #line 160 "mesh-parser.y"
     736  case 49:
     737
     738/* Line 690 of lalr1.cc  */
     739#line 162 "mesh-parser.y"
    733740    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); }
    734741    break;
    735742
    736   case 49:
    737 
    738 /* Line 690 of lalr1.cc  */
    739 #line 161 "mesh-parser.y"
     743  case 50:
     744
     745/* Line 690 of lalr1.cc  */
     746#line 163 "mesh-parser.y"
    740747    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); }
    741748    break;
    742749
    743   case 50:
    744 
    745 /* Line 690 of lalr1.cc  */
    746 #line 162 "mesh-parser.y"
     750  case 51:
     751
     752/* Line 690 of lalr1.cc  */
     753#line 164 "mesh-parser.y"
    747754    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); }
    748755    break;
    749756
    750   case 51:
    751 
    752 /* Line 690 of lalr1.cc  */
    753 #line 163 "mesh-parser.y"
     757  case 52:
     758
     759/* Line 690 of lalr1.cc  */
     760#line 165 "mesh-parser.y"
    754761    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); }
    755762    break;
    756763
    757   case 52:
    758 
    759 /* Line 690 of lalr1.cc  */
    760 #line 164 "mesh-parser.y"
     764  case 53:
     765
     766/* Line 690 of lalr1.cc  */
     767#line 166 "mesh-parser.y"
    761768    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); }
    762769    break;
    763770
    764   case 53:
    765 
    766 /* Line 690 of lalr1.cc  */
    767 #line 165 "mesh-parser.y"
     771  case 54:
     772
     773/* Line 690 of lalr1.cc  */
     774#line 167 "mesh-parser.y"
    768775    { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); }
    769776    break;
    770777
    771   case 54:
    772 
    773 /* Line 690 of lalr1.cc  */
    774 #line 168 "mesh-parser.y"
     778  case 55:
     779
     780/* Line 690 of lalr1.cc  */
     781#line 170 "mesh-parser.y"
    775782    { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); }
    776783    break;
    777784
    778   case 55:
    779 
    780 /* Line 690 of lalr1.cc  */
    781 #line 169 "mesh-parser.y"
     785  case 56:
     786
     787/* Line 690 of lalr1.cc  */
     788#line 171 "mesh-parser.y"
    782789    { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); }
    783790    break;
     
    786793
    787794/* Line 690 of lalr1.cc  */
    788 #line 789 "generated/mesh-parser.cpp"
     795#line 796 "generated/mesh-parser.cpp"
    789796        default:
    790797          break;
     
    10601067  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    10611068     STATE-NUM.  */
    1062   const signed char MeshParser::yypact_ninf_ = -44;
     1069  const signed char MeshParser::yypact_ninf_ = -45;
    10631070  const signed char
    10641071  MeshParser::yypact_[] =
    10651072  {
    1066         33,    68,    73,   -10,   -10,   -10,   -10,   -44,   -10,   -10,
    1067      -10,   -10,   -44,   -10,   -10,   -10,   -10,   -44,   -10,   -10,
    1068      -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,
    1069      -10,   -44,     6,     9,    33,    33,    67,   -44,   -44,   -44,
    1070      -44,   -44,   -44,   -10,   -10,   -10,   -10,   -44,   -44,   -44,
    1071      -44,   -44,   -44,   -44,   -44,   -44,   -44,   -44,   -44,   -44,
    1072      -44,   -44,   -44,   -44,   -44,   -10,   -10,   -44,   -44,   -44,
    1073      -44,   -44,   -44,   -44,   -44,   -44,   -44,   -10,   -10,   -44,
    1074      -44,   -44,   -44,   -26,   -44,   -44,   -44,   -44,   -44,   -44,
    1075      -44,   -44,   -44,   -44,   -44
     1073        34,   -29,    70,    -6,    -6,    -6,    -6,   -45,    -6,    -6,
     1074      -6,    -6,   -45,    -6,    -6,    -6,    -6,   -45,    -6,    -6,
     1075      -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,
     1076      -6,    -6,   -45,    12,    15,    34,    34,    69,   -45,   -45,
     1077     -45,   -45,   -45,   -45,    -6,    -6,    -6,    -6,   -45,   -45,
     1078     -45,   -45,   -45,   -45,   -45,   -45,   -45,   -45,   -45,   -45,
     1079     -45,   -45,   -45,   -45,   -45,   -45,   -45,    -6,    -6,   -45,
     1080     -45,   -45,   -45,   -45,   -45,   -45,   -45,   -45,   -45,    -6,
     1081      -6,   -45,   -45,   -45,   -45,   -21,   -45,   -45,   -45,   -45,
     1082     -45,   -45,   -45,   -45,   -45,   -45,   -45
    10761083  };
    10771084
     
    10821089  MeshParser::yydefact_[] =
    10831090  {
    1084          0,     0,     0,     0,     0,     0,     0,    32,     0,     0,
    1085        0,     0,    33,     0,     0,     0,     0,    34,     0,     0,
     1091         0,     0,     0,     0,     0,     0,     0,    33,     0,     0,
     1092       0,     0,    34,     0,     0,     0,     0,    35,     0,     0,
    10861093       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    1087        0,     7,     0,     0,     3,     0,     5,     9,    11,    12,
    1088       13,    54,    15,     0,     0,     0,     0,    14,    46,    17,
    1089       16,    18,    22,    25,    28,    19,    23,    26,    29,    20,
    1090       24,    27,    30,    21,    31,     0,     0,    35,    36,    37,
    1091       38,    39,    40,    41,    42,    43,    44,     0,     0,    45,
    1092        1,     2,     4,     0,    10,    55,    47,    48,    49,    50,
    1093       51,    52,    53,     8,     6
     1094       0,     0,     7,     0,     0,     3,     0,     5,     9,    11,
     1095      12,    13,    55,    15,     0,     0,     0,     0,    14,    47,
     1096      17,    16,    19,    23,    26,    29,    20,    24,    27,    30,
     1097      21,    25,    28,    31,    22,    32,    18,     0,     0,    36,
     1098      37,    38,    39,    40,    41,    42,    43,    44,    45,     0,
     1099       0,    46,     1,     2,     4,     0,    10,    56,    48,    49,
     1100      50,    51,    52,    53,    54,     8,     6
    10941101  };
    10951102
     
    10981105  MeshParser::yypgoto_[] =
    10991106  {
    1100        -44,   -44,    -4,   -44,   -44,   -44,   -44,   -22,   -44,   -44,
    1101      -44,     4,    38,    95,     3,    -9,   -11,   -44,   -44,   -43
     1107       -45,   -45,    -4,   -45,   -45,   -45,   -45,   -17,   -45,   -45,
     1108     -45,     5,    39,    98,     3,     8,    -9,   -45,   -45,   -44
    11021109  };
    11031110
     
    11061113  MeshParser::yydefgoto_[] =
    11071114  {
    1108         -1,    32,    33,    34,    35,    94,    36,    37,    38,    39,
    1109       40,    44,    45,    46,    65,    66,    67,    78,    79,    48
     1115        -1,    33,    34,    35,    36,    96,    37,    38,    39,    40,
     1116      41,    45,    46,    47,    67,    68,    69,    80,    81,    49
    11101117  };
    11111118
     
    11171124  MeshParser::yytable_[] =
    11181125  {
    1119         85,    86,    87,    88,    47,    50,    80,    51,    52,    81,
    1120       54,    93,    55,    56,    84,    58,    72,    59,    60,    77,
    1121       62,     0,    89,    90,    41,    69,    70,    71,    43,    73,
    1122       82,    83,     0,     0,    91,    92,     1,     2,     3,     4,
    1123        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
    1124       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
    1125       25,    26,    27,    28,    29,    30,    75,    76,     0,    31,
    1126        1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
    1127       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
    1128       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    1129       53,     0,    41,    42,     0,    57,    43,    41,    49,     0,
    1130       61,    43,     0,    63,    64,     0,    68,     0,     0,     0,
    1131        0,     0,    74
     1126        87,    88,    89,    90,    48,    51,    42,    43,    52,    53,
     1127      44,    55,    82,    56,    57,    83,    59,    95,    60,    61,
     1128      86,    63,    79,    91,    92,    66,    71,    72,    73,    42,
     1129      75,    84,    85,    44,    74,    93,    94,     1,     2,     3,
     1130       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
     1131      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
     1132      24,    25,    26,    27,    28,    29,    30,    31,    77,    78,
     1133       0,    32,     1,     2,     3,     4,     5,     6,     7,     8,
     1134       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
     1135      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
     1136      29,    30,    31,    54,     0,    42,    50,     0,    58,    44,
     1137       0,     0,     0,    62,     0,     0,    64,    65,     0,     0,
     1138      70,     0,     0,     0,     0,     0,    76
    11321139  };
    11331140
     
    11361143  MeshParser::yycheck_[] =
    11371144  {
    1138         43,    44,    45,    46,     1,     2,     0,     3,     4,     0,
    1139        6,    37,     8,     9,    36,    11,    25,    13,    14,    30,
    1140       16,    -1,    65,    66,    34,    22,    23,    24,    38,    26,
    1141       34,    35,    -1,    -1,    77,    78,     3,     4,     5,     6,
    1142        7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
    1143       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
    1144       27,    28,    29,    30,    31,    32,    28,    29,    -1,    36,
    1145        3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
    1146       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
    1147       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
    1148        5,    -1,    34,    35,    -1,    10,    38,    34,    35,    -1,
    1149       15,    38,    -1,    18,    19,    -1,    21,    -1,    -1,    -1,
    1150       -1,    -1,    27
     1145        44,    45,    46,    47,     1,     2,    35,    36,     3,     4,
     1146      39,     6,     0,     8,     9,     0,    11,    38,    13,    14,
     1147      37,    16,    31,    67,    68,    20,    23,    24,    25,    35,
     1148      27,    35,    36,    39,    26,    79,    80,     3,     4,     5,
     1149       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
     1150      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
     1151      26,    27,    28,    29,    30,    31,    32,    33,    29,    30,
     1152      -1,    37,     3,     4,     5,     6,     7,     8,     9,    10,
     1153      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
     1154      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
     1155      31,    32,    33,     5,    -1,    35,    36,    -1,    10,    39,
     1156      -1,    -1,    -1,    15,    -1,    -1,    18,    19,    -1,    -1,
     1157      22,    -1,    -1,    -1,    -1,    -1,    28
    11511158  };
    11521159
     
    11591166      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
    11601167      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
    1161       32,    36,    40,    41,    42,    43,    45,    46,    47,    48,
    1162       49,    34,    35,    38,    50,    51,    52,    53,    58,    35,
    1163       53,    50,    50,    52,    50,    50,    50,    52,    50,    50,
    1164       50,    52,    50,    52,    52,    53,    54,    55,    52,    53,
    1165       53,    53,    54,    53,    52,    51,    51,    55,    56,    57,
    1166        0,     0,    41,    41,    46,    58,    58,    58,    58,    58,
    1167       58,    58,    58,    37,    44
     1168      32,    33,    37,    41,    42,    43,    44,    46,    47,    48,
     1169      49,    50,    35,    36,    39,    51,    52,    53,    54,    59,
     1170      36,    54,    51,    51,    53,    51,    51,    51,    53,    51,
     1171      51,    51,    53,    51,    53,    53,    51,    54,    55,    56,
     1172      53,    54,    54,    54,    55,    54,    53,    52,    52,    56,
     1173      57,    58,     0,     0,    42,    42,    47,    59,    59,    59,
     1174      59,    59,    59,    59,    59,    38,    45
    11681175  };
    11691176
     
    11771184     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
    11781185     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
    1179      285,   286,   287,   288,   289,   290,    91,    93,    45
     1186     285,   286,   287,   288,   289,   290,   291,    91,    93,    45
    11801187  };
    11811188#endif
     
    11851192  MeshParser::yyr1_[] =
    11861193  {
    1187          0,    39,    40,    41,    41,    42,    42,    43,    44,    45,
    1188       45,    46,    46,    46,    47,    47,    47,    47,    48,    48,
    1189       48,    48,    48,    48,    48,    48,    48,    48,    48,    48,
    1190       48,    48,    48,    48,    48,    49,    49,    49,    49,    49,
    1191       49,    49,    49,    49,    49,    49,    50,    51,    52,    53,
    1192       54,    55,    56,    57,    58,    58
     1194         0,    40,    41,    42,    42,    43,    43,    44,    45,    46,
     1195      46,    47,    47,    47,    48,    48,    48,    48,    49,    49,
     1196      49,    49,    49,    49,    49,    49,    49,    49,    49,    49,
     1197      49,    49,    49,    49,    49,    49,    50,    50,    50,    50,
     1198      50,    50,    50,    50,    50,    50,    50,    51,    52,    53,
     1199      54,    55,    56,    57,    58,    59,    59
    11931200  };
    11941201
     
    12001207       2,     1,     1,     1,     2,     2,     2,     2,     2,     2,
    12011208       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1202        2,     2,     1,     1,     1,     2,     2,     2,     2,     2,
    1203        2,     2,     2,     2,     2,     2,     1,     2,     2,     2,
    1204        2,     2,     2,     2,     1,     2
     1209       2,     2,     2,     1,     1,     1,     2,     2,     2,     2,
     1210       2,     2,     2,     2,     2,     2,     2,     1,     2,     2,
     1211       2,     2,     2,     2,     2,     1,     2
    12051212  };
    12061213
     
    12151222  "T_ROTATEY", "T_TAPERY", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ",
    12161223  "T_ROTATEZ", "T_TAPERZ", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE",
    1217   "T_SCALE", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX",
    1218   "T_SPHERE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD",
    1219   "T_COG", "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept",
    1220   "mesh_description", "mesh_expression_list", "mesh_expression",
    1221   "mesh_open", "mesh_close", "mesh_command_list", "mesh_command",
    1222   "color_command", "transform_command", "primitive_command", "args1",
    1223   "args2", "args3", "args4", "args5", "args6", "args7", "args8", "number", 0
     1224  "T_SCALE", "T_CHAMFER", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX",
     1225  "T_FLATCHAMFBOX", "T_SPHERE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC",
     1226  "T_TRIANGLE", "T_QUAD", "T_COG", "T_ERROR", "NUMBER", "COLOR", "'['",
     1227  "']'", "'-'", "$accept", "mesh_description", "mesh_expression_list",
     1228  "mesh_expression", "mesh_open", "mesh_close", "mesh_command_list",
     1229  "mesh_command", "color_command", "transform_command",
     1230  "primitive_command", "args1", "args2", "args3", "args4", "args5",
     1231  "args6", "args7", "args8", "number", 0
    12241232  };
    12251233#endif
     
    12301238  MeshParser::yyrhs_[] =
    12311239  {
    1232         40,     0,    -1,    41,     0,    -1,    42,    -1,    42,    41,
    1233       -1,    45,    -1,    43,    41,    44,    -1,    36,    -1,    37,
    1234       -1,    46,    -1,    45,    46,    -1,    47,    -1,    48,    -1,
    1235       49,    -1,     3,    53,    -1,     3,    35,    -1,     4,    53,
    1236       -1,     4,    35,    -1,     5,    50,    -1,    10,    50,    -1,
    1237       15,    50,    -1,    20,    52,    -1,     6,    50,    -1,    11,
    1238       50,    -1,    16,    50,    -1,     7,    52,    -1,    12,    52,
    1239       -1,    17,    52,    -1,     8,    50,    -1,    13,    50,    -1,
    1240       18,    50,    -1,    21,    52,    -1,     9,    -1,    14,    -1,
    1241       19,    -1,    22,    55,    -1,    23,    52,    -1,    24,    53,
    1242       -1,    25,    53,    -1,    26,    53,    -1,    27,    54,    -1,
    1243       28,    53,    -1,    29,    52,    -1,    30,    51,    -1,    31,
    1244       51,    -1,    32,    57,    -1,    58,    -1,    50,    58,    -1,
    1245       51,    58,    -1,    52,    58,    -1,    53,    58,    -1,    54,
    1246       58,    -1,    55,    58,    -1,    56,    58,    -1,    34,    -1,
    1247       38,    58,    -1
     1240        41,     0,    -1,    42,     0,    -1,    43,    -1,    43,    42,
     1241      -1,    46,    -1,    44,    42,    45,    -1,    37,    -1,    38,
     1242      -1,    47,    -1,    46,    47,    -1,    48,    -1,    49,    -1,
     1243      50,    -1,     3,    54,    -1,     3,    36,    -1,     4,    54,
     1244      -1,     4,    36,    -1,    22,    51,    -1,     5,    51,    -1,
     1245      10,    51,    -1,    15,    51,    -1,    20,    53,    -1,     6,
     1246      51,    -1,    11,    51,    -1,    16,    51,    -1,     7,    53,
     1247      -1,    12,    53,    -1,    17,    53,    -1,     8,    51,    -1,
     1248      13,    51,    -1,    18,    51,    -1,    21,    53,    -1,     9,
     1249      -1,    14,    -1,    19,    -1,    23,    56,    -1,    24,    53,
     1250      -1,    25,    54,    -1,    26,    54,    -1,    27,    54,    -1,
     1251      28,    55,    -1,    29,    54,    -1,    30,    53,    -1,    31,
     1252      52,    -1,    32,    52,    -1,    33,    58,    -1,    59,    -1,
     1253      51,    59,    -1,    52,    59,    -1,    53,    59,    -1,    54,
     1254      59,    -1,    55,    59,    -1,    56,    59,    -1,    57,    59,
     1255      -1,    35,    -1,    39,    59,    -1
    12481256  };
    12491257
     
    12561264      23,    26,    28,    30,    32,    35,    38,    41,    44,    47,
    12571265      50,    53,    56,    59,    62,    65,    68,    71,    74,    77,
    1258       80,    83,    86,    88,    90,    92,    95,    98,   101,   104,
    1259      107,   110,   113,   116,   119,   122,   125,   127,   130,   133,
    1260      136,   139,   142,   145,   148,   150
     1266      80,    83,    86,    89,    91,    93,    95,    98,   101,   104,
     1267     107,   110,   113,   116,   119,   122,   125,   128,   130,   133,
     1268     136,   139,   142,   145,   148,   151,   153
    12611269  };
    12621270
     
    12651273  MeshParser::yyrline_[] =
    12661274  {
    1267          0,    73,    73,    77,    78,    82,    83,    87,    91,    95,
    1268       96,   100,   101,   102,   106,   107,   110,   111,   117,   118,
    1269      119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
    1270      129,   130,   131,   132,   133,   137,   140,   141,   143,   145,
    1271      147,   149,   151,   152,   153,   154,   158,   159,   160,   161,
    1272      162,   163,   164,   165,   168,   169
     1275         0,    74,    74,    78,    79,    83,    84,    88,    92,    96,
     1276      97,   101,   102,   103,   107,   108,   111,   112,   118,   119,
     1277     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
     1278     130,   131,   132,   133,   134,   135,   139,   142,   143,   145,
     1279     147,   149,   151,   153,   154,   155,   156,   160,   161,   162,
     1280     163,   164,   165,   166,   167,   170,   171
    12731281  };
    12741282
     
    13141322       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    13151323       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1316        2,     2,     2,     2,     2,    38,     2,     2,     2,     2,
    1317        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1318        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1319        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1320        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    1321        2,    36,     2,    37,     2,     2,     2,     2,     2,     2,
     1324       2,     2,     2,     2,     2,    39,     2,     2,     2,     2,
     1325       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     1326       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     1327       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     1328       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     1329       2,    37,     2,    38,     2,     2,     2,     2,     2,     2,
    13221330       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    13231331       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     
    13391347      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
    13401348      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
    1341       35
     1349      35,    36
    13421350    };
    13431351    if ((unsigned int) t <= yyuser_token_number_max_)
     
    13481356
    13491357  const int MeshParser::yyeof_ = 0;
    1350   const int MeshParser::yylast_ = 122;
     1358  const int MeshParser::yylast_ = 126;
    13511359  const int MeshParser::yynnts_ = 20;
    13521360  const int MeshParser::yyempty_ = -2;
    1353   const int MeshParser::yyfinal_ = 80;
     1361  const int MeshParser::yyfinal_ = 82;
    13541362  const int MeshParser::yyterror_ = 1;
    13551363  const int MeshParser::yyerrcode_ = 256;
    1356   const int MeshParser::yyntokens_ = 39;
    1357 
    1358   const unsigned int MeshParser::yyuser_token_number_max_ = 290;
     1364  const int MeshParser::yyntokens_ = 40;
     1365
     1366  const unsigned int MeshParser::yyuser_token_number_max_ = 291;
    13591367  const MeshParser::token_number_type MeshParser::yyundef_token_ = 2;
    13601368
     
    13631371
    13641372/* Line 1136 of lalr1.cc  */
    1365 #line 1366 "generated/mesh-parser.cpp"
     1373#line 1374 "generated/mesh-parser.cpp"
    13661374
    13671375
    13681376/* Line 1138 of lalr1.cc  */
    1369 #line 172 "mesh-parser.y"
     1377#line 174 "mesh-parser.y"
    13701378
    13711379
  • trunk/orbital/generated/mesh-parser.h

    r1495 r1506  
    119119     T_TRANSLATE = 275,
    120120     T_SCALE = 276,
    121      T_CYLINDER = 277,
    122      T_BOX = 278,
    123      T_SMOOTHCHAMFBOX = 279,
    124      T_FLATCHAMFBOX = 280,
    125      T_SPHERE = 281,
    126      T_STAR = 282,
    127      T_EXPANDEDSTAR = 283,
    128      T_DISC = 284,
    129      T_TRIANGLE = 285,
    130      T_QUAD = 286,
    131      T_COG = 287,
    132      T_ERROR = 288,
    133      NUMBER = 289,
    134      COLOR = 290
     121     T_CHAMFER = 277,
     122     T_CYLINDER = 278,
     123     T_BOX = 279,
     124     T_SMOOTHCHAMFBOX = 280,
     125     T_FLATCHAMFBOX = 281,
     126     T_SPHERE = 282,
     127     T_STAR = 283,
     128     T_EXPANDEDSTAR = 284,
     129     T_DISC = 285,
     130     T_TRIANGLE = 286,
     131     T_QUAD = 287,
     132     T_COG = 288,
     133     T_ERROR = 289,
     134     NUMBER = 290,
     135     COLOR = 291
    135136   };
    136137
     
    312313
    313314/* Line 35 of lalr1.cc  */
    314 #line 315 "generated/mesh-parser.h"
     315#line 316 "generated/mesh-parser.h"
    315316
    316317
  • trunk/orbital/generated/mesh-scanner.cpp

    r1495 r1506  
    331331        (yy_c_buf_p) = yy_cp;
    332332
    333 #define YY_NUM_RULES 42
    334 #define YY_END_OF_BUFFER 43
     333#define YY_NUM_RULES 43
     334#define YY_END_OF_BUFFER 44
    335335/* This struct is not used in this scanner,
    336336   but its presence is necessary. */
     
    340340        flex_int32_t yy_nxt;
    341341        };
    342 static yyconst flex_int16_t yy_accept[68] =
     342static yyconst flex_int16_t yy_accept[70] =
    343343    {   0,
    344         0,    0,   43,   41,   40,   39,   41,   41,   36,   41,
    345        35,   37,   38,   41,   41,   41,   16,    6,    0,    0,
    346        35,   35,    0,   21,   20,   27,    0,    0,   29,   25,
    347        28,   17,   18,   19,    7,    8,    9,    1,   13,   14,
    348        15,    0,    3,    4,    5,    0,    0,   35,   30,   26,
    349         0,    0,    0,    2,   10,   11,   12,   31,   23,   22,
    350        24,   32,    0,   33,    0,   34,    0
     344        0,    0,   44,   42,   41,   40,   42,   42,   37,   42,
     345       36,   38,   39,   42,   42,   42,   42,   17,    7,    0,
     346        0,   36,   36,    0,   22,   21,   28,    0,    0,   30,
     347       26,   29,    3,   18,   19,   20,    8,    9,   10,    1,
     348       14,   15,   16,    0,    4,    5,    6,    0,    0,   36,
     349       31,   27,    0,    0,    0,    2,   11,   12,   13,   32,
     350       24,   23,   25,   33,    0,   34,    0,   35,    0
    351351    } ;
    352352
     
    390390    } ;
    391391
    392 static yyconst flex_int16_t yy_base[76] =
     392static yyconst flex_int16_t yy_base[78] =
    393393    {   0,
    394         0,    0,   93,   94,   94,   94,    0,   22,   24,   84,
    395        26,   94,   94,   30,   10,   13,   34,   37,    0,   83,
    396        50,   59,   45,   94,   72,   94,   65,   74,   94,   55,
    397        94,   94,   94,   94,   94,   94,   94,   74,   94,   94,
    398        94,   44,   94,   94,   94,    0,   78,   77,   94,   94,
    399        71,   70,   63,   94,   94,   94,   94,    0,   94,   94,
    400        94,    0,    0,    0,    0,   94,   94,   79,   78,   77,
    401        76,   75,   72,   71,   54
     394        0,    0,   94,   95,   95,   95,    0,   22,   24,   85,
     395       26,   95,   95,   30,   73,   10,   13,   34,   37,    0,
     396       83,   50,   59,   45,   95,   72,   95,   65,   74,   95,
     397       55,   95,   95,   95,   95,   95,   95,   95,   95,   74,
     398       95,   95,   95,   44,   95,   95,   95,    0,   78,   77,
     399       95,   95,   71,   70,   63,   95,   95,   95,   95,    0,
     400       95,   95,   95,    0,    0,    0,    0,   95,   95,   79,
     401       78,   77,   76,   75,   72,   71,   54
    402402    } ;
    403403
    404 static yyconst flex_int16_t yy_def[76] =
     404static yyconst flex_int16_t yy_def[78] =
    405405    {   0,
    406        67,    1,   67,   67,   67,   67,   68,   67,   67,   67,
    407        67,   67,   67,   67,   67,   67,   67,   67,   69,   67,
    408        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    409        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    410        67,   67,   67,   67,   67,   70,   67,   67,   67,   67,
    411        67,   67,   67,   67,   67,   67,   67,   71,   67,   67,
    412        67,   72,   73,   74,   75,   67,    0,   67,   67,   67,
    413        67,   67,   67,   67,   67
     406       69,    1,   69,   69,   69,   69,   70,   69,   69,   69,
     407       69,   69,   69,   69,   69,   69,   69,   69,   69,   71,
     408       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     409       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     410       69,   69,   69,   69,   69,   69,   69,   72,   69,   69,
     411       69,   69,   69,   69,   69,   69,   69,   69,   69,   73,
     412       69,   69,   69,   74,   75,   76,   77,   69,    0,   69,
     413       69,   69,   69,   69,   69,   69,   69
    414414    } ;
    415415
    416 static yyconst flex_int16_t yy_nxt[123] =
     416static yyconst flex_int16_t yy_nxt[124] =
    417417    {   0,
    418418        4,    5,    6,    7,    8,    9,   10,   11,    4,   12,
    419        13,   14,    4,    4,    4,    4,    4,    4,    4,   15,
    420         4,    4,   16,   17,   18,    4,    4,    4,   20,   21,
    421        20,   21,   20,   21,   23,   32,   33,   34,   35,   36,
    422        37,   23,   24,   25,   26,   27,   28,   38,   42,   47,
    423        47,   29,   48,   30,   31,   66,   20,   21,   23,   39,
    424        40,   41,   43,   44,   45,   23,   22,   23,   52,   55,
    425        56,   57,   65,   64,   23,   53,   63,   62,   58,   46,
    426        19,   61,   60,   59,   48,   48,   54,   51,   50,   49,
    427        22,   22,   67,    3,   67,   67,   67,   67,   67,   67,
    428 
    429        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    430        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    431        67,   67
     419       13,   14,    4,   15,    4,    4,    4,    4,    4,   16,
     420        4,    4,   17,   18,   19,    4,    4,    4,   21,   22,
     421       21,   22,   21,   22,   24,   34,   35,   36,   37,   38,
     422       39,   24,   25,   26,   27,   28,   29,   40,   44,   49,
     423       49,   30,   50,   31,   32,   68,   21,   22,   24,   41,
     424       42,   43,   45,   46,   47,   24,   23,   24,   54,   57,
     425       58,   59,   67,   66,   24,   55,   65,   64,   60,   48,
     426       20,   63,   62,   61,   50,   50,   56,   53,   52,   51,
     427       23,   33,   23,   69,    3,   69,   69,   69,   69,   69,
     428
     429       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     430       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     431       69,   69,   69
    432432    } ;
    433433
    434 static yyconst flex_int16_t yy_chk[123] =
     434static yyconst flex_int16_t yy_chk[124] =
    435435    {   0,
    436436        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    437437        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    438438        1,    1,    1,    1,    1,    1,    1,    1,    8,    8,
    439         9,    9,   11,   11,   11,   15,   15,   15,   16,   16,
    440        16,   11,   14,   14,   14,   14,   14,   17,   18,   23,
    441        23,   14,   23,   14,   14,   75,   21,   21,   21,   17,
    442        17,   17,   18,   18,   18,   21,   22,   22,   30,   42,
    443        42,   42,   74,   73,   22,   30,   72,   71,   70,   69,
    444        68,   53,   52,   51,   48,   47,   38,   28,   27,   25,
    445        20,   10,    3,   67,   67,   67,   67,   67,   67,   67,
    446 
    447        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    448        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
    449        67,   67
     439        9,    9,   11,   11,   11,   16,   16,   16,   17,   17,
     440       17,   11,   14,   14,   14,   14,   14,   18,   19,   24,
     441       24,   14,   24,   14,   14,   77,   22,   22,   22,   18,
     442       18,   18,   19,   19,   19,   22,   23,   23,   31,   44,
     443       44,   44,   76,   75,   23,   31,   74,   73,   72,   71,
     444       70,   55,   54,   53,   50,   49,   40,   29,   28,   26,
     445       21,   15,   10,    3,   69,   69,   69,   69,   69,   69,
     446
     447       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     448       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
     449       69,   69,   69
    450450    } ;
    451451
     
    656656                                {
    657657                                yy_current_state = (int) yy_def[yy_current_state];
    658                                 if ( yy_current_state >= 68 )
     658                                if ( yy_current_state >= 70 )
    659659                                        yy_c = yy_meta[(unsigned int) yy_c];
    660660                                }
     
    662662                        ++yy_cp;
    663663                        }
    664                 while ( yy_current_state != 67 );
     664                while ( yy_current_state != 69 );
    665665                yy_cp = (yy_last_accepting_cpos);
    666666                yy_current_state = (yy_last_accepting_state);
     
    695695YY_RULE_SETUP
    696696#line 48 "mesh-scanner.l"
     697{ return token::T_CHAMFER; }
     698        YY_BREAK
     699case 4:
     700YY_RULE_SETUP
     701#line 49 "mesh-scanner.l"
    697702{ return token::T_TRANSLATEX; }
    698703        YY_BREAK
    699 case 4:
    700 YY_RULE_SETUP
    701 #line 49 "mesh-scanner.l"
     704case 5:
     705YY_RULE_SETUP
     706#line 50 "mesh-scanner.l"
    702707{ return token::T_TRANSLATEY; }
    703708        YY_BREAK
    704 case 5:
    705 YY_RULE_SETUP
    706 #line 50 "mesh-scanner.l"
     709case 6:
     710YY_RULE_SETUP
     711#line 51 "mesh-scanner.l"
    707712{ return token::T_TRANSLATEZ; }
    708713        YY_BREAK
    709 case 6:
    710 YY_RULE_SETUP
    711 #line 51 "mesh-scanner.l"
     714case 7:
     715YY_RULE_SETUP
     716#line 52 "mesh-scanner.l"
    712717{ return token::T_TRANSLATE; }
    713718        YY_BREAK
    714 case 7:
    715 YY_RULE_SETUP
    716 #line 52 "mesh-scanner.l"
     719case 8:
     720YY_RULE_SETUP
     721#line 53 "mesh-scanner.l"
    717722{ return token::T_ROTATEX; }
    718723        YY_BREAK
    719 case 8:
    720 YY_RULE_SETUP
    721 #line 53 "mesh-scanner.l"
     724case 9:
     725YY_RULE_SETUP
     726#line 54 "mesh-scanner.l"
    722727{ return token::T_ROTATEY; }
    723728        YY_BREAK
    724 case 9:
    725 YY_RULE_SETUP
    726 #line 54 "mesh-scanner.l"
     729case 10:
     730YY_RULE_SETUP
     731#line 55 "mesh-scanner.l"
    727732{ return token::T_ROTATEZ; }
    728733        YY_BREAK
    729 case 10:
    730 YY_RULE_SETUP
    731 #line 55 "mesh-scanner.l"
     734case 11:
     735YY_RULE_SETUP
     736#line 56 "mesh-scanner.l"
    732737{ return token::T_TAPERX; }
    733738        YY_BREAK
    734 case 11:
    735 YY_RULE_SETUP
    736 #line 56 "mesh-scanner.l"
     739case 12:
     740YY_RULE_SETUP
     741#line 57 "mesh-scanner.l"
    737742{ return token::T_TAPERY; }
    738743        YY_BREAK
    739 case 12:
    740 YY_RULE_SETUP
    741 #line 57 "mesh-scanner.l"
     744case 13:
     745YY_RULE_SETUP
     746#line 58 "mesh-scanner.l"
    742747{ return token::T_TAPERZ; }
    743748        YY_BREAK
    744 case 13:
    745 YY_RULE_SETUP
    746 #line 58 "mesh-scanner.l"
     749case 14:
     750YY_RULE_SETUP
     751#line 59 "mesh-scanner.l"
    747752{ return token::T_SCALEX; }
    748753        YY_BREAK
    749 case 14:
    750 YY_RULE_SETUP
    751 #line 59 "mesh-scanner.l"
     754case 15:
     755YY_RULE_SETUP
     756#line 60 "mesh-scanner.l"
    752757{ return token::T_SCALEY; }
    753758        YY_BREAK
    754 case 15:
    755 YY_RULE_SETUP
    756 #line 60 "mesh-scanner.l"
     759case 16:
     760YY_RULE_SETUP
     761#line 61 "mesh-scanner.l"
    757762{ return token::T_SCALEZ; }
    758763        YY_BREAK
    759 case 16:
    760 YY_RULE_SETUP
    761 #line 61 "mesh-scanner.l"
     764case 17:
     765YY_RULE_SETUP
     766#line 62 "mesh-scanner.l"
    762767{ return token::T_SCALE; }
    763768        YY_BREAK
    764 case 17:
    765 YY_RULE_SETUP
    766 #line 62 "mesh-scanner.l"
     769case 18:
     770YY_RULE_SETUP
     771#line 63 "mesh-scanner.l"
    767772{ return token::T_MIRRORX; }
    768773        YY_BREAK
    769 case 18:
    770 YY_RULE_SETUP
    771 #line 63 "mesh-scanner.l"
     774case 19:
     775YY_RULE_SETUP
     776#line 64 "mesh-scanner.l"
    772777{ return token::T_MIRRORY; }
    773778        YY_BREAK
    774 case 19:
    775 YY_RULE_SETUP
    776 #line 64 "mesh-scanner.l"
     779case 20:
     780YY_RULE_SETUP
     781#line 65 "mesh-scanner.l"
    777782{ return token::T_MIRRORZ; }
    778783        YY_BREAK
    779 case 20:
    780 YY_RULE_SETUP
    781 #line 66 "mesh-scanner.l"
     784case 21:
     785YY_RULE_SETUP
     786#line 67 "mesh-scanner.l"
    782787{ return token::T_CYLINDER; }
    783788        YY_BREAK
    784 case 21:
    785 YY_RULE_SETUP
    786 #line 67 "mesh-scanner.l"
     789case 22:
     790YY_RULE_SETUP
     791#line 68 "mesh-scanner.l"
    787792{ return token::T_BOX; }
    788793        YY_BREAK
    789 case 22:
    790 YY_RULE_SETUP
    791 #line 68 "mesh-scanner.l"
     794case 23:
     795YY_RULE_SETUP
     796#line 69 "mesh-scanner.l"
    792797{ return token::T_SMOOTHCHAMFBOX; }
    793798        YY_BREAK
    794 case 23:
    795 YY_RULE_SETUP
    796 #line 69 "mesh-scanner.l"
     799case 24:
     800YY_RULE_SETUP
     801#line 70 "mesh-scanner.l"
    797802{ return token::T_FLATCHAMFBOX; }
    798803        YY_BREAK
    799 case 24:
    800 YY_RULE_SETUP
    801 #line 70 "mesh-scanner.l"
     804case 25:
     805YY_RULE_SETUP
     806#line 71 "mesh-scanner.l"
    802807{ return token::T_SPHERE; }
    803808        YY_BREAK
    804 case 25:
    805 YY_RULE_SETUP
    806 #line 71 "mesh-scanner.l"
     809case 26:
     810YY_RULE_SETUP
     811#line 72 "mesh-scanner.l"
    807812{ return token::T_STAR; }
    808813        YY_BREAK
    809 case 26:
    810 YY_RULE_SETUP
    811 #line 72 "mesh-scanner.l"
     814case 27:
     815YY_RULE_SETUP
     816#line 73 "mesh-scanner.l"
    812817{ return token::T_EXPANDEDSTAR; }
    813818        YY_BREAK
    814 case 27:
    815 YY_RULE_SETUP
    816 #line 73 "mesh-scanner.l"
     819case 28:
     820YY_RULE_SETUP
     821#line 74 "mesh-scanner.l"
    817822{ return token::T_DISC; }
    818823        YY_BREAK
    819 case 28:
    820 YY_RULE_SETUP
    821 #line 74 "mesh-scanner.l"
     824case 29:
     825YY_RULE_SETUP
     826#line 75 "mesh-scanner.l"
    822827{ return token::T_TRIANGLE; }
    823828        YY_BREAK
    824 case 29:
    825 YY_RULE_SETUP
    826 #line 75 "mesh-scanner.l"
     829case 30:
     830YY_RULE_SETUP
     831#line 76 "mesh-scanner.l"
    827832{ return token::T_QUAD; }
    828833        YY_BREAK
    829 case 30:
    830 YY_RULE_SETUP
    831 #line 76 "mesh-scanner.l"
     834case 31:
     835YY_RULE_SETUP
     836#line 77 "mesh-scanner.l"
    832837{ return token::T_COG; }
    833838        YY_BREAK
    834 case 31:
    835 YY_RULE_SETUP
    836 #line 78 "mesh-scanner.l"
     839case 32:
     840YY_RULE_SETUP
     841#line 79 "mesh-scanner.l"
    837842{
    838843        uint32_t tmp = strtol(yytext + 1, NULL, 16);
     
    843848        return token::COLOR; }
    844849        YY_BREAK
    845 case 32:
    846 YY_RULE_SETUP
    847 #line 85 "mesh-scanner.l"
     850case 33:
     851YY_RULE_SETUP
     852#line 86 "mesh-scanner.l"
    848853{
    849854        uint32_t tmp = strtol(yytext + 1, NULL, 16);
     
    854859        return token::COLOR; }
    855860        YY_BREAK
    856 case 33:
    857 YY_RULE_SETUP
    858 #line 92 "mesh-scanner.l"
     861case 34:
     862YY_RULE_SETUP
     863#line 93 "mesh-scanner.l"
    859864{
    860865        yylval->u32val = 0xffu
     
    862867        return token::COLOR; }
    863868        YY_BREAK
    864 case 34:
    865 YY_RULE_SETUP
    866 #line 96 "mesh-scanner.l"
     869case 35:
     870YY_RULE_SETUP
     871#line 97 "mesh-scanner.l"
    867872{
    868873        yylval->u32val = (uint32_t)strtol(yytext + 1, NULL, 16);
    869874        return token::COLOR; }
    870875        YY_BREAK
    871 case 35:
    872 YY_RULE_SETUP
    873 #line 99 "mesh-scanner.l"
     876case 36:
     877YY_RULE_SETUP
     878#line 100 "mesh-scanner.l"
    874879{
    875880        yylval->fval = atof(yytext); return token::NUMBER; }
    876881        YY_BREAK
    877 case 36:
    878 YY_RULE_SETUP
    879 #line 101 "mesh-scanner.l"
     882case 37:
     883YY_RULE_SETUP
     884#line 102 "mesh-scanner.l"
    880885{ return token_type('-'); }
    881886        YY_BREAK
    882 case 37:
    883 YY_RULE_SETUP
    884 #line 102 "mesh-scanner.l"
     887case 38:
     888YY_RULE_SETUP
     889#line 103 "mesh-scanner.l"
    885890{ return token_type('['); }
    886891        YY_BREAK
    887 case 38:
    888 YY_RULE_SETUP
    889 #line 103 "mesh-scanner.l"
     892case 39:
     893YY_RULE_SETUP
     894#line 104 "mesh-scanner.l"
    890895{ return token_type(']'); }
    891896        YY_BREAK
    892 case 39:
    893 YY_RULE_SETUP
    894 #line 104 "mesh-scanner.l"
    895 { /* ignore this */ }
    896         YY_BREAK
    897897case 40:
    898 /* rule 40 can match eol */
    899898YY_RULE_SETUP
    900899#line 105 "mesh-scanner.l"
     
    902901        YY_BREAK
    903902case 41:
     903/* rule 41 can match eol */
    904904YY_RULE_SETUP
    905905#line 106 "mesh-scanner.l"
     906{ /* ignore this */ }
     907        YY_BREAK
     908case 42:
     909YY_RULE_SETUP
     910#line 107 "mesh-scanner.l"
    906911{ return token::T_ERROR; }
    907912        YY_BREAK
    908 case 42:
    909 YY_RULE_SETUP
    910 #line 108 "mesh-scanner.l"
     913case 43:
     914YY_RULE_SETUP
     915#line 109 "mesh-scanner.l"
    911916ECHO;
    912917        YY_BREAK
    913 #line 914 "generated/mesh-scanner.cpp"
     918#line 919 "generated/mesh-scanner.cpp"
    914919case YY_STATE_EOF(INITIAL):
    915920        yyterminate();
     
    12931298                        {
    12941299                        yy_current_state = (int) yy_def[yy_current_state];
    1295                         if ( yy_current_state >= 68 )
     1300                        if ( yy_current_state >= 70 )
    12961301                                yy_c = yy_meta[(unsigned int) yy_c];
    12971302                        }
     
    13211326                {
    13221327                yy_current_state = (int) yy_def[yy_current_state];
    1323                 if ( yy_current_state >= 68 )
     1328                if ( yy_current_state >= 70 )
    13241329                        yy_c = yy_meta[(unsigned int) yy_c];
    13251330                }
    13261331        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    1327         yy_is_jam = (yy_current_state == 67);
     1332        yy_is_jam = (yy_current_state == 69);
    13281333
    13291334        return yy_is_jam ? 0 : yy_current_state;
     
    18121817#define YYTABLES_NAME "yytables"
    18131818
    1814 #line 108 "mesh-scanner.l"
     1819#line 109 "mesh-scanner.l"
    18151820
    18161821
  • trunk/orbital/mesh-parser.y

    r1495 r1506  
    4848%token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_SCALEZ T_MIRRORZ
    4949%token T_TRANSLATE T_SCALE
     50%token T_CHAMFER
    5051
    5152%token T_CYLINDER T_BOX T_SMOOTHCHAMFBOX T_FLATCHAMFBOX T_SPHERE T_STAR
     
    115116
    116117transform_command:
    117     T_TRANSLATEX args1  { mc.m_mesh.Translate(vec3($2.f0, 0, 0)); }
     118    T_CHAMFER args1     { mc.m_mesh.Chamfer($2.f0); }
     119  | T_TRANSLATEX args1  { mc.m_mesh.Translate(vec3($2.f0, 0, 0)); }
    118120  | T_TRANSLATEY args1  { mc.m_mesh.Translate(vec3(0, $2.f0, 0)); }
    119121  | T_TRANSLATEZ args1  { mc.m_mesh.Translate(vec3(0, 0, $2.f0)); }
  • trunk/orbital/mesh-scanner.l

    r1495 r1506  
    4646scb   { return token::T_BGCOLOR; }
    4747
     48ch    { return token::T_CHAMFER; }
    4849tx    { return token::T_TRANSLATEX; }
    4950ty    { return token::T_TRANSLATEY; }
  • trunk/orbital/mesh.h

    r1504 r1506  
    688688    }
    689689
     690    void Chamfer(float f)
     691    {
     692        (void)f;
     693    }
     694
    690695private:
    691696    vec4 m_color, m_color2;
Note: See TracChangeset for help on using the changeset viewer.