| @@ -47,7 +47,7 @@ | |||||
| %token T_TRANSLATEX T_ROTATEX T_TAPERX T_TWISTX T_SHEARX T_STRETCHX T_BENDXY T_BENDXZ T_SCALEX T_MIRRORX | %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 | %token T_TRANSLATEY T_ROTATEY T_TAPERY T_TWISTY T_SHEARY T_STRETCHY T_BENDYX T_BENDYZ T_SCALEY T_MIRRORY | ||||
| %token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_TWISTZ T_SHEARZ T_STRETCHZ T_BENDZX T_BENDZY T_SCALEZ T_MIRRORZ | %token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_TWISTZ T_SHEARZ T_STRETCHZ T_BENDZX T_BENDZY T_SCALEZ T_MIRRORZ | ||||
| %token T_TRANSLATE T_SCALE T_TOGGLESCALEWINDING T_RADIALJITTER T_SPLITTRIANGLE | |||||
| %token T_TRANSLATE T_SCALE T_TOGGLESCALEWINDING T_RADIALJITTER T_SPLITTRIANGLE T_SMOOTHMESH | |||||
| %token T_CSGUNION T_CSGSUBSTRACT T_CSGSUBSTRACTLOSS T_CSGAND T_CSGXOR | %token T_CSGUNION T_CSGSUBSTRACT T_CSGSUBSTRACTLOSS T_CSGAND T_CSGXOR | ||||
| %token T_CHAMFER | %token T_CHAMFER | ||||
| @@ -158,6 +158,7 @@ transform_command: | |||||
| | T_MIRRORZ { mc.m_mesh.MirrorZ(); } | | T_MIRRORZ { mc.m_mesh.MirrorZ(); } | ||||
| | T_RADIALJITTER args1 { mc.m_mesh.RadialJitter($2.f0); } | | T_RADIALJITTER args1 { mc.m_mesh.RadialJitter($2.f0); } | ||||
| | T_SPLITTRIANGLE args1 { mc.m_mesh.SplitTriangles($2.f0); } | | T_SPLITTRIANGLE args1 { mc.m_mesh.SplitTriangles($2.f0); } | ||||
| | T_SMOOTHMESH args3 { mc.m_mesh.SmoothMesh($2.f0, $2.f1, $2.f2); } | |||||
| | T_TOGGLESCALEWINDING { mc.m_mesh.ToggleScaleWinding(); } | | T_TOGGLESCALEWINDING { mc.m_mesh.ToggleScaleWinding(); } | ||||
| | T_CSGUNION { mc.m_mesh.CsgUnion(); } | | T_CSGUNION { mc.m_mesh.CsgUnion(); } | ||||
| | T_CSGSUBSTRACT { mc.m_mesh.CsgSubstract(); } | | T_CSGSUBSTRACT { mc.m_mesh.CsgSubstract(); } | ||||
| @@ -87,6 +87,7 @@ my { return token::T_MIRRORY; } | |||||
| mz { return token::T_MIRRORZ; } | mz { return token::T_MIRRORZ; } | ||||
| rj { return token::T_RADIALJITTER; } | rj { return token::T_RADIALJITTER; } | ||||
| splt { return token::T_SPLITTRIANGLE; } | splt { return token::T_SPLITTRIANGLE; } | ||||
| smth { return token::T_SMOOTHMESH; } | |||||
| csgu { return token::T_CSGUNION; } | csgu { return token::T_CSGUNION; } | ||||
| csgs { return token::T_CSGSUBSTRACT; } | csgs { return token::T_CSGSUBSTRACT; } | ||||
| @@ -246,47 +246,54 @@ bool VertexDictionnary::FindMatchingVertices(const int search_idx, Array<int> &m | |||||
| for (int j = 0; j < vertex_list.Count(); j++) | for (int j = 0; j < vertex_list.Count(); j++) | ||||
| if (vertex_list[j].m3 == cur_mast && vertex_list[j].m1 != search_idx) | if (vertex_list[j].m3 == cur_mast && vertex_list[j].m1 != search_idx) | ||||
| matching_ids << vertex_list[cur_mast].m1; | |||||
| matching_ids << vertex_list[j].m1; | |||||
| return (matching_ids.Count() > 0); | return (matching_ids.Count() > 0); | ||||
| } | } | ||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| //Will return connected vertices (through triangles), if returned vertex has matching ones, it only returns the master. | //Will return connected vertices (through triangles), if returned vertex has matching ones, it only returns the master. | ||||
| bool VertexDictionnary::FindConnectedVertices(const int search_idx, const Array<int> &tri_list, Array<int> &connected_vert, Array<int> const *ignored_tri) | |||||
| bool VertexDictionnary::FindConnectedVertices(const int search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_vert, Array<int> const *ignored_tri) | |||||
| { | { | ||||
| Array<int> connected_tri; | Array<int> connected_tri; | ||||
| FindConnectedTriangles(search_idx, tri_list, connected_tri, ignored_tri); | |||||
| FindConnectedTriangles(search_idx, tri_list, tri0, connected_tri, ignored_tri); | |||||
| for (int i = 0; i < connected_tri.Count(); i++) | for (int i = 0; i < connected_tri.Count(); i++) | ||||
| { | { | ||||
| for (int j = 0; j < 3; j++) | for (int j = 0; j < 3; j++) | ||||
| { | { | ||||
| int v_indice = tri_list[connected_tri[j] + j]; | |||||
| int v_indice = tri_list[connected_tri[i] + j]; | |||||
| if (v_indice != search_idx) | if (v_indice != search_idx) | ||||
| { | { | ||||
| int found_master = FindVertexMaster(tri_list[connected_tri[j] + j]); | |||||
| int found_master = FindVertexMaster(tri_list[connected_tri[i] + j]); | |||||
| if (found_master == VDictType::Alone || found_master == VDictType::Master) | if (found_master == VDictType::Alone || found_master == VDictType::Master) | ||||
| connected_vert << v_indice; | |||||
| else | |||||
| connected_vert << found_master; | |||||
| found_master = v_indice; | |||||
| if (found_master != search_idx) | |||||
| { | |||||
| bool already_exist = false; | |||||
| for (int k = 0; !already_exist && k < connected_vert.Count(); k++) | |||||
| if (connected_vert[k] == found_master) | |||||
| already_exist = true; | |||||
| if (!already_exist) | |||||
| connected_vert << found_master; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return (connected_vert.Count() > 0); | return (connected_vert.Count() > 0); | ||||
| } | } | ||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| bool VertexDictionnary::FindConnectedTriangles(const int search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| bool VertexDictionnary::FindConnectedTriangles(const int search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| { | { | ||||
| return FindConnectedTriangles(ivec3(search_idx, search_idx, search_idx), tri_list, connected_tri, ignored_tri); | |||||
| return FindConnectedTriangles(ivec3(search_idx, search_idx, search_idx), tri_list, tri0, connected_tri, ignored_tri); | |||||
| } | } | ||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| bool VertexDictionnary::FindConnectedTriangles(const ivec2 &search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| bool VertexDictionnary::FindConnectedTriangles(const ivec2 &search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| { | { | ||||
| return FindConnectedTriangles(ivec3(search_idx, search_idx.x), tri_list, connected_tri, ignored_tri); | |||||
| return FindConnectedTriangles(ivec3(search_idx, search_idx.x), tri_list, tri0, connected_tri, ignored_tri); | |||||
| } | } | ||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| bool VertexDictionnary::FindConnectedTriangles(const ivec3 &search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| bool VertexDictionnary::FindConnectedTriangles(const ivec3 &search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri) | |||||
| { | { | ||||
| int needed_validation = 0; | int needed_validation = 0; | ||||
| Array<int> vert_list[3]; | Array<int> vert_list[3]; | ||||
| @@ -305,7 +312,7 @@ bool VertexDictionnary::FindConnectedTriangles(const ivec3 &search_idx, const Ar | |||||
| } | } | ||||
| } | } | ||||
| for (int i = 0; i < tri_list.Count(); i += 3) | |||||
| for (int i = tri0; i < tri_list.Count(); i += 3) | |||||
| { | { | ||||
| if (ignored_tri) | if (ignored_tri) | ||||
| { | { | ||||
| @@ -667,7 +674,7 @@ void EasyMesh::ComputeNormals(int start, int vcount) | |||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset) | void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset) | ||||
| { | { | ||||
| #if VERTEX_USEAGE == VU_TEX_UV | |||||
| #if 0//VERTEX_USEAGE == VU_TEX_UV | |||||
| VertexDictionnary vert_dict; | VertexDictionnary vert_dict; | ||||
| Array<int> tri_list; | Array<int> tri_list; | ||||
| @@ -1071,29 +1078,6 @@ void EasyMesh::DupAndScale(vec3 const &s) | |||||
| m_cursors.Last().m2 -= tlen; | m_cursors.Last().m2 -= tlen; | ||||
| } | } | ||||
| //----------------------------------------------------------------------------- | |||||
| void EasyMesh::SplitTriangles(int pass) | |||||
| { | |||||
| while (pass--) | |||||
| { | |||||
| int trimax = m_indices.Count(); | |||||
| for (int i = m_cursors.Last().m2; i < trimax; i += 3) | |||||
| { | |||||
| int vbase = m_vert.Count(); | |||||
| int j = -1; | |||||
| while (++j < 3) | |||||
| AddLerpVertex(m_indices[i + j], m_indices[i + (j + 1) % 3], .5f); | |||||
| //Add new triangles | |||||
| AppendTriangle(vbase, m_indices[i + 1], vbase + 1, 0); | |||||
| AppendTriangle(vbase + 2, vbase + 1, m_indices[i + 2], 0); | |||||
| AppendTriangle(vbase, vbase + 1, vbase + 2, 0); | |||||
| //Change current triangle | |||||
| m_indices[i + 1] = vbase; | |||||
| m_indices[i + 2] = vbase + 2; | |||||
| } | |||||
| } | |||||
| ComputeNormals(m_cursors.Last().m2, m_indices.Count() - m_cursors.Last().m2); | |||||
| } | |||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| void EasyMesh::AppendCylinder(int nsides, float h, float d1, float d2, | void EasyMesh::AppendCylinder(int nsides, float h, float d1, float d2, | ||||
| int dualside, int smooth, int close) | int dualside, int smooth, int close) | ||||
| @@ -1964,5 +1948,105 @@ void EasyMesh::Chamfer(float f) | |||||
| } | } | ||||
| } | } | ||||
| } /* namespace lol */ | |||||
| //----------------------------------------------------------------------------- | |||||
| void EasyMesh::SplitTriangles(int pass) { SplitTriangles(pass, NULL); } | |||||
| //----------------------------------------------------------------------------- | |||||
| void EasyMesh::SplitTriangles(int pass, VertexDictionnary *vert_dict) | |||||
| { | |||||
| while (pass--) | |||||
| { | |||||
| int trimax = m_indices.Count(); | |||||
| for (int i = m_cursors.Last().m2; i < trimax; i += 3) | |||||
| { | |||||
| int vbase = m_vert.Count(); | |||||
| int j = -1; | |||||
| while (++j < 3) | |||||
| { | |||||
| AddLerpVertex(m_indices[i + j], m_indices[i + (j + 1) % 3], .5f); | |||||
| if (vert_dict) | |||||
| vert_dict->AddVertex(vbase + j, m_vert[vbase + j].m1); | |||||
| } | |||||
| //Add new triangles | |||||
| AppendTriangle(vbase, m_indices[i + 1], vbase + 1, 0); | |||||
| AppendTriangle(vbase + 2, vbase + 1, m_indices[i + 2], 0); | |||||
| AppendTriangle(vbase, vbase + 1, vbase + 2, 0); | |||||
| //Change current triangle | |||||
| m_indices[i + 1] = vbase; | |||||
| m_indices[i + 2] = vbase + 2; | |||||
| } | |||||
| } | |||||
| ComputeNormals(m_cursors.Last().m2, m_indices.Count() - m_cursors.Last().m2); | |||||
| } | |||||
| //----------------------------------------------------------------------------- | |||||
| void EasyMesh::SmoothMesh(int main_pass, int split_per_main_pass, int smooth_per_main_pass) | |||||
| { | |||||
| VertexDictionnary vert_dict; | |||||
| Array<vec3> smooth_buf[2]; | |||||
| Array<int> master_list; | |||||
| Array<int> matching_ids; | |||||
| Array<int> connected_vert; | |||||
| int smbuf = 0; | |||||
| for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) | |||||
| vert_dict.AddVertex(i, m_vert[i].m1); | |||||
| while (main_pass--) | |||||
| { | |||||
| int split_pass = split_per_main_pass; | |||||
| int smooth_pass = smooth_per_main_pass; | |||||
| SplitTriangles(split_pass, &vert_dict); | |||||
| matching_ids.Reserve(m_vert.Count() - m_cursors.Last().m1); | |||||
| connected_vert.Reserve(m_vert.Count() - m_cursors.Last().m1); | |||||
| smooth_buf[0].Resize(m_vert.Count() - m_cursors.Last().m1); | |||||
| smooth_buf[1].Resize(m_vert.Count() - m_cursors.Last().m1); | |||||
| for (int i = m_cursors.Last().m1; i < m_vert.Count(); i++) | |||||
| smooth_buf[smbuf][i - m_cursors.Last().m1] = m_vert[i].m1; | |||||
| while (smooth_pass--) | |||||
| { | |||||
| master_list.Empty(); | |||||
| if (vert_dict.GetMasterList(master_list)) | |||||
| { | |||||
| for (int i = 0; i < master_list.Count(); i++) | |||||
| { | |||||
| connected_vert.Empty(); | |||||
| if (vert_dict.FindConnectedVertices(master_list[i], m_indices, m_cursors.Last().m2, connected_vert)) | |||||
| { | |||||
| //Calculate vertices sum | |||||
| vec3 vert_sum = vec3(.0f); | |||||
| for (int j = 0; j < connected_vert.Count(); j++) | |||||
| vert_sum += smooth_buf[smbuf][connected_vert[j] - m_cursors.Last().m1]; | |||||
| //Calculate new master vertex | |||||
| float n = (float)connected_vert.Count(); | |||||
| //b(n) = 5/4 - pow(3 + 2 * cos(2 * M_PI / n), 2) / 32 | |||||
| float beta = 3.f + 2.f * cos(2.f * (float)M_PI / n); | |||||
| beta = 5.f / 4.f - beta * beta / 32.f; | |||||
| //a(n) = n * (1 - b(n)) / b(n) | |||||
| float alpha = (n * (1 - beta)) / beta; | |||||
| //V = (a(n) * v + v1 + ... + vn) / (a(n) + n) | |||||
| vec3 new_vert = (alpha * smooth_buf[smbuf][master_list[i] - m_cursors.Last().m1] + vert_sum) / (alpha + n); | |||||
| //Set all matching vertices to new value | |||||
| matching_ids.Empty(); | |||||
| matching_ids << master_list[i]; | |||||
| vert_dict.FindMatchingVertices(master_list[i], matching_ids); | |||||
| for (int j = 0; j < matching_ids.Count(); j++) | |||||
| smooth_buf[1 - smbuf][matching_ids[j] - m_cursors.Last().m1] = new_vert; | |||||
| } | |||||
| } | |||||
| } | |||||
| smbuf = 1 - smbuf; | |||||
| } | |||||
| for (int i = 0; i < smooth_buf[smbuf].Count(); i++) | |||||
| m_vert[i + m_cursors.Last().m1].m1 = smooth_buf[smbuf][i]; | |||||
| } | |||||
| } | |||||
| } /* namespace lol */ | |||||
| @@ -65,11 +65,12 @@ class VertexDictionnary | |||||
| public: | public: | ||||
| int FindVertexMaster(const int search_idx); | int FindVertexMaster(const int search_idx); | ||||
| bool FindMatchingVertices(const int search_idx, Array<int> &matching_ids); | bool FindMatchingVertices(const int search_idx, Array<int> &matching_ids); | ||||
| bool FindConnectedVertices(const int search_idx, const Array<int> &tri_list, Array<int> &connected_vert, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const int search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const ivec2 &search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const ivec3 &search_idx, const Array<int> &tri_list, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedVertices(const int search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_vert, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const int search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const ivec2 &search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| bool FindConnectedTriangles(const ivec3 &search_idx, const Array<uint16_t> &tri_list, const int tri0, Array<int> &connected_tri, Array<int> const *ignored_tri = NULL); | |||||
| void AddVertex(int vert_id, vec3 vert_coord); | void AddVertex(int vert_id, vec3 vert_coord); | ||||
| bool GetMasterList(Array<int> &ret_master_list) { ret_master_list = master_list; return ret_master_list.Count() > 0; } | |||||
| void Clear() { vertex_list.Empty(); } | void Clear() { vertex_list.Empty(); } | ||||
| private: | private: | ||||
| //<VertexId, VertexLocation, VertexMasterId> | //<VertexId, VertexLocation, VertexMasterId> | ||||
| @@ -297,14 +298,24 @@ public: | |||||
| - f : Chamfer quantity. | - f : Chamfer quantity. | ||||
| */ | */ | ||||
| void Chamfer(float f); | void Chamfer(float f); | ||||
| /* [cmd:splt] split triangles in 4 smaller ones. | |||||
| - pass : Number of pass applied. | |||||
| */ | |||||
| void SplitTriangles(int pass); | |||||
| private: | |||||
| void SplitTriangles(int pass, VertexDictionnary *vert_dict); | |||||
| public: | |||||
| /* [cmd:smth] Smooth the mesh by subdivising it. | |||||
| - main_pass : a main pass is made of (n0 split then n1 smooth) repeat. | |||||
| - split_per_main_pass : n0 value in above explanation. | |||||
| - smooth_per_main_pass : n1 value in above explanation. | |||||
| */ | |||||
| void SmoothMesh(int main_pass, int split_per_main_pass, int smooth_per_main_pass); | |||||
| //------------------------------------------------------------------------- | //------------------------------------------------------------------------- | ||||
| //Mesh shape operations | //Mesh shape operations | ||||
| //------------------------------------------------------------------------- | //------------------------------------------------------------------------- | ||||
| /* | |||||
| */ | |||||
| void SplitTriangles(int pass); | |||||
| /* [cmd:ac] Cylinder centered on (0,0,0) with BBox [-.5*max(d1, d2), -.5*h, -.5*max(d1, d2)] | /* [cmd:ac] Cylinder centered on (0,0,0) with BBox [-.5*max(d1, d2), -.5*h, -.5*max(d1, d2)] | ||||
| - nbsides : Number of sides. [+.5*max(d1, d2), +.5*h, +.5*max(d1, d2)] | - nbsides : Number of sides. [+.5*max(d1, d2), +.5*h, +.5*max(d1, d2)] | ||||
| - h : Height of the cylinder. | - h : Height of the cylinder. | ||||
| @@ -770,240 +770,247 @@ namespace lol { | |||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 161 "easymesh/easymesh-parser.y" | #line 161 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.ToggleScaleWinding(); } | |||||
| { mc.m_mesh.SmoothMesh((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| break; | break; | ||||
| case 60: | case 60: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 162 "easymesh/easymesh-parser.y" | #line 162 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.CsgUnion(); } | |||||
| { mc.m_mesh.ToggleScaleWinding(); } | |||||
| break; | break; | ||||
| case 61: | case 61: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 163 "easymesh/easymesh-parser.y" | #line 163 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.CsgSubstract(); } | |||||
| { mc.m_mesh.CsgUnion(); } | |||||
| break; | break; | ||||
| case 62: | case 62: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 164 "easymesh/easymesh-parser.y" | #line 164 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.CsgSubstractLoss(); } | |||||
| { mc.m_mesh.CsgSubstract(); } | |||||
| break; | break; | ||||
| case 63: | case 63: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 165 "easymesh/easymesh-parser.y" | #line 165 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.CsgAnd(); } | |||||
| { mc.m_mesh.CsgSubstractLoss(); } | |||||
| break; | break; | ||||
| case 64: | case 64: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 166 "easymesh/easymesh-parser.y" | #line 166 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.CsgXor(); } | |||||
| { mc.m_mesh.CsgAnd(); } | |||||
| break; | break; | ||||
| case 65: | case 65: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 170 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, | |||||
| (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, 0); } | |||||
| #line 167 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.CsgXor(); } | |||||
| break; | break; | ||||
| case 66: | case 66: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 173 "easymesh/easymesh-parser.y" | |||||
| #line 171 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | ||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, | (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, | ||||
| (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, (int)(yysemantic_stack_[(2) - (2)].args).f6); } | |||||
| (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, 0); } | |||||
| break; | break; | ||||
| case 67: | case 67: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 176 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } | |||||
| #line 174 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, | |||||
| (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, (int)(yysemantic_stack_[(2) - (2)].args).f6); } | |||||
| break; | break; | ||||
| case 68: | case 68: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 177 "easymesh/easymesh-parser.y" | #line 177 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); } | |||||
| break; | break; | ||||
| case 69: | case 69: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 179 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| #line 178 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| break; | break; | ||||
| case 70: | case 70: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 181 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| #line 180 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| break; | break; | ||||
| case 71: | case 71: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 182 "easymesh/easymesh-parser.y" | #line 182 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| break; | break; | ||||
| case 72: | case 72: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 183 "easymesh/easymesh-parser.y" | #line 183 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| break; | break; | ||||
| case 73: | case 73: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 184 "easymesh/easymesh-parser.y" | #line 184 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, | |||||
| (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } | |||||
| { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| break; | break; | ||||
| case 74: | case 74: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 186 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| #line 185 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, | |||||
| (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); } | |||||
| break; | break; | ||||
| case 75: | case 75: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 188 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| #line 187 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); } | |||||
| break; | break; | ||||
| case 76: | case 76: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 189 "easymesh/easymesh-parser.y" | #line 189 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); } | |||||
| break; | break; | ||||
| case 77: | case 77: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 190 "easymesh/easymesh-parser.y" | #line 190 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| break; | break; | ||||
| case 78: | case 78: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 191 "easymesh/easymesh-parser.y" | #line 191 "easymesh/easymesh-parser.y" | ||||
| { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6, | |||||
| (yysemantic_stack_[(2) - (2)].args).f7, (yysemantic_stack_[(2) - (2)].args).f8, (int)(yysemantic_stack_[(2) - (2)].args).f9); } | |||||
| { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); } | |||||
| break; | break; | ||||
| case 79: | case 79: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 196 "easymesh/easymesh-parser.y" | |||||
| { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } | |||||
| #line 192 "easymesh/easymesh-parser.y" | |||||
| { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, | |||||
| (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6, | |||||
| (yysemantic_stack_[(2) - (2)].args).f7, (yysemantic_stack_[(2) - (2)].args).f8, (int)(yysemantic_stack_[(2) - (2)].args).f9); } | |||||
| break; | break; | ||||
| case 80: | case 80: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 197 "easymesh/easymesh-parser.y" | #line 197 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); } | |||||
| break; | break; | ||||
| case 81: | case 81: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 198 "easymesh/easymesh-parser.y" | #line 198 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 82: | case 82: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 199 "easymesh/easymesh-parser.y" | #line 199 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 83: | case 83: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 200 "easymesh/easymesh-parser.y" | #line 200 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 84: | case 84: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 201 "easymesh/easymesh-parser.y" | #line 201 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 85: | case 85: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 202 "easymesh/easymesh-parser.y" | #line 202 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 86: | case 86: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 203 "easymesh/easymesh-parser.y" | #line 203 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 87: | case 87: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 204 "easymesh/easymesh-parser.y" | #line 204 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f8 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 88: | case 88: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 205 "easymesh/easymesh-parser.y" | #line 205 "easymesh/easymesh-parser.y" | ||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f9 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f8 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 89: | case 89: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 208 "easymesh/easymesh-parser.y" | |||||
| { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } | |||||
| #line 206 "easymesh/easymesh-parser.y" | |||||
| { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f9 = (yysemantic_stack_[(2) - (2)].fval); } | |||||
| break; | break; | ||||
| case 90: | case 90: | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 209 "easymesh/easymesh-parser.y" | #line 209 "easymesh/easymesh-parser.y" | ||||
| { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); } | |||||
| break; | |||||
| case 91: | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 210 "easymesh/easymesh-parser.y" | |||||
| { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } | { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); } | ||||
| break; | break; | ||||
| /* Line 677 of lalr1.cc */ | /* Line 677 of lalr1.cc */ | ||||
| #line 1007 "generated/easymesh-parser.cpp" | |||||
| #line 1014 "generated/easymesh-parser.cpp" | |||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| @@ -1208,26 +1215,26 @@ namespace lol { | |||||
| /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | ||||
| STATE-NUM. */ | STATE-NUM. */ | ||||
| const signed char EasyMeshParser::yypact_ninf_ = -70; | |||||
| const signed char EasyMeshParser::yypact_ninf_ = -71; | |||||
| const signed char | const signed char | ||||
| EasyMeshParser::yypact_[] = | EasyMeshParser::yypact_[] = | ||||
| { | { | ||||
| 61, -41, -24, -48, -48, -48, -48, -48, -48, -48, | |||||
| -48, -48, -70, -48, -48, -48, -48, -48, -48, -48, | |||||
| -48, -48, -70, -48, -48, -48, -48, -48, -48, -48, | |||||
| -48, -48, -70, -48, -48, -70, -48, -48, -70, -70, | |||||
| -70, -70, -70, -48, -48, -48, -48, -48, -48, -48, | |||||
| -48, -48, -48, -48, -48, -48, -48, -70, 4, 6, | |||||
| 61, 61, 121, -70, -70, -70, -70, -70, -70, -48, | |||||
| -48, -48, -48, -70, -70, -70, -70, -70, -70, -48, | |||||
| -70, -70, -48, -70, -70, -70, -70, -70, -70, -70, | |||||
| -48, -70, -70, -48, -70, -70, -70, -70, -70, -70, | |||||
| -70, -48, -70, -70, -48, -70, -70, -70, -70, -70, | |||||
| -70, -70, -70, -70, -70, -48, -48, -48, -70, -70, | |||||
| -70, -70, -70, -70, -70, -70, -70, -70, -70, -48, | |||||
| -48, -48, -48, -70, -70, -70, -70, -70, -54, -70, | |||||
| -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, | |||||
| -70, -70 | |||||
| 62, -42, -25, -49, -49, -49, -49, -49, -49, -49, | |||||
| -49, -49, -71, -49, -49, -49, -49, -49, -49, -49, | |||||
| -49, -49, -71, -49, -49, -49, -49, -49, -49, -49, | |||||
| -49, -49, -71, -49, -49, -71, -49, -49, -49, -71, | |||||
| -71, -71, -71, -71, -49, -49, -49, -49, -49, -49, | |||||
| -49, -49, -49, -49, -49, -49, -49, -49, -71, 4, | |||||
| 6, 62, 62, 123, -71, -71, -71, -71, -71, -71, | |||||
| -49, -49, -49, -49, -71, -71, -71, -71, -71, -71, | |||||
| -49, -71, -71, -49, -71, -71, -71, -71, -71, -71, | |||||
| -71, -49, -71, -71, -49, -71, -71, -71, -71, -71, | |||||
| -71, -71, -49, -71, -71, -49, -71, -71, -71, -71, | |||||
| -71, -71, -71, -71, -71, -71, -71, -49, -49, -49, | |||||
| -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, | |||||
| -71, -49, -49, -49, -49, -71, -71, -71, -71, -71, | |||||
| -55, -71, -71, -71, -71, -71, -71, -71, -71, -71, | |||||
| -71, -71, -71, -71 | |||||
| }; | }; | ||||
| /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | ||||
| @@ -1239,37 +1246,37 @@ namespace lol { | |||||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||||
| 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, | ||||
| 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, | ||||
| 0, 0, 56, 0, 0, 59, 0, 0, 60, 61, | |||||
| 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, | |||||
| 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, | |||||
| 3, 0, 5, 9, 11, 12, 13, 89, 15, 0, | |||||
| 0, 0, 0, 14, 79, 17, 16, 19, 23, 26, | |||||
| 27, 32, 35, 36, 41, 44, 45, 50, 20, 24, | |||||
| 28, 29, 33, 37, 38, 42, 46, 47, 51, 21, | |||||
| 25, 30, 31, 34, 39, 40, 43, 48, 49, 52, | |||||
| 22, 53, 57, 58, 18, 0, 0, 65, 66, 67, | |||||
| 68, 69, 70, 71, 73, 74, 75, 76, 77, 0, | |||||
| 0, 0, 0, 78, 72, 1, 2, 4, 0, 10, | |||||
| 90, 80, 81, 82, 83, 84, 85, 86, 87, 88, | |||||
| 8, 6 | |||||
| 0, 0, 56, 0, 0, 60, 0, 0, 0, 61, | |||||
| 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, | |||||
| 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, | |||||
| 0, 3, 0, 5, 9, 11, 12, 13, 90, 15, | |||||
| 0, 0, 0, 0, 14, 80, 17, 16, 19, 23, | |||||
| 26, 27, 32, 35, 36, 41, 44, 45, 50, 20, | |||||
| 24, 28, 29, 33, 37, 38, 42, 46, 47, 51, | |||||
| 21, 25, 30, 31, 34, 39, 40, 43, 48, 49, | |||||
| 52, 22, 53, 57, 58, 59, 18, 0, 0, 66, | |||||
| 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, | |||||
| 78, 0, 0, 0, 0, 79, 73, 1, 2, 4, | |||||
| 0, 10, 91, 81, 82, 83, 84, 85, 86, 87, | |||||
| 88, 89, 8, 6 | |||||
| }; | }; | ||||
| /* YYPGOTO[NTERM-NUM]. */ | /* YYPGOTO[NTERM-NUM]. */ | ||||
| const short int | const short int | ||||
| EasyMeshParser::yypgoto_[] = | EasyMeshParser::yypgoto_[] = | ||||
| { | { | ||||
| -70, -70, -31, -70, -70, -70, -70, -51, -70, -70, | |||||
| -70, 228, 181, 0, 179, -36, -33, -29, -70, -70, | |||||
| -70, -69 | |||||
| -71, -71, -32, -71, -71, -71, -71, -52, -71, -71, | |||||
| -71, 232, 184, 0, 182, -37, -34, -30, -71, -71, | |||||
| -71, -70 | |||||
| }; | }; | ||||
| /* YYDEFGOTO[NTERM-NUM]. */ | /* YYDEFGOTO[NTERM-NUM]. */ | ||||
| const short int | const short int | ||||
| EasyMeshParser::yydefgoto_[] = | EasyMeshParser::yydefgoto_[] = | ||||
| { | { | ||||
| -1, 58, 59, 60, 61, 151, 62, 63, 64, 65, | |||||
| 66, 70, 71, 72, 115, 116, 117, 118, 131, 132, | |||||
| 133, 74 | |||||
| -1, 59, 60, 61, 62, 153, 63, 64, 65, 66, | |||||
| 67, 71, 72, 73, 117, 118, 119, 120, 133, 134, | |||||
| 135, 75 | |||||
| }; | }; | ||||
| /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | ||||
| @@ -1279,68 +1286,68 @@ namespace lol { | |||||
| const unsigned char | const unsigned char | ||||
| EasyMeshParser::yytable_[] = | EasyMeshParser::yytable_[] = | ||||
| { | { | ||||
| 140, 141, 142, 143, 135, 79, 136, 82, 84, 150, | |||||
| 143, 139, 67, 143, 124, 90, 69, 93, 95, 67, | |||||
| 68, 143, 129, 69, 143, 101, 130, 104, 106, 137, | |||||
| 138, 0, 143, 110, 111, 143, 67, 75, 0, 0, | |||||
| 69, 0, 0, 0, 0, 119, 144, 145, 146, 123, | |||||
| 0, 0, 126, 0, 0, 0, 134, 0, 0, 0, | |||||
| 146, 147, 148, 149, 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, | |||||
| 0, 0, 0, 57, 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, | |||||
| 73, 76, 0, 0, 80, 0, 83, 81, 0, 0, | |||||
| 85, 86, 0, 0, 91, 0, 94, 92, 0, 0, | |||||
| 96, 97, 0, 0, 102, 0, 105, 103, 0, 0, | |||||
| 107, 108, 0, 0, 0, 0, 0, 0, 0, 0, | |||||
| 0, 0, 0, 0, 0, 120, 121, 0, 0, 122, | |||||
| 125, 77, 78, 0, 127, 128, 0, 0, 0, 87, | |||||
| 0, 88, 89, 0, 0, 0, 0, 0, 0, 98, | |||||
| 0, 99, 100, 0, 0, 0, 0, 0, 0, 109, | |||||
| 0, 0, 0, 0, 112, 113, 0, 0, 0, 0, | |||||
| 0, 114 | |||||
| 142, 143, 144, 145, 137, 80, 138, 83, 85, 152, | |||||
| 145, 141, 68, 145, 126, 91, 70, 94, 96, 68, | |||||
| 69, 145, 131, 70, 145, 102, 132, 105, 107, 139, | |||||
| 140, 0, 145, 111, 112, 145, 68, 76, 115, 0, | |||||
| 70, 0, 0, 0, 0, 0, 121, 146, 147, 148, | |||||
| 125, 0, 0, 128, 0, 0, 0, 136, 0, 0, | |||||
| 0, 148, 149, 150, 151, 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, 0, 0, 0, 58, 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, 74, 77, 0, 0, 81, 0, 84, | |||||
| 82, 0, 0, 86, 87, 0, 0, 92, 0, 95, | |||||
| 93, 0, 0, 97, 98, 0, 0, 103, 0, 106, | |||||
| 104, 0, 0, 108, 109, 0, 0, 0, 0, 0, | |||||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, | |||||
| 123, 0, 0, 124, 127, 78, 79, 0, 129, 130, | |||||
| 0, 0, 0, 88, 0, 89, 90, 0, 0, 0, | |||||
| 0, 0, 0, 99, 0, 100, 101, 0, 0, 0, | |||||
| 0, 0, 0, 110, 0, 0, 0, 0, 113, 114, | |||||
| 0, 0, 0, 0, 0, 0, 116 | |||||
| }; | }; | ||||
| /* YYCHECK. */ | /* YYCHECK. */ | ||||
| const short int | const short int | ||||
| EasyMeshParser::yycheck_[] = | EasyMeshParser::yycheck_[] = | ||||
| { | { | ||||
| 69, 70, 71, 72, 0, 5, 0, 7, 8, 63, | |||||
| 79, 62, 60, 82, 50, 15, 64, 17, 18, 60, | |||||
| 61, 90, 55, 64, 93, 25, 55, 27, 28, 60, | |||||
| 61, -1, 101, 33, 34, 104, 60, 61, -1, -1, | |||||
| 64, -1, -1, -1, -1, 45, 115, 116, 117, 49, | |||||
| -1, -1, 52, -1, -1, -1, 56, -1, -1, -1, | |||||
| 129, 130, 131, 132, 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, | |||||
| -1, -1, -1, 62, 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, | |||||
| 1, 2, -1, -1, 5, -1, 7, 6, -1, -1, | |||||
| 9, 10, -1, -1, 15, -1, 17, 16, -1, -1, | |||||
| 19, 20, -1, -1, 25, -1, 27, 26, -1, -1, | |||||
| 29, 30, -1, -1, -1, -1, -1, -1, -1, -1, | |||||
| -1, -1, -1, -1, -1, 46, 47, -1, -1, 48, | |||||
| 51, 3, 4, -1, 53, 54, -1, -1, -1, 11, | |||||
| -1, 13, 14, -1, -1, -1, -1, -1, -1, 21, | |||||
| -1, 23, 24, -1, -1, -1, -1, -1, -1, 31, | |||||
| -1, -1, -1, -1, 36, 37, -1, -1, -1, -1, | |||||
| -1, 43 | |||||
| 70, 71, 72, 73, 0, 5, 0, 7, 8, 64, | |||||
| 80, 63, 61, 83, 51, 15, 65, 17, 18, 61, | |||||
| 62, 91, 56, 65, 94, 25, 56, 27, 28, 61, | |||||
| 62, -1, 102, 33, 34, 105, 61, 62, 38, -1, | |||||
| 65, -1, -1, -1, -1, -1, 46, 117, 118, 119, | |||||
| 50, -1, -1, 53, -1, -1, -1, 57, -1, -1, | |||||
| -1, 131, 132, 133, 134, 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, -1, -1, -1, 63, 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, 1, 2, -1, -1, 5, -1, 7, | |||||
| 6, -1, -1, 9, 10, -1, -1, 15, -1, 17, | |||||
| 16, -1, -1, 19, 20, -1, -1, 25, -1, 27, | |||||
| 26, -1, -1, 29, 30, -1, -1, -1, -1, -1, | |||||
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, | |||||
| 48, -1, -1, 49, 52, 3, 4, -1, 54, 55, | |||||
| -1, -1, -1, 11, -1, 13, 14, -1, -1, -1, | |||||
| -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, | |||||
| -1, -1, -1, 31, -1, -1, -1, -1, 36, 37, | |||||
| -1, -1, -1, -1, -1, -1, 44 | |||||
| }; | }; | ||||
| /* STOS_[STATE-NUM] -- The (internal number of the) accessing | /* STOS_[STATE-NUM] -- The (internal number of the) accessing | ||||
| @@ -1353,17 +1360,17 @@ namespace lol { | |||||
| 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||||
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | ||||
| 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | ||||
| 52, 53, 54, 55, 56, 57, 58, 62, 66, 67, | |||||
| 68, 69, 71, 72, 73, 74, 75, 60, 61, 64, | |||||
| 76, 77, 78, 79, 86, 61, 79, 76, 76, 78, | |||||
| 79, 77, 78, 79, 78, 77, 77, 76, 76, 76, | |||||
| 78, 79, 77, 78, 79, 78, 77, 77, 76, 76, | |||||
| 76, 78, 79, 77, 78, 79, 78, 77, 77, 76, | |||||
| 78, 78, 76, 76, 76, 79, 80, 81, 82, 78, | |||||
| 79, 79, 77, 78, 80, 79, 78, 77, 77, 81, | |||||
| 82, 83, 84, 85, 78, 0, 0, 67, 67, 72, | |||||
| 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, | |||||
| 63, 70 | |||||
| 52, 53, 54, 55, 56, 57, 58, 59, 63, 67, | |||||
| 68, 69, 70, 72, 73, 74, 75, 76, 61, 62, | |||||
| 65, 77, 78, 79, 80, 87, 62, 80, 77, 77, | |||||
| 79, 80, 78, 79, 80, 79, 78, 78, 77, 77, | |||||
| 77, 79, 80, 78, 79, 80, 79, 78, 78, 77, | |||||
| 77, 77, 79, 80, 78, 79, 80, 79, 78, 78, | |||||
| 77, 79, 79, 77, 77, 79, 77, 80, 81, 82, | |||||
| 83, 79, 80, 80, 78, 79, 81, 80, 79, 78, | |||||
| 78, 82, 83, 84, 85, 86, 79, 0, 0, 68, | |||||
| 68, 73, 87, 87, 87, 87, 87, 87, 87, 87, | |||||
| 87, 87, 64, 71 | |||||
| }; | }; | ||||
| #if YYDEBUG | #if YYDEBUG | ||||
| @@ -1378,7 +1385,7 @@ namespace lol { | |||||
| 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | ||||
| 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | ||||
| 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | ||||
| 315, 316, 91, 93, 45 | |||||
| 315, 316, 317, 91, 93, 45 | |||||
| }; | }; | ||||
| #endif | #endif | ||||
| @@ -1386,16 +1393,16 @@ namespace lol { | |||||
| const unsigned char | const unsigned char | ||||
| EasyMeshParser::yyr1_[] = | EasyMeshParser::yyr1_[] = | ||||
| { | { | ||||
| 0, 65, 66, 67, 67, 68, 68, 69, 70, 71, | |||||
| 71, 72, 72, 72, 73, 73, 73, 73, 74, 74, | |||||
| 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, | |||||
| 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, | |||||
| 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, | |||||
| 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, | |||||
| 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, | |||||
| 0, 66, 67, 68, 68, 69, 69, 70, 71, 72, | |||||
| 72, 73, 73, 73, 74, 74, 74, 74, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, | |||||
| 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, | |||||
| 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, | |||||
| 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, | 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, | ||||
| 86 | |||||
| 87, 87 | |||||
| }; | }; | ||||
| /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | ||||
| @@ -1407,11 +1414,11 @@ 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, | 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, 1, 1, 1, 2, 2, 1, | |||||
| 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, | |||||
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, | |||||
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, | |||||
| 2 | |||||
| 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, | |||||
| 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, | |||||
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |||||
| 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |||||
| 1, 2 | |||||
| }; | }; | ||||
| #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | ||||
| @@ -1428,15 +1435,16 @@ namespace lol { | |||||
| "T_ROTATEZ", "T_TAPERZ", "T_TWISTZ", "T_SHEARZ", "T_STRETCHZ", | "T_ROTATEZ", "T_TAPERZ", "T_TWISTZ", "T_SHEARZ", "T_STRETCHZ", | ||||
| "T_BENDZX", "T_BENDZY", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", | "T_BENDZX", "T_BENDZY", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE", | ||||
| "T_SCALE", "T_TOGGLESCALEWINDING", "T_RADIALJITTER", "T_SPLITTRIANGLE", | "T_SCALE", "T_TOGGLESCALEWINDING", "T_RADIALJITTER", "T_SPLITTRIANGLE", | ||||
| "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", | |||||
| "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", "mesh_description", | |||||
| "mesh_expression_list", "mesh_expression", "mesh_open", "mesh_close", | |||||
| "mesh_command_list", "mesh_command", "color_command", | |||||
| "transform_command", "primitive_command", "args1", "args2", "args3", | |||||
| "args4", "args5", "args6", "args7", "args8", "args9", "args10", "number", 0 | |||||
| "T_SMOOTHMESH", "T_CSGUNION", "T_CSGSUBSTRACT", "T_CSGSUBSTRACTLOSS", | |||||
| "T_CSGAND", "T_CSGXOR", "T_CHAMFER", "T_CYLINDER", "T_BOX", | |||||
| "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", "T_STAR", | |||||
| "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS", | |||||
| "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept", | |||||
| "mesh_description", "mesh_expression_list", "mesh_expression", | |||||
| "mesh_open", "mesh_close", "mesh_command_list", "mesh_command", | |||||
| "color_command", "transform_command", "primitive_command", "args1", | |||||
| "args2", "args3", "args4", "args5", "args6", "args7", "args8", "args9", | |||||
| "args10", "number", 0 | |||||
| }; | }; | ||||
| #endif | #endif | ||||
| @@ -1445,32 +1453,32 @@ namespace lol { | |||||
| const EasyMeshParser::rhs_number_type | const EasyMeshParser::rhs_number_type | ||||
| EasyMeshParser::yyrhs_[] = | EasyMeshParser::yyrhs_[] = | ||||
| { | { | ||||
| 66, 0, -1, 67, 0, -1, 68, -1, 68, 67, | |||||
| -1, 71, -1, 69, 67, 70, -1, 62, -1, 63, | |||||
| -1, 72, -1, 71, 72, -1, 73, -1, 74, -1, | |||||
| 75, -1, 3, 79, -1, 3, 61, -1, 4, 79, | |||||
| -1, 4, 61, -1, 45, 76, -1, 5, 76, -1, | |||||
| 15, 76, -1, 25, 76, -1, 35, 78, -1, 6, | |||||
| 76, -1, 16, 76, -1, 26, 76, -1, 7, 78, | |||||
| -1, 7, 79, -1, 17, 78, -1, 17, 79, -1, | |||||
| 27, 78, -1, 27, 79, -1, 8, 77, -1, 18, | |||||
| 77, -1, 28, 77, -1, 9, 78, -1, 9, 79, | |||||
| -1, 19, 78, -1, 19, 79, -1, 29, 78, -1, | |||||
| 29, 79, -1, 10, 78, -1, 20, 78, -1, 30, | |||||
| 78, -1, 11, 77, -1, 12, 77, -1, 21, 77, | |||||
| -1, 22, 77, -1, 31, 77, -1, 32, 77, -1, | |||||
| 13, 76, -1, 23, 76, -1, 33, 76, -1, 36, | |||||
| 78, -1, 14, -1, 24, -1, 34, -1, 38, 76, | |||||
| -1, 39, 76, -1, 37, -1, 40, -1, 41, -1, | |||||
| 42, -1, 43, -1, 44, -1, 46, 81, -1, 46, | |||||
| 82, -1, 47, 78, -1, 48, 79, -1, 49, 79, | |||||
| -1, 50, 77, -1, 51, 78, -1, 58, 78, -1, | |||||
| 52, 80, -1, 53, 79, -1, 54, 78, -1, 55, | |||||
| 77, -1, 56, 77, -1, 57, 85, -1, 86, -1, | |||||
| 76, 86, -1, 77, 86, -1, 78, 86, -1, 79, | |||||
| 86, -1, 80, 86, -1, 81, 86, -1, 82, 86, | |||||
| -1, 83, 86, -1, 84, 86, -1, 60, -1, 64, | |||||
| 86, -1 | |||||
| 67, 0, -1, 68, 0, -1, 69, -1, 69, 68, | |||||
| -1, 72, -1, 70, 68, 71, -1, 63, -1, 64, | |||||
| -1, 73, -1, 72, 73, -1, 74, -1, 75, -1, | |||||
| 76, -1, 3, 80, -1, 3, 62, -1, 4, 80, | |||||
| -1, 4, 62, -1, 46, 77, -1, 5, 77, -1, | |||||
| 15, 77, -1, 25, 77, -1, 35, 79, -1, 6, | |||||
| 77, -1, 16, 77, -1, 26, 77, -1, 7, 79, | |||||
| -1, 7, 80, -1, 17, 79, -1, 17, 80, -1, | |||||
| 27, 79, -1, 27, 80, -1, 8, 78, -1, 18, | |||||
| 78, -1, 28, 78, -1, 9, 79, -1, 9, 80, | |||||
| -1, 19, 79, -1, 19, 80, -1, 29, 79, -1, | |||||
| 29, 80, -1, 10, 79, -1, 20, 79, -1, 30, | |||||
| 79, -1, 11, 78, -1, 12, 78, -1, 21, 78, | |||||
| -1, 22, 78, -1, 31, 78, -1, 32, 78, -1, | |||||
| 13, 77, -1, 23, 77, -1, 33, 77, -1, 36, | |||||
| 79, -1, 14, -1, 24, -1, 34, -1, 38, 77, | |||||
| -1, 39, 77, -1, 40, 79, -1, 37, -1, 41, | |||||
| -1, 42, -1, 43, -1, 44, -1, 45, -1, 47, | |||||
| 82, -1, 47, 83, -1, 48, 79, -1, 49, 80, | |||||
| -1, 50, 80, -1, 51, 78, -1, 52, 79, -1, | |||||
| 59, 79, -1, 53, 81, -1, 54, 80, -1, 55, | |||||
| 79, -1, 56, 78, -1, 57, 78, -1, 58, 86, | |||||
| -1, 87, -1, 77, 87, -1, 78, 87, -1, 79, | |||||
| 87, -1, 80, 87, -1, 81, 87, -1, 82, 87, | |||||
| -1, 83, 87, -1, 84, 87, -1, 85, 87, -1, | |||||
| 61, -1, 65, 87, -1 | |||||
| }; | }; | ||||
| /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | ||||
| @@ -1484,10 +1492,10 @@ namespace lol { | |||||
| 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, | 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, | ||||
| 110, 113, 116, 119, 122, 125, 128, 131, 134, 137, | 110, 113, 116, 119, 122, 125, 128, 131, 134, 137, | ||||
| 140, 143, 146, 149, 152, 154, 156, 158, 161, 164, | 140, 143, 146, 149, 152, 154, 156, 158, 161, 164, | ||||
| 166, 168, 170, 172, 174, 176, 179, 182, 185, 188, | |||||
| 167, 169, 171, 173, 175, 177, 179, 182, 185, 188, | |||||
| 191, 194, 197, 200, 203, 206, 209, 212, 215, 218, | 191, 194, 197, 200, 203, 206, 209, 212, 215, 218, | ||||
| 220, 223, 226, 229, 232, 235, 238, 241, 244, 247, | |||||
| 249 | |||||
| 221, 223, 226, 229, 232, 235, 238, 241, 244, 247, | |||||
| 250, 252 | |||||
| }; | }; | ||||
| /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ | ||||
| @@ -1500,10 +1508,10 @@ namespace lol { | |||||
| 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, | 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, | ||||
| 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, | 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, | ||||
| 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, | 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, | ||||
| 162, 163, 164, 165, 166, 170, 173, 176, 177, 179, | |||||
| 181, 182, 183, 184, 186, 188, 189, 190, 191, 196, | |||||
| 197, 198, 199, 200, 201, 202, 203, 204, 205, 208, | |||||
| 209 | |||||
| 162, 163, 164, 165, 166, 167, 171, 174, 177, 178, | |||||
| 180, 182, 183, 184, 185, 187, 189, 190, 191, 192, | |||||
| 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, | |||||
| 209, 210 | |||||
| }; | }; | ||||
| // Print the state stack on the debug stream. | // Print the state stack on the debug stream. | ||||
| @@ -1547,12 +1555,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, | 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, 64, 2, 2, 2, 2, | |||||
| 2, 2, 2, 2, 2, 65, 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, 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, 62, 2, 63, 2, 2, 2, 2, 2, 2, | |||||
| 2, 63, 2, 64, 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, 2, | ||||
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||||
| @@ -1574,7 +1582,7 @@ namespace lol { | |||||
| 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | ||||
| 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | ||||
| 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | ||||
| 55, 56, 57, 58, 59, 60, 61 | |||||
| 55, 56, 57, 58, 59, 60, 61, 62 | |||||
| }; | }; | ||||
| if ((unsigned int) t <= yyuser_token_number_max_) | if ((unsigned int) t <= yyuser_token_number_max_) | ||||
| return translate_table[t]; | return translate_table[t]; | ||||
| @@ -1583,26 +1591,26 @@ namespace lol { | |||||
| } | } | ||||
| const int EasyMeshParser::yyeof_ = 0; | const int EasyMeshParser::yyeof_ = 0; | ||||
| const int EasyMeshParser::yylast_ = 271; | |||||
| const int EasyMeshParser::yylast_ = 276; | |||||
| const int EasyMeshParser::yynnts_ = 22; | const int EasyMeshParser::yynnts_ = 22; | ||||
| const int EasyMeshParser::yyempty_ = -2; | const int EasyMeshParser::yyempty_ = -2; | ||||
| const int EasyMeshParser::yyfinal_ = 135; | |||||
| const int EasyMeshParser::yyfinal_ = 137; | |||||
| const int EasyMeshParser::yyterror_ = 1; | const int EasyMeshParser::yyterror_ = 1; | ||||
| const int EasyMeshParser::yyerrcode_ = 256; | const int EasyMeshParser::yyerrcode_ = 256; | ||||
| const int EasyMeshParser::yyntokens_ = 65; | |||||
| const int EasyMeshParser::yyntokens_ = 66; | |||||
| const unsigned int EasyMeshParser::yyuser_token_number_max_ = 316; | |||||
| const unsigned int EasyMeshParser::yyuser_token_number_max_ = 317; | |||||
| const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; | const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2; | ||||
| } // lol | } // lol | ||||
| /* Line 1053 of lalr1.cc */ | /* Line 1053 of lalr1.cc */ | ||||
| #line 1602 "generated/easymesh-parser.cpp" | |||||
| #line 1610 "generated/easymesh-parser.cpp" | |||||
| /* Line 1055 of lalr1.cc */ | /* Line 1055 of lalr1.cc */ | ||||
| #line 212 "easymesh/easymesh-parser.y" | |||||
| #line 213 "easymesh/easymesh-parser.y" | |||||
| void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l, | void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l, | ||||
| @@ -169,28 +169,29 @@ namespace lol { | |||||
| T_TOGGLESCALEWINDING = 292, | T_TOGGLESCALEWINDING = 292, | ||||
| T_RADIALJITTER = 293, | T_RADIALJITTER = 293, | ||||
| T_SPLITTRIANGLE = 294, | T_SPLITTRIANGLE = 294, | ||||
| T_CSGUNION = 295, | |||||
| T_CSGSUBSTRACT = 296, | |||||
| T_CSGSUBSTRACTLOSS = 297, | |||||
| T_CSGAND = 298, | |||||
| T_CSGXOR = 299, | |||||
| T_CHAMFER = 300, | |||||
| T_CYLINDER = 301, | |||||
| T_BOX = 302, | |||||
| T_SMOOTHCHAMFBOX = 303, | |||||
| T_FLATCHAMFBOX = 304, | |||||
| T_SPHERE = 305, | |||||
| T_CAPSULE = 306, | |||||
| T_STAR = 307, | |||||
| T_EXPANDEDSTAR = 308, | |||||
| T_DISC = 309, | |||||
| T_TRIANGLE = 310, | |||||
| T_QUAD = 311, | |||||
| T_COG = 312, | |||||
| T_TORUS = 313, | |||||
| T_ERROR = 314, | |||||
| NUMBER = 315, | |||||
| COLOR = 316 | |||||
| T_SMOOTHMESH = 295, | |||||
| T_CSGUNION = 296, | |||||
| T_CSGSUBSTRACT = 297, | |||||
| T_CSGSUBSTRACTLOSS = 298, | |||||
| T_CSGAND = 299, | |||||
| T_CSGXOR = 300, | |||||
| T_CHAMFER = 301, | |||||
| T_CYLINDER = 302, | |||||
| T_BOX = 303, | |||||
| T_SMOOTHCHAMFBOX = 304, | |||||
| T_FLATCHAMFBOX = 305, | |||||
| T_SPHERE = 306, | |||||
| T_CAPSULE = 307, | |||||
| T_STAR = 308, | |||||
| T_EXPANDEDSTAR = 309, | |||||
| T_DISC = 310, | |||||
| T_TRIANGLE = 311, | |||||
| T_QUAD = 312, | |||||
| T_COG = 313, | |||||
| T_TORUS = 314, | |||||
| T_ERROR = 315, | |||||
| NUMBER = 316, | |||||
| COLOR = 317 | |||||
| }; | }; | ||||
| }; | }; | ||||
| @@ -364,7 +365,7 @@ namespace lol { | |||||
| } // lol | } // lol | ||||
| /* Line 34 of lalr1.cc */ | /* Line 34 of lalr1.cc */ | ||||
| #line 368 "generated/easymesh-parser.h" | |||||
| #line 369 "generated/easymesh-parser.h" | |||||
| @@ -330,8 +330,8 @@ typedef unsigned char YY_CHAR; | |||||
| *yy_cp = '\0'; \ | *yy_cp = '\0'; \ | ||||
| (yy_c_buf_p) = yy_cp; | (yy_c_buf_p) = yy_cp; | ||||
| #define YY_NUM_RULES 68 | |||||
| #define YY_END_OF_BUFFER 69 | |||||
| #define YY_NUM_RULES 69 | |||||
| #define YY_END_OF_BUFFER 70 | |||||
| /* This struct is not used in this scanner, | /* This struct is not used in this scanner, | ||||
| but its presence is necessary. */ | but its presence is necessary. */ | ||||
| struct yy_trans_info | struct yy_trans_info | ||||
| @@ -339,20 +339,21 @@ struct yy_trans_info | |||||
| flex_int32_t yy_verify; | flex_int32_t yy_verify; | ||||
| flex_int32_t yy_nxt; | flex_int32_t yy_nxt; | ||||
| }; | }; | ||||
| static yyconst flex_int16_t yy_accept[109] = | |||||
| static yyconst flex_int16_t yy_accept[112] = | |||||
| { 0, | { 0, | ||||
| 0, 0, 69, 67, 66, 65, 67, 67, 62, 67, | |||||
| 61, 63, 64, 67, 67, 67, 67, 67, 32, 7, | |||||
| 0, 0, 61, 61, 0, 44, 45, 48, 0, 0, | |||||
| 51, 52, 55, 0, 3, 0, 34, 35, 36, 37, | |||||
| 8, 9, 10, 1, 0, 0, 0, 29, 30, 31, | |||||
| 0, 0, 0, 4, 5, 6, 0, 0, 61, 0, | |||||
| 47, 49, 0, 0, 0, 56, 0, 0, 0, 0, | |||||
| 2, 17, 18, 19, 0, 20, 21, 22, 11, 12, | |||||
| 13, 33, 14, 15, 16, 57, 46, 50, 53, 54, | |||||
| 23, 24, 25, 26, 27, 28, 42, 40, 39, 43, | |||||
| 38, 58, 41, 0, 59, 0, 60, 0 | |||||
| 0, 0, 70, 68, 67, 66, 68, 68, 63, 68, | |||||
| 62, 64, 65, 68, 68, 68, 68, 68, 32, 7, | |||||
| 0, 0, 62, 62, 0, 45, 46, 49, 0, 0, | |||||
| 52, 53, 56, 0, 3, 0, 34, 35, 36, 37, | |||||
| 8, 9, 10, 1, 0, 0, 0, 0, 29, 30, | |||||
| 31, 0, 0, 0, 4, 5, 6, 0, 0, 62, | |||||
| 0, 48, 50, 0, 0, 0, 57, 0, 0, 0, | |||||
| 0, 2, 17, 18, 19, 0, 0, 20, 21, 22, | |||||
| 11, 12, 13, 33, 14, 15, 16, 58, 47, 51, | |||||
| 54, 55, 23, 24, 25, 26, 27, 28, 43, 41, | |||||
| 40, 44, 39, 38, 59, 42, 0, 60, 0, 61, | |||||
| 0 | |||||
| } ; | } ; | ||||
| static yyconst flex_int32_t yy_ec[256] = | static yyconst flex_int32_t yy_ec[256] = | ||||
| @@ -395,84 +396,84 @@ static yyconst flex_int32_t yy_meta[35] = | |||||
| 1, 1, 1, 1 | 1, 1, 1, 1 | ||||
| } ; | } ; | ||||
| static yyconst flex_int16_t yy_base[117] = | |||||
| static yyconst flex_int16_t yy_base[120] = | |||||
| { 0, | { 0, | ||||
| 0, 0, 138, 139, 139, 139, 0, 28, 30, 129, | |||||
| 32, 139, 139, 36, 120, 27, 11, 25, 51, 73, | |||||
| 0, 126, 53, 64, 82, 139, 54, 139, 104, 115, | |||||
| 139, 53, 105, 59, 139, 109, 139, 139, 139, 139, | |||||
| 139, 139, 139, 113, 62, 104, 65, 139, 139, 139, | |||||
| 76, 94, 79, 139, 139, 139, 0, 116, 115, 97, | |||||
| 139, 139, 107, 106, 99, 139, 69, 43, 82, 103, | |||||
| 139, 139, 139, 139, 89, 139, 139, 139, 139, 139, | |||||
| 139, 139, 139, 139, 139, 0, 139, 139, 139, 139, | |||||
| 139, 139, 139, 139, 139, 139, 139, 95, 139, 139, | |||||
| 139, 0, 139, 0, 0, 0, 139, 139, 98, 87, | |||||
| 80, 77, 67, 54, 46, 39 | |||||
| 0, 0, 141, 142, 142, 142, 0, 28, 30, 132, | |||||
| 32, 142, 142, 36, 123, 27, 11, 25, 51, 73, | |||||
| 0, 130, 53, 65, 73, 142, 74, 142, 109, 121, | |||||
| 142, 52, 111, 56, 142, 115, 142, 142, 142, 142, | |||||
| 142, 142, 142, 119, 62, 103, 109, 65, 142, 142, | |||||
| 142, 76, 99, 79, 142, 142, 142, 0, 121, 120, | |||||
| 102, 142, 142, 112, 111, 104, 142, 35, 68, 59, | |||||
| 90, 142, 142, 142, 142, 103, 92, 142, 142, 142, | |||||
| 142, 142, 142, 142, 142, 142, 142, 0, 142, 142, | |||||
| 142, 142, 142, 142, 142, 142, 142, 142, 142, 97, | |||||
| 142, 142, 142, 142, 0, 142, 0, 0, 0, 142, | |||||
| 142, 115, 114, 113, 112, 70, 54, 46, 39 | |||||
| } ; | } ; | ||||
| static yyconst flex_int16_t yy_def[117] = | |||||
| static yyconst flex_int16_t yy_def[120] = | |||||
| { 0, | { 0, | ||||
| 108, 1, 108, 108, 108, 108, 109, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 110, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 111, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 112, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 113, 108, 114, 115, 116, 108, 0, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108 | |||||
| 111, 1, 111, 111, 111, 111, 112, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 113, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 114, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 115, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 116, 111, 117, 118, 119, 111, | |||||
| 0, 111, 111, 111, 111, 111, 111, 111, 111 | |||||
| } ; | } ; | ||||
| static yyconst flex_int16_t yy_nxt[174] = | |||||
| static yyconst flex_int16_t yy_nxt[177] = | |||||
| { 0, | { 0, | ||||
| 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, | 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, | ||||
| 12, 13, 14, 15, 16, 4, 4, 4, 4, 4, | 12, 13, 14, 15, 16, 4, 4, 4, 4, 4, | ||||
| 4, 4, 17, 4, 4, 4, 18, 19, 20, 4, | 4, 4, 17, 4, 4, 4, 18, 19, 20, 4, | ||||
| 4, 4, 4, 4, 22, 23, 22, 23, 22, 23, | 4, 4, 4, 4, 22, 23, 22, 23, 22, 23, | ||||
| 107, 25, 37, 38, 39, 40, 35, 106, 25, 26, | |||||
| 27, 28, 29, 30, 36, 105, 41, 42, 43, 22, | |||||
| 23, 31, 25, 32, 33, 44, 60, 64, 104, 25, | |||||
| 45, 24, 61, 25, 93, 46, 94, 65, 102, 47, | |||||
| 25, 86, 48, 49, 50, 51, 58, 58, 57, 59, | |||||
| 67, 68, 69, 72, 73, 74, 76, 77, 78, 21, | |||||
| 52, 91, 92, 53, 54, 55, 56, 79, 80, 81, | |||||
| 83, 84, 85, 95, 96, 97, 103, 101, 90, 89, | |||||
| 88, 87, 59, 59, 82, 75, 71, 70, 66, 63, | |||||
| 98, 62, 99, 24, 100, 34, 24, 108, 3, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108 | |||||
| 110, 25, 37, 38, 39, 40, 35, 109, 25, 26, | |||||
| 27, 28, 29, 30, 36, 108, 41, 42, 43, 22, | |||||
| 23, 31, 25, 32, 33, 44, 65, 93, 94, 25, | |||||
| 45, 107, 24, 46, 25, 47, 66, 59, 59, 48, | |||||
| 60, 25, 49, 50, 51, 52, 61, 68, 69, 70, | |||||
| 97, 98, 62, 73, 74, 75, 78, 79, 80, 95, | |||||
| 53, 96, 99, 54, 55, 56, 57, 81, 82, 83, | |||||
| 85, 86, 87, 105, 88, 58, 21, 100, 106, 101, | |||||
| 104, 102, 103, 92, 91, 90, 89, 60, 60, 84, | |||||
| 77, 76, 72, 71, 67, 64, 63, 24, 34, 24, | |||||
| 111, 3, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111 | |||||
| } ; | } ; | ||||
| static yyconst flex_int16_t yy_chk[174] = | |||||
| static yyconst flex_int16_t yy_chk[177] = | |||||
| { 0, | { 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, 1, 1, 1, 1, 1, | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
| 1, 1, 1, 1, 8, 8, 9, 9, 11, 11, | 1, 1, 1, 1, 8, 8, 9, 9, 11, 11, | ||||
| 116, 11, 17, 17, 17, 18, 16, 115, 11, 14, | |||||
| 14, 14, 14, 14, 16, 114, 18, 18, 18, 23, | |||||
| 23, 14, 23, 14, 14, 19, 27, 32, 113, 23, | |||||
| 19, 24, 27, 24, 68, 19, 68, 32, 112, 19, | |||||
| 24, 111, 19, 19, 19, 20, 25, 25, 110, 25, | |||||
| 34, 34, 34, 45, 45, 45, 47, 47, 47, 109, | |||||
| 20, 67, 67, 20, 20, 20, 20, 51, 51, 51, | |||||
| 53, 53, 53, 69, 69, 70, 98, 75, 65, 64, | |||||
| 63, 60, 59, 58, 52, 46, 44, 36, 33, 30, | |||||
| 70, 29, 70, 22, 70, 15, 10, 3, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, | |||||
| 108, 108, 108 | |||||
| 119, 11, 17, 17, 17, 18, 16, 118, 11, 14, | |||||
| 14, 14, 14, 14, 16, 117, 18, 18, 18, 23, | |||||
| 23, 14, 23, 14, 14, 19, 32, 68, 68, 23, | |||||
| 19, 116, 24, 19, 24, 19, 32, 25, 25, 19, | |||||
| 25, 24, 19, 19, 19, 20, 27, 34, 34, 34, | |||||
| 70, 70, 27, 45, 45, 45, 48, 48, 48, 69, | |||||
| 20, 69, 71, 20, 20, 20, 20, 52, 52, 52, | |||||
| 54, 54, 54, 115, 114, 113, 112, 71, 100, 71, | |||||
| 77, 71, 76, 66, 65, 64, 61, 60, 59, 53, | |||||
| 47, 46, 44, 36, 33, 30, 29, 22, 15, 10, | |||||
| 3, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, | |||||
| 111, 111, 111, 111, 111, 111 | |||||
| } ; | } ; | ||||
| /* The intent behind this definition is that it'll catch | /* The intent behind this definition is that it'll catch | ||||
| @@ -521,7 +522,7 @@ typedef lol::EasyMeshParser::token_type token_type; | |||||
| #define yyterminate() return token::T_END | #define yyterminate() return token::T_END | ||||
| #define YY_NO_UNISTD_H | #define YY_NO_UNISTD_H | ||||
| #define YY_USER_ACTION yylloc->columns(yyleng); | #define YY_USER_ACTION yylloc->columns(yyleng); | ||||
| #line 525 "generated/easymesh-scanner.cpp" | |||||
| #line 526 "generated/easymesh-scanner.cpp" | |||||
| #define INITIAL 0 | #define INITIAL 0 | ||||
| @@ -634,7 +635,7 @@ YY_DECL | |||||
| yylloc->step(); | yylloc->step(); | ||||
| #line 638 "generated/easymesh-scanner.cpp" | |||||
| #line 639 "generated/easymesh-scanner.cpp" | |||||
| if ( !(yy_init) ) | if ( !(yy_init) ) | ||||
| { | { | ||||
| @@ -687,13 +688,13 @@ yy_match: | |||||
| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
| { | { | ||||
| yy_current_state = (int) yy_def[yy_current_state]; | yy_current_state = (int) yy_def[yy_current_state]; | ||||
| if ( yy_current_state >= 109 ) | |||||
| if ( yy_current_state >= 112 ) | |||||
| yy_c = yy_meta[(unsigned int) yy_c]; | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
| } | } | ||||
| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
| ++yy_cp; | ++yy_cp; | ||||
| } | } | ||||
| while ( yy_current_state != 108 ); | |||||
| while ( yy_current_state != 111 ); | |||||
| yy_cp = (yy_last_accepting_cpos); | yy_cp = (yy_last_accepting_cpos); | ||||
| yy_current_state = (yy_last_accepting_state); | yy_current_state = (yy_last_accepting_state); | ||||
| @@ -905,97 +906,102 @@ YY_RULE_SETUP | |||||
| YY_BREAK | YY_BREAK | ||||
| case 39: | case 39: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 91 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_CSGUNION; } | |||||
| #line 90 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_SMOOTHMESH; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 40: | case 40: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 92 "easymesh/easymesh-scanner.l" | #line 92 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CSGSUBSTRACT; } | |||||
| { return token::T_CSGUNION; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 41: | case 41: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 93 "easymesh/easymesh-scanner.l" | #line 93 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CSGSUBSTRACTLOSS; } | |||||
| { return token::T_CSGSUBSTRACT; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 42: | case 42: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 94 "easymesh/easymesh-scanner.l" | #line 94 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CSGAND; } | |||||
| { return token::T_CSGSUBSTRACTLOSS; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 43: | case 43: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 95 "easymesh/easymesh-scanner.l" | #line 95 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CSGXOR; } | |||||
| { return token::T_CSGAND; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 44: | case 44: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 97 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_BOX; } | |||||
| #line 96 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_CSGXOR; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 45: | case 45: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 98 "easymesh/easymesh-scanner.l" | #line 98 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CYLINDER; } | |||||
| { return token::T_BOX; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 46: | case 46: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 99 "easymesh/easymesh-scanner.l" | #line 99 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_CAPSULE; } | |||||
| { return token::T_CYLINDER; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 47: | case 47: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 100 "easymesh/easymesh-scanner.l" | #line 100 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_COG; } | |||||
| { return token::T_CAPSULE; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 48: | case 48: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 101 "easymesh/easymesh-scanner.l" | #line 101 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_DISC; } | |||||
| { return token::T_COG; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 49: | case 49: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 102 "easymesh/easymesh-scanner.l" | #line 102 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_EXPANDEDSTAR; } | |||||
| { return token::T_DISC; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 50: | case 50: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 103 "easymesh/easymesh-scanner.l" | #line 103 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_FLATCHAMFBOX; } | |||||
| { return token::T_EXPANDEDSTAR; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 51: | case 51: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 104 "easymesh/easymesh-scanner.l" | #line 104 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_QUAD; } | |||||
| { return token::T_FLATCHAMFBOX; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 52: | case 52: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 105 "easymesh/easymesh-scanner.l" | #line 105 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_STAR; } | |||||
| { return token::T_QUAD; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 53: | case 53: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 106 "easymesh/easymesh-scanner.l" | #line 106 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_SMOOTHCHAMFBOX; } | |||||
| { return token::T_STAR; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 54: | case 54: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 107 "easymesh/easymesh-scanner.l" | #line 107 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_SPHERE; } | |||||
| { return token::T_SMOOTHCHAMFBOX; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 55: | case 55: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 108 "easymesh/easymesh-scanner.l" | #line 108 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_TRIANGLE; } | |||||
| { return token::T_SPHERE; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 56: | case 56: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 109 "easymesh/easymesh-scanner.l" | #line 109 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_TORUS; } | |||||
| { return token::T_TRIANGLE; } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 57: | case 57: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 111 "easymesh/easymesh-scanner.l" | |||||
| #line 110 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_TORUS; } | |||||
| YY_BREAK | |||||
| case 58: | |||||
| YY_RULE_SETUP | |||||
| #line 112 "easymesh/easymesh-scanner.l" | |||||
| { | { | ||||
| uint32_t tmp = std::strtol(yytext + 1, NULL, 16); | uint32_t tmp = std::strtol(yytext + 1, NULL, 16); | ||||
| yylval->u32val = 0x11000000u * (tmp >> 8) | yylval->u32val = 0x11000000u * (tmp >> 8) | ||||
| @@ -1004,9 +1010,9 @@ YY_RULE_SETUP | |||||
| | 0x000000ffu; | | 0x000000ffu; | ||||
| return token::COLOR; } | return token::COLOR; } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 58: | |||||
| case 59: | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 118 "easymesh/easymesh-scanner.l" | |||||
| #line 119 "easymesh/easymesh-scanner.l" | |||||
| { | { | ||||
| uint32_t tmp = std::strtol(yytext + 1, NULL, 16); | uint32_t tmp = std::strtol(yytext + 1, NULL, 16); | ||||
| yylval->u32val = 0x11000000u * (tmp >> 12) | yylval->u32val = 0x11000000u * (tmp >> 12) | ||||
| @@ -1015,64 +1021,64 @@ YY_RULE_SETUP | |||||
| | 0x00000011u * (tmp & 0xf); | | 0x00000011u * (tmp & 0xf); | ||||
| return token::COLOR; } | return token::COLOR; } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 59: | |||||
| case 60: | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 125 "easymesh/easymesh-scanner.l" | |||||
| #line 126 "easymesh/easymesh-scanner.l" | |||||
| { | { | ||||
| yylval->u32val = 0xffu | yylval->u32val = 0xffu | ||||
| | 0x100u * (uint32_t)std::strtol(yytext + 1, NULL, 16); | | 0x100u * (uint32_t)std::strtol(yytext + 1, NULL, 16); | ||||
| return token::COLOR; } | return token::COLOR; } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 60: | |||||
| case 61: | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 129 "easymesh/easymesh-scanner.l" | |||||
| #line 130 "easymesh/easymesh-scanner.l" | |||||
| { | { | ||||
| yylval->u32val = (uint32_t)std::strtol(yytext + 1, NULL, 16); | yylval->u32val = (uint32_t)std::strtol(yytext + 1, NULL, 16); | ||||
| return token::COLOR; } | return token::COLOR; } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 61: | |||||
| case 62: | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 132 "easymesh/easymesh-scanner.l" | |||||
| #line 133 "easymesh/easymesh-scanner.l" | |||||
| { | { | ||||
| yylval->fval = std::atof(yytext); return token::NUMBER; } | yylval->fval = std::atof(yytext); return token::NUMBER; } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 62: | |||||
| YY_RULE_SETUP | |||||
| #line 134 "easymesh/easymesh-scanner.l" | |||||
| { return token_type('-'); } | |||||
| YY_BREAK | |||||
| case 63: | case 63: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 135 "easymesh/easymesh-scanner.l" | #line 135 "easymesh/easymesh-scanner.l" | ||||
| { return token_type('['); } | |||||
| { return token_type('-'); } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 64: | case 64: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 136 "easymesh/easymesh-scanner.l" | #line 136 "easymesh/easymesh-scanner.l" | ||||
| { return token_type(']'); } | |||||
| { return token_type('['); } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 65: | case 65: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 137 "easymesh/easymesh-scanner.l" | #line 137 "easymesh/easymesh-scanner.l" | ||||
| { /* ignore this */ } | |||||
| { return token_type(']'); } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 66: | case 66: | ||||
| /* rule 66 can match eol */ | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 138 "easymesh/easymesh-scanner.l" | #line 138 "easymesh/easymesh-scanner.l" | ||||
| { /* ignore this */ } | { /* ignore this */ } | ||||
| YY_BREAK | YY_BREAK | ||||
| case 67: | case 67: | ||||
| /* rule 67 can match eol */ | |||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 139 "easymesh/easymesh-scanner.l" | #line 139 "easymesh/easymesh-scanner.l" | ||||
| { return token::T_ERROR; } | |||||
| { /* ignore this */ } | |||||
| YY_BREAK | YY_BREAK | ||||
| case 68: | case 68: | ||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||
| #line 141 "easymesh/easymesh-scanner.l" | |||||
| #line 140 "easymesh/easymesh-scanner.l" | |||||
| { return token::T_ERROR; } | |||||
| YY_BREAK | |||||
| case 69: | |||||
| YY_RULE_SETUP | |||||
| #line 142 "easymesh/easymesh-scanner.l" | |||||
| ECHO; | ECHO; | ||||
| YY_BREAK | YY_BREAK | ||||
| #line 1076 "generated/easymesh-scanner.cpp" | |||||
| #line 1082 "generated/easymesh-scanner.cpp" | |||||
| case YY_STATE_EOF(INITIAL): | case YY_STATE_EOF(INITIAL): | ||||
| yyterminate(); | yyterminate(); | ||||
| @@ -1454,7 +1460,7 @@ int yyFlexLexer::yy_get_next_buffer() | |||||
| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
| { | { | ||||
| yy_current_state = (int) yy_def[yy_current_state]; | yy_current_state = (int) yy_def[yy_current_state]; | ||||
| if ( yy_current_state >= 109 ) | |||||
| if ( yy_current_state >= 112 ) | |||||
| yy_c = yy_meta[(unsigned int) yy_c]; | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
| } | } | ||||
| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
| @@ -1482,11 +1488,11 @@ int yyFlexLexer::yy_get_next_buffer() | |||||
| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
| { | { | ||||
| yy_current_state = (int) yy_def[yy_current_state]; | yy_current_state = (int) yy_def[yy_current_state]; | ||||
| if ( yy_current_state >= 109 ) | |||||
| if ( yy_current_state >= 112 ) | |||||
| yy_c = yy_meta[(unsigned int) yy_c]; | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
| } | } | ||||
| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
| yy_is_jam = (yy_current_state == 108); | |||||
| yy_is_jam = (yy_current_state == 111); | |||||
| return yy_is_jam ? 0 : yy_current_state; | return yy_is_jam ? 0 : yy_current_state; | ||||
| } | } | ||||
| @@ -1973,7 +1979,7 @@ void EasyMeshfree (void * ptr ) | |||||
| #define YYTABLES_NAME "yytables" | #define YYTABLES_NAME "yytables" | ||||
| #line 141 "easymesh/easymesh-scanner.l" | |||||
| #line 142 "easymesh/easymesh-scanner.l" | |||||
| @@ -1,8 +1,8 @@ | |||||
| /* A Bison parser, made by GNU Bison 2.5. */ | |||||
| /* A Bison parser, made by GNU Bison 2.4.2. */ | |||||
| /* Locations for Bison parsers in C++ | /* Locations for Bison parsers in C++ | ||||
| Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. | |||||
| Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc. | |||||
| This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| @@ -1,8 +1,8 @@ | |||||
| /* A Bison parser, made by GNU Bison 2.5. */ | |||||
| /* A Bison parser, made by GNU Bison 2.4.2. */ | |||||
| /* Skeleton implementation for Bison LALR(1) parsers in C++ | /* Skeleton implementation for Bison LALR(1) parsers in C++ | ||||
| Copyright (C) 2002-2011 Free Software Foundation, Inc. | |||||
| Copyright (C) 2002-2010 Free Software Foundation, Inc. | |||||
| This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| @@ -35,7 +35,7 @@ | |||||
| /* First part of user declarations. */ | /* First part of user declarations. */ | ||||
| /* Line 293 of lalr1.cc */ | |||||
| /* Line 310 of lalr1.cc */ | |||||
| #line 1 "gpu/lolfx-parser.y" | #line 1 "gpu/lolfx-parser.y" | ||||
| // | // | ||||
| @@ -58,7 +58,7 @@ | |||||
| /* Line 293 of lalr1.cc */ | |||||
| /* Line 310 of lalr1.cc */ | |||||
| #line 63 "generated/lolfx-parser.cpp" | #line 63 "generated/lolfx-parser.cpp" | ||||
| @@ -66,7 +66,7 @@ | |||||
| /* User implementation prologue. */ | /* User implementation prologue. */ | ||||
| /* Line 299 of lalr1.cc */ | |||||
| /* Line 316 of lalr1.cc */ | |||||
| #line 241 "gpu/lolfx-parser.y" | #line 241 "gpu/lolfx-parser.y" | ||||
| #include "gpu/lolfx-compiler.h" | #include "gpu/lolfx-compiler.h" | ||||
| @@ -75,7 +75,7 @@ | |||||
| #define yylex mc.m_lexer->lex | #define yylex mc.m_lexer->lex | ||||
| /* Line 299 of lalr1.cc */ | |||||
| /* Line 316 of lalr1.cc */ | |||||
| #line 80 "generated/lolfx-parser.cpp" | #line 80 "generated/lolfx-parser.cpp" | ||||
| #ifndef YY_ | #ifndef YY_ | ||||
| @@ -90,26 +90,6 @@ | |||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |||||
| If N is 0, then set CURRENT to the empty location which ends | |||||
| the previous symbol: RHS[0] (always defined). */ | |||||
| #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | |||||
| #ifndef YYLLOC_DEFAULT | |||||
| # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |||||
| do \ | |||||
| if (N) \ | |||||
| { \ | |||||
| (Current).begin = YYRHSLOC (Rhs, 1).begin; \ | |||||
| (Current).end = YYRHSLOC (Rhs, N).end; \ | |||||
| } \ | |||||
| else \ | |||||
| { \ | |||||
| (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ | |||||
| } \ | |||||
| while (false) | |||||
| #endif | |||||
| /* Suppress unused-variable warnings by "using" E. */ | /* Suppress unused-variable warnings by "using" E. */ | ||||
| #define YYUSE(e) ((void) (e)) | #define YYUSE(e) ((void) (e)) | ||||
| @@ -161,8 +141,9 @@ do { \ | |||||
| namespace lol { | namespace lol { | ||||
| /* Line 382 of lalr1.cc */ | |||||
| #line 166 "generated/lolfx-parser.cpp" | |||||
| /* Line 379 of lalr1.cc */ | |||||
| #line 146 "generated/lolfx-parser.cpp" | |||||
| #if YYERROR_VERBOSE | |||||
| /* Return YYSTR after stripping away unnecessary quotes and | /* Return YYSTR after stripping away unnecessary quotes and | ||||
| backslashes, so that it's suitable for yyerror. The heuristic is | backslashes, so that it's suitable for yyerror. The heuristic is | ||||
| @@ -201,6 +182,7 @@ namespace lol { | |||||
| return yystr; | return yystr; | ||||
| } | } | ||||
| #endif | |||||
| /// Build a parser object. | /// Build a parser object. | ||||
| LolFxParser::LolFxParser (class LolFxCompiler& mc_yyarg) | LolFxParser::LolFxParser (class LolFxCompiler& mc_yyarg) | ||||
| @@ -301,18 +283,6 @@ namespace lol { | |||||
| } | } | ||||
| #endif | #endif | ||||
| inline bool | |||||
| LolFxParser::yy_pact_value_is_default_ (int yyvalue) | |||||
| { | |||||
| return yyvalue == yypact_ninf_; | |||||
| } | |||||
| inline bool | |||||
| LolFxParser::yy_table_value_is_error_ (int yyvalue) | |||||
| { | |||||
| return yyvalue == yytable_ninf_; | |||||
| } | |||||
| int | int | ||||
| LolFxParser::parse () | LolFxParser::parse () | ||||
| { | { | ||||
| @@ -334,7 +304,7 @@ namespace lol { | |||||
| /// Location of the lookahead. | /// Location of the lookahead. | ||||
| location_type yylloc; | location_type yylloc; | ||||
| /// The locations where the error started and ended. | /// The locations where the error started and ended. | ||||
| location_type yyerror_range[3]; | |||||
| location_type yyerror_range[2]; | |||||
| /// $$. | /// $$. | ||||
| semantic_type yyval; | semantic_type yyval; | ||||
| @@ -372,7 +342,7 @@ namespace lol { | |||||
| /* Try to take a decision without lookahead. */ | /* Try to take a decision without lookahead. */ | ||||
| yyn = yypact_[yystate]; | yyn = yypact_[yystate]; | ||||
| if (yy_pact_value_is_default_ (yyn)) | |||||
| if (yyn == yypact_ninf_) | |||||
| goto yydefault; | goto yydefault; | ||||
| /* Read a lookahead token. */ | /* Read a lookahead token. */ | ||||
| @@ -405,8 +375,8 @@ namespace lol { | |||||
| yyn = yytable_[yyn]; | yyn = yytable_[yyn]; | ||||
| if (yyn <= 0) | if (yyn <= 0) | ||||
| { | { | ||||
| if (yy_table_value_is_error_ (yyn)) | |||||
| goto yyerrlab; | |||||
| if (yyn == 0 || yyn == yytable_ninf_) | |||||
| goto yyerrlab; | |||||
| yyn = -yyn; | yyn = -yyn; | ||||
| goto yyreduce; | goto yyreduce; | ||||
| } | } | ||||
| @@ -462,57 +432,46 @@ namespace lol { | |||||
| { | { | ||||
| case 202: | case 202: | ||||
| /* Line 690 of lalr1.cc */ | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 728 "gpu/lolfx-parser.y" | #line 728 "gpu/lolfx-parser.y" | ||||
| { std::cout << "New tech " << std::endl; } | { std::cout << "New tech " << std::endl; } | ||||
| break; | break; | ||||
| case 203: | case 203: | ||||
| /* Line 690 of lalr1.cc */ | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 736 "gpu/lolfx-parser.y" | #line 736 "gpu/lolfx-parser.y" | ||||
| { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } | { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } | ||||
| break; | break; | ||||
| case 204: | case 204: | ||||
| /* Line 690 of lalr1.cc */ | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 737 "gpu/lolfx-parser.y" | #line 737 "gpu/lolfx-parser.y" | ||||
| { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } | { std::cout << "New name " << (yysemantic_stack_[(1) - (1)].sval) << std::endl; } | ||||
| break; | break; | ||||
| case 207: | case 207: | ||||
| /* Line 690 of lalr1.cc */ | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 750 "gpu/lolfx-parser.y" | #line 750 "gpu/lolfx-parser.y" | ||||
| { std::cout << "New pass " << std::endl; } | { std::cout << "New pass " << std::endl; } | ||||
| break; | break; | ||||
| case 226: | case 226: | ||||
| /* Line 690 of lalr1.cc */ | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 786 "gpu/lolfx-parser.y" | #line 786 "gpu/lolfx-parser.y" | ||||
| { std::cout << "new shader" << std::endl; } | { std::cout << "new shader" << std::endl; } | ||||
| break; | break; | ||||
| /* Line 690 of lalr1.cc */ | |||||
| #line 502 "generated/lolfx-parser.cpp" | |||||
| /* Line 677 of lalr1.cc */ | |||||
| #line 472 "generated/lolfx-parser.cpp" | |||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| /* User semantic actions sometimes alter yychar, and that requires | |||||
| that yytoken be updated with the new translation. We take the | |||||
| approach of translating immediately before every use of yytoken. | |||||
| One alternative is translating here after every semantic action, | |||||
| but that translation would be missed if the semantic action | |||||
| invokes YYABORT, YYACCEPT, or YYERROR immediately after altering | |||||
| yychar. In the case of YYABORT or YYACCEPT, an incorrect | |||||
| destructor might then be invoked immediately. In the case of | |||||
| YYERROR, subsequent parser actions might lead to an incorrect | |||||
| destructor call or verbose syntax error message before the | |||||
| lookahead is translated. */ | |||||
| YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); | YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); | ||||
| yypop_ (yylen); | yypop_ (yylen); | ||||
| @@ -536,20 +495,14 @@ namespace lol { | |||||
| | yyerrlab -- here on detecting error | | | yyerrlab -- here on detecting error | | ||||
| `------------------------------------*/ | `------------------------------------*/ | ||||
| yyerrlab: | yyerrlab: | ||||
| /* Make sure we have latest lookahead translation. See comments at | |||||
| user semantic actions for why this is necessary. */ | |||||
| yytoken = yytranslate_ (yychar); | |||||
| /* If not already recovering from an error, report this error. */ | /* If not already recovering from an error, report this error. */ | ||||
| if (!yyerrstatus_) | if (!yyerrstatus_) | ||||
| { | { | ||||
| ++yynerrs_; | ++yynerrs_; | ||||
| if (yychar == yyempty_) | |||||
| yytoken = yyempty_; | |||||
| error (yylloc, yysyntax_error_ (yystate, yytoken)); | error (yylloc, yysyntax_error_ (yystate, yytoken)); | ||||
| } | } | ||||
| yyerror_range[1] = yylloc; | |||||
| yyerror_range[0] = yylloc; | |||||
| if (yyerrstatus_ == 3) | if (yyerrstatus_ == 3) | ||||
| { | { | ||||
| /* If just tried and failed to reuse lookahead token after an | /* If just tried and failed to reuse lookahead token after an | ||||
| @@ -584,7 +537,7 @@ namespace lol { | |||||
| if (false) | if (false) | ||||
| goto yyerrorlab; | goto yyerrorlab; | ||||
| yyerror_range[1] = yylocation_stack_[yylen - 1]; | |||||
| yyerror_range[0] = yylocation_stack_[yylen - 1]; | |||||
| /* Do not reclaim the symbols of the rule which action triggered | /* Do not reclaim the symbols of the rule which action triggered | ||||
| this YYERROR. */ | this YYERROR. */ | ||||
| yypop_ (yylen); | yypop_ (yylen); | ||||
| @@ -601,7 +554,7 @@ namespace lol { | |||||
| for (;;) | for (;;) | ||||
| { | { | ||||
| yyn = yypact_[yystate]; | yyn = yypact_[yystate]; | ||||
| if (!yy_pact_value_is_default_ (yyn)) | |||||
| if (yyn != yypact_ninf_) | |||||
| { | { | ||||
| yyn += yyterror_; | yyn += yyterror_; | ||||
| if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) | if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) | ||||
| @@ -616,7 +569,7 @@ namespace lol { | |||||
| if (yystate_stack_.height () == 1) | if (yystate_stack_.height () == 1) | ||||
| YYABORT; | YYABORT; | ||||
| yyerror_range[1] = yylocation_stack_[0]; | |||||
| yyerror_range[0] = yylocation_stack_[0]; | |||||
| yydestruct_ ("Error: popping", | yydestruct_ ("Error: popping", | ||||
| yystos_[yystate], | yystos_[yystate], | ||||
| &yysemantic_stack_[0], &yylocation_stack_[0]); | &yysemantic_stack_[0], &yylocation_stack_[0]); | ||||
| @@ -625,10 +578,10 @@ namespace lol { | |||||
| YY_STACK_PRINT (); | YY_STACK_PRINT (); | ||||
| } | } | ||||
| yyerror_range[2] = yylloc; | |||||
| yyerror_range[1] = yylloc; | |||||
| // Using YYLLOC is tempting, but would change the location of | // Using YYLLOC is tempting, but would change the location of | ||||
| // the lookahead. YYLOC is available though. | // the lookahead. YYLOC is available though. | ||||
| YYLLOC_DEFAULT (yyloc, yyerror_range, 2); | |||||
| YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); | |||||
| yysemantic_stack_.push (yylval); | yysemantic_stack_.push (yylval); | ||||
| yylocation_stack_.push (yyloc); | yylocation_stack_.push (yyloc); | ||||
| @@ -651,13 +604,7 @@ namespace lol { | |||||
| yyreturn: | yyreturn: | ||||
| if (yychar != yyempty_) | if (yychar != yyempty_) | ||||
| { | |||||
| /* Make sure we have latest lookahead translation. See comments | |||||
| at user semantic actions for why this is necessary. */ | |||||
| yytoken = yytranslate_ (yychar); | |||||
| yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, | |||||
| &yylloc); | |||||
| } | |||||
| yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); | |||||
| /* Do not reclaim the symbols of the rule which action triggered | /* Do not reclaim the symbols of the rule which action triggered | ||||
| this YYABORT or YYACCEPT. */ | this YYABORT or YYACCEPT. */ | ||||
| @@ -676,97 +623,51 @@ namespace lol { | |||||
| // Generate an error message. | // Generate an error message. | ||||
| std::string | std::string | ||||
| LolFxParser::yysyntax_error_ (int yystate, int yytoken) | |||||
| LolFxParser::yysyntax_error_ (int yystate, int tok) | |||||
| { | { | ||||
| std::string yyres; | |||||
| // Number of reported tokens (one for the "unexpected", one per | |||||
| // "expected"). | |||||
| size_t yycount = 0; | |||||
| // Its maximum. | |||||
| enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | |||||
| // Arguments of yyformat. | |||||
| char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | |||||
| /* There are many possibilities here to consider: | |||||
| - If this state is a consistent state with a default action, then | |||||
| the only way this function was invoked is if the default action | |||||
| is an error action. In that case, don't check for expected | |||||
| tokens because there are none. | |||||
| - The only way there can be no lookahead present (in yytoken) is | |||||
| if this state is a consistent state with a default action. | |||||
| Thus, detecting the absence of a lookahead is sufficient to | |||||
| determine that there is no unexpected or expected token to | |||||
| report. In that case, just report a simple "syntax error". | |||||
| - Don't assume there isn't a lookahead just because this state is | |||||
| a consistent state with a default action. There might have | |||||
| been a previous inconsistent state, consistent state with a | |||||
| non-default action, or user semantic action that manipulated | |||||
| yychar. | |||||
| - Of course, the expected token list depends on states to have | |||||
| correct lookahead information, and it depends on the parser not | |||||
| to perform extra reductions after fetching a lookahead from the | |||||
| scanner and before detecting a syntax error. Thus, state | |||||
| merging (from LALR or IELR) and default reductions corrupt the | |||||
| expected token list. However, the list is correct for | |||||
| canonical LR with one exception: it will still contain any | |||||
| token that will not be accepted due to an error action in a | |||||
| later state. | |||||
| */ | |||||
| if (yytoken != yyempty_) | |||||
| { | |||||
| yyarg[yycount++] = yytname_[yytoken]; | |||||
| int yyn = yypact_[yystate]; | |||||
| if (!yy_pact_value_is_default_ (yyn)) | |||||
| { | |||||
| /* Start YYX at -YYN if negative to avoid negative indexes in | |||||
| YYCHECK. In other words, skip the first -YYN actions for | |||||
| this state because they are default actions. */ | |||||
| int yyxbegin = yyn < 0 ? -yyn : 0; | |||||
| /* Stay within bounds of both yycheck and yytname. */ | |||||
| int yychecklim = yylast_ - yyn + 1; | |||||
| int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; | |||||
| for (int yyx = yyxbegin; yyx < yyxend; ++yyx) | |||||
| if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_ | |||||
| && !yy_table_value_is_error_ (yytable_[yyx + yyn])) | |||||
| { | |||||
| if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | |||||
| { | |||||
| yycount = 1; | |||||
| break; | |||||
| } | |||||
| else | |||||
| yyarg[yycount++] = yytname_[yyx]; | |||||
| } | |||||
| } | |||||
| } | |||||
| char const* yyformat = 0; | |||||
| switch (yycount) | |||||
| std::string res; | |||||
| YYUSE (yystate); | |||||
| #if YYERROR_VERBOSE | |||||
| int yyn = yypact_[yystate]; | |||||
| if (yypact_ninf_ < yyn && yyn <= yylast_) | |||||
| { | { | ||||
| #define YYCASE_(N, S) \ | |||||
| case N: \ | |||||
| yyformat = S; \ | |||||
| break | |||||
| YYCASE_(0, YY_("syntax error")); | |||||
| YYCASE_(1, YY_("syntax error, unexpected %s")); | |||||
| YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); | |||||
| YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); | |||||
| YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); | |||||
| YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); | |||||
| #undef YYCASE_ | |||||
| /* Start YYX at -YYN if negative to avoid negative indexes in | |||||
| YYCHECK. */ | |||||
| int yyxbegin = yyn < 0 ? -yyn : 0; | |||||
| /* Stay within bounds of both yycheck and yytname. */ | |||||
| int yychecklim = yylast_ - yyn + 1; | |||||
| int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; | |||||
| int count = 0; | |||||
| for (int x = yyxbegin; x < yyxend; ++x) | |||||
| if (yycheck_[x + yyn] == x && x != yyterror_) | |||||
| ++count; | |||||
| // FIXME: This method of building the message is not compatible | |||||
| // with internationalization. It should work like yacc.c does it. | |||||
| // That is, first build a string that looks like this: | |||||
| // "syntax error, unexpected %s or %s or %s" | |||||
| // Then, invoke YY_ on this string. | |||||
| // Finally, use the string as a format to output | |||||
| // yytname_[tok], etc. | |||||
| // Until this gets fixed, this message appears in English only. | |||||
| res = "syntax error, unexpected "; | |||||
| res += yytnamerr_ (yytname_[tok]); | |||||
| if (count < 5) | |||||
| { | |||||
| count = 0; | |||||
| for (int x = yyxbegin; x < yyxend; ++x) | |||||
| if (yycheck_[x + yyn] == x && x != yyterror_) | |||||
| { | |||||
| res += (!count++) ? ", expecting " : " or "; | |||||
| res += yytnamerr_ (yytname_[x]); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| // Argument number. | |||||
| size_t yyi = 0; | |||||
| for (char const* yyp = yyformat; *yyp; ++yyp) | |||||
| if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) | |||||
| { | |||||
| yyres += yytnamerr_ (yyarg[yyi++]); | |||||
| ++yyp; | |||||
| } | |||||
| else | |||||
| yyres += *yyp; | |||||
| return yyres; | |||||
| else | |||||
| #endif | |||||
| res = YY_("syntax error"); | |||||
| return res; | |||||
| } | } | ||||
| @@ -845,9 +746,9 @@ namespace lol { | |||||
| -68, -559, -559, -559, -559 | -68, -559, -559, -559, -559 | ||||
| }; | }; | ||||
| /* YYDEFACT[S] -- default reduction number in state S. Performed when | |||||
| YYTABLE doesn't specify something else to do. Zero means the | |||||
| default is an error. */ | |||||
| /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | |||||
| doesn't specify something else to do. Zero means the default is an | |||||
| error. */ | |||||
| const unsigned short int | const unsigned short int | ||||
| LolFxParser::yydefact_[] = | LolFxParser::yydefact_[] = | ||||
| { | { | ||||
| @@ -954,7 +855,7 @@ namespace lol { | |||||
| /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | ||||
| positive, shift that token. If negative, reduce the rule which | positive, shift that token. If negative, reduce the rule which | ||||
| number is the opposite. If YYTABLE_NINF_, syntax error. */ | |||||
| number is the opposite. If zero, do what YYDEFACT says. */ | |||||
| const short int LolFxParser::yytable_ninf_ = -323; | const short int LolFxParser::yytable_ninf_ = -323; | ||||
| const short int | const short int | ||||
| LolFxParser::yytable_[] = | LolFxParser::yytable_[] = | ||||
| @@ -3890,11 +3791,11 @@ namespace lol { | |||||
| } // lol | } // lol | ||||
| /* Line 1136 of lalr1.cc */ | |||||
| #line 3895 "generated/lolfx-parser.cpp" | |||||
| /* Line 1053 of lalr1.cc */ | |||||
| #line 3796 "generated/lolfx-parser.cpp" | |||||
| /* Line 1138 of lalr1.cc */ | |||||
| /* Line 1055 of lalr1.cc */ | |||||
| #line 1298 "gpu/lolfx-parser.y" | #line 1298 "gpu/lolfx-parser.y" | ||||
| @@ -1,8 +1,8 @@ | |||||
| /* A Bison parser, made by GNU Bison 2.5. */ | |||||
| /* A Bison parser, made by GNU Bison 2.4.2. */ | |||||
| /* Skeleton interface for Bison LALR(1) parsers in C++ | /* Skeleton interface for Bison LALR(1) parsers in C++ | ||||
| Copyright (C) 2002-2011 Free Software Foundation, Inc. | |||||
| Copyright (C) 2002-2010 Free Software Foundation, Inc. | |||||
| This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| @@ -40,6 +40,20 @@ | |||||
| #include <string> | #include <string> | ||||
| #include <iostream> | #include <iostream> | ||||
| #include "stack.hh" | #include "stack.hh" | ||||
| namespace lol { | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 49 "generated/lolfx-parser.h" | |||||
| class position; | |||||
| class location; | |||||
| } // lol | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 56 "generated/lolfx-parser.h" | |||||
| #include "location.hh" | #include "location.hh" | ||||
| /* Enabling traces. */ | /* Enabling traces. */ | ||||
| @@ -60,11 +74,30 @@ | |||||
| # define YYTOKEN_TABLE 0 | # define YYTOKEN_TABLE 0 | ||||
| #endif | #endif | ||||
| /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |||||
| If N is 0, then set CURRENT to the empty location which ends | |||||
| the previous symbol: RHS[0] (always defined). */ | |||||
| #ifndef YYLLOC_DEFAULT | |||||
| # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |||||
| do { \ | |||||
| if (N) \ | |||||
| { \ | |||||
| (Current).begin = (Rhs)[1].begin; \ | |||||
| (Current).end = (Rhs)[N].end; \ | |||||
| } \ | |||||
| else \ | |||||
| { \ | |||||
| (Current).begin = (Current).end = (Rhs)[0].end; \ | |||||
| } \ | |||||
| } while (false) | |||||
| #endif | |||||
| namespace lol { | namespace lol { | ||||
| /* Line 35 of lalr1.cc */ | |||||
| #line 68 "generated/lolfx-parser.h" | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 101 "generated/lolfx-parser.h" | |||||
| /// A Bison parser. | /// A Bison parser. | ||||
| class LolFxParser | class LolFxParser | ||||
| @@ -75,7 +108,7 @@ namespace lol { | |||||
| union semantic_type | union semantic_type | ||||
| { | { | ||||
| /* Line 35 of lalr1.cc */ | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 34 "gpu/lolfx-parser.y" | #line 34 "gpu/lolfx-parser.y" | ||||
| int ival; | int ival; | ||||
| @@ -85,8 +118,8 @@ namespace lol { | |||||
| /* Line 35 of lalr1.cc */ | |||||
| #line 90 "generated/lolfx-parser.h" | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 123 "generated/lolfx-parser.h" | |||||
| }; | }; | ||||
| #else | #else | ||||
| typedef YYSTYPE semantic_type; | typedef YYSTYPE semantic_type; | ||||
| @@ -607,14 +640,6 @@ namespace lol { | |||||
| /// The location stack. | /// The location stack. | ||||
| location_stack_type yylocation_stack_; | location_stack_type yylocation_stack_; | ||||
| /// Whether the given \c yypact_ value indicates a defaulted state. | |||||
| /// \param yyvalue the value to check | |||||
| static bool yy_pact_value_is_default_ (int yyvalue); | |||||
| /// Whether the given \c yytable_ value indicates a syntax error. | |||||
| /// \param yyvalue the value to check | |||||
| static bool yy_table_value_is_error_ (int yyvalue); | |||||
| /// Internal symbol numbers. | /// Internal symbol numbers. | ||||
| typedef unsigned short int token_number_type; | typedef unsigned short int token_number_type; | ||||
| /* Tables. */ | /* Tables. */ | ||||
| @@ -622,7 +647,7 @@ namespace lol { | |||||
| static const short int yypact_[]; | static const short int yypact_[]; | ||||
| static const short int yypact_ninf_; | static const short int yypact_ninf_; | ||||
| /// For a state, default reduction number. | |||||
| /// For a state, default rule to reduce. | |||||
| /// Unless\a yytable_ specifies something else to do. | /// Unless\a yytable_ specifies something else to do. | ||||
| /// Zero means the default is an error. | /// Zero means the default is an error. | ||||
| static const unsigned short int yydefact_[]; | static const unsigned short int yydefact_[]; | ||||
| @@ -653,8 +678,10 @@ namespace lol { | |||||
| static const char* const yytname_[]; | static const char* const yytname_[]; | ||||
| #endif | #endif | ||||
| #if YYERROR_VERBOSE | |||||
| /// Convert the symbol name \a n to a form suitable for a diagnostic. | /// Convert the symbol name \a n to a form suitable for a diagnostic. | ||||
| static std::string yytnamerr_ (const char *n); | |||||
| virtual std::string yytnamerr_ (const char *n); | |||||
| #endif | |||||
| #if YYDEBUG | #if YYDEBUG | ||||
| /// A type to store symbol numbers and -1. | /// A type to store symbol numbers and -1. | ||||
| @@ -712,8 +739,8 @@ namespace lol { | |||||
| } // lol | } // lol | ||||
| /* Line 35 of lalr1.cc */ | |||||
| #line 717 "generated/lolfx-parser.h" | |||||
| /* Line 34 of lalr1.cc */ | |||||
| #line 744 "generated/lolfx-parser.h" | |||||
| @@ -1,8 +1,8 @@ | |||||
| /* A Bison parser, made by GNU Bison 2.5. */ | |||||
| /* A Bison parser, made by GNU Bison 2.4.2. */ | |||||
| /* Positions for Bison parsers in C++ | /* Positions for Bison parsers in C++ | ||||
| Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. | |||||
| Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc. | |||||
| This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| @@ -1,8 +1,8 @@ | |||||
| /* A Bison parser, made by GNU Bison 2.5. */ | |||||
| /* A Bison parser, made by GNU Bison 2.4.2. */ | |||||
| /* Stack handling for Bison parsers in C++ | /* Stack handling for Bison parsers in C++ | ||||
| Copyright (C) 2002-2011 Free Software Foundation, Inc. | |||||
| Copyright (C) 2002-2010 Free Software Foundation, Inc. | |||||
| This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| @@ -38,7 +38,7 @@ | |||||
| namespace lol { | namespace lol { | ||||
| /* Line 1149 of lalr1.cc */ | |||||
| /* Line 1066 of lalr1.cc */ | |||||
| #line 43 "generated/stack.hh" | #line 43 "generated/stack.hh" | ||||
| template <class T, class S = std::deque<T> > | template <class T, class S = std::deque<T> > | ||||
| class stack | class stack | ||||
| @@ -128,7 +128,7 @@ namespace lol { | |||||
| } // lol | } // lol | ||||
| /* Line 1235 of lalr1.cc */ | |||||
| /* Line 1152 of lalr1.cc */ | |||||
| #line 133 "generated/stack.hh" | #line 133 "generated/stack.hh" | ||||
| #endif // not BISON_STACK_HH[]dnl | #endif // not BISON_STACK_HH[]dnl | ||||
| @@ -1,4 +1,4 @@ | |||||
| [sc#88f ab 4 4 4 splt 5 tz 4 bdxy 90 0]//twy 45 0 | |||||
| [sc#88f ab 4 4 4 smth 3 1 1 ]//twy 45 0 bdxy 90 0 splt 5 tz 2 | |||||
| //[sc#88f ab 4 4 4 tx 4 ab 4 4 4 tx -2 tax .4 .4 0] | //[sc#88f ab 4 4 4 tx 4 ab 4 4 4 tx -2 tax .4 .4 0] | ||||
| //[sc#88f ab .25 1 1 tx .25 ab .25 1 1 tx .25 ab .25 1 1 tx .25 ab .25 1 1 tx .125 stx 10 0 0] | //[sc#88f ab .25 1 1 tx .25 ab .25 1 1 tx .25 ab .25 1 1 tx .25 ab .25 1 1 tx .125 stx 10 0 0] | ||||
| //[sc#ff2 scb#2ff acg 13 2 1 1 8 8 4 4 0 1 tax -2 0 0 0] | //[sc#ff2 scb#2ff acg 13 2 1 1 8 8 4 4 0 1 tax -2 0 0 0] | ||||