From 6b2044349cd25345fdcf6d173fc53a73aa151949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Sun, 6 Oct 2013 18:30:10 +0000 Subject: [PATCH] EZMesh : Added CommandStack & subsequent Loop command. --- src/easymesh/easymesh-parser.y | 5 +- src/easymesh/easymesh-scanner.l | 1 + src/easymesh/easymesh.cpp | 441 ++++++++++- src/easymesh/easymesh.h | 156 +++- src/generated/easymesh-parser.cpp | 1154 ++++++++++++++-------------- src/generated/easymesh-parser.h | 135 ++-- src/generated/easymesh-scanner.cpp | 601 ++++++++------- src/lol/base/assert.h | 9 + test/data/mesh-buffer.txt | 3 +- test/easymeshdictionnary.js | 1 + 10 files changed, 1551 insertions(+), 955 deletions(-) diff --git a/src/easymesh/easymesh-parser.y b/src/easymesh/easymesh-parser.y index e0e051f4..50097c41 100644 --- a/src/easymesh/easymesh-parser.y +++ b/src/easymesh/easymesh-parser.y @@ -45,7 +45,7 @@ %start mesh_description -%token T_COLOR T_BCOLOR T_VCOLOR +%token T_LOOP T_COLOR T_BCOLOR T_VCOLOR %token T_TRANSLATEX T_ROTATEX T_TAPERX T_TWISTX T_SHEARX T_STRETCHX T_BENDXY T_BENDXZ T_SCALEX T_MIRRORX %token T_TRANSLATEY T_ROTATEY T_TAPERY T_TWISTY T_SHEARY T_STRETCHY T_BENDYX T_BENDYZ T_SCALEY T_MIRRORY @@ -122,8 +122,11 @@ post_brace_command: | 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(); } + | doloop '[' mesh_expression_list ']' { mc.m_mesh.LoopEnd(); } ; +doloop: + T_LOOP iv { mc.m_mesh.LoopStart($2); } pre_brace_command: T_DUPLICATE { mc.m_mesh.DupAndScale(vec3::one, true); } ; diff --git a/src/easymesh/easymesh-scanner.l b/src/easymesh/easymesh-scanner.l index cc373a61..6d1733b2 100644 --- a/src/easymesh/easymesh-scanner.l +++ b/src/easymesh/easymesh-scanner.l @@ -53,6 +53,7 @@ typedef lol::EasyMeshParser::token_type token_type; (csga|csgand) { return token::T_CSGAND; } (csgx|csgxor) { return token::T_CSGXOR; } +(lp|loop) { return token::T_LOOP; } (tsw|scalewinding) { return token::T_TOGGLESCALEWINDING; } (sc|setcolor) { return token::T_COLOR; } (scb|setbcolor) { return token::T_BCOLOR; } diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index dbd66726..908e9396 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -439,19 +439,264 @@ EasyMesh::EasyMesh(const EasyMesh& em) //----------------------------------------------------------------------------- bool EasyMesh::Compile(char const *command) { + bool res = false; EasyMeshCompiler mc(*this); - return mc.ParseString(command); + BD()->Enable(MeshBuildOperation::CommandRecording); + if ((res = mc.ParseString(command))) + { + BD()->Disable(MeshBuildOperation::CommandRecording); + BD()->Enable(MeshBuildOperation::CommandExecution); + ExecuteCmdStack(); + BD()->Disable(MeshBuildOperation::CommandExecution); + } + return res; +} + +//----------------------------------------------------------------------------- +#define EZSET(M0) BD()->CmdStack().GetValue(M0); +#define EZDEF_1(T0) T0 m0; EZSET(m0) +#define EZDEF_2(T0, T1) EZDEF_1(T0) T1 m1; EZSET(m1) +#define EZDEF_3(T0, T1, T2) EZDEF_2(T0, T1) T2 m2; EZSET(m2) +#define EZDEF_4(T0, T1, T2, T3) EZDEF_3(T0, T1, T2) T3 m3; EZSET(m3) +#define EZDEF_5(T0, T1, T2, T3, T4) EZDEF_4(T0, T1, T2, T3) T4 m4; EZSET(m4) +#define EZDEF_6(T0, T1, T2, T3, T4, T5) EZDEF_5(T0, T1, T2, T3, T4) T5 m5; EZSET(m5) +#define EZDEF_7(T0, T1, T2, T3, T4, T5, T6) EZDEF_6(T0, T1, T2, T3, T4, T5) T6 m6; EZSET(m6) +#define EZDEF_8(T0, T1, T2, T3, T4, T5, T6, T7) EZDEF_7(T0, T1, T2, T3, T4, T5, T6) T7 m7; EZSET(m7) +#define EZDEF_9(T0, T1, T2, T3, T4, T5, T6, T7, T8) EZDEF_8(T0, T1, T2, T3, T4, T5, T6, T7) T8 m8; EZSET(m8) +#define EZDEF_10(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) EZDEF_9(T0, T1, T2, T3, T4, T5, T6, T7, T8) T9 m9; EZSET(m9) + +//---- +#define EZCALL_1(F) F(); +#define EZCALL_2(F, T0) EZDEF_1(T0) F(m0); +#define EZCALL_3(F, T0, T1) EZDEF_2(T0, T1) F(m0, m1); +#define EZCALL_4(F, T0, T1, T2) EZDEF_3(T0, T1, T2) F(m0, m1, m2); +#define EZCALL_5(F, T0, T1, T2, T3) EZDEF_4(T0, T1, T2, T3) F(m0, m1, m2, m3); +#define EZCALL_6(F, T0, T1, T2, T3, T4) EZDEF_5(T0, T1, T2, T3, T4) F(m0, m1, m2, m3, m4); +#define EZCALL_7(F, T0, T1, T2, T3, T4, T5) EZDEF_6(T0, T1, T2, T3, T4, T5) F(m0, m1, m2, m3, m4, m5); +#define EZCALL_8(F, T0, T1, T2, T3, T4, T5, T6) EZDEF_7(T0, T1, T2, T3, T4, T5, T6) F(m0, m1, m2, m3, m4, m5, m6); +#define EZCALL_9(F, T0, T1, T2, T3, T4, T5, T6, T7) EZDEF_8(T0, T1, T2, T3, T4, T5, T6, T7) F(m0, m1, m2, m3, m4, m5, m6, m7); +#define EZCALL_10(F, T0, T1, T2, T3, T4, T5, T6, T7, T8) EZDEF_9(T0, T1, T2, T3, T4, T5, T6, T7, T8) F(m0, m1, m2, m3, m4, m5, m6, m7, m8); +#define EZCALL_11(F, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) EZDEF_10(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) F(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9); + +//---- +#define EZM_CALL_FUNC(...) \ + LOL_CALL(LOL_CAT(EZCALL_, LOL_CALL(LOL_COUNT_TO_12, (__VA_ARGS__))), (__VA_ARGS__)) + +//----------------------------------------------------------------------------- +void EasyMesh::ExecuteCmdStack() +{ + for (BD()->Cmdi() = 0; BD()->Cmdi() < BD()->CmdStack().GetCmdNb(); ++BD()->Cmdi()) + { + switch (BD()->CmdStack().GetCmd(BD()->Cmdi())) + { + case EasyMeshCmdType::MeshCsg: + { + EZM_CALL_FUNC(MeshCsg, CSGUsage); + break; + } + case EasyMeshCmdType::LoopStart: + { + EZM_CALL_FUNC(LoopStart, int); + break; + } + case EasyMeshCmdType::LoopEnd: + { + EZM_CALL_FUNC(LoopEnd); + break; + } + case EasyMeshCmdType::OpenBrace: + { + EZM_CALL_FUNC(OpenBrace); + break; + } + case EasyMeshCmdType::CloseBrace: + { + EZM_CALL_FUNC(CloseBrace); + break; + } + case EasyMeshCmdType::ScaleWinding: + { + EZM_CALL_FUNC(ToggleScaleWinding); + break; + } + case EasyMeshCmdType::SetColor: + { + EZM_CALL_FUNC(SetCurColor, vec4); + break; + } + case EasyMeshCmdType::SetColor2: + { + EZM_CALL_FUNC(SetCurColor2, vec4); + break; + } + case EasyMeshCmdType::SetVertColor: + { + EZM_CALL_FUNC(SetVertColor, vec4); + break; + } + case EasyMeshCmdType::Translate: + { + EZM_CALL_FUNC(Translate, vec3); + break; + } + case EasyMeshCmdType::Rotate: + { + EZM_CALL_FUNC(Rotate, float, vec3); + break; + } + case EasyMeshCmdType::RadialJitter: + { + EZM_CALL_FUNC(RadialJitter, float); + break; + } + case EasyMeshCmdType::MeshTranform: + { + EZM_CALL_FUNC(DoMeshTransform, MeshTransform, Axis, Axis, float, float, float, bool); + break; + } + case EasyMeshCmdType::Scale: + { + EZM_CALL_FUNC(Scale, vec3); + break; + } + case EasyMeshCmdType::DupAndScale: + { + EZM_CALL_FUNC(DupAndScale, vec3, bool); + break; + } + case EasyMeshCmdType::Chamfer: + { + EZM_CALL_FUNC(Chamfer, float); + break; + } + case EasyMeshCmdType::SplitTriangles: + { + EZM_CALL_FUNC(SplitTriangles, int); + break; + } + case EasyMeshCmdType::SmoothMesh: + { + EZM_CALL_FUNC(SmoothMesh, int, int, int); + break; + } + case EasyMeshCmdType::AppendCylinder: + { + EZM_CALL_FUNC(AppendCylinder, int, float, float, float, bool, bool, bool); + break; + } + case EasyMeshCmdType::AppendCapsule: + { + EZM_CALL_FUNC(AppendCapsule, int, float, float); + break; + } + case EasyMeshCmdType::AppendTorus: + { + EZM_CALL_FUNC(AppendTorus, int, float, float); + break; + } + case EasyMeshCmdType::AppendBox: + { + EZM_CALL_FUNC(AppendBox, vec3, float, bool); + break; + } + case EasyMeshCmdType::AppendStar: + { + EZM_CALL_FUNC(AppendStar, int, float, float, bool, bool); + break; + } + case EasyMeshCmdType::AppendExpandedStar: + { + EZM_CALL_FUNC(AppendExpandedStar, int, float, float, float); + break; + } + case EasyMeshCmdType::AppendDisc: + { + EZM_CALL_FUNC(AppendDisc, int, float, bool); + break; + } + case EasyMeshCmdType::AppendSimpleTriangle: + { + EZM_CALL_FUNC(AppendSimpleTriangle, float, bool); + break; + } + case EasyMeshCmdType::AppendSimpleQuad: + { + EZM_CALL_FUNC(AppendSimpleQuad, vec2, vec2, float, bool); + break; + } + case EasyMeshCmdType::AppendCog: + { + EZM_CALL_FUNC(AppendCog, int, float, float, float, float, float, float, float, float, bool); + break; + } + default: + ASSERT(0, "Unknown command pseudo bytecode"); + } + } +} + +//----------------------------------------------------------------------------- +void EasyMesh::LoopStart(int loopnb) +{ + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::LoopStart); + BD()->CmdStack() << loopnb; + return; + } + //Loop is only available when executing a command recording + else if (BD()->IsEnabled(MeshBuildOperation::CommandExecution)) + { + //Only register if we're not the current loop command + if (!BD()->LoopStack().Count() || BD()->LoopStack().Last().m1 != BD()->Cmdi()) + BD()->LoopStack().Push(BD()->Cmdi(), loopnb); + } +} + +//----------------------------------------------------------------------------- +void EasyMesh::LoopEnd() +{ + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::LoopEnd); + return; + } + //Loop is only available when executing a command recording + else if (BD()->IsEnabled(MeshBuildOperation::CommandExecution)) + { + //Only register if we're not the current loop command + if (BD()->LoopStack().Count()) + { + BD()->LoopStack().Last().m2--; + if (BD()->LoopStack().Last().m2 > 0) + BD()->Cmdi() = BD()->LoopStack().Last().m1 - 1; + else + BD()->LoopStack().Pop(); + } + } } //----------------------------------------------------------------------------- void EasyMesh::OpenBrace() { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::OpenBrace); + return; + } + m_cursors.Push(m_vert.Count(), m_indices.Count()); } //----------------------------------------------------------------------------- void EasyMesh::CloseBrace() { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::CloseBrace); + return; + } + m_cursors.Pop(); } //----------------------------------------------------------------------------- @@ -682,6 +927,13 @@ void VertexDictionnary::AddVertex(const int vert_id, const vec3 vert_coord) //----------------------------------------------------------------------------- void EasyMesh::MeshCsg(CSGUsage csg_operation) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::MeshCsg); + BD()->CmdStack() << csg_operation; + return; + } + //A vertex dictionnary for vertices on the same spot. Array< int, int > vertex_dict; //This list keeps track of the triangle that will need deletion at the end. @@ -865,21 +1117,55 @@ void EasyMesh::MeshCsg(CSGUsage csg_operation) //----------------------------------------------------------------------------- void EasyMesh::ToggleScaleWinding() { - BD()->Toggle(MeshBuildOperation::Scale_Winding); + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::ScaleWinding); + return; + } + + BD()->Toggle(MeshBuildOperation::ScaleWinding); } //----------------------------------------------------------------------------- void EasyMesh::SetCurColor(vec4 const &color) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::SetColor); + BD()->CmdStack() << color; + return; + } + BD()->Color() = color; } //----------------------------------------------------------------------------- void EasyMesh::SetCurColor2(vec4 const &color) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::SetColor2); + BD()->CmdStack() << color; + return; + } + BD()->Color2() = color; } +//----------------------------------------------------------------------------- +void EasyMesh::SetVertColor(vec4 const &color) +{ + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::SetVertColor); + BD()->CmdStack() << color; + return; + } + + for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) + m_vert[i].m_color = color; +} + //----------------------------------------------------------------------------- void EasyMesh::AddVertex(vec3 const &coord) { @@ -1147,13 +1433,6 @@ void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset) #endif } -//----------------------------------------------------------------------------- -void EasyMesh::SetVertColor(vec4 const &color) -{ - for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) - m_vert[i].m_color = color; -} - //----------------------------------------------------------------------------- void EasyMesh::SetTexCoordData(vec2 const &new_offset, vec2 const &new_scale) { @@ -1195,6 +1474,13 @@ void EasyMesh::SetCurVertTexCoord2(vec2 const &texcoord) //----------------------------------------------------------------------------- void EasyMesh::Translate(vec3 const &v) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::Translate); + BD()->CmdStack() << v; + return; + } + for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) m_vert[i].m_coord += v; } @@ -1207,6 +1493,13 @@ void EasyMesh::RotateZ(float angle) { Rotate(angle, vec3(0, 0, 1)); } //----------------------------------------------------------------------------- void EasyMesh::Rotate(float angle, vec3 const &axis) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::Rotate); + BD()->CmdStack() << angle << axis; + return; + } + mat3 m = mat3::rotate(angle, axis); for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) { @@ -1218,6 +1511,13 @@ void EasyMesh::Rotate(float angle, vec3 const &axis) //----------------------------------------------------------------------------- void EasyMesh::RadialJitter(float r) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::RadialJitter); + BD()->CmdStack() << r; + return; + } + Array Welded; Welded.Push(-1); for (int i = m_cursors.Last().m1 + 1; i < m_vert.Count(); i++) @@ -1291,6 +1591,13 @@ void EasyMesh::BendZY(float t, float toff) { DoMeshTransform(MeshTransform::Bend //----------------------------------------------------------------------------- void EasyMesh::DoMeshTransform(MeshTransform ct, Axis axis0, Axis axis1, float n0, float n1, float noff, bool absolute) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::MeshTranform); + BD()->CmdStack() << ct << axis0 << axis1 << n0 << n1 << noff << absolute; + return; + } + for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) { switch (ct) @@ -1338,6 +1645,13 @@ void EasyMesh::DoMeshTransform(MeshTransform ct, Axis axis0, Axis axis1, float n //----------------------------------------------------------------------------- void EasyMesh::Scale(vec3 const &s) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::Scale); + BD()->CmdStack() << s; + return; + } + vec3 const invs = vec3(1) / s; for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) @@ -1347,7 +1661,7 @@ void EasyMesh::Scale(vec3 const &s) } /* Flip winding if the scaling involves mirroring */ - if (!BD()->IsEnabled(MeshBuildOperation::Scale_Winding) && s.x * s.y * s.z < 0) + if (!BD()->IsEnabled(MeshBuildOperation::ScaleWinding) && s.x * s.y * s.z < 0) { for (int i = m_cursors.Last().m2; i < m_indices.Count(); i += 3) { @@ -1366,6 +1680,13 @@ void EasyMesh::MirrorZ() { DupAndScale(vec3(1, 1, -1)); } //----------------------------------------------------------------------------- void EasyMesh::DupAndScale(vec3 const &s, bool open_brace) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::DupAndScale); + BD()->CmdStack() << s << open_brace; + return; + } + int vlen = m_vert.Count() - m_cursors.Last().m1; int tlen = m_indices.Count() - m_cursors.Last().m2; @@ -1393,6 +1714,13 @@ void EasyMesh::DupAndScale(vec3 const &s, bool open_brace) void EasyMesh::AppendCylinder(int nsides, float h, float d1, float d2, bool dualside, bool smooth, bool close) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendCylinder); + BD()->CmdStack() << nsides << h << d1 << d2 << dualside << smooth << close; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r1 = d1 * .5f; float r2 = d2 * .5f; @@ -1486,6 +1814,13 @@ void EasyMesh::AppendSphere(int ndivisions, float d) //----------------------------------------------------------------------------- void EasyMesh::AppendCapsule(int ndivisions, float h, float d) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendCapsule); + BD()->CmdStack() << ndivisions << h << d; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r = d * .5f; @@ -1632,6 +1967,13 @@ void EasyMesh::AppendCapsule(int ndivisions, float h, float d) //----------------------------------------------------------------------------- void EasyMesh::AppendTorus(int ndivisions, float d1, float d2) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendTorus); + BD()->CmdStack() << ndivisions << d1 << d2; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r1 = d1 * .5f; float r2 = d2 * .5f; @@ -1695,6 +2037,13 @@ void EasyMesh::AppendFlatChamfBox(vec3 const &size, float chamf) //----------------------------------------------------------------------------- void EasyMesh::AppendBox(vec3 const &size, float chamf, bool smooth) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendBox); + BD()->CmdStack() << size << chamf << smooth; + return; + } + if (chamf < 0.0f) { AppendBox(size + vec3(chamf * 2.0f), -chamf, smooth); @@ -1882,6 +2231,13 @@ void EasyMesh::AppendBox(vec3 const &size, float chamf, bool smooth) void EasyMesh::AppendStar(int nbranches, float d1, float d2, bool fade, bool fade2) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendStar); + BD()->CmdStack() << nbranches << d1 << d2 << fade << fade2; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r1 = d1 * .5f; float r2 = d2 * .5f; @@ -1921,6 +2277,13 @@ void EasyMesh::AppendStar(int nbranches, float d1, float d2, //----------------------------------------------------------------------------- void EasyMesh::AppendExpandedStar(int nbranches, float d1, float d2, float extrad) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendExpandedStar); + BD()->CmdStack() << nbranches << d1 << d2 << extrad; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r1 = d1 * .5f; float r2 = d2 * .5f; @@ -1965,6 +2328,13 @@ void EasyMesh::AppendExpandedStar(int nbranches, float d1, float d2, float extra //----------------------------------------------------------------------------- void EasyMesh::AppendDisc(int nsides, float d, bool fade) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendDisc); + BD()->CmdStack() << nsides << d << fade; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r = d * .5f; @@ -1990,6 +2360,13 @@ void EasyMesh::AppendDisc(int nsides, float d, bool fade) //----------------------------------------------------------------------------- void EasyMesh::AppendSimpleTriangle(float d, bool fade) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendSimpleTriangle); + BD()->CmdStack() << d << fade; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float size = d * .5f; @@ -2018,6 +2395,13 @@ void EasyMesh::AppendSimpleQuad(float size, bool fade) //----------------------------------------------------------------------------- void EasyMesh::AppendSimpleQuad(vec2 p1, vec2 p2, float z, bool fade) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendSimpleQuad); + BD()->CmdStack() << p1 << p2 << z << fade; + return; + } + MeshType mt = MeshType::Quad; MeshFaceType mft = MeshFaceType::QuadDefault; @@ -2053,6 +2437,17 @@ void EasyMesh::AppendCog(int nbsides, float h, float d10, float d20, float d1, float d2, float d12, float d22, float sidemul, bool offset) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::AppendCog); + BD()->CmdStack() << nbsides << h + << d10 << d20 + << d1 << d2 + << d12 << d22 + << sidemul << offset; + return; + } + //XXX : This operation is done to convert radius to diameter without changing all the code. float r10 = d10 * .5f; float r20 = d20 * .5f; @@ -2309,6 +2704,13 @@ void EasyMesh::AppendCog(int nbsides, float h, float d10, float d20, //----------------------------------------------------------------------------- void EasyMesh::Chamfer(float f) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::Chamfer); + BD()->CmdStack() << f; + return; + } + int vlen = m_vert.Count() - m_cursors.Last().m1; int ilen = m_indices.Count() - m_cursors.Last().m2; @@ -2353,7 +2755,17 @@ void EasyMesh::Chamfer(float f) } //----------------------------------------------------------------------------- -void EasyMesh::SplitTriangles(int pass) { SplitTriangles(pass, nullptr); } +void EasyMesh::SplitTriangles(int pass) +{ + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::SplitTriangles); + BD()->CmdStack() << pass; + return; + } + + SplitTriangles(pass, nullptr); +} //----------------------------------------------------------------------------- void EasyMesh::SplitTriangles(int pass, VertexDictionnary *vert_dict) @@ -2388,6 +2800,13 @@ void EasyMesh::SplitTriangles(int pass, VertexDictionnary *vert_dict) //TODO : Smooth should only use connected vertices that are on edges of the mesh (See box). void EasyMesh::SmoothMesh(int main_pass, int split_per_main_pass, int smooth_per_main_pass) { + if (BD()->IsEnabled(MeshBuildOperation::CommandRecording)) + { + BD()->CmdStack().AddCmd(EasyMeshCmdType::SmoothMesh); + BD()->CmdStack() << main_pass << split_per_main_pass << smooth_per_main_pass; + return; + } + VertexDictionnary vert_dict; Array smooth_buf[2]; Array master_list; diff --git a/src/easymesh/easymesh.h b/src/easymesh/easymesh.h index fa9e33bf..74164f73 100644 --- a/src/easymesh/easymesh.h +++ b/src/easymesh/easymesh.h @@ -21,6 +21,66 @@ namespace lol { +//Utility struct to convert command code to pseudo-bytecode +struct CommandStack +{ +private: + Array m_commands; + Array m_floats; + Array m_ints; + int m_f_cur; + int m_i_cur; + +public: + //cmd storage + void AddCmd(int cmd) { m_commands.Push(cmd, m_floats.Count(), m_ints.Count()); } + int GetCmdNb() { return m_commands.Count(); } + int GetCmd(int i) + { + ASSERT(0 <= i && i < m_commands.Count()); + m_f_cur = m_commands[i].m2; + m_i_cur = m_commands[i].m3; + return m_commands[i].m1; + } + + //GETTER + inline float F() { return m_floats[m_f_cur++]; } + inline int I() { return m_ints[m_i_cur++]; } + inline int E() { return I(); } + inline bool B() { return !!I(); } + inline vec2 V2() { vec2 v(F()); v.y = F(); return v; } + inline vec3 V3() { vec3 v(V2(), 0.f); v.z = F(); return v; } + inline vec4 V4() { vec4 v(V3(), 0.f); v.w = F(); return v; } + inline ivec2 IV2() { ivec2 v(I()); v.y = I(); return v; } + inline ivec3 IV3() { ivec3 v(IV2(), 0); v.z = I(); return v; } + inline ivec4 IV4() { ivec4 v(IV3(), 0); v.w = I(); return v; } + + //Alternate getters + inline void GetValue(float &f) { f = F(); } + inline void GetValue(int &i) { i = I(); } + inline void GetValue(bool &b) { b = B(); } + inline void GetValue(vec2 &v2) { v2 = V2(); } + inline void GetValue(vec3 &v3) { v3 = V3(); } + inline void GetValue(vec4 &v4) { v4 = V4(); } + inline void GetValue(ivec2 &iv2) { iv2 = IV2(); } + inline void GetValue(ivec3 &iv3) { iv3 = IV3(); } + inline void GetValue(ivec4 &iv4) { iv4 = IV4(); } + //For Safe Enum + template< class T > inline + void GetValue(T &i) { i = T((typename T::Value)I()); } + + //SETTER + CommandStack &operator<<(int i) { m_ints << i; return *this; } + CommandStack &operator<<(float f) { m_floats << f; return *this; } + CommandStack &operator<<(bool b) { return (*this << (int)b); } + CommandStack &operator<<(vec2 v) { return (*this << v.x << v.y); } + CommandStack &operator<<(vec3 v) { return (*this << v.xy << v.z); } + CommandStack &operator<<(vec4 v) { return (*this << v.xyz << v.w); } + CommandStack &operator<<(ivec2 iv) { return (*this << iv.x << iv.y); } + CommandStack &operator<<(ivec3 iv) { return (*this << iv.xy << iv.z); } + CommandStack &operator<<(ivec4 iv) { return (*this << iv.xyz << iv.w); } +}; + //Utility enum for renderers struct MeshRender { @@ -141,7 +201,9 @@ struct MeshBuildOperation enum Value { //When this flag is up, negative scaling will not invert faces. - Scale_Winding = 1 << 0, + ScaleWinding = (1 << 0), + CommandRecording = (1 << 1), + CommandExecution = (1 << 2), All = 0xffffffff } @@ -152,6 +214,54 @@ struct MeshBuildOperation inline operator Value() { return m_value; } }; +struct EasyMeshCmdType +{ + enum Value + { + MeshCsg = 0, + + LoopStart, + LoopEnd, + OpenBrace, + CloseBrace, + + ScaleWinding, + SetColor, + SetColor2, + SetVertColor, + + Translate, + Rotate, + RadialJitter, + MeshTranform, + Scale, + DupAndScale, + Chamfer, + + SplitTriangles, + SmoothMesh, + + AppendCylinder, + AppendCapsule, + AppendTorus, + AppendBox, + AppendStar, + AppendExpandedStar, + AppendDisc, + AppendSimpleTriangle, + AppendSimpleQuad, + AppendCog, + + Max + } + m_value; + + inline EasyMeshCmdType(Value v) : m_value(v) {} + inline operator Value() { return m_value; } + inline int Value() { return m_value; } +}; + + struct MeshType { enum Value @@ -259,12 +369,15 @@ public: } } - inline vec4 &Color() { return m_color; } - inline vec4 &Color2() { return m_color2; } - inline vec2 &TexCoordOffset() { return m_texcoord_offset; } - inline vec2 &TexCoordScale() { return m_texcoord_scale; } - inline vec2 &TexCoordOffset2() { return m_texcoord_offset2; } - inline vec2 &TexCoordScale2() { return m_texcoord_scale2; } + inline CommandStack &CmdStack() { return m_stack; } + inline int &Cmdi() { return m_cmd_i; } + inline Array &LoopStack(){ return m_loop_stack; } + inline vec4 &Color() { return m_color; } + inline vec4 &Color2() { return m_color2; } + inline vec2 &TexCoordOffset() { return m_texcoord_offset; } + inline vec2 &TexCoordScale() { return m_texcoord_scale; } + inline vec2 &TexCoordOffset2() { return m_texcoord_offset2; } + inline vec2 &TexCoordScale2() { return m_texcoord_scale2; } //UV1 void SetTexCoordBuildType(MeshType mt, TexCoordBuildType tcbt) { m_texcoord_build_type[mt] = (1 << (tcbt + 1)) | (m_texcoord_build_type[mt] & 1); } @@ -445,6 +558,9 @@ public: inline void Set(MeshBuildOperation mbo, bool value) { if (value) Enable(mbo); else Disable(mbo); } public: + CommandStack m_stack; + int m_cmd_i; + Array m_loop_stack; vec4 m_color; vec4 m_color2; vec2 m_texcoord_offset; @@ -463,15 +579,19 @@ struct CSGUsage { enum Value { - Union, + Union = 0, Substract, SubstractLoss, //will remove B from A, but not add inverted B And, Xor, + + Max } m_value; + inline CSGUsage() : m_value(Union) {} inline CSGUsage(Value v) : m_value(v) {} + inline CSGUsage(int v) : m_value((Value)v) {} inline operator Value() { return m_value; } }; @@ -521,6 +641,7 @@ struct Axis } m_value; + inline Axis() : m_value(X) {} inline Axis(Value v) : m_value(v) {} inline operator Value() { return m_value; } }; @@ -535,6 +656,7 @@ public: EasyMesh(const EasyMesh& em); bool Compile(char const *command); + void ExecuteCmdStack(); void MeshConvert(GpuShaderData* new_gpu_sdata); void MeshConvert(Shader* ProvidedShader = nullptr); bool Render(mat4 const &model); @@ -551,20 +673,24 @@ private: void MeshCsg(CSGUsage csg_operation); public: /* [cmd:csgu] Performs a Union operation as (mesh0_Outside + mesh1_Outside) */ - void CsgUnion() { MeshCsg(CSGUsage::Union); } + void CsgUnion() { MeshCsg(CSGUsage::Union); } /* [cmd:csgs] Performs a Substract operation as (mesh0_Outside + mesh1_Inside-inverted) */ - void CsgSub() { MeshCsg(CSGUsage::Substract); } + void CsgSub() { MeshCsg(CSGUsage::Substract); } /* [cmd:csgsl] Performs a Substract operation without keeping the mesh1 part */ - void CsgSubL() { MeshCsg(CSGUsage::SubstractLoss); } + void CsgSubL() { MeshCsg(CSGUsage::SubstractLoss); } /* [cmd:csga] Performs an And operation as (mesh0_Inside + mesh1_Inside) */ - void CsgAnd() { MeshCsg(CSGUsage::And); } + void CsgAnd() { MeshCsg(CSGUsage::And); } /* [cmd:csgx] Performs a Xor operation as (m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted) */ - void CsgXor() { MeshCsg(CSGUsage::Xor); } + void CsgXor() { MeshCsg(CSGUsage::Xor); } //------------------------------------------------------------------------- //Mesh Base operations //------------------------------------------------------------------------- public: + /* [cmd:lp[ ]] will perform a loop of loopnb */ + void LoopStart(int loopnb); + /* No cmd, implicit ] */ + void LoopEnd(); /* [cmd:[] from this point onward, any operation will not be performed on previous vertices */ void OpenBrace(); /* [cmd:]] Merge current vertices with previous context */ @@ -575,6 +701,8 @@ public: void SetCurColor(vec4 const &color); /* [cmd:scb] Set base color 2 */ void SetCurColor2(vec4 const &color); + /* [cmd:scv] Sets all vertices in this scope color. */ + void SetVertColor(vec4 const &color); //------------------------------------------------------------------------- //Internal : Basic triangle/vertex operations @@ -595,7 +723,6 @@ public: //DEBUG //Internal : Vertices operations //------------------------------------------------------------------------- private: - void SetVertColor(vec4 const &color); void SetTexCoordData(vec2 const &new_offset, vec2 const &new_scale); void SetTexCoordData2(vec2 const &new_offset, vec2 const &new_scale); @@ -697,6 +824,7 @@ private: } m_value; + inline MeshTransform() : m_value(Taper) {} inline MeshTransform(Value v) : m_value(v) {} inline operator Value() { return m_value; } }; diff --git a/src/generated/easymesh-parser.cpp b/src/generated/easymesh-parser.cpp index dcc01bf4..9f752afa 100644 --- a/src/generated/easymesh-parser.cpp +++ b/src/generated/easymesh-parser.cpp @@ -475,888 +475,902 @@ namespace lol { case 19: /* Line 677 of lalr1.cc */ -#line 128 "easymesh/easymesh-parser.y" - { mc.m_mesh.DupAndScale(vec3::one, true); } +#line 125 "easymesh/easymesh-parser.y" + { mc.m_mesh.LoopEnd(); } break; case 20: /* Line 677 of lalr1.cc */ -#line 132 "easymesh/easymesh-parser.y" - { mc.m_mesh.OpenBrace(); } +#line 129 "easymesh/easymesh-parser.y" + { mc.m_mesh.LoopStart((yysemantic_stack_[(2) - (2)].ival)); } break; case 21: /* Line 677 of lalr1.cc */ -#line 136 "easymesh/easymesh-parser.y" - { mc.m_mesh.CloseBrace(); } +#line 131 "easymesh/easymesh-parser.y" + { mc.m_mesh.DupAndScale(vec3::one, true); } break; case 22: /* Line 677 of lalr1.cc */ -#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))); } +#line 135 "easymesh/easymesh-parser.y" + { mc.m_mesh.OpenBrace(); } 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])); } +#line 139 "easymesh/easymesh-parser.y" + { mc.m_mesh.CloseBrace(); } break; case 24: /* Line 677 of lalr1.cc */ -#line 142 "easymesh/easymesh-parser.y" +#line 143 "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 25: + +/* Line 677 of lalr1.cc */ +#line 144 "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 26: + +/* Line 677 of lalr1.cc */ +#line 145 "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 25: + case 27: /* Line 677 of lalr1.cc */ -#line 145 "easymesh/easymesh-parser.y" +#line 148 "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 26: + case 28: /* Line 677 of lalr1.cc */ -#line 146 "easymesh/easymesh-parser.y" +#line 149 "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 27: + case 29: /* Line 677 of lalr1.cc */ -#line 147 "easymesh/easymesh-parser.y" +#line 150 "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 28: + case 30: /* Line 677 of lalr1.cc */ -#line 150 "easymesh/easymesh-parser.y" +#line 153 "easymesh/easymesh-parser.y" { mc.m_mesh.SetVertColor(vec4((yysemantic_stack_[(5) - (2)].fval), (yysemantic_stack_[(5) - (3)].fval), (yysemantic_stack_[(5) - (4)].fval), (yysemantic_stack_[(5) - (5)].fval))); } break; - case 29: + case 31: /* Line 677 of lalr1.cc */ -#line 151 "easymesh/easymesh-parser.y" +#line 154 "easymesh/easymesh-parser.y" { mc.m_mesh.SetVertColor(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 30: + case 32: /* Line 677 of lalr1.cc */ -#line 152 "easymesh/easymesh-parser.y" +#line 155 "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.SetVertColor(vec4(v) * (1.f / 255.f)); } break; - case 31: + case 33: /* Line 677 of lalr1.cc */ -#line 158 "easymesh/easymesh-parser.y" +#line 161 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].fval), 0.f, 0.f)); } break; - case 32: + case 34: /* Line 677 of lalr1.cc */ -#line 159 "easymesh/easymesh-parser.y" +#line 162 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3(0.f, (yysemantic_stack_[(2) - (2)].fval), 0.f)); } break; - case 33: + case 35: /* Line 677 of lalr1.cc */ -#line 160 "easymesh/easymesh-parser.y" +#line 163 "easymesh/easymesh-parser.y" { mc.m_mesh.Translate(vec3(0.f, 0.f, (yysemantic_stack_[(2) - (2)].fval))); } break; - case 34: + case 36: /* Line 677 of lalr1.cc */ -#line 161 "easymesh/easymesh-parser.y" +#line 164 "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 35: + case 37: /* Line 677 of lalr1.cc */ -#line 162 "easymesh/easymesh-parser.y" +#line 165 "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 36: + case 38: /* Line 677 of lalr1.cc */ -#line 163 "easymesh/easymesh-parser.y" +#line 166 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 37: + case 39: /* Line 677 of lalr1.cc */ -#line 164 "easymesh/easymesh-parser.y" +#line 167 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 38: + case 40: /* Line 677 of lalr1.cc */ -#line 165 "easymesh/easymesh-parser.y" +#line 168 "easymesh/easymesh-parser.y" { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 39: + case 41: /* Line 677 of lalr1.cc */ -#line 166 "easymesh/easymesh-parser.y" +#line 169 "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 40: + case 42: /* Line 677 of lalr1.cc */ -#line 167 "easymesh/easymesh-parser.y" +#line 170 "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 41: + case 43: /* Line 677 of lalr1.cc */ -#line 168 "easymesh/easymesh-parser.y" +#line 171 "easymesh/easymesh-parser.y" { mc.m_mesh.RadialJitter((yysemantic_stack_[(2) - (2)].fval)); } break; - case 42: + case 44: /* Line 677 of lalr1.cc */ -#line 169 "easymesh/easymesh-parser.y" +#line 172 "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 43: + case 45: /* Line 677 of lalr1.cc */ -#line 170 "easymesh/easymesh-parser.y" +#line 173 "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 44: + case 46: /* Line 677 of lalr1.cc */ -#line 171 "easymesh/easymesh-parser.y" +#line 174 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 45: + case 47: /* Line 677 of lalr1.cc */ -#line 172 "easymesh/easymesh-parser.y" +#line 175 "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 46: + case 48: /* Line 677 of lalr1.cc */ -#line 173 "easymesh/easymesh-parser.y" +#line 176 "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 47: + case 49: /* Line 677 of lalr1.cc */ -#line 174 "easymesh/easymesh-parser.y" +#line 177 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 48: + case 50: /* Line 677 of lalr1.cc */ -#line 175 "easymesh/easymesh-parser.y" +#line 178 "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 49: + case 51: /* Line 677 of lalr1.cc */ -#line 176 "easymesh/easymesh-parser.y" +#line 179 "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 50: + case 52: /* Line 677 of lalr1.cc */ -#line 177 "easymesh/easymesh-parser.y" +#line 180 "easymesh/easymesh-parser.y" { mc.m_mesh.TaperZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 51: + case 53: /* Line 677 of lalr1.cc */ -#line 178 "easymesh/easymesh-parser.y" +#line 181 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 52: + case 54: /* Line 677 of lalr1.cc */ -#line 179 "easymesh/easymesh-parser.y" +#line 182 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 53: + case 55: /* Line 677 of lalr1.cc */ -#line 180 "easymesh/easymesh-parser.y" +#line 183 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 54: + case 56: /* Line 677 of lalr1.cc */ -#line 181 "easymesh/easymesh-parser.y" +#line 184 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 55: + case 57: /* Line 677 of lalr1.cc */ -#line 182 "easymesh/easymesh-parser.y" +#line 185 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 56: + case 58: /* Line 677 of lalr1.cc */ -#line 183 "easymesh/easymesh-parser.y" +#line 186 "easymesh/easymesh-parser.y" { mc.m_mesh.TwistZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 57: + case 59: /* Line 677 of lalr1.cc */ -#line 184 "easymesh/easymesh-parser.y" +#line 187 "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 58: + case 60: /* Line 677 of lalr1.cc */ -#line 185 "easymesh/easymesh-parser.y" +#line 188 "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 59: + case 61: /* Line 677 of lalr1.cc */ -#line 186 "easymesh/easymesh-parser.y" +#line 189 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 60: + case 62: /* Line 677 of lalr1.cc */ -#line 187 "easymesh/easymesh-parser.y" +#line 190 "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 61: + case 63: /* Line 677 of lalr1.cc */ -#line 188 "easymesh/easymesh-parser.y" +#line 191 "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 62: + case 64: /* Line 677 of lalr1.cc */ -#line 189 "easymesh/easymesh-parser.y" +#line 192 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 63: + case 65: /* Line 677 of lalr1.cc */ -#line 190 "easymesh/easymesh-parser.y" +#line 193 "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 64: + case 66: /* Line 677 of lalr1.cc */ -#line 191 "easymesh/easymesh-parser.y" +#line 194 "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 65: + case 67: /* Line 677 of lalr1.cc */ -#line 192 "easymesh/easymesh-parser.y" +#line 195 "easymesh/easymesh-parser.y" { mc.m_mesh.ShearZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 66: + case 68: /* Line 677 of lalr1.cc */ -#line 193 "easymesh/easymesh-parser.y" +#line 196 "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 67: + case 69: /* Line 677 of lalr1.cc */ -#line 194 "easymesh/easymesh-parser.y" +#line 197 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 68: + case 70: /* Line 677 of lalr1.cc */ -#line 195 "easymesh/easymesh-parser.y" +#line 198 "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 69: + case 71: /* Line 677 of lalr1.cc */ -#line 196 "easymesh/easymesh-parser.y" +#line 199 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 70: + case 72: /* Line 677 of lalr1.cc */ -#line 197 "easymesh/easymesh-parser.y" +#line 200 "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 71: + case 73: /* Line 677 of lalr1.cc */ -#line 198 "easymesh/easymesh-parser.y" +#line 201 "easymesh/easymesh-parser.y" { mc.m_mesh.StretchZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 72: + case 74: /* Line 677 of lalr1.cc */ -#line 199 "easymesh/easymesh-parser.y" +#line 202 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 73: + case 75: /* Line 677 of lalr1.cc */ -#line 200 "easymesh/easymesh-parser.y" +#line 203 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 74: + case 76: /* Line 677 of lalr1.cc */ -#line 201 "easymesh/easymesh-parser.y" +#line 204 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 75: + case 77: /* Line 677 of lalr1.cc */ -#line 202 "easymesh/easymesh-parser.y" +#line 205 "easymesh/easymesh-parser.y" { mc.m_mesh.BendXZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 76: + case 78: /* Line 677 of lalr1.cc */ -#line 203 "easymesh/easymesh-parser.y" +#line 206 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 77: + case 79: /* Line 677 of lalr1.cc */ -#line 204 "easymesh/easymesh-parser.y" +#line 207 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 78: + case 80: /* Line 677 of lalr1.cc */ -#line 205 "easymesh/easymesh-parser.y" +#line 208 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYZ((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 79: + case 81: /* Line 677 of lalr1.cc */ -#line 206 "easymesh/easymesh-parser.y" +#line 209 "easymesh/easymesh-parser.y" { mc.m_mesh.BendYZ((yysemantic_stack_[(2) - (2)].fval)); } break; - case 80: + case 82: /* Line 677 of lalr1.cc */ -#line 207 "easymesh/easymesh-parser.y" +#line 210 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZX((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 81: + case 83: /* Line 677 of lalr1.cc */ -#line 208 "easymesh/easymesh-parser.y" +#line 211 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZX((yysemantic_stack_[(2) - (2)].fval)); } break; - case 82: + case 84: /* Line 677 of lalr1.cc */ -#line 209 "easymesh/easymesh-parser.y" +#line 212 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZY((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 83: + case 85: /* Line 677 of lalr1.cc */ -#line 210 "easymesh/easymesh-parser.y" +#line 213 "easymesh/easymesh-parser.y" { mc.m_mesh.BendZY((yysemantic_stack_[(2) - (2)].fval)); } break; - case 84: + case 86: /* Line 677 of lalr1.cc */ -#line 211 "easymesh/easymesh-parser.y" +#line 214 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].fval), 1.f, 1.f)); } break; - case 85: + case 87: /* Line 677 of lalr1.cc */ -#line 212 "easymesh/easymesh-parser.y" +#line 215 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3(1.f, (yysemantic_stack_[(2) - (2)].fval), 1.f)); } break; - case 86: + case 88: /* Line 677 of lalr1.cc */ -#line 213 "easymesh/easymesh-parser.y" +#line 216 "easymesh/easymesh-parser.y" { mc.m_mesh.Scale(vec3(1.f, 1.f, (yysemantic_stack_[(2) - (2)].fval))); } break; - case 87: + case 89: /* Line 677 of lalr1.cc */ -#line 214 "easymesh/easymesh-parser.y" +#line 217 "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 88: + case 90: /* Line 677 of lalr1.cc */ -#line 215 "easymesh/easymesh-parser.y" +#line 218 "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 89: + case 91: /* Line 677 of lalr1.cc */ -#line 216 "easymesh/easymesh-parser.y" +#line 219 "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 90: + case 92: /* Line 677 of lalr1.cc */ -#line 217 "easymesh/easymesh-parser.y" +#line 220 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorX(); } break; - case 91: + case 93: /* Line 677 of lalr1.cc */ -#line 218 "easymesh/easymesh-parser.y" +#line 221 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorY(); } break; - case 92: + case 94: /* Line 677 of lalr1.cc */ -#line 219 "easymesh/easymesh-parser.y" +#line 222 "easymesh/easymesh-parser.y" { mc.m_mesh.MirrorZ(); } break; - case 93: + case 95: /* Line 677 of lalr1.cc */ -#line 220 "easymesh/easymesh-parser.y" +#line 223 "easymesh/easymesh-parser.y" { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].fval)); } break; - case 94: + case 96: /* Line 677 of lalr1.cc */ -#line 221 "easymesh/easymesh-parser.y" +#line 224 "easymesh/easymesh-parser.y" { mc.m_mesh.SplitTriangles((yysemantic_stack_[(2) - (2)].ival)); } break; - case 95: + case 97: /* Line 677 of lalr1.cc */ -#line 222 "easymesh/easymesh-parser.y" +#line 225 "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 96: + case 98: /* Line 677 of lalr1.cc */ -#line 223 "easymesh/easymesh-parser.y" +#line 226 "easymesh/easymesh-parser.y" { mc.m_mesh.ToggleScaleWinding(); } break; - case 97: + case 99: /* Line 677 of lalr1.cc */ -#line 227 "easymesh/easymesh-parser.y" +#line 230 "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 98: + case 100: /* Line 677 of lalr1.cc */ -#line 228 "easymesh/easymesh-parser.y" +#line 231 "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 99: + case 101: /* Line 677 of lalr1.cc */ -#line 229 "easymesh/easymesh-parser.y" +#line 232 "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 100: + case 102: /* Line 677 of lalr1.cc */ -#line 230 "easymesh/easymesh-parser.y" +#line 233 "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 101: + case 103: /* Line 677 of lalr1.cc */ -#line 231 "easymesh/easymesh-parser.y" +#line 234 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSphere((yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 102: + case 104: /* Line 677 of lalr1.cc */ -#line 232 "easymesh/easymesh-parser.y" +#line 235 "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 103: + case 105: /* Line 677 of lalr1.cc */ -#line 233 "easymesh/easymesh-parser.y" +#line 236 "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 104: + case 106: /* Line 677 of lalr1.cc */ -#line 234 "easymesh/easymesh-parser.y" +#line 237 "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 105: + case 107: /* Line 677 of lalr1.cc */ -#line 235 "easymesh/easymesh-parser.y" +#line 238 "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 106: + case 108: /* Line 677 of lalr1.cc */ -#line 236 "easymesh/easymesh-parser.y" +#line 239 "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 107: + case 109: /* Line 677 of lalr1.cc */ -#line 237 "easymesh/easymesh-parser.y" +#line 240 "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 108: + case 110: /* Line 677 of lalr1.cc */ -#line 238 "easymesh/easymesh-parser.y" +#line 241 "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 109: + case 111: /* Line 677 of lalr1.cc */ -#line 239 "easymesh/easymesh-parser.y" +#line 242 "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 110: + case 112: /* Line 677 of lalr1.cc */ -#line 240 "easymesh/easymesh-parser.y" +#line 243 "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 111: + case 113: /* Line 677 of lalr1.cc */ -#line 241 "easymesh/easymesh-parser.y" +#line 244 "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 112: + case 114: /* Line 677 of lalr1.cc */ -#line 242 "easymesh/easymesh-parser.y" +#line 245 "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 113: + case 115: /* Line 677 of lalr1.cc */ -#line 243 "easymesh/easymesh-parser.y" +#line 246 "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 114: + case 116: /* Line 677 of lalr1.cc */ -#line 244 "easymesh/easymesh-parser.y" +#line 247 "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 115: + case 117: /* Line 677 of lalr1.cc */ -#line 245 "easymesh/easymesh-parser.y" +#line 248 "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 116: + case 118: /* Line 677 of lalr1.cc */ -#line 246 "easymesh/easymesh-parser.y" +#line 249 "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 117: + case 119: /* Line 677 of lalr1.cc */ -#line 247 "easymesh/easymesh-parser.y" +#line 250 "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 118: + case 120: /* Line 677 of lalr1.cc */ -#line 248 "easymesh/easymesh-parser.y" +#line 251 "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 119: + case 121: /* Line 677 of lalr1.cc */ -#line 249 "easymesh/easymesh-parser.y" +#line 252 "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 120: + case 122: /* Line 677 of lalr1.cc */ -#line 250 "easymesh/easymesh-parser.y" +#line 253 "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 121: + case 123: /* Line 677 of lalr1.cc */ -#line 251 "easymesh/easymesh-parser.y" +#line 254 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendDisc((yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].fval)); } break; - case 122: + case 124: /* Line 677 of lalr1.cc */ -#line 252 "easymesh/easymesh-parser.y" +#line 255 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].bval)); } break; - case 123: + case 125: /* Line 677 of lalr1.cc */ -#line 253 "easymesh/easymesh-parser.y" +#line 256 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].fval)); } break; - case 124: + case 126: /* Line 677 of lalr1.cc */ -#line 254 "easymesh/easymesh-parser.y" +#line 257 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(3) - (2)].fval), (yysemantic_stack_[(3) - (3)].bval)); } break; - case 125: + case 127: /* Line 677 of lalr1.cc */ -#line 255 "easymesh/easymesh-parser.y" +#line 258 "easymesh/easymesh-parser.y" { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].fval)); } break; - case 126: + case 128: /* Line 677 of lalr1.cc */ -#line 256 "easymesh/easymesh-parser.y" +#line 259 "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 127: + case 129: /* Line 677 of lalr1.cc */ -#line 257 "easymesh/easymesh-parser.y" +#line 260 "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 128: + case 130: /* Line 677 of lalr1.cc */ -#line 258 "easymesh/easymesh-parser.y" +#line 261 "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 129: + case 131: /* Line 677 of lalr1.cc */ -#line 263 "easymesh/easymesh-parser.y" +#line 266 "easymesh/easymesh-parser.y" { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } break; - case 130: + case 132: /* Line 677 of lalr1.cc */ -#line 264 "easymesh/easymesh-parser.y" +#line 267 "easymesh/easymesh-parser.y" { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } break; - case 131: + case 133: /* Line 677 of lalr1.cc */ -#line 265 "easymesh/easymesh-parser.y" +#line 268 "easymesh/easymesh-parser.y" { (yyval.fval) = (float)(yysemantic_stack_[(1) - (1)].ival); } break; - case 132: + case 134: /* Line 677 of lalr1.cc */ -#line 266 "easymesh/easymesh-parser.y" +#line 269 "easymesh/easymesh-parser.y" { (yyval.fval) = -(float)(yysemantic_stack_[(2) - (2)].ival); } break; - case 133: + case 135: /* Line 677 of lalr1.cc */ -#line 270 "easymesh/easymesh-parser.y" +#line 273 "easymesh/easymesh-parser.y" { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); } break; - case 134: + case 136: /* Line 677 of lalr1.cc */ -#line 271 "easymesh/easymesh-parser.y" +#line 274 "easymesh/easymesh-parser.y" { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); } break; - case 135: + case 137: /* Line 677 of lalr1.cc */ -#line 272 "easymesh/easymesh-parser.y" +#line 275 "easymesh/easymesh-parser.y" { (yyval.ival) = (int)(yysemantic_stack_[(1) - (1)].fval); } break; - case 136: + case 138: /* Line 677 of lalr1.cc */ -#line 273 "easymesh/easymesh-parser.y" +#line 276 "easymesh/easymesh-parser.y" { (yyval.ival) = -(int)(yysemantic_stack_[(2) - (2)].fval); } break; - case 137: + case 139: /* Line 677 of lalr1.cc */ -#line 278 "easymesh/easymesh-parser.y" +#line 281 "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 138: + case 140: /* Line 677 of lalr1.cc */ -#line 279 "easymesh/easymesh-parser.y" +#line 282 "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 139: + case 141: /* Line 677 of lalr1.cc */ -#line 283 "easymesh/easymesh-parser.y" +#line 286 "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 140: + case 142: /* Line 677 of lalr1.cc */ -#line 284 "easymesh/easymesh-parser.y" +#line 287 "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 141: + case 143: /* Line 677 of lalr1.cc */ -#line 289 "easymesh/easymesh-parser.y" +#line 292 "easymesh/easymesh-parser.y" { (yyval.bval) = (yysemantic_stack_[(1) - (1)].bval); } break; - case 142: + case 144: /* Line 677 of lalr1.cc */ -#line 290 "easymesh/easymesh-parser.y" +#line 293 "easymesh/easymesh-parser.y" { (yyval.bval) = !!(yysemantic_stack_[(1) - (1)].ival); } break; - case 143: + case 145: /* Line 677 of lalr1.cc */ -#line 291 "easymesh/easymesh-parser.y" +#line 294 "easymesh/easymesh-parser.y" { (yyval.bval) = !!(yysemantic_stack_[(1) - (1)].fval); } break; /* Line 677 of lalr1.cc */ -#line 1360 "generated/easymesh-parser.cpp" +#line 1374 "generated/easymesh-parser.cpp" default: break; } @@ -1561,39 +1575,40 @@ namespace lol { /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char EasyMeshParser::yypact_ninf_ = -112; + const short int EasyMeshParser::yypact_ninf_ = -153; const short int EasyMeshParser::yypact_[] = { - 390, -1, 13, 81, 3, 3, 3, 3, 3, 3, - 3, 3, 3, -112, 3, 3, 3, 3, 3, 3, - 3, 3, 3, -112, 3, 3, 3, 3, 3, 3, - 3, 3, 3, -112, 100, 3, 100, -112, 3, 85, - 85, -112, -57, -57, -57, -57, -57, 3, 85, 100, - 100, 100, 85, 85, 85, 85, 85, 3, 3, 85, - 85, -112, 21, 31, 390, -112, 456, -112, -33, 390, - -112, -112, -112, -112, -112, -112, 119, 3, 3, -112, - -112, 3, -112, -112, 3, -112, -112, -112, 3, 3, - 3, 3, 3, 3, -112, -112, -112, 3, 3, 3, - 3, 3, 3, -112, -112, -112, 3, 3, 3, 3, - 3, 3, -112, 3, 3, -112, 100, 3, -112, -112, - -112, -112, 119, -112, 85, 390, 390, 390, 390, 390, - -112, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, -24, -24, 3, 3, -112, -112, -112, - -112, 390, -7, -112, -112, 119, -112, -112, -26, 3, - 3, 3, 3, -112, 3, 3, -112, -112, 3, -112, - 3, 3, -112, -112, 3, -112, 3, 3, -112, -112, - -11, 3, 3, -112, 3, -112, -112, 85, 2, 12, - 16, 23, 24, 3, 3, -112, 3, -112, 3, -112, - -112, 3, 3, 3, -24, -112, -112, -112, -112, -112, - 3, 3, -7, -112, -112, -112, -112, -112, 3, 3, - 3, 3, -24, -24, -112, -24, -24, -112, -24, -24, - -112, -112, 3, -112, 3, -112, -112, -112, -112, -112, - -112, -112, 3, 3, 3, 3, -112, -24, 3, -112, - 3, -112, -112, 3, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -29, -112, -24, -112, -112, -112, -24, - -112, 3, 0, -112, -24, -112, 3, -112, -24, 3, - -112, 3, 3, -24, -112 + 426, 104, -5, 5, 86, 125, 125, 125, 125, 125, + 125, 125, 125, 125, -153, 125, 125, 125, 125, 125, + 125, 125, 125, 125, -153, 125, 125, 125, 125, 125, + 125, 125, 125, 125, -153, 78, 125, 78, -153, 125, + 104, 104, -153, -58, -58, -58, -58, -58, 125, 104, + 78, 78, 78, 104, 104, 104, 104, 104, 125, 125, + 104, 104, -153, 21, 35, 426, -153, 493, -153, -38, + -32, 426, -153, -153, -153, -153, -153, 127, -153, -153, + -153, -153, 127, 125, 125, -153, -153, 125, -153, -153, + 125, -153, -153, -153, 125, 125, 125, 125, 125, 125, + -153, -153, -153, 125, 125, 125, 125, 125, 125, -153, + -153, -153, 125, 125, 125, 125, 125, 125, -153, 125, + 125, -153, 78, 125, -153, -153, -153, 104, 426, 426, + 426, 426, 426, -153, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, -25, -25, 125, 125, + -153, -153, -153, -153, 426, 426, -20, -153, -153, 127, + -153, -153, -153, -153, -27, 125, 125, 125, 125, -153, + 125, 125, -153, -153, 125, -153, 125, 125, -153, -153, + 125, -153, 125, 125, -153, -153, -14, 125, 125, -153, + 125, 104, -8, -2, -1, 2, 8, 125, 125, -153, + 125, -153, 125, -153, -153, 125, 125, 125, -25, -153, + -153, -153, -153, -153, 125, 125, 12, -20, -153, -153, + -153, -153, -153, 125, 125, 125, 125, -25, -25, -153, + -25, -25, -153, -25, -25, -153, -153, 125, -153, 125, + -153, -153, -153, -153, -153, -153, -153, 125, 125, 125, + 125, -153, -25, 125, -153, 125, -153, -153, -153, 125, + -153, -153, -153, -153, -153, -153, -153, -153, -153, -30, + -153, -25, -153, -153, -153, -25, -153, 125, 10, -153, + -25, -153, 125, -153, -25, 125, -153, 125, 125, -25, + -153 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -1603,50 +1618,51 @@ namespace lol { EasyMeshParser::yydefact_[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 92, 0, 0, 0, 96, 0, 0, - 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 94, 0, 0, 0, 98, 0, + 0, 0, 21, 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, 129, 131, 24, 0, 0, 0, 23, - 27, 0, 26, 30, 0, 29, 31, 36, 0, 52, - 0, 0, 73, 75, 84, 32, 37, 0, 54, 0, - 0, 77, 79, 85, 33, 38, 0, 56, 0, 0, - 81, 83, 86, 0, 0, 35, 0, 89, 88, 41, - 135, 133, 0, 94, 0, 0, 0, 0, 0, 0, - 93, 0, 106, 108, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 123, 125, 0, 0, 1, 2, 4, - 8, 0, 0, 129, 131, 0, 130, 132, 0, 0, - 0, 0, 44, 51, 59, 67, 72, 74, 47, 53, - 62, 69, 76, 78, 50, 55, 65, 71, 80, 82, - 0, 0, 0, 40, 0, 136, 134, 0, 0, 0, - 0, 0, 0, 0, 0, 107, 110, 111, 113, 114, - 101, 0, 0, 0, 121, 143, 142, 141, 122, 124, - 0, 0, 0, 21, 6, 130, 132, 139, 0, 0, - 0, 0, 43, 58, 66, 46, 61, 68, 49, 64, - 70, 137, 0, 34, 0, 87, 95, 14, 15, 16, - 17, 18, 0, 105, 0, 0, 102, 117, 119, 120, - 0, 103, 13, 0, 22, 25, 28, 42, 57, 45, - 60, 48, 63, 0, 39, 100, 104, 109, 112, 116, - 118, 0, 0, 138, 99, 115, 0, 140, 98, 0, - 97, 0, 128, 127, 126 + 0, 0, 22, 0, 0, 3, 5, 7, 12, 0, + 0, 0, 9, 10, 11, 137, 135, 0, 20, 131, + 133, 26, 0, 0, 0, 25, 29, 0, 28, 32, + 0, 31, 33, 38, 0, 54, 0, 0, 75, 77, + 86, 34, 39, 0, 56, 0, 0, 79, 81, 87, + 35, 40, 0, 58, 0, 0, 83, 85, 88, 0, + 0, 37, 0, 91, 90, 43, 96, 0, 0, 0, + 0, 0, 0, 95, 0, 108, 110, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 125, 127, 0, 0, + 1, 2, 4, 8, 0, 0, 0, 131, 133, 0, + 138, 136, 132, 134, 0, 0, 0, 0, 46, 53, + 61, 69, 74, 76, 49, 55, 64, 71, 78, 80, + 52, 57, 67, 73, 82, 84, 0, 0, 0, 42, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, + 112, 113, 115, 116, 103, 0, 0, 0, 123, 145, + 144, 143, 124, 126, 0, 0, 0, 0, 23, 6, + 132, 134, 141, 0, 0, 0, 0, 45, 60, 68, + 48, 63, 70, 51, 66, 72, 139, 0, 36, 0, + 89, 97, 14, 15, 16, 17, 18, 0, 107, 0, + 0, 104, 119, 121, 122, 0, 105, 19, 13, 0, + 24, 27, 30, 44, 59, 47, 62, 50, 65, 0, + 41, 102, 106, 111, 114, 118, 120, 0, 0, 140, + 101, 117, 0, 142, 100, 0, 99, 0, 130, 129, + 128 }; /* YYPGOTO[NTERM-NUM]. */ const short int EasyMeshParser::yypgoto_[] = { - -112, -112, -4, -112, 28, -112, -112, -112, 160, -111, - -112, -112, -112, -2, 205, 1, 55, 63 + -153, -153, -7, -153, 18, -153, -153, -153, -153, 83, + -152, -153, -153, -153, -3, 237, 38, 50, 31 }; /* YYDEFGOTO[NTERM-NUM]. */ const short int EasyMeshParser::yydefgoto_[] = { - -1, 62, 63, 64, 65, 66, 67, 68, 69, 214, - 70, 71, 72, 78, 123, 115, 79, 208 + -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 219, 72, 73, 74, 84, 78, 121, 85, 212 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1656,116 +1672,124 @@ namespace lol { const unsigned short int EasyMeshParser::yytable_[] = { - 81, 84, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 61, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 147, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 148, 114, 116, 117, 151, 119, 118, 73, 74, - 205, 206, 207, 273, 76, 130, 217, 132, 134, 136, - 133, 135, 137, 73, 74, 143, 144, 82, 85, 76, - 149, 231, 213, 73, 74, 152, 75, 73, 74, 76, - 77, 237, 277, 76, 156, 158, 159, 73, 74, 160, - 80, 238, 161, 76, 77, 239, 162, 163, 164, 165, - 166, 167, 240, 241, 150, 168, 169, 170, 171, 172, - 173, 252, 0, 0, 174, 175, 176, 177, 178, 179, - 0, 180, 181, 0, 182, 184, 0, 183, 0, 0, - 185, 188, 189, 190, 191, 192, 0, 0, 0, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 0, 0, 210, 211, 73, 74, 212, 83, 120, - 121, 76, 77, 215, 0, 122, 218, 219, 220, 221, - 222, 0, 223, 224, 73, 74, 225, 0, 226, 227, - 76, 113, 228, 0, 229, 230, 0, 0, 232, 233, - 234, 0, 235, 153, 154, 0, 0, 0, 0, 155, - 0, 242, 243, 0, 244, 0, 245, 0, 0, 246, - 247, 248, 125, 126, 127, 128, 129, 209, 250, 251, - 0, 0, 0, 0, 0, 0, 253, 254, 255, 256, + 87, 90, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 62, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 150, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 154, 120, 122, 123, 151, 125, 155, 79, 80, + 209, 210, 211, 279, 82, 133, 222, 135, 137, 139, + 218, 79, 80, 88, 91, 146, 147, 82, 152, 236, + 79, 80, 242, 81, 156, 258, 82, 83, 243, 244, + 79, 80, 245, 86, 160, 124, 82, 83, 246, 162, + 164, 165, 257, 283, 166, 153, 0, 167, 136, 138, + 140, 168, 169, 170, 171, 172, 173, 0, 0, 0, + 174, 175, 176, 177, 178, 179, 0, 0, 0, 180, + 181, 182, 183, 184, 185, 0, 186, 187, 0, 188, + 190, 192, 193, 194, 195, 196, 128, 129, 130, 131, + 132, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 79, 80, 214, 215, 216, 217, 82, + 119, 79, 80, 0, 89, 0, 220, 82, 83, 0, + 189, 223, 224, 225, 226, 227, 0, 228, 229, 75, + 76, 230, 0, 231, 232, 77, 0, 233, 213, 234, + 235, 0, 0, 237, 238, 239, 0, 240, 0, 0, + 79, 80, 157, 158, 247, 248, 82, 249, 159, 250, + 0, 0, 251, 252, 253, 0, 0, 0, 0, 0, + 0, 255, 256, 0, 0, 0, 0, 0, 0, 0, + 259, 260, 261, 262, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 269, 0, 270, 0, 0, 254, + 0, 0, 0, 0, 271, 272, 273, 274, 0, 0, + 276, 0, 277, 0, 0, 0, 278, 0, 263, 264, + 0, 265, 266, 0, 267, 268, 0, 0, 0, 0, + 0, 0, 0, 0, 282, 0, 0, 126, 127, 285, + 0, 0, 287, 275, 288, 289, 134, 0, 0, 0, + 141, 142, 143, 144, 145, 0, 0, 148, 149, 0, + 0, 0, 280, 0, 0, 0, 281, 0, 0, 0, + 0, 284, 0, 0, 161, 286, 0, 0, 0, 163, + 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 263, 0, 264, 0, 0, 0, 0, 0, 0, 0, - 265, 266, 267, 268, 0, 124, 270, 0, 271, 0, - 0, 272, 0, 131, 0, 0, 0, 138, 139, 140, - 141, 142, 0, 0, 145, 146, 0, 249, 0, 276, - 0, 0, 0, 0, 279, 0, 0, 281, 0, 282, - 283, 157, 0, 0, 0, 257, 258, 0, 259, 260, - 0, 261, 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 186, 274, 187, - 0, 0, 275, 0, 0, 0, 0, 278, 0, 0, - 0, 280, 0, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 236, 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, 60, 0, 0, 0, 0, 0, 61, 1, + 0, 0, 0, 0, 0, 0, 221, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 241, 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, 60 + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 0, 0, 0, 0, 0, 62, 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, 60, 61 }; /* YYCHECK. */ const short int EasyMeshParser::yycheck_[] = { - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 68, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 0, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 0, 34, 35, 36, 68, 38, 36, 64, 65, - 64, 65, 66, 72, 70, 47, 72, 49, 50, 51, - 49, 50, 51, 64, 65, 57, 58, 2, 3, 70, - 64, 72, 69, 64, 65, 69, 67, 64, 65, 70, - 71, 69, 72, 70, 76, 77, 78, 64, 65, 81, - 67, 69, 84, 70, 71, 69, 88, 89, 90, 91, - 92, 93, 69, 69, 66, 97, 98, 99, 100, 101, - 102, 212, -1, -1, 106, 107, 108, 109, 110, 111, - -1, 113, 114, -1, 116, 117, -1, 116, -1, -1, - 122, 125, 126, 127, 128, 129, -1, -1, -1, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, -1, -1, 145, 146, 64, 65, 151, 67, 64, - 65, 70, 71, 155, -1, 70, 158, 159, 160, 161, - 162, -1, 164, 165, 64, 65, 168, -1, 170, 171, - 70, 71, 174, -1, 176, 177, -1, -1, 180, 181, - 182, -1, 184, 64, 65, -1, -1, -1, -1, 70, - -1, 193, 194, -1, 196, -1, 198, -1, -1, 201, - 202, 203, 42, 43, 44, 45, 46, 144, 210, 211, - -1, -1, -1, -1, -1, -1, 218, 219, 220, 221, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 69, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 0, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 69, 35, 36, 37, 0, 39, 69, 65, 66, + 65, 66, 67, 73, 71, 48, 73, 50, 51, 52, + 70, 65, 66, 3, 4, 58, 59, 71, 65, 73, + 65, 66, 70, 68, 71, 217, 71, 72, 70, 70, + 65, 66, 70, 68, 77, 37, 71, 72, 70, 82, + 83, 84, 70, 73, 87, 67, -1, 90, 50, 51, + 52, 94, 95, 96, 97, 98, 99, -1, -1, -1, + 103, 104, 105, 106, 107, 108, -1, -1, -1, 112, + 113, 114, 115, 116, 117, -1, 119, 120, -1, 122, + 123, 128, 129, 130, 131, 132, 43, 44, 45, 46, + 47, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 65, 66, 148, 149, 154, 155, 71, + 72, 65, 66, -1, 68, -1, 159, 71, 72, -1, + 122, 164, 165, 166, 167, 168, -1, 170, 171, 65, + 66, 174, -1, 176, 177, 71, -1, 180, 147, 182, + 183, -1, -1, 186, 187, 188, -1, 190, -1, -1, + 65, 66, 65, 66, 197, 198, 71, 200, 71, 202, + -1, -1, 205, 206, 207, -1, -1, -1, -1, -1, + -1, 214, 215, -1, -1, -1, -1, -1, -1, -1, + 223, 224, 225, 226, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 237, -1, 239, -1, -1, 208, + -1, -1, -1, -1, 247, 248, 249, 250, -1, -1, + 253, -1, 255, -1, -1, -1, 259, -1, 227, 228, + -1, 230, 231, -1, 233, 234, -1, -1, -1, -1, + -1, -1, -1, -1, 277, -1, -1, 40, 41, 282, + -1, -1, 285, 252, 287, 288, 49, -1, -1, -1, + 53, 54, 55, 56, 57, -1, -1, 60, 61, -1, + -1, -1, 271, -1, -1, -1, 275, -1, -1, -1, + -1, 280, -1, -1, 77, 284, -1, -1, -1, 82, + 289, -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, - 232, -1, 234, -1, -1, -1, -1, -1, -1, -1, - 242, 243, 244, 245, -1, 40, 248, -1, 250, -1, - -1, 253, -1, 48, -1, -1, -1, 52, 53, 54, - 55, 56, -1, -1, 59, 60, -1, 204, -1, 271, - -1, -1, -1, -1, 276, -1, -1, 279, -1, 281, - 282, 76, -1, -1, -1, 222, 223, -1, 225, 226, - -1, 228, 229, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 122, 265, 124, - -1, -1, 269, -1, -1, -1, -1, 274, -1, -1, - -1, 278, -1, -1, -1, -1, 283, -1, -1, -1, + -1, -1, -1, -1, 127, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 155, -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, 159, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 187, 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, 62, -1, -1, -1, -1, -1, 68, 3, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 191, 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, 62 + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + -1, -1, -1, -1, -1, 69, 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, 62, 63 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1779,29 +1803,30 @@ namespace lol { 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, - 62, 68, 74, 75, 76, 77, 78, 79, 80, 81, - 83, 84, 85, 64, 65, 67, 70, 71, 86, 89, - 67, 86, 89, 67, 86, 89, 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, 71, 86, 88, 86, 86, 88, 86, - 64, 65, 70, 87, 87, 81, 81, 81, 81, 81, - 86, 87, 86, 88, 86, 88, 86, 88, 87, 87, - 87, 87, 87, 86, 86, 87, 87, 0, 0, 75, - 77, 68, 75, 64, 65, 70, 86, 87, 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, 88, 86, 86, 87, 87, 75, 75, - 75, 75, 75, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 64, 65, 66, 90, 90, - 86, 86, 75, 69, 82, 86, 87, 72, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 72, 86, 86, 86, 86, 87, 69, 69, 69, - 69, 69, 86, 86, 86, 86, 86, 86, 86, 90, - 86, 86, 82, 86, 86, 86, 86, 90, 90, 90, - 90, 90, 90, 86, 86, 86, 86, 86, 86, 90, - 86, 86, 86, 72, 90, 90, 86, 72, 90, 86, - 90, 86, 86, 86, 90 + 62, 63, 69, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 85, 86, 87, 65, 66, 71, 89, 65, + 66, 68, 71, 72, 88, 91, 68, 88, 91, 68, + 88, 91, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 72, + 88, 90, 88, 88, 90, 88, 89, 89, 83, 83, + 83, 83, 83, 88, 89, 88, 90, 88, 90, 88, + 90, 89, 89, 89, 89, 89, 88, 88, 89, 89, + 0, 0, 76, 78, 69, 69, 76, 65, 66, 71, + 88, 89, 88, 89, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 90, + 88, 89, 76, 76, 76, 76, 76, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 65, + 66, 67, 92, 92, 88, 88, 76, 76, 70, 84, + 88, 89, 73, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 73, 88, 88, 88, + 88, 89, 70, 70, 70, 70, 70, 88, 88, 88, + 88, 88, 88, 88, 92, 88, 88, 70, 84, 88, + 88, 88, 88, 92, 92, 92, 92, 92, 92, 88, + 88, 88, 88, 88, 88, 92, 88, 88, 88, 73, + 92, 92, 88, 73, 92, 88, 92, 88, 88, 88, + 92 }; #if YYDEBUG @@ -1816,8 +1841,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, 321, 322, 91, 93, - 45, 40, 41 + 315, 316, 317, 318, 319, 320, 321, 322, 323, 91, + 93, 45, 40, 41 }; #endif @@ -1825,21 +1850,21 @@ namespace lol { const unsigned char EasyMeshParser::yyr1_[] = { - 0, 73, 74, 75, 75, 76, 76, 77, 77, 78, - 78, 78, 78, 78, 79, 79, 79, 79, 79, 80, - 81, 82, 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, 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, 84, 84, 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, 85, 85, 85, 85, 85, 86, - 86, 86, 86, 87, 87, 87, 87, 88, 88, 89, - 89, 90, 90, 90 + 0, 74, 75, 76, 76, 77, 77, 78, 78, 79, + 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, + 81, 82, 83, 84, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 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, 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, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 88, 88, 88, 88, 89, 89, 89, 89, 90, + 90, 91, 91, 92, 92, 92 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1847,20 +1872,20 @@ namespace lol { EasyMeshParser::yyr2_[] = { 0, 2, 2, 1, 2, 1, 3, 1, 2, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 5, 2, 2, 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, 4, + 2, 1, 1, 1, 5, 2, 2, 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 @@ -1869,25 +1894,25 @@ namespace lol { const char* const EasyMeshParser::yytname_[] = { - "T_END", "error", "$undefined", "T_COLOR", "T_BCOLOR", "T_VCOLOR", - "T_TRANSLATEX", "T_ROTATEX", "T_TAPERX", "T_TWISTX", "T_SHEARX", - "T_STRETCHX", "T_BENDXY", "T_BENDXZ", "T_SCALEX", "T_MIRRORX", - "T_TRANSLATEY", "T_ROTATEY", "T_TAPERY", "T_TWISTY", "T_SHEARY", - "T_STRETCHY", "T_BENDYX", "T_BENDYZ", "T_SCALEY", "T_MIRRORY", - "T_TRANSLATEZ", "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_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 + "T_END", "error", "$undefined", "T_LOOP", "T_COLOR", "T_BCOLOR", + "T_VCOLOR", "T_TRANSLATEX", "T_ROTATEX", "T_TAPERX", "T_TWISTX", + "T_SHEARX", "T_STRETCHX", "T_BENDXY", "T_BENDXZ", "T_SCALEX", + "T_MIRRORX", "T_TRANSLATEY", "T_ROTATEY", "T_TAPERY", "T_TWISTY", + "T_SHEARY", "T_STRETCHY", "T_BENDYX", "T_BENDYZ", "T_SCALEY", + "T_MIRRORY", "T_TRANSLATEZ", "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_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", "doloop", "pre_brace_command", + "mesh_open", "mesh_close", "color_command", "transform_command", + "primitive_command", "fv", "iv", "v3", "v4", "bv", 0 }; #endif @@ -1896,65 +1921,66 @@ namespace lol { const EasyMeshParser::rhs_number_type EasyMeshParser::yyrhs_[] = { - 74, 0, -1, 75, 0, -1, 76, -1, 76, 75, - -1, 77, -1, 81, 75, 82, -1, 78, -1, 78, - 77, -1, 83, -1, 84, -1, 85, -1, 79, -1, - 80, 68, 75, 82, -1, 44, 81, 75, 69, -1, - 45, 81, 75, 69, -1, 46, 81, 75, 69, -1, - 47, 81, 75, 69, -1, 48, 81, 75, 69, -1, - 43, -1, 68, -1, 69, -1, 3, 86, 86, 86, - 86, -1, 3, 89, -1, 3, 67, -1, 4, 86, - 86, 86, 86, -1, 4, 89, -1, 4, 67, -1, - 5, 86, 86, 86, 86, -1, 5, 89, -1, 5, - 67, -1, 6, 86, -1, 16, 86, -1, 26, 86, - -1, 36, 86, 86, 86, -1, 36, 88, -1, 7, - 86, -1, 17, 86, -1, 27, 86, -1, 37, 86, - 86, 86, 86, -1, 37, 86, 88, -1, 40, 86, - -1, 8, 86, 86, 86, 90, -1, 8, 86, 86, - 86, -1, 8, 86, 86, -1, 18, 86, 86, 86, - 90, -1, 18, 86, 86, 86, -1, 18, 86, 86, - -1, 28, 86, 86, 86, 90, -1, 28, 86, 86, - 86, -1, 28, 86, 86, -1, 9, 86, 86, -1, - 9, 86, -1, 19, 86, 86, -1, 19, 86, -1, - 29, 86, 86, -1, 29, 86, -1, 10, 86, 86, - 86, 90, -1, 10, 86, 86, 86, -1, 10, 86, - 86, -1, 20, 86, 86, 86, 90, -1, 20, 86, - 86, 86, -1, 20, 86, 86, -1, 30, 86, 86, - 86, 90, -1, 30, 86, 86, 86, -1, 30, 86, - 86, -1, 11, 86, 86, 86, -1, 11, 86, 86, - -1, 21, 86, 86, 86, -1, 21, 86, 86, -1, - 31, 86, 86, 86, -1, 31, 86, 86, -1, 12, - 86, 86, -1, 12, 86, -1, 13, 86, 86, -1, - 13, 86, -1, 22, 86, 86, -1, 22, 86, -1, - 23, 86, 86, -1, 23, 86, -1, 32, 86, 86, - -1, 32, 86, -1, 33, 86, 86, -1, 33, 86, - -1, 14, 86, -1, 24, 86, -1, 34, 86, -1, - 38, 86, 86, 86, -1, 38, 88, -1, 38, 86, - -1, 15, -1, 25, -1, 35, -1, 49, 86, -1, - 41, 87, -1, 42, 87, 87, 87, -1, 39, -1, - 50, 87, 86, 86, 86, 90, 90, 90, -1, 50, - 87, 86, 86, 86, 90, 90, -1, 50, 87, 86, - 86, 86, 90, -1, 50, 87, 86, 86, 86, -1, - 54, 87, 86, -1, 55, 87, 86, 86, -1, 62, - 87, 86, 86, -1, 51, 86, 86, 86, 86, -1, - 51, 86, 86, 86, -1, 51, 86, -1, 51, 88, - 86, -1, 51, 88, -1, 52, 86, 86, 86, 86, - -1, 52, 86, 86, -1, 52, 88, 86, -1, 53, - 86, 86, 86, 86, -1, 53, 86, 86, -1, 53, - 88, 86, -1, 56, 87, 86, 86, 90, 90, -1, - 56, 87, 86, 86, 90, -1, 56, 87, 86, 86, - -1, 57, 87, 86, 86, 86, -1, 57, 87, 86, - 86, -1, 58, 87, 86, 90, -1, 58, 87, 86, - -1, 59, 86, 90, -1, 59, 86, -1, 60, 86, - 90, -1, 60, 86, -1, 61, 87, 86, 86, 86, - 86, 86, 86, 86, 86, 90, -1, 61, 87, 86, - 86, 86, 86, 86, 86, 86, 86, -1, 61, 87, - 86, 86, 86, 86, 86, 86, 86, -1, 64, -1, - 70, 86, -1, 65, -1, 70, 87, -1, 65, -1, - 70, 87, -1, 64, -1, 70, 86, -1, 71, 86, - 72, -1, 71, 86, 86, 86, 72, -1, 71, 86, - 72, -1, 71, 86, 86, 86, 86, 72, -1, 66, - -1, 65, -1, 64, -1 + 75, 0, -1, 76, 0, -1, 77, -1, 77, 76, + -1, 78, -1, 83, 76, 84, -1, 79, -1, 79, + 78, -1, 85, -1, 86, -1, 87, -1, 80, -1, + 82, 69, 76, 84, -1, 45, 83, 76, 70, -1, + 46, 83, 76, 70, -1, 47, 83, 76, 70, -1, + 48, 83, 76, 70, -1, 49, 83, 76, 70, -1, + 81, 69, 76, 70, -1, 3, 89, -1, 44, -1, + 69, -1, 70, -1, 4, 88, 88, 88, 88, -1, + 4, 91, -1, 4, 68, -1, 5, 88, 88, 88, + 88, -1, 5, 91, -1, 5, 68, -1, 6, 88, + 88, 88, 88, -1, 6, 91, -1, 6, 68, -1, + 7, 88, -1, 17, 88, -1, 27, 88, -1, 37, + 88, 88, 88, -1, 37, 90, -1, 8, 88, -1, + 18, 88, -1, 28, 88, -1, 38, 88, 88, 88, + 88, -1, 38, 88, 90, -1, 41, 88, -1, 9, + 88, 88, 88, 92, -1, 9, 88, 88, 88, -1, + 9, 88, 88, -1, 19, 88, 88, 88, 92, -1, + 19, 88, 88, 88, -1, 19, 88, 88, -1, 29, + 88, 88, 88, 92, -1, 29, 88, 88, 88, -1, + 29, 88, 88, -1, 10, 88, 88, -1, 10, 88, + -1, 20, 88, 88, -1, 20, 88, -1, 30, 88, + 88, -1, 30, 88, -1, 11, 88, 88, 88, 92, + -1, 11, 88, 88, 88, -1, 11, 88, 88, -1, + 21, 88, 88, 88, 92, -1, 21, 88, 88, 88, + -1, 21, 88, 88, -1, 31, 88, 88, 88, 92, + -1, 31, 88, 88, 88, -1, 31, 88, 88, -1, + 12, 88, 88, 88, -1, 12, 88, 88, -1, 22, + 88, 88, 88, -1, 22, 88, 88, -1, 32, 88, + 88, 88, -1, 32, 88, 88, -1, 13, 88, 88, + -1, 13, 88, -1, 14, 88, 88, -1, 14, 88, + -1, 23, 88, 88, -1, 23, 88, -1, 24, 88, + 88, -1, 24, 88, -1, 33, 88, 88, -1, 33, + 88, -1, 34, 88, 88, -1, 34, 88, -1, 15, + 88, -1, 25, 88, -1, 35, 88, -1, 39, 88, + 88, 88, -1, 39, 90, -1, 39, 88, -1, 16, + -1, 26, -1, 36, -1, 50, 88, -1, 42, 89, + -1, 43, 89, 89, 89, -1, 40, -1, 51, 89, + 88, 88, 88, 92, 92, 92, -1, 51, 89, 88, + 88, 88, 92, 92, -1, 51, 89, 88, 88, 88, + 92, -1, 51, 89, 88, 88, 88, -1, 55, 89, + 88, -1, 56, 89, 88, 88, -1, 63, 89, 88, + 88, -1, 52, 88, 88, 88, 88, -1, 52, 88, + 88, 88, -1, 52, 88, -1, 52, 90, 88, -1, + 52, 90, -1, 53, 88, 88, 88, 88, -1, 53, + 88, 88, -1, 53, 90, 88, -1, 54, 88, 88, + 88, 88, -1, 54, 88, 88, -1, 54, 90, 88, + -1, 57, 89, 88, 88, 92, 92, -1, 57, 89, + 88, 88, 92, -1, 57, 89, 88, 88, -1, 58, + 89, 88, 88, 88, -1, 58, 89, 88, 88, -1, + 59, 89, 88, 92, -1, 59, 89, 88, -1, 60, + 88, 92, -1, 60, 88, -1, 61, 88, 92, -1, + 61, 88, -1, 62, 89, 88, 88, 88, 88, 88, + 88, 88, 88, 92, -1, 62, 89, 88, 88, 88, + 88, 88, 88, 88, 88, -1, 62, 89, 88, 88, + 88, 88, 88, 88, 88, -1, 65, -1, 71, 88, + -1, 66, -1, 71, 89, -1, 66, -1, 71, 89, + -1, 65, -1, 71, 88, -1, 72, 88, 73, -1, + 72, 88, 88, 88, 73, -1, 72, 88, 73, -1, + 72, 88, 88, 88, 88, 73, -1, 67, -1, 66, + -1, 65, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -1964,19 +1990,19 @@ namespace lol { { 0, 0, 3, 6, 8, 11, 13, 17, 19, 22, 24, 26, 28, 30, 35, 40, 45, 50, 55, 60, - 62, 64, 66, 72, 75, 78, 84, 87, 90, 96, - 99, 102, 105, 108, 111, 116, 119, 122, 125, 128, - 134, 138, 141, 147, 152, 156, 162, 167, 171, 177, - 182, 186, 190, 193, 197, 200, 204, 207, 213, 218, - 222, 228, 233, 237, 243, 248, 252, 257, 261, 266, - 270, 275, 279, 283, 286, 290, 293, 297, 300, 304, - 307, 311, 314, 318, 321, 324, 327, 330, 335, 338, - 341, 343, 345, 347, 350, 353, 358, 360, 369, 377, - 384, 390, 394, 399, 404, 410, 415, 418, 422, 425, - 431, 435, 439, 445, 449, 453, 460, 466, 471, 477, - 482, 487, 491, 495, 498, 502, 505, 517, 528, 538, - 540, 543, 545, 548, 550, 553, 555, 558, 562, 568, - 572, 579, 581, 583 + 65, 68, 70, 72, 74, 80, 83, 86, 92, 95, + 98, 104, 107, 110, 113, 116, 119, 124, 127, 130, + 133, 136, 142, 146, 149, 155, 160, 164, 170, 175, + 179, 185, 190, 194, 198, 201, 205, 208, 212, 215, + 221, 226, 230, 236, 241, 245, 251, 256, 260, 265, + 269, 274, 278, 283, 287, 291, 294, 298, 301, 305, + 308, 312, 315, 319, 322, 326, 329, 332, 335, 338, + 343, 346, 349, 351, 353, 355, 358, 361, 366, 368, + 377, 385, 392, 398, 402, 407, 412, 418, 423, 426, + 430, 433, 439, 443, 447, 453, 457, 461, 468, 474, + 479, 485, 490, 495, 499, 503, 506, 510, 513, 525, + 536, 546, 548, 551, 553, 556, 558, 561, 563, 566, + 570, 576, 580, 587, 589, 591 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ @@ -1984,20 +2010,20 @@ namespace lol { EasyMeshParser::yyrline_[] = { 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, 150, 151, - 152, 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, 219, 220, 221, 222, 223, 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, 254, 255, 256, 257, 258, 263, - 264, 265, 266, 270, 271, 272, 273, 278, 279, 283, - 284, 289, 290, 291 + 113, 114, 115, 116, 120, 121, 122, 123, 124, 125, + 129, 131, 135, 139, 143, 144, 145, 148, 149, 150, + 153, 154, 155, 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, 219, 220, 221, 222, 223, 224, 225, 226, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 266, 267, 268, 269, 273, 274, 275, 276, 281, + 282, 286, 287, 292, 293, 294 }; // Print the state stack on the debug stream. @@ -2041,12 +2067,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, - 71, 72, 2, 2, 2, 70, 2, 2, 2, 2, + 72, 73, 2, 2, 2, 71, 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, 68, 2, 69, 2, 2, 2, 2, 2, 2, + 2, 69, 2, 70, 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, @@ -2069,7 +2095,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, 66, 67 + 65, 66, 67, 68 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -2078,26 +2104,26 @@ namespace lol { } const int EasyMeshParser::yyeof_ = 0; - const int EasyMeshParser::yylast_ = 518; - const int EasyMeshParser::yynnts_ = 18; + const int EasyMeshParser::yylast_ = 556; + const int EasyMeshParser::yynnts_ = 19; const int EasyMeshParser::yyempty_ = -2; - const int EasyMeshParser::yyfinal_ = 147; + const int EasyMeshParser::yyfinal_ = 150; const int EasyMeshParser::yyterror_ = 1; const int EasyMeshParser::yyerrcode_ = 256; - const int EasyMeshParser::yyntokens_ = 73; + const int EasyMeshParser::yyntokens_ = 74; - const unsigned int EasyMeshParser::yyuser_token_number_max_ = 322; + const unsigned int EasyMeshParser::yyuser_token_number_max_ = 323; const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; } // lol /* Line 1053 of lalr1.cc */ -#line 2097 "generated/easymesh-parser.cpp" +#line 2123 "generated/easymesh-parser.cpp" /* Line 1055 of lalr1.cc */ -#line 294 "easymesh/easymesh-parser.y" +#line 297 "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 ea037a50..01df44ae 100644 --- a/src/generated/easymesh-parser.h +++ b/src/generated/easymesh-parser.h @@ -136,71 +136,72 @@ namespace lol { /* Tokens. */ enum yytokentype { T_END = 0, - T_COLOR = 258, - T_BCOLOR = 259, - T_VCOLOR = 260, - T_TRANSLATEX = 261, - T_ROTATEX = 262, - T_TAPERX = 263, - T_TWISTX = 264, - T_SHEARX = 265, - T_STRETCHX = 266, - T_BENDXY = 267, - T_BENDXZ = 268, - T_SCALEX = 269, - T_MIRRORX = 270, - T_TRANSLATEY = 271, - T_ROTATEY = 272, - T_TAPERY = 273, - T_TWISTY = 274, - T_SHEARY = 275, - T_STRETCHY = 276, - T_BENDYX = 277, - T_BENDYZ = 278, - T_SCALEY = 279, - T_MIRRORY = 280, - T_TRANSLATEZ = 281, - T_ROTATEZ = 282, - T_TAPERZ = 283, - T_TWISTZ = 284, - T_SHEARZ = 285, - T_STRETCHZ = 286, - T_BENDZX = 287, - T_BENDZY = 288, - T_SCALEZ = 289, - T_MIRRORZ = 290, - T_TRANSLATE = 291, - T_ROTATE = 292, - T_SCALE = 293, - T_TOGGLESCALEWINDING = 294, - T_RADIALJITTER = 295, - T_SPLITTRIANGLE = 296, - T_SMOOTHMESH = 297, - T_DUPLICATE = 298, - T_CSGUNION = 299, - T_CSGSUBSTRACT = 300, - T_CSGSUBSTRACTLOSS = 301, - T_CSGAND = 302, - T_CSGXOR = 303, - T_CHAMFER = 304, - T_CYLINDER = 305, - T_BOX = 306, - T_SMOOTHCHAMFBOX = 307, - T_FLATCHAMFBOX = 308, - T_SPHERE = 309, - T_CAPSULE = 310, - T_STAR = 311, - T_EXPANDEDSTAR = 312, - T_DISC = 313, - T_TRIANGLE = 314, - T_QUAD = 315, - T_COG = 316, - T_TORUS = 317, - T_ERROR = 318, - F_NUMBER = 319, - I_NUMBER = 320, - BOOLEAN = 321, - COLOR = 322 + T_LOOP = 258, + T_COLOR = 259, + T_BCOLOR = 260, + T_VCOLOR = 261, + T_TRANSLATEX = 262, + T_ROTATEX = 263, + T_TAPERX = 264, + T_TWISTX = 265, + T_SHEARX = 266, + T_STRETCHX = 267, + T_BENDXY = 268, + T_BENDXZ = 269, + T_SCALEX = 270, + T_MIRRORX = 271, + T_TRANSLATEY = 272, + T_ROTATEY = 273, + T_TAPERY = 274, + T_TWISTY = 275, + T_SHEARY = 276, + T_STRETCHY = 277, + T_BENDYX = 278, + T_BENDYZ = 279, + T_SCALEY = 280, + T_MIRRORY = 281, + T_TRANSLATEZ = 282, + T_ROTATEZ = 283, + T_TAPERZ = 284, + T_TWISTZ = 285, + T_SHEARZ = 286, + T_STRETCHZ = 287, + T_BENDZX = 288, + T_BENDZY = 289, + T_SCALEZ = 290, + T_MIRRORZ = 291, + T_TRANSLATE = 292, + T_ROTATE = 293, + T_SCALE = 294, + T_TOGGLESCALEWINDING = 295, + T_RADIALJITTER = 296, + T_SPLITTRIANGLE = 297, + T_SMOOTHMESH = 298, + T_DUPLICATE = 299, + T_CSGUNION = 300, + T_CSGSUBSTRACT = 301, + T_CSGSUBSTRACTLOSS = 302, + T_CSGAND = 303, + T_CSGXOR = 304, + T_CHAMFER = 305, + T_CYLINDER = 306, + T_BOX = 307, + T_SMOOTHCHAMFBOX = 308, + T_FLATCHAMFBOX = 309, + T_SPHERE = 310, + T_CAPSULE = 311, + T_STAR = 312, + T_EXPANDEDSTAR = 313, + T_DISC = 314, + T_TRIANGLE = 315, + T_QUAD = 316, + T_COG = 317, + T_TORUS = 318, + T_ERROR = 319, + F_NUMBER = 320, + I_NUMBER = 321, + BOOLEAN = 322, + COLOR = 323 }; }; @@ -279,7 +280,7 @@ namespace lol { /* Tables. */ /// For a state, the index in \a yytable_ of its portion. static const short int yypact_[]; - static const signed char yypact_ninf_; + static const short int yypact_ninf_; /// For a state, default rule to reduce. /// Unless\a yytable_ specifies something else to do. @@ -374,7 +375,7 @@ namespace lol { } // lol /* Line 34 of lalr1.cc */ -#line 378 "generated/easymesh-parser.h" +#line 379 "generated/easymesh-parser.h" diff --git a/src/generated/easymesh-scanner.cpp b/src/generated/easymesh-scanner.cpp index c65e2ad7..554ef155 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 80 -#define YY_END_OF_BUFFER 81 +#define YY_NUM_RULES 81 +#define YY_END_OF_BUFFER 82 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -339,43 +339,43 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[316] = +static yyconst flex_int16_t yy_accept[320] = { 0, - 0, 0, 81, 79, 78, 77, 79, 71, 72, 79, - 70, 79, 79, 68, 79, 75, 76, 79, 79, 79, - 79, 79, 79, 17, 40, 13, 73, 74, 0, 0, - 68, 67, 69, 0, 52, 48, 57, 0, 0, 59, - 55, 58, 0, 0, 44, 0, 0, 0, 0, 41, - 42, 43, 0, 18, 0, 14, 15, 16, 7, 0, - 0, 0, 0, 0, 37, 38, 39, 0, 0, 0, - 0, 10, 11, 12, 0, 0, 69, 0, 0, 60, - 0, 56, 0, 0, 0, 51, 0, 0, 0, 0, - 0, 0, 47, 0, 0, 0, 0, 0, 8, 9, - - 0, 0, 25, 26, 27, 0, 0, 0, 0, 28, - 29, 30, 0, 19, 20, 21, 0, 0, 6, 0, - 22, 23, 24, 61, 0, 67, 0, 50, 0, 0, - 0, 0, 0, 0, 0, 0, 54, 53, 49, 31, - 32, 33, 34, 35, 36, 0, 0, 4, 2, 1, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 0, 45, 0, 0, 0, 65, 0, 62, + 0, 0, 82, 80, 79, 78, 80, 72, 73, 80, + 71, 80, 80, 69, 80, 76, 77, 80, 80, 80, + 80, 80, 80, 80, 18, 41, 14, 74, 75, 0, + 0, 69, 68, 70, 0, 53, 49, 58, 0, 0, + 60, 56, 59, 0, 0, 45, 0, 0, 0, 0, + 6, 0, 42, 43, 44, 0, 19, 0, 15, 16, + 17, 8, 0, 0, 0, 0, 0, 38, 39, 40, + 0, 0, 0, 0, 11, 12, 13, 0, 0, 70, + 0, 0, 61, 0, 57, 0, 0, 0, 52, 0, + 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, + + 0, 0, 9, 10, 0, 0, 26, 27, 28, 0, + 0, 0, 0, 29, 30, 31, 0, 20, 21, 22, + 0, 0, 7, 0, 23, 24, 25, 62, 0, 68, + 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 54, 50, 32, 33, 34, 35, 36, 37, 0, + 0, 4, 2, 1, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 47, 0, 46, 0, 0, + 0, 66, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 66, 0, 0, 0, 40, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 67, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 41, 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, 18, 0, 0, 0, 0, 0, 0, 64, 0, + 0, 58, 0, 0, 0, 0, 56, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 0, 5, 0, 0, 0, 17, 0, 0, - 0, 0, 0, 0, 63, 0, 0, 57, 0, 0, - 0, 0, 55, 0, 0, 44, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 7, 0, - 0, 64, 0, 0, 0, 0, 0, 0, 47, 0, - 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 0, 0, 0, 58, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 8, 0, 0, 65, 0, 0, 0, 0, + 0, 0, 48, 0, 0, 0, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 + 0, 59, 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] = @@ -419,188 +419,190 @@ static yyconst flex_int32_t yy_meta[46] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[325] = +static yyconst flex_int16_t yy_base[329] = { 0, - 0, 0, 391, 392, 392, 392, 0, 392, 392, 37, - 38, 379, 379, 41, 352, 392, 392, 33, 36, 25, - 349, 367, 33, 45, 68, 93, 392, 392, 0, 374, - 54, 57, 0, 359, 392, 47, 361, 346, 360, 392, - 57, 348, 40, 348, 359, 352, 343, 346, 339, 392, - 392, 392, 351, 392, 335, 392, 392, 392, 65, 334, - 72, 60, 341, 65, 392, 392, 392, 83, 80, 329, - 96, 392, 392, 392, 0, 133, 0, 352, 334, 392, - 125, 392, 346, 345, 338, 392, 60, 76, 79, 341, - 332, 131, 332, 324, 324, 331, 338, 327, 392, 392, - - 110, 336, 392, 392, 392, 322, 327, 95, 329, 392, - 392, 392, 328, 392, 392, 392, 319, 326, 392, 312, - 392, 392, 392, 0, 336, 335, 307, 392, 312, 123, - 316, 301, 312, 302, 121, 61, 392, 392, 392, 392, - 392, 392, 392, 392, 392, 132, 315, 307, 308, 305, - 303, 307, 310, 300, 312, 293, 306, 307, 295, 291, - 288, 392, 287, 392, 286, 287, 285, 392, 283, 0, - 299, 277, 284, 291, 286, 278, 280, 293, 292, 278, - 283, 289, 272, 279, 110, 123, 115, 282, 282, 392, - 276, 267, 280, 392, 265, 270, 275, 136, 265, 267, - - 139, 269, 257, 272, 142, 263, 145, 0, 276, 254, - 262, 267, 268, 249, 263, 252, 260, 247, 243, 261, - 244, 392, 246, 392, 258, 148, 248, 151, 248, 245, - 241, 237, 245, 251, 0, 231, 237, 392, 236, 245, - 228, 229, 392, 227, 231, 392, 230, 223, 232, 227, - 225, 221, 228, 154, 217, 0, 224, 230, 229, 224, - 223, 225, 222, 392, 223, 208, 222, 208, 203, 222, - 217, 392, 216, 215, 214, 217, 214, 205, 392, 196, - 205, 208, 199, 157, 194, 206, 197, 200, 202, 201, - 192, 187, 196, 392, 184, 195, 199, 392, 182, 191, - - 178, 185, 176, 192, 181, 187, 190, 176, 183, 171, - 164, 184, 170, 130, 392, 167, 165, 200, 160, 157, - 140, 124, 76, 59 + 0, 0, 395, 396, 396, 396, 0, 396, 396, 37, + 38, 383, 383, 41, 356, 396, 396, 33, 36, 25, + 353, 371, 30, 33, 45, 68, 93, 396, 396, 0, + 378, 57, 67, 0, 363, 396, 46, 365, 350, 364, + 396, 51, 352, 54, 352, 363, 356, 347, 350, 346, + 396, 342, 396, 396, 396, 354, 396, 338, 396, 396, + 396, 60, 337, 77, 70, 344, 73, 396, 396, 396, + 80, 66, 332, 97, 396, 396, 396, 0, 119, 0, + 355, 337, 396, 121, 396, 349, 348, 341, 396, 40, + 105, 51, 344, 335, 113, 335, 327, 329, 326, 333, + + 340, 329, 396, 396, 132, 338, 396, 396, 396, 324, + 329, 110, 331, 396, 396, 396, 330, 396, 396, 396, + 321, 328, 396, 314, 396, 396, 396, 0, 338, 337, + 309, 396, 314, 131, 318, 303, 314, 304, 129, 71, + 396, 396, 396, 396, 396, 396, 396, 396, 396, 126, + 317, 309, 310, 307, 305, 309, 312, 302, 314, 295, + 308, 309, 297, 293, 290, 396, 289, 396, 288, 289, + 287, 396, 285, 0, 301, 279, 286, 293, 288, 280, + 282, 295, 294, 280, 285, 291, 274, 281, 118, 129, + 123, 284, 284, 396, 278, 269, 282, 396, 267, 272, + + 277, 134, 267, 269, 137, 271, 259, 274, 140, 265, + 143, 0, 278, 256, 264, 269, 270, 251, 265, 254, + 262, 249, 245, 263, 246, 396, 248, 396, 260, 146, + 250, 149, 250, 247, 243, 239, 247, 253, 0, 233, + 239, 396, 238, 247, 230, 231, 396, 229, 233, 396, + 232, 225, 234, 229, 227, 223, 230, 152, 219, 0, + 226, 232, 231, 226, 225, 227, 224, 396, 225, 210, + 224, 210, 205, 224, 219, 396, 218, 217, 216, 219, + 216, 207, 396, 198, 207, 210, 201, 155, 196, 208, + 199, 202, 204, 203, 194, 189, 198, 396, 186, 197, + + 201, 396, 184, 193, 180, 187, 178, 194, 183, 189, + 192, 178, 185, 173, 166, 186, 173, 163, 396, 200, + 199, 198, 197, 168, 153, 128, 122, 114 } ; -static yyconst flex_int16_t yy_def[325] = +static yyconst flex_int16_t yy_def[329] = { 0, - 315, 1, 315, 315, 315, 315, 316, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 317, 315, - 315, 315, 318, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 319, 315, 318, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 320, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 321, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 322, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 323, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 324, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 0, 315, 315, 315, 315, 315, - 315, 315, 315, 315 + 319, 1, 319, 319, 319, 319, 320, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 321, + 319, 319, 319, 322, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 323, 319, 322, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 324, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 325, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 326, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 327, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 328, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 0, 319, + 319, 319, 319, 319, 319, 319, 319, 319 } ; -static yyconst flex_int16_t yy_nxt[438] = +static yyconst flex_int16_t yy_nxt[442] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 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, 4, 27, 28, 30, 30, 31, 31, 30, - 45, 31, 35, 36, 37, 38, 39, 43, 44, 49, - 46, 272, 30, 53, 31, 79, 40, 32, 41, 42, - 76, 80, 54, 50, 51, 52, 55, 84, 256, 76, - 87, 88, 89, 98, 99, 56, 57, 58, 59, 85, - 60, 106, 183, 61, 102, 184, 107, 62, 117, 109, - - 63, 140, 141, 100, 64, 110, 111, 112, 65, 66, - 67, 68, 103, 104, 105, 113, 142, 118, 143, 144, - 145, 163, 120, 114, 115, 116, 235, 69, 70, 158, - 159, 164, 71, 72, 73, 74, 121, 122, 123, 125, - 125, 173, 208, 126, 129, 130, 131, 132, 133, 148, - 180, 140, 141, 181, 174, 144, 145, 182, 134, 170, - 135, 136, 124, 142, 175, 143, 149, 75, 150, 29, - 138, 151, 185, 186, 187, 229, 65, 66, 67, 103, - 104, 105, 114, 115, 116, 121, 122, 123, 50, 51, - 52, 56, 57, 58, 110, 111, 112, 72, 73, 74, - - 77, 314, 77, 313, 137, 82, 312, 311, 310, 164, - 309, 308, 307, 306, 100, 119, 54, 305, 304, 303, - 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, - 292, 291, 290, 289, 288, 287, 286, 285, 128, 284, - 283, 282, 99, 281, 280, 279, 278, 139, 277, 276, - 275, 274, 273, 271, 270, 269, 268, 267, 266, 265, - 264, 263, 86, 262, 261, 260, 259, 258, 257, 255, - 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, - 244, 243, 242, 241, 40, 240, 239, 238, 237, 236, - 190, 234, 233, 232, 162, 231, 230, 228, 227, 226, - - 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, - 215, 214, 213, 212, 211, 80, 210, 35, 209, 207, - 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, - 196, 195, 194, 193, 192, 191, 190, 189, 188, 179, - 178, 177, 176, 172, 171, 126, 126, 169, 168, 167, - 166, 165, 162, 161, 160, 157, 156, 155, 154, 153, - 152, 147, 146, 139, 138, 137, 128, 127, 119, 108, - 101, 97, 96, 95, 94, 93, 92, 91, 90, 86, - 83, 82, 81, 78, 32, 48, 47, 34, 33, 32, - 315, 3, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315 + 20, 21, 4, 22, 4, 4, 4, 4, 23, 24, + 4, 4, 4, 4, 25, 26, 27, 4, 4, 4, + 4, 4, 4, 28, 29, 31, 31, 32, 32, 31, + 46, 32, 36, 37, 38, 39, 40, 44, 45, 52, + 47, 50, 51, 56, 82, 31, 41, 32, 42, 43, + 83, 87, 57, 53, 54, 55, 58, 33, 102, 103, + 79, 144, 145, 88, 121, 59, 60, 61, 62, 79, + 63, 148, 149, 64, 90, 91, 92, 65, 104, 106, + + 66, 110, 187, 122, 67, 188, 111, 113, 68, 69, + 70, 71, 117, 114, 115, 116, 276, 107, 108, 109, + 118, 119, 120, 124, 260, 129, 129, 72, 73, 130, + 239, 152, 74, 75, 76, 77, 167, 125, 126, 127, + 133, 134, 135, 136, 137, 146, 168, 147, 153, 177, + 154, 162, 163, 155, 138, 212, 139, 140, 184, 144, + 145, 185, 178, 148, 149, 186, 189, 190, 191, 146, + 174, 147, 179, 233, 68, 69, 70, 107, 108, 109, + 118, 119, 120, 125, 126, 127, 53, 54, 55, 59, + 60, 61, 114, 115, 116, 75, 76, 77, 80, 128, + + 80, 78, 30, 142, 318, 317, 141, 85, 316, 315, + 314, 168, 313, 312, 311, 310, 104, 123, 57, 309, + 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, + 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, + 132, 288, 287, 286, 103, 285, 284, 283, 282, 143, + 281, 280, 279, 278, 277, 275, 274, 273, 272, 271, + 270, 269, 268, 267, 89, 266, 265, 264, 263, 262, + 261, 259, 258, 257, 256, 255, 254, 253, 252, 251, + 250, 249, 248, 247, 246, 245, 41, 244, 243, 242, + 241, 240, 194, 238, 237, 236, 166, 235, 234, 232, + + 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, + 221, 220, 219, 218, 217, 216, 215, 83, 214, 36, + 213, 211, 210, 209, 208, 207, 206, 205, 204, 203, + 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, + 192, 183, 182, 181, 180, 176, 175, 130, 130, 173, + 172, 171, 170, 169, 166, 165, 164, 161, 160, 159, + 158, 51, 157, 156, 151, 150, 143, 142, 141, 132, + 131, 123, 112, 105, 101, 100, 99, 98, 97, 96, + 95, 94, 93, 89, 86, 85, 84, 81, 33, 49, + 48, 35, 34, 33, 319, 3, 319, 319, 319, 319, + + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319 } ; -static yyconst flex_int16_t yy_chk[438] = +static yyconst flex_int16_t yy_chk[442] = { 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, 1, 1, 1, 1, 1, 1, 10, 11, 10, 11, 14, - 20, 14, 18, 18, 18, 18, 18, 19, 19, 23, - 20, 324, 31, 24, 31, 36, 18, 32, 18, 18, - 32, 36, 24, 23, 23, 23, 24, 41, 323, 32, - 43, 43, 43, 59, 59, 24, 24, 24, 25, 41, - 25, 62, 136, 25, 61, 136, 62, 25, 69, 64, - - 25, 87, 87, 59, 25, 64, 64, 64, 25, 25, - 25, 26, 61, 61, 61, 68, 88, 69, 88, 89, - 89, 108, 71, 68, 68, 68, 322, 26, 26, 101, - 101, 108, 26, 26, 26, 26, 71, 71, 71, 76, - 76, 130, 321, 76, 81, 81, 81, 81, 81, 92, - 135, 185, 185, 135, 130, 187, 187, 135, 81, 320, - 81, 81, 319, 186, 130, 186, 92, 317, 92, 316, - 314, 92, 146, 146, 146, 198, 198, 198, 198, 201, - 201, 201, 205, 205, 205, 207, 207, 207, 226, 226, - 226, 228, 228, 228, 254, 254, 254, 284, 284, 284, - - 318, 313, 318, 312, 311, 310, 309, 308, 307, 306, - 305, 304, 303, 302, 301, 300, 299, 297, 296, 295, - 293, 292, 291, 290, 289, 288, 287, 286, 285, 283, - 282, 281, 280, 278, 277, 276, 275, 274, 273, 271, - 270, 269, 268, 267, 266, 265, 263, 262, 261, 260, - 259, 258, 257, 255, 253, 252, 251, 250, 249, 248, - 247, 245, 244, 242, 241, 240, 239, 237, 236, 234, - 233, 232, 231, 230, 229, 227, 225, 223, 221, 220, - 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, - 209, 206, 204, 203, 202, 200, 199, 197, 196, 195, - - 193, 192, 191, 189, 188, 184, 183, 182, 181, 180, - 179, 178, 177, 176, 175, 174, 173, 172, 171, 169, - 167, 166, 165, 163, 161, 160, 159, 158, 157, 156, - 155, 154, 153, 152, 151, 150, 149, 148, 147, 134, - 133, 132, 131, 129, 127, 126, 125, 120, 118, 117, - 113, 109, 107, 106, 102, 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, 315, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315 + 20, 14, 18, 18, 18, 18, 18, 19, 19, 24, + 20, 23, 23, 25, 37, 32, 18, 32, 18, 18, + 37, 42, 25, 24, 24, 24, 25, 33, 62, 62, + 33, 90, 90, 42, 72, 25, 25, 25, 26, 33, + 26, 92, 92, 26, 44, 44, 44, 26, 62, 64, + + 26, 65, 140, 72, 26, 140, 65, 67, 26, 26, + 26, 27, 71, 67, 67, 67, 328, 64, 64, 64, + 71, 71, 71, 74, 327, 79, 79, 27, 27, 79, + 326, 95, 27, 27, 27, 27, 112, 74, 74, 74, + 84, 84, 84, 84, 84, 91, 112, 91, 95, 134, + 95, 105, 105, 95, 84, 325, 84, 84, 139, 189, + 189, 139, 134, 191, 191, 139, 150, 150, 150, 190, + 324, 190, 134, 202, 202, 202, 202, 205, 205, 205, + 209, 209, 209, 211, 211, 211, 230, 230, 230, 232, + 232, 232, 258, 258, 258, 288, 288, 288, 322, 323, + + 322, 321, 320, 318, 317, 316, 315, 314, 313, 312, + 311, 310, 309, 308, 307, 306, 305, 304, 303, 301, + 300, 299, 297, 296, 295, 294, 293, 292, 291, 290, + 289, 287, 286, 285, 284, 282, 281, 280, 279, 278, + 277, 275, 274, 273, 272, 271, 270, 269, 267, 266, + 265, 264, 263, 262, 261, 259, 257, 256, 255, 254, + 253, 252, 251, 249, 248, 246, 245, 244, 243, 241, + 240, 238, 237, 236, 235, 234, 233, 231, 229, 227, + 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, + 215, 214, 213, 210, 208, 207, 206, 204, 203, 201, + + 200, 199, 197, 196, 195, 193, 192, 188, 187, 186, + 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, + 175, 173, 171, 170, 169, 167, 165, 164, 163, 162, + 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, + 151, 138, 137, 136, 135, 133, 131, 130, 129, 124, + 122, 121, 117, 113, 111, 110, 106, 102, 101, 100, + 99, 98, 97, 96, 94, 93, 88, 87, 86, 82, + 81, 73, 66, 63, 58, 56, 52, 50, 49, 48, + 47, 46, 45, 43, 40, 39, 38, 35, 31, 22, + 21, 15, 13, 12, 3, 319, 319, 319, 319, 319, + + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319 } ; /* The intent behind this definition is that it'll catch @@ -649,7 +651,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 653 "generated/easymesh-scanner.cpp" +#line 655 "generated/easymesh-scanner.cpp" #define INITIAL 0 @@ -761,7 +763,7 @@ YY_DECL yylloc->step(); -#line 765 "generated/easymesh-scanner.cpp" +#line 767 "generated/easymesh-scanner.cpp" if ( !(yy_init) ) { @@ -814,13 +816,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 >= 316 ) + if ( yy_current_state >= 320 ) 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 != 315 ); + while ( yy_current_state != 319 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -868,283 +870,288 @@ YY_RULE_SETUP case 6: YY_RULE_SETUP #line 56 "easymesh/easymesh-scanner.l" -{ return token::T_TOGGLESCALEWINDING; } +{ return token::T_LOOP; } YY_BREAK case 7: YY_RULE_SETUP #line 57 "easymesh/easymesh-scanner.l" -{ return token::T_COLOR; } +{ return token::T_TOGGLESCALEWINDING; } YY_BREAK case 8: YY_RULE_SETUP #line 58 "easymesh/easymesh-scanner.l" -{ return token::T_BCOLOR; } +{ return token::T_COLOR; } YY_BREAK case 9: YY_RULE_SETUP #line 59 "easymesh/easymesh-scanner.l" -{ return token::T_VCOLOR; } +{ return token::T_BCOLOR; } YY_BREAK case 10: YY_RULE_SETUP -#line 61 "easymesh/easymesh-scanner.l" -{ return token::T_TRANSLATEX; } +#line 60 "easymesh/easymesh-scanner.l" +{ return token::T_VCOLOR; } YY_BREAK case 11: YY_RULE_SETUP #line 62 "easymesh/easymesh-scanner.l" -{ return token::T_TRANSLATEY; } +{ return token::T_TRANSLATEX; } YY_BREAK case 12: YY_RULE_SETUP #line 63 "easymesh/easymesh-scanner.l" -{ return token::T_TRANSLATEZ; } +{ return token::T_TRANSLATEY; } YY_BREAK case 13: YY_RULE_SETUP #line 64 "easymesh/easymesh-scanner.l" -{ return token::T_TRANSLATE; } +{ return token::T_TRANSLATEZ; } YY_BREAK case 14: YY_RULE_SETUP #line 65 "easymesh/easymesh-scanner.l" -{ return token::T_ROTATEX; } +{ return token::T_TRANSLATE; } YY_BREAK case 15: YY_RULE_SETUP #line 66 "easymesh/easymesh-scanner.l" -{ return token::T_ROTATEY; } +{ return token::T_ROTATEX; } YY_BREAK case 16: YY_RULE_SETUP #line 67 "easymesh/easymesh-scanner.l" -{ return token::T_ROTATEZ; } +{ return token::T_ROTATEY; } YY_BREAK case 17: YY_RULE_SETUP #line 68 "easymesh/easymesh-scanner.l" -{ return token::T_ROTATE; } +{ return token::T_ROTATEZ; } YY_BREAK case 18: YY_RULE_SETUP #line 69 "easymesh/easymesh-scanner.l" -{ return token::T_RADIALJITTER; } +{ return token::T_ROTATE; } YY_BREAK case 19: YY_RULE_SETUP #line 70 "easymesh/easymesh-scanner.l" -{ return token::T_TAPERX; } +{ return token::T_RADIALJITTER; } YY_BREAK case 20: YY_RULE_SETUP #line 71 "easymesh/easymesh-scanner.l" -{ return token::T_TAPERY; } +{ return token::T_TAPERX; } YY_BREAK case 21: YY_RULE_SETUP #line 72 "easymesh/easymesh-scanner.l" -{ return token::T_TAPERZ; } +{ return token::T_TAPERY; } YY_BREAK case 22: YY_RULE_SETUP #line 73 "easymesh/easymesh-scanner.l" -{ return token::T_TWISTX; } +{ return token::T_TAPERZ; } YY_BREAK case 23: YY_RULE_SETUP #line 74 "easymesh/easymesh-scanner.l" -{ return token::T_TWISTY; } +{ return token::T_TWISTX; } YY_BREAK case 24: YY_RULE_SETUP #line 75 "easymesh/easymesh-scanner.l" -{ return token::T_TWISTZ; } +{ return token::T_TWISTY; } YY_BREAK case 25: YY_RULE_SETUP #line 76 "easymesh/easymesh-scanner.l" -{ return token::T_SHEARX; } +{ return token::T_TWISTZ; } YY_BREAK case 26: YY_RULE_SETUP #line 77 "easymesh/easymesh-scanner.l" -{ return token::T_SHEARY; } +{ return token::T_SHEARX; } YY_BREAK case 27: YY_RULE_SETUP #line 78 "easymesh/easymesh-scanner.l" -{ return token::T_SHEARZ; } +{ return token::T_SHEARY; } YY_BREAK case 28: YY_RULE_SETUP #line 79 "easymesh/easymesh-scanner.l" -{ return token::T_STRETCHX; } +{ return token::T_SHEARZ; } YY_BREAK case 29: YY_RULE_SETUP #line 80 "easymesh/easymesh-scanner.l" -{ return token::T_STRETCHY; } +{ return token::T_STRETCHX; } YY_BREAK case 30: YY_RULE_SETUP #line 81 "easymesh/easymesh-scanner.l" -{ return token::T_STRETCHZ; } +{ return token::T_STRETCHY; } YY_BREAK case 31: YY_RULE_SETUP #line 82 "easymesh/easymesh-scanner.l" -{ return token::T_BENDXY; } +{ return token::T_STRETCHZ; } YY_BREAK case 32: YY_RULE_SETUP #line 83 "easymesh/easymesh-scanner.l" -{ return token::T_BENDXZ; } +{ return token::T_BENDXY; } YY_BREAK case 33: YY_RULE_SETUP #line 84 "easymesh/easymesh-scanner.l" -{ return token::T_BENDYX; } +{ return token::T_BENDXZ; } YY_BREAK case 34: YY_RULE_SETUP #line 85 "easymesh/easymesh-scanner.l" -{ return token::T_BENDYZ; } +{ return token::T_BENDYX; } YY_BREAK case 35: YY_RULE_SETUP #line 86 "easymesh/easymesh-scanner.l" -{ return token::T_BENDZX; } +{ return token::T_BENDYZ; } YY_BREAK case 36: YY_RULE_SETUP #line 87 "easymesh/easymesh-scanner.l" -{ return token::T_BENDZY; } +{ return token::T_BENDZX; } YY_BREAK case 37: YY_RULE_SETUP #line 88 "easymesh/easymesh-scanner.l" -{ return token::T_SCALEX; } +{ return token::T_BENDZY; } YY_BREAK case 38: YY_RULE_SETUP #line 89 "easymesh/easymesh-scanner.l" -{ return token::T_SCALEY; } +{ return token::T_SCALEX; } YY_BREAK case 39: YY_RULE_SETUP #line 90 "easymesh/easymesh-scanner.l" -{ return token::T_SCALEZ; } +{ return token::T_SCALEY; } YY_BREAK case 40: YY_RULE_SETUP #line 91 "easymesh/easymesh-scanner.l" -{ return token::T_SCALE; } +{ return token::T_SCALEZ; } YY_BREAK case 41: YY_RULE_SETUP #line 92 "easymesh/easymesh-scanner.l" -{ return token::T_MIRRORX; } +{ return token::T_SCALE; } YY_BREAK case 42: YY_RULE_SETUP #line 93 "easymesh/easymesh-scanner.l" -{ return token::T_MIRRORY; } +{ return token::T_MIRRORX; } YY_BREAK case 43: YY_RULE_SETUP #line 94 "easymesh/easymesh-scanner.l" -{ return token::T_MIRRORZ; } +{ return token::T_MIRRORY; } YY_BREAK case 44: YY_RULE_SETUP #line 95 "easymesh/easymesh-scanner.l" -{ return token::T_CHAMFER; } +{ return token::T_MIRRORZ; } YY_BREAK case 45: YY_RULE_SETUP #line 96 "easymesh/easymesh-scanner.l" -{ return token::T_SPLITTRIANGLE; } +{ return token::T_CHAMFER; } YY_BREAK case 46: YY_RULE_SETUP #line 97 "easymesh/easymesh-scanner.l" -{ return token::T_SMOOTHMESH; } +{ return token::T_SPLITTRIANGLE; } YY_BREAK case 47: YY_RULE_SETUP #line 98 "easymesh/easymesh-scanner.l" -{ return token::T_DUPLICATE; } +{ return token::T_SMOOTHMESH; } YY_BREAK case 48: YY_RULE_SETUP -#line 100 "easymesh/easymesh-scanner.l" -{ return token::T_CYLINDER; } +#line 99 "easymesh/easymesh-scanner.l" +{ return token::T_DUPLICATE; } YY_BREAK case 49: YY_RULE_SETUP #line 101 "easymesh/easymesh-scanner.l" -{ return token::T_SPHERE; } +{ return token::T_CYLINDER; } YY_BREAK case 50: YY_RULE_SETUP #line 102 "easymesh/easymesh-scanner.l" -{ return token::T_CAPSULE; } +{ return token::T_SPHERE; } YY_BREAK case 51: YY_RULE_SETUP #line 103 "easymesh/easymesh-scanner.l" -{ return token::T_TORUS; } +{ return token::T_CAPSULE; } YY_BREAK case 52: YY_RULE_SETUP #line 104 "easymesh/easymesh-scanner.l" -{ return token::T_BOX; } +{ return token::T_TORUS; } YY_BREAK case 53: YY_RULE_SETUP #line 105 "easymesh/easymesh-scanner.l" -{ return token::T_SMOOTHCHAMFBOX; } +{ return token::T_BOX; } YY_BREAK case 54: YY_RULE_SETUP #line 106 "easymesh/easymesh-scanner.l" -{ return token::T_FLATCHAMFBOX; } +{ return token::T_SMOOTHCHAMFBOX; } YY_BREAK case 55: YY_RULE_SETUP #line 107 "easymesh/easymesh-scanner.l" -{ return token::T_STAR; } +{ return token::T_FLATCHAMFBOX; } YY_BREAK case 56: YY_RULE_SETUP #line 108 "easymesh/easymesh-scanner.l" -{ return token::T_EXPANDEDSTAR; } +{ return token::T_STAR; } YY_BREAK case 57: YY_RULE_SETUP #line 109 "easymesh/easymesh-scanner.l" -{ return token::T_DISC; } +{ return token::T_EXPANDEDSTAR; } YY_BREAK case 58: YY_RULE_SETUP #line 110 "easymesh/easymesh-scanner.l" -{ return token::T_TRIANGLE; } +{ return token::T_DISC; } YY_BREAK case 59: YY_RULE_SETUP #line 111 "easymesh/easymesh-scanner.l" -{ return token::T_QUAD; } +{ return token::T_TRIANGLE; } YY_BREAK case 60: YY_RULE_SETUP #line 112 "easymesh/easymesh-scanner.l" +{ return token::T_QUAD; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 113 "easymesh/easymesh-scanner.l" { return token::T_COG; } YY_BREAK /* ======= BASE COLOR TYPES ========================================= */ /* COLOR */ -case 61: +case 62: YY_RULE_SETUP -#line 116 "easymesh/easymesh-scanner.l" +#line 117 "easymesh/easymesh-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 8) @@ -1153,9 +1160,9 @@ YY_RULE_SETUP | 0x000000ffu; return token::COLOR; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 123 "easymesh/easymesh-scanner.l" +#line 124 "easymesh/easymesh-scanner.l" { uint32_t tmp = std::strtol(yytext + 1, nullptr, 16); yylval->u32val = 0x11000000u * (tmp >> 12) @@ -1164,111 +1171,111 @@ YY_RULE_SETUP | 0x00000011u * (tmp & 0xf); return token::COLOR; } YY_BREAK -case 63: +case 64: YY_RULE_SETUP -#line 130 "easymesh/easymesh-scanner.l" +#line 131 "easymesh/easymesh-scanner.l" { yylval->u32val = 0xffu | 0x100u * (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 134 "easymesh/easymesh-scanner.l" +#line 135 "easymesh/easymesh-scanner.l" { yylval->u32val = (uint32_t)std::strtol(yytext + 1, nullptr, 16); return token::COLOR; } YY_BREAK /* ======= BASE DATA TYPES ========================================= */ /* BOOL */ -case 65: +case 66: YY_RULE_SETUP -#line 140 "easymesh/easymesh-scanner.l" +#line 141 "easymesh/easymesh-scanner.l" { yylval->bval = true; return token::BOOLEAN; } YY_BREAK -case 66: +case 67: YY_RULE_SETUP -#line 141 "easymesh/easymesh-scanner.l" +#line 142 "easymesh/easymesh-scanner.l" { yylval->bval = false; return token::BOOLEAN; } YY_BREAK /* FLOAT */ -case 67: +case 68: YY_RULE_SETUP -#line 143 "easymesh/easymesh-scanner.l" +#line 144 "easymesh/easymesh-scanner.l" { yylval->fval = (float)std::atof(yytext); return token::F_NUMBER; } YY_BREAK /* INT */ -case 68: +case 69: YY_RULE_SETUP -#line 146 "easymesh/easymesh-scanner.l" +#line 147 "easymesh/easymesh-scanner.l" { yylval->ival = std::atoi(yytext); return token::I_NUMBER; } YY_BREAK /* ======= COMMENTS ======= */ -case 69: +case 70: YY_RULE_SETUP -#line 150 "easymesh/easymesh-scanner.l" +#line 151 "easymesh/easymesh-scanner.l" { /* ignore this */ } YY_BREAK /* Semantics tokens */ -case 70: -YY_RULE_SETUP -#line 153 "easymesh/easymesh-scanner.l" -{ 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" -{ return token_type('{'); } +{ return token_type(')'); } YY_BREAK case 74: YY_RULE_SETUP #line 157 "easymesh/easymesh-scanner.l" -{ return token_type('}'); } +{ return token_type('{'); } YY_BREAK case 75: YY_RULE_SETUP #line 158 "easymesh/easymesh-scanner.l" -{ return token_type('['); } +{ return token_type('}'); } YY_BREAK case 76: YY_RULE_SETUP #line 159 "easymesh/easymesh-scanner.l" -{ return token_type(']'); } +{ return token_type('['); } YY_BREAK case 77: YY_RULE_SETUP #line 160 "easymesh/easymesh-scanner.l" -{ /* ignore this */ } +{ return token_type(']'); } YY_BREAK case 78: -/* rule 78 can match eol */ YY_RULE_SETUP #line 161 "easymesh/easymesh-scanner.l" { /* ignore this */ } YY_BREAK case 79: +/* rule 79 can match eol */ YY_RULE_SETUP #line 162 "easymesh/easymesh-scanner.l" -{ return token::T_ERROR; } +{ /* ignore this */ } YY_BREAK case 80: YY_RULE_SETUP -#line 164 "easymesh/easymesh-scanner.l" +#line 163 "easymesh/easymesh-scanner.l" +{ return token::T_ERROR; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 165 "easymesh/easymesh-scanner.l" ECHO; YY_BREAK -#line 1272 "generated/easymesh-scanner.cpp" +#line 1279 "generated/easymesh-scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1650,7 +1657,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 >= 316 ) + if ( yy_current_state >= 320 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1678,11 +1685,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 >= 316 ) + if ( yy_current_state >= 320 ) 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 == 315); + yy_is_jam = (yy_current_state == 319); return yy_is_jam ? 0 : yy_current_state; } @@ -2169,7 +2176,7 @@ void EasyMeshfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 164 "easymesh/easymesh-scanner.l" +#line 165 "easymesh/easymesh-scanner.l" diff --git a/src/lol/base/assert.h b/src/lol/base/assert.h index 8e794e16..38e79eef 100644 --- a/src/lol/base/assert.h +++ b/src/lol/base/assert.h @@ -66,6 +66,15 @@ static inline void DebugAbort() 8, 8, 8, 8, 8, 7, 6, 5, 4, 3, \ 2, 1, TOO_FEW_ARGUMENTS)) +#define LOL_COUNT_TO_12(...) \ + LOL_EVAL(LOL_GET_63RD(__VA_ARGS__, 10,10,10,10,10,10,10,10,10,10,\ + 10,10,10,10,10,10,10,10,10,10,\ + 10,10,10,10,10,10,10,10,10,10,\ + 10,10,10,10,10,10,10,10,10,10,\ + 10,10,10,10,10,10,10,10,10,10,\ + 12,11,10,9, 8, 7, 6, 5, 4, 3, \ + 2, 1, TOO_FEW_ARGUMENTS)) + /* Three levels of dispatch are needed because of Visual Studio's bizarre * handling of __VA_ARGS__ inside macro calls */ #define LOL_CAT3(a, b) a##b diff --git a/test/data/mesh-buffer.txt b/test/data/mesh-buffer.txt index 7edd840e..048a013f 100644 --- a/test/data/mesh-buffer.txt +++ b/test/data/mesh-buffer.txt @@ -9,7 +9,7 @@ clearcolor #000 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 scv#00f dup [ ry 90 scv#f00 ] ] ] -[sc#fff ab .1] +//[sc#fff loop 4 [ [loop 4 [ab 1 tx 2]] tz 2]] //[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] @@ -23,6 +23,7 @@ custom setmesh " " + //splt 0 //test //[sc#f8f ab 1 splt 4 twy 90] diff --git a/test/easymeshdictionnary.js b/test/easymeshdictionnary.js index 395200bb..edcba872 100644 --- a/test/easymeshdictionnary.js +++ b/test/easymeshdictionnary.js @@ -26,6 +26,7 @@ CmdType(["tsw", "scalewinding"], "When activated, on negative-scaling,\nnormal-v CmdType(["sc", "setcolor"], "Set A color", [CmdArg("color", "color")]); CmdType(["scb", "setcolorb"], "Set B color", [CmdArg("color", "color")]); CmdType(["scv", "setcolorv"], "Set the color of all vertices in this scope", [CmdArg("color", "color")]); +CmdType(["lp", "loop"], "performs a loop", [CmdArg("int", "loopnb"), CmdArg("[ ]", "command to loop, no new context")]); //------------------------------------------------------------------------- //Mesh transform operations