diff --git a/src/easymesh/easymesh-parser.y b/src/easymesh/easymesh-parser.y index 381df7b6..3d55335a 100644 --- a/src/easymesh/easymesh-parser.y +++ b/src/easymesh/easymesh-parser.y @@ -38,6 +38,7 @@ bool bval; float vval[4]; int ivval[4]; + char* lval; /* Can't use uin32_t here for some reason */ unsigned u32val; } @@ -50,6 +51,7 @@ %token T_TRANSLATEY T_ROTATEY T_TAPERY T_TWISTY T_SHEARY T_STRETCHY T_BENDYX T_BENDYZ T_SCALEY T_MIRRORY %token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_TWISTZ T_SHEARZ T_STRETCHZ T_BENDZX T_BENDZY T_SCALEZ T_MIRRORZ %token T_TRANSLATE T_ROTATE T_SCALE T_TOGGLESCALEWINDING T_RADIALJITTER T_SPLITTRIANGLE T_SMOOTHMESH +%token T_DUPLICATE %token T_CSGUNION T_CSGSUBSTRACT T_CSGSUBSTRACTLOSS T_CSGAND T_CSGXOR %token T_CHAMFER @@ -103,30 +105,35 @@ mesh_expression: mesh_command_list: mesh_command - | mesh_command_list mesh_command + | mesh_command mesh_command_list ; mesh_command: color_command | transform_command | primitive_command - | csg_command + | post_brace_command + | pre_brace_command '[' mesh_expression_list mesh_close ; -csg_command: - T_CSGUNION { mc.m_mesh.CsgUnion(); } - | T_CSGSUBSTRACT { mc.m_mesh.CsgSubstract(); } - | T_CSGSUBSTRACTLOSS { mc.m_mesh.CsgSubstractLoss(); } - | T_CSGAND { mc.m_mesh.CsgAnd(); } - | T_CSGXOR { mc.m_mesh.CsgXor(); } +post_brace_command: + T_CSGUNION mesh_open mesh_expression_list ']' { mc.m_mesh.CsgUnion(); mc.m_mesh.CloseBrace(); } + | T_CSGSUBSTRACT mesh_open mesh_expression_list ']' { mc.m_mesh.CsgSub(); mc.m_mesh.CloseBrace(); } + | T_CSGSUBSTRACTLOSS mesh_open mesh_expression_list ']' { mc.m_mesh.CsgSubL(); mc.m_mesh.CloseBrace(); } + | T_CSGAND mesh_open mesh_expression_list ']' { mc.m_mesh.CsgAnd(); mc.m_mesh.CloseBrace(); } + | T_CSGXOR mesh_open mesh_expression_list ']' { mc.m_mesh.CsgXor(); mc.m_mesh.CloseBrace(); } + ; + +pre_brace_command: + T_DUPLICATE { mc.m_mesh.DupAndScale(vec3::one, true); } ; mesh_open: - '[' { mc.m_mesh.OpenBrace(); } + '[' { mc.m_mesh.OpenBrace(); } ; mesh_close: - ']' { mc.m_mesh.CloseBrace(); } + ']' { mc.m_mesh.CloseBrace(); } ; color_command: diff --git a/src/easymesh/easymesh-scanner.l b/src/easymesh/easymesh-scanner.l index b73874be..3073c40e 100644 --- a/src/easymesh/easymesh-scanner.l +++ b/src/easymesh/easymesh-scanner.l @@ -48,8 +48,8 @@ typedef lol::EasyMeshParser::token_type token_type; %} (csgu|csgunion) { return token::T_CSGUNION; } -(csgs|csgsubstract) { return token::T_CSGSUBSTRACT; } -(csgsl|csgsubstractloss) { return token::T_CSGSUBSTRACTLOSS; } +(csgs|CsgSub) { return token::T_CSGSUBSTRACT; } +(csgsl|CsgSubL) { return token::T_CSGSUBSTRACTLOSS; } (csga|csgand) { return token::T_CSGAND; } (csgx|csgxor) { return token::T_CSGXOR; } @@ -94,6 +94,7 @@ typedef lol::EasyMeshParser::token_type token_type; (ch|chamfer) { return token::T_CHAMFER; } (splt|splittriangle) { return token::T_SPLITTRIANGLE; } (smth|smooth) { return token::T_SMOOTHMESH; } +(dup|duplicate) { return token::T_DUPLICATE; } (ac|addcylinder) { return token::T_CYLINDER; } (asph|addsphere) { return token::T_SPHERE; } @@ -151,8 +152,10 @@ false { yylval->bval = false; return token::BOOLEAN; } "-" { return token_type('-'); } "(" { return token_type('('); } ")" { return token_type(')'); } -"[" { return token_type('['); } -"]" { return token_type(']'); } +"{" { return token_type('{'); } +"}" { return token_type('}'); } +[\[] { return token_type('['); } +[\]] { return token_type(']'); } [ ,] { /* ignore this */ } [\n] { /* ignore this */ } . { return token::T_ERROR; } diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index 4d864419..dbd66726 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -787,11 +787,11 @@ void EasyMesh::MeshCsg(CSGUsage csg_operation) //Triangle Kill Test if (//csgu : CSGUnion() -> m0_Outside + m1_Outside (csg_operation == CSGUsage::Union && tri_list[k].m1 == LEAF_BACK) || - //csgs : CSGSubstract() -> m0_Outside + m1_Inside-inverted + //csgs : CsgSub() -> m0_Outside + m1_Inside-inverted (csg_operation == CSGUsage::Substract && ((mesh_id == 0 && tri_list[k].m1 == LEAF_BACK) || (mesh_id == 1 && tri_list[k].m1 == LEAF_FRONT))) || - //csgs : CSGSubstractLoss() -> m0_Outside + //csgs : CsgSubL() -> m0_Outside (csg_operation == CSGUsage::SubstractLoss && ((mesh_id == 0 && tri_list[k].m1 == LEAF_BACK) || mesh_id == 1)) || //csga : CSGAnd() -> m0_Inside + m1_Inside @@ -801,7 +801,7 @@ void EasyMesh::MeshCsg(CSGUsage csg_operation) } //Triangle Invert Test - if (//csgs : CSGSubstract() -> m0_Outside + m1_Inside-inverted + if (//csgs : CsgSub() -> m0_Outside + m1_Inside-inverted (csg_operation == CSGUsage::Substract && mesh_id == 1 && tri_list[k].m1 == LEAF_BACK) || //csgx : CSGXor() -> m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted (csg_operation == CSGUsage::Xor && tri_list[k].m1 == LEAF_BACK)) @@ -1364,7 +1364,7 @@ void EasyMesh::MirrorY() { DupAndScale(vec3(1, -1, 1)); } void EasyMesh::MirrorZ() { DupAndScale(vec3(1, 1, -1)); } //----------------------------------------------------------------------------- -void EasyMesh::DupAndScale(vec3 const &s) +void EasyMesh::DupAndScale(vec3 const &s, bool open_brace) { int vlen = m_vert.Count() - m_cursors.Last().m1; int tlen = m_indices.Count() - m_cursors.Last().m2; @@ -1379,6 +1379,14 @@ void EasyMesh::DupAndScale(vec3 const &s) m_cursors.Last().m1 -= vlen; m_cursors.Last().m2 -= tlen; + + if (open_brace) + { + OpenBrace(); + + m_cursors.Last().m1 -= vlen; + m_cursors.Last().m2 -= tlen; + } } //----------------------------------------------------------------------------- diff --git a/src/easymesh/easymesh.h b/src/easymesh/easymesh.h index 4a157af2..fa9e33bf 100644 --- a/src/easymesh/easymesh.h +++ b/src/easymesh/easymesh.h @@ -553,9 +553,9 @@ public: /* [cmd:csgu] Performs a Union operation as (mesh0_Outside + mesh1_Outside) */ void CsgUnion() { MeshCsg(CSGUsage::Union); } /* [cmd:csgs] Performs a Substract operation as (mesh0_Outside + mesh1_Inside-inverted) */ - void CsgSubstract() { MeshCsg(CSGUsage::Substract); } + void CsgSub() { MeshCsg(CSGUsage::Substract); } /* [cmd:csgsl] Performs a Substract operation without keeping the mesh1 part */ - void CsgSubstractLoss() { MeshCsg(CSGUsage::SubstractLoss); } + void CsgSubL() { MeshCsg(CSGUsage::SubstractLoss); } /* [cmd:csga] Performs an And operation as (mesh0_Inside + mesh1_Inside) */ void CsgAnd() { MeshCsg(CSGUsage::And); } /* [cmd:csgx] Performs a Xor operation as (m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted) */ @@ -722,7 +722,7 @@ public: /* [no-cmd] Duplicates vertices and scale duplicate Acts as an OpenBrace */ - void DupAndScale(vec3 const &s); + void DupAndScale(vec3 const &s, bool open_brace=false); /* [cmd:ch] Performs a chamfer operation //TODO : Make it work - f : Chamfer quantity. */ diff --git a/src/generated/easymesh-parser.cpp b/src/generated/easymesh-parser.cpp index 6fd3d8c5..25e12a74 100644 --- a/src/generated/easymesh-parser.cpp +++ b/src/generated/easymesh-parser.cpp @@ -69,7 +69,7 @@ /* User implementation prologue. */ /* Line 316 of lalr1.cc */ -#line 76 "easymesh/easymesh-parser.y" +#line 78 "easymesh/easymesh-parser.y" #include "easymesh/easymesh-compiler.h" @@ -437,896 +437,903 @@ namespace lol { YY_REDUCE_PRINT (yyn); switch (yyn) { - case 13: + case 14: /* Line 677 of lalr1.cc */ -#line 117 "easymesh/easymesh-parser.y" - { mc.m_mesh.CsgUnion(); } - break; - - case 14: - -/* Line 677 of lalr1.cc */ -#line 118 "easymesh/easymesh-parser.y" - { mc.m_mesh.CsgSubstract(); } +#line 120 "easymesh/easymesh-parser.y" + { mc.m_mesh.CsgUnion(); mc.m_mesh.CloseBrace(); } break; case 15: /* Line 677 of lalr1.cc */ -#line 119 "easymesh/easymesh-parser.y" - { mc.m_mesh.CsgSubstractLoss(); } +#line 121 "easymesh/easymesh-parser.y" + { mc.m_mesh.CsgSub(); mc.m_mesh.CloseBrace(); } break; case 16: /* Line 677 of lalr1.cc */ -#line 120 "easymesh/easymesh-parser.y" - { mc.m_mesh.CsgAnd(); } +#line 122 "easymesh/easymesh-parser.y" + { mc.m_mesh.CsgSubL(); mc.m_mesh.CloseBrace(); } break; case 17: /* Line 677 of lalr1.cc */ -#line 121 "easymesh/easymesh-parser.y" - { mc.m_mesh.CsgXor(); } +#line 123 "easymesh/easymesh-parser.y" + { mc.m_mesh.CsgAnd(); mc.m_mesh.CloseBrace(); } break; case 18: /* Line 677 of lalr1.cc */ -#line 125 "easymesh/easymesh-parser.y" - { mc.m_mesh.OpenBrace(); } +#line 124 "easymesh/easymesh-parser.y" + { mc.m_mesh.CsgXor(); mc.m_mesh.CloseBrace(); } break; case 19: /* Line 677 of lalr1.cc */ -#line 129 "easymesh/easymesh-parser.y" - { mc.m_mesh.CloseBrace(); } +#line 128 "easymesh/easymesh-parser.y" + { mc.m_mesh.DupAndScale(vec3::one, true); } break; case 20: /* Line 677 of lalr1.cc */ -#line 133 "easymesh/easymesh-parser.y" - { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval))); } +#line 132 "easymesh/easymesh-parser.y" + { mc.m_mesh.OpenBrace(); } break; case 21: /* Line 677 of lalr1.cc */ -#line 134 "easymesh/easymesh-parser.y" - { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2], (yysemantic_stack_[(2) - (2)].vval)[3])); } +#line 136 "easymesh/easymesh-parser.y" + { mc.m_mesh.CloseBrace(); } break; case 22: /* Line 677 of lalr1.cc */ -#line 135 "easymesh/easymesh-parser.y" +#line 140 "easymesh/easymesh-parser.y" + { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval))); } + break; + + case 23: + +/* Line 677 of lalr1.cc */ +#line 141 "easymesh/easymesh-parser.y" + { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2], (yysemantic_stack_[(2) - (2)].vval)[3])); } + break; + + case 24: + +/* Line 677 of lalr1.cc */ +#line 142 "easymesh/easymesh-parser.y" { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); ivec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); mc.m_mesh.SetCurColor(vec4(v) * (1.f / 255.f)); } break; - case 23: + case 25: /* Line 677 of lalr1.cc */ -#line 138 "easymesh/easymesh-parser.y" +#line 145 "easymesh/easymesh-parser.y" { mc.m_mesh.SetCurColor2(vec4((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval))); } break; - case 24: + case 26: /* Line 677 of lalr1.cc */ -#line 139 "easymesh/easymesh-parser.y" +#line 146 "easymesh/easymesh-parser.y" { mc.m_mesh.SetCurColor2(vec4((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2], (yysemantic_stack_[(2) - (2)].vval)[3])); } break; - case 25: + case 27: /* Line 677 of lalr1.cc */ -#line 140 "easymesh/easymesh-parser.y" +#line 147 "easymesh/easymesh-parser.y" { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); ivec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); mc.m_mesh.SetCurColor2(vec4(v) * (1.f / 255.f)); } break; - case 26: + case 28: /* Line 677 of lalr1.cc */ -#line 146 "easymesh/easymesh-parser.y" +#line 153 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].fval), 0.f, 0.f)); } break; - case 27: + case 29: /* Line 677 of lalr1.cc */ -#line 147 "easymesh/easymesh-parser.y" +#line 154 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3(0.f, (yysemantic_stack_[(2) - (2)].fval), 0.f)); } break; - case 28: + case 30: /* Line 677 of lalr1.cc */ -#line 148 "easymesh/easymesh-parser.y" +#line 155 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3(0.f, 0.f, (yysemantic_stack_[(2) - (2)].fval))); } break; - case 29: + case 31: /* Line 677 of lalr1.cc */ -#line 149 "easymesh/easymesh-parser.y" +#line 156 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval))); } break; - case 30: + case 32: /* Line 677 of lalr1.cc */ -#line 150 "easymesh/easymesh-parser.y" +#line 157 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2])); } break; - case 31: + case 33: /* Line 677 of lalr1.cc */ -#line 151 "easymesh/easymesh-parser.y" +#line 158 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 32: + case 34: /* Line 677 of lalr1.cc */ -#line 152 "easymesh/easymesh-parser.y" +#line 159 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 33: + case 35: /* Line 677 of lalr1.cc */ -#line 153 "easymesh/easymesh-parser.y" +#line 160 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 34: + case 36: /* Line 677 of lalr1.cc */ -#line 154 "easymesh/easymesh-parser.y" +#line 161 "easymesh/easymesh-parser.y" { mc.m_mesh.Rotate((yysemantic_stack_[(5) - (2)].fval), vec3((yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval))); } break; - case 35: + case 37: /* Line 677 of lalr1.cc */ -#line 155 "easymesh/easymesh-parser.y" +#line 162 "easymesh/easymesh-parser.y" { mc.m_mesh.Rotate((yysemantic_stack_[(3) - (2)].fval), vec3((yysemantic_stack_[(3) - (3)].vval)[0], (yysemantic_stack_[(3) - (3)].vval)[1], (yysemantic_stack_[(3) - (3)].vval)[2])); } break; - case 36: + case 38: /* Line 677 of lalr1.cc */ -#line 156 "easymesh/easymesh-parser.y" +#line 163 "easymesh/easymesh-parser.y" { mc.m_mesh.RadialJitter((yysemantic_stack_[(2) - (2)].fval)); } break; - case 37: + case 39: /* Line 677 of lalr1.cc */ -#line 157 "easymesh/easymesh-parser.y" +#line 164 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperX((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 38: + case 40: /* Line 677 of lalr1.cc */ -#line 158 "easymesh/easymesh-parser.y" +#line 165 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperX((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 39: + case 41: /* Line 677 of lalr1.cc */ -#line 159 "easymesh/easymesh-parser.y" +#line 166 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 40: + case 42: /* Line 677 of lalr1.cc */ -#line 160 "easymesh/easymesh-parser.y" +#line 167 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperY((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 41: + case 43: /* Line 677 of lalr1.cc */ -#line 161 "easymesh/easymesh-parser.y" +#line 168 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperY((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 42: + case 44: /* Line 677 of lalr1.cc */ -#line 162 "easymesh/easymesh-parser.y" +#line 169 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 43: + case 45: /* Line 677 of lalr1.cc */ -#line 163 "easymesh/easymesh-parser.y" +#line 170 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperZ((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 44: + case 46: /* Line 677 of lalr1.cc */ -#line 164 "easymesh/easymesh-parser.y" +#line 171 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperZ((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 45: + case 47: /* Line 677 of lalr1.cc */ -#line 165 "easymesh/easymesh-parser.y" +#line 172 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 46: + case 48: /* Line 677 of lalr1.cc */ -#line 166 "easymesh/easymesh-parser.y" +#line 173 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 47: + case 49: /* Line 677 of lalr1.cc */ -#line 167 "easymesh/easymesh-parser.y" +#line 174 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 48: + case 50: /* Line 677 of lalr1.cc */ -#line 168 "easymesh/easymesh-parser.y" +#line 175 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 49: + case 51: /* Line 677 of lalr1.cc */ -#line 169 "easymesh/easymesh-parser.y" +#line 176 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 50: + case 52: /* Line 677 of lalr1.cc */ -#line 170 "easymesh/easymesh-parser.y" +#line 177 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 51: + case 53: /* Line 677 of lalr1.cc */ -#line 171 "easymesh/easymesh-parser.y" +#line 178 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 52: + case 54: /* Line 677 of lalr1.cc */ -#line 172 "easymesh/easymesh-parser.y" +#line 179 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearX((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 53: + case 55: /* Line 677 of lalr1.cc */ -#line 173 "easymesh/easymesh-parser.y" +#line 180 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearX((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 54: + case 56: /* Line 677 of lalr1.cc */ -#line 174 "easymesh/easymesh-parser.y" +#line 181 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 55: + case 57: /* Line 677 of lalr1.cc */ -#line 175 "easymesh/easymesh-parser.y" +#line 182 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearY((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 56: + case 58: /* Line 677 of lalr1.cc */ -#line 176 "easymesh/easymesh-parser.y" +#line 183 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearY((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 57: + case 59: /* Line 677 of lalr1.cc */ -#line 177 "easymesh/easymesh-parser.y" +#line 184 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 58: + case 60: /* Line 677 of lalr1.cc */ -#line 178 "easymesh/easymesh-parser.y" +#line 185 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearZ((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 59: + case 61: /* Line 677 of lalr1.cc */ -#line 179 "easymesh/easymesh-parser.y" +#line 186 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearZ((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 60: + case 62: /* Line 677 of lalr1.cc */ -#line 180 "easymesh/easymesh-parser.y" +#line 187 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 61: + case 63: /* Line 677 of lalr1.cc */ -#line 181 "easymesh/easymesh-parser.y" +#line 188 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchX((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 62: + case 64: /* Line 677 of lalr1.cc */ -#line 182 "easymesh/easymesh-parser.y" +#line 189 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 63: + case 65: /* Line 677 of lalr1.cc */ -#line 183 "easymesh/easymesh-parser.y" +#line 190 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchY((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 64: + case 66: /* Line 677 of lalr1.cc */ -#line 184 "easymesh/easymesh-parser.y" +#line 191 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 65: + case 67: /* Line 677 of lalr1.cc */ -#line 185 "easymesh/easymesh-parser.y" +#line 192 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchZ((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 66: + case 68: /* Line 677 of lalr1.cc */ -#line 186 "easymesh/easymesh-parser.y" +#line 193 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 67: + case 69: /* Line 677 of lalr1.cc */ -#line 187 "easymesh/easymesh-parser.y" +#line 194 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 68: + case 70: /* Line 677 of lalr1.cc */ -#line 188 "easymesh/easymesh-parser.y" +#line 195 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 69: + case 71: /* Line 677 of lalr1.cc */ -#line 189 "easymesh/easymesh-parser.y" +#line 196 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 70: + case 72: /* Line 677 of lalr1.cc */ -#line 190 "easymesh/easymesh-parser.y" +#line 197 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 71: + case 73: /* Line 677 of lalr1.cc */ -#line 191 "easymesh/easymesh-parser.y" +#line 198 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 72: + case 74: /* Line 677 of lalr1.cc */ -#line 192 "easymesh/easymesh-parser.y" +#line 199 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 73: + case 75: /* Line 677 of lalr1.cc */ -#line 193 "easymesh/easymesh-parser.y" +#line 200 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 74: + case 76: /* Line 677 of lalr1.cc */ -#line 194 "easymesh/easymesh-parser.y" +#line 201 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 75: + case 77: /* Line 677 of lalr1.cc */ -#line 195 "easymesh/easymesh-parser.y" +#line 202 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 76: + case 78: /* Line 677 of lalr1.cc */ -#line 196 "easymesh/easymesh-parser.y" +#line 203 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 77: + case 79: /* Line 677 of lalr1.cc */ -#line 197 "easymesh/easymesh-parser.y" +#line 204 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 78: + case 80: /* Line 677 of lalr1.cc */ -#line 198 "easymesh/easymesh-parser.y" +#line 205 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 79: + case 81: /* Line 677 of lalr1.cc */ -#line 199 "easymesh/easymesh-parser.y" +#line 206 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].fval), 1.f, 1.f)); } break; - case 80: + case 82: /* Line 677 of lalr1.cc */ -#line 200 "easymesh/easymesh-parser.y" +#line 207 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3(1.f, (yysemantic_stack_[(2) - (2)].fval), 1.f)); } break; - case 81: + case 83: /* Line 677 of lalr1.cc */ -#line 201 "easymesh/easymesh-parser.y" +#line 208 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3(1.f, 1.f, (yysemantic_stack_[(2) - (2)].fval))); } break; - case 82: + case 84: /* Line 677 of lalr1.cc */ -#line 202 "easymesh/easymesh-parser.y" +#line 209 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval))); } break; - case 83: + case 85: /* Line 677 of lalr1.cc */ -#line 203 "easymesh/easymesh-parser.y" +#line 210 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2])); } break; - case 84: + case 86: /* Line 677 of lalr1.cc */ -#line 204 "easymesh/easymesh-parser.y" +#line 211 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].fval), (yysemantic_stack_[(2) - (2)].fval), (yysemantic_stack_[(2) - (2)].fval))); } break; - case 85: + case 87: /* Line 677 of lalr1.cc */ -#line 205 "easymesh/easymesh-parser.y" +#line 212 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorX(); } break; - case 86: + case 88: /* Line 677 of lalr1.cc */ -#line 206 "easymesh/easymesh-parser.y" +#line 213 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorY(); } break; - case 87: + case 89: /* Line 677 of lalr1.cc */ -#line 207 "easymesh/easymesh-parser.y" +#line 214 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorZ(); } break; - case 88: + case 90: /* Line 677 of lalr1.cc */ -#line 208 "easymesh/easymesh-parser.y" +#line 215 "easymesh/easymesh-parser.y" { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].fval)); } break; - case 89: + case 91: /* Line 677 of lalr1.cc */ -#line 209 "easymesh/easymesh-parser.y" +#line 216 "easymesh/easymesh-parser.y" { mc.m_mesh.SplitTriangles((yysemantic_stack_[(2) - (2)].ival)); } break; - case 90: + case 92: /* Line 677 of lalr1.cc */ -#line 210 "easymesh/easymesh-parser.y" +#line 217 "easymesh/easymesh-parser.y" { mc.m_mesh.SmoothMesh((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (4)].ival)); } break; - case 91: + case 93: /* Line 677 of lalr1.cc */ -#line 211 "easymesh/easymesh-parser.y" +#line 218 "easymesh/easymesh-parser.y" { mc.m_mesh.ToggleScaleWinding(); } break; - case 92: + case 94: /* Line 677 of lalr1.cc */ -#line 215 "easymesh/easymesh-parser.y" +#line 222 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCylinder((yysemantic_stack_[(8) - (2)].ival), (yysemantic_stack_[(8) - (3)].fval), (yysemantic_stack_[(8) - (4)].fval), (yysemantic_stack_[(8) - (5)].fval), (yysemantic_stack_[(8) - (6)].bval), (yysemantic_stack_[(8) - (7)].bval), (yysemantic_stack_[(8) - (8)].bval)); } break; - case 93: + case 95: /* Line 677 of lalr1.cc */ -#line 216 "easymesh/easymesh-parser.y" +#line 223 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCylinder((yysemantic_stack_[(7) - (2)].ival), (yysemantic_stack_[(7) - (3)].fval), (yysemantic_stack_[(7) - (4)].fval), (yysemantic_stack_[(7) - (5)].fval), (yysemantic_stack_[(7) - (6)].bval), (yysemantic_stack_[(7) - (7)].bval)); } break; - case 94: + case 96: /* Line 677 of lalr1.cc */ -#line 217 "easymesh/easymesh-parser.y" +#line 224 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCylinder((yysemantic_stack_[(6) - (2)].ival), (yysemantic_stack_[(6) - (3)].fval), (yysemantic_stack_[(6) - (4)].fval), (yysemantic_stack_[(6) - (5)].fval), (yysemantic_stack_[(6) - (6)].bval)); } break; - case 95: + case 97: /* Line 677 of lalr1.cc */ -#line 218 "easymesh/easymesh-parser.y" +#line 225 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCylinder((yysemantic_stack_[(5) - (2)].ival), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval)); } break; - case 96: + case 98: /* Line 677 of lalr1.cc */ -#line 219 "easymesh/easymesh-parser.y" +#line 226 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSphere((yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 97: + case 99: /* Line 677 of lalr1.cc */ -#line 220 "easymesh/easymesh-parser.y" +#line 227 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCapsule((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 98: + case 100: /* Line 677 of lalr1.cc */ -#line 221 "easymesh/easymesh-parser.y" +#line 228 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendTorus((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 99: + case 101: /* Line 677 of lalr1.cc */ -#line 222 "easymesh/easymesh-parser.y" +#line 229 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval)), (yysemantic_stack_[(5) - (5)].fval)); } break; - case 100: + case 102: /* Line 677 of lalr1.cc */ -#line 223 "easymesh/easymesh-parser.y" +#line 230 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(4) - (2)].fval), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval))); } break; - case 101: + case 103: /* Line 677 of lalr1.cc */ -#line 224 "easymesh/easymesh-parser.y" +#line 231 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].fval), (yysemantic_stack_[(2) - (2)].fval), (yysemantic_stack_[(2) - (2)].fval))); } break; - case 102: + case 104: /* Line 677 of lalr1.cc */ -#line 225 "easymesh/easymesh-parser.y" +#line 232 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(3) - (2)].vval)[0], (yysemantic_stack_[(3) - (2)].vval)[1], (yysemantic_stack_[(3) - (2)].vval)[2]), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 103: + case 105: /* Line 677 of lalr1.cc */ -#line 226 "easymesh/easymesh-parser.y" +#line 233 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2])); } break; - case 104: + case 106: /* Line 677 of lalr1.cc */ -#line 227 "easymesh/easymesh-parser.y" +#line 234 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval)), (yysemantic_stack_[(5) - (5)].fval)); } break; - case 105: + case 107: /* Line 677 of lalr1.cc */ -#line 228 "easymesh/easymesh-parser.y" +#line 235 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (2)].fval)), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 106: + case 108: /* Line 677 of lalr1.cc */ -#line 229 "easymesh/easymesh-parser.y" +#line 236 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(3) - (2)].vval)[0], (yysemantic_stack_[(3) - (2)].vval)[1], (yysemantic_stack_[(3) - (2)].vval)[2]), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 107: + case 109: /* Line 677 of lalr1.cc */ -#line 230 "easymesh/easymesh-parser.y" +#line 237 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval)), (yysemantic_stack_[(5) - (5)].fval)); } break; - case 108: + case 110: /* Line 677 of lalr1.cc */ -#line 231 "easymesh/easymesh-parser.y" +#line 238 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (2)].fval)), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 109: + case 111: /* Line 677 of lalr1.cc */ -#line 232 "easymesh/easymesh-parser.y" +#line 239 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(3) - (2)].vval)[0], (yysemantic_stack_[(3) - (2)].vval)[1], (yysemantic_stack_[(3) - (2)].vval)[2]), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 110: + case 112: /* Line 677 of lalr1.cc */ -#line 233 "easymesh/easymesh-parser.y" +#line 240 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendStar((yysemantic_stack_[(6) - (2)].ival), (yysemantic_stack_[(6) - (3)].fval), (yysemantic_stack_[(6) - (4)].fval), (yysemantic_stack_[(6) - (5)].bval), (yysemantic_stack_[(6) - (6)].bval)); } break; - case 111: + case 113: /* Line 677 of lalr1.cc */ -#line 234 "easymesh/easymesh-parser.y" +#line 241 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendStar((yysemantic_stack_[(5) - (2)].ival), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].bval)); } break; - case 112: + case 114: /* Line 677 of lalr1.cc */ -#line 235 "easymesh/easymesh-parser.y" +#line 242 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendStar((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 113: + case 115: /* Line 677 of lalr1.cc */ -#line 236 "easymesh/easymesh-parser.y" +#line 243 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendExpandedStar((yysemantic_stack_[(5) - (2)].ival), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval)); } break; - case 114: + case 116: /* Line 677 of lalr1.cc */ -#line 237 "easymesh/easymesh-parser.y" +#line 244 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendExpandedStar((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].fval)); } break; - case 115: + case 117: /* Line 677 of lalr1.cc */ -#line 238 "easymesh/easymesh-parser.y" +#line 245 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendDisc((yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].fval), (yysemantic_stack_[(4) - (4)].bval)); } break; - case 116: + case 118: /* Line 677 of lalr1.cc */ -#line 239 "easymesh/easymesh-parser.y" +#line 246 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendDisc((yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 117: + case 119: /* Line 677 of lalr1.cc */ -#line 240 "easymesh/easymesh-parser.y" +#line 247 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].bval)); } break; - case 118: + case 120: /* Line 677 of lalr1.cc */ -#line 241 "easymesh/easymesh-parser.y" +#line 248 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].fval)); } break; - case 119: + case 121: /* Line 677 of lalr1.cc */ -#line 242 "easymesh/easymesh-parser.y" +#line 249 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].bval)); } break; - case 120: + case 122: /* Line 677 of lalr1.cc */ -#line 243 "easymesh/easymesh-parser.y" +#line 250 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].fval)); } break; - case 121: + case 123: /* Line 677 of lalr1.cc */ -#line 244 "easymesh/easymesh-parser.y" +#line 251 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCog((yysemantic_stack_[(11) - (2)].ival), (yysemantic_stack_[(11) - (3)].fval), (yysemantic_stack_[(11) - (4)].fval), (yysemantic_stack_[(11) - (5)].fval), (yysemantic_stack_[(11) - (6)].fval), (yysemantic_stack_[(11) - (7)].fval), (yysemantic_stack_[(11) - (8)].fval), (yysemantic_stack_[(11) - (9)].fval), (yysemantic_stack_[(11) - (10)].fval), (yysemantic_stack_[(11) - (11)].bval)); } break; - case 122: + case 124: /* Line 677 of lalr1.cc */ -#line 245 "easymesh/easymesh-parser.y" +#line 252 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCog((yysemantic_stack_[(10) - (2)].ival), (yysemantic_stack_[(10) - (3)].fval), (yysemantic_stack_[(10) - (4)].fval), (yysemantic_stack_[(10) - (5)].fval), (yysemantic_stack_[(10) - (6)].fval), (yysemantic_stack_[(10) - (7)].fval), (yysemantic_stack_[(10) - (8)].fval), (yysemantic_stack_[(10) - (9)].fval), (yysemantic_stack_[(10) - (10)].fval)); } break; - case 123: + case 125: /* Line 677 of lalr1.cc */ -#line 246 "easymesh/easymesh-parser.y" +#line 253 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendCog((yysemantic_stack_[(9) - (2)].ival), (yysemantic_stack_[(9) - (3)].fval), (yysemantic_stack_[(9) - (4)].fval), (yysemantic_stack_[(9) - (5)].fval), (yysemantic_stack_[(9) - (6)].fval), (yysemantic_stack_[(9) - (7)].fval), (yysemantic_stack_[(9) - (8)].fval), (yysemantic_stack_[(9) - (9)].fval)); } break; - case 124: + case 126: /* Line 677 of lalr1.cc */ -#line 251 "easymesh/easymesh-parser.y" +#line 258 "easymesh/easymesh-parser.y" { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } break; - case 125: + case 127: /* Line 677 of lalr1.cc */ -#line 252 "easymesh/easymesh-parser.y" +#line 259 "easymesh/easymesh-parser.y" { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } break; - case 126: + case 128: /* Line 677 of lalr1.cc */ -#line 253 "easymesh/easymesh-parser.y" +#line 260 "easymesh/easymesh-parser.y" { (yyval.fval) = (float)(yysemantic_stack_[(1) - (1)].ival); } break; - case 127: + case 129: /* Line 677 of lalr1.cc */ -#line 254 "easymesh/easymesh-parser.y" +#line 261 "easymesh/easymesh-parser.y" { (yyval.fval) = -(float)(yysemantic_stack_[(2) - (2)].ival); } break; - case 128: + case 130: /* Line 677 of lalr1.cc */ -#line 258 "easymesh/easymesh-parser.y" +#line 265 "easymesh/easymesh-parser.y" { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); } break; - case 129: + case 131: /* Line 677 of lalr1.cc */ -#line 259 "easymesh/easymesh-parser.y" +#line 266 "easymesh/easymesh-parser.y" { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); } break; - case 130: + case 132: /* Line 677 of lalr1.cc */ -#line 260 "easymesh/easymesh-parser.y" +#line 267 "easymesh/easymesh-parser.y" { (yyval.ival) = (int)(yysemantic_stack_[(1) - (1)].fval); } break; - case 131: + case 133: /* Line 677 of lalr1.cc */ -#line 261 "easymesh/easymesh-parser.y" +#line 268 "easymesh/easymesh-parser.y" { (yyval.ival) = -(int)(yysemantic_stack_[(2) - (2)].fval); } break; - case 132: + case 134: /* Line 677 of lalr1.cc */ -#line 266 "easymesh/easymesh-parser.y" +#line 273 "easymesh/easymesh-parser.y" { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); } break; - case 133: + case 135: /* Line 677 of lalr1.cc */ -#line 267 "easymesh/easymesh-parser.y" +#line 274 "easymesh/easymesh-parser.y" { (yyval.vval)[0] = (yysemantic_stack_[(5) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(5) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(5) - (4)].fval); } break; - case 134: + case 136: /* Line 677 of lalr1.cc */ -#line 271 "easymesh/easymesh-parser.y" +#line 278 "easymesh/easymesh-parser.y" { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[3] = (yysemantic_stack_[(3) - (2)].fval); } break; - case 135: + case 137: /* Line 677 of lalr1.cc */ -#line 272 "easymesh/easymesh-parser.y" +#line 279 "easymesh/easymesh-parser.y" { (yyval.vval)[0] = (yysemantic_stack_[(6) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(6) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(6) - (4)].fval); (yyval.vval)[3] = (yysemantic_stack_[(6) - (5)].fval); } break; - case 136: + case 138: /* Line 677 of lalr1.cc */ -#line 277 "easymesh/easymesh-parser.y" +#line 284 "easymesh/easymesh-parser.y" { (yyval.bval) = (yysemantic_stack_[(1) - (1)].bval); } break; - case 137: + case 139: /* Line 677 of lalr1.cc */ -#line 278 "easymesh/easymesh-parser.y" +#line 285 "easymesh/easymesh-parser.y" { (yyval.bval) = !!(yysemantic_stack_[(1) - (1)].ival); } break; - case 138: + case 140: /* Line 677 of lalr1.cc */ -#line 279 "easymesh/easymesh-parser.y" +#line 286 "easymesh/easymesh-parser.y" { (yyval.bval) = !!(yysemantic_stack_[(1) - (1)].fval); } break; /* Line 677 of lalr1.cc */ -#line 1330 "generated/easymesh-parser.cpp" +#line 1337 "generated/easymesh-parser.cpp" default: break; } @@ -1531,36 +1538,38 @@ namespace lol { /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char EasyMeshParser::yypact_ninf_ = -33; + const signed char EasyMeshParser::yypact_ninf_ = -118; const short int EasyMeshParser::yypact_[] = { - 353, 74, 89, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -33, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -33, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -33, 6, -24, 6, -33, -24, 2, 2, - -33, -33, -33, -33, -33, -24, 2, 6, 6, 6, - 2, 2, 2, 2, 2, -24, -24, 2, 2, -33, - 10, 20, 353, 417, -33, -33, 353, -33, -33, -33, - -33, -33, -33, 72, -24, -24, -33, -33, -24, -33, - -33, -33, -24, -24, -24, -24, -24, -24, -33, -33, - -33, -24, -24, -24, -24, -24, -24, -33, -33, -33, - -24, -24, -24, -24, -24, -24, -33, -24, -24, -33, - 6, -24, -33, -33, -33, -33, 72, -33, 2, -33, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -22, -22, -24, -24, -33, -33, -33, -33, - -30, -33, -33, 72, -33, -33, -11, -24, -24, -24, - -33, -24, -24, -33, -33, -24, -33, -24, -24, -33, - -33, -24, -33, -24, -24, -33, -33, -7, -24, -24, - -33, -24, -33, -33, 2, -24, -24, -33, -24, -33, - -24, -33, -33, -24, -24, -24, -22, -33, -33, -33, - -33, -33, -24, -24, -33, -33, -33, -33, -33, -24, - -24, -24, -22, -22, -33, -22, -22, -33, -22, -22, - -33, -33, -24, -33, -24, -33, -33, -24, -24, -24, - -24, -33, -22, -24, -33, -24, -33, -24, -33, -33, - -33, -33, -33, -33, -33, -33, -12, -33, -22, -33, - -33, -33, -22, -33, -24, -10, -33, -22, -33, -24, - -33, -22, -24, -33, -24, -24, -22, -33 + 353, -1, 78, 3, 3, 3, 3, 3, 3, 3, + 3, 3, -118, 3, 3, 3, 3, 3, 3, 3, + 3, 3, -118, 3, 3, 3, 3, 3, 3, 3, + 3, 3, -118, 7, 3, 7, -118, 3, 82, 82, + -118, -57, -57, -57, -57, -57, 3, 82, 7, 7, + 7, 82, 82, 82, 82, 82, 3, 3, 82, 82, + -118, 20, 30, 353, -118, 418, -118, -33, 353, -118, + -118, -118, -118, -118, -118, 96, 3, 3, -118, -118, + 3, -118, -118, -118, 3, 3, 3, 3, 3, 3, + -118, -118, -118, 3, 3, 3, 3, 3, 3, -118, + -118, -118, 3, 3, 3, 3, 3, 3, -118, 3, + 3, -118, 7, 3, -118, -118, -118, -118, 96, -118, + 82, 353, 353, 353, 353, 353, -118, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, -24, + -24, 3, 3, -118, -118, -118, -118, 353, -12, -118, + -118, 96, -118, -118, -26, 3, 3, 3, -118, 3, + 3, -118, -118, 3, -118, 3, 3, -118, -118, 3, + -118, 3, 3, -118, -118, -11, 3, 3, -118, 3, + -118, -118, 82, -7, 11, 12, 13, 21, 3, 3, + -118, 3, -118, 3, -118, -118, 3, 3, 3, -24, + -118, -118, -118, -118, -118, 3, 3, -12, -118, -118, + -118, -118, -118, 3, 3, 3, -24, -24, -118, -24, + -24, -118, -24, -24, -118, -118, 3, -118, 3, -118, + -118, -118, -118, -118, -118, -118, 3, 3, 3, 3, + -118, -24, 3, -118, 3, -118, -118, 3, -118, -118, + -118, -118, -118, -118, -118, -118, -29, -118, -24, -118, + -118, -118, -24, -118, 3, -14, -118, -24, -118, 3, + -118, -24, 3, -118, 3, 3, -24, -118 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -1570,47 +1579,49 @@ namespace lol { EasyMeshParser::yydefact_[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 0, 91, 0, 0, 0, - 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, - 0, 0, 3, 5, 7, 12, 0, 9, 10, 11, - 124, 126, 22, 0, 0, 0, 21, 25, 0, 24, - 26, 31, 0, 47, 0, 0, 68, 70, 79, 27, - 32, 0, 49, 0, 0, 72, 74, 80, 28, 33, - 0, 51, 0, 0, 76, 78, 81, 0, 0, 30, - 0, 84, 83, 36, 130, 128, 0, 89, 0, 88, - 0, 101, 103, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 118, 120, 0, 0, 1, 2, 4, 8, - 0, 124, 126, 0, 125, 127, 0, 0, 0, 39, - 46, 54, 62, 67, 69, 42, 48, 57, 64, 71, - 73, 45, 50, 60, 66, 75, 77, 0, 0, 0, - 35, 0, 131, 129, 0, 0, 0, 102, 105, 106, - 108, 109, 96, 0, 0, 0, 116, 138, 137, 136, - 117, 119, 0, 0, 19, 6, 125, 127, 134, 0, - 0, 0, 38, 53, 61, 41, 56, 63, 44, 59, - 65, 132, 0, 29, 0, 82, 90, 0, 100, 0, - 0, 97, 112, 114, 115, 0, 98, 0, 20, 23, - 37, 52, 40, 55, 43, 58, 0, 34, 95, 99, - 104, 107, 111, 113, 0, 0, 133, 94, 110, 0, - 135, 93, 0, 92, 0, 123, 122, 121 + 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 89, 0, 0, 0, 93, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 20, 0, 0, 3, 5, 7, 12, 0, 0, 9, + 10, 11, 126, 128, 24, 0, 0, 0, 23, 27, + 0, 26, 28, 33, 0, 49, 0, 0, 70, 72, + 81, 29, 34, 0, 51, 0, 0, 74, 76, 82, + 30, 35, 0, 53, 0, 0, 78, 80, 83, 0, + 0, 32, 0, 86, 85, 38, 132, 130, 0, 91, + 0, 0, 0, 0, 0, 0, 90, 0, 103, 105, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, + 122, 0, 0, 1, 2, 4, 8, 0, 0, 126, + 128, 0, 127, 129, 0, 0, 0, 41, 48, 56, + 64, 69, 71, 44, 50, 59, 66, 73, 75, 47, + 52, 62, 68, 77, 79, 0, 0, 0, 37, 0, + 133, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 104, 107, 108, 110, 111, 98, 0, 0, 0, 118, + 140, 139, 138, 119, 121, 0, 0, 0, 21, 6, + 127, 129, 136, 0, 0, 0, 40, 55, 63, 43, + 58, 65, 46, 61, 67, 134, 0, 31, 0, 84, + 92, 14, 15, 16, 17, 18, 0, 102, 0, 0, + 99, 114, 116, 117, 0, 100, 13, 0, 22, 25, + 39, 54, 42, 57, 45, 60, 0, 36, 97, 101, + 106, 109, 113, 115, 0, 0, 135, 96, 112, 0, + 137, 95, 0, 94, 0, 125, 124, 123 }; /* YYPGOTO[NTERM-NUM]. */ const short int EasyMeshParser::yypgoto_[] = { - -33, -33, -32, -33, -33, -1, -33, -33, -33, -33, - -33, -33, -2, 181, 1, 64, 54 + -118, -118, -4, -118, 23, -118, -118, -118, 137, -117, + -118, -118, -118, -2, 163, 1, 95, 79 }; /* YYDEFGOTO[NTERM-NUM]. */ const short int EasyMeshParser::yydefgoto_[] = { - -1, 60, 61, 62, 63, 64, 65, 66, 195, 67, - 68, 69, 75, 117, 109, 76, 190 + -1, 61, 62, 63, 64, 65, 66, 67, 68, 209, + 69, 70, 71, 77, 119, 111, 78, 203 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1620,54 +1631,54 @@ namespace lol { const unsigned short int EasyMeshParser::yytable_[] = { - 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 136, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 137, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 138, 108, 110, 111, 140, 113, 112, 194, 70, 71, - 187, 188, 189, 119, 73, 121, 123, 125, 122, 124, - 126, 70, 71, 132, 133, 70, 71, 73, 246, 198, - 250, 73, 139, 211, 114, 115, 79, 0, 70, 71, - 116, 144, 146, 147, 73, 107, 148, 0, 0, 0, - 149, 150, 151, 152, 153, 154, 0, 0, 0, 155, - 156, 157, 158, 159, 160, 0, 0, 0, 161, 162, - 163, 164, 165, 166, 0, 167, 168, 0, 169, 171, - 0, 170, 0, 0, 172, 0, 0, 0, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 0, 0, 192, 193, 141, 142, 70, 71, 0, 72, - 143, 196, 73, 74, 199, 200, 201, 202, 0, 203, - 204, 70, 71, 205, 77, 206, 207, 73, 74, 208, - 0, 209, 210, 0, 0, 212, 213, 214, 0, 215, - 0, 0, 0, 217, 218, 0, 219, 0, 220, 0, - 0, 221, 222, 223, 0, 0, 0, 191, 0, 0, - 225, 226, 0, 0, 0, 0, 0, 227, 228, 229, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 236, 0, 237, 0, 0, 238, 239, 240, 241, 0, - 118, 243, 0, 244, 0, 245, 0, 120, 0, 0, - 0, 127, 128, 129, 130, 131, 0, 0, 134, 135, - 224, 0, 249, 0, 0, 0, 0, 252, 0, 0, - 254, 0, 255, 256, 145, 0, 230, 231, 0, 232, - 233, 0, 234, 235, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 242, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 247, 0, 0, 0, 248, 173, 0, 174, - 0, 251, 0, 0, 0, 253, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 60, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 143, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 144, 110, 112, 113, 147, 115, 114, 72, 73, 200, + 201, 202, 266, 75, 126, 212, 128, 130, 132, 129, + 131, 133, 72, 73, 139, 140, 208, 270, 75, 145, + 225, 231, 72, 73, 148, 74, 72, 73, 75, 76, + 72, 73, 75, 152, 154, 155, 75, 109, 156, 232, + 233, 234, 157, 158, 159, 160, 161, 162, 146, 235, + 246, 163, 164, 165, 166, 167, 168, 81, 0, 0, + 169, 170, 171, 172, 173, 174, 0, 175, 176, 0, + 177, 179, 0, 178, 0, 0, 180, 183, 184, 185, + 186, 187, 0, 0, 0, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 0, 0, 205, + 206, 72, 73, 207, 79, 116, 117, 75, 76, 210, + 0, 118, 213, 214, 215, 216, 0, 217, 218, 149, + 150, 219, 0, 220, 221, 151, 0, 222, 0, 223, + 224, 0, 0, 226, 227, 228, 0, 229, 121, 122, + 123, 124, 125, 0, 0, 0, 236, 237, 0, 238, + 0, 239, 0, 0, 240, 241, 242, 0, 0, 0, + 0, 0, 120, 244, 245, 0, 0, 0, 0, 0, + 127, 247, 248, 249, 134, 135, 136, 137, 138, 204, + 0, 141, 142, 0, 256, 0, 257, 0, 0, 0, + 0, 0, 0, 0, 258, 259, 260, 261, 153, 0, + 263, 0, 264, 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 216, 1, 2, 3, 4, + 0, 0, 269, 0, 0, 0, 0, 272, 0, 0, + 274, 0, 275, 276, 0, 0, 0, 0, 243, 0, + 0, 181, 0, 182, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 250, 251, 0, 252, 253, + 0, 254, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 211, 0, 0, 0, 0, 0, + 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 267, 0, 0, + 0, 268, 0, 0, 0, 230, 271, 0, 0, 0, + 273, 0, 0, 0, 0, 277, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 0, 0, 0, 0, 59, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58 + 55, 56, 57, 58, 59, 0, 0, 0, 0, 0, + 60, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }; /* YYCHECK. */ @@ -1675,53 +1686,53 @@ namespace lol { EasyMeshParser::yycheck_[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 67, 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 62, 33, 34, 35, 66, 37, 35, 67, 62, 63, - 62, 63, 64, 45, 68, 47, 48, 49, 47, 48, - 49, 62, 63, 55, 56, 62, 63, 68, 70, 70, - 70, 68, 63, 70, 62, 63, 2, -1, 62, 63, - 68, 73, 74, 75, 68, 69, 78, -1, -1, -1, - 82, 83, 84, 85, 86, 87, -1, -1, -1, 91, - 92, 93, 94, 95, 96, -1, -1, -1, 100, 101, - 102, 103, 104, 105, -1, 107, 108, -1, 110, 111, - -1, 110, -1, -1, 116, -1, -1, -1, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - -1, -1, 134, 135, 62, 63, 62, 63, -1, 65, - 68, 143, 68, 69, 146, 147, 148, 149, -1, 151, - 152, 62, 63, 155, 65, 157, 158, 68, 69, 161, - -1, 163, 164, -1, -1, 167, 168, 169, -1, 171, - -1, -1, -1, 175, 176, -1, 178, -1, 180, -1, - -1, 183, 184, 185, -1, -1, -1, 133, -1, -1, - 192, 193, -1, -1, -1, -1, -1, 199, 200, 201, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 212, -1, 214, -1, -1, 217, 218, 219, 220, -1, - 39, 223, -1, 225, -1, 227, -1, 46, -1, -1, - -1, 50, 51, 52, 53, 54, -1, -1, 57, 58, - 186, -1, 244, -1, -1, -1, -1, 249, -1, -1, - 252, -1, 254, 255, 73, -1, 202, 203, -1, 205, - 206, -1, 208, 209, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 222, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 238, -1, -1, -1, 242, 116, -1, 118, - -1, 247, -1, -1, -1, 251, -1, -1, -1, -1, - 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 143, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 33, 34, 35, 67, 37, 35, 63, 64, 63, + 64, 65, 71, 69, 46, 71, 48, 49, 50, 48, + 49, 50, 63, 64, 56, 57, 68, 71, 69, 63, + 71, 68, 63, 64, 68, 66, 63, 64, 69, 70, + 63, 64, 69, 75, 76, 77, 69, 70, 80, 68, + 68, 68, 84, 85, 86, 87, 88, 89, 65, 68, + 207, 93, 94, 95, 96, 97, 98, 2, -1, -1, + 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, + 112, 113, -1, 112, -1, -1, 118, 121, 122, 123, + 124, 125, -1, -1, -1, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, -1, -1, 141, + 142, 63, 64, 147, 66, 63, 64, 69, 70, 151, + -1, 69, 154, 155, 156, 157, -1, 159, 160, 63, + 64, 163, -1, 165, 166, 69, -1, 169, -1, 171, + 172, -1, -1, 175, 176, 177, -1, 179, 41, 42, + 43, 44, 45, -1, -1, -1, 188, 189, -1, 191, + -1, 193, -1, -1, 196, 197, 198, -1, -1, -1, + -1, -1, 39, 205, 206, -1, -1, -1, -1, -1, + 47, 213, 214, 215, 51, 52, 53, 54, 55, 140, + -1, 58, 59, -1, 226, -1, 228, -1, -1, -1, + -1, -1, -1, -1, 236, 237, 238, 239, 75, -1, + 242, -1, 244, -1, -1, 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 174, 3, 4, 5, 6, + -1, -1, 264, -1, -1, -1, -1, 269, -1, -1, + 272, -1, 274, 275, -1, -1, -1, -1, 199, -1, + -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 216, 217, -1, 219, 220, + -1, 222, 223, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 151, -1, -1, -1, -1, -1, + 241, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 258, -1, -1, + -1, 262, -1, -1, -1, 182, 267, -1, -1, -1, + 271, -1, -1, -1, -1, 276, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, -1, -1, -1, -1, -1, 66, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60 + 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, + 67, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1734,27 +1745,29 @@ namespace lol { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 66, - 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, - 62, 63, 65, 68, 69, 83, 86, 65, 83, 86, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 69, 83, 85, - 83, 83, 85, 83, 62, 63, 68, 84, 84, 83, - 84, 83, 85, 83, 85, 83, 85, 84, 84, 84, - 84, 84, 83, 83, 84, 84, 0, 0, 73, 76, - 73, 62, 63, 68, 83, 84, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 85, 83, 83, 84, 84, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 62, 63, 64, - 87, 87, 83, 83, 67, 79, 83, 84, 70, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 70, 83, 83, 83, 83, 84, 83, 83, 83, - 83, 83, 83, 83, 87, 83, 83, 83, 83, 83, - 87, 87, 87, 87, 87, 87, 83, 83, 83, 83, - 83, 83, 87, 83, 83, 83, 70, 87, 87, 83, - 70, 87, 83, 87, 83, 83, 83, 87 + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 67, 73, 74, 75, 76, 77, 78, 79, 80, 82, + 83, 84, 63, 64, 66, 69, 70, 85, 88, 66, + 85, 88, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 70, + 85, 87, 85, 85, 87, 85, 63, 64, 69, 86, + 86, 80, 80, 80, 80, 80, 85, 86, 85, 87, + 85, 87, 85, 87, 86, 86, 86, 86, 86, 85, + 85, 86, 86, 0, 0, 74, 76, 67, 74, 63, + 64, 69, 85, 86, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 87, 85, + 85, 86, 86, 74, 74, 74, 74, 74, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 63, 64, 65, 89, 89, 85, 85, 74, 68, 81, + 85, 86, 71, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 71, 85, 85, 85, 85, + 86, 68, 68, 68, 68, 68, 85, 85, 85, 85, + 85, 85, 85, 89, 85, 85, 81, 85, 85, 85, + 89, 89, 89, 89, 89, 89, 85, 85, 85, 85, + 85, 85, 89, 85, 85, 85, 71, 89, 89, 85, + 71, 89, 85, 89, 85, 85, 85, 89 }; #if YYDEBUG @@ -1769,8 +1782,8 @@ namespace lol { 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 91, 93, 45, 40, - 41 + 315, 316, 317, 318, 319, 320, 321, 91, 93, 45, + 40, 41 }; #endif @@ -1778,20 +1791,21 @@ namespace lol { const unsigned char EasyMeshParser::yyr1_[] = { - 0, 71, 72, 73, 73, 74, 74, 75, 75, 76, - 76, 76, 76, 77, 77, 77, 77, 77, 78, 79, - 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 83, 83, 83, 83, 84, 84, - 84, 84, 85, 85, 86, 86, 87, 87, 87 + 0, 72, 73, 74, 74, 75, 75, 76, 76, 77, + 77, 77, 77, 77, 78, 78, 78, 78, 78, 79, + 80, 81, 82, 82, 82, 82, 82, 82, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, + 86, 86, 86, 86, 87, 87, 88, 88, 89, 89, + 89 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1799,19 +1813,20 @@ namespace lol { EasyMeshParser::yyr2_[] = { 0, 2, 2, 1, 2, 1, 3, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 5, 2, 2, 5, 2, 2, 2, 2, 2, 4, - 2, 2, 2, 2, 5, 3, 2, 5, 4, 3, - 5, 4, 3, 5, 4, 3, 3, 2, 3, 2, - 3, 2, 5, 4, 3, 5, 4, 3, 5, 4, - 3, 4, 3, 4, 3, 4, 3, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, - 2, 2, 4, 2, 2, 1, 1, 1, 2, 2, - 4, 1, 8, 7, 6, 5, 3, 4, 4, 5, - 4, 2, 3, 2, 5, 3, 3, 5, 3, 3, - 6, 5, 4, 5, 4, 4, 3, 3, 2, 3, - 2, 11, 10, 9, 1, 2, 1, 2, 1, 2, - 1, 2, 3, 5, 3, 6, 1, 1, 1 + 1, 1, 1, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 5, 2, 2, 5, 2, 2, 2, 2, + 2, 4, 2, 2, 2, 2, 5, 3, 2, 5, + 4, 3, 5, 4, 3, 5, 4, 3, 3, 2, + 3, 2, 3, 2, 5, 4, 3, 5, 4, 3, + 5, 4, 3, 4, 3, 4, 3, 4, 3, 3, + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, + 2, 2, 2, 2, 4, 2, 2, 1, 1, 1, + 2, 2, 4, 1, 8, 7, 6, 5, 3, 4, + 4, 5, 4, 2, 3, 2, 5, 3, 3, 5, + 3, 3, 6, 5, 4, 5, 4, 4, 3, 3, + 2, 3, 2, 11, 10, 9, 1, 2, 1, 2, + 1, 2, 1, 2, 3, 5, 3, 6, 1, 1, + 1 }; #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE @@ -1828,16 +1843,16 @@ namespace lol { "T_ROTATEZ", "T_TAPERZ", "T_TWISTZ", "T_SHEARZ", "T_STRETCHZ", "T_BENDZX", "T_BENDZY", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", "T_ROTATE", "T_SCALE", "T_TOGGLESCALEWINDING", "T_RADIALJITTER", - "T_SPLITTRIANGLE", "T_SMOOTHMESH", "T_CSGUNION", "T_CSGSUBSTRACT", - "T_CSGSUBSTRACTLOSS", "T_CSGAND", "T_CSGXOR", "T_CHAMFER", "T_CYLINDER", - "T_BOX", "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", - "T_STAR", "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", - "T_TORUS", "T_ERROR", "F_NUMBER", "I_NUMBER", "BOOLEAN", "COLOR", "'['", - "']'", "'-'", "'('", "')'", "$accept", "mesh_description", - "mesh_expression_list", "mesh_expression", "mesh_command_list", - "mesh_command", "csg_command", "mesh_open", "mesh_close", - "color_command", "transform_command", "primitive_command", "fv", "iv", - "v3", "v4", "bv", 0 + "T_SPLITTRIANGLE", "T_SMOOTHMESH", "T_DUPLICATE", "T_CSGUNION", + "T_CSGSUBSTRACT", "T_CSGSUBSTRACTLOSS", "T_CSGAND", "T_CSGXOR", + "T_CHAMFER", "T_CYLINDER", "T_BOX", "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", + "T_SPHERE", "T_CAPSULE", "T_STAR", "T_EXPANDEDSTAR", "T_DISC", + "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS", "T_ERROR", "F_NUMBER", + "I_NUMBER", "BOOLEAN", "COLOR", "'['", "']'", "'-'", "'('", "')'", + "$accept", "mesh_description", "mesh_expression_list", "mesh_expression", + "mesh_command_list", "mesh_command", "post_brace_command", + "pre_brace_command", "mesh_open", "mesh_close", "color_command", + "transform_command", "primitive_command", "fv", "iv", "v3", "v4", "bv", 0 }; #endif @@ -1846,62 +1861,64 @@ namespace lol { const EasyMeshParser::rhs_number_type EasyMeshParser::yyrhs_[] = { - 72, 0, -1, 73, 0, -1, 74, -1, 74, 73, - -1, 75, -1, 78, 73, 79, -1, 76, -1, 75, - 76, -1, 80, -1, 81, -1, 82, -1, 77, -1, - 42, -1, 43, -1, 44, -1, 45, -1, 46, -1, - 66, -1, 67, -1, 3, 83, 83, 83, 83, -1, - 3, 86, -1, 3, 65, -1, 4, 83, 83, 83, - 83, -1, 4, 86, -1, 4, 65, -1, 5, 83, - -1, 15, 83, -1, 25, 83, -1, 35, 83, 83, - 83, -1, 35, 85, -1, 6, 83, -1, 16, 83, - -1, 26, 83, -1, 36, 83, 83, 83, 83, -1, - 36, 83, 85, -1, 39, 83, -1, 7, 83, 83, - 83, 87, -1, 7, 83, 83, 83, -1, 7, 83, - 83, -1, 17, 83, 83, 83, 87, -1, 17, 83, - 83, 83, -1, 17, 83, 83, -1, 27, 83, 83, - 83, 87, -1, 27, 83, 83, 83, -1, 27, 83, - 83, -1, 8, 83, 83, -1, 8, 83, -1, 18, - 83, 83, -1, 18, 83, -1, 28, 83, 83, -1, - 28, 83, -1, 9, 83, 83, 83, 87, -1, 9, - 83, 83, 83, -1, 9, 83, 83, -1, 19, 83, - 83, 83, 87, -1, 19, 83, 83, 83, -1, 19, - 83, 83, -1, 29, 83, 83, 83, 87, -1, 29, - 83, 83, 83, -1, 29, 83, 83, -1, 10, 83, - 83, 83, -1, 10, 83, 83, -1, 20, 83, 83, - 83, -1, 20, 83, 83, -1, 30, 83, 83, 83, - -1, 30, 83, 83, -1, 11, 83, 83, -1, 11, - 83, -1, 12, 83, 83, -1, 12, 83, -1, 21, - 83, 83, -1, 21, 83, -1, 22, 83, 83, -1, - 22, 83, -1, 31, 83, 83, -1, 31, 83, -1, - 32, 83, 83, -1, 32, 83, -1, 13, 83, -1, - 23, 83, -1, 33, 83, -1, 37, 83, 83, 83, - -1, 37, 85, -1, 37, 83, -1, 14, -1, 24, - -1, 34, -1, 47, 83, -1, 40, 84, -1, 41, - 84, 84, 84, -1, 38, -1, 48, 84, 83, 83, - 83, 87, 87, 87, -1, 48, 84, 83, 83, 83, - 87, 87, -1, 48, 84, 83, 83, 83, 87, -1, - 48, 84, 83, 83, 83, -1, 52, 84, 83, -1, - 53, 84, 83, 83, -1, 60, 84, 83, 83, -1, - 49, 83, 83, 83, 83, -1, 49, 83, 83, 83, - -1, 49, 83, -1, 49, 85, 83, -1, 49, 85, - -1, 50, 83, 83, 83, 83, -1, 50, 83, 83, - -1, 50, 85, 83, -1, 51, 83, 83, 83, 83, - -1, 51, 83, 83, -1, 51, 85, 83, -1, 54, - 84, 83, 83, 87, 87, -1, 54, 84, 83, 83, - 87, -1, 54, 84, 83, 83, -1, 55, 84, 83, - 83, 83, -1, 55, 84, 83, 83, -1, 56, 84, - 83, 87, -1, 56, 84, 83, -1, 57, 83, 87, - -1, 57, 83, -1, 58, 83, 87, -1, 58, 83, - -1, 59, 84, 83, 83, 83, 83, 83, 83, 83, - 83, 87, -1, 59, 84, 83, 83, 83, 83, 83, - 83, 83, 83, -1, 59, 84, 83, 83, 83, 83, - 83, 83, 83, -1, 62, -1, 68, 83, -1, 63, - -1, 68, 84, -1, 63, -1, 68, 84, -1, 62, - -1, 68, 83, -1, 69, 83, 70, -1, 69, 83, - 83, 83, 70, -1, 69, 83, 70, -1, 69, 83, - 83, 83, 83, 70, -1, 64, -1, 63, -1, 62, - -1 + 73, 0, -1, 74, 0, -1, 75, -1, 75, 74, + -1, 76, -1, 80, 74, 81, -1, 77, -1, 77, + 76, -1, 82, -1, 83, -1, 84, -1, 78, -1, + 79, 67, 74, 81, -1, 43, 80, 74, 68, -1, + 44, 80, 74, 68, -1, 45, 80, 74, 68, -1, + 46, 80, 74, 68, -1, 47, 80, 74, 68, -1, + 42, -1, 67, -1, 68, -1, 3, 85, 85, 85, + 85, -1, 3, 88, -1, 3, 66, -1, 4, 85, + 85, 85, 85, -1, 4, 88, -1, 4, 66, -1, + 5, 85, -1, 15, 85, -1, 25, 85, -1, 35, + 85, 85, 85, -1, 35, 87, -1, 6, 85, -1, + 16, 85, -1, 26, 85, -1, 36, 85, 85, 85, + 85, -1, 36, 85, 87, -1, 39, 85, -1, 7, + 85, 85, 85, 89, -1, 7, 85, 85, 85, -1, + 7, 85, 85, -1, 17, 85, 85, 85, 89, -1, + 17, 85, 85, 85, -1, 17, 85, 85, -1, 27, + 85, 85, 85, 89, -1, 27, 85, 85, 85, -1, + 27, 85, 85, -1, 8, 85, 85, -1, 8, 85, + -1, 18, 85, 85, -1, 18, 85, -1, 28, 85, + 85, -1, 28, 85, -1, 9, 85, 85, 85, 89, + -1, 9, 85, 85, 85, -1, 9, 85, 85, -1, + 19, 85, 85, 85, 89, -1, 19, 85, 85, 85, + -1, 19, 85, 85, -1, 29, 85, 85, 85, 89, + -1, 29, 85, 85, 85, -1, 29, 85, 85, -1, + 10, 85, 85, 85, -1, 10, 85, 85, -1, 20, + 85, 85, 85, -1, 20, 85, 85, -1, 30, 85, + 85, 85, -1, 30, 85, 85, -1, 11, 85, 85, + -1, 11, 85, -1, 12, 85, 85, -1, 12, 85, + -1, 21, 85, 85, -1, 21, 85, -1, 22, 85, + 85, -1, 22, 85, -1, 31, 85, 85, -1, 31, + 85, -1, 32, 85, 85, -1, 32, 85, -1, 13, + 85, -1, 23, 85, -1, 33, 85, -1, 37, 85, + 85, 85, -1, 37, 87, -1, 37, 85, -1, 14, + -1, 24, -1, 34, -1, 48, 85, -1, 40, 86, + -1, 41, 86, 86, 86, -1, 38, -1, 49, 86, + 85, 85, 85, 89, 89, 89, -1, 49, 86, 85, + 85, 85, 89, 89, -1, 49, 86, 85, 85, 85, + 89, -1, 49, 86, 85, 85, 85, -1, 53, 86, + 85, -1, 54, 86, 85, 85, -1, 61, 86, 85, + 85, -1, 50, 85, 85, 85, 85, -1, 50, 85, + 85, 85, -1, 50, 85, -1, 50, 87, 85, -1, + 50, 87, -1, 51, 85, 85, 85, 85, -1, 51, + 85, 85, -1, 51, 87, 85, -1, 52, 85, 85, + 85, 85, -1, 52, 85, 85, -1, 52, 87, 85, + -1, 55, 86, 85, 85, 89, 89, -1, 55, 86, + 85, 85, 89, -1, 55, 86, 85, 85, -1, 56, + 86, 85, 85, 85, -1, 56, 86, 85, 85, -1, + 57, 86, 85, 89, -1, 57, 86, 85, -1, 58, + 85, 89, -1, 58, 85, -1, 59, 85, 89, -1, + 59, 85, -1, 60, 86, 85, 85, 85, 85, 85, + 85, 85, 85, 89, -1, 60, 86, 85, 85, 85, + 85, 85, 85, 85, 85, -1, 60, 86, 85, 85, + 85, 85, 85, 85, 85, -1, 63, -1, 69, 85, + -1, 64, -1, 69, 86, -1, 64, -1, 69, 86, + -1, 63, -1, 69, 85, -1, 70, 85, 71, -1, + 70, 85, 85, 85, 71, -1, 70, 85, 71, -1, + 70, 85, 85, 85, 85, 71, -1, 65, -1, 64, + -1, 63, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -1910,39 +1927,41 @@ namespace lol { EasyMeshParser::yyprhs_[] = { 0, 0, 3, 6, 8, 11, 13, 17, 19, 22, - 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, - 44, 50, 53, 56, 62, 65, 68, 71, 74, 77, - 82, 85, 88, 91, 94, 100, 104, 107, 113, 118, - 122, 128, 133, 137, 143, 148, 152, 156, 159, 163, - 166, 170, 173, 179, 184, 188, 194, 199, 203, 209, - 214, 218, 223, 227, 232, 236, 241, 245, 249, 252, - 256, 259, 263, 266, 270, 273, 277, 280, 284, 287, - 290, 293, 296, 301, 304, 307, 309, 311, 313, 316, - 319, 324, 326, 335, 343, 350, 356, 360, 365, 370, - 376, 381, 384, 388, 391, 397, 401, 405, 411, 415, - 419, 426, 432, 437, 443, 448, 453, 457, 461, 464, - 468, 471, 483, 494, 504, 506, 509, 511, 514, 516, - 519, 521, 524, 528, 534, 538, 545, 547, 549 + 24, 26, 28, 30, 35, 40, 45, 50, 55, 60, + 62, 64, 66, 72, 75, 78, 84, 87, 90, 93, + 96, 99, 104, 107, 110, 113, 116, 122, 126, 129, + 135, 140, 144, 150, 155, 159, 165, 170, 174, 178, + 181, 185, 188, 192, 195, 201, 206, 210, 216, 221, + 225, 231, 236, 240, 245, 249, 254, 258, 263, 267, + 271, 274, 278, 281, 285, 288, 292, 295, 299, 302, + 306, 309, 312, 315, 318, 323, 326, 329, 331, 333, + 335, 338, 341, 346, 348, 357, 365, 372, 378, 382, + 387, 392, 398, 403, 406, 410, 413, 419, 423, 427, + 433, 437, 441, 448, 454, 459, 465, 470, 475, 479, + 483, 486, 490, 493, 505, 516, 526, 528, 531, 533, + 536, 538, 541, 543, 546, 550, 556, 560, 567, 569, + 571 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ const unsigned short int EasyMeshParser::yyrline_[] = { - 0, 91, 91, 95, 96, 100, 101, 105, 106, 110, - 111, 112, 113, 117, 118, 119, 120, 121, 125, 129, - 133, 134, 135, 138, 139, 140, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 251, 252, 253, 254, 258, 259, - 260, 261, 266, 267, 271, 272, 277, 278, 279 + 0, 93, 93, 97, 98, 102, 103, 107, 108, 112, + 113, 114, 115, 116, 120, 121, 122, 123, 124, 128, + 132, 136, 140, 141, 142, 145, 146, 147, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 258, 259, 260, 261, + 265, 266, 267, 268, 273, 274, 278, 279, 284, 285, + 286 }; // Print the state stack on the debug stream. @@ -1986,12 +2005,12 @@ namespace lol { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 69, 70, 2, 2, 2, 68, 2, 2, 2, 2, + 70, 71, 2, 2, 2, 69, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 66, 2, 67, 2, 2, 2, 2, 2, 2, + 2, 67, 2, 68, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -2014,7 +2033,7 @@ namespace lol { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65 + 65, 66 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -2023,26 +2042,26 @@ namespace lol { } const int EasyMeshParser::yyeof_ = 0; - const int EasyMeshParser::yylast_ = 477; - const int EasyMeshParser::yynnts_ = 17; + const int EasyMeshParser::yylast_ = 479; + const int EasyMeshParser::yynnts_ = 18; const int EasyMeshParser::yyempty_ = -2; - const int EasyMeshParser::yyfinal_ = 136; + const int EasyMeshParser::yyfinal_ = 143; const int EasyMeshParser::yyterror_ = 1; const int EasyMeshParser::yyerrcode_ = 256; - const int EasyMeshParser::yyntokens_ = 71; + const int EasyMeshParser::yyntokens_ = 72; - const unsigned int EasyMeshParser::yyuser_token_number_max_ = 320; + const unsigned int EasyMeshParser::yyuser_token_number_max_ = 321; const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; } // lol /* Line 1053 of lalr1.cc */ -#line 2042 "generated/easymesh-parser.cpp" +#line 2061 "generated/easymesh-parser.cpp" /* Line 1055 of lalr1.cc */ -#line 282 "easymesh/easymesh-parser.y" +#line 289 "easymesh/easymesh-parser.y" void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l, diff --git a/src/generated/easymesh-parser.h b/src/generated/easymesh-parser.h index eda93f74..de064e6e 100644 --- a/src/generated/easymesh-parser.h +++ b/src/generated/easymesh-parser.h @@ -116,13 +116,14 @@ namespace lol { bool bval; float vval[4]; int ivval[4]; + char* lval; /* Can't use uin32_t here for some reason */ unsigned u32val; /* Line 34 of lalr1.cc */ -#line 126 "generated/easymesh-parser.h" +#line 127 "generated/easymesh-parser.h" }; #else typedef YYSTYPE semantic_type; @@ -174,30 +175,31 @@ namespace lol { T_RADIALJITTER = 294, T_SPLITTRIANGLE = 295, T_SMOOTHMESH = 296, - T_CSGUNION = 297, - T_CSGSUBSTRACT = 298, - T_CSGSUBSTRACTLOSS = 299, - T_CSGAND = 300, - T_CSGXOR = 301, - T_CHAMFER = 302, - T_CYLINDER = 303, - T_BOX = 304, - T_SMOOTHCHAMFBOX = 305, - T_FLATCHAMFBOX = 306, - T_SPHERE = 307, - T_CAPSULE = 308, - T_STAR = 309, - T_EXPANDEDSTAR = 310, - T_DISC = 311, - T_TRIANGLE = 312, - T_QUAD = 313, - T_COG = 314, - T_TORUS = 315, - T_ERROR = 316, - F_NUMBER = 317, - I_NUMBER = 318, - BOOLEAN = 319, - COLOR = 320 + T_DUPLICATE = 297, + T_CSGUNION = 298, + T_CSGSUBSTRACT = 299, + T_CSGSUBSTRACTLOSS = 300, + T_CSGAND = 301, + T_CSGXOR = 302, + T_CHAMFER = 303, + T_CYLINDER = 304, + T_BOX = 305, + T_SMOOTHCHAMFBOX = 306, + T_FLATCHAMFBOX = 307, + T_SPHERE = 308, + T_CAPSULE = 309, + T_STAR = 310, + T_EXPANDEDSTAR = 311, + T_DISC = 312, + T_TRIANGLE = 313, + T_QUAD = 314, + T_COG = 315, + T_TORUS = 316, + T_ERROR = 317, + F_NUMBER = 318, + I_NUMBER = 319, + BOOLEAN = 320, + COLOR = 321 }; }; @@ -371,7 +373,7 @@ namespace lol { } // lol /* Line 34 of lalr1.cc */ -#line 375 "generated/easymesh-parser.h" +#line 377 "generated/easymesh-parser.h" diff --git a/src/generated/easymesh-scanner.cpp b/src/generated/easymesh-scanner.cpp index c2b5630b..c7ea9c08 100644 --- a/src/generated/easymesh-scanner.cpp +++ b/src/generated/easymesh-scanner.cpp @@ -330,8 +330,8 @@ typedef unsigned char YY_CHAR; *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 76 -#define YY_END_OF_BUFFER 77 +#define YY_NUM_RULES 79 +#define YY_END_OF_BUFFER 80 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -339,42 +339,43 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[306] = +static yyconst flex_int16_t yy_accept[312] = { 0, - 0, 0, 77, 75, 74, 73, 75, 69, 70, 75, - 68, 75, 75, 66, 71, 72, 75, 75, 75, 75, - 75, 16, 39, 12, 0, 0, 66, 65, 67, 50, - 46, 55, 0, 0, 57, 53, 56, 0, 0, 43, - 0, 0, 0, 40, 41, 42, 0, 17, 0, 13, - 14, 15, 7, 0, 0, 0, 0, 0, 36, 37, - 38, 0, 0, 0, 0, 9, 10, 11, 0, 0, - 67, 0, 58, 0, 54, 0, 0, 0, 49, 0, + 0, 0, 80, 78, 77, 76, 78, 70, 71, 78, + 69, 78, 78, 67, 78, 74, 75, 78, 78, 78, + 78, 78, 78, 16, 39, 12, 72, 73, 0, 0, + 67, 66, 68, 0, 51, 47, 56, 0, 0, 58, + 54, 57, 0, 0, 43, 0, 0, 0, 0, 40, + 41, 42, 0, 17, 0, 13, 14, 15, 7, 0, + 0, 0, 0, 0, 36, 37, 38, 0, 0, 0, + 0, 9, 10, 11, 0, 0, 68, 0, 0, 59, + 0, 55, 0, 0, 0, 50, 0, 0, 0, 0, + 0, 0, 46, 0, 0, 0, 0, 0, 8, 0, + + 0, 24, 25, 26, 0, 0, 0, 0, 27, 28, + 29, 0, 18, 19, 20, 0, 0, 6, 0, 21, + 22, 23, 60, 0, 66, 0, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 52, 48, 30, 31, + 32, 33, 34, 35, 0, 0, 4, 2, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 0, 0, 24, 25, 26, 0, 0, 0, 0, - - 27, 28, 29, 0, 18, 19, 20, 0, 0, 6, - 0, 21, 22, 23, 59, 0, 65, 48, 0, 0, - 0, 0, 0, 0, 0, 0, 52, 51, 47, 30, - 31, 32, 33, 34, 35, 0, 0, 4, 2, 1, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 0, 44, 0, 0, 0, 63, 0, 60, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, - 0, 64, 0, 0, 0, 39, 0, 0, 0, 0, + 45, 0, 44, 0, 0, 0, 64, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 65, 0, 0, 0, 39, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, - 0, 5, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 61, 0, 0, 55, 0, 0, 0, 0, 53, - 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 5, 0, 0, 0, 16, 0, 0, 0, + 0, 0, 0, 62, 0, 0, 56, 0, 0, 0, + 0, 54, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 7, 0, 0, 62, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, - 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 7, 0, 0, + 63, 0, 0, 0, 0, 0, 0, 46, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 0, 0, 0, 57, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -385,14 +386,14 @@ static yyconst flex_int32_t yy_ec[256] = 1, 3, 1, 1, 4, 1, 1, 1, 1, 5, 6, 1, 7, 3, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, - 1, 1, 1, 1, 12, 12, 12, 12, 13, 12, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 14, 1, 15, 1, 1, 1, 16, 17, 18, 19, - - 20, 21, 22, 23, 24, 25, 1, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 1, 36, 37, - 38, 39, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 12, 12, 13, 12, 14, 12, + 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, + 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, + 17, 1, 18, 1, 1, 1, 19, 20, 21, 22, + + 23, 24, 25, 26, 27, 28, 1, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 1, 39, 40, + 41, 42, 43, 1, 44, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -409,190 +410,193 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[40] = +static yyconst flex_int32_t yy_meta[45] = { 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 + 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[315] = +static yyconst flex_int16_t yy_base[321] = { 0, - 0, 0, 378, 379, 379, 379, 0, 379, 379, 31, - 32, 366, 366, 35, 379, 379, 30, 33, 22, 359, - 30, 54, 76, 100, 0, 363, 47, 46, 0, 379, - 49, 354, 339, 353, 379, 42, 341, 36, 341, 352, - 345, 340, 333, 379, 379, 379, 345, 379, 329, 379, - 379, 379, 60, 328, 70, 51, 335, 49, 379, 379, - 379, 81, 62, 324, 88, 379, 379, 379, 0, 93, - 0, 329, 379, 123, 379, 341, 340, 333, 379, 83, - 45, 86, 336, 327, 112, 320, 320, 327, 334, 323, - 379, 112, 332, 379, 379, 379, 318, 323, 71, 325, - - 379, 379, 379, 324, 379, 379, 379, 315, 322, 379, - 308, 379, 379, 379, 0, 329, 328, 379, 309, 130, - 313, 299, 309, 299, 121, 102, 379, 379, 379, 379, - 379, 379, 379, 379, 379, 123, 312, 304, 63, 303, - 301, 309, 299, 311, 292, 305, 306, 294, 290, 287, - 379, 286, 379, 285, 286, 284, 379, 282, 0, 278, - 284, 291, 286, 278, 280, 293, 292, 278, 283, 289, - 272, 279, 114, 126, 129, 282, 282, 379, 283, 275, - 266, 379, 265, 270, 275, 133, 265, 267, 136, 269, - 257, 272, 139, 263, 142, 0, 255, 263, 268, 269, - - 250, 264, 253, 261, 248, 244, 262, 245, 379, 243, - 246, 379, 145, 249, 148, 249, 246, 242, 238, 246, - 252, 0, 232, 238, 379, 237, 246, 229, 230, 379, - 228, 232, 379, 225, 230, 233, 228, 226, 222, 229, - 151, 218, 0, 225, 231, 230, 225, 224, 226, 223, - 212, 379, 209, 223, 209, 379, 224, 219, 379, 218, - 217, 216, 219, 216, 207, 216, 197, 206, 201, 154, - 196, 208, 199, 202, 204, 205, 202, 193, 198, 379, - 186, 197, 201, 379, 182, 183, 192, 187, 178, 194, - 183, 183, 188, 191, 177, 184, 175, 171, 165, 184, - - 167, 170, 165, 160, 379, 192, 161, 193, 155, 147, - 132, 114, 99, 59 + 0, 0, 385, 386, 386, 386, 0, 386, 386, 36, + 37, 373, 373, 40, 346, 386, 386, 32, 35, 24, + 343, 361, 32, 43, 65, 89, 386, 386, 0, 368, + 52, 53, 0, 353, 386, 62, 355, 340, 354, 386, + 44, 342, 38, 342, 353, 346, 337, 340, 333, 386, + 386, 386, 345, 386, 329, 386, 386, 386, 70, 328, + 59, 60, 335, 69, 386, 386, 386, 79, 75, 324, + 76, 386, 386, 386, 0, 115, 0, 346, 328, 386, + 112, 386, 340, 339, 332, 386, 73, 97, 100, 335, + 326, 119, 326, 318, 318, 325, 332, 321, 386, 122, + + 330, 386, 386, 386, 316, 321, 117, 323, 386, 386, + 386, 322, 386, 386, 386, 313, 320, 386, 306, 386, + 386, 386, 0, 330, 329, 301, 386, 306, 126, 310, + 296, 306, 296, 123, 61, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 110, 309, 301, 302, 299, 297, + 301, 304, 294, 306, 287, 300, 301, 289, 285, 282, + 386, 281, 386, 280, 281, 279, 386, 277, 0, 293, + 272, 278, 285, 280, 272, 274, 287, 286, 272, 277, + 283, 266, 273, 120, 123, 128, 276, 276, 386, 270, + 261, 274, 386, 259, 264, 269, 131, 259, 261, 134, + + 263, 251, 266, 137, 257, 140, 0, 270, 248, 256, + 261, 262, 243, 257, 246, 254, 241, 237, 255, 238, + 386, 240, 386, 252, 143, 242, 146, 242, 239, 235, + 231, 239, 245, 0, 225, 231, 386, 230, 239, 222, + 223, 386, 221, 225, 386, 224, 217, 226, 221, 219, + 215, 222, 149, 211, 0, 218, 224, 223, 218, 217, + 219, 216, 386, 217, 202, 216, 202, 386, 217, 212, + 386, 211, 210, 209, 212, 209, 200, 386, 191, 200, + 195, 152, 190, 202, 193, 196, 198, 197, 188, 193, + 386, 181, 192, 196, 386, 179, 188, 183, 174, 190, + + 179, 185, 188, 174, 181, 169, 163, 182, 169, 160, + 386, 196, 195, 194, 193, 163, 161, 144, 124, 67 } ; -static yyconst flex_int16_t yy_def[315] = +static yyconst flex_int16_t yy_def[321] = { 0, - 305, 1, 305, 305, 305, 305, 306, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 307, 305, 305, 305, 308, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 309, 305, - 308, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 310, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 311, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 312, 305, 305, 305, 305, - - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 313, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 314, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305, 0, 305, 305, 305, 305, 305, - 305, 305, 305, 305 + 311, 1, 311, 311, 311, 311, 312, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 313, 311, + 311, 311, 314, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 315, 311, 314, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 316, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 317, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + + 311, 311, 311, 311, 311, 311, 318, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 319, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 320, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 0, 311, 311, 311, 311, 311, 311, 311, 311, 311 } ; -static yyconst flex_int16_t yy_nxt[419] = +static yyconst flex_int16_t yy_nxt[431] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 4, 4, 15, 16, 17, 18, 19, 4, 4, - 20, 4, 4, 4, 4, 4, 21, 4, 4, 4, - 4, 22, 23, 24, 4, 4, 4, 4, 4, 26, - 26, 27, 27, 26, 40, 27, 30, 31, 32, 33, - 34, 38, 39, 43, 41, 26, 28, 27, 70, 77, - 35, 259, 36, 37, 72, 70, 44, 45, 46, 47, - 73, 78, 80, 81, 82, 90, 91, 108, 48, 97, - 100, 132, 49, 133, 98, 101, 102, 103, 178, 93, - 50, 51, 52, 53, 152, 54, 109, 179, 55, 116, - - 116, 243, 56, 117, 153, 57, 94, 95, 96, 58, - 104, 111, 59, 60, 61, 62, 222, 105, 106, 107, - 130, 131, 134, 135, 112, 113, 114, 138, 147, 148, - 171, 63, 64, 172, 196, 65, 66, 67, 68, 119, - 120, 121, 122, 123, 139, 161, 140, 168, 141, 159, - 169, 130, 131, 124, 170, 125, 126, 115, 162, 173, - 174, 175, 132, 69, 133, 134, 135, 163, 216, 59, - 60, 61, 94, 95, 96, 105, 106, 107, 112, 113, - 114, 44, 45, 46, 50, 51, 52, 101, 102, 103, - 66, 67, 68, 71, 25, 71, 128, 178, 304, 303, - - 302, 127, 75, 301, 300, 299, 298, 153, 297, 296, - 295, 294, 293, 110, 48, 292, 291, 290, 289, 288, - 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, - 277, 276, 275, 274, 273, 272, 271, 118, 270, 269, - 91, 268, 267, 266, 265, 129, 264, 263, 262, 261, - 260, 258, 257, 256, 255, 254, 253, 252, 251, 250, - 79, 249, 248, 247, 246, 245, 244, 242, 241, 240, - 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, - 229, 228, 35, 227, 226, 225, 224, 223, 221, 220, - 219, 151, 218, 217, 215, 214, 213, 212, 211, 210, - - 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, - 199, 198, 73, 197, 30, 195, 194, 193, 192, 191, - 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, - 180, 177, 176, 167, 166, 165, 164, 160, 117, 117, - 158, 157, 156, 155, 154, 151, 150, 149, 146, 145, - 144, 143, 142, 137, 136, 129, 128, 127, 118, 110, - 99, 92, 89, 88, 87, 86, 85, 84, 83, 79, - 76, 75, 74, 28, 42, 29, 28, 305, 3, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305 + 14, 4, 15, 4, 4, 4, 16, 17, 18, 19, + 20, 21, 4, 22, 4, 4, 4, 4, 4, 23, + 4, 4, 4, 4, 24, 25, 26, 4, 4, 4, + 4, 4, 27, 28, 30, 30, 31, 31, 30, 45, + 31, 35, 36, 37, 38, 39, 43, 44, 49, 46, + 30, 53, 31, 32, 84, 40, 76, 41, 42, 271, + 54, 50, 51, 52, 55, 76, 85, 87, 88, 89, + 79, 101, 56, 57, 58, 59, 80, 60, 98, 99, + 61, 105, 182, 116, 62, 183, 106, 63, 102, 103, + + 104, 64, 119, 108, 65, 66, 67, 68, 109, 110, + 111, 112, 117, 139, 140, 120, 121, 122, 113, 114, + 115, 124, 124, 69, 70, 125, 255, 71, 72, 73, + 74, 128, 129, 130, 131, 132, 141, 147, 142, 143, + 144, 157, 158, 162, 172, 133, 234, 134, 135, 184, + 185, 186, 179, 163, 148, 180, 149, 173, 150, 181, + 139, 140, 141, 207, 142, 169, 174, 143, 144, 228, + 65, 66, 67, 102, 103, 104, 113, 114, 115, 120, + 121, 122, 50, 51, 52, 56, 57, 58, 109, 110, + 111, 72, 73, 74, 77, 123, 77, 75, 29, 137, + + 310, 309, 136, 82, 308, 307, 306, 163, 305, 304, + 303, 302, 118, 54, 301, 300, 299, 298, 297, 296, + 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, + 285, 284, 283, 127, 282, 281, 99, 280, 279, 278, + 277, 138, 276, 275, 274, 273, 272, 270, 269, 268, + 267, 266, 265, 264, 263, 262, 86, 261, 260, 259, + 258, 257, 256, 254, 253, 252, 251, 250, 249, 248, + 247, 246, 245, 244, 243, 242, 241, 240, 40, 239, + 238, 237, 236, 235, 189, 233, 232, 231, 161, 230, + 229, 227, 226, 225, 224, 223, 222, 221, 220, 219, + + 218, 217, 216, 215, 214, 213, 212, 211, 210, 80, + 209, 35, 208, 206, 205, 204, 203, 202, 201, 200, + 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, + 189, 188, 187, 178, 177, 176, 175, 171, 170, 125, + 125, 168, 167, 166, 165, 164, 161, 160, 159, 156, + 155, 154, 153, 152, 151, 146, 145, 138, 137, 136, + 127, 126, 118, 107, 100, 97, 96, 95, 94, 93, + 92, 91, 90, 86, 83, 82, 81, 78, 32, 48, + 47, 34, 33, 32, 311, 3, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311 } ; -static yyconst flex_int16_t yy_chk[419] = +static yyconst flex_int16_t yy_chk[431] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, - 11, 10, 11, 14, 19, 14, 17, 17, 17, 17, - 17, 18, 18, 21, 19, 27, 28, 27, 28, 36, - 17, 314, 17, 17, 31, 28, 21, 21, 21, 22, - 31, 36, 38, 38, 38, 53, 53, 63, 22, 56, - 58, 81, 22, 81, 56, 58, 58, 58, 139, 55, - 22, 22, 22, 23, 99, 23, 63, 139, 23, 70, - - 70, 313, 23, 70, 99, 23, 55, 55, 55, 23, - 62, 65, 23, 23, 23, 24, 312, 62, 62, 62, - 80, 80, 82, 82, 65, 65, 65, 85, 92, 92, - 126, 24, 24, 126, 311, 24, 24, 24, 24, 74, - 74, 74, 74, 74, 85, 120, 85, 125, 85, 310, - 125, 173, 173, 74, 125, 74, 74, 309, 120, 136, - 136, 136, 174, 307, 174, 175, 175, 120, 186, 186, - 186, 186, 189, 189, 189, 193, 193, 193, 195, 195, - 195, 213, 213, 213, 215, 215, 215, 241, 241, 241, - 270, 270, 270, 308, 306, 308, 304, 303, 302, 301, - - 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, - 290, 289, 288, 287, 286, 285, 283, 282, 281, 279, - 278, 277, 276, 275, 274, 273, 272, 271, 269, 268, - 267, 266, 265, 264, 263, 262, 261, 260, 258, 257, - 255, 254, 253, 251, 250, 249, 248, 247, 246, 245, - 244, 242, 240, 239, 238, 237, 236, 235, 234, 232, - 231, 229, 228, 227, 226, 224, 223, 221, 220, 219, - 218, 217, 216, 214, 211, 210, 208, 207, 206, 205, - 204, 203, 202, 201, 200, 199, 198, 197, 194, 192, - 191, 190, 188, 187, 185, 184, 183, 181, 180, 179, - - 177, 176, 172, 171, 170, 169, 168, 167, 166, 165, - 164, 163, 162, 161, 160, 158, 156, 155, 154, 152, - 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, - 140, 138, 137, 124, 123, 122, 121, 119, 117, 116, - 111, 109, 108, 104, 100, 98, 97, 93, 90, 89, - 88, 87, 86, 84, 83, 78, 77, 76, 72, 64, - 57, 54, 49, 47, 43, 42, 41, 40, 39, 37, - 34, 33, 32, 26, 20, 13, 12, 3, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 10, 11, 10, 11, 14, 20, + 14, 18, 18, 18, 18, 18, 19, 19, 23, 20, + 31, 24, 31, 32, 41, 18, 32, 18, 18, 320, + 24, 23, 23, 23, 24, 32, 41, 43, 43, 43, + 36, 61, 24, 24, 24, 25, 36, 25, 59, 59, + 25, 62, 135, 69, 25, 135, 62, 25, 61, 61, + + 61, 25, 71, 64, 25, 25, 25, 26, 64, 64, + 64, 68, 69, 87, 87, 71, 71, 71, 68, 68, + 68, 76, 76, 26, 26, 76, 319, 26, 26, 26, + 26, 81, 81, 81, 81, 81, 88, 92, 88, 89, + 89, 100, 100, 107, 129, 81, 318, 81, 81, 145, + 145, 145, 134, 107, 92, 134, 92, 129, 92, 134, + 184, 184, 185, 317, 185, 316, 129, 186, 186, 197, + 197, 197, 197, 200, 200, 200, 204, 204, 204, 206, + 206, 206, 225, 225, 225, 227, 227, 227, 253, 253, + 253, 282, 282, 282, 314, 315, 314, 313, 312, 310, + + 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, + 299, 298, 297, 296, 294, 293, 292, 290, 289, 288, + 287, 286, 285, 284, 283, 281, 280, 279, 277, 276, + 275, 274, 273, 272, 270, 269, 267, 266, 265, 264, + 262, 261, 260, 259, 258, 257, 256, 254, 252, 251, + 250, 249, 248, 247, 246, 244, 243, 241, 240, 239, + 238, 236, 235, 233, 232, 231, 230, 229, 228, 226, + 224, 222, 220, 219, 218, 217, 216, 215, 214, 213, + 212, 211, 210, 209, 208, 205, 203, 202, 201, 199, + 198, 196, 195, 194, 192, 191, 190, 188, 187, 183, + + 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, + 172, 171, 170, 168, 166, 165, 164, 162, 160, 159, + 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, + 148, 147, 146, 133, 132, 131, 130, 128, 126, 125, + 124, 119, 117, 116, 112, 108, 106, 105, 101, 98, + 97, 96, 95, 94, 93, 91, 90, 85, 84, 83, + 79, 78, 70, 63, 60, 55, 53, 49, 48, 47, + 46, 45, 44, 42, 39, 38, 37, 34, 30, 22, + 21, 15, 13, 12, 3, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311 } ; /* The intent behind this definition is that it'll catch @@ -641,7 +645,7 @@ typedef lol::EasyMeshParser::token_type token_type; #define yyterminate() return token::T_END #define YY_NO_UNISTD_H #define YY_USER_ACTION yylloc->columns(yyleng); -#line 645 "generated/easymesh-scanner.cpp" +#line 649 "generated/easymesh-scanner.cpp" #define INITIAL 0 @@ -753,7 +757,7 @@ YY_DECL yylloc->step(); -#line 757 "generated/easymesh-scanner.cpp" +#line 761 "generated/easymesh-scanner.cpp" if ( !(yy_init) ) { @@ -806,13 +810,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 312 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 305 ); + while ( yy_current_state != 311 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1059,74 +1063,79 @@ YY_RULE_SETUP YY_BREAK case 46: YY_RULE_SETUP -#line 98 "easymesh/easymesh-scanner.l" -{ return token::T_CYLINDER; } +#line 97 "easymesh/easymesh-scanner.l" +{ return token::T_DUPLICATE; } YY_BREAK case 47: YY_RULE_SETUP #line 99 "easymesh/easymesh-scanner.l" -{ return token::T_SPHERE; } +{ return token::T_CYLINDER; } YY_BREAK case 48: YY_RULE_SETUP #line 100 "easymesh/easymesh-scanner.l" -{ return token::T_CAPSULE; } +{ return token::T_SPHERE; } YY_BREAK case 49: YY_RULE_SETUP #line 101 "easymesh/easymesh-scanner.l" -{ return token::T_TORUS; } +{ return token::T_CAPSULE; } YY_BREAK case 50: YY_RULE_SETUP #line 102 "easymesh/easymesh-scanner.l" -{ return token::T_BOX; } +{ return token::T_TORUS; } YY_BREAK case 51: YY_RULE_SETUP #line 103 "easymesh/easymesh-scanner.l" -{ return token::T_SMOOTHCHAMFBOX; } +{ return token::T_BOX; } YY_BREAK case 52: YY_RULE_SETUP #line 104 "easymesh/easymesh-scanner.l" -{ return token::T_FLATCHAMFBOX; } +{ return token::T_SMOOTHCHAMFBOX; } YY_BREAK case 53: YY_RULE_SETUP #line 105 "easymesh/easymesh-scanner.l" -{ return token::T_STAR; } +{ return token::T_FLATCHAMFBOX; } YY_BREAK case 54: YY_RULE_SETUP #line 106 "easymesh/easymesh-scanner.l" -{ return token::T_EXPANDEDSTAR; } +{ return token::T_STAR; } YY_BREAK case 55: YY_RULE_SETUP #line 107 "easymesh/easymesh-scanner.l" -{ return token::T_DISC; } +{ return token::T_EXPANDEDSTAR; } YY_BREAK case 56: YY_RULE_SETUP #line 108 "easymesh/easymesh-scanner.l" -{ return token::T_TRIANGLE; } +{ return token::T_DISC; } YY_BREAK case 57: YY_RULE_SETUP #line 109 "easymesh/easymesh-scanner.l" -{ return token::T_QUAD; } +{ return token::T_TRIANGLE; } YY_BREAK case 58: YY_RULE_SETUP #line 110 "easymesh/easymesh-scanner.l" +{ return token::T_QUAD; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 111 "easymesh/easymesh-scanner.l" { return token::T_COG; } YY_BREAK /* ======= BASE COLOR TYPES ========================================= */ /* COLOR */ -case 59: +case 60: YY_RULE_SETUP -#line 114 "easymesh/easymesh-scanner.l" +#line 115 "easymesh/easymesh-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 8) @@ -1135,9 +1144,9 @@ YY_RULE_SETUP | 0x000000ffu; return token::COLOR; } YY_BREAK -case 60: +case 61: YY_RULE_SETUP -#line 121 "easymesh/easymesh-scanner.l" +#line 122 "easymesh/easymesh-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 12) @@ -1146,101 +1155,111 @@ YY_RULE_SETUP | 0x00000011u * (tmp & 0xf); return token::COLOR; } YY_BREAK -case 61: +case 62: YY_RULE_SETUP -#line 128 "easymesh/easymesh-scanner.l" +#line 129 "easymesh/easymesh-scanner.l" { yylval->u32val = 0xffu | 0x100u * (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 132 "easymesh/easymesh-scanner.l" +#line 133 "easymesh/easymesh-scanner.l" { yylval->u32val = (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK /* ======= BASE DATA TYPES ========================================= */ /* BOOL */ -case 63: +case 64: YY_RULE_SETUP -#line 138 "easymesh/easymesh-scanner.l" +#line 139 "easymesh/easymesh-scanner.l" { yylval->bval = true; return token::BOOLEAN; } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 139 "easymesh/easymesh-scanner.l" +#line 140 "easymesh/easymesh-scanner.l" { yylval->bval = false; return token::BOOLEAN; } YY_BREAK /* FLOAT */ -case 65: +case 66: YY_RULE_SETUP -#line 141 "easymesh/easymesh-scanner.l" +#line 142 "easymesh/easymesh-scanner.l" { yylval->fval = (float)std::atof(yytext); return token::F_NUMBER; } YY_BREAK /* INT */ -case 66: +case 67: YY_RULE_SETUP -#line 144 "easymesh/easymesh-scanner.l" +#line 145 "easymesh/easymesh-scanner.l" { yylval->ival = std::atoi(yytext); return token::I_NUMBER; } YY_BREAK /* ======= COMMENTS ======= */ -case 67: +case 68: YY_RULE_SETUP -#line 148 "easymesh/easymesh-scanner.l" +#line 149 "easymesh/easymesh-scanner.l" { /* ignore this */ } YY_BREAK /* Semantics tokens */ -case 68: -YY_RULE_SETUP -#line 151 "easymesh/easymesh-scanner.l" -{ return token_type('-'); } - YY_BREAK case 69: YY_RULE_SETUP #line 152 "easymesh/easymesh-scanner.l" -{ return token_type('('); } +{ return token_type('-'); } YY_BREAK case 70: YY_RULE_SETUP #line 153 "easymesh/easymesh-scanner.l" -{ return token_type(')'); } +{ return token_type('('); } YY_BREAK case 71: YY_RULE_SETUP #line 154 "easymesh/easymesh-scanner.l" -{ return token_type('['); } +{ return token_type(')'); } YY_BREAK case 72: YY_RULE_SETUP #line 155 "easymesh/easymesh-scanner.l" -{ return token_type(']'); } +{ return token_type('{'); } YY_BREAK case 73: YY_RULE_SETUP #line 156 "easymesh/easymesh-scanner.l" -{ /* ignore this */ } +{ return token_type('}'); } YY_BREAK case 74: -/* rule 74 can match eol */ YY_RULE_SETUP #line 157 "easymesh/easymesh-scanner.l" -{ /* ignore this */ } +{ return token_type('['); } YY_BREAK case 75: YY_RULE_SETUP #line 158 "easymesh/easymesh-scanner.l" -{ return token::T_ERROR; } +{ return token_type(']'); } YY_BREAK case 76: YY_RULE_SETUP +#line 159 "easymesh/easymesh-scanner.l" +{ /* ignore this */ } + YY_BREAK +case 77: +/* rule 77 can match eol */ +YY_RULE_SETUP #line 160 "easymesh/easymesh-scanner.l" +{ /* ignore this */ } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 161 "easymesh/easymesh-scanner.l" +{ return token::T_ERROR; } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 163 "easymesh/easymesh-scanner.l" ECHO; YY_BREAK -#line 1244 "generated/easymesh-scanner.cpp" +#line 1263 "generated/easymesh-scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1622,7 +1641,7 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 312 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1650,11 +1669,11 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 312 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 305); + yy_is_jam = (yy_current_state == 311); return yy_is_jam ? 0 : yy_current_state; } @@ -2141,7 +2160,7 @@ void EasyMeshfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 160 "easymesh/easymesh-scanner.l" +#line 163 "easymesh/easymesh-scanner.l" diff --git a/src/lol/math/vector.h b/src/lol/math/vector.h index a7c68b6f..c8e36dc5 100644 --- a/src/lol/math/vector.h +++ b/src/lol/math/vector.h @@ -251,6 +251,7 @@ template struct Vec2 : BVec2 LOL_MEMBER_OPS(Vec2, x) + static const Vec2 one; static const Vec2 zero; static const Vec2 axis_x; static const Vec2 axis_y; @@ -524,6 +525,7 @@ template struct Vec3 : BVec3 LOL_MEMBER_OPS(Vec3, x) + static const Vec3 one; static const Vec3 zero; static const Vec3 axis_x; static const Vec3 axis_y; @@ -946,6 +948,7 @@ template struct Vec4 : BVec4 LOL_MEMBER_OPS(Vec4, x) + static const Vec4 one; static const Vec4 zero; static const Vec4 axis_x; static const Vec4 axis_y; diff --git a/src/math/constants.cpp b/src/math/constants.cpp index cc146b58..ed82e933 100644 --- a/src/math/constants.cpp +++ b/src/math/constants.cpp @@ -29,15 +29,18 @@ namespace lol { Vec4 const Vec4::name = Vec4((type)a, (type)b, (type)c, (type)d); #define LOL_ALL_VECTOR_CONST_INNER(type) \ + LOL_VEC_2_CONST(type, one, 1, 1) \ LOL_VEC_2_CONST(type, zero, 0, 0) \ LOL_VEC_2_CONST(type, axis_x, 1, 0) \ LOL_VEC_2_CONST(type, axis_y, 0, 1) \ \ + LOL_VEC_3_CONST(type, one, 1, 1, 1) \ LOL_VEC_3_CONST(type, zero, 0, 0, 0) \ LOL_VEC_3_CONST(type, axis_x, 1, 0, 0) \ LOL_VEC_3_CONST(type, axis_y, 0, 1, 0) \ LOL_VEC_3_CONST(type, axis_z, 0, 0, 1) \ \ + LOL_VEC_4_CONST(type, one, 1, 1, 1, 1) \ LOL_VEC_4_CONST(type, zero, 0, 0, 0, 0) \ LOL_VEC_4_CONST(type, axis_x, 1, 0, 0, 0) \ LOL_VEC_4_CONST(type, axis_y, 0, 1, 0, 0) \ diff --git a/test/data/mesh-buffer.txt b/test/data/mesh-buffer.txt index a31374a9..bab27e1b 100644 --- a/test/data/mesh-buffer.txt +++ b/test/data/mesh-buffer.txt @@ -1,7 +1,28 @@ -addlight 0.0 position (1 0 1) color #0ff -addlight 0.0 position (-0.2 -1 -0.5) color (.0 .2 .5 1) +addlight 0.0 position (1 -1 1) color #fff +addlight 0.0 position (-1 -1 -1) color #fff +clearcolor #f00 +//addlight 0.0 position (1 0 1) color #0ff +//addlight 0.0 position (-0.2 -1 -0.5) color (.0 .2 .5 1) -custom setmesh "sc#fff ab 2 ty 1.5 ab 2" +//custom setmesh "sc#f00 ab 2 ty 1.5 ab 2" + +custom setmesh " + +[sc#0f0 scb#0f0 ac 3 .5 .4 0 ty .25 [ad 3 .4 sy -1] ty .5 ac 3 1 .1 .1 ty .5 dup [ rz 90 ry 90 dup [ ry 90 ] ] ] + + + +//[sc#f00 scb#f00 ac 3 .5 .4 0 ty .25 [ad 3 .4 sy -1] ty .5 ac 3 1 .1 .1 ty .5 rz -90] +//[sc#00f scb#00f ac 3 .5 .4 0 ty .25 [ad 3 .4 sy -1] ty .5 ac 3 1 .1 .1 ty .5 rx 90] +//[sc#fff ab .1] +[sc#f00 ab .2 tx 1] +[sc#0f0 ab .2 ty 1] +[sc#00f ab .2 tz 1] +//sc#0f0 ab 2 ty 1.5 ab 2 +//sc#00f ab 2 ty 1.5 ab 2 + +" + //splt 0 //test diff --git a/test/easymeshdictionnary.js b/test/easymeshdictionnary.js index a66664b6..07dfb024 100644 --- a/test/easymeshdictionnary.js +++ b/test/easymeshdictionnary.js @@ -13,11 +13,11 @@ CmdVar("vec3", ["X/Y/Z as float", " f f f", "(f f f)", "(f)"]); //------------------------------------------------------------------------- //Mesh CSG operations //------------------------------------------------------------------------- -CmdType(["csgu", "csgunion"], "Performs a Union operation as (mesh0_Outside + mesh1_Outside)"); -CmdType(["csgs", "csgsubstract"], "Performs a Substract operation as (mesh0_Outside + mesh1_Inside-inverted)"); -CmdType(["csgsl", "csgsubstractloss"], "Performs a Substract operation without keeping the mesh1 part"); -CmdType(["csga", "csgand"], "Performs an And operation as (mesh0_Inside + mesh1_Inside)"); -CmdType(["csgx", "csgxor"], "Performs a Xor operation as (m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted)"); +CmdType(["csgu", "csgunion"], "Performs a Union operation as (mesh0_Outside + mesh1_Outside)", [CmdArg("[ ]", "")]); +CmdType(["csgs", "csgsubstract"], "Performs a Substract operation as (mesh0_Outside + mesh1_Inside-inverted)", [CmdArg("[ ]", "")]); +CmdType(["csgsl", "csgsubstractloss"], "Performs a Substract operation without keeping the mesh1 part", [CmdArg("[ ]", "")]); +CmdType(["csga", "csgand"], "Performs an And operation as (mesh0_Inside + mesh1_Inside)", [CmdArg("[ ]", "")]); +CmdType(["csgx", "csgxor"], "Performs a Xor operation as (m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted)", [CmdArg("[ ]", "")]); //------------------------------------------------------------------------- //Mesh Base operations @@ -60,6 +60,7 @@ CmdType(["sx", "scalex"], "Scale vertices", [CmdArg("vec3", "s")]); CmdType(["sy", "scaley"], "Scale vertices", [CmdArg("vec3", "s")]); CmdType(["sz", "scalez"], "Scale vertices", [CmdArg("vec3", "s")]); CmdType(["s", "scale"], "Uniformly Scale vertices", [CmdArg("float", "s")]); +CmdType(["dup", "duplicate"], "Duplicate scope mesh and apply commands in the brackets.", [CmdArg("[ ]", "")]); CmdType(["mx", "mirrorx"], "Mirror vertices through X-plane"); CmdType(["my", "mirrory"], "Mirror vertices through Y-plane"); CmdType(["mz", "mirrorz"], "Mirror vertices through Z-plane"); diff --git a/test/generated/scenesetup-parser.cpp b/test/generated/scenesetup-parser.cpp index 84e0e433..6c171858 100644 --- a/test/generated/scenesetup-parser.cpp +++ b/test/generated/scenesetup-parser.cpp @@ -488,115 +488,130 @@ namespace lol { case 17: /* Line 677 of lalr1.cc */ -#line 134 "scenesetup-parser.y" - { uc.m_sstp.m_custom_cmd.Push((yysemantic_stack_[(3) - (2)].svval), (yysemantic_stack_[(3) - (3)].sval)); } +#line 131 "scenesetup-parser.y" + { uc.m_sstp.m_clear_color = vec4((yysemantic_stack_[(2) - (2)].vval)[0], (yysemantic_stack_[(2) - (2)].vval)[1], (yysemantic_stack_[(2) - (2)].vval)[2], (yysemantic_stack_[(2) - (2)].vval)[3]); } break; case 18: /* Line 677 of lalr1.cc */ -#line 140 "scenesetup-parser.y" - { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } +#line 132 "scenesetup-parser.y" + { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val); ivec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); + uc.m_sstp.m_clear_color = vec4(v) * (1.f / 255.f); } break; case 19: /* Line 677 of lalr1.cc */ -#line 141 "scenesetup-parser.y" - { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } +#line 137 "scenesetup-parser.y" + { uc.m_sstp.m_custom_cmd.Push((yysemantic_stack_[(3) - (2)].svval), (yysemantic_stack_[(3) - (3)].sval)); } break; case 20: /* Line 677 of lalr1.cc */ -#line 142 "scenesetup-parser.y" - { (yyval.fval) = (float)(yysemantic_stack_[(1) - (1)].ival); } +#line 143 "scenesetup-parser.y" + { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } break; case 21: /* Line 677 of lalr1.cc */ -#line 143 "scenesetup-parser.y" - { (yyval.fval) = -(float)(yysemantic_stack_[(2) - (2)].ival); } +#line 144 "scenesetup-parser.y" + { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } break; case 22: /* Line 677 of lalr1.cc */ -#line 147 "scenesetup-parser.y" - { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); } +#line 145 "scenesetup-parser.y" + { (yyval.fval) = (float)(yysemantic_stack_[(1) - (1)].ival); } break; case 23: /* Line 677 of lalr1.cc */ -#line 148 "scenesetup-parser.y" - { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); } +#line 146 "scenesetup-parser.y" + { (yyval.fval) = -(float)(yysemantic_stack_[(2) - (2)].ival); } break; case 24: /* Line 677 of lalr1.cc */ -#line 149 "scenesetup-parser.y" - { (yyval.ival) = (int)(yysemantic_stack_[(1) - (1)].fval); } +#line 150 "scenesetup-parser.y" + { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); } break; case 25: /* Line 677 of lalr1.cc */ -#line 150 "scenesetup-parser.y" - { (yyval.ival) = -(int)(yysemantic_stack_[(2) - (2)].fval); } +#line 151 "scenesetup-parser.y" + { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); } break; case 26: /* Line 677 of lalr1.cc */ -#line 155 "scenesetup-parser.y" - { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); } +#line 152 "scenesetup-parser.y" + { (yyval.ival) = (int)(yysemantic_stack_[(1) - (1)].fval); } break; case 27: /* Line 677 of lalr1.cc */ -#line 156 "scenesetup-parser.y" - { (yyval.vval)[0] = (yysemantic_stack_[(5) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(5) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(5) - (4)].fval); } +#line 153 "scenesetup-parser.y" + { (yyval.ival) = -(int)(yysemantic_stack_[(2) - (2)].fval); } break; case 28: /* Line 677 of lalr1.cc */ -#line 165 "scenesetup-parser.y" - { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[3] = (yysemantic_stack_[(3) - (2)].fval); } +#line 158 "scenesetup-parser.y" + { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); } break; case 29: /* Line 677 of lalr1.cc */ -#line 166 "scenesetup-parser.y" - { (yyval.vval)[0] = (yysemantic_stack_[(6) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(6) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(6) - (4)].fval); (yyval.vval)[3] = (yysemantic_stack_[(6) - (5)].fval); } +#line 159 "scenesetup-parser.y" + { (yyval.vval)[0] = (yysemantic_stack_[(5) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(5) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(5) - (4)].fval); } break; case 30: /* Line 677 of lalr1.cc */ -#line 177 "scenesetup-parser.y" - { (yyval.svval) = (yysemantic_stack_[(1) - (1)].svval); } +#line 168 "scenesetup-parser.y" + { (yyval.vval)[0] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[2] = (yysemantic_stack_[(3) - (2)].fval); (yyval.vval)[3] = (yysemantic_stack_[(3) - (2)].fval); } break; case 31: /* Line 677 of lalr1.cc */ -#line 181 "scenesetup-parser.y" +#line 169 "scenesetup-parser.y" + { (yyval.vval)[0] = (yysemantic_stack_[(6) - (2)].fval); (yyval.vval)[1] = (yysemantic_stack_[(6) - (3)].fval); (yyval.vval)[2] = (yysemantic_stack_[(6) - (4)].fval); (yyval.vval)[3] = (yysemantic_stack_[(6) - (5)].fval); } + break; + + case 32: + +/* Line 677 of lalr1.cc */ +#line 180 "scenesetup-parser.y" + { (yyval.svval) = (yysemantic_stack_[(1) - (1)].svval); } + break; + + case 33: + +/* Line 677 of lalr1.cc */ +#line 184 "scenesetup-parser.y" { String t = (yysemantic_stack_[(1) - (1)].sval); t.Replace('"', ' ', true); free((yysemantic_stack_[(1) - (1)].sval)); (yyval.sval) = strdup((const char *)t.C()); } break; - case 32: + case 34: /* Line 677 of lalr1.cc */ -#line 185 "scenesetup-parser.y" +#line 188 "scenesetup-parser.y" { String t = (yysemantic_stack_[(2) - (1)].sval); t += (yysemantic_stack_[(2) - (2)].sval); t.Replace('"', ' ', true); @@ -608,7 +623,7 @@ namespace lol { /* Line 677 of lalr1.cc */ -#line 612 "generated/scenesetup-parser.cpp" +#line 627 "generated/scenesetup-parser.cpp" default: break; } @@ -813,16 +828,16 @@ namespace lol { /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char SceneSetupParser::yypact_ninf_ = -17; + const signed char SceneSetupParser::yypact_ninf_ = -18; const signed char SceneSetupParser::yypact_[] = { - 28, 7, -12, -12, -5, 1, 24, 25, 28, 28, - -17, -17, -17, -17, -17, -17, 11, -17, 7, -17, - -17, -17, 7, -17, -17, -11, -17, -17, -17, -17, - -17, -17, 11, -17, -17, -7, -3, -11, -17, -17, - -17, -17, 7, -17, 7, -17, 12, 7, -17, 19, - -17 + 30, 8, -13, -13, -6, -2, 3, 1, 26, 30, + 30, -18, -18, -18, -18, -18, -18, 12, -18, 8, + -18, -18, -18, 8, -18, -18, -18, -18, 14, -18, + -18, -18, -18, -18, -18, 12, -18, -18, -8, -4, + 14, -18, -18, -18, -18, 8, -18, 8, -18, 13, + 8, -18, 21, -18 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -831,28 +846,28 @@ namespace lol { const unsigned char SceneSetupParser::yydefact_[] = { - 0, 11, 0, 0, 0, 0, 0, 0, 3, 5, - 6, 8, 9, 10, 18, 20, 0, 12, 0, 13, - 14, 16, 0, 15, 30, 0, 1, 2, 4, 7, - 18, 20, 0, 19, 21, 0, 0, 31, 17, 19, - 21, 26, 0, 28, 0, 32, 0, 0, 27, 0, - 29 + 0, 11, 0, 0, 0, 0, 0, 0, 0, 3, + 5, 6, 8, 9, 10, 20, 22, 0, 12, 0, + 13, 14, 16, 0, 15, 18, 17, 32, 0, 1, + 2, 4, 7, 20, 22, 0, 21, 23, 0, 0, + 33, 19, 21, 23, 28, 0, 30, 0, 34, 0, + 0, 29, 0, 31 }; /* YYPGOTO[NTERM-NUM]. */ const signed char SceneSetupParser::yypgoto_[] = { - -17, -17, 21, -17, -17, 29, -17, -17, -17, -16, - 8, 36, -17, -17, 4 + -18, -18, 22, -18, -18, 31, -18, -18, -18, -17, + 7, 40, 39, -18, 5 }; /* YYDEFGOTO[NTERM-NUM]. */ const signed char SceneSetupParser::yydefgoto_[] = { - -1, 6, 7, 8, 9, 10, 11, 12, 13, 17, - 34, 19, 23, 25, 38 + -1, 7, 8, 9, 10, 11, 12, 13, 14, 18, + 37, 20, 24, 28, 41 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -862,22 +877,22 @@ namespace lol { const unsigned char SceneSetupParser::yytable_[] = { - 33, 37, 35, 14, 15, 18, 36, 14, 15, 16, - 21, 41, 22, 16, 24, 43, 39, 14, 15, 42, - 44, 30, 31, 16, 26, 27, 46, 32, 47, 28, - 48, 49, 1, 2, 3, 4, 5, 50, 29, 20, - 40, 45 + 36, 29, 38, 15, 16, 19, 39, 15, 16, 17, + 22, 44, 23, 17, 25, 46, 23, 27, 42, 15, + 16, 45, 47, 33, 34, 17, 30, 40, 49, 35, + 50, 31, 51, 52, 1, 2, 3, 4, 5, 6, + 53, 32, 43, 21, 26, 48 }; /* YYCHECK. */ const unsigned char SceneSetupParser::yycheck_[] = { - 16, 12, 18, 10, 11, 17, 22, 10, 11, 16, - 15, 18, 17, 16, 13, 18, 32, 10, 11, 35, - 36, 10, 11, 16, 0, 0, 42, 16, 44, 8, - 18, 47, 4, 5, 6, 7, 8, 18, 9, 3, - 32, 37 + 17, 0, 19, 11, 12, 18, 23, 11, 12, 17, + 16, 19, 18, 17, 16, 19, 18, 14, 35, 11, + 12, 38, 39, 11, 12, 17, 0, 13, 45, 17, + 47, 9, 19, 50, 4, 5, 6, 7, 8, 9, + 19, 10, 35, 3, 5, 40 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -885,12 +900,12 @@ namespace lol { const unsigned char SceneSetupParser::yystos_[] = { - 0, 4, 5, 6, 7, 8, 20, 21, 22, 23, - 24, 25, 26, 27, 10, 11, 16, 28, 17, 30, - 30, 15, 17, 31, 13, 32, 0, 0, 21, 24, - 10, 11, 16, 28, 29, 28, 28, 12, 33, 28, - 29, 18, 28, 18, 28, 33, 28, 28, 18, 28, - 18 + 0, 4, 5, 6, 7, 8, 9, 21, 22, 23, + 24, 25, 26, 27, 28, 11, 12, 17, 29, 18, + 31, 31, 16, 18, 32, 16, 32, 14, 33, 0, + 0, 22, 25, 11, 12, 17, 29, 30, 29, 29, + 13, 34, 29, 30, 19, 29, 19, 29, 34, 29, + 29, 19, 29, 19 }; #if YYDEBUG @@ -900,7 +915,7 @@ namespace lol { SceneSetupParser::yytoken_number_[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 45, 40, 41 + 265, 266, 267, 268, 269, 270, 271, 45, 40, 41 }; #endif @@ -908,10 +923,10 @@ namespace lol { const unsigned char SceneSetupParser::yyr1_[] = { - 0, 19, 20, 21, 21, 22, 23, 23, 24, 24, - 24, 25, 25, 26, 26, 26, 26, 27, 28, 28, - 28, 28, 29, 29, 29, 29, 30, 30, 31, 31, - 32, 33, 33 + 0, 20, 21, 22, 22, 23, 24, 24, 25, 25, + 25, 26, 26, 27, 27, 27, 27, 27, 27, 28, + 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, + 32, 32, 33, 34, 34 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -919,9 +934,9 @@ namespace lol { SceneSetupParser::yyr2_[] = { 0, 2, 2, 1, 2, 1, 1, 2, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 3, 1, 2, - 1, 2, 1, 2, 1, 2, 3, 5, 3, 6, - 1, 1, 2 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, + 1, 2, 1, 2, 1, 2, 1, 2, 3, 5, + 3, 6, 1, 1, 2 }; #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE @@ -931,9 +946,9 @@ namespace lol { const SceneSetupParser::yytname_[] = { "T_END", "error", "$undefined", "T_COLOR", "T_ADDLIGHT", - "T_OBJPOSITION", "T_OBJLOOKAT", "T_OBJCOLOR", "T_CUSTOMCMD", "T_ERROR", - "F_NUMBER", "I_NUMBER", "STRING", "STRING_VAR", "BOOLEAN", "COLOR", - "'-'", "'('", "')'", "$accept", "sstp_description", + "T_OBJPOSITION", "T_OBJLOOKAT", "T_OBJCOLOR", "T_CLEARCOLOR", + "T_CUSTOMCMD", "T_ERROR", "F_NUMBER", "I_NUMBER", "STRING", "STRING_VAR", + "BOOLEAN", "COLOR", "'-'", "'('", "')'", "$accept", "sstp_description", "sstp_expression_list", "sstp_expression", "sstp_command_list", "sstp_command", "light_command", "setup_command", "custom_command", "fv", "iv", "v3", "v4", "svv", "sv", 0 @@ -945,16 +960,16 @@ namespace lol { const SceneSetupParser::rhs_number_type SceneSetupParser::yyrhs_[] = { - 20, 0, -1, 21, 0, -1, 22, -1, 22, 21, - -1, 23, -1, 24, -1, 23, 24, -1, 25, -1, - 26, -1, 27, -1, 4, -1, 4, 28, -1, 5, - 30, -1, 6, 30, -1, 7, 31, -1, 7, 15, - -1, 8, 32, 33, -1, 10, -1, 16, 28, -1, - 11, -1, 16, 29, -1, 11, -1, 16, 29, -1, - 10, -1, 16, 28, -1, 17, 28, 18, -1, 17, - 28, 28, 28, 18, -1, 17, 28, 18, -1, 17, - 28, 28, 28, 28, 18, -1, 13, -1, 12, -1, - 12, 33, -1 + 21, 0, -1, 22, 0, -1, 23, -1, 23, 22, + -1, 24, -1, 25, -1, 24, 25, -1, 26, -1, + 27, -1, 28, -1, 4, -1, 4, 29, -1, 5, + 31, -1, 6, 31, -1, 7, 32, -1, 7, 16, + -1, 8, 32, -1, 8, 16, -1, 9, 33, 34, + -1, 11, -1, 17, 29, -1, 12, -1, 17, 30, + -1, 12, -1, 17, 30, -1, 11, -1, 17, 29, + -1, 18, 29, 19, -1, 18, 29, 29, 29, 19, + -1, 18, 29, 19, -1, 18, 29, 29, 29, 29, + 19, -1, 14, -1, 13, -1, 13, 34, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -963,9 +978,9 @@ namespace lol { SceneSetupParser::yyprhs_[] = { 0, 0, 3, 6, 8, 11, 13, 15, 18, 20, - 22, 24, 26, 29, 32, 35, 38, 41, 45, 47, - 50, 52, 55, 57, 60, 62, 65, 69, 75, 79, - 86, 88, 90 + 22, 24, 26, 29, 32, 35, 38, 41, 44, 47, + 51, 53, 56, 58, 61, 63, 66, 68, 71, 75, + 81, 85, 92, 94, 96 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ @@ -973,9 +988,9 @@ namespace lol { SceneSetupParser::yyrline_[] = { 0, 90, 90, 94, 95, 99, 103, 104, 108, 109, - 110, 114, 115, 120, 122, 124, 126, 134, 140, 141, - 142, 143, 147, 148, 149, 150, 155, 156, 165, 166, - 177, 181, 185 + 110, 114, 115, 120, 122, 124, 126, 131, 132, 137, + 143, 144, 145, 146, 150, 151, 152, 153, 158, 159, + 168, 169, 180, 184, 188 }; // Print the state stack on the debug stream. @@ -1019,7 +1034,7 @@ namespace lol { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 17, 18, 2, 2, 2, 16, 2, 2, 2, 2, + 18, 19, 2, 2, 2, 17, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1042,7 +1057,7 @@ namespace lol { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15 + 15, 16 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -1051,26 +1066,26 @@ namespace lol { } const int SceneSetupParser::yyeof_ = 0; - const int SceneSetupParser::yylast_ = 41; + const int SceneSetupParser::yylast_ = 45; const int SceneSetupParser::yynnts_ = 15; const int SceneSetupParser::yyempty_ = -2; - const int SceneSetupParser::yyfinal_ = 26; + const int SceneSetupParser::yyfinal_ = 29; const int SceneSetupParser::yyterror_ = 1; const int SceneSetupParser::yyerrcode_ = 256; - const int SceneSetupParser::yyntokens_ = 19; + const int SceneSetupParser::yyntokens_ = 20; - const unsigned int SceneSetupParser::yyuser_token_number_max_ = 270; + const unsigned int SceneSetupParser::yyuser_token_number_max_ = 271; const SceneSetupParser::token_number_type SceneSetupParser::yyundef_token_ = 2; } // lol /* Line 1053 of lalr1.cc */ -#line 1070 "generated/scenesetup-parser.cpp" +#line 1085 "generated/scenesetup-parser.cpp" /* Line 1055 of lalr1.cc */ -#line 193 "scenesetup-parser.y" +#line 196 "scenesetup-parser.y" void lol::SceneSetupParser::error(const SceneSetupParser::location_type& l, diff --git a/test/generated/scenesetup-parser.h b/test/generated/scenesetup-parser.h index 447871b8..fb7e3e15 100644 --- a/test/generated/scenesetup-parser.h +++ b/test/generated/scenesetup-parser.h @@ -142,14 +142,15 @@ namespace lol { T_OBJPOSITION = 260, T_OBJLOOKAT = 261, T_OBJCOLOR = 262, - T_CUSTOMCMD = 263, - T_ERROR = 264, - F_NUMBER = 265, - I_NUMBER = 266, - STRING = 267, - STRING_VAR = 268, - BOOLEAN = 269, - COLOR = 270 + T_CLEARCOLOR = 263, + T_CUSTOMCMD = 264, + T_ERROR = 265, + F_NUMBER = 266, + I_NUMBER = 267, + STRING = 268, + STRING_VAR = 269, + BOOLEAN = 270, + COLOR = 271 }; }; @@ -323,7 +324,7 @@ namespace lol { } // lol /* Line 34 of lalr1.cc */ -#line 327 "generated/scenesetup-parser.h" +#line 328 "generated/scenesetup-parser.h" diff --git a/test/generated/scenesetup-parser.output b/test/generated/scenesetup-parser.output index 663e5e09..35e001c5 100644 --- a/test/generated/scenesetup-parser.output +++ b/test/generated/scenesetup-parser.output @@ -13,27 +13,27 @@ Terminals unused in grammar Rules useless in grammar - 32 iv3: '(' iv ')' - 33 | '(' iv iv iv ')' + 34 iv3: '(' iv ')' + 35 | '(' iv iv iv ')' - 34 bv: BOOLEAN - 35 | I_NUMBER - 36 | F_NUMBER + 36 bv: BOOLEAN + 37 | I_NUMBER + 38 | F_NUMBER Rules useless in parser due to conflicts - 21 iv: I_NUMBER - 22 | '-' iv - 23 | F_NUMBER - 24 | '-' fv + 23 iv: I_NUMBER + 24 | '-' iv + 25 | F_NUMBER + 26 | '-' fv -State 9 conflicts: 5 shift/reduce -State 30 conflicts: 10 reduce/reduce -State 31 conflicts: 10 reduce/reduce -State 39 conflicts: 10 reduce/reduce -State 40 conflicts: 10 reduce/reduce +State 10 conflicts: 6 shift/reduce +State 33 conflicts: 11 reduce/reduce +State 34 conflicts: 11 reduce/reduce +State 42 conflicts: 11 reduce/reduce +State 43 conflicts: 11 reduce/reduce Grammar @@ -61,85 +61,88 @@ Grammar 13 | T_OBJLOOKAT v3 14 | T_OBJCOLOR v4 15 | T_OBJCOLOR COLOR + 16 | T_CLEARCOLOR v4 + 17 | T_CLEARCOLOR COLOR - 16 custom_command: T_CUSTOMCMD svv sv - - 17 fv: F_NUMBER - 18 | '-' fv - 19 | I_NUMBER - 20 | '-' iv + 18 custom_command: T_CUSTOMCMD svv sv - 21 iv: I_NUMBER + 19 fv: F_NUMBER + 20 | '-' fv + 21 | I_NUMBER 22 | '-' iv - 23 | F_NUMBER - 24 | '-' fv - 25 v3: '(' fv ')' - 26 | '(' fv fv fv ')' + 23 iv: I_NUMBER + 24 | '-' iv + 25 | F_NUMBER + 26 | '-' fv + + 27 v3: '(' fv ')' + 28 | '(' fv fv fv ')' - 27 v4: '(' fv ')' - 28 | '(' fv fv fv fv ')' + 29 v4: '(' fv ')' + 30 | '(' fv fv fv fv ')' - 29 svv: STRING_VAR + 31 svv: STRING_VAR - 30 sv: STRING - 31 | STRING sv + 32 sv: STRING + 33 | STRING sv Terminals, with rules where they appear T_END (0) 0 1 -'(' (40) 25 26 27 28 -')' (41) 25 26 27 28 -'-' (45) 18 20 22 24 +'(' (40) 27 28 29 30 +')' (41) 27 28 29 30 +'-' (45) 20 22 24 26 error (256) T_COLOR (258) T_ADDLIGHT (259) 10 11 T_OBJPOSITION (260) 12 T_OBJLOOKAT (261) 13 T_OBJCOLOR (262) 14 15 -T_CUSTOMCMD (263) 16 -T_ERROR (264) -F_NUMBER (265) 17 23 -I_NUMBER (266) 19 21 -STRING (267) 30 31 -STRING_VAR (268) 29 -BOOLEAN (269) -COLOR (270) 15 +T_CLEARCOLOR (263) 16 17 +T_CUSTOMCMD (264) 18 +T_ERROR (265) +F_NUMBER (266) 19 25 +I_NUMBER (267) 21 23 +STRING (268) 32 33 +STRING_VAR (269) 31 +BOOLEAN (270) +COLOR (271) 15 17 Nonterminals, with rules where they appear -$accept (19) +$accept (20) on left: 0 -sstp_description (20) +sstp_description (21) on left: 1, on right: 0 -sstp_expression_list (21) +sstp_expression_list (22) on left: 2 3, on right: 1 3 -sstp_expression (22) +sstp_expression (23) on left: 4, on right: 2 3 -sstp_command_list (23) +sstp_command_list (24) on left: 5 6, on right: 4 6 -sstp_command (24) +sstp_command (25) on left: 7 8 9, on right: 5 6 -light_command (25) +light_command (26) on left: 10 11, on right: 7 -setup_command (26) - on left: 12 13 14 15, on right: 8 -custom_command (27) - on left: 16, on right: 9 -fv (28) - on left: 17 18 19 20, on right: 11 18 24 25 26 27 28 -iv (29) - on left: 21 22 23 24, on right: 20 22 -v3 (30) - on left: 25 26, on right: 12 13 -v4 (31) - on left: 27 28, on right: 14 -svv (32) - on left: 29, on right: 16 -sv (33) - on left: 30 31, on right: 16 31 +setup_command (27) + on left: 12 13 14 15 16 17, on right: 8 +custom_command (28) + on left: 18, on right: 9 +fv (29) + on left: 19 20 21 22, on right: 11 20 26 27 28 29 30 +iv (30) + on left: 23 24 25 26, on right: 22 24 +v3 (31) + on left: 27 28, on right: 12 13 +v4 (32) + on left: 29 30, on right: 14 16 +svv (33) + on left: 31, on right: 18 +sv (34) + on left: 32 33, on right: 18 33 state 0 @@ -150,16 +153,17 @@ state 0 T_OBJPOSITION shift, and go to state 2 T_OBJLOOKAT shift, and go to state 3 T_OBJCOLOR shift, and go to state 4 - T_CUSTOMCMD shift, and go to state 5 + T_CLEARCOLOR shift, and go to state 5 + T_CUSTOMCMD shift, and go to state 6 - sstp_description go to state 6 - sstp_expression_list go to state 7 - sstp_expression go to state 8 - sstp_command_list go to state 9 - sstp_command go to state 10 - light_command go to state 11 - setup_command go to state 12 - custom_command go to state 13 + sstp_description go to state 7 + sstp_expression_list go to state 8 + sstp_expression go to state 9 + sstp_command_list go to state 10 + sstp_command go to state 11 + light_command go to state 12 + setup_command go to state 13 + custom_command go to state 14 state 1 @@ -167,31 +171,31 @@ state 1 10 light_command: T_ADDLIGHT . 11 | T_ADDLIGHT . fv - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 $default reduce using rule 10 (light_command) - fv go to state 17 + fv go to state 18 state 2 12 setup_command: T_OBJPOSITION . v3 - '(' shift, and go to state 18 + '(' shift, and go to state 19 - v3 go to state 19 + v3 go to state 20 state 3 13 setup_command: T_OBJLOOKAT . v3 - '(' shift, and go to state 18 + '(' shift, and go to state 19 - v3 go to state 20 + v3 go to state 21 state 4 @@ -199,37 +203,48 @@ state 4 14 setup_command: T_OBJCOLOR . v4 15 | T_OBJCOLOR . COLOR - COLOR shift, and go to state 21 - '(' shift, and go to state 22 + COLOR shift, and go to state 22 + '(' shift, and go to state 23 - v4 go to state 23 + v4 go to state 24 state 5 - 16 custom_command: T_CUSTOMCMD . svv sv + 16 setup_command: T_CLEARCOLOR . v4 + 17 | T_CLEARCOLOR . COLOR - STRING_VAR shift, and go to state 24 + COLOR shift, and go to state 25 + '(' shift, and go to state 23 - svv go to state 25 + v4 go to state 26 state 6 - 0 $accept: sstp_description . T_END + 18 custom_command: T_CUSTOMCMD . svv sv - T_END shift, and go to state 26 + STRING_VAR shift, and go to state 27 + + svv go to state 28 state 7 - 1 sstp_description: sstp_expression_list . T_END + 0 $accept: sstp_description . T_END - T_END shift, and go to state 27 + T_END shift, and go to state 29 state 8 + 1 sstp_description: sstp_expression_list . T_END + + T_END shift, and go to state 30 + + +state 9 + 2 sstp_expression_list: sstp_expression . 3 | sstp_expression . sstp_expression_list @@ -237,20 +252,21 @@ state 8 T_OBJPOSITION shift, and go to state 2 T_OBJLOOKAT shift, and go to state 3 T_OBJCOLOR shift, and go to state 4 - T_CUSTOMCMD shift, and go to state 5 + T_CLEARCOLOR shift, and go to state 5 + T_CUSTOMCMD shift, and go to state 6 $default reduce using rule 2 (sstp_expression_list) - sstp_expression_list go to state 28 - sstp_expression go to state 8 - sstp_command_list go to state 9 - sstp_command go to state 10 - light_command go to state 11 - setup_command go to state 12 - custom_command go to state 13 + sstp_expression_list go to state 31 + sstp_expression go to state 9 + sstp_command_list go to state 10 + sstp_command go to state 11 + light_command go to state 12 + setup_command go to state 13 + custom_command go to state 14 -state 9 +state 10 4 sstp_expression: sstp_command_list . 6 sstp_command_list: sstp_command_list . sstp_command @@ -259,442 +275,466 @@ state 9 T_OBJPOSITION shift, and go to state 2 T_OBJLOOKAT shift, and go to state 3 T_OBJCOLOR shift, and go to state 4 - T_CUSTOMCMD shift, and go to state 5 + T_CLEARCOLOR shift, and go to state 5 + T_CUSTOMCMD shift, and go to state 6 T_ADDLIGHT [reduce using rule 4 (sstp_expression)] T_OBJPOSITION [reduce using rule 4 (sstp_expression)] T_OBJLOOKAT [reduce using rule 4 (sstp_expression)] T_OBJCOLOR [reduce using rule 4 (sstp_expression)] + T_CLEARCOLOR [reduce using rule 4 (sstp_expression)] T_CUSTOMCMD [reduce using rule 4 (sstp_expression)] $default reduce using rule 4 (sstp_expression) - sstp_command go to state 29 - light_command go to state 11 - setup_command go to state 12 - custom_command go to state 13 + sstp_command go to state 32 + light_command go to state 12 + setup_command go to state 13 + custom_command go to state 14 -state 10 +state 11 5 sstp_command_list: sstp_command . $default reduce using rule 5 (sstp_command_list) -state 11 +state 12 7 sstp_command: light_command . $default reduce using rule 7 (sstp_command) -state 12 +state 13 8 sstp_command: setup_command . $default reduce using rule 8 (sstp_command) -state 13 +state 14 9 sstp_command: custom_command . $default reduce using rule 9 (sstp_command) -state 14 +state 15 - 17 fv: F_NUMBER . + 19 fv: F_NUMBER . - $default reduce using rule 17 (fv) + $default reduce using rule 19 (fv) -state 15 +state 16 - 19 fv: I_NUMBER . + 21 fv: I_NUMBER . - $default reduce using rule 19 (fv) + $default reduce using rule 21 (fv) -state 16 +state 17 - 18 fv: '-' . fv - 20 | '-' . iv + 20 fv: '-' . fv + 22 | '-' . iv - F_NUMBER shift, and go to state 30 - I_NUMBER shift, and go to state 31 - '-' shift, and go to state 32 + F_NUMBER shift, and go to state 33 + I_NUMBER shift, and go to state 34 + '-' shift, and go to state 35 - fv go to state 33 - iv go to state 34 + fv go to state 36 + iv go to state 37 -state 17 +state 18 11 light_command: T_ADDLIGHT fv . $default reduce using rule 11 (light_command) -state 18 +state 19 - 25 v3: '(' . fv ')' - 26 | '(' . fv fv fv ')' + 27 v3: '(' . fv ')' + 28 | '(' . fv fv fv ')' - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 - fv go to state 35 + fv go to state 38 -state 19 +state 20 12 setup_command: T_OBJPOSITION v3 . $default reduce using rule 12 (setup_command) -state 20 +state 21 13 setup_command: T_OBJLOOKAT v3 . $default reduce using rule 13 (setup_command) -state 21 +state 22 15 setup_command: T_OBJCOLOR COLOR . $default reduce using rule 15 (setup_command) -state 22 +state 23 - 27 v4: '(' . fv ')' - 28 | '(' . fv fv fv fv ')' + 29 v4: '(' . fv ')' + 30 | '(' . fv fv fv fv ')' - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 - fv go to state 36 + fv go to state 39 -state 23 +state 24 14 setup_command: T_OBJCOLOR v4 . $default reduce using rule 14 (setup_command) -state 24 +state 25 - 29 svv: STRING_VAR . + 17 setup_command: T_CLEARCOLOR COLOR . - $default reduce using rule 29 (svv) + $default reduce using rule 17 (setup_command) -state 25 +state 26 - 16 custom_command: T_CUSTOMCMD svv . sv + 16 setup_command: T_CLEARCOLOR v4 . - STRING shift, and go to state 37 + $default reduce using rule 16 (setup_command) - sv go to state 38 +state 27 -state 26 + 31 svv: STRING_VAR . + + $default reduce using rule 31 (svv) + + +state 28 + + 18 custom_command: T_CUSTOMCMD svv . sv + + STRING shift, and go to state 40 + + sv go to state 41 + + +state 29 0 $accept: sstp_description T_END . $default accept -state 27 +state 30 1 sstp_description: sstp_expression_list T_END . $default reduce using rule 1 (sstp_description) -state 28 +state 31 3 sstp_expression_list: sstp_expression sstp_expression_list . $default reduce using rule 3 (sstp_expression_list) -state 29 +state 32 6 sstp_command_list: sstp_command_list sstp_command . $default reduce using rule 6 (sstp_command_list) -state 30 - - 17 fv: F_NUMBER . - 23 iv: F_NUMBER . - - T_END reduce using rule 17 (fv) - T_END [reduce using rule 23 (iv)] - T_ADDLIGHT reduce using rule 17 (fv) - T_ADDLIGHT [reduce using rule 23 (iv)] - T_OBJPOSITION reduce using rule 17 (fv) - T_OBJPOSITION [reduce using rule 23 (iv)] - T_OBJLOOKAT reduce using rule 17 (fv) - T_OBJLOOKAT [reduce using rule 23 (iv)] - T_OBJCOLOR reduce using rule 17 (fv) - T_OBJCOLOR [reduce using rule 23 (iv)] - T_CUSTOMCMD reduce using rule 17 (fv) - T_CUSTOMCMD [reduce using rule 23 (iv)] - F_NUMBER reduce using rule 17 (fv) - F_NUMBER [reduce using rule 23 (iv)] - I_NUMBER reduce using rule 17 (fv) - I_NUMBER [reduce using rule 23 (iv)] - '-' reduce using rule 17 (fv) - '-' [reduce using rule 23 (iv)] - ')' reduce using rule 17 (fv) - ')' [reduce using rule 23 (iv)] - $default reduce using rule 17 (fv) - - -state 31 +state 33 - 19 fv: I_NUMBER . - 21 iv: I_NUMBER . + 19 fv: F_NUMBER . + 25 iv: F_NUMBER . T_END reduce using rule 19 (fv) - T_END [reduce using rule 21 (iv)] + T_END [reduce using rule 25 (iv)] T_ADDLIGHT reduce using rule 19 (fv) - T_ADDLIGHT [reduce using rule 21 (iv)] + T_ADDLIGHT [reduce using rule 25 (iv)] T_OBJPOSITION reduce using rule 19 (fv) - T_OBJPOSITION [reduce using rule 21 (iv)] + T_OBJPOSITION [reduce using rule 25 (iv)] T_OBJLOOKAT reduce using rule 19 (fv) - T_OBJLOOKAT [reduce using rule 21 (iv)] + T_OBJLOOKAT [reduce using rule 25 (iv)] T_OBJCOLOR reduce using rule 19 (fv) - T_OBJCOLOR [reduce using rule 21 (iv)] + T_OBJCOLOR [reduce using rule 25 (iv)] + T_CLEARCOLOR reduce using rule 19 (fv) + T_CLEARCOLOR [reduce using rule 25 (iv)] T_CUSTOMCMD reduce using rule 19 (fv) - T_CUSTOMCMD [reduce using rule 21 (iv)] + T_CUSTOMCMD [reduce using rule 25 (iv)] F_NUMBER reduce using rule 19 (fv) - F_NUMBER [reduce using rule 21 (iv)] + F_NUMBER [reduce using rule 25 (iv)] I_NUMBER reduce using rule 19 (fv) - I_NUMBER [reduce using rule 21 (iv)] + I_NUMBER [reduce using rule 25 (iv)] '-' reduce using rule 19 (fv) - '-' [reduce using rule 21 (iv)] + '-' [reduce using rule 25 (iv)] ')' reduce using rule 19 (fv) - ')' [reduce using rule 21 (iv)] + ')' [reduce using rule 25 (iv)] $default reduce using rule 19 (fv) -state 32 +state 34 - 18 fv: '-' . fv - 20 | '-' . iv - 22 iv: '-' . iv - 24 | '-' . fv + 21 fv: I_NUMBER . + 23 iv: I_NUMBER . - F_NUMBER shift, and go to state 30 - I_NUMBER shift, and go to state 31 - '-' shift, and go to state 32 + T_END reduce using rule 21 (fv) + T_END [reduce using rule 23 (iv)] + T_ADDLIGHT reduce using rule 21 (fv) + T_ADDLIGHT [reduce using rule 23 (iv)] + T_OBJPOSITION reduce using rule 21 (fv) + T_OBJPOSITION [reduce using rule 23 (iv)] + T_OBJLOOKAT reduce using rule 21 (fv) + T_OBJLOOKAT [reduce using rule 23 (iv)] + T_OBJCOLOR reduce using rule 21 (fv) + T_OBJCOLOR [reduce using rule 23 (iv)] + T_CLEARCOLOR reduce using rule 21 (fv) + T_CLEARCOLOR [reduce using rule 23 (iv)] + T_CUSTOMCMD reduce using rule 21 (fv) + T_CUSTOMCMD [reduce using rule 23 (iv)] + F_NUMBER reduce using rule 21 (fv) + F_NUMBER [reduce using rule 23 (iv)] + I_NUMBER reduce using rule 21 (fv) + I_NUMBER [reduce using rule 23 (iv)] + '-' reduce using rule 21 (fv) + '-' [reduce using rule 23 (iv)] + ')' reduce using rule 21 (fv) + ')' [reduce using rule 23 (iv)] + $default reduce using rule 21 (fv) - fv go to state 39 - iv go to state 40 +state 35 -state 33 + 20 fv: '-' . fv + 22 | '-' . iv + 24 iv: '-' . iv + 26 | '-' . fv - 18 fv: '-' fv . + F_NUMBER shift, and go to state 33 + I_NUMBER shift, and go to state 34 + '-' shift, and go to state 35 - $default reduce using rule 18 (fv) + fv go to state 42 + iv go to state 43 -state 34 +state 36 - 20 fv: '-' iv . + 20 fv: '-' fv . $default reduce using rule 20 (fv) -state 35 +state 37 - 25 v3: '(' fv . ')' - 26 | '(' fv . fv fv ')' + 22 fv: '-' iv . - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 - ')' shift, and go to state 41 + $default reduce using rule 22 (fv) - fv go to state 42 +state 38 -state 36 + 27 v3: '(' fv . ')' + 28 | '(' fv . fv fv ')' - 27 v4: '(' fv . ')' - 28 | '(' fv . fv fv fv ')' + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 + ')' shift, and go to state 44 - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 - ')' shift, and go to state 43 + fv go to state 45 - fv go to state 44 +state 39 -state 37 + 29 v4: '(' fv . ')' + 30 | '(' fv . fv fv fv ')' - 30 sv: STRING . - 31 | STRING . sv + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 + ')' shift, and go to state 46 - STRING shift, and go to state 37 + fv go to state 47 - $default reduce using rule 30 (sv) - sv go to state 45 +state 40 + 32 sv: STRING . + 33 | STRING . sv -state 38 + STRING shift, and go to state 40 - 16 custom_command: T_CUSTOMCMD svv sv . + $default reduce using rule 32 (sv) - $default reduce using rule 16 (custom_command) + sv go to state 48 -state 39 +state 41 - 18 fv: '-' fv . - 24 iv: '-' fv . + 18 custom_command: T_CUSTOMCMD svv sv . - T_END reduce using rule 18 (fv) - T_END [reduce using rule 24 (iv)] - T_ADDLIGHT reduce using rule 18 (fv) - T_ADDLIGHT [reduce using rule 24 (iv)] - T_OBJPOSITION reduce using rule 18 (fv) - T_OBJPOSITION [reduce using rule 24 (iv)] - T_OBJLOOKAT reduce using rule 18 (fv) - T_OBJLOOKAT [reduce using rule 24 (iv)] - T_OBJCOLOR reduce using rule 18 (fv) - T_OBJCOLOR [reduce using rule 24 (iv)] - T_CUSTOMCMD reduce using rule 18 (fv) - T_CUSTOMCMD [reduce using rule 24 (iv)] - F_NUMBER reduce using rule 18 (fv) - F_NUMBER [reduce using rule 24 (iv)] - I_NUMBER reduce using rule 18 (fv) - I_NUMBER [reduce using rule 24 (iv)] - '-' reduce using rule 18 (fv) - '-' [reduce using rule 24 (iv)] - ')' reduce using rule 18 (fv) - ')' [reduce using rule 24 (iv)] - $default reduce using rule 18 (fv) + $default reduce using rule 18 (custom_command) -state 40 +state 42 - 20 fv: '-' iv . - 22 iv: '-' iv . + 20 fv: '-' fv . + 26 iv: '-' fv . T_END reduce using rule 20 (fv) - T_END [reduce using rule 22 (iv)] + T_END [reduce using rule 26 (iv)] T_ADDLIGHT reduce using rule 20 (fv) - T_ADDLIGHT [reduce using rule 22 (iv)] + T_ADDLIGHT [reduce using rule 26 (iv)] T_OBJPOSITION reduce using rule 20 (fv) - T_OBJPOSITION [reduce using rule 22 (iv)] + T_OBJPOSITION [reduce using rule 26 (iv)] T_OBJLOOKAT reduce using rule 20 (fv) - T_OBJLOOKAT [reduce using rule 22 (iv)] + T_OBJLOOKAT [reduce using rule 26 (iv)] T_OBJCOLOR reduce using rule 20 (fv) - T_OBJCOLOR [reduce using rule 22 (iv)] + T_OBJCOLOR [reduce using rule 26 (iv)] + T_CLEARCOLOR reduce using rule 20 (fv) + T_CLEARCOLOR [reduce using rule 26 (iv)] T_CUSTOMCMD reduce using rule 20 (fv) - T_CUSTOMCMD [reduce using rule 22 (iv)] + T_CUSTOMCMD [reduce using rule 26 (iv)] F_NUMBER reduce using rule 20 (fv) - F_NUMBER [reduce using rule 22 (iv)] + F_NUMBER [reduce using rule 26 (iv)] I_NUMBER reduce using rule 20 (fv) - I_NUMBER [reduce using rule 22 (iv)] + I_NUMBER [reduce using rule 26 (iv)] '-' reduce using rule 20 (fv) - '-' [reduce using rule 22 (iv)] + '-' [reduce using rule 26 (iv)] ')' reduce using rule 20 (fv) - ')' [reduce using rule 22 (iv)] + ')' [reduce using rule 26 (iv)] $default reduce using rule 20 (fv) -state 41 +state 43 - 25 v3: '(' fv ')' . + 22 fv: '-' iv . + 24 iv: '-' iv . - $default reduce using rule 25 (v3) + T_END reduce using rule 22 (fv) + T_END [reduce using rule 24 (iv)] + T_ADDLIGHT reduce using rule 22 (fv) + T_ADDLIGHT [reduce using rule 24 (iv)] + T_OBJPOSITION reduce using rule 22 (fv) + T_OBJPOSITION [reduce using rule 24 (iv)] + T_OBJLOOKAT reduce using rule 22 (fv) + T_OBJLOOKAT [reduce using rule 24 (iv)] + T_OBJCOLOR reduce using rule 22 (fv) + T_OBJCOLOR [reduce using rule 24 (iv)] + T_CLEARCOLOR reduce using rule 22 (fv) + T_CLEARCOLOR [reduce using rule 24 (iv)] + T_CUSTOMCMD reduce using rule 22 (fv) + T_CUSTOMCMD [reduce using rule 24 (iv)] + F_NUMBER reduce using rule 22 (fv) + F_NUMBER [reduce using rule 24 (iv)] + I_NUMBER reduce using rule 22 (fv) + I_NUMBER [reduce using rule 24 (iv)] + '-' reduce using rule 22 (fv) + '-' [reduce using rule 24 (iv)] + ')' reduce using rule 22 (fv) + ')' [reduce using rule 24 (iv)] + $default reduce using rule 22 (fv) -state 42 +state 44 - 26 v3: '(' fv fv . fv ')' + 27 v3: '(' fv ')' . - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + $default reduce using rule 27 (v3) - fv go to state 46 +state 45 -state 43 + 28 v3: '(' fv fv . fv ')' - 27 v4: '(' fv ')' . + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 - $default reduce using rule 27 (v4) + fv go to state 49 -state 44 +state 46 - 28 v4: '(' fv fv . fv fv ')' + 29 v4: '(' fv ')' . - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + $default reduce using rule 29 (v4) - fv go to state 47 +state 47 -state 45 + 30 v4: '(' fv fv . fv fv ')' - 31 sv: STRING sv . + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 - $default reduce using rule 31 (sv) + fv go to state 50 -state 46 +state 48 - 26 v3: '(' fv fv fv . ')' + 33 sv: STRING sv . - ')' shift, and go to state 48 + $default reduce using rule 33 (sv) -state 47 +state 49 - 28 v4: '(' fv fv fv . fv ')' + 28 v3: '(' fv fv fv . ')' - F_NUMBER shift, and go to state 14 - I_NUMBER shift, and go to state 15 - '-' shift, and go to state 16 + ')' shift, and go to state 51 - fv go to state 49 +state 50 -state 48 + 30 v4: '(' fv fv fv . fv ')' - 26 v3: '(' fv fv fv ')' . + F_NUMBER shift, and go to state 15 + I_NUMBER shift, and go to state 16 + '-' shift, and go to state 17 - $default reduce using rule 26 (v3) + fv go to state 52 -state 49 +state 51 - 28 v4: '(' fv fv fv fv . ')' + 28 v3: '(' fv fv fv ')' . - ')' shift, and go to state 50 + $default reduce using rule 28 (v3) -state 50 +state 52 + + 30 v4: '(' fv fv fv fv . ')' + + ')' shift, and go to state 53 + + +state 53 - 28 v4: '(' fv fv fv fv ')' . + 30 v4: '(' fv fv fv fv ')' . - $default reduce using rule 28 (v4) + $default reduce using rule 30 (v4) diff --git a/test/generated/scenesetup-scanner.cpp b/test/generated/scenesetup-scanner.cpp index cd0b67cc..a83f23bf 100644 --- a/test/generated/scenesetup-scanner.cpp +++ b/test/generated/scenesetup-scanner.cpp @@ -330,8 +330,8 @@ typedef unsigned char YY_CHAR; *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 23 -#define YY_END_OF_BUFFER 24 +#define YY_NUM_RULES 24 +#define YY_END_OF_BUFFER 25 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -339,16 +339,17 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[78] = +static yyconst flex_int16_t yy_accept[87] = { 0, - 0, 0, 24, 22, 21, 20, 22, 22, 18, 19, - 22, 17, 22, 22, 13, 22, 22, 22, 22, 22, - 22, 22, 0, 14, 0, 0, 13, 12, 16, 15, - 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, - 15, 15, 15, 15, 15, 15, 15, 6, 0, 12, - 15, 15, 15, 15, 15, 15, 10, 7, 15, 4, - 15, 11, 15, 15, 0, 15, 5, 3, 15, 8, - 15, 15, 0, 1, 2, 9, 0 + 0, 0, 25, 23, 22, 21, 23, 23, 19, 20, + 23, 18, 23, 23, 14, 23, 23, 23, 23, 23, + 23, 23, 0, 15, 0, 0, 14, 13, 17, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, + 17, 16, 16, 16, 16, 16, 16, 16, 16, 7, + 0, 13, 16, 16, 16, 16, 16, 16, 16, 11, + 8, 16, 16, 4, 16, 12, 16, 16, 0, 16, + 16, 6, 3, 16, 9, 16, 16, 16, 0, 1, + 16, 2, 10, 16, 5, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -391,72 +392,78 @@ static yyconst flex_int32_t yy_meta[35] = 3, 3, 3, 3 } ; -static yyconst flex_int16_t yy_base[89] = +static yyconst flex_int16_t yy_base[98] = { 0, - 0, 0, 118, 119, 119, 119, 113, 0, 119, 119, - 25, 26, 104, 104, 29, 0, 95, 11, 96, 83, - 82, 79, 105, 119, 0, 96, 32, 34, 0, 0, - 88, 80, 73, 78, 74, 70, 67, 0, 41, 0, - 74, 70, 65, 65, 71, 71, 74, 0, 81, 80, - 67, 59, 60, 68, 70, 53, 0, 0, 63, 0, - 57, 0, 35, 39, 0, 29, 0, 0, 22, 0, - 14, 15, 0, 0, 0, 119, 119, 54, 56, 59, - 61, 66, 68, 70, 72, 74, 76, 78 + 0, 0, 127, 128, 128, 128, 122, 0, 128, 128, + 25, 26, 113, 113, 29, 0, 104, 14, 105, 92, + 91, 88, 114, 128, 0, 105, 32, 33, 0, 0, + 97, 95, 88, 81, 86, 82, 78, 75, 0, 42, + 0, 82, 90, 77, 72, 72, 78, 78, 81, 0, + 88, 87, 74, 66, 65, 66, 74, 76, 59, 0, + 0, 69, 72, 0, 62, 0, 55, 63, 0, 63, + 56, 0, 0, 55, 0, 35, 37, 24, 0, 0, + 20, 0, 128, 15, 0, 128, 54, 56, 59, 61, + 66, 68, 70, 72, 74, 76, 78 + } ; -static yyconst flex_int16_t yy_def[89] = +static yyconst flex_int16_t yy_def[98] = { 0, - 77, 1, 77, 77, 77, 77, 78, 79, 77, 77, - 77, 77, 77, 77, 77, 80, 80, 80, 80, 80, - 80, 80, 78, 77, 81, 77, 77, 77, 82, 80, - 80, 80, 80, 80, 80, 80, 80, 83, 77, 82, - 80, 80, 80, 80, 80, 80, 80, 84, 77, 77, - 80, 80, 80, 80, 80, 80, 80, 85, 80, 80, - 80, 80, 80, 80, 86, 80, 80, 80, 80, 87, - 80, 80, 88, 80, 80, 77, 0, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77 + 86, 1, 86, 86, 86, 86, 87, 88, 86, 86, + 86, 86, 86, 86, 86, 89, 89, 89, 89, 89, + 89, 89, 87, 86, 90, 86, 86, 86, 91, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 92, 86, + 91, 89, 89, 89, 89, 89, 89, 89, 89, 93, + 86, 86, 89, 89, 89, 89, 89, 89, 89, 89, + 94, 89, 89, 89, 89, 89, 89, 89, 95, 89, + 89, 89, 89, 89, 96, 89, 89, 89, 97, 89, + 89, 89, 86, 89, 89, 0, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86 + } ; -static yyconst flex_int16_t yy_nxt[154] = +static yyconst flex_int16_t yy_nxt[163] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 4, 17, 18, 16, 16, 19, 16, 16, 16, 16, 20, 16, 16, 16, 21, 16, 16, 22, 16, 26, 26, 27, 27, 26, 32, - 27, 26, 75, 27, 33, 28, 74, 39, 49, 49, - 72, 71, 50, 39, 23, 23, 23, 23, 23, 25, - 25, 30, 69, 30, 38, 38, 40, 68, 40, 40, - 40, 48, 48, 58, 58, 65, 65, 70, 70, 73, - 73, 76, 76, 67, 66, 64, 63, 62, 61, 60, - 59, 50, 50, 57, 56, 55, 54, 53, 52, 51, - - 47, 46, 45, 44, 43, 42, 41, 28, 24, 37, - 36, 35, 34, 31, 29, 28, 24, 77, 3, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77 + 27, 26, 33, 27, 28, 85, 40, 34, 84, 51, + 51, 82, 40, 52, 23, 23, 23, 23, 23, 25, + 25, 30, 81, 30, 39, 39, 41, 80, 41, 41, + 41, 50, 50, 61, 61, 69, 69, 75, 75, 79, + 79, 83, 83, 78, 77, 76, 74, 73, 72, 71, + 70, 68, 67, 66, 65, 64, 63, 62, 52, 52, + + 60, 59, 58, 57, 56, 55, 54, 53, 49, 48, + 47, 46, 45, 44, 43, 42, 28, 24, 38, 37, + 36, 35, 31, 29, 28, 24, 86, 3, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86 } ; -static yyconst flex_int16_t yy_chk[154] = +static yyconst flex_int16_t yy_chk[163] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 12, 11, 12, 15, 18, - 15, 27, 72, 27, 18, 28, 71, 28, 39, 39, - 69, 66, 39, 28, 78, 78, 78, 78, 78, 79, - 79, 80, 64, 80, 81, 81, 82, 63, 82, 82, - 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, - 87, 88, 88, 61, 59, 56, 55, 54, 53, 52, - 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, - - 37, 36, 35, 34, 33, 32, 31, 26, 23, 22, - 21, 20, 19, 17, 14, 13, 7, 3, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77 + 15, 27, 18, 27, 28, 84, 28, 18, 81, 40, + 40, 78, 28, 40, 87, 87, 87, 87, 87, 88, + 88, 89, 77, 89, 90, 90, 91, 76, 91, 91, + 91, 92, 92, 93, 93, 94, 94, 95, 95, 96, + 96, 97, 97, 74, 71, 70, 68, 67, 65, 63, + 62, 59, 58, 57, 56, 55, 54, 53, 52, 51, + + 49, 48, 47, 46, 45, 44, 43, 42, 38, 37, + 36, 35, 34, 33, 32, 31, 26, 23, 22, 21, + 20, 19, 17, 14, 13, 7, 3, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86 } ; /* The intent behind this definition is that it'll catch @@ -505,7 +512,7 @@ typedef lol::SceneSetupParser::token_type token_type; #define yyterminate() return token::T_END #define YY_NO_UNISTD_H #define YY_USER_ACTION yylloc->columns(yyleng); -#line 509 "generated/scenesetup-scanner.cpp" +#line 516 "generated/scenesetup-scanner.cpp" #define INITIAL 0 @@ -617,7 +624,7 @@ YY_DECL yylloc->step(); -#line 621 "generated/scenesetup-scanner.cpp" +#line 628 "generated/scenesetup-scanner.cpp" if ( !(yy_init) ) { @@ -670,13 +677,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 78 ) + if ( yy_current_state >= 87 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 77 ); + while ( yy_current_state != 86 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -718,14 +725,19 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 55 "scenesetup-scanner.l" +#line 54 "scenesetup-scanner.l" +{ return token::T_CLEARCOLOR; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 56 "scenesetup-scanner.l" { return token::T_CUSTOMCMD; } YY_BREAK /* ======= BASE COLOR TYPES ========================================= */ /* COLOR */ -case 6: +case 7: YY_RULE_SETUP -#line 59 "scenesetup-scanner.l" +#line 60 "scenesetup-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 8) @@ -734,9 +746,9 @@ YY_RULE_SETUP | 0x000000ffu; return token::COLOR; } YY_BREAK -case 7: +case 8: YY_RULE_SETUP -#line 66 "scenesetup-scanner.l" +#line 67 "scenesetup-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 12) @@ -745,106 +757,106 @@ YY_RULE_SETUP | 0x00000011u * (tmp & 0xf); return token::COLOR; } YY_BREAK -case 8: +case 9: YY_RULE_SETUP -#line 73 "scenesetup-scanner.l" +#line 74 "scenesetup-scanner.l" { yylval->u32val = 0xffu | 0x100u * (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK -case 9: +case 10: YY_RULE_SETUP -#line 77 "scenesetup-scanner.l" +#line 78 "scenesetup-scanner.l" { yylval->u32val = (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK /* ======= BASE DATA TYPES ========================================= */ /* BOOL */ -case 10: +case 11: YY_RULE_SETUP -#line 83 "scenesetup-scanner.l" +#line 84 "scenesetup-scanner.l" { yylval->bval = true; return token::BOOLEAN; } YY_BREAK -case 11: +case 12: YY_RULE_SETUP -#line 84 "scenesetup-scanner.l" +#line 85 "scenesetup-scanner.l" { yylval->bval = false; return token::BOOLEAN; } YY_BREAK /* FLOAT */ -case 12: +case 13: YY_RULE_SETUP -#line 86 "scenesetup-scanner.l" +#line 87 "scenesetup-scanner.l" { yylval->fval = (float)std::atof(yytext); return token::F_NUMBER; } YY_BREAK /* INT */ -case 13: +case 14: YY_RULE_SETUP -#line 89 "scenesetup-scanner.l" +#line 90 "scenesetup-scanner.l" { yylval->ival = std::atoi(yytext); return token::I_NUMBER; } YY_BREAK /* STRING */ -case 14: -/* rule 14 can match eol */ +case 15: +/* rule 15 can match eol */ YY_RULE_SETUP -#line 92 "scenesetup-scanner.l" +#line 93 "scenesetup-scanner.l" { yylval->sval = strdup(yytext); return token::STRING; } YY_BREAK /* STRING VAR */ -case 15: +case 16: YY_RULE_SETUP -#line 95 "scenesetup-scanner.l" +#line 96 "scenesetup-scanner.l" { yylval->svval = strdup(yytext); return token::STRING_VAR; } YY_BREAK /* ======= COMMENTS ======= */ -case 16: +case 17: YY_RULE_SETUP -#line 99 "scenesetup-scanner.l" +#line 100 "scenesetup-scanner.l" { /* ignore this */ } YY_BREAK /* Semantics tokens */ -case 17: -YY_RULE_SETUP -#line 102 "scenesetup-scanner.l" -{ return token_type('-'); } - YY_BREAK case 18: YY_RULE_SETUP #line 103 "scenesetup-scanner.l" -{ return token_type('('); } +{ return token_type('-'); } YY_BREAK case 19: YY_RULE_SETUP #line 104 "scenesetup-scanner.l" -{ return token_type(')'); } +{ return token_type('('); } YY_BREAK case 20: YY_RULE_SETUP #line 105 "scenesetup-scanner.l" -{ /* ignore this */ } +{ return token_type(')'); } YY_BREAK case 21: -/* rule 21 can match eol */ YY_RULE_SETUP #line 106 "scenesetup-scanner.l" { /* ignore this */ } YY_BREAK case 22: +/* rule 22 can match eol */ YY_RULE_SETUP #line 107 "scenesetup-scanner.l" -{ return token::T_ERROR; } +{ /* ignore this */ } YY_BREAK case 23: YY_RULE_SETUP -#line 109 "scenesetup-scanner.l" +#line 108 "scenesetup-scanner.l" +{ return token::T_ERROR; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 110 "scenesetup-scanner.l" ECHO; YY_BREAK -#line 848 "generated/scenesetup-scanner.cpp" +#line 860 "generated/scenesetup-scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1226,7 +1238,7 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 78 ) + if ( yy_current_state >= 87 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1254,11 +1266,11 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 78 ) + if ( yy_current_state >= 87 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 77); + yy_is_jam = (yy_current_state == 86); return yy_is_jam ? 0 : yy_current_state; } @@ -1745,7 +1757,7 @@ void SceneSetupfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 109 "scenesetup-scanner.l" +#line 110 "scenesetup-scanner.l" diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index 6707764e..acaaaa46 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -504,7 +504,7 @@ public: while (o-- > 0) { SceneSetup* new_ssetup = new SceneSetup(); - if (new_ssetup->Compile(mesh.C()) && new_ssetup->GetLightNb()) + if (new_ssetup->Compile(mesh.C()) && new_ssetup->m_lights.Count()) { //Store current light datas, in World Array light_datas; @@ -641,7 +641,7 @@ public: m_texture_shader->SetUniform(m_texture_uni, m_default_texture->GetTexture(), 0); #endif //NO_NACL_EM - g_renderer->SetClearColor(vec4(0.0f, 0.0f, 0.0f, 1.0f)); + g_renderer->SetClearColor(m_ssetup->m_clear_color); vec3 x = vec3(1.f,0.f,0.f); vec3 y = vec3(0.f,1.f,0.f); diff --git a/test/scenesetup-parser.y b/test/scenesetup-parser.y index 7d25f02e..7ca47aa4 100644 --- a/test/scenesetup-parser.y +++ b/test/scenesetup-parser.y @@ -46,7 +46,7 @@ %token T_COLOR -%token T_ADDLIGHT T_OBJPOSITION T_OBJLOOKAT T_OBJCOLOR +%token T_ADDLIGHT T_OBJPOSITION T_OBJLOOKAT T_OBJCOLOR T_CLEARCOLOR %token T_CUSTOMCMD %token T_END 0 @@ -128,6 +128,9 @@ setup_command: vec4 vv = vec4(v) * (1.f / 255.f); if (uc.m_last_cmd == "ADDLIGHT") uc.m_sstp.m_lights.Last()->SetColor(vv); } + | T_CLEARCOLOR v4 { uc.m_sstp.m_clear_color = vec4($2[0], $2[1], $2[2], $2[3]); } + | T_CLEARCOLOR COLOR { uint32_t x = $2; ivec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff); + uc.m_sstp.m_clear_color = vec4(v) * (1.f / 255.f); } ; custom_command: diff --git a/test/scenesetup-scanner.l b/test/scenesetup-scanner.l index 634776bd..4ce349b1 100644 --- a/test/scenesetup-scanner.l +++ b/test/scenesetup-scanner.l @@ -51,6 +51,7 @@ addlight { return token::T_ADDLIGHT; } position { return token::T_OBJPOSITION; } lookat { return token::T_OBJLOOKAT; } color { return token::T_OBJCOLOR; } +clearcolor { return token::T_CLEARCOLOR; } custom { return token::T_CUSTOMCMD; } diff --git a/test/scenesetup.cpp b/test/scenesetup.cpp index 8865eadb..7061d301 100644 --- a/test/scenesetup.cpp +++ b/test/scenesetup.cpp @@ -24,6 +24,7 @@ namespace lol //CTor/DTor SceneSetup::SceneSetup() { + m_clear_color = vec4(vec3::zero, 1.f); } //---- diff --git a/test/scenesetup.h b/test/scenesetup.h index e5e6a0e1..24092c2d 100644 --- a/test/scenesetup.h +++ b/test/scenesetup.h @@ -39,8 +39,7 @@ public: bool Shutdown(bool destroy=false); //-- - int GetLightNb() { return m_lights.Count(); } - + vec4 m_clear_color; Array m_lights; Array m_custom_cmd; }; diff --git a/test/scenesetupdictionnary.js b/test/scenesetupdictionnary.js index cea00ef7..d4b98a62 100644 --- a/test/scenesetupdictionnary.js +++ b/test/scenesetupdictionnary.js @@ -12,7 +12,8 @@ CmdVar("vec3", ["X/Y/Z as float", " f f f", "(f f f)", "(f)"]); //------------------------------------------------------------------------- //scene operations //------------------------------------------------------------------------- -CmdType(["addlight"], "Add a light to the scene.\nUse other commands after this one to fully setup.", [CmdArg("float", "type")]); -CmdType(["position"], "Set a position.\nWhen put after a light, sets its position.", [CmdArg("vec3", "pos")]); -CmdType(["color"], "Set a color.", [CmdArg("color", "color")]); +CmdType(["addlight"], "Add a light to the scene.\nUse other commands after this one to fully setup.", [CmdArg("float", "type")]); +CmdType(["position"], "Set a position.\nWhen put after a light, sets its position.", [CmdArg("vec3", "pos")]); +CmdType(["color"], "Set a color.", [CmdArg("color", "color")]); +CmdType(["clearcolor"], "Sets the color used for screen clearing.", [CmdArg("color", "color")]);