浏览代码

Removed nvparse

Marko Pintera 13 年之前
父节点
当前提交
00d1fa7232
共有 44 个文件被更改,包括 0 次插入25943 次删除
  1. 0 41
      CamelotRenderer/CamelotRenderer.vcxproj
  2. 0 126
      CamelotRenderer/CamelotRenderer.vcxproj.filters
  3. 0 67
      CamelotRenderer/RenderSystemGL/Include/CmGLGpuNvparseProgram.h
  4. 0 113
      CamelotRenderer/RenderSystemGL/Source/CmGLGpuNvparseProgram.cpp
  5. 0 16
      CamelotRenderer/RenderSystemGL/Source/CmGLRenderSystem.cpp
  6. 0 1871
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_lexer.cpp
  7. 0 1560
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_parser.cpp
  8. 0 101
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_parser.h
  9. 0 2473
      CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_lexer.cpp
  10. 0 2324
      CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_parser.cpp
  11. 0 161
      CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_parser.h
  12. 0 2226
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_lexer.cpp
  13. 0 1841
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_parser.cpp
  14. 0 177
      CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_parser.h
  15. 0 5041
      CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_lexer.cpp
  16. 0 1868
      CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_parser.cpp
  17. 0 153
      CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_parser.h
  18. 0 188
      CamelotRenderer/RenderSystemGL/Source/nvparse/avp1.0_impl.cpp
  19. 0 43
      CamelotRenderer/RenderSystemGL/Source/nvparse/macro.h
  20. 0 216
      CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse.cpp
  21. 0 22
      CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse.h
  22. 0 47
      CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_errors.cpp
  23. 0 25
      CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_errors.h
  24. 0 10
      CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_externs.h
  25. 0 1013
      CamelotRenderer/RenderSystemGL/Source/nvparse/ps1.0_program.cpp
  26. 0 30
      CamelotRenderer/RenderSystemGL/Source/nvparse/ps1.0_program.h
  27. 0 90
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_combiners.cpp
  28. 0 24
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_combiners.h
  29. 0 157
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_final.cpp
  30. 0 48
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_final.h
  31. 0 298
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_general.cpp
  32. 0 107
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_general.h
  33. 0 202
      CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_register.h
  34. 0 293
      CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst.cpp
  35. 0 140
      CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst.h
  36. 0 137
      CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst_list.cpp
  37. 0 20
      CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst_list.h
  38. 0 354
      CamelotRenderer/RenderSystemGL/Source/nvparse/vcp1.0_impl.cpp
  39. 0 217
      CamelotRenderer/RenderSystemGL/Source/nvparse/vp1.0_impl.cpp
  40. 0 1476
      CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst.cpp
  41. 0 89
      CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst.h
  42. 0 314
      CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst_list.cpp
  43. 0 25
      CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst_list.h
  44. 0 199
      CamelotRenderer/RenderSystemGL/Source/nvparse/vsp1.0_impl.cpp

+ 0 - 41
CamelotRenderer/CamelotRenderer.vcxproj

@@ -163,7 +163,6 @@
     <ClInclude Include="RenderSystemGL\Include\CmGLFBOMultiRenderTarget.h" />
     <ClInclude Include="RenderSystemGL\Include\CmGLFBORenderTexture.h" />
     <ClInclude Include="RenderSystemGL\Include\CmGLFrameBufferObject.h" />
-    <ClInclude Include="RenderSystemGL\Include\CmGLGpuNvparseProgram.h" />
     <ClInclude Include="RenderSystemGL\Include\CmGLGpuProgram.h" />
     <ClInclude Include="RenderSystemGL\Include\CmGLGpuProgramManager.h" />
     <ClInclude Include="RenderSystemGL\Include\CmGLHardwareBufferManager.h" />
@@ -196,23 +195,6 @@
     <ClInclude Include="RenderSystemGL\Source\GLSL\include\CmGLSLPreprocessor.h" />
     <ClInclude Include="RenderSystemGL\Source\GLSL\include\CmGLSLProgram.h" />
     <ClInclude Include="RenderSystemGL\Source\GLSL\include\CmGLSLProgramFactory.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\macro.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse_errors.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse_externs.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ps1.0_program.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_combiners.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_final.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_general.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_register.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ts1.0_inst.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ts1.0_inst_list.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\vs1.0_inst.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\vs1.0_inst_list.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_ps1.0_parser.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_rc1.0_parser.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_ts1.0_parser.h" />
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_vs1.0_parser.h" />
     <ClInclude Include="RenderSystemGL\Source\win32\CmGLUtil.h" />
     <ClInclude Include="stdafx.h" />
     <ClInclude Include="targetver.h" />
@@ -283,35 +265,12 @@
     <ClCompile Include="RenderSystemGL\Source\GLSL\src\CmGLSLPreprocessor.cpp" />
     <ClCompile Include="RenderSystemGL\Source\GLSL\src\CmGLSLProgram.cpp" />
     <ClCompile Include="RenderSystemGL\Source\GLSL\src\CmGLSLProgramFactory.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\avp1.0_impl.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\nvparse.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\nvparse_errors.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ps1.0_program.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_combiners.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_final.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_general.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ts1.0_inst.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ts1.0_inst_list.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vcp1.0_impl.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vp1.0_impl.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vs1.0_inst.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vs1.0_inst_list.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vsp1.0_impl.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ps1.0_lexer.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ps1.0_parser.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_rc1.0_lexer.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_rc1.0_parser.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ts1.0_lexer.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ts1.0_parser.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_vs1.0_lexer.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_vs1.0_parser.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLATIFSInit.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLContext.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLDefaultHardwareBufferManager.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLFBOMultiRenderTarget.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLFBORenderTexture.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLFrameBufferObject.cpp" />
-    <ClCompile Include="RenderSystemGL\Source\CmGLGpuNvparseProgram.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLGpuProgram.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLGpuProgramManager.cpp" />
     <ClCompile Include="RenderSystemGL\Source\CmGLHardwareBufferManager.cpp" />

+ 0 - 126
CamelotRenderer/CamelotRenderer.vcxproj.filters

@@ -46,9 +46,6 @@
     <Filter Include="RenderSystemGL\GLSL">
       <UniqueIdentifier>{bc8cc9fd-f7d3-46f6-9d0d-d0d8dbb080c1}</UniqueIdentifier>
     </Filter>
-    <Filter Include="RenderSystemGL\NVparse">
-      <UniqueIdentifier>{457140bf-9c61-4b2a-9e2f-e5e7f97348b7}</UniqueIdentifier>
-    </Filter>
     <Filter Include="RenderSystemGL\Win32">
       <UniqueIdentifier>{7c0425d8-c90d-4dce-89f6-11eeafe1efd9}</UniqueIdentifier>
     </Filter>
@@ -86,57 +83,6 @@
     <ClInclude Include="RenderSystemGL\Source\atifs\include\ps_1_4.h">
       <Filter>RenderSystemGL\ATIFS</Filter>
     </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_ps1.0_parser.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_rc1.0_parser.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_ts1.0_parser.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\_vs1.0_parser.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\macro.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse_errors.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\nvparse_externs.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ps1.0_program.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_combiners.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_final.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_general.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\rc1.0_register.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ts1.0_inst.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\ts1.0_inst_list.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\vs1.0_inst.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
-    <ClInclude Include="RenderSystemGL\Source\nvparse\vs1.0_inst_list.h">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClInclude>
     <ClInclude Include="RenderSystemGL\Include\CmGLRenderSystemFactory.h">
       <Filter>RenderSystemGL\Header Files</Filter>
     </ClInclude>
@@ -329,9 +275,6 @@
     <ClInclude Include="RenderSystemGL\Include\CmGLFrameBufferObject.h">
       <Filter>RenderSystemGL\Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="RenderSystemGL\Include\CmGLGpuNvparseProgram.h">
-      <Filter>RenderSystemGL\Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="RenderSystemGL\Include\CmGLGpuProgram.h">
       <Filter>RenderSystemGL\Header Files</Filter>
     </ClInclude>
@@ -460,72 +403,6 @@
     <ClCompile Include="RenderSystemGL\Source\atifs\src\ps_1_4.cpp">
       <Filter>RenderSystemGL\ATIFS</Filter>
     </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ps1.0_lexer.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ps1.0_parser.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_rc1.0_lexer.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_rc1.0_parser.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ts1.0_lexer.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_ts1.0_parser.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_vs1.0_lexer.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\_vs1.0_parser.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\avp1.0_impl.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\nvparse.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\nvparse_errors.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ps1.0_program.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_combiners.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_final.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\rc1.0_general.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ts1.0_inst.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\ts1.0_inst_list.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vcp1.0_impl.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vp1.0_impl.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vs1.0_inst.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vs1.0_inst_list.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\nvparse\vsp1.0_impl.cpp">
-      <Filter>RenderSystemGL\NVparse</Filter>
-    </ClCompile>
     <ClCompile Include="RenderSystemGL\Source\glew.cpp">
       <Filter>RenderSystemGL\Source Files</Filter>
     </ClCompile>
@@ -715,9 +592,6 @@
     <ClCompile Include="RenderSystemGL\Source\CmGLFrameBufferObject.cpp">
       <Filter>RenderSystemGL\Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="RenderSystemGL\Source\CmGLGpuNvparseProgram.cpp">
-      <Filter>RenderSystemGL\Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="RenderSystemGL\Source\CmGLGpuProgram.cpp">
       <Filter>RenderSystemGL\Source Files</Filter>
     </ClCompile>

+ 0 - 67
CamelotRenderer/RenderSystemGL/Include/CmGLGpuNvparseProgram.h

@@ -1,67 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#ifndef __GLGpuNvparseProgram_H__
-#define __GLGpuNvparseProgram_H__
-
-#include "CmGLPrerequisites.h"
-#include "CmGLGpuProgram.h"
-
-namespace CamelotEngine {
-
-class _OgreGLExport GLGpuNvparseProgram : public GLGpuProgram
-{
-public:
-    GLGpuNvparseProgram();
-    virtual ~GLGpuNvparseProgram();
-
-
-    /// Execute the binding functions for this program
-    void bindProgram(void);
-    /// Execute the unbinding functions for this program
-    void unbindProgram(void);
-    /// Execute the param binding functions for this program
-	void bindProgramParameters(GpuProgramParametersSharedPtr params, UINT16 mask);
-
-    /// Get the assigned GL program id
-    const GLuint getProgramID(void) const
-    { return mProgramID; }
-
-protected:
-    /// @copydoc Resource::unload
-    void unloadImpl(void);
-    void loadFromSource(void);
-
-private:
-    GLuint mProgramID;
-    GLenum mProgramType;
-};
-
-}; // namespace CamelotEngine
-
-#endif // __GLGpuNvparseProgram_H__

+ 0 - 113
CamelotRenderer/RenderSystemGL/Source/CmGLGpuNvparseProgram.cpp

@@ -1,113 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#include "CmGLGpuNvparseProgram.h"
-#include "CmException.h"
-#include "CmRenderSystem.h"
-#include "CmRenderSystemCapabilities.h"
-#include "nvparse.h"
-
-using namespace CamelotEngine;
-
-GLGpuNvparseProgram::GLGpuNvparseProgram() 
-        : GLGpuProgram()
-{
-    mProgramID = glGenLists(1);
-}
-
-GLGpuNvparseProgram::~GLGpuNvparseProgram()
-{
-    // have to call this here reather than in Resource destructor
-    // since calling virtual methods in base destructors causes crash
-    unload(); 
-}
-
-void GLGpuNvparseProgram::bindProgram(void)
-{
-     glCallList(mProgramID);
-     glEnable(GL_TEXTURE_SHADER_NV);
-     glEnable(GL_REGISTER_COMBINERS_NV);
-     glEnable(GL_PER_STAGE_CONSTANTS_NV);
-}
-
-void GLGpuNvparseProgram::unbindProgram(void)
-{
-
-    glDisable(GL_TEXTURE_SHADER_NV);
-    glDisable(GL_REGISTER_COMBINERS_NV);
-    glDisable(GL_PER_STAGE_CONSTANTS_NV);
-}
-
-void GLGpuNvparseProgram::bindProgramParameters(GpuProgramParametersSharedPtr params, CamelotEngine::UINT16 mask)
-{
-    // NB, register combiners uses 2 constants per texture stage (0 and 1)
-    // We have stored these as (stage * 2) + const_index in the physical buffer
-	// There are no other parameters in a register combiners shader
-	const FloatConstantList& floatList = 
-		params->getFloatConstantList();
-	size_t index = 0;
-	for (FloatConstantList::const_iterator i = floatList.begin();
-		i != floatList.end(); ++i, ++index)
-	{
-		GLenum combinerStage = GL_COMBINER0_NV + (unsigned int)(index / 2);
-		GLenum pname = GL_CONSTANT_COLOR0_NV + (index % 2);
-		glCombinerStageParameterfvNV(combinerStage, pname, &(*i));
-		
-	}
-
-}
-void GLGpuNvparseProgram::unloadImpl(void)
-{
-    glDeleteLists(mProgramID,1);
-}
-
-void GLGpuNvparseProgram::loadFromSource(void)
-{
-    glNewList(mProgramID, GL_COMPILE);
-
-    String::size_type pos = mSource.find("!!");
-
-    while (pos != String::npos) {
-        String::size_type newPos = mSource.find("!!", pos + 1);
-
-        String script = mSource.substr(pos, newPos - pos);
-        nvparse(script.c_str(), 0);
-
-        for (char* const * errors= nvparse_get_errors(); *errors; errors++)
-        {
-			// TODO LOG PORT - Log this somewhere
-            //LogManager::getSingleton().logMessage("Warning: nvparse reported the following errors:");
-            //LogManager::getSingleton().logMessage("\t" + String(*errors));
-        }
-        
-        pos = newPos;
-    }
-
-    glEndList();
-}
-

+ 0 - 16
CamelotRenderer/RenderSystemGL/Source/CmGLRenderSystem.cpp

@@ -36,7 +36,6 @@ THE SOFTWARE.s
 #include "CmGLDefaultHardwareBufferManager.h"
 #include "CmGLUtil.h"
 #include "CmGLGpuProgram.h"
-#include "CmGLGpuNvparseProgram.h"
 #include "ATI_FS_GLGpuProgram.h"
 #include "CmGLGpuProgramManager.h"
 #include "CmException.h"
@@ -65,14 +64,6 @@ namespace CamelotEngine {
 		return ret;
 	}
 
-	GpuProgram* createGLGpuNvparseProgram(GpuProgramType gptype, const String& syntaxCode)
-	{
-		GLGpuNvparseProgram* ret = new GLGpuNvparseProgram();
-		ret->setType(gptype);
-		ret->setSyntaxCode(syntaxCode);
-		return ret;
-	}
-
 	GpuProgram* createGL_ATI_FS_GpuProgram(GpuProgramType gptype, const String& syntaxCode)
 	{
 		ATI_FS_GLGpuProgram* ret = new ATI_FS_GLGpuProgram();
@@ -362,7 +353,6 @@ namespace CamelotEngine {
 			GLEW_NV_texture_shader)
 		{
 			rsc->setCapability(RSC_FRAGMENT_PROGRAM);
-			rsc->addShaderProfile("fp20");
 		}
 
 		// NFZ - check for ATI fragment shader support
@@ -713,12 +703,6 @@ namespace CamelotEngine {
 
 		if(caps->hasCapability(RSC_FRAGMENT_PROGRAM))
 		{
-
-			if(caps->isShaderProfileSupported("fp20"))
-			{
-				mGpuProgramManager->registerProgramFactory("fp20", createGLGpuNvparseProgram);
-			}
-
 			if(caps->isShaderProfileSupported("ps_1_4"))
 			{
 				mGpuProgramManager->registerProgramFactory("ps_1_4", createGL_ATI_FS_GpuProgram);

+ 0 - 1871
CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_lexer.cpp

@@ -1,1871 +0,0 @@
-#define yy_create_buffer ps10__create_buffer
-#define yy_delete_buffer ps10__delete_buffer
-#define yy_scan_buffer ps10__scan_buffer
-#define yy_scan_string ps10__scan_string
-#define yy_scan_bytes ps10__scan_bytes
-#define yy_flex_debug ps10__flex_debug
-#define yy_init_buffer ps10__init_buffer
-#define yy_flush_buffer ps10__flush_buffer
-#define yy_load_buffer_state ps10__load_buffer_state
-#define yy_switch_to_buffer ps10__switch_to_buffer
-#define yyin ps10_in
-#define yyleng ps10_leng
-#define yylex ps10_lex
-#define yyout ps10_out
-#define yyrestart ps10_restart
-#define yytext ps10_text
-#define yywrap ps10_wrap
-
-#line 20 "_ps1.0_lexer.cpp"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/shared/backups/ogre/cvs/ogrenew/RenderSystems/GL/src/nvparse/_ps1.0_lexer.cpp,v 1.2 2005-07-08 16:51:23 miathan6 Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-/* yyunput is never used */
-#define YY_NO_UNPUT
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 36
-#define YY_END_OF_BUFFER 37
-static yyconst short int yy_accept[231] =
-    {   0,
-        0,    0,    0,    0,   37,   35,   33,   32,   35,   35,
-       35,   35,    1,   35,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   35,   35,    5,    5,   33,   32,
-        0,    0,    0,    0,    0,    0,    0,    2,    0,    0,
-        0,    0,    8,    0,    0,    0,    0,    0,    0,    0,
-        7,    0,    9,    0,   10,    0,    5,    4,    3,    0,
-       11,    0,    0,   12,    6,   13,   14,   15,   16,   17,
-        0,    0,   18,    0,    0,   19,    0,    0,    3,    0,
-        0,    8,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    7,    0,    0,    0,    0,    9,    0,    0,    0,
-
-        0,    0,    0,    0,    0,   10,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   34,   11,    0,    0,   12,
-        0,   13,    0,   14,    0,   15,    0,   16,    0,   17,
-        0,    0,   18,    0,    0,   20,    0,    0,    0,    0,
-        0,    0,   11,    0,   12,    0,   13,    0,   14,    0,
-       15,    0,   16,    0,   17,    0,   18,   21,    0,   23,
-
-        0,    0,    0,   22,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   26,   27,
-       24,   25,   28,    0,   30,    0,   29,    0,   31,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    5,    1,    6,    7,    8,    9,   10,   11,
-       12,   13,   14,   14,   14,   15,   15,    1,   16,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,   17,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,   18,    1,   19,   20,   21,   22,
-
-       23,   24,   25,    1,   26,    1,   27,   28,   29,   30,
-       31,   32,    1,   33,   34,   35,   36,   37,   38,   39,
-       40,   41,    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,    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,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[42] =
-    {   0,
-        1,    1,    2,    1,    1,    1,    3,    1,    4,    4,
-        4,    4,    4,    4,    5,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    6,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1
-    } ;
-
-static yyconst short int yy_base[236] =
-    {   0,
-        0,    0,   37,    0,  365,  366,   51,   54,  361,   43,
-      355,   57,  366,  328,  339,  330,   37,  326,   43,   56,
-      322,   61,   58,  350,   75,    0,  349,   79,   85,   88,
-      352,   91,   81,  110,   88,   94,   90,  366,  105,  107,
-      347,  331,  108,  330,  327,  338,  317,  326,  310,  318,
-      118,  325,  120,  305,  123,    0,  336,    0,    0,  332,
-      323,  112,  320,  321,  366,  320,  319,  318,  317,  316,
-      114,  313,  314,  129,  311,  136,  139,  310,    0,    0,
-      121,  366,  304,  288,  135,  132,  142,  148,  151,  157,
-      158,  366,  302,  286,  149,  161,  366,  300,  284,  160,
-
-      300,  291,  295,  308,  296,  366,  293,  277,  163,  184,
-      305,  296,  124,  294,  272,  293,  300,  299,  290,  190,
-      297,  288,  193,  295,  286,  194,  293,  284,  197,  291,
-      282,  198,  289,  280,  201,  278,  256,  277,  284,  283,
-      274,  202,  272,  250,  271,  278,  259,  256,  258,  246,
-      259,  263,  241,  262,  269,  366,  261,  243,  243,  258,
-      240,  256,  238,  254,  236,  252,  234,  250,  232,  248,
-      230,  230,  245,  227,  227,  232,  226,  230,  205,  246,
-      222,  221,  366,  220,  366,  219,  366,  218,  366,  217,
-      366,  216,  366,  215,  366,  214,  366,  366,  225,  366,
-
-      186,  188,  205,  366,  223,  209,  210,  196,  204,  192,
-      186,  178,  162,  107,  117,  106,   78,   81,  366,  366,
-      366,  366,  366,   80,  366,   52,  366,   40,  366,  366,
-      227,  231,  233,  235,  240
-    } ;
-
-static yyconst short int yy_def[236] =
-    {   0,
-      230,    1,    1,    3,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  231,  230,  230,  230,  230,
-      230,  230,  230,  232,  232,  233,  232,  232,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  233,  232,  233,  234,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  234,  235,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,    0,
-      230,  230,  230,  230,  230
-    } ;
-
-static yyconst short int yy_nxt[408] =
-    {   0,
-        6,    7,    8,    9,    6,   10,    6,   11,    6,   12,
-        6,    6,    6,    6,    6,   13,   14,    6,   15,    6,
-       16,   17,    6,    6,    6,    6,    6,   18,   19,    6,
-        6,   14,   20,   21,   22,    6,   23,    6,    6,    6,
-        6,   24,   25,   26,   33,   27,   28,   27,   27,   27,
-       27,   27,   29,   30,   31,   32,   30,   31,   39,   45,
-      229,   48,   40,   34,   51,   51,   55,   55,   46,   53,
-       53,   53,   53,   49,  228,   35,   33,   36,   50,   37,
-       39,   56,   33,   54,   40,   59,   29,   30,   31,   32,
-       30,   31,   32,   30,   31,   34,   51,   51,   55,   55,
-
-      227,   34,   53,   53,   53,   53,   39,   35,   33,   36,
-       40,   37,  226,   35,   62,   36,  225,   37,   43,   43,
-       43,   43,   43,   43,   71,   63,   74,   34,  224,   77,
-       82,   82,   92,   92,  157,   72,  157,   75,  223,   35,
-       78,   36,  111,   37,   83,  222,   93,   97,   97,   82,
-       84,   92,   94,  118,  112,  101,  102,  106,  106,  113,
-      116,   98,  103,  121,  104,  119,   97,   99,  105,  124,
-      120,  107,  127,  117,  138,  122,  106,  108,  130,  133,
-      123,  125,  140,  221,  128,  145,  126,  139,  154,  129,
-      131,  134,  156,  156,  141,  132,  135,  220,  146,  142,
-
-      160,  155,  160,  162,  164,  162,  164,  166,  168,  166,
-      168,  170,  173,  170,  173,  201,  202,  205,  219,  207,
-      206,  208,  209,  211,  210,  218,  217,  216,  215,  212,
-       43,  214,   43,   57,   57,   57,   58,   58,   79,   79,
-      110,  213,  110,  110,  110,  110,  204,  141,  134,  131,
-      128,  125,  122,  119,  112,  106,  203,  200,  199,  198,
-       97,  197,  196,   92,  195,  194,  193,  192,  191,  190,
-      189,  188,  187,  186,  185,  184,   82,  183,  182,  106,
-      181,  106,  106,  180,  179,  178,  177,  176,   97,  175,
-       97,   97,  174,  173,   92,  172,   92,   92,  171,  170,
-
-      169,  168,  167,  166,  165,  164,  163,  162,  161,  160,
-       82,  159,   82,   82,  158,  157,  153,  152,  151,  150,
-      149,  148,  147,  144,  143,  137,  136,  115,  114,  109,
-      100,   96,   95,   91,   90,   89,   88,   87,   86,   85,
-       81,   80,   59,   76,   73,   70,   69,   68,   67,   66,
-       65,   64,   61,   60,   30,   59,   56,   52,   47,   44,
-       42,   41,   38,   30,  230,    5,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-
-      230,  230,  230,  230,  230,  230,  230
-    } ;
-
-static yyconst short int yy_chk[408] =
-    {   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,    3,    3,    3,   10,    3,    3,    3,    3,    3,
-        3,    3,    7,    7,    7,    8,    8,    8,   12,   17,
-      228,   19,   12,   10,   20,   20,   23,   23,   17,   22,
-       22,   22,   22,   19,  226,   10,   25,   10,   19,   10,
-       28,   25,   33,   22,   28,   28,   29,   29,   29,   30,
-       30,   30,   32,   32,   32,   25,   35,   35,   37,   37,
-
-      224,   33,   36,   36,   36,   36,   39,   25,   40,   25,
-       39,   25,  218,   33,   43,   33,  217,   33,   34,   34,
-       34,   34,   34,   34,   51,   43,   53,   40,  216,   55,
-       62,   62,   71,   71,  113,   51,  113,   53,  215,   40,
-       55,   40,   81,   40,   62,  214,   71,   74,   74,   62,
-       62,   71,   71,   86,   81,   76,   76,   77,   77,   81,
-       85,   74,   76,   87,   76,   86,   74,   74,   76,   88,
-       86,   77,   89,   85,   95,   87,   77,   77,   90,   91,
-       87,   88,   96,  213,   89,  100,   88,   95,  109,   89,
-       90,   91,  110,  110,   96,   90,   91,  212,  100,   96,
-
-      120,  109,  120,  123,  126,  123,  126,  129,  132,  129,
-      132,  135,  142,  135,  142,  179,  179,  201,  211,  202,
-      201,  202,  202,  203,  202,  210,  209,  208,  207,  203,
-      231,  206,  231,  232,  232,  232,  233,  233,  234,  234,
-      235,  205,  235,  235,  235,  235,  199,  196,  194,  192,
-      190,  188,  186,  184,  182,  181,  180,  178,  177,  176,
-      175,  174,  173,  172,  171,  170,  169,  168,  167,  166,
-      165,  164,  163,  162,  161,  160,  159,  158,  157,  155,
-      154,  153,  152,  151,  150,  149,  148,  147,  146,  145,
-      144,  143,  141,  140,  139,  138,  137,  136,  134,  133,
-
-      131,  130,  128,  127,  125,  124,  122,  121,  119,  118,
-      117,  116,  115,  114,  112,  111,  108,  107,  105,  104,
-      103,  102,  101,   99,   98,   94,   93,   84,   83,   78,
-       75,   73,   72,   70,   69,   68,   67,   66,   64,   63,
-       61,   60,   57,   54,   52,   50,   49,   48,   47,   46,
-       45,   44,   42,   41,   31,   27,   24,   21,   18,   16,
-       15,   14,   11,    9,    5,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
-
-      230,  230,  230,  230,  230,  230,  230
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "ps1.0_tokens.l"
-#define INITIAL 0
-/* definitions */
-#line 8 "ps1.0_tokens.l"
-
-#include <stdlib.h>
-#include <list>
-#include <vector>
-
-#include "ps1.0_program.h"
-
-using namespace std;
-using namespace ps10;
-
-#include "_ps1.0_parser.h"
-
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-
-#define YY_INPUT(buf,result,max_size)                            \
-{                                                                \
-	int c = *myin++;                                             \
-	result = (c == 0) ? YY_NULL : (buf[0] = c, 1);               \
-}
-
-#define YY_ALWAYS_INTERACTIVE 1
-
-//#define DBG_MESG(msg, line)  	errors.set(msg, line)
-#define DBG_MESG(msg, line)
-
-static char buf[80];
-
-
-#define DEFSTATE 1
-
-/* end of definitions */
-#line 583 "_ps1.0_lexer.cpp"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 43 "ps1.0_tokens.l"
-
-
-#line 737 "_ps1.0_lexer.cpp"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 231 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 366 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-#line 46 "ps1.0_tokens.l"
-case 2:
-YY_RULE_SETUP
-#line 46 "ps1.0_tokens.l"
-{
-			    char ch;
-			    while ((ch = yyinput()) != '\n')
-					;
-				line_number++;
-				DBG_MESG("dbg: comment, NEWLINE", line_number-1);
-				return NEWLINE;
-			}
-	YY_BREAK
-case 3:
-#line 56 "ps1.0_tokens.l"
-case 4:
-#line 57 "ps1.0_tokens.l"
-case 5:
-YY_RULE_SETUP
-#line 57 "ps1.0_tokens.l"
-{
-				ps10_lval.fval = (float)atof(yytext);
-				// debug
-				DBG_MESG("dbg: NUMBER", line_number);
-				return NUMBER;
-			}
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 67 "ps1.0_tokens.l"
-{
-				// debug
-				DBG_MESG("dbg: DEF", line_number);
-				BEGIN DEFSTATE;
-				return DEF;
-			}
-	YY_BREAK
-case 7:
-#line 76 "ps1.0_tokens.l"
-case 8:
-#line 77 "ps1.0_tokens.l"
-case 9:
-#line 78 "ps1.0_tokens.l"
-case 10:
-YY_RULE_SETUP
-#line 78 "ps1.0_tokens.l"
-{
-				sprintf(buf, "dbg: REG = %s", yytext);
-				// debug
-				DBG_MESG(buf, line_number);
-				ps10_lval.sval = new string(yytext);
-				return REG;
-			}
-	YY_BREAK
-case 11:
-#line 87 "ps1.0_tokens.l"
-case 12:
-#line 88 "ps1.0_tokens.l"
-case 13:
-#line 89 "ps1.0_tokens.l"
-case 14:
-#line 90 "ps1.0_tokens.l"
-case 15:
-#line 91 "ps1.0_tokens.l"
-case 16:
-#line 92 "ps1.0_tokens.l"
-case 17:
-#line 93 "ps1.0_tokens.l"
-case 18:
-YY_RULE_SETUP
-#line 93 "ps1.0_tokens.l"
-{
-				sprintf(buf, "dbg: BLENDOP = %s", yytext);
-				// debug
-				DBG_MESG(buf, line_number);
-				ps10_lval.sval = new string(yytext);
-				return BLENDOP;
-			}
-	YY_BREAK
-case 19:
-#line 102 "ps1.0_tokens.l"
-case 20:
-#line 103 "ps1.0_tokens.l"
-case 21:
-#line 104 "ps1.0_tokens.l"
-case 22:
-#line 105 "ps1.0_tokens.l"
-case 23:
-#line 106 "ps1.0_tokens.l"
-case 24:
-#line 107 "ps1.0_tokens.l"
-case 25:
-#line 108 "ps1.0_tokens.l"
-case 26:
-#line 109 "ps1.0_tokens.l"
-case 27:
-#line 110 "ps1.0_tokens.l"
-case 28:
-#line 111 "ps1.0_tokens.l"
-case 29:
-#line 112 "ps1.0_tokens.l"
-case 30:
-#line 113 "ps1.0_tokens.l"
-case 31:
-YY_RULE_SETUP
-#line 113 "ps1.0_tokens.l"
-{
-				sprintf(buf, "dbg: ADDROP = %s", yytext);
-				// debug
-				DBG_MESG(buf, line_number);
-				ps10_lval.sval = new string(yytext);
-				return ADDROP;
-			}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 123 "ps1.0_tokens.l"
-{
-				line_number++;
-				BEGIN 0;
-				// debug
-				DBG_MESG("dbg: NEWLINE", line_number-1);
-				return NEWLINE;
-			}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 131 "ps1.0_tokens.l"
-{
-			}
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 134 "ps1.0_tokens.l"
-{
-				return HEADER;
-			}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 138 "ps1.0_tokens.l"
-{
-				char buf[40];
-				sprintf(buf, "character token == '%c'", *yytext);
-				DBG_MESG(buf, line_number);
-				return *yytext;
-			}
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 145 "ps1.0_tokens.l"
-ECHO;
-	YY_BREAK
-#line 974 "_ps1.0_lexer.cpp"
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(DEFSTATE):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 231 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 231 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 230);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 145 "ps1.0_tokens.l"
-
-bool ps10_init(char* inputString)
-{
-    myin = inputString;
-	return init_extensions();
-}
-
-#ifndef ps10_wrap
-int ps10_wrap(void)
-{
-  return(1);
-}
-#endif

+ 0 - 1560
CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_parser.cpp

@@ -1,1560 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Written by Richard Stallman by simplifying the original so called
-   ``semantic'' parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* If NAME_PREFIX is specified substitute the variables and functions
-   names.  */
-#define yyparse ps10_parse
-#define yylex   ps10_lex
-#define yyerror ps10_error
-#define yylval  ps10_lval
-#define yychar  ps10_char
-#define yydebug ps10_debug
-#define yynerrs ps10_nerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     HEADER = 258,
-     NEWLINE = 259,
-     NUMBER = 260,
-     REG = 261,
-     DEF = 262,
-     ADDROP = 263,
-     BLENDOP = 264
-   };
-#endif
-#define HEADER 258
-#define NEWLINE 259
-#define NUMBER 260
-#define REG 261
-#define DEF 262
-#define ADDROP 263
-#define BLENDOP 264
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 3 "ps1.0_grammar.y"
-
-
-/*
-
-	This is a parser for the DX8 PS1.0 pixel shaders.  I intend
-	to use it to set NV_texture_shader* and NV_register_combiners*
-	state in OpenGL, but the parse tree could be used for any
-	other purpose.
-
-	Cass Everitt
-	7-19-01
-
-*/
-
-void yyerror(const char* s);
-int yylex ( void );
-
-#ifdef _WIN32
-#  define WIN32_LEAN_AND_MEAN
-#  if !defined(NOMINMAX) && defined(_MSC_VER)
-#	define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
-#endif
-#  include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "ps1.0_program.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-#include <list>
-#include <vector>
-
-using namespace std;
-using namespace ps10;
-
-//#define DBG_MESG(msg, line)  	errors.set(msg, line)
-#define DBG_MESG(msg, line)
-
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 43 "ps1.0_grammar.y"
-typedef union YYSTYPE {
-	int ival;
-	float fval;
-	
-	string * sval;
-	constdef * cdef;
-	vector<constdef> * consts;
-	vector<string> * line;
-	list<vector<string> > * lines;
-} YYSTYPE;
-/* Line 191 of yacc.c.  */
-#line 153 "_ps1.0_parser.c"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 214 of yacc.c.  */
-#line 165 "_ps1.0_parser.c"
-
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-
-
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  short yyss;
-  YYSTYPE yyvs;
-  };
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-#if defined (__STDC__) || defined (__cplusplus)
-   typedef signed char yysigned_char;
-#else
-   typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL  6
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   80
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  12
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  10
-/* YYNRULES -- Number of rules. */
-#define YYNRULES  26
-/* YYNRULES -- Number of states. */
-#define YYNSTATES  63
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   264
-
-#define YYTRANSLATE(YYX) 						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const unsigned char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    11,    10,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     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,     2,     3,     4,
-       5,     6,     7,     8,     9
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const unsigned char yyprhs[] =
-{
-       0,     0,     3,     9,    16,    21,    27,    32,    38,    42,
-      47,    49,    52,    64,    66,    69,    73,    79,    87,    89,
-      92,    99,   108,   119,   120,   122,   124
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
-{
-      13,     0,    -1,     3,    21,    14,    16,    18,    -1,    21,
-       3,    21,    14,    16,    18,    -1,     3,    21,    16,    18,
-      -1,    21,     3,    21,    16,    18,    -1,     3,    21,    14,
-      18,    -1,    21,     3,    21,    14,    18,    -1,     3,    21,
-      18,    -1,    21,     3,    21,    18,    -1,    15,    -1,    14,
-      15,    -1,     7,     6,    10,     5,    10,     5,    10,     5,
-      10,     5,    21,    -1,    17,    -1,    16,    17,    -1,     8,
-       6,    21,    -1,     8,     6,    10,     6,    21,    -1,     8,
-       6,    10,     6,    10,     6,    21,    -1,    19,    -1,    18,
-      19,    -1,    20,     9,     6,    10,     6,    21,    -1,    20,
-       9,     6,    10,     6,    10,     6,    21,    -1,    20,     9,
-       6,    10,     6,    10,     6,    10,     6,    21,    -1,    -1,
-      11,    -1,     4,    -1,    21,     4,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const unsigned short yyrline[] =
-{
-       0,    72,    72,    79,    86,    93,   100,   107,   114,   121,
-     131,   139,   151,   165,   173,   184,   194,   206,   223,   231,
-     243,   257,   273,   293,   295,   301,   305
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "HEADER", "NEWLINE", "NUMBER", "REG", 
-  "DEF", "ADDROP", "BLENDOP", "','", "'+'", "$accept", "WholeEnchilada", 
-  "Defs", "Def", "AddrOps", "AddrOp", "BlendOps", "BlendOp", "MaybePlus", 
-  "Newlines", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const unsigned short yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-      44,    43
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const unsigned char yyr1[] =
-{
-       0,    12,    13,    13,    13,    13,    13,    13,    13,    13,
-      14,    14,    15,    16,    16,    17,    17,    17,    18,    18,
-      19,    19,    19,    20,    20,    21,    21
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const unsigned char yyr2[] =
-{
-       0,     2,     5,     6,     4,     5,     4,     5,     3,     4,
-       1,     2,    11,     1,     2,     3,     5,     7,     1,     2,
-       6,     8,    10,     0,     1,     1,     2
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const unsigned char yydefact[] =
-{
-       0,     0,    25,     0,     0,    23,     1,     0,    26,     0,
-       0,    24,    23,    10,    23,    13,     8,    18,     0,    23,
-       0,     0,    11,    23,     6,    14,     4,    19,     0,    23,
-      23,     9,     0,     0,    15,     2,     0,    23,     7,     5,
-       0,     0,     0,     3,     0,     0,    16,     0,     0,     0,
-       0,    20,     0,    17,     0,     0,     0,    21,     0,     0,
-       0,    22,    12
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
-{
-      -1,     3,    12,    13,    14,    15,    16,    17,    18,     4
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -15
-static const yysigned_char yypact[] =
-{
-      10,     1,   -15,    47,    52,     0,   -15,     1,   -15,    37,
-      51,   -15,    43,   -15,    41,   -15,    -8,   -15,    53,     0,
-      50,    26,   -15,    41,    -8,   -15,    -8,   -15,    55,    43,
-      41,    -8,    58,    59,    60,    -8,    56,    41,    -8,    -8,
-      57,    27,    62,    -8,    64,    65,    60,    34,    63,     1,
-      66,    60,    69,    60,    35,    67,    70,    60,    73,     1,
-       1,    60,    60
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yysigned_char yypgoto[] =
-{
-     -15,   -15,    61,    -3,     3,     5,     4,   -14,   -15,    -1
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -24
-static const yysigned_char yytable[] =
-{
-       5,   -23,    27,    11,     8,     2,    19,     9,    10,    22,
-      27,    11,    27,     1,     2,    23,    24,    27,    26,    25,
-      34,    27,    30,    31,    27,    27,    22,    35,    25,    27,
-       2,     2,    37,    38,    39,    25,    33,    45,     2,     2,
-      46,    43,    25,    20,    50,    56,    51,     6,    53,    10,
-       9,    10,    11,    57,    11,     7,     8,    21,    61,    62,
-      32,    36,    28,    40,     8,    41,    42,    44,    47,    48,
-       0,    49,    54,    52,    55,     0,    59,    58,    60,     0,
-      29
-};
-
-static const yysigned_char yycheck[] =
-{
-       1,     9,    16,    11,     4,     4,     7,     7,     8,    12,
-      24,    11,    26,     3,     4,    12,    12,    31,    14,    14,
-      21,    35,    19,    19,    38,    39,    29,    23,    23,    43,
-       4,     4,    29,    29,    30,    30,    10,    10,     4,     4,
-      41,    37,    37,     6,    10,    10,    47,     0,    49,     8,
-       7,     8,    11,    54,    11,     3,     4,     6,    59,    60,
-      10,     6,     9,     5,     4,     6,    10,    10,     6,     5,
-      -1,     6,     6,    10,     5,    -1,     6,    10,     5,    -1,
-      19
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const unsigned char yystos[] =
-{
-       0,     3,     4,    13,    21,    21,     0,     3,     4,     7,
-       8,    11,    14,    15,    16,    17,    18,    19,    20,    21,
-       6,     6,    15,    16,    18,    17,    18,    19,     9,    14,
-      16,    18,    10,    10,    21,    18,     6,    16,    18,    18,
-       5,     6,    10,    18,    10,    10,    21,     6,     5,     6,
-      10,    21,    10,    21,     6,     5,    10,    21,    10,     6,
-       5,    21,    21
-};
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrlab1
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");\
-      YYERROR;							\
-    }								\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)         \
-  Current.first_line   = Rhs[1].first_line;      \
-  Current.first_column = Rhs[1].first_column;    \
-  Current.last_line    = Rhs[N].last_line;       \
-  Current.last_column  = Rhs[N].last_column;
-#endif
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
-
-# define YYDSYMPRINT(Args)			\
-do {						\
-  if (yydebug)					\
-    yysymprint Args;				\
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location)		\
-do {								\
-  if (yydebug)							\
-    {								\
-      YYFPRINTF (stderr, "%s ", Title);				\
-      yysymprint (stderr, 					\
-                  Token, Value);	\
-      YYFPRINTF (stderr, "\n");					\
-    }								\
-} while (0)
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded).                                                   |
-`------------------------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_stack_print (short *bottom, short *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    short *bottom;
-    short *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (/* Nothing. */; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_reduce_print (int yyrule)
-#else
-static void
-yy_reduce_print (yyrule)
-    int yyrule;
-#endif
-{
-  int yyi;
-  unsigned int yylineno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
-             yyrule - 1, yylineno);
-  /* Print the symbols being reduced, and their result.  */
-  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
-    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
-  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (Rule);		\
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-#   else
-yystrlen (yystr)
-     const char *yystr;
-#   endif
-{
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
-    continue;
-
-  return yys - yystr - 1;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-#   if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-#   else
-yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
-{
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-#endif /* !YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  switch (yytype)
-    {
-      default:
-        break;
-    }
-  YYFPRINTF (yyoutput, ")");
-}
-
-#endif /* ! YYDEBUG */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yytype, yyvaluep)
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  switch (yytype)
-    {
-
-      default:
-        break;
-    }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM);
-# else
-int yyparse ();
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
-  void *YYPARSE_PARAM;
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK   (yyvsp--, yyssp--)
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule.  */
-  int yylen;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack. Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
-
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyoverflowlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	short *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-#line 73 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke(yyvsp[-2].consts, yyvsp[-1].lines, yyvsp[0].lines);
-	;}
-    break;
-
-  case 3:
-#line 80 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke(yyvsp[-2].consts, yyvsp[-1].lines, yyvsp[0].lines);
-	;}
-    break;
-
-  case 4:
-#line 87 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke( 0, yyvsp[-1].lines, yyvsp[0].lines);
-	;}
-    break;
-
-  case 5:
-#line 94 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke( 0, yyvsp[-1].lines, yyvsp[0].lines);
-	;}
-    break;
-
-  case 6:
-#line 101 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke(yyvsp[-1].consts, 0, yyvsp[0].lines);
-	;}
-    break;
-
-  case 7:
-#line 108 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke(yyvsp[-1].consts, 0, yyvsp[0].lines);
-	;}
-    break;
-
-  case 8:
-#line 115 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke( 0, 0, yyvsp[0].lines);
-	;}
-    break;
-
-  case 9:
-#line 122 "ps1.0_grammar.y"
-    {
-		DBG_MESG("dbg: WholeEnchilada", line_number);		
-		ps10::invoke( 0, 0, yyvsp[0].lines);
-	;}
-    break;
-
-  case 10:
-#line 132 "ps1.0_grammar.y"
-    {
-		yyval.consts = new vector<constdef>;
-		yyval.consts->push_back(* yyvsp[0].cdef);
-		delete yyvsp[0].cdef;
-	;}
-    break;
-
-  case 11:
-#line 140 "ps1.0_grammar.y"
-    {
-		yyval.consts = yyvsp[-1].consts;
-		yyval.consts->push_back(* yyvsp[0].cdef);
-		delete yyvsp[0].cdef;
-	;}
-    break;
-
-  case 12:
-#line 152 "ps1.0_grammar.y"
-    {
-		yyval.cdef = new constdef;
-		yyval.cdef->reg = * yyvsp[-9].sval;
-		yyval.cdef->r = yyvsp[-7].fval;
-		yyval.cdef->g = yyvsp[-5].fval;
-		yyval.cdef->b = yyvsp[-3].fval;
-		yyval.cdef->a = yyvsp[-1].fval;
-		delete yyvsp[-9].sval;
-	;}
-    break;
-
-  case 13:
-#line 166 "ps1.0_grammar.y"
-    {
-		yyval.lines = new list<vector<string> >;
-		yyval.lines->push_back(* yyvsp[0].line);
-		delete yyvsp[0].line;
-	;}
-    break;
-
-  case 14:
-#line 174 "ps1.0_grammar.y"
-    {
-		yyval.lines = yyvsp[-1].lines;
-		yyval.lines->push_back(* yyvsp[0].line);
-		delete yyvsp[0].line;
-	;}
-    break;
-
-  case 15:
-#line 185 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-		yyval.line->push_back(* yyvsp[-2].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-2].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 16:
-#line 195 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-		yyval.line->push_back(* yyvsp[-4].sval);
-		yyval.line->push_back(* yyvsp[-3].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-4].sval;
-		delete yyvsp[-3].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 17:
-#line 207 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-		yyval.line->push_back(* yyvsp[-6].sval);
-		yyval.line->push_back(* yyvsp[-5].sval);
-		yyval.line->push_back(* yyvsp[-3].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-6].sval;
-		delete yyvsp[-5].sval;
-		delete yyvsp[-3].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 18:
-#line 224 "ps1.0_grammar.y"
-    {
-		yyval.lines = new list<vector<string> >;
-		yyval.lines->push_back(* yyvsp[0].line);
-		delete yyvsp[0].line;
-	;}
-    break;
-
-  case 19:
-#line 232 "ps1.0_grammar.y"
-    {
-		yyval.lines = yyvsp[-1].lines;
-		yyval.lines->push_back(* yyvsp[0].line);
-		delete yyvsp[0].line;
-	;}
-    break;
-
-  case 20:
-#line 244 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-        if ( yyvsp[-5].ival )
-          yyval.line->push_back("+");
-		yyval.line->push_back(* yyvsp[-4].sval);
-		yyval.line->push_back(* yyvsp[-3].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-4].sval;
-		delete yyvsp[-3].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 21:
-#line 258 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-        if ( yyvsp[-7].ival )
-          yyval.line->push_back("+");
-		yyval.line->push_back(* yyvsp[-6].sval);
-		yyval.line->push_back(* yyvsp[-5].sval);
-		yyval.line->push_back(* yyvsp[-3].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-6].sval;
-		delete yyvsp[-5].sval;
-		delete yyvsp[-3].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 22:
-#line 274 "ps1.0_grammar.y"
-    {
-		yyval.line = new vector<string>;
-        if ( yyvsp[-9].ival )
-          yyval.line->push_back("+");
-		yyval.line->push_back(* yyvsp[-8].sval);
-		yyval.line->push_back(* yyvsp[-7].sval);
-		yyval.line->push_back(* yyvsp[-5].sval);
-		yyval.line->push_back(* yyvsp[-3].sval);
-		yyval.line->push_back(* yyvsp[-1].sval);
-		delete yyvsp[-8].sval;
-		delete yyvsp[-7].sval;
-		delete yyvsp[-5].sval;
-		delete yyvsp[-3].sval;
-		delete yyvsp[-1].sval;
-	;}
-    break;
-
-  case 23:
-#line 293 "ps1.0_grammar.y"
-    { yyval.ival=0; ;}
-    break;
-
-  case 24:
-#line 296 "ps1.0_grammar.y"
-    { yyval.ival=1; ;}
-    break;
-
-  case 25:
-#line 302 "ps1.0_grammar.y"
-    {;}
-    break;
-
-  case 26:
-#line 306 "ps1.0_grammar.y"
-    {;}
-    break;
-
-
-    }
-
-/* Line 999 of yacc.c.  */
-#line 1325 "_ps1.0_parser.c"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-
-
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (YYPACT_NINF < yyn && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  int yytype = YYTRANSLATE (yychar);
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("syntax error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[yytype]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[yytype]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("syntax error; also virtual memory exhausted");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror ("syntax error");
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      /* Return failure if at end of input.  */
-      if (yychar == YYEOF)
-        {
-	  /* Pop the error token.  */
-          YYPOPSTACK;
-	  /* Pop the rest of the stack.  */
-	  while (yyss < yyssp)
-	    {
-	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-	      yydestruct (yystos[*yyssp], yyvsp);
-	      YYPOPSTACK;
-	    }
-	  YYABORT;
-        }
-
-      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
-      yydestruct (yytoken, &yylval);
-      yychar = YYEMPTY;
-
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action.  |
-`----------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-      yydestruct (yystos[yystate], yyvsp);
-      yyvsp--;
-      yystate = *--yyssp;
-
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  YYDPRINTF ((stderr, "Shifting error token, "));
-
-  *++yyvsp = yylval;
-
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here.  |
-`----------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-  return yyresult;
-}
-
-
-#line 309 "ps1.0_grammar.y"
-
-
-void yyerror(const char* s)
-{
-	errors.set("parser: syntax error", line_number);
-}
-

+ 0 - 101
CamelotRenderer/RenderSystemGL/Source/nvparse/_ps1.0_parser.h

@@ -1,101 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     HEADER = 258,
-     NEWLINE = 259,
-     NUMBER = 260,
-     REG = 261,
-     DEF = 262,
-     ADDROP = 263,
-     BLENDOP = 264
-   };
-#endif
-#define HEADER 258
-#define NEWLINE 259
-#define NUMBER 260
-#define REG 261
-#define DEF 262
-#define ADDROP 263
-#define BLENDOP 264
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 43 "ps1.0_grammar.y"
-typedef union YYSTYPE {
-	int ival;
-	float fval;
-	
-	string * sval;
-	constdef * cdef;
-	vector<constdef> * consts;
-	vector<string> * line;
-	list<vector<string> > * lines;
-} YYSTYPE;
-/* Line 1240 of yacc.c.  */
-#line 65 "_ps1.0_parser.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE ps10_lval;
-
-
-

+ 0 - 2473
CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_lexer.cpp

@@ -1,2473 +0,0 @@
-#define yy_create_buffer rc10__create_buffer
-#define yy_delete_buffer rc10__delete_buffer
-#define yy_scan_buffer rc10__scan_buffer
-#define yy_scan_string rc10__scan_string
-#define yy_scan_bytes rc10__scan_bytes
-#define yy_flex_debug rc10__flex_debug
-#define yy_init_buffer rc10__init_buffer
-#define yy_flush_buffer rc10__flush_buffer
-#define yy_load_buffer_state rc10__load_buffer_state
-#define yy_switch_to_buffer rc10__switch_to_buffer
-#define yyin rc10_in
-#define yyleng rc10_leng
-#define yylex rc10_lex
-#define yyout rc10_out
-#define yyrestart rc10_restart
-#define yytext rc10_text
-#define yywrap rc10_wrap
-
-#line 20 "_rc1.0_lexer.cpp"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/shared/backups/ogre/cvs/ogrenew/RenderSystems/GL/src/nvparse/_rc1.0_lexer.cpp,v 1.5 2005-07-08 16:51:23 miathan6 Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-/* yyunput is never used */
-#define YY_NO_UNPUT
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 94
-#define YY_END_OF_BUFFER 95
-static yyconst short int yy_accept[309] =
-    {   0,
-        0,    0,   95,   94,   92,   91,   94,   94,    3,   82,
-       83,   87,   89,   85,   88,   86,   94,   79,   84,   90,
-       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
-       93,   93,   93,   93,   93,   93,   80,   81,   92,   91,
-        0,    0,    0,   79,   78,    1,    2,   77,   79,   93,
-       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
-       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
-        0,   77,   93,   93,   93,   93,   93,   93,   93,   93,
-        8,   93,   93,   66,   56,   93,   68,   93,   93,   67,
-       93,   93,   93,    0,   93,   93,   93,   12,   16,   93,
-
-       93,   93,   93,   93,    0,   93,   71,    0,    0,   93,
-       93,   28,   32,   36,   40,   93,   52,    0,   69,   93,
-       93,    0,    0,   93,   93,   93,   93,   93,    6,    7,
-        0,   93,   54,   55,    0,   59,    0,   93,   93,    0,
-        0,    0,    0,   93,    0,    0,   93,   93,   10,   11,
-        0,   14,   15,    0,   93,   44,   48,   93,   62,   93,
-        0,   93,    0,    0,   93,   20,   24,   26,   27,    0,
-       30,   31,    0,   34,   35,    0,   38,   39,    0,   93,
-       50,   51,    0,    4,   93,   93,    0,    0,   93,    0,
-        0,   57,   93,    5,   93,   53,   58,   93,    0,    0,
-
-        0,    0,    0,    0,   93,    0,   93,   93,    9,   13,
-       93,   42,   43,    0,   46,   47,    0,   93,   93,   93,
-       18,   19,    0,   22,   23,    0,   25,   29,   33,   37,
-       64,   49,   93,   93,   61,    0,    0,   93,   63,   93,
-        0,    0,   93,   93,   93,   41,   45,   93,   93,   93,
-       93,   17,   21,   93,   93,   93,   93,   93,   93,   93,
-       93,   93,   93,   93,   93,   93,   75,   93,   93,   93,
-       60,   76,   93,   93,   93,   93,   93,   93,   93,   70,
-       93,   65,   93,   93,   93,   74,   93,   93,   93,   93,
-       93,   93,   93,   73,   93,   93,   93,   93,   93,   93,
-
-       93,   93,   93,   93,   93,   93,   72,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    5,    1,    6,    1,    1,    1,    1,    7,
-        8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
-       18,   19,   19,   19,   19,   19,   19,    1,   20,    1,
-       21,    1,    1,    1,   22,   22,   23,   22,   22,   22,
-       22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       22,   24,   22,   22,   22,   22,   22,   22,   22,   22,
-        1,    1,    1,    1,   25,    1,   26,   27,   28,   29,
-
-       30,   31,   32,   33,   34,   22,   22,   35,   36,   37,
-       38,   39,   22,   40,   41,   42,   43,   44,   45,   46,
-       47,   48,   49,    1,   50,    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,    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,    1,    1
-    } ;
-
-static yyconst int yy_meta[51] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    2,    1,    2,    2,    2,    2,    2,    1,
-        1,    2,    2,    2,    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
-    } ;
-
-static yyconst short int yy_base[310] =
-    {   0,
-        0,    0,  543,  544,  540,  544,   48,  536,  544,  544,
-      544,  544,   40,  544,   47,   52,   63,   63,  544,  544,
-      527,   48,   41,   60,   71,   61,   72,   73,   74,   75,
-       76,   77,   83,   78,   79,   84,  544,  544,  537,  544,
-       90,  514,  112,  119,  124,  544,  544,  129,  136,  524,
-      111,   89,   99,  143,  120,  144,  145,   88,  146,  147,
-      149,   87,  150,  152,  151,  158,  153,  154,  155,  157,
-      513,  157,   90,  172,  173,  178,  177,  175,  185,  186,
-      522,  188,  189,  521,  520,  519,  518,  191,  192,  517,
-      207,  193,  195,  513,  204,  216,  197,  515,  514,  194,
-
-      201,  218,  202,  222,  211,  227,  513,  219,  216,  234,
-      235,  512,  511,  510,  509,  236,  508,  507,  506,  240,
-      237,  234,  243,  241,  260,  242,  250,  259,  544,  544,
-      486,  258,  544,  544,  485,  544,  484,  264,  265,  260,
-      264,  266,  268,  275,  270,  500,  285,  286,  544,  544,
-      482,  544,  544,  481,  288,  499,  498,  289,  497,  292,
-      482,  290,  481,  480,  294,  493,  492,  544,  544,  472,
-      544,  544,  471,  544,  544,  470,  544,  544,  469,  296,
-      544,  544,  468,  544,  298,  300,  472,  471,  302,  290,
-      293,  484,  309,  544,  314,  544,  544,  312,  308,  310,
-
-      469,  465,  464,  463,  315,  461,  326,  329,  544,  544,
-      330,  544,  544,  455,  544,  544,  454,  333,  328,  340,
-      544,  544,  453,  544,  544,  452,  544,  544,  544,  544,
-      342,  544,  338,  334,  470,  455,  454,  341,  467,  343,
-      452,  451,  339,  344,  347,  544,  544,  345,  348,  362,
-      349,  544,  544,  364,  365,  367,  369,  366,  370,  376,
-      371,  377,  380,  382,  383,  385,  464,  390,  391,  389,
-      463,  460,  393,  394,  392,  395,  403,  398,  400,  457,
-      404,  245,  420,  415,  399,  208,  405,  414,  422,  425,
-      428,  430,  435,  436,  409,  439,  438,  440,  442,  443,
-
-      444,  446,  449,  447,  450,  456,  156,  544,  119
-    } ;
-
-static yyconst short int yy_def[310] =
-    {   0,
-      308,    1,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  309,  308,  308,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      308,  308,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  308,  309,  309,  309,  309,  309,  309,
-
-      309,  309,  309,  309,  308,  309,  309,  308,  308,  309,
-      309,  309,  309,  309,  309,  309,  309,  308,  309,  309,
-      309,  308,  308,  309,  309,  309,  309,  309,  308,  308,
-      308,  309,  308,  308,  308,  308,  308,  309,  309,  308,
-      308,  308,  308,  309,  308,  308,  309,  309,  308,  308,
-      308,  308,  308,  308,  309,  309,  309,  309,  309,  309,
-      308,  309,  308,  308,  309,  309,  309,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  309,
-      308,  308,  308,  308,  309,  309,  308,  308,  309,  308,
-      308,  309,  309,  308,  309,  308,  308,  309,  308,  308,
-
-      308,  308,  308,  308,  309,  308,  309,  309,  308,  308,
-      309,  308,  308,  308,  308,  308,  308,  309,  309,  309,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      309,  308,  309,  309,  309,  308,  308,  309,  309,  309,
-      308,  308,  309,  309,  309,  308,  308,  309,  309,  309,
-      309,  308,  308,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
-
-      309,  309,  309,  309,  309,  309,  309,    0,  308
-    } ;
-
-static yyconst short int yy_nxt[595] =
-    {   0,
-        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
-       14,   15,   16,   17,   18,   18,   18,   18,   18,   19,
-       20,   21,   21,   21,   21,   22,   23,   24,   25,   26,
-       27,   21,   28,   21,   29,   30,   21,   31,   21,   32,
-       33,   34,   35,   21,   21,   21,   21,   36,   37,   38,
-       40,   41,   43,  308,   44,   44,   44,   44,   44,   43,
-      308,   44,   44,   44,   44,   44,   45,   45,   45,   45,
-       45,   46,  308,  308,   52,   48,   47,   49,   49,   49,
-       49,   49,   51,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,   40,   41,   53,  308,  308,   54,   59,  308,
-
-      308,  308,  308,   60,   55,   57,   56,   68,   64,   58,
-       65,  308,   62,   70,   74,   69,   85,   61,   63,   81,
-       50,   66,   95,  308,   75,   67,   45,   45,   45,   45,
-       45,   48,  308,   44,   44,   44,   44,   44,   45,   45,
-       45,   45,   45,   72,   72,   72,   72,   72,   48,   73,
-       49,   49,   49,   49,   49,  308,  308,  308,  308,  308,
-       78,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,   72,   72,   72,   72,   72,   88,   76,   87,   77,
-       82,   80,   79,   89,  308,  308,   83,  308,   90,  308,
-      308,   86,   98,   99,   84,   92,   93,  308,  308,   91,
-
-      308,  308,  102,  308,  308,  308,  308,  308,   97,  308,
-      103,  104,   96,  308,  308,  100,  308,  101,  106,  308,
-      308,  112,  113,  114,  115,  110,  116,  107,  308,  119,
-      308,  111,  117,  124,  308,  121,  129,  130,  127,  308,
-      120,  136,  125,  126,  133,  134,  308,  308,  308,  308,
-      131,  132,  308,  308,  308,  137,  128,  308,  135,  149,
-      150,  148,  308,  138,  139,  155,  147,  144,  152,  153,
-      308,  308,  308,  151,  156,  157,  308,  308,  159,  166,
-      167,  158,  154,  160,  162,  168,  169,  308,  165,  171,
-      172,  174,  175,  177,  178,  181,  182,  308,  308,  170,
-
-      308,  308,  308,  173,  308,  176,  308,  179,  308,  183,
-      308,  180,  308,  186,  308,  212,  213,  192,  215,  216,
-      198,  308,  207,  195,  308,  205,  308,  308,  189,  214,
-      193,  185,  217,  221,  222,  224,  225,  208,  308,  219,
-      308,  308,  308,  231,  211,  308,  308,  223,  218,  226,
-      308,  308,  308,  308,  308,  308,  308,  308,  220,  308,
-      308,  308,  233,  234,  240,  235,  243,  244,  239,  248,
-      238,  245,  254,  249,  308,  255,  308,  308,  308,  308,
-      250,  308,  308,  308,  251,  258,  256,  257,  308,  308,
-      262,  263,  308,  260,  308,  308,  264,  308,  259,  266,
-
-      261,  308,  308,  308,  308,  308,  308,  308,  265,  273,
-      308,  308,  308,  267,  268,  308,  308,  308,  269,  274,
-      270,  308,  272,  271,  275,  277,  308,  308,  281,  283,
-      280,  276,  308,  278,  308,  279,  287,  308,  284,  282,
-      308,  288,  308,  289,  285,  286,  290,  308,  308,  296,
-      308,  308,  308,  292,  308,  308,  308,  291,  308,  308,
-      295,  308,  308,  298,  293,  294,  297,  301,  308,  308,
-      302,  300,  308,  304,  299,  308,  308,  253,  252,  308,
-      247,  246,  308,  242,  241,  237,  236,  232,  305,  230,
-      229,  228,  303,  307,  306,  227,  308,  210,  209,  206,
-
-      204,  203,  202,  201,  200,  199,  197,  196,  194,  308,
-      191,  190,  188,  187,  184,  164,  163,  161,  308,  146,
-      145,  143,  142,  141,  140,  308,  123,  122,  118,  308,
-      308,  109,  108,  308,  105,   94,  308,   71,   39,  308,
-       42,   39,  308,    3,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308
-
-    } ;
-
-static yyconst short int yy_chk[595] =
-    {   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,
-        7,    7,   13,   23,   13,   13,   13,   13,   13,   15,
-       22,   15,   15,   15,   15,   15,   16,   16,   16,   16,
-       16,   17,   24,   26,   23,   18,   17,   18,   18,   18,
-       18,   18,   22,   25,   27,   28,   29,   30,   31,   32,
-       34,   35,   41,   41,   24,   33,   36,   24,   28,   62,
-
-       58,   52,   73,   29,   25,   27,   26,   34,   32,   27,
-       33,   53,   31,   36,   52,   35,   62,   30,   31,   58,
-      309,   33,   73,   51,   53,   33,   43,   43,   43,   43,
-       43,   44,   55,   44,   44,   44,   44,   44,   45,   45,
-       45,   45,   45,   48,   48,   48,   48,   48,   49,   51,
-       49,   49,   49,   49,   49,   54,   56,   57,   59,   60,
-       55,   61,   63,   65,   64,   67,   68,   69,  307,   70,
-       66,   72,   72,   72,   72,   72,   65,   54,   64,   54,
-       59,   57,   56,   66,   74,   75,   60,   78,   67,   77,
-       76,   63,   76,   76,   61,   69,   70,   79,   80,   68,
-
-       82,   83,   78,   88,   89,   92,  100,   93,   75,   97,
-       79,   80,   74,  101,  103,   76,   95,   77,   82,   91,
-      286,   91,   91,   91,   91,   88,   92,   83,   96,   95,
-      102,   89,   93,  100,  104,   97,  105,  105,  103,  106,
-       96,  109,  101,  102,  108,  108,  110,  111,  116,  121,
-      105,  106,  120,  124,  126,  109,  104,  282,  108,  122,
-      122,  121,  127,  110,  111,  124,  120,  116,  123,  123,
-      132,  128,  125,  122,  125,  125,  138,  139,  127,  139,
-      139,  126,  123,  128,  132,  140,  140,  144,  138,  141,
-      141,  142,  142,  143,  143,  145,  145,  147,  148,  140,
-
-      155,  158,  162,  141,  160,  142,  165,  143,  180,  145,
-      185,  144,  186,  148,  189,  190,  190,  158,  191,  191,
-      165,  193,  185,  162,  198,  180,  195,  205,  155,  190,
-      160,  147,  191,  199,  199,  200,  200,  186,  207,  195,
-      219,  208,  211,  205,  189,  218,  234,  199,  193,  200,
-      233,  243,  220,  238,  231,  240,  244,  248,  198,  245,
-      249,  251,  207,  208,  220,  211,  231,  233,  219,  238,
-      218,  234,  243,  240,  250,  244,  254,  255,  258,  256,
-      240,  257,  259,  261,  240,  249,  245,  248,  260,  262,
-      255,  256,  263,  251,  264,  265,  257,  266,  250,  259,
-
-      254,  270,  268,  269,  275,  273,  274,  276,  258,  266,
-      278,  285,  279,  260,  261,  277,  281,  287,  262,  268,
-      263,  295,  265,  264,  269,  273,  288,  284,  277,  279,
-      276,  270,  283,  274,  289,  275,  285,  290,  281,  278,
-      291,  287,  292,  288,  283,  284,  289,  293,  294,  295,
-      297,  296,  298,  291,  299,  300,  301,  290,  302,  304,
-      294,  303,  305,  297,  292,  293,  296,  300,  306,  280,
-      301,  299,  272,  303,  298,  271,  267,  242,  241,  239,
-      237,  236,  235,  226,  223,  217,  214,  206,  304,  204,
-      203,  202,  302,  306,  305,  201,  192,  188,  187,  183,
-
-      179,  176,  173,  170,  167,  166,  164,  163,  161,  159,
-      157,  156,  154,  151,  146,  137,  135,  131,  119,  118,
-      117,  115,  114,  113,  112,  107,   99,   98,   94,   90,
-       87,   86,   85,   84,   81,   71,   50,   42,   39,   21,
-        8,    5,    3,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
-      308,  308,  308,  308
-
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "rc1.0_tokens.l"
-#define INITIAL 0
-/* definitions */
-#line 8 "rc1.0_tokens.l"
-
-#include <stdlib.h>
-#include "rc1.0_combiners.h"
-#include "_rc1.0_parser.h"
-
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-#define YY_INPUT(buf,result,max_size) \
-{ \
-    result = 0;                        \
-    while (*myin && result < max_size) \
-    buf[result++] = *myin++;           \
-}
-
-#define YY_ALWAYS_INTERACTIVE 1
-
-/* end of definitions */
-#line 635 "_rc1.0_lexer.cpp"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 27 "rc1.0_tokens.l"
-
-
-#line 789 "_rc1.0_lexer.cpp"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 309 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 544 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 29 "rc1.0_tokens.l"
-{
-			    A:
-				switch (yyinput()) {
-				  case '*': goto B;
-				  case 0: errors.set("end-of-file in comment", line_number); break;
-				  case '\n': line_number++;
-				  default:  goto A;
-				}
-			    B:
-				switch (yyinput()) {
-				  case '*': goto B;
-				  case '/': break;
-				  case 0: errors.set("end-of-file in comment", line_number); break;
-				  case '\n': line_number++;
-				  default:  goto A;
-				}
-			}
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 47 "rc1.0_tokens.l"
-{
-			    char ch;
-			    while ((ch = yyinput()) != '\n');
-			    if (ch == '\n') line_number++;
-			}
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 53 "rc1.0_tokens.l"
-{
-			    char ch;
-			    while ((ch = yyinput()) != '\n');
-			    if (ch == '\n') line_number++;
-			}
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 59 "rc1.0_tokens.l"
-{ /* eat header */ }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 61 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_FOG_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 65 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_FOG_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 69 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_FOG_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 73 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_FOG;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 78 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_PRIMARY_COLOR_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 82 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_PRIMARY_COLOR_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 86 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_PRIMARY_COLOR_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 90 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_PRIMARY_COLOR;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 95 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SECONDARY_COLOR_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 99 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SECONDARY_COLOR_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 103 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SECONDARY_COLOR_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 107 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SECONDARY_COLOR;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 112 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE0_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 116 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE0_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 120 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE0_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 124 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE0;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 129 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE1_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 133 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE1_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 137 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE1_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 141 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_SPARE1;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 146 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE0_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 150 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE0_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 154 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE0_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 158 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE0;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 163 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE1_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 167 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE1_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 171 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE1_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 175 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE1;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 180 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE2_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 184 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE2_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 188 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE2_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 192 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE2;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 197 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE3_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 201 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE3_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 205 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE3_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 209 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_TEXTURE3;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 214 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR0_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 218 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR0_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 222 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR0_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 226 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR0;
-			    return(constVariable);
-			}
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 231 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR1_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 235 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR1_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 239 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR1_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 243 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_CONST_COLOR1;
-			    return(constVariable);
-			}
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 248 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ZERO_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 252 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ZERO_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 256 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ZERO_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 260 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ZERO;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 265 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ONE_RGB;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 269 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ONE_ALPHA;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 273 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ONE_BLUE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 277 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_ONE;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 282 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_DISCARD;
-			    return(regVariable);
-			}
-	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 287 "rc1.0_tokens.l"
-return(fragment_rgb);
-	YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 288 "rc1.0_tokens.l"
-return(fragment_alpha);
-	YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 290 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_FINAL_PRODUCT;
-			    return(final_product);
-			}
-	YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 295 "rc1.0_tokens.l"
-{
-			    rc10_lval.registerEnum.word = RCP_COLOR_SUM;
-			    return(color_sum);
-			}
-	YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 300 "rc1.0_tokens.l"
-return(expandString);
-	YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 301 "rc1.0_tokens.l"
-return(halfBiasString);
-	YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 302 "rc1.0_tokens.l"
-return(unsignedString);
-	YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 303 "rc1.0_tokens.l"
-return(unsignedInvertString);
-	YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 304 "rc1.0_tokens.l"
-{
-					rc10_lval.ival = GL_TRUE;
-					return(muxString);
-				}
-	YY_BREAK
-case 67:
-YY_RULE_SETUP
-#line 309 "rc1.0_tokens.l"
-{
-					rc10_lval.ival = GL_FALSE;
-					return(sumString);
-				}
-	YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 314 "rc1.0_tokens.l"
-{
-					rc10_lval.ival = RCP_RGB;
-					return(rgb_portion);
-				}
-	YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 318 "rc1.0_tokens.l"
-{
-					rc10_lval.ival = RCP_ALPHA;
-					return(alpha_portion);
-				}
-	YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 323 "rc1.0_tokens.l"
-{
-				rc10_lval.ival = true;
-				return(clamp_color_sum);
-			}
-	YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 327 "rc1.0_tokens.l"
-return(lerp);
-	YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 330 "rc1.0_tokens.l"
-{
-				rc10_lval.biasScaleEnum.word = RCP_BIAS_BY_NEGATIVE_ONE_HALF_SCALE_BY_TWO;
-				return(bias_by_negative_one_half_scale_by_two);
-			}
-	YY_BREAK
-case 73:
-YY_RULE_SETUP
-#line 334 "rc1.0_tokens.l"
-{
-				rc10_lval.biasScaleEnum.word = RCP_BIAS_BY_NEGATIVE_ONE_HALF;
-				return(bias_by_negative_one_half);
-			}
-	YY_BREAK
-case 74:
-YY_RULE_SETUP
-#line 338 "rc1.0_tokens.l"
-{
-				rc10_lval.biasScaleEnum.word = RCP_SCALE_BY_ONE_HALF;
-				return(scale_by_one_half);
-			}
-	YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 342 "rc1.0_tokens.l"
-{
-				rc10_lval.biasScaleEnum.word = RCP_SCALE_BY_TWO;
-				return(scale_by_two);
-			}
-	YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 346 "rc1.0_tokens.l"
-{
-				rc10_lval.biasScaleEnum.word = RCP_SCALE_BY_FOUR;
-				return(scale_by_four);
-			}
-	YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 351 "rc1.0_tokens.l"
-{
-				rc10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 356 "rc1.0_tokens.l"
-{
-				rc10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 361 "rc1.0_tokens.l"
-{
-				rc10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 366 "rc1.0_tokens.l"
-return(openBracket);
-	YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 367 "rc1.0_tokens.l"
-return(closeBracket);
-	YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 368 "rc1.0_tokens.l"
-return(openParen);
-	YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 369 "rc1.0_tokens.l"
-return(closeParen);
-	YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 370 "rc1.0_tokens.l"
-return(semicolon);
-	YY_BREAK
-case 85:
-YY_RULE_SETUP
-#line 371 "rc1.0_tokens.l"
-return(comma);
-	YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 372 "rc1.0_tokens.l"
-return(dot);
-	YY_BREAK
-case 87:
-YY_RULE_SETUP
-#line 373 "rc1.0_tokens.l"
-return(times);
-	YY_BREAK
-case 88:
-YY_RULE_SETUP
-#line 374 "rc1.0_tokens.l"
-return(minus);
-	YY_BREAK
-case 89:
-YY_RULE_SETUP
-#line 375 "rc1.0_tokens.l"
-return(plus);
-	YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 376 "rc1.0_tokens.l"
-return(equals);
-	YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 378 "rc1.0_tokens.l"
-{
-				line_number++;
-			}
-	YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 382 "rc1.0_tokens.l"
-{}
-	YY_BREAK
-case 93:
-YY_RULE_SETUP
-#line 384 "rc1.0_tokens.l"
-{
-				errors.set("unrecognized token", line_number);
-			}
-	YY_BREAK
-case 94:
-YY_RULE_SETUP
-#line 389 "rc1.0_tokens.l"
-ECHO;
-	YY_BREAK
-#line 1574 "_rc1.0_lexer.cpp"
-case YY_STATE_EOF(INITIAL):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 309 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 309 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 308);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 389 "rc1.0_tokens.l"
-
-
-bool rc10_init_more();
-
-bool rc10_init(char* inputString)
-{
-    myin = inputString;
-	return rc10_init_more();
-}
-
-#ifndef rc10_wrap
-int rc10_wrap(void)
-{
-  return(1);
-}
-#endif

+ 0 - 2324
CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_parser.cpp

@@ -1,2324 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Written by Richard Stallman by simplifying the original so called
-   ``semantic'' parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-#include <CmGLPrerequisites.h>
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* If NAME_PREFIX is specified substitute the variables and functions
-   names.  */
-#define yyparse rc10_parse
-#define yylex   rc10_lex
-#define yyerror rc10_error
-#define yylval  rc10_lval
-#define yychar  rc10_char
-#define yydebug rc10_debug
-#define yynerrs rc10_nerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     regVariable = 258,
-     constVariable = 259,
-     color_sum = 260,
-     final_product = 261,
-     expandString = 262,
-     halfBiasString = 263,
-     unsignedString = 264,
-     unsignedInvertString = 265,
-     muxString = 266,
-     sumString = 267,
-     rgb_portion = 268,
-     alpha_portion = 269,
-     openParen = 270,
-     closeParen = 271,
-     openBracket = 272,
-     closeBracket = 273,
-     semicolon = 274,
-     comma = 275,
-     dot = 276,
-     times = 277,
-     minus = 278,
-     equals = 279,
-     plus = 280,
-     bias_by_negative_one_half_scale_by_two = 281,
-     bias_by_negative_one_half = 282,
-     scale_by_one_half = 283,
-     scale_by_two = 284,
-     scale_by_four = 285,
-     clamp_color_sum = 286,
-     lerp = 287,
-     fragment_rgb = 288,
-     fragment_alpha = 289,
-     floatValue = 290
-   };
-#endif
-#define regVariable 258
-#define constVariable 259
-#define color_sum 260
-#define final_product 261
-#define expandString 262
-#define halfBiasString 263
-#define unsignedString 264
-#define unsignedInvertString 265
-#define muxString 266
-#define sumString 267
-#define rgb_portion 268
-#define alpha_portion 269
-#define openParen 270
-#define closeParen 271
-#define openBracket 272
-#define closeBracket 273
-#define semicolon 274
-#define comma 275
-#define dot 276
-#define times 277
-#define minus 278
-#define equals 279
-#define plus 280
-#define bias_by_negative_one_half_scale_by_two 281
-#define bias_by_negative_one_half 282
-#define scale_by_one_half 283
-#define scale_by_two 284
-#define scale_by_four 285
-#define clamp_color_sum 286
-#define lerp 287
-#define fragment_rgb 288
-#define fragment_alpha 289
-#define floatValue 290
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 3 "rc1.0_grammar.y"
-
-void yyerror(const char* s);
-int yylex ( void );
-
-#ifdef _WIN32
-#  define WIN32_LEAN_AND_MEAN
-#  if !defined(NOMINMAX) && defined(_MSC_VER)
-#	define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#  include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "rc1.0_combiners.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 20 "rc1.0_grammar.y"
-typedef union YYSTYPE {
-  int ival;
-  float fval;
-  RegisterEnum registerEnum;
-  BiasScaleEnum biasScaleEnum;
-  MappedRegisterStruct mappedRegisterStruct;
-  ConstColorStruct constColorStruct;
-  GeneralPortionStruct generalPortionStruct;
-  GeneralFunctionStruct generalFunctionStruct;
-  OpStruct opStruct;
-  GeneralCombinerStruct generalCombinerStruct;
-  GeneralCombinersStruct generalCombinersStruct;
-  FinalProductStruct finalProductStruct;
-  FinalRgbFunctionStruct finalRgbFunctionStruct;
-  FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-  FinalCombinerStruct finalCombinerStruct;
-  CombinersStruct combinersStruct;
-} YYSTYPE;
-/* Line 191 of yacc.c.  */
-#line 191 "_rc1.0_parser.c"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 214 of yacc.c.  */
-#line 203 "_rc1.0_parser.c"
-
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-
-
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  short yyss;
-  YYSTYPE yyvs;
-  };
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-#if defined (__STDC__) || defined (__cplusplus)
-   typedef signed char yysigned_char;
-#else
-   typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL  27
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   258
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  36
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  22
-/* YYNRULES -- Number of rules. */
-#define YYNRULES  88
-/* YYNRULES -- Number of states. */
-#define YYNSTATES  220
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   290
-
-#define YYTRANSLATE(YYX) 						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const unsigned char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     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,     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
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const unsigned short yyprhs[] =
-{
-       0,     0,     3,     5,     9,    14,    17,    20,    24,    26,
-      39,    42,    44,    49,    55,    62,    66,    71,    77,    83,
-      88,    90,    92,    94,    97,   102,   108,   113,   119,   124,
-     129,   132,   135,   138,   140,   143,   147,   151,   153,   160,
-     167,   172,   179,   186,   191,   196,   201,   206,   211,   213,
-     218,   223,   225,   230,   235,   237,   242,   247,   250,   254,
-     258,   263,   268,   271,   275,   279,   284,   289,   291,   294,
-     297,   301,   305,   307,   310,   313,   317,   321,   326,   333,
-     347,   361,   373,   380,   389,   394,   401,   406,   408
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
-{
-      37,     0,    -1,    38,    -1,    39,    40,    52,    -1,    39,
-      39,    40,    52,    -1,    40,    52,    -1,    39,    52,    -1,
-      39,    39,    52,    -1,    52,    -1,     4,    24,    15,    35,
-      20,    35,    20,    35,    20,    35,    16,    19,    -1,    40,
-      41,    -1,    41,    -1,    17,    42,    42,    18,    -1,    17,
-      39,    42,    42,    18,    -1,    17,    39,    39,    42,    42,
-      18,    -1,    17,    42,    18,    -1,    17,    39,    42,    18,
-      -1,    17,    39,    39,    42,    18,    -1,    43,    17,    45,
-      50,    18,    -1,    43,    17,    45,    18,    -1,    13,    -1,
-      14,    -1,    57,    -1,    23,    57,    -1,     7,    15,    57,
-      16,    -1,    23,     7,    15,    57,    16,    -1,     8,    15,
-      57,    16,    -1,    23,     8,    15,    57,    16,    -1,     9,
-      15,    57,    16,    -1,    10,    15,    57,    16,    -1,    46,
-      46,    -1,    46,    47,    -1,    47,    46,    -1,    46,    -1,
-      47,    47,    -1,    47,    47,    48,    -1,    47,    47,    49,
-      -1,    47,    -1,    57,    24,    44,    21,    44,    19,    -1,
-      57,    24,    44,    22,    44,    19,    -1,    57,    24,    44,
-      19,    -1,    57,    24,    11,    15,    16,    19,    -1,    57,
-      24,    12,    15,    16,    19,    -1,    26,    15,    16,    19,
-      -1,    27,    15,    16,    19,    -1,    28,    15,    16,    19,
-      -1,    29,    15,    16,    19,    -1,    30,    15,    16,    19,
-      -1,    57,    -1,     9,    15,    57,    16,    -1,    10,    15,
-      57,    16,    -1,     5,    -1,     9,    15,     5,    16,    -1,
-      10,    15,     5,    16,    -1,     6,    -1,     9,    15,     6,
-      16,    -1,    10,    15,     6,    16,    -1,    56,    55,    -1,
-      53,    56,    55,    -1,    54,    56,    55,    -1,    53,    54,
-      56,    55,    -1,    54,    53,    56,    55,    -1,    55,    56,
-      -1,    53,    55,    56,    -1,    54,    55,    56,    -1,    53,
-      54,    55,    56,    -1,    54,    53,    55,    56,    -1,    55,
-      -1,    53,    55,    -1,    54,    55,    -1,    53,    54,    55,
-      -1,    54,    53,    55,    -1,    56,    -1,    53,    56,    -1,
-      54,    56,    -1,    53,    54,    56,    -1,    54,    53,    56,
-      -1,    31,    15,    16,    19,    -1,     6,    24,    51,    22,
-      51,    19,    -1,    33,    24,    32,    15,    51,    20,    51,
-      20,    51,    16,    25,    51,    19,    -1,    33,    24,    51,
-      25,    32,    15,    51,    20,    51,    20,    51,    16,    19,
-      -1,    33,    24,    32,    15,    51,    20,    51,    20,    51,
-      16,    19,    -1,    33,    24,    51,    22,    51,    19,    -1,
-      33,    24,    51,    22,    51,    25,    51,    19,    -1,    33,
-      24,    51,    19,    -1,    33,    24,    51,    25,    51,    19,
-      -1,    34,    24,    51,    19,    -1,     4,    -1,     3,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const unsigned short yyrline[] =
-{
-       0,    73,    73,    80,    86,    92,    98,   106,   114,   124,
-     133,   138,   146,   152,   158,   164,   170,   176,   184,   190,
-     200,   204,   210,   216,   222,   228,   234,   240,   246,   252,
-     260,   266,   272,   278,   284,   290,   296,   302,   310,   318,
-     324,   336,   344,   352,   356,   360,   364,   368,   374,   380,
-     386,   392,   398,   404,   410,   416,   422,   430,   436,   442,
-     448,   454,   461,   467,   473,   479,   485,   492,   500,   508,
-     516,   524,   533,   541,   549,   557,   565,   575,   581,   589,
-     595,   601,   611,   623,   633,   647,   661,   669,   673
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "regVariable", "constVariable", 
-  "color_sum", "final_product", "expandString", "halfBiasString", 
-  "unsignedString", "unsignedInvertString", "muxString", "sumString", 
-  "rgb_portion", "alpha_portion", "openParen", "closeParen", 
-  "openBracket", "closeBracket", "semicolon", "comma", "dot", "times", 
-  "minus", "equals", "plus", "bias_by_negative_one_half_scale_by_two", 
-  "bias_by_negative_one_half", "scale_by_one_half", "scale_by_two", 
-  "scale_by_four", "clamp_color_sum", "lerp", "fragment_rgb", 
-  "fragment_alpha", "floatValue", "$accept", "WholeEnchilada", 
-  "Combiners", "ConstColor", "GeneralCombiners", "GeneralCombiner", 
-  "GeneralPortion", "PortionDesignator", "GeneralMappedRegister", 
-  "GeneralFunction", "Dot", "Mul", "Mux", "Sum", "BiasScale", 
-  "FinalMappedRegister", "FinalCombiner", "ClampColorSum", "FinalProduct", 
-  "FinalRgbFunction", "FinalAlphaFunction", "Register", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const unsigned short yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const unsigned char yyr1[] =
-{
-       0,    36,    37,    38,    38,    38,    38,    38,    38,    39,
-      40,    40,    41,    41,    41,    41,    41,    41,    42,    42,
-      43,    43,    44,    44,    44,    44,    44,    44,    44,    44,
-      45,    45,    45,    45,    45,    45,    45,    45,    46,    47,
-      47,    48,    49,    50,    50,    50,    50,    50,    51,    51,
-      51,    51,    51,    51,    51,    51,    51,    52,    52,    52,
-      52,    52,    52,    52,    52,    52,    52,    52,    52,    52,
-      52,    52,    52,    52,    52,    52,    52,    53,    54,    55,
-      55,    55,    55,    55,    55,    55,    56,    57,    57
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const unsigned char yyr2[] =
-{
-       0,     2,     1,     3,     4,     2,     2,     3,     1,    12,
-       2,     1,     4,     5,     6,     3,     4,     5,     5,     4,
-       1,     1,     1,     2,     4,     5,     4,     5,     4,     4,
-       2,     2,     2,     1,     2,     3,     3,     1,     6,     6,
-       4,     6,     6,     4,     4,     4,     4,     4,     1,     4,
-       4,     1,     4,     4,     1,     4,     4,     2,     3,     3,
-       4,     4,     2,     3,     3,     4,     4,     1,     2,     2,
-       3,     3,     1,     2,     2,     3,     3,     4,     6,    13,
-      13,    11,     6,     8,     4,     6,     4,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const unsigned char yydefact[] =
-{
-       0,     0,     0,     0,     0,     0,     0,     0,     2,     0,
-       0,    11,     8,     0,     0,    67,    72,     0,     0,    20,
-      21,     0,     0,     0,     0,     0,     0,     1,     0,     0,
-       6,    10,     5,     0,    68,    73,     0,    69,    74,    62,
-      57,     0,    88,    87,    51,    54,     0,     0,     0,    48,
-       0,     0,    15,     0,     0,     0,     0,     0,     0,     0,
-       7,     3,    70,    75,    63,    58,    71,    76,    64,    59,
-       0,     0,     0,     0,     0,    16,     0,    12,     0,    33,
-      37,     0,    77,     0,    84,     0,     0,    86,     4,    65,
-      60,    66,    61,     0,     0,     0,     0,     0,     0,     0,
-       0,    17,     0,    13,    19,     0,     0,     0,     0,     0,
-       0,    30,    31,    32,    34,     0,     0,     0,     0,     0,
-       0,    52,    55,    49,    53,    56,    50,    78,    14,     0,
-       0,     0,     0,     0,    18,    35,    36,     0,     0,     0,
-       0,     0,     0,     0,    22,     0,    82,     0,     0,    85,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    23,    40,     0,     0,     0,     0,     0,
-       0,    43,    44,    45,    46,    47,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    83,     0,     0,
-       0,     0,    24,    26,    28,    29,     0,     0,    38,    39,
-       0,     0,     0,     0,     0,    25,    27,     0,     0,     0,
-      41,    42,    81,     0,     0,     9,     0,     0,    79,    80
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const short yydefgoto[] =
-{
-      -1,     7,     8,     9,    10,    11,    22,    23,   143,    78,
-      79,    80,   135,   136,   110,    48,    12,    13,    14,    15,
-      16,    49
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -63
-static const short yypact[] =
-{
-      48,   -13,    -8,    53,    16,    11,    14,    73,   -63,    48,
-      94,   -63,   -63,    43,   147,    44,    47,    70,   144,   -63,
-     -63,    53,    -5,    74,    78,    83,   144,   -63,    94,    94,
-     -63,   -63,   -63,    17,    44,    47,    17,    44,    47,   -63,
-     -63,    64,   -63,   -63,   -63,   -63,    97,   111,   107,   -63,
-      58,   103,   -63,   117,    80,   132,   142,    21,   139,    94,
-     -63,   -63,    44,    47,   -63,   -63,    44,    47,   -63,   -63,
-     146,   167,   171,   144,   151,   -63,   149,   -63,   116,    80,
-      80,   138,   -63,   144,   -63,   144,    92,   -63,   -63,   -63,
-     -63,   -63,   -63,   133,   170,   173,   174,   175,   176,   177,
-     160,   -63,   169,   -63,   -63,   179,   180,   181,   182,   183,
-     184,   -63,   -63,   -63,    80,   129,   185,    28,   186,   187,
-     188,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   191,
-     193,   194,   195,   196,   -63,   -63,   -63,   189,   199,   200,
-     201,   202,   152,   163,   -63,   144,   -63,   144,   144,   -63,
-     164,   203,   204,   205,   206,   207,    98,    80,    80,    80,
-      80,   212,   213,   -63,   -63,   129,   129,   198,   210,   211,
-     214,   -63,   -63,   -63,   -63,   -63,   215,   217,   219,   220,
-     221,   222,    80,    80,   223,   224,   144,   -63,   144,   165,
-     225,   228,   -63,   -63,   -63,   -63,   229,   230,   -63,   -63,
-     231,   232,   233,   234,   235,   -63,   -63,    50,   144,   236,
-     -63,   -63,   -63,   144,   240,   -63,   238,   239,   -63,   -63
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const short yypgoto[] =
-{
-     -63,   -63,   -63,     9,    -2,     0,   -18,   -63,   -62,   -63,
-      39,    61,   -63,   -63,   -63,   -25,    -4,   190,   208,     1,
-       8,   -52
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
-{
-      57,    58,    81,    51,    53,    30,    32,    29,    19,    20,
-      31,    17,    21,    52,    34,    37,    18,    40,    28,    96,
-      99,    35,    38,    39,    60,    61,    59,    81,    81,    31,
-      50,    24,    74,    76,    62,    25,    65,    66,    26,    69,
-      84,    63,    64,    85,    67,    68,    86,   146,   100,     2,
-       5,     6,     1,   147,     2,    88,   102,     1,   116,    31,
-     117,   119,   137,   144,    90,     3,    19,    20,    92,   212,
-      89,    19,    20,    27,    91,   213,     5,     6,     6,     4,
-       5,     5,     6,    42,    43,    41,    42,    43,    44,    45,
-     163,    54,    46,    47,    55,    42,    43,    44,    45,    70,
-       2,    46,    47,   184,   185,   178,   179,   180,   181,   176,
-     177,     3,    71,   144,   144,    56,    19,    20,   111,   113,
-     167,    75,   168,   169,   118,     4,    72,     5,     6,    73,
-     196,   197,    42,    43,   104,    77,   138,   139,   140,   141,
-     112,   114,   105,   106,   107,   108,   109,    42,    43,    44,
-      45,    82,   142,    46,    47,    42,    43,    83,    87,   161,
-     162,   200,   115,   201,    19,    20,    93,   103,   120,   101,
-      42,    43,    94,    95,    42,    43,    97,    98,     4,   127,
-       5,     6,   164,   214,   165,   166,   121,   128,   216,   122,
-     123,   124,   125,   126,   129,   130,   131,   132,   133,   170,
-     202,   148,   134,     0,    36,   145,   149,   151,   150,   152,
-     153,   154,   155,   156,   157,   158,   159,   160,   186,     0,
-       0,    33,   171,   172,   173,   174,   175,   182,   183,   187,
-     190,   188,   191,     0,   189,   192,   193,   194,   195,     0,
-       0,   203,   198,   199,   204,   205,   206,   207,     0,   209,
-       0,     0,   208,   210,   211,   215,   217,   218,   219
-};
-
-static const short yycheck[] =
-{
-      25,    26,    54,    21,    22,     9,    10,     9,    13,    14,
-      10,    24,     3,    18,    13,    14,    24,    16,     9,    71,
-      72,    13,    14,    15,    28,    29,    28,    79,    80,    29,
-      21,    15,    50,    51,    33,    24,    35,    36,    24,    38,
-      19,    33,    34,    22,    36,    37,    25,    19,    73,     6,
-      33,    34,     4,    25,     6,    59,    74,     4,    83,    59,
-      85,    86,   114,   115,    63,    17,    13,    14,    67,    19,
-      62,    13,    14,     0,    66,    25,    33,    34,    34,    31,
-      33,    33,    34,     3,     4,    15,     3,     4,     5,     6,
-     142,    17,     9,    10,    16,     3,     4,     5,     6,    35,
-       6,     9,    10,   165,   166,   157,   158,   159,   160,    11,
-      12,    17,    15,   165,   166,    32,    13,    14,    79,    80,
-     145,    18,   147,   148,    32,    31,    15,    33,    34,    22,
-     182,   183,     3,     4,    18,    18,     7,     8,     9,    10,
-      79,    80,    26,    27,    28,    29,    30,     3,     4,     5,
-       6,    19,    23,     9,    10,     3,     4,    15,    19,     7,
-       8,   186,    24,   188,    13,    14,    20,    18,    35,    18,
-       3,     4,     5,     6,     3,     4,     5,     6,    31,    19,
-      33,    34,    19,   208,    21,    22,    16,    18,   213,    16,
-      16,    16,    16,    16,    15,    15,    15,    15,    15,    35,
-      35,    15,    18,    -1,    14,    20,    19,    16,    20,    16,
-      16,    16,    16,    24,    15,    15,    15,    15,    20,    -1,
-      -1,    13,    19,    19,    19,    19,    19,    15,    15,    19,
-      15,    20,    15,    -1,    20,    16,    16,    16,    16,    -1,
-      -1,    16,    19,    19,    16,    16,    16,    16,    -1,    16,
-      -1,    -1,    20,    19,    19,    19,    16,    19,    19
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const unsigned char yystos[] =
-{
-       0,     4,     6,    17,    31,    33,    34,    37,    38,    39,
-      40,    41,    52,    53,    54,    55,    56,    24,    24,    13,
-      14,    39,    42,    43,    15,    24,    24,     0,    39,    40,
-      52,    41,    52,    54,    55,    56,    53,    55,    56,    56,
-      55,    15,     3,     4,     5,     6,     9,    10,    51,    57,
-      39,    42,    18,    42,    17,    16,    32,    51,    51,    40,
-      52,    52,    55,    56,    56,    55,    55,    56,    56,    55,
-      35,    15,    15,    22,    42,    18,    42,    18,    45,    46,
-      47,    57,    19,    15,    19,    22,    25,    19,    52,    56,
-      55,    56,    55,    20,     5,     6,    57,     5,     6,    57,
-      51,    18,    42,    18,    18,    26,    27,    28,    29,    30,
-      50,    46,    47,    46,    47,    24,    51,    51,    32,    51,
-      35,    16,    16,    16,    16,    16,    16,    19,    18,    15,
-      15,    15,    15,    15,    18,    48,    49,    57,     7,     8,
-       9,    10,    23,    44,    57,    20,    19,    25,    15,    19,
-      20,    16,    16,    16,    16,    16,    24,    15,    15,    15,
-      15,     7,     8,    57,    19,    21,    22,    51,    51,    51,
-      35,    19,    19,    19,    19,    19,    11,    12,    57,    57,
-      57,    57,    15,    15,    44,    44,    20,    19,    20,    20,
-      15,    15,    16,    16,    16,    16,    57,    57,    19,    19,
-      51,    51,    35,    16,    16,    16,    16,    16,    20,    16,
-      19,    19,    19,    25,    51,    19,    51,    16,    19,    19
-};
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrlab1
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");\
-      YYERROR;							\
-    }								\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)         \
-  Current.first_line   = Rhs[1].first_line;      \
-  Current.first_column = Rhs[1].first_column;    \
-  Current.last_line    = Rhs[N].last_line;       \
-  Current.last_column  = Rhs[N].last_column;
-#endif
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
-
-# define YYDSYMPRINT(Args)			\
-do {						\
-  if (yydebug)					\
-    yysymprint Args;				\
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location)		\
-do {								\
-  if (yydebug)							\
-    {								\
-      YYFPRINTF (stderr, "%s ", Title);				\
-      yysymprint (stderr, 					\
-                  Token, Value);	\
-      YYFPRINTF (stderr, "\n");					\
-    }								\
-} while (0)
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded).                                                   |
-`------------------------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_stack_print (short *bottom, short *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    short *bottom;
-    short *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (/* Nothing. */; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_reduce_print (int yyrule)
-#else
-static void
-yy_reduce_print (yyrule)
-    int yyrule;
-#endif
-{
-  int yyi;
-  unsigned int yylineno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
-             yyrule - 1, yylineno);
-  /* Print the symbols being reduced, and their result.  */
-  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
-    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
-  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (Rule);		\
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-#   else
-yystrlen (yystr)
-     const char *yystr;
-#   endif
-{
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
-    continue;
-
-  return yys - yystr - 1;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-#   if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-#   else
-yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
-{
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-#endif /* !YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  switch (yytype)
-    {
-      default:
-        break;
-    }
-  YYFPRINTF (yyoutput, ")");
-}
-
-#endif /* ! YYDEBUG */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yytype, yyvaluep)
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  switch (yytype)
-    {
-
-      default:
-        break;
-    }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM);
-# else
-int yyparse ();
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
-  void *YYPARSE_PARAM;
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK   (yyvsp--, yyssp--)
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule.  */
-  int yylen;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack. Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
-
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyoverflowlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	short *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-#line 74 "rc1.0_grammar.y"
-    {
-			yyvsp[0].combinersStruct.Validate();
-			yyvsp[0].combinersStruct.Invoke();
-		;}
-    break;
-
-  case 3:
-#line 81 "rc1.0_grammar.y"
-    {
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-2].constColorStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 4:
-#line 87 "rc1.0_grammar.y"
-    {
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-3].constColorStruct, yyvsp[-2].constColorStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 5:
-#line 93 "rc1.0_grammar.y"
-    {
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 6:
-#line 99 "rc1.0_grammar.y"
-    {
-			GeneralCombinersStruct generalCombinersStruct;
-			generalCombinersStruct.Init();
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-1].constColorStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 7:
-#line 107 "rc1.0_grammar.y"
-    {
-			GeneralCombinersStruct generalCombinersStruct;
-			generalCombinersStruct.Init();
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-2].constColorStruct, yyvsp[-1].constColorStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 8:
-#line 115 "rc1.0_grammar.y"
-    {
-			GeneralCombinersStruct generalCombinersStruct;
-			generalCombinersStruct.Init();
-			CombinersStruct combinersStruct;
-			combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct);
-			yyval.combinersStruct = combinersStruct;
-		;}
-    break;
-
-  case 9:
-#line 125 "rc1.0_grammar.y"
-    {
-			ConstColorStruct constColorStruct;
-			constColorStruct.Init(yyvsp[-11].registerEnum, yyvsp[-8].fval, yyvsp[-6].fval, yyvsp[-4].fval, yyvsp[-2].fval);
-			yyval.constColorStruct = constColorStruct;
-		;}
-    break;
-
-  case 10:
-#line 134 "rc1.0_grammar.y"
-    {
-			yyvsp[-1].generalCombinersStruct += yyvsp[0].generalCombinerStruct;
-			yyval.generalCombinersStruct = yyvsp[-1].generalCombinersStruct;
-		;}
-    break;
-
-  case 11:
-#line 139 "rc1.0_grammar.y"
-    {
-			GeneralCombinersStruct generalCombinersStruct;
-			generalCombinersStruct.Init(yyvsp[0].generalCombinerStruct);
-			yyval.generalCombinersStruct = generalCombinersStruct;
-		;}
-    break;
-
-  case 12:
-#line 147 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 13:
-#line 153 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct, yyvsp[-3].constColorStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 14:
-#line 159 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct, yyvsp[-4].constColorStruct, yyvsp[-3].constColorStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 15:
-#line 165 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 16:
-#line 171 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct, yyvsp[-2].constColorStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 17:
-#line 177 "rc1.0_grammar.y"
-    {
-			GeneralCombinerStruct generalCombinerStruct;
-			generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct, yyvsp[-3].constColorStruct, yyvsp[-2].constColorStruct);
-			yyval.generalCombinerStruct = generalCombinerStruct;
-		;}
-    break;
-
-  case 18:
-#line 185 "rc1.0_grammar.y"
-    {
-			GeneralPortionStruct generalPortionStruct;
-			generalPortionStruct.Init(yyvsp[-4].ival, yyvsp[-2].generalFunctionStruct, yyvsp[-1].biasScaleEnum);
-			yyval.generalPortionStruct = generalPortionStruct;
-		;}
-    break;
-
-  case 19:
-#line 191 "rc1.0_grammar.y"
-    {
-			BiasScaleEnum noScale;
-			noScale.word = RCP_SCALE_BY_ONE;
-			GeneralPortionStruct generalPortionStruct;
-			generalPortionStruct.Init(yyvsp[-3].ival, yyvsp[-1].generalFunctionStruct, noScale);
-			yyval.generalPortionStruct = generalPortionStruct;
-		;}
-    break;
-
-  case 20:
-#line 201 "rc1.0_grammar.y"
-    {
-			yyval.ival = yyvsp[0].ival;
-		;}
-    break;
-
-  case 21:
-#line 205 "rc1.0_grammar.y"
-    {
-			yyval.ival = yyvsp[0].ival;
-		;}
-    break;
-
-  case 22:
-#line 211 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[0].registerEnum, GL_SIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 23:
-#line 217 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[0].registerEnum, GL_SIGNED_NEGATE_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 24:
-#line 223 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_EXPAND_NORMAL_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 25:
-#line 229 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_EXPAND_NEGATE_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 26:
-#line 235 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_HALF_BIAS_NORMAL_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 27:
-#line 241 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_HALF_BIAS_NEGATE_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 28:
-#line 247 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 29:
-#line 253 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 30:
-#line 261 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 31:
-#line 267 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 32:
-#line 273 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 33:
-#line 279 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 34:
-#line 285 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 35:
-#line 291 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-2].opStruct, yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 36:
-#line 297 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[-2].opStruct, yyvsp[-1].opStruct, yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 37:
-#line 303 "rc1.0_grammar.y"
-    {
-			GeneralFunctionStruct generalFunction;
-			generalFunction.Init(yyvsp[0].opStruct);
-			yyval.generalFunctionStruct = generalFunction;
-		;}
-    break;
-
-  case 38:
-#line 311 "rc1.0_grammar.y"
-    {
-			OpStruct dotFunction;
-			dotFunction.Init(RCP_DOT, yyvsp[-5].registerEnum, yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
-			yyval.opStruct = dotFunction;
-		;}
-    break;
-
-  case 39:
-#line 319 "rc1.0_grammar.y"
-    {
-			OpStruct mulFunction;
-			mulFunction.Init(RCP_MUL, yyvsp[-5].registerEnum, yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
-			yyval.opStruct = mulFunction;
-		;}
-    break;
-
-  case 40:
-#line 325 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct one;
-			one.Init(zero, GL_UNSIGNED_INVERT_NV);
-			OpStruct mulFunction;
-			mulFunction.Init(RCP_MUL, yyvsp[-3].registerEnum, yyvsp[-1].mappedRegisterStruct, one);
-			yyval.opStruct = mulFunction;
-		;}
-    break;
-
-  case 41:
-#line 337 "rc1.0_grammar.y"
-    {
-			OpStruct muxFunction;
-			muxFunction.Init(RCP_MUX, yyvsp[-5].registerEnum);
-			yyval.opStruct = muxFunction;
-		;}
-    break;
-
-  case 42:
-#line 345 "rc1.0_grammar.y"
-    {
-			OpStruct sumFunction;
-			sumFunction.Init(RCP_SUM, yyvsp[-5].registerEnum);
-			yyval.opStruct = sumFunction;
-		;}
-    break;
-
-  case 43:
-#line 353 "rc1.0_grammar.y"
-    {
-			yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
-		;}
-    break;
-
-  case 44:
-#line 357 "rc1.0_grammar.y"
-    {
-			yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
-		;}
-    break;
-
-  case 45:
-#line 361 "rc1.0_grammar.y"
-    {
-			yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
-		;}
-    break;
-
-  case 46:
-#line 365 "rc1.0_grammar.y"
-    {
-			yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
-		;}
-    break;
-
-  case 47:
-#line 369 "rc1.0_grammar.y"
-    {
-			yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
-		;}
-    break;
-
-  case 48:
-#line 375 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[0].registerEnum, GL_UNSIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 49:
-#line 381 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 50:
-#line 387 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 51:
-#line 393 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[0].registerEnum);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 52:
-#line 399 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 53:
-#line 405 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 54:
-#line 411 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[0].registerEnum);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 55:
-#line 417 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 56:
-#line 423 "rc1.0_grammar.y"
-    {
-			MappedRegisterStruct reg;
-			reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
-			yyval.mappedRegisterStruct = reg;
-		;}
-    break;
-
-  case 57:
-#line 431 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, false);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 58:
-#line 437 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 59:
-#line 443 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, false, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 60:
-#line 449 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 61:
-#line 455 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true, yyvsp[-3].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 62:
-#line 462 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 63:
-#line 468 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 64:
-#line 474 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 65:
-#line 480 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 66:
-#line 486 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-3].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 67:
-#line 493 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, false);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 68:
-#line 501 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 69:
-#line 509 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, false, yyvsp[-1].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 70:
-#line 517 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true, yyvsp[-1].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 71:
-#line 525 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 72:
-#line 534 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 73:
-#line 542 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 74:
-#line 550 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false, yyvsp[-1].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 75:
-#line 558 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-1].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 76:
-#line 566 "rc1.0_grammar.y"
-    {
-			FinalCombinerStruct finalCombinerStruct;
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.ZeroOut();
-			finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
-			yyval.finalCombinerStruct = finalCombinerStruct;
-		;}
-    break;
-
-  case 77:
-#line 576 "rc1.0_grammar.y"
-    {
-			yyval.ival = yyvsp[-3].ival;
-		;}
-    break;
-
-  case 78:
-#line 582 "rc1.0_grammar.y"
-    {
-			FinalProductStruct finalProductStruct;
-			finalProductStruct.Init(yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
-			yyval.finalProductStruct = finalProductStruct;
-		;}
-    break;
-
-  case 79:
-#line 590 "rc1.0_grammar.y"
-    {
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-8].mappedRegisterStruct, yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 80:
-#line 596 "rc1.0_grammar.y"
-    {
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-2].mappedRegisterStruct, yyvsp[-10].mappedRegisterStruct);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 81:
-#line 602 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct reg;
-			reg.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-2].mappedRegisterStruct, reg);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 82:
-#line 612 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct reg1;
-			reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			MappedRegisterStruct reg2;
-			reg2.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct, reg1, reg2);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 83:
-#line 624 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct reg1;
-			reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-5].mappedRegisterStruct, yyvsp[-3].mappedRegisterStruct, reg1, yyvsp[-1].mappedRegisterStruct);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 84:
-#line 634 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct reg1;
-			reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			MappedRegisterStruct reg2;
-			reg2.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			MappedRegisterStruct reg3;
-			reg3.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(reg1, reg2, reg3, yyvsp[-1].mappedRegisterStruct);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 85:
-#line 648 "rc1.0_grammar.y"
-    {
-			RegisterEnum zero;
-			zero.word = RCP_ZERO;
-			MappedRegisterStruct reg2;
-			reg2.Init(zero, GL_UNSIGNED_INVERT_NV);
-			MappedRegisterStruct reg3;
-			reg3.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-			FinalRgbFunctionStruct finalRgbFunctionStruct;
-			finalRgbFunctionStruct.Init(yyvsp[-3].mappedRegisterStruct, reg2, reg3, yyvsp[-1].mappedRegisterStruct);
-			yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
-		;}
-    break;
-
-  case 86:
-#line 662 "rc1.0_grammar.y"
-    {
-			FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-			finalAlphaFunctionStruct.Init(yyvsp[-1].mappedRegisterStruct);
-			yyval.finalAlphaFunctionStruct = finalAlphaFunctionStruct;
-		;}
-    break;
-
-  case 87:
-#line 670 "rc1.0_grammar.y"
-    {
-			yyval.registerEnum = yyvsp[0].registerEnum;
-		;}
-    break;
-
-  case 88:
-#line 674 "rc1.0_grammar.y"
-    {
-			yyval.registerEnum = yyvsp[0].registerEnum;
-		;}
-    break;
-
-
-    }
-
-/* Line 999 of yacc.c.  */
-#line 2093 "_rc1.0_parser.c"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-
-
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (YYPACT_NINF < yyn && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  int yytype = YYTRANSLATE (yychar);
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("syntax error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[yytype]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[yytype]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("syntax error; also virtual memory exhausted");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror ("syntax error");
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      /* Return failure if at end of input.  */
-      if (yychar == YYEOF)
-        {
-	  /* Pop the error token.  */
-          YYPOPSTACK;
-	  /* Pop the rest of the stack.  */
-	  while (yyss < yyssp)
-	    {
-	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-	      yydestruct (yystos[*yyssp], yyvsp);
-	      YYPOPSTACK;
-	    }
-	  YYABORT;
-        }
-
-      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
-      yydestruct (yytoken, &yylval);
-      yychar = YYEMPTY;
-
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action.  |
-`----------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-      yydestruct (yystos[yystate], yyvsp);
-      yyvsp--;
-      yystate = *--yyssp;
-
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  YYDPRINTF ((stderr, "Shifting error token, "));
-
-  *++yyvsp = yylval;
-
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here.  |
-`----------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-  return yyresult;
-}
-
-
-#line 679 "rc1.0_grammar.y"
-
-void yyerror(const char* s)
-{
-     errors.set("unrecognized token");
-}
-

+ 0 - 161
CamelotRenderer/RenderSystemGL/Source/nvparse/_rc1.0_parser.h

@@ -1,161 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     regVariable = 258,
-     constVariable = 259,
-     color_sum = 260,
-     final_product = 261,
-     expandString = 262,
-     halfBiasString = 263,
-     unsignedString = 264,
-     unsignedInvertString = 265,
-     muxString = 266,
-     sumString = 267,
-     rgb_portion = 268,
-     alpha_portion = 269,
-     openParen = 270,
-     closeParen = 271,
-     openBracket = 272,
-     closeBracket = 273,
-     semicolon = 274,
-     comma = 275,
-     dot = 276,
-     times = 277,
-     minus = 278,
-     equals = 279,
-     plus = 280,
-     bias_by_negative_one_half_scale_by_two = 281,
-     bias_by_negative_one_half = 282,
-     scale_by_one_half = 283,
-     scale_by_two = 284,
-     scale_by_four = 285,
-     clamp_color_sum = 286,
-     lerp = 287,
-     fragment_rgb = 288,
-     fragment_alpha = 289,
-     floatValue = 290
-   };
-#endif
-#define regVariable 258
-#define constVariable 259
-#define color_sum 260
-#define final_product 261
-#define expandString 262
-#define halfBiasString 263
-#define unsignedString 264
-#define unsignedInvertString 265
-#define muxString 266
-#define sumString 267
-#define rgb_portion 268
-#define alpha_portion 269
-#define openParen 270
-#define closeParen 271
-#define openBracket 272
-#define closeBracket 273
-#define semicolon 274
-#define comma 275
-#define dot 276
-#define times 277
-#define minus 278
-#define equals 279
-#define plus 280
-#define bias_by_negative_one_half_scale_by_two 281
-#define bias_by_negative_one_half 282
-#define scale_by_one_half 283
-#define scale_by_two 284
-#define scale_by_four 285
-#define clamp_color_sum 286
-#define lerp 287
-#define fragment_rgb 288
-#define fragment_alpha 289
-#define floatValue 290
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 20 "rc1.0_grammar.y"
-typedef union YYSTYPE {
-  int ival;
-  float fval;
-  RegisterEnum registerEnum;
-  BiasScaleEnum biasScaleEnum;
-  MappedRegisterStruct mappedRegisterStruct;
-  ConstColorStruct constColorStruct;
-  GeneralPortionStruct generalPortionStruct;
-  GeneralFunctionStruct generalFunctionStruct;
-  OpStruct opStruct;
-  GeneralCombinerStruct generalCombinerStruct;
-  GeneralCombinersStruct generalCombinersStruct;
-  FinalProductStruct finalProductStruct;
-  FinalRgbFunctionStruct finalRgbFunctionStruct;
-  FinalAlphaFunctionStruct finalAlphaFunctionStruct;
-  FinalCombinerStruct finalCombinerStruct;
-  CombinersStruct combinersStruct;
-} YYSTYPE;
-/* Line 1240 of yacc.c.  */
-#line 125 "_rc1.0_parser.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE rc10_lval;
-
-
-

+ 0 - 2226
CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_lexer.cpp

@@ -1,2226 +0,0 @@
-#define yy_create_buffer ts10__create_buffer
-#define yy_delete_buffer ts10__delete_buffer
-#define yy_scan_buffer ts10__scan_buffer
-#define yy_scan_string ts10__scan_string
-#define yy_scan_bytes ts10__scan_bytes
-#define yy_flex_debug ts10__flex_debug
-#define yy_init_buffer ts10__init_buffer
-#define yy_flush_buffer ts10__flush_buffer
-#define yy_load_buffer_state ts10__load_buffer_state
-#define yy_switch_to_buffer ts10__switch_to_buffer
-#define yyin ts10_in
-#define yyleng ts10_leng
-#define yylex ts10_lex
-#define yyout ts10_out
-#define yyrestart ts10_restart
-#define yytext ts10_text
-#define yywrap ts10_wrap
-
-#line 20 "_ts1.0_lexer.cpp"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/shared/backups/ogre/cvs/ogrenew/RenderSystems/GL/src/nvparse/_ts1.0_lexer.cpp,v 1.5 2005-07-08 16:51:23 miathan6 Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-/* yyunput is never used */
-#define YY_NO_UNPUT
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 59
-#define YY_END_OF_BUFFER 60
-static yyconst short int yy_accept[404] =
-    {   0,
-        0,    0,   60,   59,   57,   56,   59,   59,    3,    4,
-        5,   59,    7,   59,   59,   55,    6,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   57,   56,    0,
-        0,    0,   55,   54,    1,    2,   53,   55,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,    0,
-       53,   58,   58,   58,   58,   58,   58,   15,   58,   58,
-       58,    0,   58,   58,   58,   58,   58,   58,   58,   58,
-        9,   10,   11,   58,    0,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,    0,   58,   58,   58,   58,   58,
-       12,   58,   58,   58,    8,   58,   58,   58,   58,   58,
-
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   24,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   16,   17,   19,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   27,   28,   58,   58,   58,   22,   58,   58,
-       58,   58,   21,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   13,   14,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   23,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-
-       58,   58,   26,   20,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   18,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   29,   30,   35,   36,
-       37,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   25,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       38,   39,   40,   58,   58,   58,   58,   58,   58,   58,
-       31,   32,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   33,   34,   58,   58,
-
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   44,   45,   46,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   41,
-       42,   43,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       50,   51,   52,   58,   58,   58,   58,   58,   58,   47,
-
-       48,   49,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    5,    1,    6,    1,    1,    1,    1,    7,
-        8,    9,   10,   11,   10,   12,   13,   14,   15,   16,
-       17,   18,   18,   18,   18,   18,   18,    1,   19,    1,
-        1,    1,    1,    1,   20,   21,   21,   21,   22,   21,
-       23,   24,   21,   21,   21,   25,   21,   26,   27,   21,
-       28,   29,   30,   31,   32,   21,   21,   21,   21,   33,
-        1,    1,    1,    1,   34,    1,   35,   36,   37,   38,
-
-       39,   40,   41,   42,   21,   21,   21,   43,   44,   45,
-       46,   47,   48,   49,   50,   51,   52,   21,   21,   53,
-       54,   21,    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,    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,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[55] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    2,    2,    2,    2,    2,    1,    2,
-        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
-        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
-        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
-        2,    2,    2,    2
-    } ;
-
-static yyconst short int yy_base[405] =
-    {   0,
-        0,    0,  844,  845,  841,  845,   52,  837,  845,  845,
-      845,   45,  845,   50,   60,   60,  845,  829,   58,   59,
-       46,   67,   70,   71,   72,   73,   75,  838,  845,   85,
-      808,   76,   85,  104,  845,  845,  110,  117,  826,   83,
-       74,   93,   95,   97,   98,  103,  104,  118,   84,  807,
-      137,  126,  127,  128,  131,  129,  134,  824,  135,  137,
-      150,  820,  147,  144,  148,  149,  160,  161,  163,  162,
-      822,  821,  820,  164,  819,  165,  167,  168,  171,  169,
-      172,  174,  176,  177,  816,  179,  180,  181,  183,  185,
-      817,  187,  191,  193,  845,  188,  200,  199,  202,  203,
-
-      212,  205,  211,  217,  223,  224,  225,  226,  228,  230,
-      227,  240,  234,  236,  231,  238,  246,  247,  248,  239,
-      241,  250,  252,  251,  255,  259,  262,  268,  270,  272,
-      274,  275,  281,  816,  815,  814,  284,  288,  286,  287,
-      285,  289,  292,  298,  290,  294,  300,  301,  302,  304,
-      305,  303,  813,  812,  319,  306,  307,  811,  309,  325,
-      332,  334,  810,  327,  333,  335,  336,  337,  338,  339,
-      346,  343,  809,  808,  350,  351,  355,  352,  357,  354,
-      358,  360,  361,  362,  388,  367,  370,  371,  374,  807,
-      377,  380,  386,  384,  395,  396,  397,  398,  399,  403,
-
-      400,  401,  402,  806,  407,  408,  411,  412,  413,  414,
-      406,  422,  416,  420,  419,  805,  443,  446,  448,  451,
-      454,  435,  425,  426,  427,  452,  804,  803,  802,  801,
-      800,  437,  460,  461,  463,  465,  464,  467,  468,  469,
-      470,  475,  473,  471,  474,  476,  481,  482,  483,  489,
-      484,  496,  497,  799,  490,  491,  505,  506,  509,  508,
-      510,  511,  520,  523,  524,  513,  512,  526,  527,  530,
-      798,  797,  796,  531,  536,  537,  543,  540,  546,  545,
-      795,  793,  551,  550,  553,  556,  557,  560,  561,  565,
-      559,  567,  562,  571,  570,  563,  791,  790,  564,  569,
-
-      576,  577,  579,  580,  582,  583,  584,  585,  586,  596,
-      599,  600,  601,  603,  604,  607,  608,  612,  613,  616,
-      617,  619,  618,  622,  623,  628,  626,  627,  629,  641,
-      642,  645,  647,  649,  652,  653,  656,  657,  665,  666,
-      668,  654,  655,  672,  674,  648,  789,  788,  787,  679,
-      683,  685,  686,  678,  687,  691,  693,  694,  695,  786,
-      785,  784,  697,  699,  700,  701,  702,  703,  704,  709,
-      712,  718,  720,  714,  721,  710,  715,  723,  728,  730,
-      716,  731,  733,  751,  753,  760,  763,  735,  743,  745,
-      783,  782,  781,  747,  764,  766,  767,  771,  773,  780,
-
-      774,  770,  845,  744
-    } ;
-
-static yyconst short int yy_def[405] =
-    {   0,
-      403,    1,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  404,  403,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  403,
-      403,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  403,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  403,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  403,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  403,  404,  404,  404,  404,  404,
-
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-
-      404,  404,    0,  403
-    } ;
-
-static yyconst short int yy_nxt[900] =
-    {   0,
-        4,    5,    6,    7,    8,    9,   10,   11,    4,   12,
-       13,   14,   15,   16,   16,   16,   16,   16,   17,   18,
-       18,   18,   19,   18,   20,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,   18,   18,   21,   22,   23,   18,
-       18,   18,   18,   18,   24,   25,   26,   18,   18,   18,
-       27,   18,   18,   18,   29,   30,   32,  403,   33,   33,
-       33,   33,   33,   34,   34,   34,   34,   34,   35,  403,
-      403,   37,   36,   38,   38,   38,   38,   38,  403,   40,
-       41,  403,  403,  403,  403,  403,  403,   29,   30,   34,
-       34,   34,   34,   34,  403,  403,   37,   42,   33,   33,
-
-       33,   33,   33,   53,  403,   43,  403,   48,  403,  403,
-       52,   47,   44,   49,  403,  403,   46,   34,   34,   34,
-       34,   34,   45,   51,   51,   51,   51,   51,   37,  403,
-       38,   38,   38,   38,   38,   54,   61,  403,  403,  403,
-      403,   55,  403,   59,   57,  403,  403,   56,  403,   58,
-       51,   51,   51,   51,   51,  403,   64,   63,  403,  403,
-      403,  403,   67,   71,   72,   73,   76,   60,   68,   66,
-       65,  403,  403,  403,  403,  403,  403,   77,  403,  403,
-      403,   78,  403,  403,   69,  403,   70,  403,  403,   86,
-      403,  403,  403,   79,  403,   83,  403,   87,  403,  403,
-
-       74,   82,  403,   97,  403,   81,   80,   88,   89,   91,
-      403,  403,   96,  403,  403,   84,  403,   90,  104,  105,
-      101,   99,  403,  403,   92,   94,   93,  109,  403,   98,
-      100,  103,  102,  106,  403,  403,  403,  403,  403,  403,
-      108,  403,  403,  113,  112,  403,  107,  403,  114,  403,
-      403,  403,  403,  111,  121,  122,  123,  403,  403,  403,
-      110,  403,  403,  403,  115,  118,  403,  126,  119,  127,
-      403,  129,  120,  403,  128,  116,  124,  117,  134,  403,
-      131,  403,  130,  403,  132,  403,  403,  135,  125,  136,
-      133,  139,  403,  138,  140,  403,  403,  403,  403,  403,
-
-      403,  403,  137,  403,  142,  403,  141,  150,  151,  403,
-      143,  403,  403,  403,  403,  403,  403,  403,  403,  148,
-      403,  147,  144,  145,  149,  146,  156,  154,  157,  152,
-      403,  155,  161,  162,  164,  165,  403,  153,  403,  159,
-      169,  158,  171,  403,  403,  403,  403,  403,  403,  403,
-      403,  170,  160,  163,  403,  166,  167,  403,  173,  172,
-      174,  403,  403,  403,  175,  403,  403,  168,  403,  403,
-      176,  403,  403,  403,  178,  179,  194,  195,  403,  181,
-      180,  403,  403,  184,  185,  403,  177,  183,  403,  182,
-      186,  403,  190,  188,  192,  403,  189,  403,  187,  403,
-
-      191,  193,  196,  197,  198,  199,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  203,  202,  403,  403,  403,
-      200,  201,  403,  403,  403,  403,  204,  403,  205,  206,
-      403,  403,  211,  403,  213,  215,  403,  403,  403,  214,
-      207,  208,  209,  210,  212,  216,  403,  217,  403,  222,
-      218,  219,  220,  221,  403,  223,  225,  403,  227,  403,
-      224,  228,  403,  403,  229,  403,  234,  230,  226,  232,
-      231,  403,  403,  233,  403,  403,  403,  235,  403,  403,
-      403,  403,  403,  237,  403,  403,  403,  403,  236,  247,
-      248,  249,  403,  403,  403,  403,  240,  242,  238,  241,
-
-      403,  403,  403,  239,  252,  245,  244,  403,  403,  250,
-      260,  261,  246,  243,  254,  251,  403,  403,  259,  403,
-      403,  403,  403,  403,  403,  253,  255,  256,  257,  263,
-      264,  403,  262,  258,  403,  403,  271,  403,  403,  272,
-      273,  403,  403,  266,  265,  267,  274,  403,  403,  270,
-      275,  403,  281,  268,  403,  269,  403,  403,  282,  285,
-      286,  403,  403,  278,  403,  276,  277,  403,  403,  280,
-      403,  403,  403,  403,  403,  403,  403,  297,  403,  279,
-      403,  403,  403,  283,  284,  287,  298,  403,  403,  288,
-      403,  403,  295,  403,  403,  403,  403,  403,  289,  301,
-
-      293,  290,  292,  291,  294,  296,  299,  403,  300,  302,
-      403,  403,  403,  307,  403,  403,  309,  306,  403,  403,
-      310,  305,  303,  403,  403,  312,  304,  403,  403,  403,
-      403,  308,  314,  403,  403,  311,  316,  403,  403,  403,
-      403,  317,  329,  330,  331,  319,  322,  313,  315,  318,
-      324,  326,  403,  403,  323,  321,  403,  328,  403,  403,
-      403,  320,  325,  403,  403,  403,  403,  403,  403,  327,
-      342,  343,  344,  333,  334,  332,  403,  403,  337,  403,
-      338,  347,  348,  403,  349,  403,  335,  336,  339,  403,
-      403,  340,  341,  345,  403,  346,  403,  403,  403,  350,
-
-      351,  354,  403,  360,  403,  403,  403,  361,  403,  362,
-      403,  403,  403,  403,  403,  403,  359,  352,  355,  353,
-      403,  403,  356,  403,  357,  403,  403,  403,  364,  403,
-      358,  403,  403,  367,  403,  377,  378,  379,  366,  403,
-      369,  403,  403,  363,  403,   39,  403,  365,  370,  368,
-      373,  374,  372,  375,  403,  385,  403,  371,  403,  380,
-      381,  376,  403,  384,  403,  388,  389,  390,  382,  391,
-      386,  403,  387,  383,  403,  403,  392,  403,  403,  393,
-      394,  403,  403,  400,  403,  403,  397,  401,  395,  402,
-      396,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-
-      403,  403,  403,  398,  403,  399,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,   95,
-       85,  403,  403,  403,   75,  403,   62,  403,   50,   28,
-      403,   31,   28,  403,    3,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403
-
-    } ;
-
-static yyconst short int yy_chk[900] =
-    {   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,    7,    7,   12,   21,   12,   12,
-       12,   12,   12,   14,   14,   14,   14,   14,   15,   19,
-       20,   16,   15,   16,   16,   16,   16,   16,   22,   19,
-       20,   23,   24,   25,   26,   41,   27,   30,   30,   32,
-       32,   32,   32,   32,   40,   49,   33,   21,   33,   33,
-
-       33,   33,   33,   41,   42,   22,   43,   26,   44,   45,
-       40,   25,   22,   27,   46,   47,   24,   34,   34,   34,
-       34,   34,   23,   37,   37,   37,   37,   37,   38,   48,
-       38,   38,   38,   38,   38,   42,   49,   52,   53,   54,
-       56,   43,   55,   47,   45,   57,   59,   44,   60,   46,
-       51,   51,   51,   51,   51,   64,   53,   52,   63,   65,
-       66,   61,   56,   61,   61,   61,   63,   48,   57,   55,
-       54,   67,   68,   70,   69,   74,   76,   64,   77,   78,
-       80,   65,   79,   81,   59,   82,   60,   83,   84,   76,
-       86,   87,   88,   66,   89,   70,   90,   77,   92,   96,
-
-       61,   69,   93,   87,   94,   68,   67,   78,   79,   81,
-       98,   97,   86,   99,  100,   74,  102,   80,   96,   97,
-       92,   89,  103,  101,   82,   84,   83,  101,  104,   88,
-       90,   94,   93,   98,  105,  106,  107,  108,  111,  109,
-      100,  110,  115,  104,  103,  113,   99,  114,  105,  116,
-      120,  112,  121,  102,  112,  112,  112,  117,  118,  119,
-      101,  122,  124,  123,  106,  109,  125,  113,  110,  114,
-      126,  116,  111,  127,  115,  107,  112,  108,  121,  128,
-      118,  129,  117,  130,  119,  131,  132,  122,  112,  123,
-      120,  126,  133,  125,  127,  137,  141,  139,  140,  138,
-
-      142,  145,  124,  143,  129,  146,  128,  139,  140,  144,
-      129,  147,  148,  149,  152,  150,  151,  156,  157,  137,
-      159,  133,  130,  131,  138,  132,  145,  143,  146,  141,
-      155,  144,  150,  151,  155,  155,  160,  142,  164,  148,
-      156,  147,  159,  161,  165,  162,  166,  167,  168,  169,
-      170,  157,  149,  152,  172,  155,  155,  171,  161,  160,
-      162,  175,  176,  178,  164,  180,  177,  155,  179,  181,
-      165,  182,  183,  184,  167,  168,  184,  184,  186,  170,
-      169,  187,  188,  175,  176,  189,  166,  172,  191,  171,
-      177,  192,  180,  179,  182,  194,  179,  193,  178,  185,
-
-      181,  183,  185,  185,  185,  186,  195,  196,  197,  198,
-      199,  201,  202,  203,  200,  191,  189,  211,  205,  206,
-      187,  188,  207,  208,  209,  210,  192,  213,  193,  194,
-      215,  214,  199,  212,  201,  203,  223,  224,  225,  202,
-      195,  196,  197,  198,  200,  205,  222,  206,  232,  211,
-      207,  208,  209,  210,  217,  212,  214,  218,  217,  219,
-      213,  218,  220,  226,  219,  221,  224,  220,  215,  222,
-      221,  233,  234,  223,  235,  237,  236,  225,  238,  239,
-      240,  241,  244,  232,  243,  245,  242,  246,  226,  242,
-      242,  242,  247,  248,  249,  251,  235,  237,  233,  236,
-
-      250,  255,  256,  234,  244,  240,  239,  252,  253,  242,
-      252,  252,  241,  238,  246,  243,  257,  258,  251,  260,
-      259,  261,  262,  267,  266,  245,  247,  248,  249,  255,
-      256,  263,  253,  250,  264,  265,  263,  268,  269,  264,
-      265,  270,  274,  258,  257,  259,  266,  275,  276,  262,
-      267,  278,  276,  260,  277,  261,  280,  279,  277,  280,
-      280,  284,  283,  270,  285,  268,  269,  286,  287,  275,
-      291,  288,  289,  293,  296,  299,  290,  293,  292,  274,
-      300,  295,  294,  278,  279,  283,  294,  301,  302,  284,
-      303,  304,  291,  305,  306,  307,  308,  309,  285,  296,
-
-      289,  286,  288,  287,  290,  292,  295,  310,  295,  299,
-      311,  312,  313,  304,  314,  315,  306,  303,  316,  317,
-      307,  302,  300,  318,  319,  309,  301,  320,  321,  323,
-      322,  305,  311,  324,  325,  308,  313,  327,  328,  326,
-      329,  314,  326,  326,  326,  316,  319,  310,  312,  315,
-      321,  323,  330,  331,  320,  318,  332,  325,  333,  346,
-      334,  317,  322,  335,  336,  342,  343,  337,  338,  324,
-      337,  337,  337,  328,  329,  327,  339,  340,  332,  341,
-      333,  339,  340,  344,  341,  345,  330,  331,  334,  354,
-      350,  335,  336,  338,  351,  338,  352,  353,  355,  342,
-
-      343,  346,  356,  355,  357,  358,  359,  356,  363,  357,
-      364,  365,  366,  367,  368,  369,  354,  344,  350,  345,
-      370,  376,  351,  371,  352,  374,  377,  381,  359,  372,
-      353,  373,  375,  365,  378,  375,  375,  375,  364,  379,
-      367,  380,  382,  358,  383,  404,  388,  363,  368,  366,
-      371,  372,  370,  373,  389,  381,  390,  369,  394,  376,
-      377,  374,  384,  380,  385,  384,  384,  384,  378,  385,
-      382,  386,  383,  379,  387,  395,  386,  396,  397,  387,
-      388,  402,  398,  397,  399,  401,  394,  398,  389,  399,
-      390,  400,  393,  392,  391,  362,  361,  360,  349,  348,
-
-      347,  298,  297,  395,  282,  396,  281,  273,  272,  271,
-      254,  231,  230,  229,  228,  227,  216,  204,  190,  174,
-      173,  163,  158,  154,  153,  136,  135,  134,   91,   85,
-       75,   73,   72,   71,   62,   58,   50,   39,   31,   28,
-       18,    8,    5,    3,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403
-
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "ts1.0_tokens.l"
-#define INITIAL 0
-/* definitions */
-#line 7 "ts1.0_tokens.l"
-#include <stdlib.h>
-#include "ts1.0_inst.h"
-#include "ts1.0_inst_list.h"
-#include "_ts1.0_parser.h"
-#ifdef _WIN32
-#  define WIN32_LEAN_AND_MEAN
-#  if !defined(NOMINMAX) && defined(_MSC_VER)
-#	define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#  include <windows.h>
-#endif
-#include <GL/glew.h>
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-
-#define YY_INPUT(buf,result,max_size) \
-{ \
-	int c = *myin++; \
-	result = (c == 0) ? YY_NULL : (buf[0] = c, 1); \
-}
-
-#define YY_ALWAYS_INTERACTIVE 1
-
-/* end of definitions */
-#line 738 "_ts1.0_lexer.cpp"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 29 "ts1.0_tokens.l"
-
-
-#line 892 "_ts1.0_lexer.cpp"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 404 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 845 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 31 "ts1.0_tokens.l"
-{
-			    A:
-				switch (yyinput()) {
-				  case '*': goto B;
-				  case 0: errors.set("end-of-file in comment", line_number); break;
-				  case '\n': line_number++;
-				  default:  goto A;
-				}
-			    B:
-				switch (yyinput()) {
-				  case '*': goto B;
-				  case '/': break;
-				  case 0: errors.set("end-of-file in comment", line_number); break;
-				  case '\n': line_number++;
-				  default:  goto A;
-				}
-			}
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 49 "ts1.0_tokens.l"
-{
-			    char ch;
-			    while ((ch = yyinput()) != '\n');
-			    if (ch == '\n') line_number++;
-			}
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 55 "ts1.0_tokens.l"
-{
-			    char ch;
-			    while ((ch = yyinput()) != '\n');
-			    if (ch == '\n') line_number++;
-			}
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 61 "ts1.0_tokens.l"
-return(openParen);
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 62 "ts1.0_tokens.l"
-return(closeParen);
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 63 "ts1.0_tokens.l"
-return(semicolon);
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 64 "ts1.0_tokens.l"
-return(comma);
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 66 "ts1.0_tokens.l"
-{ /* eat header */ }
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 68 "ts1.0_tokens.l"
-{
-			    ts10_lval.fval = (float)0;
-			    return(texVariable);
-			}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 73 "ts1.0_tokens.l"
-{
-			    ts10_lval.fval = (float)1;
-			    return(texVariable);
-			}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 78 "ts1.0_tokens.l"
-{
-			    ts10_lval.fval = (float)2;
-			    return(texVariable);
-			}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 83 "ts1.0_tokens.l"
-return(expandString);
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 85 "ts1.0_tokens.l"
-{
-				ts10_lval.fval = (float)GL_GEQUAL;
-				return (gequal);
-			}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 90 "ts1.0_tokens.l"
-{
-				ts10_lval.fval = (float)GL_LESS;
-				return(less);
-			}
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 95 "ts1.0_tokens.l"
-return(nop);
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 96 "ts1.0_tokens.l"
-return(texture_1d);
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 97 "ts1.0_tokens.l"
-return(texture_2d);
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 98 "ts1.0_tokens.l"
-return(texture_rectangle);
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 99 "ts1.0_tokens.l"
-return(texture_3d);
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 100 "ts1.0_tokens.l"
-return(texture_cube_map);
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 101 "ts1.0_tokens.l"
-return(cull_fragment);
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 102 "ts1.0_tokens.l"
-return(pass_through);
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 103 "ts1.0_tokens.l"
-return(offset_2d_scale);
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 104 "ts1.0_tokens.l"
-return(offset_2d);
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 105 "ts1.0_tokens.l"
-return(offset_rectangle_scale);
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 106 "ts1.0_tokens.l"
-return(offset_rectangle);
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 107 "ts1.0_tokens.l"
-return(dependent_ar);
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 108 "ts1.0_tokens.l"
-return(dependent_gb);
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 110 "ts1.0_tokens.l"
-return(dot_product_2d_1of2);
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 111 "ts1.0_tokens.l"
-return(dot_product_2d_2of2);
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 113 "ts1.0_tokens.l"
-return(dot_product_rectangle_1of2);
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 114 "ts1.0_tokens.l"
-return(dot_product_rectangle_2of2);
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 116 "ts1.0_tokens.l"
-return(dot_product_depth_replace_1of2);
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 117 "ts1.0_tokens.l"
-return(dot_product_depth_replace_2of2);
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 119 "ts1.0_tokens.l"
-return(dot_product_3d_1of3);
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 120 "ts1.0_tokens.l"
-return(dot_product_3d_2of3);
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 121 "ts1.0_tokens.l"
-return(dot_product_3d_3of3);
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 123 "ts1.0_tokens.l"
-return(dot_product_cube_map_1of3);
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 124 "ts1.0_tokens.l"
-return(dot_product_cube_map_2of3);
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 125 "ts1.0_tokens.l"
-return(dot_product_cube_map_3of3);
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 127 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_eye_from_qs_1of3);
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 128 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_eye_from_qs_2of3);
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 129 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_eye_from_qs_3of3);
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 131 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_const_eye_1of3);
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 132 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_const_eye_2of3);
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 133 "ts1.0_tokens.l"
-return(dot_product_reflect_cube_map_const_eye_3of3);
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 135 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3);
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 136 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3);
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 137 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3);
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 139 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_const_eye_1of3);
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 140 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_const_eye_2of3);
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 141 "ts1.0_tokens.l"
-return(dot_product_cube_map_and_reflect_cube_map_const_eye_3of3);
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 143 "ts1.0_tokens.l"
-{
-				ts10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 148 "ts1.0_tokens.l"
-{
-				ts10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 153 "ts1.0_tokens.l"
-{
-				ts10_lval.fval = (float)atof(yytext);
-				return(floatValue);
-			}
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 158 "ts1.0_tokens.l"
-{
-				line_number++;
-			}
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 162 "ts1.0_tokens.l"
-{}
-	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 164 "ts1.0_tokens.l"
-{
-				errors.set("unrecognized token", line_number);
-			}
-	YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 169 "ts1.0_tokens.l"
-ECHO;
-	YY_BREAK
-#line 1322 "_ts1.0_lexer.cpp"
-case YY_STATE_EOF(INITIAL):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 404 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 404 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 403);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 169 "ts1.0_tokens.l"
-
-
-bool ts10_init_more();
-
-bool ts10_init(char* inputString)
-{
-    myin = inputString;
-	return ts10_init_more();
-}
-
-
-#ifndef ts10_wrap
-int ts10_wrap(void)
-{
-  return(1);
-}
-#endif

+ 0 - 1841
CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_parser.cpp

@@ -1,1841 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Written by Richard Stallman by simplifying the original so called
-   ``semantic'' parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-#include <CmGLPrerequisites.h>
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* If NAME_PREFIX is specified substitute the variables and functions
-   names.  */
-#define yyparse ts10_parse
-#define yylex   ts10_lex
-#define yyerror ts10_error
-#define yylval  ts10_lval
-#define yychar  ts10_char
-#define yydebug ts10_debug
-#define yynerrs ts10_nerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     floatValue = 258,
-     gequal = 259,
-     less = 260,
-     texVariable = 261,
-     expandString = 262,
-     openParen = 263,
-     closeParen = 264,
-     semicolon = 265,
-     comma = 266,
-     nop = 267,
-     texture_1d = 268,
-     texture_2d = 269,
-     texture_rectangle = 270,
-     texture_3d = 271,
-     texture_cube_map = 272,
-     cull_fragment = 273,
-     pass_through = 274,
-     offset_2d_scale = 275,
-     offset_2d = 276,
-     offset_rectangle_scale = 277,
-     offset_rectangle = 278,
-     dependent_ar = 279,
-     dependent_gb = 280,
-     dot_product_2d_1of2 = 281,
-     dot_product_2d_2of2 = 282,
-     dot_product_rectangle_1of2 = 283,
-     dot_product_rectangle_2of2 = 284,
-     dot_product_depth_replace_1of2 = 285,
-     dot_product_depth_replace_2of2 = 286,
-     dot_product_3d_1of3 = 287,
-     dot_product_3d_2of3 = 288,
-     dot_product_3d_3of3 = 289,
-     dot_product_cube_map_1of3 = 290,
-     dot_product_cube_map_2of3 = 291,
-     dot_product_cube_map_3of3 = 292,
-     dot_product_reflect_cube_map_eye_from_qs_1of3 = 293,
-     dot_product_reflect_cube_map_eye_from_qs_2of3 = 294,
-     dot_product_reflect_cube_map_eye_from_qs_3of3 = 295,
-     dot_product_reflect_cube_map_const_eye_1of3 = 296,
-     dot_product_reflect_cube_map_const_eye_2of3 = 297,
-     dot_product_reflect_cube_map_const_eye_3of3 = 298,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 = 299,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 = 300,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 = 301,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 = 302,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 = 303,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 = 304
-   };
-#endif
-#define floatValue 258
-#define gequal 259
-#define less 260
-#define texVariable 261
-#define expandString 262
-#define openParen 263
-#define closeParen 264
-#define semicolon 265
-#define comma 266
-#define nop 267
-#define texture_1d 268
-#define texture_2d 269
-#define texture_rectangle 270
-#define texture_3d 271
-#define texture_cube_map 272
-#define cull_fragment 273
-#define pass_through 274
-#define offset_2d_scale 275
-#define offset_2d 276
-#define offset_rectangle_scale 277
-#define offset_rectangle 278
-#define dependent_ar 279
-#define dependent_gb 280
-#define dot_product_2d_1of2 281
-#define dot_product_2d_2of2 282
-#define dot_product_rectangle_1of2 283
-#define dot_product_rectangle_2of2 284
-#define dot_product_depth_replace_1of2 285
-#define dot_product_depth_replace_2of2 286
-#define dot_product_3d_1of3 287
-#define dot_product_3d_2of3 288
-#define dot_product_3d_3of3 289
-#define dot_product_cube_map_1of3 290
-#define dot_product_cube_map_2of3 291
-#define dot_product_cube_map_3of3 292
-#define dot_product_reflect_cube_map_eye_from_qs_1of3 293
-#define dot_product_reflect_cube_map_eye_from_qs_2of3 294
-#define dot_product_reflect_cube_map_eye_from_qs_3of3 295
-#define dot_product_reflect_cube_map_const_eye_1of3 296
-#define dot_product_reflect_cube_map_const_eye_2of3 297
-#define dot_product_reflect_cube_map_const_eye_3of3 298
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 299
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 300
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 301
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 302
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 303
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 304
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 3 "ts1.0_grammar.y"
-
-void yyerror(const char* s);
-int yylex ( void );
-
-#ifdef _WIN32
-#  define WIN32_LEAN_AND_MEAN
-#  if !defined(NOMINMAX) && defined(_MSC_VER)
-#	define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#  include <windows.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include "ts1.0_inst.h"
-#include "ts1.0_inst_list.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 18 "ts1.0_grammar.y"
-typedef union YYSTYPE {
-  float fval;
-  InstPtr inst;
-  InstListPtr instList;
-  MappedVariablePtr variable;
-} YYSTYPE;
-/* Line 191 of yacc.c.  */
-#line 205 "_ts1.0_parser.c"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 214 of yacc.c.  */
-#line 217 "_ts1.0_parser.c"
-
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-
-
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  short yyss;
-  YYSTYPE yyvs;
-  };
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-#if defined (__STDC__) || defined (__cplusplus)
-   typedef signed char yysigned_char;
-#else
-   typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL  80
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   223
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  50
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  6
-/* YYNRULES -- Number of rules. */
-#define YYNRULES  46
-/* YYNRULES -- Number of states. */
-#define YYNSTATES  218
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   304
-
-#define YYTRANSLATE(YYX) 						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const unsigned char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     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,     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
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const unsigned short yyprhs[] =
-{
-       0,     0,     3,     5,     9,    12,    17,    19,    23,    27,
-      31,    35,    39,    43,    54,    58,    75,    88,   105,   118,
-     123,   128,   133,   138,   143,   148,   153,   158,   163,   168,
-     173,   178,   183,   188,   193,   198,   203,   214,   219,   224,
-     229,   234,   239,   250,   255,   260,   262
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
-{
-      51,     0,    -1,    52,    -1,    52,    54,    10,    -1,    54,
-      10,    -1,     7,     8,     6,     9,    -1,     6,    -1,    12,
-       8,     9,    -1,    13,     8,     9,    -1,    14,     8,     9,
-      -1,    15,     8,     9,    -1,    16,     8,     9,    -1,    17,
-       8,     9,    -1,    18,     8,    55,    11,    55,    11,    55,
-      11,    55,     9,    -1,    19,     8,     9,    -1,    20,     8,
-       6,    11,     3,    11,     3,    11,     3,    11,     3,    11,
-       3,    11,     3,     9,    -1,    21,     8,     6,    11,     3,
-      11,     3,    11,     3,    11,     3,     9,    -1,    22,     8,
-       6,    11,     3,    11,     3,    11,     3,    11,     3,    11,
-       3,    11,     3,     9,    -1,    23,     8,     6,    11,     3,
-      11,     3,    11,     3,    11,     3,     9,    -1,    24,     8,
-       6,     9,    -1,    25,     8,     6,     9,    -1,    26,     8,
-      53,     9,    -1,    27,     8,    53,     9,    -1,    28,     8,
-      53,     9,    -1,    29,     8,    53,     9,    -1,    30,     8,
-      53,     9,    -1,    31,     8,    53,     9,    -1,    32,     8,
-      53,     9,    -1,    33,     8,    53,     9,    -1,    34,     8,
-      53,     9,    -1,    35,     8,    53,     9,    -1,    36,     8,
-      53,     9,    -1,    37,     8,    53,     9,    -1,    38,     8,
-      53,     9,    -1,    39,     8,    53,     9,    -1,    40,     8,
-      53,     9,    -1,    41,     8,    53,    11,     3,    11,     3,
-      11,     3,     9,    -1,    42,     8,    53,     9,    -1,    43,
-       8,    53,     9,    -1,    44,     8,    53,     9,    -1,    45,
-       8,    53,     9,    -1,    46,     8,    53,     9,    -1,    47,
-       8,    53,    11,     3,    11,     3,    11,     3,     9,    -1,
-      48,     8,    53,     9,    -1,    49,     8,    53,     9,    -1,
-       4,    -1,     5,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const unsigned short yyrline[] =
-{
-       0,    73,    73,    81,    87,    97,   103,   111,   115,   119,
-     123,   127,   131,   135,   139,   143,   147,   151,   155,   159,
-     163,   167,   172,   177,   182,   187,   192,   197,   202,   207,
-     212,   217,   222,   227,   232,   237,   242,   247,   252,   257,
-     262,   267,   272,   277,   282,   289,   293
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "floatValue", "gequal", "less", 
-  "texVariable", "expandString", "openParen", "closeParen", "semicolon", 
-  "comma", "nop", "texture_1d", "texture_2d", "texture_rectangle", 
-  "texture_3d", "texture_cube_map", "cull_fragment", "pass_through", 
-  "offset_2d_scale", "offset_2d", "offset_rectangle_scale", 
-  "offset_rectangle", "dependent_ar", "dependent_gb", 
-  "dot_product_2d_1of2", "dot_product_2d_2of2", 
-  "dot_product_rectangle_1of2", "dot_product_rectangle_2of2", 
-  "dot_product_depth_replace_1of2", "dot_product_depth_replace_2of2", 
-  "dot_product_3d_1of3", "dot_product_3d_2of3", "dot_product_3d_3of3", 
-  "dot_product_cube_map_1of3", "dot_product_cube_map_2of3", 
-  "dot_product_cube_map_3of3", 
-  "dot_product_reflect_cube_map_eye_from_qs_1of3", 
-  "dot_product_reflect_cube_map_eye_from_qs_2of3", 
-  "dot_product_reflect_cube_map_eye_from_qs_3of3", 
-  "dot_product_reflect_cube_map_const_eye_1of3", 
-  "dot_product_reflect_cube_map_const_eye_2of3", 
-  "dot_product_reflect_cube_map_const_eye_3of3", 
-  "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3", 
-  "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3", 
-  "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3", 
-  "dot_product_cube_map_and_reflect_cube_map_const_eye_1of3", 
-  "dot_product_cube_map_and_reflect_cube_map_const_eye_2of3", 
-  "dot_product_cube_map_and_reflect_cube_map_const_eye_3of3", "$accept", 
-  "WholeEnchilada", "InstListDesc", "MappedVariableDesc", "InstDesc", 
-  "CondDesc", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const unsigned short yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   304
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const unsigned char yyr1[] =
-{
-       0,    50,    51,    52,    52,    53,    53,    54,    54,    54,
-      54,    54,    54,    54,    54,    54,    54,    54,    54,    54,
-      54,    54,    54,    54,    54,    54,    54,    54,    54,    54,
-      54,    54,    54,    54,    54,    54,    54,    54,    54,    54,
-      54,    54,    54,    54,    54,    55,    55
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const unsigned char yyr2[] =
-{
-       0,     2,     1,     3,     2,     4,     1,     3,     3,     3,
-       3,     3,     3,    10,     3,    16,    12,    16,    12,     4,
-       4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
-       4,     4,     4,     4,     4,     4,    10,     4,     4,     4,
-       4,     4,    10,     4,     4,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const unsigned char yydefact[] =
-{
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       2,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,     0,     4,     7,     8,     9,    10,    11,    12,    45,
-      46,     0,    14,     0,     0,     0,     0,     0,     0,     6,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     3,     0,     0,     0,     0,
-       0,    19,    20,     0,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,     0,
-      37,    38,    39,    40,    41,     0,    43,    44,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     5,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    13,     0,     0,     0,     0,
-      36,    42,     0,     0,     0,     0,     0,    16,     0,    18,
-       0,     0,     0,     0,     0,     0,    15,    17
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
-{
-      -1,    39,    40,   101,    41,    91
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -127
-static const short yypact[] =
-{
-     -11,    31,    35,    39,    40,    41,    42,    43,    44,    45,
-      46,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    98,   107,
-     -11,    36,    99,   100,   101,   102,   103,   104,    37,   105,
-     109,   110,   111,   112,   113,   114,    38,    38,    38,    38,
-      38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
-      38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
-    -127,   115,  -127,  -127,  -127,  -127,  -127,  -127,  -127,  -127,
-    -127,   116,  -127,   117,   118,   119,   120,   123,   124,  -127,
-     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
-     136,   137,   138,   139,   140,   141,   142,   143,   145,   146,
-     147,   148,   149,   150,   152,  -127,    37,   121,   155,   159,
-     160,  -127,  -127,   158,  -127,  -127,  -127,  -127,  -127,  -127,
-    -127,  -127,  -127,  -127,  -127,  -127,  -127,  -127,  -127,   162,
-    -127,  -127,  -127,  -127,  -127,   163,  -127,  -127,   156,   157,
-     161,   164,   165,   168,   167,   169,    37,   166,   170,   171,
-     176,  -127,   178,   179,   172,   173,   174,   175,   177,   180,
-     181,    37,   184,   186,   187,   190,   191,   192,   188,   185,
-     189,   193,   194,   197,   198,  -127,   195,   196,   199,   200,
-    -127,  -127,   201,   202,   203,   204,   205,  -127,   206,  -127,
-     207,   208,   212,   213,   211,   214,  -127,  -127
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const short yypgoto[] =
-{
-    -127,  -127,  -127,    -1,   182,  -126
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
-{
-     158,     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,    42,
-     174,    89,    90,    43,    99,   100,    82,    44,    45,    46,
-      47,    48,    49,    50,    51,   188,   102,   103,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    83,    84,
-      85,    86,    87,    88,    92,    93,    94,    95,    96,    97,
-      98,     0,     0,     0,   159,   125,     0,   126,   127,   128,
-     129,   130,   131,   132,   133,     0,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
-     148,     0,   150,   149,   151,   152,   153,   154,   160,   156,
-     155,   157,   161,   162,   163,   164,   165,   166,   167,   175,
-       0,     0,   168,   176,   177,   169,   170,   171,   172,   178,
-     173,   179,   180,   181,   182,   183,   184,   189,   185,   190,
-     191,   186,   187,   192,   193,   194,   196,   195,   202,   203,
-     197,     0,   204,   205,   198,   199,   200,   201,   210,   211,
-       0,   207,   206,   209,   208,   214,   215,     0,   212,   213,
-     216,     0,    81,   217
-};
-
-static const short yycheck[] =
-{
-     126,    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,     8,
-     166,     4,     5,     8,     6,     7,    10,     8,     8,     8,
-       8,     8,     8,     8,     8,   181,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,     8,
-       8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
-       8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
-       8,     8,     8,     8,     8,     8,     8,     0,     9,     9,
-       9,     9,     9,     9,     9,     6,     6,     6,     6,     6,
-       6,    -1,    -1,    -1,     3,    10,    -1,    11,    11,    11,
-      11,    11,     9,     9,     8,    -1,     9,     9,     9,     9,
-       9,     9,     9,     9,     9,     9,     9,     9,     9,     9,
-       9,    -1,     9,    11,     9,     9,     9,     9,     3,     9,
-      11,     9,     3,     3,     6,     3,     3,    11,    11,     3,
-      -1,    -1,    11,     3,     3,    11,    11,     9,    11,     3,
-      11,     3,     3,    11,    11,    11,    11,     3,    11,     3,
-       3,    11,    11,     3,     3,     3,    11,     9,     3,     3,
-      11,    -1,     3,     3,    11,    11,     9,     9,     3,     3,
-      -1,     9,    11,     9,    11,     3,     3,    -1,    11,    11,
-       9,    -1,    40,     9
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const unsigned char yystos[] =
-{
-       0,    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,    51,
-      52,    54,     8,     8,     8,     8,     8,     8,     8,     8,
-       8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
-       8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
-       8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
-       0,    54,    10,     9,     9,     9,     9,     9,     9,     4,
-       5,    55,     9,     6,     6,     6,     6,     6,     6,     6,
-       7,    53,    53,    53,    53,    53,    53,    53,    53,    53,
-      53,    53,    53,    53,    53,    53,    53,    53,    53,    53,
-      53,    53,    53,    53,    53,    10,    11,    11,    11,    11,
-      11,     9,     9,     8,     9,     9,     9,     9,     9,     9,
-       9,     9,     9,     9,     9,     9,     9,     9,     9,    11,
-       9,     9,     9,     9,     9,    11,     9,     9,    55,     3,
-       3,     3,     3,     6,     3,     3,    11,    11,    11,    11,
-      11,     9,    11,    11,    55,     3,     3,     3,     3,     3,
-       3,    11,    11,    11,    11,    11,    11,    11,    55,     3,
-       3,     3,     3,     3,     3,     9,    11,    11,    11,    11,
-       9,     9,     3,     3,     3,     3,    11,     9,    11,     9,
-       3,     3,    11,    11,     3,     3,     9,     9
-};
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrlab1
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");\
-      YYERROR;							\
-    }								\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)         \
-  Current.first_line   = Rhs[1].first_line;      \
-  Current.first_column = Rhs[1].first_column;    \
-  Current.last_line    = Rhs[N].last_line;       \
-  Current.last_column  = Rhs[N].last_column;
-#endif
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
-
-# define YYDSYMPRINT(Args)			\
-do {						\
-  if (yydebug)					\
-    yysymprint Args;				\
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location)		\
-do {								\
-  if (yydebug)							\
-    {								\
-      YYFPRINTF (stderr, "%s ", Title);				\
-      yysymprint (stderr, 					\
-                  Token, Value);	\
-      YYFPRINTF (stderr, "\n");					\
-    }								\
-} while (0)
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded).                                                   |
-`------------------------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_stack_print (short *bottom, short *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    short *bottom;
-    short *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (/* Nothing. */; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_reduce_print (int yyrule)
-#else
-static void
-yy_reduce_print (yyrule)
-    int yyrule;
-#endif
-{
-  int yyi;
-  unsigned int yylineno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
-             yyrule - 1, yylineno);
-  /* Print the symbols being reduced, and their result.  */
-  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
-    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
-  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (Rule);		\
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-#   else
-yystrlen (yystr)
-     const char *yystr;
-#   endif
-{
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
-    continue;
-
-  return yys - yystr - 1;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-#   if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-#   else
-yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
-{
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-#endif /* !YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  switch (yytype)
-    {
-      default:
-        break;
-    }
-  YYFPRINTF (yyoutput, ")");
-}
-
-#endif /* ! YYDEBUG */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yytype, yyvaluep)
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  switch (yytype)
-    {
-
-      default:
-        break;
-    }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM);
-# else
-int yyparse ();
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
-  void *YYPARSE_PARAM;
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK   (yyvsp--, yyssp--)
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule.  */
-  int yylen;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack. Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
-
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyoverflowlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	short *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-#line 74 "ts1.0_grammar.y"
-    {
-			yyvsp[0].instList->Validate();
-			yyvsp[0].instList->Invoke();
-		    delete yyvsp[0].instList;
-		;}
-    break;
-
-  case 3:
-#line 82 "ts1.0_grammar.y"
-    {
-		    *(yyvsp[-2].instList) += yyvsp[-1].inst;
-			delete yyvsp[-1].inst;
-		    yyval.instList = yyvsp[-2].instList;
-		;}
-    break;
-
-  case 4:
-#line 88 "ts1.0_grammar.y"
-    {
-		    InstListPtr instList = new InstList;
-		    *instList += yyvsp[-1].inst;
-			delete yyvsp[-1].inst;
-		    yyval.instList = instList;
-		;}
-    break;
-
-  case 5:
-#line 98 "ts1.0_grammar.y"
-    {
-			yyval.variable = new MappedVariable;
-			yyval.variable->var = yyvsp[-1].fval;
-			yyval.variable->expand = true;
-		;}
-    break;
-
-  case 6:
-#line 104 "ts1.0_grammar.y"
-    {
-			yyval.variable = new MappedVariable;
-			yyval.variable->var = yyvsp[0].fval;
-			yyval.variable->expand = false;
-		;}
-    break;
-
-  case 7:
-#line 112 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_NOP);
-		;}
-    break;
-
-  case 8:
-#line 116 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_TEXTURE_1D);
-		;}
-    break;
-
-  case 9:
-#line 120 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_TEXTURE_2D);
-		;}
-    break;
-
-  case 10:
-#line 124 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_TEXTURE_RECTANGLE);
-		;}
-    break;
-
-  case 11:
-#line 128 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_TEXTURE_3D);
-		;}
-    break;
-
-  case 12:
-#line 132 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_TEXTURE_CUBE_MAP);
-		;}
-    break;
-
-  case 13:
-#line 136 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_CULL_FRAGMENT, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 14:
-#line 140 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_PASS_THROUGH);
-		;}
-    break;
-
-  case 15:
-#line 144 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_OFFSET_2D_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 16:
-#line 148 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_OFFSET_2D, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 17:
-#line 152 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_OFFSET_RECTANGLE_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 18:
-#line 156 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_OFFSET_RECTANGLE, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 19:
-#line 160 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DEPENDENT_AR, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 20:
-#line 164 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DEPENDENT_GB, yyvsp[-1].fval);
-		;}
-    break;
-
-  case 21:
-#line 168 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_1_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 22:
-#line 173 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_2_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 23:
-#line 178 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_1_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 24:
-#line 183 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_2_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 25:
-#line 188 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_1_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 26:
-#line 193 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_2_OF_2, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 27:
-#line 198 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_1_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 28:
-#line 203 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 29:
-#line 208 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 30:
-#line 213 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_1_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 31:
-#line 218 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 32:
-#line 223 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 33:
-#line 228 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 34:
-#line 233 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 35:
-#line 238 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 36:
-#line 243 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-			delete yyvsp[-7].variable;
-		;}
-    break;
-
-  case 37:
-#line 248 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 38:
-#line 253 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 39:
-#line 258 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 40:
-#line 263 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 41:
-#line 268 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 42:
-#line 273 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
-			delete yyvsp[-7].variable;
-		;}
-    break;
-
-  case 43:
-#line 278 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 44:
-#line 283 "ts1.0_grammar.y"
-    {
-		    yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
-			delete yyvsp[-1].variable;
-		;}
-    break;
-
-  case 45:
-#line 290 "ts1.0_grammar.y"
-    {
-			yyval.fval = yyvsp[0].fval;
-		;}
-    break;
-
-  case 46:
-#line 294 "ts1.0_grammar.y"
-    {
-			yyval.fval = yyvsp[0].fval;
-		;}
-    break;
-
-
-    }
-
-/* Line 999 of yacc.c.  */
-#line 1610 "_ts1.0_parser.c"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-
-
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (YYPACT_NINF < yyn && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  int yytype = YYTRANSLATE (yychar);
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("syntax error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[yytype]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[yytype]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("syntax error; also virtual memory exhausted");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror ("syntax error");
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      /* Return failure if at end of input.  */
-      if (yychar == YYEOF)
-        {
-	  /* Pop the error token.  */
-          YYPOPSTACK;
-	  /* Pop the rest of the stack.  */
-	  while (yyss < yyssp)
-	    {
-	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-	      yydestruct (yystos[*yyssp], yyvsp);
-	      YYPOPSTACK;
-	    }
-	  YYABORT;
-        }
-
-      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
-      yydestruct (yytoken, &yylval);
-      yychar = YYEMPTY;
-
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action.  |
-`----------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-      yydestruct (yystos[yystate], yyvsp);
-      yyvsp--;
-      yystate = *--yyssp;
-
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  YYDPRINTF ((stderr, "Shifting error token, "));
-
-  *++yyvsp = yylval;
-
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here.  |
-`----------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-  return yyresult;
-}
-
-
-#line 300 "ts1.0_grammar.y"
-
-void yyerror(const char* s)
-{
-     errors.set("unrecognized token");
-}
-

+ 0 - 177
CamelotRenderer/RenderSystemGL/Source/nvparse/_ts1.0_parser.h

@@ -1,177 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     floatValue = 258,
-     gequal = 259,
-     less = 260,
-     texVariable = 261,
-     expandString = 262,
-     openParen = 263,
-     closeParen = 264,
-     semicolon = 265,
-     comma = 266,
-     nop = 267,
-     texture_1d = 268,
-     texture_2d = 269,
-     texture_rectangle = 270,
-     texture_3d = 271,
-     texture_cube_map = 272,
-     cull_fragment = 273,
-     pass_through = 274,
-     offset_2d_scale = 275,
-     offset_2d = 276,
-     offset_rectangle_scale = 277,
-     offset_rectangle = 278,
-     dependent_ar = 279,
-     dependent_gb = 280,
-     dot_product_2d_1of2 = 281,
-     dot_product_2d_2of2 = 282,
-     dot_product_rectangle_1of2 = 283,
-     dot_product_rectangle_2of2 = 284,
-     dot_product_depth_replace_1of2 = 285,
-     dot_product_depth_replace_2of2 = 286,
-     dot_product_3d_1of3 = 287,
-     dot_product_3d_2of3 = 288,
-     dot_product_3d_3of3 = 289,
-     dot_product_cube_map_1of3 = 290,
-     dot_product_cube_map_2of3 = 291,
-     dot_product_cube_map_3of3 = 292,
-     dot_product_reflect_cube_map_eye_from_qs_1of3 = 293,
-     dot_product_reflect_cube_map_eye_from_qs_2of3 = 294,
-     dot_product_reflect_cube_map_eye_from_qs_3of3 = 295,
-     dot_product_reflect_cube_map_const_eye_1of3 = 296,
-     dot_product_reflect_cube_map_const_eye_2of3 = 297,
-     dot_product_reflect_cube_map_const_eye_3of3 = 298,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 = 299,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 = 300,
-     dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 = 301,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 = 302,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 = 303,
-     dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 = 304
-   };
-#endif
-#define floatValue 258
-#define gequal 259
-#define less 260
-#define texVariable 261
-#define expandString 262
-#define openParen 263
-#define closeParen 264
-#define semicolon 265
-#define comma 266
-#define nop 267
-#define texture_1d 268
-#define texture_2d 269
-#define texture_rectangle 270
-#define texture_3d 271
-#define texture_cube_map 272
-#define cull_fragment 273
-#define pass_through 274
-#define offset_2d_scale 275
-#define offset_2d 276
-#define offset_rectangle_scale 277
-#define offset_rectangle 278
-#define dependent_ar 279
-#define dependent_gb 280
-#define dot_product_2d_1of2 281
-#define dot_product_2d_2of2 282
-#define dot_product_rectangle_1of2 283
-#define dot_product_rectangle_2of2 284
-#define dot_product_depth_replace_1of2 285
-#define dot_product_depth_replace_2of2 286
-#define dot_product_3d_1of3 287
-#define dot_product_3d_2of3 288
-#define dot_product_3d_3of3 289
-#define dot_product_cube_map_1of3 290
-#define dot_product_cube_map_2of3 291
-#define dot_product_cube_map_3of3 292
-#define dot_product_reflect_cube_map_eye_from_qs_1of3 293
-#define dot_product_reflect_cube_map_eye_from_qs_2of3 294
-#define dot_product_reflect_cube_map_eye_from_qs_3of3 295
-#define dot_product_reflect_cube_map_const_eye_1of3 296
-#define dot_product_reflect_cube_map_const_eye_2of3 297
-#define dot_product_reflect_cube_map_const_eye_3of3 298
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 299
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 300
-#define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 301
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 302
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 303
-#define dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 304
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 18 "ts1.0_grammar.y"
-typedef union YYSTYPE {
-  float fval;
-  InstPtr inst;
-  InstListPtr instList;
-  MappedVariablePtr variable;
-} YYSTYPE;
-/* Line 1240 of yacc.c.  */
-#line 141 "_ts1.0_parser.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE ts10_lval;
-
-
-

+ 0 - 5041
CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_lexer.cpp

@@ -1,5041 +0,0 @@
-#include <ctype.h>
-
-#define yy_create_buffer vs10__create_buffer
-#define yy_delete_buffer vs10__delete_buffer
-#define yy_scan_buffer vs10__scan_buffer
-#define yy_scan_string vs10__scan_string
-#define yy_scan_bytes vs10__scan_bytes
-#define yy_flex_debug vs10__flex_debug
-#define yy_init_buffer vs10__init_buffer
-#define yy_flush_buffer vs10__flush_buffer
-#define yy_load_buffer_state vs10__load_buffer_state
-#define yy_switch_to_buffer vs10__switch_to_buffer
-#define yyin vs10_in
-#define yyleng vs10_leng
-#define yylex vs10_lex
-#define yyout vs10_out
-#define yyrestart vs10_restart
-#define yytext vs10_text
-#define yywrap vs10_wrap
-
-#line 20 "_vs1.0_lexer.cpp"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/shared/backups/ogre/cvs/ogrenew/RenderSystems/GL/src/nvparse/_vs1.0_lexer.cpp,v 1.4 2005-11-10 07:24:20 nfz Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-/* yyunput is never used */
-#define YY_NO_UNPUT
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-#if !defined(YY_USES_REJECT) && defined(YY_NO_PUSH_STATE)
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-#endif
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define YY_USES_REJECT
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 72
-#define YY_END_OF_BUFFER 73
-static yyconst short int yy_acclist[406] =
-    {   0,
-        2,    2,   56,   56,   46,   46,   31,   31,   29,   29,
-       73,   69,   71,   72,   64,   69,   71,   72,   66,   69,
-       72,   71,   72,   71,   72,   63,   71,   72,   63,   71,
-       72,   37,   63,   71,   72,   63,   71,   72,   36,   71,
-       72,   13,   71,   72,   62,   71,   72,   62,   63,   71,
-       72,   62,   71,   72,   62,   71,   72,   62,   71,   72,
-       62,   71,   72,   62,   71,   72,   64,   69,   71,   72,
-       16,   63,   71,   72,   72,   72,   22,   65,   72,   21,
-       72,   23,   72,   72,   34,   72,   72,   20,   72,   68,
-       70,   72,   68,   72,   70,   72,   67,   70,   72,    2,
-
-       72,    1,   72,   41,   72,   41,   42,   72,   56,   72,
-       56,   72,   57,   72,   56,   72,   56,   72,   56,   72,
-       50,   72,   46,   50,   72,   49,   72,   48,   72,   50,
-       72,   47,   50,   72,   72,   72,   59,   72,   72,   72,
-       61,   72,   72,   40,   72,   40,   62,   72,   39,   40,
-       62,   72,   45,   72,   44,   45,   72,   43,   45,   72,
-       72,   27,   72,   31,   72,   31,   72,   32,   72,   31,
-       72,   29,   72,   30,   72,   51,   72,   64,   15,   17,
-       14,   36,   13,   62,   62,    3,   62,    6,   62,   62,
-       62,   62,   62,    5,   62,    4,   62,   62,   64,   16,
-
-       16,   19,   34,   20,   67,    2,    1,   41,   56,   56,
-       56,   56,   17,   56,   56,   54,   56,   50,   46,   50,
-       47,   50,   47,   50,   47,   59,   61,   60,   61,   39,
-       39,   39,   62,   44,   27,   31,   31,   31,   31,   29,
-       51,   53,   51,   51,   14,   12,   12,   62,    3,   12,
-        3,   12,    6,   12,    6,   12,    8,   62,   62,   62,
-       62,    7,   62,    5,   12,    5,   12,    4,   12,    4,
-       12,   16,   56,   39,   62,   31,   31,   31,   52,    3,
-        3,    6,    6,    8,   12,    8,   12,    9,   62,   10,
-       62,   11,   62,    7,   12,    7,   12,    5,    5,    4,
-
-        4,   55,   56,   38,   39,   62,   31,   31,   26,    8,
-        8,    9,   12,    9,   12,   10,   12,   10,   12,   11,
-       12,   11,   12,    7,    7,   55,   56,   56,   55,   56,
-       58,   59,   38,   39,   38,   39,   26,   31,   31,   26,
-       26,   28,    9,    9,   10,   10,   11,   11,   35,   55,
-       56,   55,   56,   55,   56,   55,   56,   26,   31,   31,
-       26,   31,   28,   31,   26,   26,   26,   28,   28,   24,
-       35,   35,   55,   56,   55,   56,   26,   31,   26,   31,
-       26,   31,   28,   31,   31,   28,   31,   33,   26,   28,
-       28,   28,   25,   26,   31,   28,   31,   28,   31,   28,
-
-       31,   28,   18,   28,   31
-    } ;
-
-static yyconst short int yy_accept[330] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    2,    3,    3,
-        3,    4,    5,    6,    7,    7,    7,    7,    7,    7,
-        7,    7,    7,    7,    7,    8,    9,   10,   11,   11,
-       11,   12,   15,   19,   22,   24,   26,   29,   32,   36,
-       39,   42,   45,   48,   52,   55,   58,   61,   64,   67,
-       71,   75,   76,   77,   80,   82,   84,   85,   87,   88,
-       90,   93,   95,   97,  100,  102,  104,  106,  109,  111,
-      113,  115,  117,  119,  121,  123,  126,  128,  130,  132,
-      135,  136,  137,  139,  140,  141,  143,  144,  146,  149,
-
-      153,  155,  158,  161,  162,  164,  166,  168,  170,  172,
-      174,  176,  178,  179,  179,  179,  179,  179,  179,  180,
-      181,  182,  183,  184,  185,  186,  188,  190,  191,  192,
-      193,  194,  196,  198,  199,  200,  201,  202,  202,  203,
-      203,  204,  204,  205,  206,  207,  208,  209,  210,  211,
-      212,  213,  215,  216,  217,  218,  219,  221,  223,  225,
-      226,  226,  227,  227,  227,  227,  227,  228,  228,  230,
-      231,  232,  234,  235,  235,  236,  237,  238,  239,  240,
-      241,  243,  244,  244,  244,  245,  245,  245,  245,  245,
-      245,  245,  246,  247,  249,  251,  253,  255,  257,  259,
-
-      260,  261,  262,  264,  266,  268,  270,  272,  272,  273,
-      274,  274,  276,  277,  278,  279,  279,  280,  280,  280,
-      280,  280,  280,  280,  281,  282,  283,  284,  286,  288,
-      290,  292,  294,  296,  298,  299,  300,  301,  302,  302,
-      304,  304,  307,  308,  309,  309,  310,  310,  310,  310,
-      310,  311,  312,  314,  316,  318,  320,  322,  324,  325,
-      326,  326,  328,  329,  331,  331,  333,  335,  337,  339,
-      340,  340,  341,  341,  342,  343,  343,  343,  343,  344,
-      345,  346,  347,  348,  349,  350,  352,  354,  356,  358,
-      360,  361,  363,  365,  365,  366,  367,  368,  369,  369,
-
-      370,  371,  371,  371,  372,  373,  375,  377,  379,  381,
-      383,  385,  386,  388,  389,  390,  391,  392,  393,  394,
-      394,  396,  398,  400,  402,  403,  404,  406,  406
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    4,    4,    5,    4,    6,    4,    4,    7,
-        8,    9,   10,   11,    6,   12,   13,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,    4,   15,    6,
-        4,    6,    4,    4,   16,   16,   16,   17,   16,   18,
-       16,   16,   16,   16,   16,   16,   16,   16,   16,   19,
-       16,   16,   16,   20,   16,   16,   16,   16,   16,   16,
-        6,   21,    6,    4,   22,    4,   23,   16,   24,   25,
-
-       26,   27,   28,   16,   29,   16,   16,   30,   31,   32,
-       33,   16,   16,   34,   35,   36,   37,   38,   39,   39,
-       39,   39,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    4,    4,    4
-    } ;
-
-static yyconst int yy_meta[40] =
-    {   0,
-        1,    2,    3,    1,    1,    1,    2,    1,    1,    1,
-        4,    1,    1,    5,    1,    5,    5,    5,    5,    5,
-        1,    5,    5,    5,    5,    5,    5,    5,    5,    5,
-        5,    5,    5,    5,    5,    5,    5,    5,    5
-    } ;
-
-static yyconst short int yy_base[369] =
-    {   0,
-        0,   38,  764,  763,  761,  760,  759,  758,  757,  756,
-      755,  754,  753,  752,   48,   69,  751,  750,   39,   84,
-       86,   90,   93,  107,   41,   95,   44,   80,  122,    0,
-      112,  160,  749,  748,  163,  167,  747,  746,  740,  739,
-      746,  767,  100,  767,  767,  148,  767,  173,  767,   53,
-      731,    0,  722,    0,  157,  164,  163,  170,  173,  186,
-      187,  740,  767,  767,  767,  767,  739,  767,  738,  767,
-      767,  767,  767,    0,  737,  767,    0,    0,  718,  191,
-      767,  185,  195,  178,    0,  736,  767,  767,  724,  725,
-      732,  198,  767,  199,  200,  767,  201,  767,    0,  211,
-
-      767,  732,  767,  730,  767,    0,  213,  767,  706,    0,
-      767,  217,  221,  705,  704,  175,  201,  232,  767,  767,
-        0,  715,    0,  234,    0,  237,  239,  241,  243,  245,
-      255,  268,  270,  277,  281,  726,  272,  724,  767,  723,
-      767,  722,  767,    0,  721,  767,    0,  702,  285,  283,
-      228,  701,  291,  767,   43,    0,  719,  709,  708,    0,
-      715,  767,  293,  222,  295,  206,  767,  208,  767,  298,
-      767,  300,  715,  713,  767,    0,  303,  689,  232,    0,
-      308,  711,  700,  709,  294,  679,  683,  674,  683,  282,
-      683,    0,  767,    0,  314,  767,  322,  767,  324,  328,
-
-      330,  332,  339,  334,  767,  341,  767,  692,  703,  297,
-       82,  345,  672,  668,  675,  692,  767,  661,  659,  651,
-      644,  640,  630,  355,  767,  357,  767,  360,  767,  366,
-      368,  370,  372,  767,  374,  767,  376,  767,  254,  378,
-      379,  383,  629,  606,  599,  381,  603,  598,  593,  558,
-      395,  767,  398,  767,  400,  767,  402,  767,  404,  767,
-      502,  406,  374,  396,  410,  767,  412,  767,  416,  453,
-      439,  420,  445,  336,  421,  452,  423,  395,  422,  767,
-      435,  767,  437,  767,  439,  430,  431,  434,  454,  446,
-      403,  351,  458,  408,  413,  417,  449,  461,  376,  453,
-
-      353,  343,  314,  475,  767,  466,  480,  457,  471,  475,
-      483,  309,  476,  311,  479,  484,  487,  490,  250,  162,
-      491,  494,  495,  498,  499,  115,  502,  767,  517,  522,
-      527,  532,  537,  542,  547,  552,  557,  562,  567,  572,
-      577,  582,  587,  592,   95,   89,  597,  602,  607,   40,
-      612,  617,  622,  627,  632,  637,  642,  647,  652,  657,
-      662,  667,  672,  677,  682,  687,  692,  697
-    } ;
-
-static yyconst short int yy_def[369] =
-    {   0,
-      328,    1,  329,  329,  330,  330,  330,  330,  330,  330,
-      331,  331,  332,  332,  333,  333,  334,  334,  335,  335,
-      336,  336,  337,  337,  338,  338,  339,  339,  328,   29,
-      340,  340,  341,  341,  342,  342,  343,  343,  330,  330,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  344,  345,  346,  345,  345,  345,  345,  345,  328,
-      328,  347,  328,  328,  328,  328,  348,  328,  349,  328,
-      328,  328,  328,  350,  351,  328,  352,  352,  353,  353,
-      328,  353,  353,  353,  354,  354,  328,  328,  354,  355,
-      356,  356,  328,  356,  357,  328,  357,  328,  346,  346,
-
-      328,  328,  328,  358,  328,  359,  359,  328,  359,  360,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      361,  328,  344,  345,  346,  345,  345,  345,  345,  345,
-      345,  345,  345,  345,  328,  328,  328,  347,  328,  348,
-      328,  349,  328,  350,  351,  328,  352,  353,  353,  353,
-      353,  353,  353,  328,  353,  354,  354,  355,  355,  362,
-      356,  328,  356,  356,  356,  357,  328,  357,  328,  328,
-      328,  346,  328,  358,  328,  359,  359,  359,  359,  360,
-      328,  328,  328,  363,  328,  328,  328,  328,  328,  328,
-      328,  361,  328,  346,  328,  328,  328,  328,  345,  345,
-
-      345,  345,  345,  328,  328,  328,  328,  328,  328,  353,
-      356,  346,  359,  359,  359,  363,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  345,
-      345,  345,  328,  328,  328,  328,  328,  328,  328,  353,
-      356,  346,  359,  359,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  353,  353,  364,  356,  328,  328,  328,  359,  359,
-      328,  328,  328,  365,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  364,  364,  364,  364,  359,
-      359,  366,  359,  328,  365,  365,  365,  328,  328,  367,
-
-      328,  328,  328,  328,  328,  364,  364,  366,  366,  366,
-      359,  359,  368,  328,  365,  367,  367,  367,  328,  328,
-      366,  368,  368,  368,  367,  328,  368,    0,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328
-    } ;
-
-static yyconst short int yy_nxt[807] =
-    {   0,
-       42,   43,   44,   45,   46,   47,   47,   47,   47,   48,
-       47,   49,   50,   51,   52,   53,   53,   53,   53,   53,
-       45,   54,   55,   56,   53,   53,   53,   53,   53,   53,
-       53,   53,   57,   58,   53,   53,   53,   59,   53,   60,
-       63,   78,   92,   93,  144,   63,   96,   61,   71,   71,
-       72,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,  120,   73,  149,   97,  121,   94,  210,   73,   71,
-       71,   72,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   96,   73,  162,   63,   78,   80,   81,   73,
-       63,   80,   81,  125,   86,   87,   92,   93,   82,  124,
-
-       97,  113,   82,   88,  114,   89,   83,   90,   86,   87,
-       83,   84,  241,  102,   63,   84,  326,   88,  103,   89,
-       94,   90,   98,   98,   63,   98,   98,   98,   98,   98,
-       98,   98,   98,   98,   98,   98,   98,   99,   99,   99,
-       99,   99,   98,   99,   99,   99,   99,   99,   99,   99,
-       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
-      100,  102,   63,  326,  107,  108,  103,  109,  107,  108,
-      126,  109,  115,  116,  118,  119,  117,  127,  125,  128,
-      129,  130,  131,  132,  125,  125,  133,  135,  137,  119,
-      114,  125,  150,  152,  125,  136,  153,  154,  149,  163,
-
-      162,  162,  167,  169,  188,  149,  189,  134,  167,  155,
-      169,  149,  170,  171,  177,  149,  151,  178,  181,  182,
-      168,  168,  113,  164,  162,  114,  168,  190,  168,  183,
-      165,  184,  191,  118,  119,  193,  193,  185,  195,  196,
-      197,  198,  193,  193,  193,  193,  193,  193,  149,  172,
-      126,  319,  127,  165,  199,  194,  193,  193,  194,  155,
-      194,  214,  194,  215,  194,  261,  194,  239,  203,  204,
-      205,  206,  207,  137,  119,  200,  194,  201,  193,  193,
-      202,  132,  135,  133,  150,  114,  153,  154,  208,  194,
-      136,  194,  153,  154,  163,  162,  182,  162,  194,  170,
-
-      171,  170,  171,  149,  177,  149,  221,  178,  151,  181,
-      182,  149,  314,  222,  185,  224,  225,  149,  164,  211,
-      183,  313,  184,  226,  227,  228,  229,  240,  185,  193,
-      193,  193,  193,  193,  193,  235,  236,  199,  212,  320,
-      233,  234,  237,  238,  319,  194,  170,  171,  296,  194,
-      297,  194,  203,  194,  301,  230,  224,  225,  226,  227,
-      194,  251,  252,  309,  231,  310,  232,  253,  254,  255,
-      256,  257,  258,  259,  260,  235,  236,  237,  238,  262,
-      265,  266,  272,  242,  267,  268,  264,  194,  300,  194,
-      263,  194,  264,  273,  149,  274,  251,  252,  149,  279,
-
-      280,  281,  282,  283,  284,  259,  260,  262,  287,  314,
-      288,  265,  266,  267,  268,  292,  289,  290,  263,  303,
-      264,  272,  298,  279,  280,  296,  149,  297,  291,  315,
-      292,  297,  273,  299,  274,  300,  281,  282,  283,  284,
-      304,  305,  287,  306,  288,  288,  287,  290,  288,  302,
-      289,  289,  285,  301,  289,  307,  154,  274,  291,  311,
-      292,  296,  298,  297,  294,  317,  287,  318,  288,  309,
-      312,  310,  313,  299,  289,  300,  304,  305,  306,  293,
-      288,  307,  154,  321,  311,  310,  289,  309,  323,  310,
-      324,  315,  287,  297,  288,  312,  317,  313,  318,  325,
-
-      289,  318,  317,  321,  318,  310,  323,  327,  324,  324,
-      323,  325,  324,  318,  327,  285,  324,   62,   62,   62,
-       62,   62,   63,   63,   63,   63,   63,   67,   67,   67,
-       67,   67,   69,   69,   69,   69,   69,   74,   74,   74,
-       74,   74,   75,   75,   75,   75,   75,   77,   77,   77,
-       77,   77,   79,   79,   79,   79,   79,   85,   85,   85,
-       85,   85,   91,   91,   91,   91,   91,   95,   95,   95,
-       95,   95,  101,  101,  101,  101,  101,  104,  104,  104,
-      104,  104,  106,  106,  106,  106,  106,  110,  110,  110,
-      110,  110,  123,  123,  278,  123,  123,  138,  138,  138,
-
-      138,  138,  140,  140,  140,  140,  140,  142,  142,  142,
-      142,  142,  145,  145,  145,  145,  145,  147,  277,  147,
-      147,  147,  148,  148,  276,  148,  148,  156,  156,  275,
-      271,  156,  159,  159,  270,  159,  159,  161,  161,  161,
-      161,  161,  166,  166,  166,  166,  166,  174,  174,  174,
-      174,  174,  176,  176,  269,  176,  176,  180,  180,  250,
-      180,  180,  192,  192,  249,  192,  192,  160,  160,  248,
-      160,  160,  216,  216,  216,  216,  216,  286,  286,  247,
-      286,  286,  295,  295,  246,  295,  295,  308,  308,  245,
-      308,  308,  316,  316,  217,  316,  316,  322,  322,  244,
-
-      322,  322,  243,  215,  209,  239,  223,  220,  219,  218,
-      189,  217,  184,  182,  213,  175,  173,  162,  160,  160,
-      157,  149,  149,  146,  143,  141,  139,  209,  122,  187,
-      186,  179,  175,  173,  162,  160,  158,  157,  149,  146,
-      143,  141,  139,  125,  122,  328,  112,  112,  111,  111,
-      105,  105,   76,   76,   70,   70,   68,   68,   66,   66,
-       65,   65,   64,   64,   63,   63,   41,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-
-      328,  328,  328,  328,  328,  328
-    } ;
-
-static yyconst short int yy_chk[807] =
-    {   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,    2,
-       19,   19,   25,   25,  350,   19,   27,    2,   15,   15,
-       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
-       15,   50,   15,  155,   27,   50,   25,  155,   15,   16,
-       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
-       16,   16,   28,   16,  211,   20,   20,   21,   21,   16,
-       20,   22,   22,  346,   23,   23,   26,   26,   21,  345,
-
-       28,   43,   22,   23,   43,   23,   21,   23,   24,   24,
-       22,   21,  211,   31,   31,   22,  326,   24,   31,   24,
-       26,   24,   29,   29,   29,   29,   29,   29,   29,   29,
-       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
-       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
-       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
-       29,   32,   32,  320,   35,   35,   32,   35,   36,   36,
-       55,   36,   46,   46,   48,   48,   46,   56,   55,   57,
-       57,   57,   57,   58,   57,   56,   59,   60,   61,   61,
-       60,   58,   80,   82,   59,   60,   83,   83,   84,   92,
-
-       92,   94,   95,   97,  116,   82,  116,   59,  166,   84,
-      168,   80,  100,  100,  107,   83,   80,  107,  112,  112,
-       95,   97,  113,   92,  164,  113,  166,  117,  168,  112,
-       94,  112,  117,  118,  118,  124,  124,  112,  126,  126,
-      127,  127,  128,  128,  129,  129,  130,  130,  151,  100,
-      126,  319,  127,  164,  128,  124,  131,  131,  126,  151,
-      127,  179,  128,  179,  129,  239,  130,  239,  131,  132,
-      132,  133,  133,  137,  137,  129,  131,  130,  134,  134,
-      130,  132,  135,  133,  150,  135,  149,  149,  134,  132,
-      135,  133,  153,  153,  163,  163,  185,  165,  134,  170,
-
-      170,  172,  172,  150,  177,  149,  190,  177,  150,  181,
-      181,  153,  314,  190,  185,  195,  195,  210,  163,  165,
-      181,  312,  181,  197,  197,  199,  199,  210,  181,  200,
-      200,  201,  201,  202,  202,  204,  204,  199,  172,  303,
-      203,  203,  206,  206,  302,  199,  212,  212,  274,  200,
-      274,  201,  203,  202,  301,  200,  224,  224,  226,  226,
-      203,  228,  228,  292,  201,  292,  202,  230,  230,  231,
-      231,  232,  232,  233,  233,  235,  235,  237,  237,  240,
-      241,  241,  246,  212,  242,  242,  263,  230,  299,  231,
-      240,  232,  240,  246,  263,  246,  251,  251,  240,  253,
-
-      253,  255,  255,  257,  257,  259,  259,  262,  264,  294,
-      264,  265,  265,  267,  267,  291,  264,  269,  262,  278,
-      262,  272,  275,  279,  279,  295,  262,  295,  269,  296,
-      269,  296,  272,  275,  272,  275,  281,  281,  283,  283,
-      285,  285,  286,  287,  286,  287,  288,  290,  288,  277,
-      286,  287,  285,  276,  288,  289,  289,  273,  290,  293,
-      290,  297,  298,  297,  271,  300,  289,  300,  289,  308,
-      293,  308,  293,  298,  289,  298,  304,  304,  306,  270,
-      306,  307,  307,  309,  311,  309,  306,  310,  313,  310,
-      313,  315,  307,  315,  307,  311,  316,  311,  316,  317,
-
-      307,  317,  318,  321,  318,  321,  322,  323,  322,  323,
-      324,  325,  324,  325,  327,  261,  327,  329,  329,  329,
-      329,  329,  330,  330,  330,  330,  330,  331,  331,  331,
-      331,  331,  332,  332,  332,  332,  332,  333,  333,  333,
-      333,  333,  334,  334,  334,  334,  334,  335,  335,  335,
-      335,  335,  336,  336,  336,  336,  336,  337,  337,  337,
-      337,  337,  338,  338,  338,  338,  338,  339,  339,  339,
-      339,  339,  340,  340,  340,  340,  340,  341,  341,  341,
-      341,  341,  342,  342,  342,  342,  342,  343,  343,  343,
-      343,  343,  344,  344,  250,  344,  344,  347,  347,  347,
-
-      347,  347,  348,  348,  348,  348,  348,  349,  349,  349,
-      349,  349,  351,  351,  351,  351,  351,  352,  249,  352,
-      352,  352,  353,  353,  248,  353,  353,  354,  354,  247,
-      245,  354,  355,  355,  244,  355,  355,  356,  356,  356,
-      356,  356,  357,  357,  357,  357,  357,  358,  358,  358,
-      358,  358,  359,  359,  243,  359,  359,  360,  360,  223,
-      360,  360,  361,  361,  222,  361,  361,  362,  362,  221,
-      362,  362,  363,  363,  363,  363,  363,  364,  364,  220,
-      364,  364,  365,  365,  219,  365,  365,  366,  366,  218,
-      366,  366,  367,  367,  216,  367,  367,  368,  368,  215,
-
-      368,  368,  214,  213,  209,  208,  191,  189,  188,  187,
-      186,  184,  183,  182,  178,  174,  173,  161,  159,  158,
-      157,  152,  148,  145,  142,  140,  138,  136,  122,  115,
-      114,  109,  104,  102,   91,   90,   89,   86,   79,   75,
-       69,   67,   62,   53,   51,   41,   40,   39,   38,   37,
-       34,   33,   18,   17,   14,   13,   12,   11,   10,    9,
-        8,    7,    6,    5,    4,    3,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
-
-      328,  328,  328,  328,  328,  328
-    } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
-static char *yy_full_match;
-static int yy_lp;
-#define REJECT \
-{ \
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yy_full_match; /* restore poss. backed-over text */ \
-++yy_lp; \
-goto find_rule; \
-}
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "vs1.0_tokens.l"
-#define INITIAL 0
-#define INCLUDE 1
-#define DEFINE 2
-#define DEFSTR 3
-#define DEFSPACE 4
-#define SKIPLINE 5
-#define EATCOMMENT 6
-#define EATSTRING 7
-#define SAVELINE 8
- 
-#define MACRONAME 9
-#define MACROBODY 10
-#define MACROPARM 11
-#define EATMACRO 12
-#define EATDEFINE 13
-#define MODIFIER 14
-#define MACROPARMSTART 15
-
-#define IFDEFNAME 16
-#define IFDEFBODY 17
-#define ENDMACRO 18
-#define MACROPARMEND 19
-
-#line 8 "vs1.0_tokens.l"
-
-#include <stdarg.h>
-#include <stdlib.h>
-#ifdef _WIN32
-#include <io.h>
-#  ifdef __GNUC__
-#    include <sys/types.h>
-#    include <ctype.h>
-#  endif
-#else
-#include <sys/types.h>
-#include <ctype.h>
-#define _stat stat
-#define _open open
-#define _O_RDONLY O_RDONLY
-#define _fstat fstat
-#define _close close
-#define stricmp strcasecmp
-
-#endif
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include "macro.h"
-#include "nvparse_errors.h"
-#include "vs1.0_inst_list.h"
-#include "_vs1.0_parser.h"
-#define yylineno line_number
-#include "nvparse_externs.h"
-
-#define yylineno line_number
-int line_incr;
-void LexError(const char *format, ...);
-void LexWarning(const char *format, ...);
-char *ReadTextFile(const char * filename);
-
-unsigned int MakeRegisterMask(char *findName);
-unsigned int FindSwizzleValue(char *swizzleText);
-
-
-enum ERROR_VALUES {
-	ERROR_NONE = 0,
-	ERROR_MEMORY_ALLOC,
-	ERROR_FILE_OPEN,
-	ERROR_UNSUCCESSFUL_ASSEMBLE,
-	ERROR_TOO_MANY_PARMS,
-	ERROR_DEST_WRITE,
-	ERROR_LIST_OPEN,
-	ERROR_DEST_OPEN,
-	ERROR_NO_ARGUMENTS,
-	ERROR_MACRO_OVERRUN
-};
-
-
-
-//extern void GenSwitchFileNames(char *fileName);
-//extern unsigned int gLinesAssembled;
-unsigned int gLinesAssembled;
-
-#define YY_INPUT(buf,result,max_size) \
-{ \
-	int c = *myin++; \
-	result = (c == 0) ? YY_NULL : (buf[0] = c, 1); \
-}
-
-#define SAFEDELETEARRAY(x) if ((x) != NULL) \
-						delete [] (x)
-#define SAFEFREE(x) if ((x) != NULL) \
-						free((x))
-
-#define MAXREPLACESTRING 255
-
-char gReplaceText[MAXREPLACESTRING+1];
-
-//
-// forward prototypes for macro functions
-//
-void MacroIncFunction(char *, unsigned int *, char **);
-void MacroDecFunction(char *, unsigned int *, char **);
-void MacroAddFunction(char *, unsigned int *, char **);
-void MacroSubFunction(char *, unsigned int *, char **);
-
-MACROFUNCTIONS gMacroFunctions[] = { 
-	{ "inc(", MacroIncFunction },
-	{ "dec(", MacroDecFunction },
-	{ "add(", MacroAddFunction },
-	{ "sub(", MacroSubFunction }
-};
-
-#define NUM_MACRO_FUNCTIONS (sizeof(gMacroFunctions) / sizeof(MACROFUNCTIONS))
-
-#define MAX_INCLUDE_DEPTH 1024
-typedef struct INCLUDEINFO
-{
-	char	*fileName;
-	unsigned int lineNo;
-	YY_BUFFER_STATE buffer;
-	MACROENTRY *lastInvokeMacro;				// save off in case nested macros.
-	MACROENTRY *lastParseMacro;				// recursive macros
-	MACROTEXT *lastMacroLineParse;			// save off for recursive lines of macros working on.
-	bool lastbInsideMacro;					// save off for recursive macros
-	bool lastbInsideDefine;					// save off for recursive macros/defines
-	bool lastbInsideInclude;
-	bool lastbProcessingIFDEF; 				// save off #define information
-//	FILE *fileHandle;
-	char *prevString;
-	char *nextString;
-} INCLUDEINFO;
-
-INCLUDEINFO gIncludeStack[MAX_INCLUDE_DEPTH];
-int gIncludeStackIndex = 0;
-
-IFDEFINFO gIfDefStack[MAX_IFDEF_DEPTH];
-int gIfDefStackIndex = 0;
-
-unsigned int &base_linenumber = gIncludeStack[0].lineNo;
-
-bool gbInsideInclude = false;
-bool gbProcessingBuiltIn = false;
-bool gbProcessingDefine = false;
-unsigned int gCountParen = 0;
-
-bool gbProcessingIFDEF = false;
-bool gbIFDEF = false;
-bool gbCompareDefine = false;
-unsigned int gIfDefStartLine;
-
-
-MACROENTRY *gLastMacro;
-MACROENTRY *gInvokeMacro;
-MACROENTRY *gTempMacro;					// until all the parameters are read
-MACROENTRY *FindMacro(char *macroName);
-MACROENTRY *FindNMacro(char *macroName, unsigned int sLen);
-
-MACROFUNCTIONPTR gMacroCallFunction;
-
-const char *builtInMacros =	"macro m3x2 reg1, reg2, reg3\n"
-						"	dp3	%reg1.x, %reg2, %reg3\n"
-						"	dp3 %reg1.y, %reg2, %inc(%reg3)\n"
-						"endm";
-
-//
-// local prototypes
-//
-void CleanUp();
-void ReplaceMacroParms(char *srcLine, char *destLine, 
-							MACROENTRY *srcParms, MACROENTRY *invParms);
-
-MACROTEXT *SaveMacroText(char *srcText, MACROTEXT *lastMacroText);
-void FreeMacroEntry(MACROENTRY *macEntry);
-void EndMacroParms();
-char *FindAlphaNum(char *srcStr, unsigned int *sLen);
-void DebugUnhandledState();
-
-
-unsigned int gCommentStartLine;
-unsigned int gMacroStartLine;
-
-char *gCurFileName = NULL;
-
-#define MAXSAVELINE 4095
-
-char gSaveLine[MAXSAVELINE+1];
-char gMacroLine[MAXSAVELINE+1];
-
-#if 1
-#ifdef _DEBUG
-#define ECHO DebugUnhandledState();
-#else
-#define ECHO
-#endif
-#endif
-
-bool gbInsideMacro = false;		// flag if we are doing a macro replace or not.
-bool gbTempInsideMacro = false;
-unsigned int gInvokeState = INITIAL;
-
-
-MACROENTRY *gParseMacro;		// which source macro entry we are using
-MACROENTRY *gTempParseMacro;	// temporary holder until parameters are received.
-MACROTEXT *gMacroLineParse;		// which line we are currently parsing inside the macro invocation
-
-enum OPCODETYPE
-{
-	TYPE_NONE = 0,
-	TYPE_VERTEX_SHADER = 1,
-	TYPE_PIXEL_SHADER = 2
-};
-typedef struct OPCODEMAP
-{
-	const char *string;				// string for opcode
-	int tokenName;              // name of the corresponding token
-	int numArguments;			// number of arguments for opcode
-	float version;				// minimum version supported in.
-	int opcodeTypeFlags;		// whether opcode can be used in vertex shader or pixel shader
-	bool opcodeModify;			// if opcode modifiers can be used
-	bool textureOpcode;			// only outputs to the texture unit
-} OPCODEMAP;
-
-#ifndef TRUE
-#define TRUE true
-#endif
-#ifndef FALSE
-#define FALSE false
-#endif
-
-OPCODEMAP theOpcodes[] = {
-	{ "add",  ADD_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "dp3",  DP3_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "dp4",  DP4_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "dst",  DST_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "exp",  EXP_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "expp", EXPP_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "frc",  FRC_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "lit",  LIT_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "log",  LOG_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "logp", LOGP_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "m3x2", M3X2_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "m3x3", M3X3_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "m3x4", M3X4_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "m4x3", M4X3_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "m4x4", M4X4_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "mad",  MAD_INSTR, 4, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "max",  MAX_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "min",  MIN_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "mov",  MOV_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "mul",  MUL_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "nop",  NOP_INSTR, 0, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-	{ "rcp",  RCP_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "rsq",  RSQ_INSTR, 2, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "sge",  SGE_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "slt",  SLT_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER, FALSE, FALSE },
-	{ "sub",  SUB_INSTR, 3, 1.0f, TYPE_VERTEX_SHADER | TYPE_PIXEL_SHADER, TRUE, FALSE },
-};
-
-#define NUMOPCODES (sizeof(theOpcodes) / sizeof(OPCODEMAP))
-OPCODEMAP *FindOpcode(char *findName);
-
-
-#line 990 "_vs1.0_lexer.cpp"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		yy_current_buffer->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 261 "vs1.0_tokens.l"
-
-
-#line 1147 "_vs1.0_lexer.cpp"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-		yy_current_state += YY_AT_BOL();
-		yy_state_ptr = yy_state_buf;
-		*yy_state_ptr++ = yy_current_state;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 329 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			*yy_state_ptr++ = yy_current_state;
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 767 );
-
-yy_find_action:
-		yy_current_state = *--yy_state_ptr;
-		yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
-		for ( ; ; ) /* until we find what rule we matched */
-			{
-			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
-				{
-				yy_act = yy_acclist[yy_lp];
-					{
-					yy_full_match = yy_cp;
-					break;
-					}
-				}
-			--yy_cp;
-			yy_current_state = *--yy_state_ptr;
-			yy_lp = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 263 "vs1.0_tokens.l"
-{
-	gbProcessingDefine = false;
-	gSaveLine[0] = '\0';
-	strncat(gSaveLine, yytext, MAXSAVELINE);
-//	GenDebugLine();
-	if (gbProcessingIFDEF && (gbCompareDefine != gbIFDEF))
-	{
-		BEGIN(IFDEFBODY);
-	}
-	else
-	{
-		BEGIN(INITIAL);
-	}
-	yyless(0);
-}
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 279 "vs1.0_tokens.l"
-{
-	gbProcessingDefine = false;
-	gSaveLine[0] = '\0';
-	strncat(gSaveLine, yytext, MAXSAVELINE);
-//	GenDebugLine();
-	if (gbProcessingIFDEF && (gbCompareDefine != gbIFDEF))
-	{
-		BEGIN(IFDEFBODY);
-	}
-	else
-	{
-		BEGIN(INITIAL);
-	}
-	yyless(0);
-}
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 295 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_ADDRESS_REG;
-	vs10_lval.reg.index = atoi(&yytext[1]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 304 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_VERTEX_ATTRIB_REG;
-	vs10_lval.reg.index = atoi(&yytext[1]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 313 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_TEMPORARY_REG;
-	vs10_lval.reg.index = atoi(&yytext[1]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 322 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_CONSTANT_MEM_REG;
-	vs10_lval.reg.index = atoi(&yytext[1]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 331 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_TEXTURE_RESULT_REG;
-	vs10_lval.reg.index = atoi(&yytext[2]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 340 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_COLOR_RESULT_REG;
-	vs10_lval.reg.index = atoi(&yytext[2]);
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 349 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_FOG_RESULT_REG;
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 357 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_POSITION_RESULT_REG;
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 365 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.reg.type = TYPE_POINTS_RESULT_REG;
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return REGISTER;
-}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 373 "vs1.0_tokens.l"
-{
-
-	unsigned int offset;
-	
-    offset = strcspn(yytext, " \t\n_");
-	yyless(offset);
-
-	OPCODEMAP *opcodeMap = FindOpcode(yytext);
-	if ( opcodeMap != NULL )
-	{
-//		fprintf( stderr, "%s\t", opcodeMap->string );
-		return( opcodeMap->tokenName );
-	}
-	else
-	{
-		gTempParseMacro = FindMacro(yytext);
-
-		if (gTempParseMacro != NULL)
-		{
-			if (gIncludeStackIndex >= MAX_INCLUDE_DEPTH )
-			{
-				LexError("macros nested too deeply");
-				exit( 1 );
-			}
-
-			if (gTempParseMacro->firstMacroLines != NULL)
-			{
-
-				gTempMacro = (MACROENTRY *)malloc(sizeof(MACROENTRY));
-				if (gTempMacro == NULL)
-				{
-					LexError("Out of memory allocating MACROENTRY structure.\n");
-				}
-				else
-				{
-
-					gTempMacro->next = NULL;
-					gTempMacro->prev = NULL;
-					gTempMacro->macroName = NULL;
-					gTempMacro->firstMacroParms = NULL;
-					gTempMacro->lastMacroParms = NULL;
-					gTempMacro->firstMacroLines = NULL;
-					gTempMacro->lastMacroLines = NULL;
-					gTempMacro->numParms = 0;
-					gTempMacro->nLines = 0;
-
-					gbTempInsideMacro = true;		// flag we are currently doing a macro replace.
-					gInvokeState = YYSTATE;
-					if (gTempParseMacro->numParms > 0)
-					{
-						BEGIN(MACROPARMSTART);
-					}
-					else
-					{
-						EndMacroParms();
-						gbTempInsideMacro = false;	// no longer waiting for macro invocation
-					}
-
-					
-				}
-			}
-		}
-		else
-		{
-//			fprintf( stderr, "Opcode: \"%s\" not found\n", yytext );
-			REJECT;
-		}
-	}
-
-	//unsigned int offset;
-	//
-	//INSTRMAP *opcodeMap;
-	//
-	//offset = strcspn(yytext, " \t\n_");
-	//yyless(offset);	
-	//opcodeMap = FindInstruction(yytext);
-	//if (opcodeMap == NULL)
-	//{
-	//	REJECT;
-	//}
-	//
-	//yylval.opcodeInfo.opcodeMap = opcodeMap;
-	//
-	//return OPCODE;
-}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 460 "vs1.0_tokens.l"
-{
-//	fprintf( stderr, "%s", yytext );
-	char *cmt = new char[yyleng+1];
-	strncpy( cmt, yytext, yyleng );
-	cmt[0] = '#';
-	cmt[yyleng] = '\0';
-	vs10_lval.comment = cmt;
-	return COMMENT;
-}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 470 "vs1.0_tokens.l"
-{
-//	fprintf( stderr, "%s", yytext );
-	char *cmt = new char[yyleng+1];
-	strncpy( cmt+1, yytext+1, yyleng-1 );
-	cmt[0] = '#';
-	cmt[1] = ' ';
-	cmt[yyleng] = '\0';
-	vs10_lval.comment = cmt;
-	return COMMENT;
-}
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 481 "vs1.0_tokens.l"
-{
-	fprintf( stderr, "COISSUE found\n" );
-	yyless(yyleng-1);
-	//return COISSUE;
-}
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 487 "vs1.0_tokens.l"
-{
-	fprintf( stderr, "COISSUE found\n" );
-	//return COISSUE;
-}
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 492 "vs1.0_tokens.l"
-{
-	gCommentStartLine = yylineno;
-	yyless(0);
-	BEGIN(EATCOMMENT);
-}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 498 "vs1.0_tokens.l"
-{ 
-	BEGIN(INCLUDE);
-}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 502 "vs1.0_tokens.l"
-{	/* got the include file name */
-
-//	FILE *newyyin;
-char *newyyin;
-	char incFileName[1024];
-	unsigned long sLen;
-	bool validFileName;
-
-	if ( gIncludeStackIndex >= MAX_INCLUDE_DEPTH )
-	{
-		LexError("Includes nested too deeply, aborting\n");
-		exit( 1 );
-	}
-
-//	GenDebugLine();
-//	GenListString();
-	yylineno++;
-	gLinesAssembled++;
-
-	validFileName = true;
-	// zap "" and <>
-	if ((yytext[0] == '"') || (yytext[0] == '<'))
-	{
-		char *endQuote;
-		endQuote = strchr(&yytext[1], yytext[0]);
-		sLen = (endQuote - yytext)-1;
-		if (endQuote == NULL)
-		{
-			LexError("Unable to open include file %s\n", incFileName);
-			BEGIN(INITIAL);
-			validFileName = false;
-		}
-		else
-		{
-			incFileName[0] ='\0';
-			strncat(incFileName, &yytext[1], sLen);
-		}
-	}
-	else
-	{
-		strcpy(incFileName, yytext);
-	}
-
-	if (validFileName)
-	{
-		sLen = strlen(incFileName);
-		if ((incFileName[sLen-1] == '"') || (incFileName[sLen-1] == '>'))
-		{
-			incFileName[sLen-1] = '\0';
-		}
-
-
-		newyyin = ReadTextFile( incFileName );
-//		newyyin = fopen( incFileName, "r" );
-
-		if ( ! newyyin )
-		{
-			LexError("Unable to open include file %s\n", incFileName);
-			BEGIN(SAVELINE);
-		}
-		else
-		{
-			gIncludeStack[gIncludeStackIndex].fileName = gCurFileName;
-			gIncludeStack[gIncludeStackIndex].lineNo = yylineno;
-//			gIncludeStack[gIncludeStackIndex].fileHandle = yyin;
-			gIncludeStack[gIncludeStackIndex].prevString = myin;
-			gIncludeStack[gIncludeStackIndex].nextString = newyyin;
-			gIncludeStack[gIncludeStackIndex].lastInvokeMacro = gInvokeMacro;
-			gIncludeStack[gIncludeStackIndex].lastParseMacro = gParseMacro;
-			gIncludeStack[gIncludeStackIndex].lastMacroLineParse = gMacroLineParse;
-			gIncludeStack[gIncludeStackIndex].lastbInsideMacro = gbInsideMacro;
-			gIncludeStack[gIncludeStackIndex].lastbInsideInclude = gbInsideInclude;
-			gIncludeStack[gIncludeStackIndex].buffer = YY_CURRENT_BUFFER;
-			gIncludeStack[gIncludeStackIndex].lastbProcessingIFDEF = gbProcessingIFDEF;
-			gIncludeStackIndex++;
-
-			gbProcessingIFDEF = false;
-
-			gCurFileName = strdup(incFileName);
-//			yyin = newyyin;
-			myin = newyyin;
-
-//			GenSwitchFileNames(gCurFileName);
-
-			yylineno = 1;
-
-			yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );
-
-			gbInsideInclude = true;
-
-			BEGIN(SAVELINE);
-		}
-	}
-}
-	YY_BREAK
-case YY_STATE_EOF(EATCOMMENT):
-#line 597 "vs1.0_tokens.l"
-{
-	LexError("End of file reached before end of comment started on line %d.\n", gCommentStartLine);
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 602 "vs1.0_tokens.l"
-{
-	char *endComment;
-	unsigned int keepSize;
-
-	strcpy(gSaveLine, yytext);
-	endComment = strstr(yytext, "*/");
-
-	char *cmt;
-	if (endComment != NULL)
-	{
-		keepSize = (endComment - yytext+2);
-		yyless(keepSize);
-		BEGIN(INITIAL);
-
-		if ( yytext[0] == '/' && yytext[1] == '*' )
-		{
-			cmt = new char[yyleng];
-			strncpy( cmt+3, yytext+2, yyleng-2 );
-			cmt[0] = '#';
-			cmt[1] = ' ';
-			cmt[2] = ' ';
-			cmt[yyleng-1] = '\0';
-		}
-		else
-		{
-			cmt = new char[yyleng];
-			strncpy( cmt+1, yytext, yyleng-2 );
-			cmt[0] = '#';
-			cmt[yyleng-1] = '\0';
-		}
-		vs10_lval.comment = cmt;
-		return COMMENT;
-	}
-	else
-	{
-//		GenDebugLine();
-//		GenListString();
-		gLinesAssembled++;
-		yylineno++;
-
-		if ( yytext[0] == '/' && yytext[1] == '*' )
-		{
-			cmt = new char[yyleng+2];
-			strncpy( cmt+3, yytext+2, yyleng-2 );
-			cmt[0] = '#';
-			cmt[1] = ' ';
-			cmt[2] = ' ';
-			cmt[yyleng+1] = '\0';
-		}
-		else
-		{
-			cmt = new char[yyleng+2];
-			strncpy( cmt+1, yytext, yyleng );
-			cmt[0] = '#';
-			cmt[yyleng+1] = '\0';
-		}
-		vs10_lval.comment = cmt;
-		return COMMENT;
-	}
-}
-	YY_BREAK
-case YY_STATE_EOF(DEFSTR):
-#line 663 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of file\n");
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case YY_STATE_EOF(DEFINE):
-#line 668 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of file\n");
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case YY_STATE_EOF(DEFSPACE):
-#line 673 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of file\n");
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case YY_STATE_EOF(INCLUDE):
-#line 678 "vs1.0_tokens.l"
-{
-	LexError("#include was incomplete before end of file\n");
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case YY_STATE_EOF(MACROBODY):
-#line 683 "vs1.0_tokens.l"
-{
-	LexError("End of file reached before end of #define or endm was found, macro started on line %d.\n", gMacroStartLine);
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case YY_STATE_EOF(IFDEFBODY):
-#line 688 "vs1.0_tokens.l"
-{
-	LexError("End of file reached before #endif found, macro started on line %d.\n", gIfDefStartLine);
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 693 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of line\n");
-	BEGIN(SAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 702 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of line\n");
-	BEGIN(SAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 711 "vs1.0_tokens.l"
-{
-	LexError("#define was incomplete before end of line\n");
-	BEGIN(SAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 720 "vs1.0_tokens.l"
-{
-	if (gIfDefStackIndex >= MAX_IFDEF_DEPTH)
-	{
-		LexError("Out of stack space for #ifdef, aborting.\n");
-		exit( 1 );
-	}
-	else
-	{
-		gIfDefStack[gIfDefStackIndex].lastbProcessingIFDEF = gbProcessingIFDEF;
-		gIfDefStack[gIfDefStackIndex].lastbIFDEF = gbIFDEF;
-		gIfDefStack[gIfDefStackIndex].lastbCompareDefine = gbCompareDefine;
-		gIfDefStack[gIfDefStackIndex].lastIfDefStartLine = gIfDefStartLine;
-		gIfDefStackIndex++;
-		gIfDefStartLine = yylineno;
-
-		gbCompareDefine = true;
-		BEGIN(IFDEFNAME);
-	}
-}
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 740 "vs1.0_tokens.l"
-{
-	if (gIfDefStackIndex >= MAX_IFDEF_DEPTH)
-	{
-		LexError("Out of stack space for #ifdef, aborting.\n");
-		exit( 1 );
-	}
-	else
-	{
-		gIfDefStack[gIfDefStackIndex].lastbProcessingIFDEF = gbProcessingIFDEF;
-		gIfDefStack[gIfDefStackIndex].lastbIFDEF = gbIFDEF;
-		gIfDefStack[gIfDefStackIndex].lastbCompareDefine = gbCompareDefine;
-		gIfDefStack[gIfDefStackIndex].lastIfDefStartLine = gIfDefStartLine;
-		gIfDefStackIndex++;
-		gIfDefStartLine = yylineno;
-
-		gbCompareDefine = false;
-		BEGIN(IFDEFNAME);
-	}
-}
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 760 "vs1.0_tokens.l"
-{
-	if (!gbProcessingIFDEF)
-	{
-		LexError("Unexpected #else found at line %d, skipping.\n", yylineno);
-	}
-	else
-	{
-		gbCompareDefine = !gbCompareDefine;
-		BEGIN(INITIAL);
-	}
-}
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 772 "vs1.0_tokens.l"
-{
-	char *defineName;
-	unsigned int sLen;
-
-
-	defineName = FindAlphaNum(yytext, &sLen);
-	if (defineName == NULL)
-	{
-		defineName = strdup(yytext);
-		defineName[yyleng-1] = '\0';	// kill \n
-		LexWarning("Mangled name (%s) for #ifdef, assuming not defined.\n", defineName);
-		free(defineName);
-		gbIFDEF = false;
-	}
-	else
-	{
-		if (FindNMacro(defineName, sLen) != NULL)
-		{
-			gbIFDEF = true;
-		}
-		else
-		{
-			gbIFDEF = false;
-		}
-	}
-
-	gbProcessingIFDEF = true;
-	if (gbIFDEF != gbCompareDefine)
-	{
-		BEGIN(IFDEFBODY);
-	}
-	else
-	{
-		BEGIN(SAVELINE);
-	}
-
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 814 "vs1.0_tokens.l"
-{
-	if (!gbProcessingIFDEF)
-	{
-		LexError("Unexpected #endif found at line %d, skipping.\n", yylineno);
-	}
-	else
-	{
-		gIfDefStackIndex--;
-		gbProcessingIFDEF = gIfDefStack[gIfDefStackIndex].lastbProcessingIFDEF;
-		gbIFDEF = gIfDefStack[gIfDefStackIndex].lastbIFDEF;
-		gbCompareDefine = gIfDefStack[gIfDefStackIndex].lastbCompareDefine;
-		gIfDefStartLine = gIfDefStack[gIfDefStackIndex].lastIfDefStartLine;
-
-	}
-
-	if (YYSTATE == IFDEFBODY)
-	{
-		strncpy(gSaveLine, yytext, MAXSAVELINE);
-	}
-
-	BEGIN(ENDMACRO);
-
-}
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 838 "vs1.0_tokens.l"
-{
-	LexWarning("Garbage at end of #endif or endm will be ignored.\n");
-}
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 842 "vs1.0_tokens.l"
-{
-	BEGIN(SAVELINE);
-	return '\n';
-}
-	YY_BREAK
-case YY_STATE_EOF(ENDMACRO):
-#line 847 "vs1.0_tokens.l"
-{
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 851 "vs1.0_tokens.l"
-{
-	// eat line, because we are not in a TRUE #ifdef, or FALSE #ifndef
-	strncpy(gSaveLine, yytext, MAXSAVELINE);
-}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 856 "vs1.0_tokens.l"
-{
-	strcat(gSaveLine, yytext);
-//	GenDebugLine();
-//	GenListString();
-	yylineno++;
-	gLinesAssembled++;
-}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 864 "vs1.0_tokens.l"
-{ 
-	gbProcessingDefine = true;
-	gMacroStartLine = yylineno;
-	gCountParen = 0;
-	BEGIN(MACRONAME); 
-} 
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 871 "vs1.0_tokens.l"
-{
-	BEGIN(SAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 879 "vs1.0_tokens.l"
-{
-//	unsigned int majorVersion;
-//	unsigned int minorVersion;
-//	int minorOffset;
-//	
-//
-//	majorVersion = (unsigned int)(atoi(&yytext[3]));
-//	// skip "ps." + second '.'
-//	minorOffset = strcspn(&yytext[3], ".")+4;
-//	minorVersion = (unsigned int)(atoi(&yytext[minorOffset]));
-//	yylval.ival = D3DVS_VERSION(majorVersion, minorVersion);
-//
-
-//	fprintf( stderr, "%s", yytext );
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-	return VERTEX_SHADER;
-}
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 898 "vs1.0_tokens.l"
-{ 
-//	fprintf( stderr, "%s", yytext );
-	vs10_lval.ival = atoi(yytext);
-	return INTVAL;
-}
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 905 "vs1.0_tokens.l"
-{ 
-		BEGIN(MODIFIER);
-//fprintf( stderr, "." );
-		return yytext[0];
-}
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 911 "vs1.0_tokens.l"
-{
-//	fprintf( stderr, "%s", yytext );
-	BEGIN(INITIAL);
-
-	vs10_lval.mask[0] = tolower(yytext[0]);
-	vs10_lval.mask[1] = tolower(yytext[1]);
-	vs10_lval.mask[2] = tolower(yytext[2]);
-	vs10_lval.mask[3] = tolower(yytext[3]);
-
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-
-	return XYZW_MODIFIER;
-
-#if 0
- 	char temp[6];
-
-	temp[0] = '\0';
-	strncat(temp, yytext, 4);
-	strlwr(temp);
-	vs10_lval.lval = FindSwizzleValue(temp);
-
-	BEGIN(INITIAL);
-	return SWIZZLE_MODIFIER;
-#endif
-
-}
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 939 "vs1.0_tokens.l"
-{
-//	fprintf( stderr, "%s", yytext );
-	BEGIN(INITIAL);
-
-	int validLen = strspn(yytext, "xyzw");
-        int i;
-	for ( i = 0; i < validLen; i++ )
-		vs10_lval.mask[i] = tolower( yytext[i] );
-	while ( i < 4 )
-	{
-		vs10_lval.mask[i] = 0;
-		i++;
-	}
-
-	if ( yytext[yyleng-1] == '\n' )
-		line_incr = 1;
-
-	return XYZW_MODIFIER;
-
-#if 0
- 	//char temp[6];
- 	char *temp = new char[6];
-	unsigned int registerMask;
-	unsigned int validLen;
-
-	temp[0] = '\0';
-	validLen = strspn(yytext, "xyzw");
-	strncat(temp, yytext,  validLen);
-	for ( int i = 0; i < validLen; i++ )
-		temp[i] = tolower( temp[i] );
-	registerMask = MakeRegisterMask(temp);
-
-	if (registerMask != 0)
-	{
-		//vs10_lval.sval = temp;
-		vs10_lval.lval = registerMask;
-		BEGIN(INITIAL);
-		return XYZW_MODIFIER;
-	}
-	else
-	{
-		//vs10_lval.sval = temp;
-		vs10_lval.lval = FindSwizzleValue(temp);
-		BEGIN(INITIAL);
-		return SWIZZLE_MODIFIER;	
-	}
-#endif
-}
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 988 "vs1.0_tokens.l"
-{
-		BEGIN(INITIAL);
-		yyless(0);
-}
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 993 "vs1.0_tokens.l"
-{
-	/* setup and save off #define/macro name */
-	if (FindMacro(yytext) != NULL)
-	{
-		LexWarning("Redefinition of #define/macro %s, ignoring.\n", yytext);
-		if (gbProcessingDefine)
-		{
-			BEGIN(EATDEFINE);
-		}
-		else
-		{
-			BEGIN(EATMACRO);
-		}
-	}
-	else
-	{
-
-		BEGIN(MACROPARMSTART);
-		// %%%%% This should be setup to use memory pools
-		gTempMacro = (MACROENTRY *)malloc(sizeof(MACROENTRY));
-		if (gTempMacro == NULL)
-		{
-			LexError("Out of memory for macro table.\n");
-			if (gbProcessingDefine)
-			{
-				BEGIN(EATDEFINE);
-			}
-			else
-			{
-				BEGIN(EATMACRO);
-			}
-		}
-		else
-		{
-			gTempMacro->prev = gLastMacro;
-			gTempMacro->next = NULL;
-
-			gTempMacro->firstMacroParms = NULL;
-			gTempMacro->lastMacroParms = NULL;
-			gTempMacro->firstMacroLines = NULL;
-			gTempMacro->lastMacroLines = NULL;
-			gTempMacro->numParms = 0;
-			gTempMacro->bIsDefine = gbProcessingDefine;
-			gTempMacro->nLines = 0;
-
-			if (gCurFileName != NULL)
-			{
-				gTempMacro->fileName = strdup(gCurFileName);
-			}
-			else
-			{
-				gTempMacro->fileName = NULL;
-			}
-
-			gTempMacro->lineNo = yylineno;
-
-			/* %%%%% this should be set up in memory pools. */
-			gTempMacro->macroName = (char *)malloc(strlen(yytext)+1);
-			if (gTempMacro->macroName == NULL)
-			{
-				LexError("Out of memory for string table.\n");
-				SAFEFREE(gTempMacro);
-				if (gbProcessingDefine)
-				{
-					BEGIN(EATDEFINE);
-				}
-				else
-				{
-					BEGIN(EATMACRO);
-				}
-			}
-			else
-			{
-				strcpy(gTempMacro->macroName, yytext);
-			}
-		}
-	}
-}
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 1072 "vs1.0_tokens.l"
-{
-	LexError("No macro name specified, skipping macro definition.\n");
-	SAFEFREE(gTempMacro->fileName);
-	SAFEFREE(gTempMacro);
-	if (gbProcessingDefine)
-	{
-		BEGIN(EATDEFINE);
-	}
-	else
-	{
-		BEGIN(EATMACRO);
-	}
-
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 1091 "vs1.0_tokens.l"
-{
-	gCountParen++; 
-}
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 1095 "vs1.0_tokens.l"
-{}
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 1097 "vs1.0_tokens.l"
-{
-	if (gbProcessingDefine && (gCountParen == 0))
-	{
-		EndMacroParms();
-	}
-	else
-	{
-		BEGIN(MACROPARM);
-	}
-	yyless(0);
-}
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 1109 "vs1.0_tokens.l"
-{ 
-	if ((gCountParen == 0) && gbProcessingDefine)
-	{
-		EndMacroParms();
-	}
-}
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 1116 "vs1.0_tokens.l"
-{
-	if (gCountParen == 0)
-	{
-		EndMacroParms();
-	}	
-}
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 1123 "vs1.0_tokens.l"
-{}
-	YY_BREAK
-case YY_STATE_EOF(MACROPARM):
-#line 1125 "vs1.0_tokens.l"
-{
-	EndMacroParms();
-//	GenDebugLine();
-//	GenListString();
-	yylineno++;
-	gLinesAssembled++;
-	BEGIN(INITIAL);
-}
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 1134 "vs1.0_tokens.l"
-{
-	if (gbProcessingDefine && (gCountParen > 0))
-	{
-		LexError("Malformed #define, skipping.\n");
-		BEGIN(SAVELINE);
-	}
-	else
-	{
-		EndMacroParms();
-//		GenDebugLine();
-//		GenListString();
-		yylineno++;
-		gLinesAssembled++;
-		if (gbProcessingDefine)
-		{
-			gbProcessingDefine = false;
-			BEGIN(SAVELINE);
-		}
-	}
-}
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 1156 "vs1.0_tokens.l"
-{ 
-
-	MACROTEXT *tMacro;
-	char *macroParmEnd;
-	unsigned int startOffset;
-	bool bFoundEndParen;
-	unsigned int leftParenCount;
-	unsigned int rightParenCount;
-
-	bFoundEndParen = false;
-
-	// sheesh, we gotta count the parenthesis....
-	macroParmEnd = yytext;
-	leftParenCount = 0;
-	rightParenCount = 0;
-	while (*macroParmEnd)
-	{
-		if (*macroParmEnd == ')')
-		{
-			rightParenCount++;
-		}
-		if (*macroParmEnd == '(')
-		{
-			leftParenCount++;
-		}
-
-		macroParmEnd++;
-	}
-
-	// if we found the last right parenthesis.
-	if (rightParenCount == leftParenCount+1)
-	{
-		// find if we got the last parenthesis on this line
-		macroParmEnd = strrchr(yytext, ')');
-		yyless((macroParmEnd - yytext));
-		BEGIN(MACROPARMEND);
-	}
-
-	startOffset = strspn(yytext, " \t");
-
-	tMacro = SaveMacroText(&yytext[startOffset], gTempMacro->lastMacroParms);
-	if (tMacro == NULL)
-	{
-		LexError("Out of memory for string table for macro parameter(s).\n");
-		FreeMacroEntry(gTempMacro);
-		BEGIN(EATMACRO);
-	}
-	else
-	{
-		// if first one wasn't set then set it
-		if (gTempMacro->firstMacroParms == NULL)
-		{
-			gTempMacro->firstMacroParms = tMacro;
-		}
-
-		gTempMacro->lastMacroParms = tMacro;
-
-		gTempMacro->numParms++;
-	}
-
-}
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 1218 "vs1.0_tokens.l"
-{
-	if (!gbProcessingDefine && !gbTempInsideMacro)
-	{
-		LexError("Malformed  macro, skipping.\n");
-		BEGIN(EATMACRO);
-	}
-	else
-	{
-		gCountParen--;
-
-		// we can get multiple \n's here
-		while (yytext[yyleng-2] == '\n')
-		{
-			yyleng--;
-		}
-		yyless(yyleng);
-
-		// if there isn't a \n on this line, macro starts on this line,
-		// not next, like in a macro definition
-		if (yytext[yyleng-1] != '\n')
-		{
-			EndMacroParms();
-		}
-		else
-		{
-			if (yytext[yyleng-1] == '\n')
-			{
-				gTempMacro->lineNo++;
-			}
-			// count this line
-			gTempMacro->nLines++;
-//			GenDebugLine();
-//			GenListString();
-			EndMacroParms();
-			if (!gbInsideMacro)
-			{
-				yylineno++;
-			}
-
-			gLinesAssembled++;
-		}
-
-	}
-}
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 1263 "vs1.0_tokens.l"
-{
-	if (!gbProcessingDefine && !gbTempInsideMacro)
-	{
-		LexError("Malformed  macro, skipping.\n");
-		BEGIN(EATMACRO);
-	}
-	else
-	{
-
-		// no matter what count this line
-		gTempMacro->nLines++;
-		gCountParen--;
-		EndMacroParms();
-		if (!gbInsideMacro)
-		{
-			yylineno++;
-		}
-
-		gLinesAssembled++;
-	}
-}
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 1285 "vs1.0_tokens.l"
-{
-	if (!gbProcessingDefine && !gbTempInsideMacro)
-	{
-		LexError("Malformed  macro, skipping.\n");
-		BEGIN(EATMACRO);
-	}
-	else
-	{
-		gCountParen--;
-		if (gCountParen == 0)
-		{
-			// no matter what count this line
-			gTempMacro->nLines++;
-			EndMacroParms();
-			if (!gbInsideMacro)
-			{
-				yylineno++;
-			}
-
-			gLinesAssembled++;
-		}
-		else
-		{
-			REJECT;
-		}
-	}
-}
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 1313 "vs1.0_tokens.l"
-{
-	MACROTEXT *tMacro;
-	unsigned int copyLen;
-	char *endLine;
-
-	gSaveLine[0] ='\0';
-	endLine = strchr(yytext, '\\');
-	copyLen = (endLine - yytext);
-	if (copyLen > MAXSAVELINE)
-	{
-		copyLen = MAXSAVELINE;
-	}
-
-	strncat(gSaveLine, yytext, copyLen);
-	strcat(gSaveLine, "\n");
-	tMacro = SaveMacroText(gSaveLine, gLastMacro->lastMacroLines);
-	if (tMacro == NULL)
-	{
-		LexError("Out of memory for string table for macro parameter(s).\n");
-		BEGIN(EATDEFINE);
-	}
-	else
-	{
-		gLastMacro->nLines++;
-		// if first one wasn't set then set it
-		if (gLastMacro->firstMacroLines == NULL)
-		{
-			gLastMacro->firstMacroLines = tMacro;
-		}
-
-		gLastMacro->lastMacroLines = tMacro;
-	}
-
-//	GenDebugLine();
-//	GenListString();
-	yylineno++;
-	gLinesAssembled++;
-}
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 1352 "vs1.0_tokens.l"
-{
-
-	strncpy(gSaveLine, yytext, MAXSAVELINE);
-	if (gbProcessingDefine)
-	{
-		LexError("Malformed #define, skipping.\n");
-	}
-
-	BEGIN(ENDMACRO);
-}
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 1363 "vs1.0_tokens.l"
-{
-		MACROTEXT *tMacro;
-
-		// check if processing #define and only one line, if not then append \n
-		if (!gbProcessingDefine || (gLastMacro->nLines >= 1))
-		{
-			gSaveLine[0] = '\0';
-			strncat(gSaveLine, yytext, MAXSAVELINE);
-			strcat(gSaveLine, "\n");
-			tMacro = SaveMacroText(gSaveLine, gLastMacro->lastMacroLines);
-			gLastMacro->nLines++;
-		}
-		else if (gLastMacro->numParms > 0)	// check if parameters were there
-		{
-			// if so, we need the '\n' appended
-			gMacroLine[0] = '\0';
-			strncat(gMacroLine, yytext, MAXSAVELINE);
-			strcat(gMacroLine, "\n");
-			tMacro = SaveMacroText(gMacroLine, gLastMacro->lastMacroLines);
-			gLastMacro->nLines++;
-		}
-		else	// straight no newline macro replace
-		{
-			tMacro = SaveMacroText(yytext, gLastMacro->lastMacroLines);
-		}
-
-		if (tMacro == NULL)
-		{
-			LexError("Out of memory for string table for macro parameter(s).\n");
-			BEGIN(EATMACRO);
-		}
-		else
-		{
-			// if first one wasn't set then set it
-			if (gLastMacro->firstMacroLines == NULL)
-			{
-				gLastMacro->firstMacroLines = tMacro;
-			}
-
-			gLastMacro->lastMacroLines = tMacro;
-		}
-}
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 1406 "vs1.0_tokens.l"
-{
-
-	MACROTEXT *tMacro;
-//	GenDebugLine();
-//	GenListString();
-	yylineno++;
-	gLinesAssembled++;
-	if (gbProcessingDefine)
-	{
-		gbProcessingDefine = false;
-		BEGIN(SAVELINE);
-	}
-	else
-	{
-		// this means \n by itself inside macro body
-		if (((yylineno-1) - gLastMacro->lineNo) !=  gLastMacro->nLines)
-		{
-			strcpy(gMacroLine, "\n");
-			tMacro = SaveMacroText(gMacroLine, gLastMacro->lastMacroLines);
-			gLastMacro->nLines++;
-
-			if (tMacro == NULL)
-			{
-				LexError("Out of memory for string table for macro parameter(s).\n");
-				BEGIN(EATMACRO);
-			}
-			else
-			{
-				// if first one wasn't set then set it
-				if (gLastMacro->firstMacroLines == NULL)
-				{
-					gLastMacro->firstMacroLines = tMacro;
-				}
-
-				gLastMacro->lastMacroLines = tMacro;
-			}
-		}
-	}
-}
-	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 1446 "vs1.0_tokens.l"
-{
-	BEGIN(SAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 1454 "vs1.0_tokens.l"
-{
-	strncpy(gSaveLine, yytext, MAXSAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 1462 "vs1.0_tokens.l"
-{
-	strncpy(gSaveLine, yytext, MAXSAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-}
-	YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 1470 "vs1.0_tokens.l"
-{
-	strncpy(gSaveLine, yytext, MAXSAVELINE);
-//	GenDebugLine();
-//	GenListString();
-	gLinesAssembled++;
-	yylineno++;
-	BEGIN(SAVELINE);
-}
-	YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 1479 "vs1.0_tokens.l"
-{
-
-	gTempParseMacro = FindMacro(yytext);
-
-	if (gTempParseMacro != NULL)
-	{
-		if (gIncludeStackIndex >= MAX_INCLUDE_DEPTH )
-		{
-			LexError("macros nested too deeply");
-			exit( 1 );
-		}
-
-		if (gTempParseMacro->firstMacroLines != NULL)
-		{
-
-			gTempMacro = (MACROENTRY *)malloc(sizeof(MACROENTRY));
-			if (gTempMacro == NULL)
-			{
-				LexError("Out of memory allocating MACROENTRY structure.\n");
-			}
-			else
-			{
-
-				gTempMacro->next = NULL;
-				gTempMacro->prev = NULL;
-				gTempMacro->macroName = NULL;
-				gTempMacro->firstMacroParms = NULL;
-				gTempMacro->lastMacroParms = NULL;
-				gTempMacro->firstMacroLines = NULL;
-				gTempMacro->lastMacroLines = NULL;
-				gTempMacro->numParms = 0;
-				gTempMacro->nLines = 0;
-
-				gbTempInsideMacro = true;		// flag we are currently doing a macro replace.
-				gInvokeState = YYSTATE;
-				if (gTempParseMacro->numParms > 0)
-				{
-					BEGIN(MACROPARMSTART);
-				}
-				else
-				{
-					EndMacroParms();
-					gbTempInsideMacro = false;	// no longer waiting for macro invocation
-				}				
-			}
-		}
-	}
-	else
-	{
-		BEGIN(INITIAL);
-		REJECT;
-	}
-}
-	YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 1533 "vs1.0_tokens.l"
-{ 
-//    fprintf( stderr, "%c ", yytext[0] );
-	return yytext[0];
-}
-	YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 1539 "vs1.0_tokens.l"
-{}
-	YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 1541 "vs1.0_tokens.l"
-{
-	LexError("Didn't find label string for #define.\n");
-	BEGIN(SAVELINE);
-//	return '\n';
-}
-	YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 1547 "vs1.0_tokens.l"
-{
-//fprintf(stderr, "\n");
-//	line_incr = 1;
-	line_incr++;
-	BEGIN(SAVELINE);
-	return '\n';
-}
-	YY_BREAK
-case 67:
-YY_RULE_SETUP
-#line 1555 "vs1.0_tokens.l"
-{
-	BEGIN(INITIAL);
-//	fprintf( stderr, "%s", yytext );
-	if (yyleng == 1)
-		return yytext[0];
-	else
-		LexError("Unrecognized Token: %s\n", yytext);
-	return UNKNOWN_STRING;
-}
-	YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 1565 "vs1.0_tokens.l"
-{
-//	vs10_lval.ival = yytext[0];
-	LexError("Illegal character: %d decimal.\n", yytext[0]);
-	return(ILLEGAL);
-}
-	YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 1571 "vs1.0_tokens.l"
-{
-//	vs10_lval.ival = yytext[0];
-	LexError("Illegal character: %d decimal.\n", yytext[0]);
-	return(ILLEGAL); 
-}
-	YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 1577 "vs1.0_tokens.l"
-{
-	return yytext[0];
-}
-	YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 1581 "vs1.0_tokens.l"
-{
-	BEGIN(EATSTRING);
-	yyless(0);
-}
-	YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(SKIPLINE):
-case YY_STATE_EOF(EATSTRING):
-case YY_STATE_EOF(SAVELINE):
-case YY_STATE_EOF(MACRONAME):
-case YY_STATE_EOF(EATMACRO):
-case YY_STATE_EOF(EATDEFINE):
-case YY_STATE_EOF(MODIFIER):
-case YY_STATE_EOF(MACROPARMSTART):
-case YY_STATE_EOF(IFDEFNAME):
-case YY_STATE_EOF(MACROPARMEND):
-#line 1586 "vs1.0_tokens.l"
-{
-	bool wasInMacro;
-	bool oneLiner;
-	char *macroText;
-
-	wasInMacro = gbInsideMacro;
-	oneLiner = false;
-
-
-	// if we are inside the macro then do next line until their are no more
-	if (gbInsideMacro)
-	{
-		oneLiner = (gParseMacro->nLines == 0);
-
-		// free the temporary parameter replaced line we were working on.
-		// get next line in macro text, if any
-		gMacroLineParse = gMacroLineParse->next;
-		// more lines to parse?
-		if (gMacroLineParse != NULL)
-		{
-			macroText = gMacroLine;
-			// if no replacement text, just use source line
-			if (gParseMacro->firstMacroParms == NULL)
-			{
-				macroText = gMacroLineParse->macroText;
-			}
-			else
-			{
-				// replace the macro parameters
-				ReplaceMacroParms(gMacroLineParse->macroText, gMacroLine, gParseMacro, gInvokeMacro);
-			}
-
-//			if (gExpandMacros)
-//			{
-//				strcpy(gSaveLine, macroText);
-//			}
-
-			BEGIN(INITIAL);
-			// and lex it.
-			yy_scan_string(macroText);
-		}
-		else
-		{
-			// no more lines in this macro, so free the working macro
-			SAFEFREE(gInvokeMacro);
-			// shut off flag for inside a macro replacement state.
-			gbInsideMacro = false;
-		}
-	}
-
-	if (gbProcessingIFDEF && !wasInMacro)
-	{
-		LexError("End of file reached before #endif found, macro started on line %d.\n", gIfDefStartLine);
-	}
-
-	if (!gbInsideMacro)
-	{
-		if ( gIncludeStackIndex == 0 )
-		{
-			if (!gbProcessingBuiltIn)
-				CleanUp();
-			return 0;
-//			return TOKEN_EOF;
-		}
-		else
-		{
-			yy_delete_buffer( YY_CURRENT_BUFFER );
-			SAFEFREE(gCurFileName);
-//			SAFEDELETE(myin);
-//			SAFECLOSE(yyin);
-		}
-
-		gIncludeStackIndex--;
-		SAFEDELETEARRAY( gIncludeStack[gIncludeStackIndex].nextString );
-		yy_switch_to_buffer(gIncludeStack[gIncludeStackIndex].buffer );
-		gCurFileName = gIncludeStack[gIncludeStackIndex].fileName;
-//		yyin = gIncludeStack[gIncludeStackIndex].fileHandle;
-		myin = gIncludeStack[gIncludeStackIndex].prevString;
-		yylineno = gIncludeStack[gIncludeStackIndex].lineNo;
-		gInvokeMacro = gIncludeStack[gIncludeStackIndex].lastInvokeMacro;
-		gParseMacro = gIncludeStack[gIncludeStackIndex].lastParseMacro;
-		gMacroLineParse = gIncludeStack[gIncludeStackIndex].lastMacroLineParse;
-		gbInsideInclude = gIncludeStack[gIncludeStackIndex].lastbInsideInclude;
-		gbInsideMacro = gIncludeStack[gIncludeStackIndex].lastbInsideMacro;
-		gbProcessingIFDEF = gIncludeStack[gIncludeStackIndex].lastbProcessingIFDEF;
-
-		if (!gbInsideMacro && !oneLiner)
-		{
-//			GenSwitchFileNames(gCurFileName);
-			BEGIN(SAVELINE);
-		}
-		else
-		{
-			BEGIN(INITIAL);
-		}
-
-		// gSaveLine was last line saved, before macro invocation
-		if (wasInMacro && !gbInsideMacro && !oneLiner)
-		{
-//			GenDebugLine();
-//			GenListString();
-			gLinesAssembled++;
-			yylineno++;
-		}
-
-	}
-
-}
-	YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 1695 "vs1.0_tokens.l"
-ECHO;
-	YY_BREAK
-#line 2908 "_vs1.0_lexer.cpp"
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-	yy_current_state += YY_AT_BOL();
-	yy_state_ptr = yy_state_buf;
-	*yy_state_ptr++ = yy_current_state;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 4);
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 329 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		*yy_state_ptr++ = yy_current_state;
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-
-	register YY_CHAR yy_c = 4;
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 329 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 328);
-	if ( ! yy_is_jam )
-		*yy_state_ptr++ = yy_current_state;
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-	yy_current_buffer->yy_at_bol = (c == '\n');
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-// This function is never referenced under these specific conditions
-// Removes a warning
-#if !defined(YY_USES_REJECT) && defined(YY_NO_PUSH_STATE)
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 1695 "vs1.0_tokens.l"
-
-
-
-//=====================================================================
-// Function:	FindNMacro
-// Description:	Look through macros and see if it had been predefined
-// Parameters:	findName = name to lookup
-//				sLen = # characters valid in source (findName)
-// Returns:		MACROENTRY * = pointer to macro entry if found
-//=====================================================================
-MACROENTRY *FindNMacro(char *findName, unsigned int sLen)
-{
-	MACROENTRY *curEntry;
-
-	curEntry = gLastMacro;
-	while (curEntry != NULL)
-	{
-		if (strlen(curEntry->macroName) == sLen)
-		{
-			if (!strncmp(curEntry->macroName, findName, sLen))
-			{
-				break;
-			}
-		}
-
-		curEntry = curEntry->prev;
-	}
-
-	return curEntry;
-	
-}
-
-//=====================================================================
-// Function:	FindMacro
-// Description:	Look through macros and see if it had been predefined
-// Parameters:	findName = name to lookup
-// Returns:		MACROENTRY * = pointer to macro entry if found
-//=====================================================================
-MACROENTRY *FindMacro(char *findName)
-{
-	MACROENTRY *curEntry;
-
-	curEntry = gLastMacro;
-	while (curEntry != NULL)
-	{
-		if (!strcmp(curEntry->macroName, findName))
-		{
-			break;
-		}
-
-		curEntry = curEntry->prev;
-	}
-
-	return curEntry;
-	
-}
-
-//=====================================================================
-// Function:	CleanUp
-// Description:	Clean up the #define strings
-// Parameters:	.
-// Returns:		.
-//=====================================================================
-void CleanUp()
-{
-	void *tPtr;
-
-	// free up the macros that were alloced
-	while (gLastMacro != NULL)
-	{
-
-		FreeMacroEntry(gLastMacro);
-
-		tPtr = gLastMacro;
-		gLastMacro = gLastMacro->prev;
-		SAFEFREE(tPtr);
-	}
-
-}
-
-//=====================================================================
-// Function:	FreeMacroEntry
-// Description:	Frees up the macro entry data, (parms, lines of text)
-// Parameters:	macEntry = pointer to the MACROENTRY structure
-// Returns:		.
-//=====================================================================
-void FreeMacroEntry(MACROENTRY *macEntry)
-{
-	MACROTEXT *tText;
-	MACROTEXT *tNext;
-
-	SAFEFREE(macEntry->macroName);
-	SAFEFREE(macEntry->fileName);
-	// free the macro lines that were alloced
-	tText = macEntry->lastMacroLines;
-	while (tText != NULL)
-	{
-		tNext = tText->prev;
-		SAFEFREE(tText);
-		tText = tNext;
-	}
-
-	// free the text of the macro parms that were alloced
-	tText = macEntry->lastMacroParms;
-	while (tText != NULL)
-	{
-		tNext = tText->prev;
-		SAFEFREE(tText);
-		tText = tNext;
-	}
-}
-
-//=====================================================================
-// Function:	CheckMacroFunctions
-// Description:	Find if this text is a builtin macro function
-// Parameters:	lookString = non-null terminated string of possible
-//				and if found set global macro function call
-// Returns:		.
-//=====================================================================
-void CheckMacroFunctions(char *lookString, unsigned int *recognizedLen, char **invString)
-{
-
-	unsigned int i;
-	unsigned int sLen;
-	
-	for (i=0; i< NUM_MACRO_FUNCTIONS; i++)
-	{
-		sLen = strlen(gMacroFunctions[i].name);
-		if (!strncmp(gMacroFunctions[i].name, lookString, sLen))
-		{
-			gMacroCallFunction = gMacroFunctions[i].function;
-			*recognizedLen = sLen;
-			*invString = NULL;
-			return;
-		}
-	}
-}
-
-//=====================================================================
-// Function:	FindAlphaNum
-// Description:	Find a whole alpha numeric string, ie consists of
-//				[A-Za-z0-9_] only
-// Parameters:	srcStr = source string to search through.
-//				sLen = unsinged int pointer to length of string found
-// Returns:		pointer to found start of string.
-//				NULL if none.
-//=====================================================================
-char *FindAlphaNum(char *srcStr, unsigned int *sLen)
-{
-	char curChar;
-	char *foundStr;
-
-	while (*srcStr != '\0')
-	{
-		curChar = toupper(*srcStr);
-		if ((curChar >= 'A') && (curChar <= 'Z'))
-			break;
-
-		if ((curChar >= '0') && (curChar <='9'))
-			break;
-
-		if (curChar == '_')
-			break;
-
-		srcStr++;
-	}
-
-	if (*srcStr == '\0')
-	{
-		return NULL;
-	}
-
-	foundStr = srcStr;
-
-	*sLen = 0;
-	// now search for end of string of [A-Za-z0-9_]
-	while (*srcStr != '\0')
-	{
-		curChar = toupper(*srcStr);
-		if ((curChar < 'A') || (curChar > 'Z'))
-		{
-			if ((curChar < '0') || (curChar > '9'))
-			{
-				if (curChar != '_')
-					break;
-			}
-		}
-
-		(*sLen)++;
-		srcStr++;
-	}
-
-	return foundStr;
-
-}
-
-//=====================================================================
-// Function:	FindDefineParm
-// Description:	Find if the MACROENTRY->macroText linked list contains
-//				replaceable parameters.
-// Parameters:	srcParms = pointer to MACROENTRY structure for source
-//						parameters
-//				invParms = MACROENTRY pointer to invocation parameters
-//				lookString = non-null terminated string of possible
-//							replaceable string
-//				recognizedLen = replacement string matched length
-//				invString = invocation string to replace with
-// Returns:		pointer to first character found in lookstring
-//=====================================================================
-char *FindDefineParm(MACROENTRY *srcParms, MACROENTRY *invParms, 
-						char *lookString, unsigned int *recognizedLen, char **invString)
-{
-	MACROTEXT *srcText;
-	MACROTEXT *invText;
-	char *checkStr;
-	unsigned int checkLen = 0;
-	unsigned int sLen;
-
-	checkStr = lookString;
-	*invString = NULL;
-
-	// first search for first [A-Za-z0-9_] only string
-	checkStr = FindAlphaNum(lookString, &checkLen);
-
-	while (checkStr != NULL)
-	{
-		// check all the #define parameters for match
-		srcText = srcParms->firstMacroParms;
-		invText = invParms->firstMacroParms;
-		while (srcText)
-		{
-			sLen = strlen(srcText->macroText);
-			// lengths should match
-			if (sLen == checkLen)
-			{
-				if (!strncmp(checkStr, srcText->macroText, checkLen))
-				{
-					// it matched so return replacement text
-					*invString = invText->macroText;
-					// and length that we reconized
-					*recognizedLen = checkLen;
-					return checkStr;
-				}
-			}
-
-			srcText = srcText->next;
-			invText = invText->next;
-		}
-
-		// not found yet, so go to next string.
-		checkStr = FindAlphaNum(checkStr+checkLen, &checkLen);
-	}
-
-	return NULL;
-}
-
-//=====================================================================
-// Function:	FindReplaceParm
-// Description:	Find if the MACROENTRY->macroText linked list contains
-//				a replaceable parameters.
-// Parameters:	srcParms = pointer to MACROENTRY structure for source
-//						parameters
-//				invParms = MACROENTRY pointer to invocation parameters
-//				lookString = non-null terminated string of possible
-//							replaceable string
-//				recognizedLen = replacement string matched length
-//				invString = invocation string to replace with
-// Returns:		.
-//=====================================================================
-void FindReplaceParm(MACROENTRY *srcParms, MACROENTRY *invParms, 
-						char *lookString, unsigned int *recognizedLen, char **invString)
-{
-	unsigned int sLen;
-	MACROTEXT *srcText;
-	MACROTEXT *invText;
-
-	*recognizedLen = 0;
-	*invString = NULL;
-
-	srcText = srcParms->firstMacroParms;
-	invText = invParms->firstMacroParms;
-
-	if (srcText != NULL)
-	{
-		// go until srcText # strings ends
-		while (srcText != NULL)
-		{
-			sLen = strlen(srcText->macroText);
-			if (!strncmp(srcText->macroText, lookString, sLen))
-			{
-				// found it so return src, replacement string
-				*recognizedLen = strlen(srcText->macroText);
-				*invString = invText->macroText;
-				// call function macro if it was invoked prior.
-				if (gMacroCallFunction != NULL)
-				{
-					gMacroCallFunction(lookString, recognizedLen, invString);
-					gMacroCallFunction = NULL;
-				}
-				return;
-			}
-
-			srcText = srcText->next;
-			invText = invText->next;
-		}
-	}
-
-	// ok, it wasn't found, look through builtin macro functions
-	CheckMacroFunctions(lookString, recognizedLen, invString);
-}
-
-//=====================================================================
-// Function:	ReplaceMacroParms
-// Description:	Replace macro parameters when macro was defined, with
-//				those specified on the macro invocation line
-// Parameters:	srcLine = source line to replace src macro parms with
-//				destLine = destination line save to.
-//				invocation macro parameters.
-//				parseMacro = currently parsing macro entry
-//				invParms = invocation macro entry
-// Returns:		.
-//=====================================================================
-void ReplaceMacroParms(char *srcLine, char *destLine, 
-							MACROENTRY *srcParms, MACROENTRY *invParms)
-{
-	char *findReplace;
-	char *invString;
-	unsigned int sLen;
-	unsigned int dLen;
-	unsigned int copyLen;
-	unsigned int subLen;
-	unsigned int recognizedLen;
-
-	destLine[0]= '\0';
-
-	sLen = strlen(srcLine);
-	dLen = 0;
-
-	while (sLen > 0)
-	{
-		// strtok might work better except it modifies the string, so
-		// kind of do my own....
-		if (!srcParms->bIsDefine)
-		{
-			findReplace = strchr(srcLine, '%');
-			if (findReplace != NULL)
-			{
-				// bypass % sign in findReplacement
-				findReplace++;
-				// figure out length of source before %
-				copyLen = (findReplace - srcLine)-1;
-				// check if there is a replacement string
-				FindReplaceParm(srcParms, invParms, findReplace, &recognizedLen, &invString);
-			}
-			else
-			{
-				strcat(destLine, srcLine);
-				return;
-			}
-		}
-		else
-		{
-			findReplace = FindDefineParm(srcParms, invParms, srcLine, &recognizedLen, &invString);
-			if (findReplace != NULL)
-			{
-				// figure out length of source before %
-				copyLen = findReplace - srcLine;
-			}
-			else
-			{
-				strcat(destLine, srcLine);
-				return;
-			}
-		}
-
-
-		if (invString != NULL)
-		{
-			// figure out how much we are going to substitute
-			subLen = strlen(invString);
-		}
-		else
-		{
-			subLen = 0;
-		}
-
-		if ((dLen + copyLen + subLen) > MAXSAVELINE)
-		{
-			LexError("Macro string overrun.\n");
-			CleanUp();
-			exit(ERROR_MACRO_OVERRUN);
-		}
-
-		if (copyLen > 0)
-		{
-			strncat(destLine, srcLine, copyLen);
-			dLen += copyLen;
-		}
-
-		srcLine += copyLen;
-		sLen -= copyLen;
-		// in macro so skip % part of variable
-		if (!srcParms->bIsDefine)
-		{
-			// skip %, also
-			srcLine++;
-			sLen--;
-		}
-
-		if (invString != NULL)
-		{
-			strcat(destLine, invString);
-			dLen += strlen(invString);
-		}
-
-		srcLine += recognizedLen;
-		sLen -= recognizedLen;
-	}
-
-}
-
-//=====================================================================
-// Function:	SaveMacroText
-// Description:	Adds a string to a linked list of MACROTEXT structures
-// Parameters:	srcText = pointer to source text to save
-//				lastMacroText = last allocated, or NULL
-// Returns:		newly allocated MACROTEXT structure, or NULL
-//=====================================================================
-MACROTEXT *SaveMacroText(char *srcText, MACROTEXT *lastMacroText)
-{
-	MACROTEXT *curMacroText;
-
-	curMacroText = (MACROTEXT *)malloc(sizeof(MACROTEXT));
-	if (curMacroText == NULL)
-	{
-		return NULL;
-	}
-	else
-	{
-		// no next entry but set up previous with previously alloced macro parameter
-		curMacroText->next = NULL;
-		curMacroText->prev = lastMacroText;
-
-		// if the macroParm pointer is null then we are the first allocated
-		// so if not set the last one allocate next pointer to newly allocated structure
-		if (lastMacroText != NULL)
-		{
-			lastMacroText->next = curMacroText;
-		}
-
-		/* %%%%% this should be set up in memory pools. */
-		curMacroText->macroText = strdup(srcText);
-		if (curMacroText->macroText == NULL)
-		{
-			SAFEFREE(curMacroText);
-			return NULL;
-		}
-	}
-
-	return curMacroText;
-}
-
-//=====================================================================
-// Function:	ParseBuiltInMacroParms
-// Description:	parse parameters of string and fill in MACROENTRY
-//				structure.
-// Parameters:	parsedMacro = pointer to MACROENTRY structure that gets
-//				filled in with parameter pointers and count
-//				parmStr = string to parse parameters from
-// Returns:		false if error
-//=====================================================================
-bool ParseBuiltInMacroParms(MACROENTRY *parsedMacro, char *parmStr)
-{
-	char *endStr;
-	char *foundParm;
-	MACROTEXT *prevMT;
-	MACROTEXT *curMT;
-
-	parsedMacro->numParms = 0;
-	parsedMacro->firstMacroParms = NULL;
-	
-	foundParm = strdup(parmStr);
-	if (foundParm == NULL)
-	{
-		LexError("Out of memory parsing bultin macro parameters.\n");
-		return false;
-	}
-
-	// assume a ')' is on the end.
-	endStr = strrchr(foundParm, ')');
-	if (endStr == NULL)
-	{
-		LexWarning("Ending parenthesis not found for macro %s.\n", parsedMacro->macroName);
-		endStr = foundParm + strlen(foundParm);
-	}
-
-	prevMT = NULL;
-	// strip out and seperate parameters
-	while (foundParm < endStr)
-	{
-		// allocate a macro text structure
-		curMT = (MACROTEXT *)malloc(sizeof(MACROTEXT));
-		if (curMT == NULL)
-		{
-			free(parmStr);
-			LexError("Out of memory parsing bultin macro parameters.\n");
-			return false;
-		} 
-		curMT->next = NULL;
-		curMT->prev = prevMT;
-		parsedMacro->numParms++;
-
-		if (prevMT != NULL)
-		{
-			prevMT->next = curMT;
-		}
-		else
-		{
-			parsedMacro->firstMacroParms = curMT;
-		}
-
-		curMT->macroText = foundParm;
-		// search for next parameters, delimited by comma
-		foundParm = strchr(foundParm, ',');
-		if (foundParm == NULL)
-		{
-			foundParm = endStr;
-			*foundParm = '\0';
-		}
-		else
-		{
-			// skip comma
-			*foundParm = '\0';
-			foundParm++;
-		}
-		prevMT = curMT;
-	}
-
-	return true;
-}
-
-//=====================================================================
-// Function:	MacroMathFunction
-// Description:	Comes here after macro replacement is done to perform
-//				some mathematic function on parameter (macro replacement
-//				 string (ie, register))
-// Parameters:	invMacro = macroentry pointer containing macro information
-//				recognizedLen = # characters recoginized so far
-//				invStr = invoked replacement string so far
-//				mathStr = "-", "+", etc for mathematic function
-// Returns:		new recognizedLen, invStr, with incremented #
-//=====================================================================
-void MacroMathFunction(MACROENTRY *invMacro, unsigned int *recognizedLen, char **invStr,
-						const char *mathStr)
-{
-	char *numStartStr;
-	unsigned int sLen;
-	char numberStr[256];
-	unsigned int number = 0;
-	char *operand;
-
-
-	// verify enough paramters to complete operation
-	if (invMacro->numParms != 2)
-	{
-		LexError("Two parameters are required for %s macro\n", invMacro->macroName);
-		return;
-	}
-
-	// get second macro parm, which is add by amount.
-	operand = invMacro->firstMacroParms->next->macroText;
-
-	// first find inner most bracket if any
-	numStartStr = strrchr(*invStr, ']');
-	if (numStartStr == NULL)
-	{
-		numStartStr = strrchr(*invStr, ')');
-	}
-
-	if (numStartStr != NULL)
-	{
-		if ((strlen(*invStr)+strlen(operand)+1) > MAXREPLACESTRING)
-		{
-			LexError("Out of Temporary string replacement memory inside builtin macro %s\n",
-					invMacro->macroName);
-		}
-		else
-		{
-			sLen = (numStartStr - *invStr);
-			gReplaceText[0] = '\0';
-			strncat(gReplaceText, *invStr, sLen);
-			strcat(gReplaceText, mathStr);
-			strcat(gReplaceText, operand);
-			strcat(gReplaceText, numStartStr);
-			*invStr = gReplaceText;
-		}
-	}
-	else
-	{
-		numStartStr = strpbrk(*invStr, "0123456789");
-		if (numStartStr != NULL)
-		{
-			// put up to number we found
-			sLen = numStartStr - *invStr;
-			if (sLen > MAXREPLACESTRING)
-				goto ErrOut;
-
-			gReplaceText[0] = '\0';
-			strncat(gReplaceText, *invStr, sLen);
-
-			switch (mathStr[0])
-			{
-				case '-':
-					number = atoi(numStartStr)-atoi(operand);
-					break;
-				case '+':
-					number = atoi(numStartStr)+atoi(operand);
-					break;
-			}
-			sprintf(numberStr, "%d", number);
-
-			if ((strlen(gReplaceText) + strlen(numberStr)) > MAXREPLACESTRING)
-				goto ErrOut;
-
-			strcat(gReplaceText, numberStr);
-
-			while ((*numStartStr != '\0') && (*numStartStr >= '0' && *numStartStr <= '9'))
-				numStartStr++;
-
-			if ((strlen(gReplaceText) + strlen(numStartStr)) > MAXREPLACESTRING)
-				goto ErrOut;
-
-			strcat(gReplaceText, numStartStr);
-
-			*invStr = gReplaceText;
-		}
-		else
-		{
-			if ((strlen(*invStr)+strlen(operand)+1) > MAXREPLACESTRING)
-			{
-				LexError("Out of Temporary string replacement memory inside builtin macro %s\n",
-					invMacro->macroName);
-			}
-			else
-			{
-				sprintf(gReplaceText, "%s%s%s", *invStr, mathStr, operand);
-				*invStr = gReplaceText;
-			}
-		}
-	}
-
-
-	return;
-
-ErrOut:
-	LexError("Out of Temporary string replacement memory inside builtin macro %s\n",
-				invMacro->macroName);
-	// skip ')'
-	(*recognizedLen)++;
-}
-
-//=====================================================================
-// Function:	MacroIncFunction
-// Description:	Comes here after macro replacement is done to increment
-//				macro replacement string (ie, register)
-// Parameters:	lookStr = string after '(', so we can get parameters
-//				recognizedLen = # characters recoginized so far
-//				invStr = invoked replacement string so far
-// Returns:		new recognizedLen, invStr, with incremented #
-//=====================================================================
-void MacroIncFunction(char *lookStr, unsigned int *recognizedLen, char **invStr)
-{
-	MACROENTRY tMEntry;
-	MACROTEXT parm1;
-	MACROTEXT parm2;
-
-	tMEntry.macroName = (char *)"%inc()";
-	tMEntry.numParms = 2;
-	tMEntry.firstMacroParms = &parm1;
-	parm1.prev = NULL;
-	parm1.next = &parm2;
-	parm1.macroText = *invStr;
-	parm2.prev = &parm1;
-	parm2.next = NULL;
-	parm2.macroText = (char *)"1";
-
-	MacroMathFunction(&tMEntry, recognizedLen, invStr, "+");
-	// skip ')'
-	(*recognizedLen)++;
-}
-
-//=====================================================================
-// Function:	MacroDecFunction
-// Description:	Comes here after macro replacement is done to decrement
-//				macro replacement string (ie, register)
-// Parameters:	lookStr = string after '(', so we can get parameters
-//				recognizedLen = # characters recoginized so far
-//				invStr = invoked replacement string so far
-// Returns:		new recognizedLen, invStr, with decremented #
-//=====================================================================
-void MacroDecFunction(char *lookStr, unsigned int *recognizedLen, char **invStr)
-{
-	MACROENTRY tMEntry;
-	MACROTEXT parm1;
-	MACROTEXT parm2;
-
-	tMEntry.macroName = (char *)"%dec()";
-	tMEntry.numParms = 2;
-	tMEntry.firstMacroParms = &parm1;
-	parm1.prev = NULL;
-	parm1.next = &parm2;
-	parm1.macroText = *invStr;
-	parm2.prev = &parm1;
-	parm2.next = NULL;
-	parm2.macroText = (char *)"1";
-
-	MacroMathFunction(&tMEntry, recognizedLen, invStr, "-");
-	// skip ')'
-	(*recognizedLen)++;
-}
-
-//=====================================================================
-// Function:	MacroAddFunction
-// Description:	Comes here after macro replacement is done to add
-//				macro replacement string (ie, register)
-// Parameters:	lookStr = string after '(', so we can get parameters
-//				recognizedLen = # characters recoginized so far
-//				invStr = invoked replacement string so far
-// Returns:		new recognizedLen, invStr, with incremented #
-//=====================================================================
-void MacroAddFunction(char *lookStr, unsigned int *recognizedLen, char **invStr)
-{
-	MACROENTRY tMEntry;
-	MACROTEXT *curMT;
-	MACROTEXT *nextMT;
-	unsigned int i;
-
-	tMEntry.macroName = (char *)"%add()";
-	if (strlen(lookStr) > MAXREPLACESTRING)
-	{
-		LexError("Out of Temporary string replacement memory inside builtin macro %add()\n");
-		return;
-	}
-	if (ParseBuiltInMacroParms(&tMEntry, lookStr))
-	{
-		MacroMathFunction(&tMEntry, recognizedLen, invStr, "+");
-		// skip ',' strlen(parm2)+ ')'
-		(*recognizedLen) += strlen(tMEntry.firstMacroParms->next->macroText)+2;
-	}
-
-	curMT = tMEntry.firstMacroParms;
-	// in this case only one string was allocated
-	free(curMT->macroText);
-	for (i=0; i<tMEntry.numParms; i++)
-	{
-		nextMT = curMT->next;
-		free(curMT);
-		curMT = nextMT;
-	}
-}
-
-//=====================================================================
-// Function:	MacroSubFunction
-// Description:	Comes here after macro replacement is done to subtract
-//				macro replacement string (ie, register)
-// Parameters:	invParms, parameters that macro was invoked with
-//				recognizedLen = # characters recoginized so far
-//				invStr = invoked replacement string so far
-// Returns:		new recognizedLen, invStr, with incremented #
-//=====================================================================
-void MacroSubFunction(char *lookStr, unsigned int *recognizedLen, char **invStr)
-{
-	MACROENTRY tMEntry;
-	MACROTEXT *curMT;
-	MACROTEXT *nextMT;
-	unsigned int i;
-
-	tMEntry.macroName = (char *)"%sub()";
-	if (ParseBuiltInMacroParms(&tMEntry, lookStr))
-	{
-		MacroMathFunction(&tMEntry, recognizedLen, invStr, "-");
-		// skip ',' strlen(parm2)+ ')'
-		(*recognizedLen) += strlen(tMEntry.firstMacroParms->next->macroText)+2;
-	}
-	curMT = tMEntry.firstMacroParms;
-	// in this case only one string was allocated
-	free(curMT->macroText);
-	for (i=0; i<tMEntry.numParms; i++)
-	{
-		nextMT = curMT->next;
-		free(curMT);
-		curMT = nextMT;
-	}
-}
-
-//=====================================================================
-// Function:	EndMacroParms
-// Description:	Does update and cleanup one end of macro parameters
-//				is reached
-// Parameters:	.
-// Returns:		.
-//=====================================================================
-void EndMacroParms()
-{
-	char *curFileName;
-	char *macroFileName;
-	char tempStr[1024];
-	char *macroText;
-
-	if (gbTempInsideMacro)
-	{
-		if (gTempParseMacro->numParms != gTempMacro->numParms)
-		{
-			LexError("Macro invocation number of parameters do not match macro definition, skipping\n");
-			BEGIN(INITIAL);
-			SAFEFREE(gTempMacro);
-		}
-		else
-		{
-			// we got all the parameters for the MACRO invocation, so start inside
-			// the macro now, by saving off current state on stack
-			gIncludeStack[gIncludeStackIndex].lineNo = yylineno;
-			gIncludeStack[gIncludeStackIndex].fileName = gCurFileName;
-//			gIncludeStack[gIncludeStackIndex].fileHandle = yyin;
-//fprintf( stderr, "Chris fix this code with myin stuff\n" );
-			gIncludeStack[gIncludeStackIndex].prevString = myin;
-			gIncludeStack[gIncludeStackIndex].nextString = NULL;
-			gIncludeStack[gIncludeStackIndex].lastInvokeMacro = gInvokeMacro;
-			gIncludeStack[gIncludeStackIndex].lastParseMacro = gParseMacro;
-			gIncludeStack[gIncludeStackIndex].lastMacroLineParse = gMacroLineParse;
-			gIncludeStack[gIncludeStackIndex].lastbInsideMacro = gbInsideMacro;
-			gIncludeStack[gIncludeStackIndex].lastbInsideInclude = gbInsideInclude;
-			gIncludeStack[gIncludeStackIndex].buffer = YY_CURRENT_BUFFER;
-			gIncludeStack[gIncludeStackIndex].lastbProcessingIFDEF = gbProcessingIFDEF;
-			gIncludeStackIndex++;
-
-			gParseMacro = gTempParseMacro;
-			gInvokeMacro = gTempMacro;
-			gbInsideMacro = gbTempInsideMacro;
-
-			gbTempInsideMacro = false;
-
-//			yyin = NULL;
-			myin = NULL;
-			curFileName = gCurFileName;
-			if (curFileName == NULL)
-				curFileName = (char *)"";
-
-			macroFileName = gParseMacro->fileName;
-			if (macroFileName == NULL)
-				macroFileName = (char *)"";
-
-			sprintf(tempStr, "%s(%d) : References ->\n%s", curFileName, yylineno, macroFileName); 
-			gCurFileName = strdup(tempStr);
-			gMacroLineParse = gParseMacro->firstMacroLines;
-
-			macroText = gMacroLine;
-			// if no replacement text, just use source line
-			if (gParseMacro->firstMacroParms == NULL)
-			{
-				macroText = gMacroLineParse->macroText;
-			}
-			else
-			{
-				// replace the macro parameters
-				ReplaceMacroParms(gMacroLineParse->macroText, gMacroLine, gParseMacro, gInvokeMacro);
-			}
-
-			yylineno = gParseMacro->lineNo;
-			if (gParseMacro->nLines >= 1)
-			{
-				strcpy(gSaveLine, macroText);
-			}
-
-//			if (gExpandMacros && (gParseMacro->nLines >= 1))
-//			{
-//				// in case there is anything there dump it out
-//				GenDebugLine();
-//				GenListString();			
-//				if (gInvokeMacro->nLines >= 1)
-//					GenSwitchFileNames(macroFileName);
-//			}
-
-			BEGIN(gInvokeState);
-			yy_scan_string(macroText);
-			gInvokeState = INITIAL;
-		}
-	}
-	else
-	{
-		if (gLastMacro != NULL)
-		{
-			gLastMacro->next = gTempMacro;
-		}
-		gLastMacro = gTempMacro;
-		BEGIN(MACROBODY);
-	}
-}
-
-//=====================================================================
-// Function:	FindSwizzleValue
-// Description:	see if valid swizzle value and return the bits
-// Parameters:	swizzleTex = pointer to characters to analyze
-// Returns:		unsigned int = bits for swizzle values, or 0 for error
-//=====================================================================
-unsigned int FindSwizzleValue(char *swizzleText)
-{
-	unsigned int swizzleBits;
-	unsigned int sLen;
-	unsigned int i;
-	unsigned int lastMask;
-
-	sLen = strlen(swizzleText);
-	swizzleBits = 0;
-	lastMask = 0;
-
-	for (i=0; i<sLen; i++)
-	{
-		switch (swizzleText[i])
-		{
-		case 'x':
-			swizzleBits |= (WRITEMASK_X << (4*(3-i)));
-			lastMask = WRITEMASK_X;
-			break;
-		case 'y':
-			swizzleBits |= (WRITEMASK_Y << (4*(3-i)));
-			lastMask = WRITEMASK_Y;
-			break;
-		case 'z':
-			swizzleBits |= (WRITEMASK_Z << (4*(3-i)));
-			lastMask = WRITEMASK_Z;
-			break;
-		case 'w':
-			swizzleBits |= (WRITEMASK_W << (4*(3-i)));
-			lastMask = WRITEMASK_W;
-			break;
-		}
-	}
-
-	for (; i<4; i++)
-	{
-		swizzleBits |= (lastMask << (4*(3-i)));
-	}
-
-	return swizzleBits;
-}
-
-#if 0
-unsigned int FindSwizzleValue(char *swizzleText)
-{
-
-	DWORD swizzleBits;
-	DWORD sLen;
-	DWORD i;
-	DWORD lastIndex;
-
-	sLen = strlen(swizzleText);
-	swizzleBits = 0;
-	lastIndex = 0;
-
-	for (i=0; i<sLen; i++)
-	{
-		switch (swizzleText[i])
-		{
-		case 'x':
-			swizzleBits |= (0 << (D3DVS_SWIZZLE_SHIFT + (i * 2)));
-			lastIndex = 0;
-			break;
-		case 'y':
-			swizzleBits |= (1 << (D3DVS_SWIZZLE_SHIFT + (i * 2)));
-			lastIndex = 1;
-			break;
-		case 'z':
-			swizzleBits |= (2 << (D3DVS_SWIZZLE_SHIFT + (i * 2)));
-			lastIndex = 2;
-			break;
-		case 'w':
-			swizzleBits |= (3 << (D3DVS_SWIZZLE_SHIFT + (i * 2)));
-			lastIndex = 3;
-			break;
-		}
-	}
-
-	for (; i<4; i++)
-	{
-		swizzleBits |= (lastIndex << (D3DVS_SWIZZLE_SHIFT + (i * 2)));
-	}
-
-	return swizzleBits;
-
-	
-}
-#endif
-
-//=====================================================================
-// Function:	FindRegisterMask
-// Description:	Look through register mask strings
-// Parameters:	findName = name to lookup
-// Returns:		unsigned int with token value
-//=====================================================================
-unsigned int MakeRegisterMask(char *findName)
-{
-
-	unsigned int regMask;
-	char *findFirst;
-
-	regMask = 0;
-
-	findFirst = strchr(findName, 'x');
-	if (findFirst != NULL)
-	{
-		if (strchr(findFirst+1, 'x') != NULL)
-		{
-			return 0;
-		}
-
-		regMask |= WRITEMASK_X;
-	}
-
-	findFirst = strchr(findName, 'y');
-	if (findFirst != NULL)
-	{
-		regMask |= WRITEMASK_Y;
-		// invalide write mask, must be swizzle
-		if (strchr(findFirst+1, 'x') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'y') != NULL)
-		{
-			return 0;
-		}
-
-	}
-
-	findFirst = strchr(findName, 'z');
-	if (findFirst != NULL)
-	{
-		regMask |= WRITEMASK_Z;
-		if (strchr(findFirst+1, 'x') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'y') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'z') != NULL)
-		{
-			return 0;
-		}
-	}
-
-	findFirst = strchr(findName, 'w');
-	if (findFirst != NULL)
-	{
-
-		regMask |= WRITEMASK_W;
-		if (strchr(findFirst+1, 'x') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'y') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'z') != NULL)
-		{
-			return 0;
-		}
-
-		if (strchr(findFirst+1, 'w') != NULL)
-		{
-			return 0;
-		}
-	}
-
-	return regMask;
-	
-}
-
-//=====================================================================
-// Function:	LexError
-// Description:	output an error to the stdout
-// Parameters:	typical printf like format
-// Returns:		.
-//=====================================================================
-void LexError(const char *format, ...)
-{
-	char errstring[4096];
-	va_list marker;
-
-//	fprintf( stderr,"(%d) : Error : ", yylineno);
-	if ( gbInsideInclude )
-		{
-		sprintf( errstring, "%s", gCurFileName );
-		sprintf( errstring+strlen(errstring),"(%d) : Error : ", yylineno);
-		}
-	else
-		{
-		sprintf( errstring,"(%d) : Error : ", yylineno);
-		}
-
-	va_start(marker, format);
-//	vprintf(format, marker);
-	vsprintf(errstring+strlen(errstring), format, marker);
-	va_end(marker);
-	errors.set( errstring );
-}
-
-//=====================================================================
-// Function:	LexWarning
-// Description:	output a warning to the stdout
-// Parameters:	typical printf like format
-// Returns:		.
-//=====================================================================
-void LexWarning(const char *format, ...)
-{
-	char errstring[4096];
-	va_list marker;
-
-//	fprintf( stderr,"(%d) : warning : ", yylineno);
-	if ( gbInsideInclude )
-		sprintf( errstring, "%s", gCurFileName );
-	sprintf( errstring+strlen(errstring),"(%d) : Warning : ", yylineno);
-//	sprintf( errstring,"(%d) : Warning : ", yylineno);
-
-	va_start(marker, format);
-//	vprintf(format, marker);
-	vsprintf(errstring+strlen(errstring), format, marker);
-	va_end(marker);
-	errors.set( errstring );
-}
-
-//=====================================================================
-// Function:	DebugUnhandledState
-// Description:	Come here in debug mode, when a state isn't handled
-//				for the Lexer
-// Parameters:	.
-// Returns:		.
-//=====================================================================
-void DebugUnhandledState()
-{
-	fprintf( stderr,"Unhandled state reached, with %s text.\n", yytext);
-}
-
-//=====================================================================
-// Function:	FindOpcode
-// Description:	Look through opcodes and see if in the table
-// Parameters:	findName = name to lookup
-// Returns:		OPCODEMAP * = pointer to opcode map entry, if found
-//=====================================================================
-OPCODEMAP *FindOpcode(char *findName)
-{
-
-	unsigned i;
-
-	// just do linear search for now
-	for (i=0; i<NUMOPCODES; i++)
-	{
-		if (!stricmp(theOpcodes[i].string, findName))
-		{
-			return &theOpcodes[i];
-		}
-
-	}
-
-	return NULL;
-}
-
-char *ReadTextFile(const char * filename)
-{
-	char path[3][32] = { ".\0",
-					     "../../data/programs\0",
-					     "../../../data/programs\0" };
-	char name[8192];
-	int i;
-
-    if (!filename) return 0;
-
-    struct _stat status;
-    int found = 0;
-    for ( i = 0; i < 3; i++ )
-    {
-	sprintf( name, "%s/%s", path[i], filename );
-
-	int fh = ::_open(name, _O_RDONLY);
-
-	if(fh != -1)
-        {
-            int result = _fstat( fh, &status );
-            if( result != 0 )
-            {
-                fprintf( stderr, "An fstat error occurred.\n" );
-                break;
-            }
-            ::_close( fh );
-	    found = i+1;
-            break;
-        }
-    }
-
-    if ( 0 == found )
-	{
-		fprintf(stderr,"Cannot open \"%s\" for stat read!\n", filename);
-		return NULL;
-	}
-    long size = status.st_size;
-
-    char * buf = new char[size+1];
-
-	FILE *fp = 0;
-    if (!(fp = fopen(name, "r")))
-	{
-		fprintf(stderr,"Cannot open \"%s\" for read!\n", name);
-		return NULL;
-	}
-
-	int bytes;
-	bytes = fread(buf, 1, size, fp);
-
-    buf[bytes] = 0;
-
-	fclose(fp);
-	return buf;
-}
-
-bool vs10_init_more();
-
-bool vs10_init(char* inputString)
-{
-	BEGIN(SAVELINE);
-    myin = inputString;
-	line_incr = 0;
-	return vs10_init_more();
-}
-
-#ifndef vs10_wrap
-int vs10_wrap(void)
-{
-  return(1);
-}
-#endif

+ 0 - 1868
CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_parser.cpp

@@ -1,1868 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Written by Richard Stallman by simplifying the original so called
-   ``semantic'' parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* If NAME_PREFIX is specified substitute the variables and functions
-   names.  */
-#define yyparse vs10_parse
-#define yylex   vs10_lex
-#define yyerror vs10_error
-#define yylval  vs10_lval
-#define yychar  vs10_char
-#define yydebug vs10_debug
-#define yynerrs vs10_nerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     VERTEX_SHADER = 258,
-     ADD_INSTR = 259,
-     DP3_INSTR = 260,
-     DP4_INSTR = 261,
-     DST_INSTR = 262,
-     EXP_INSTR = 263,
-     EXPP_INSTR = 264,
-     FRC_INSTR = 265,
-     LIT_INSTR = 266,
-     LOG_INSTR = 267,
-     LOGP_INSTR = 268,
-     M3X2_INSTR = 269,
-     M3X3_INSTR = 270,
-     M3X4_INSTR = 271,
-     M4X3_INSTR = 272,
-     M4X4_INSTR = 273,
-     MAD_INSTR = 274,
-     MAX_INSTR = 275,
-     MIN_INSTR = 276,
-     MOV_INSTR = 277,
-     MUL_INSTR = 278,
-     NOP_INSTR = 279,
-     RCP_INSTR = 280,
-     RSQ_INSTR = 281,
-     SGE_INSTR = 282,
-     SLT_INSTR = 283,
-     SUB_INSTR = 284,
-     ILLEGAL = 285,
-     UNKNOWN_STRING = 286,
-     INTVAL = 287,
-     REGISTER = 288,
-     XYZW_MODIFIER = 289,
-     COMMENT = 290
-   };
-#endif
-#define VERTEX_SHADER 258
-#define ADD_INSTR 259
-#define DP3_INSTR 260
-#define DP4_INSTR 261
-#define DST_INSTR 262
-#define EXP_INSTR 263
-#define EXPP_INSTR 264
-#define FRC_INSTR 265
-#define LIT_INSTR 266
-#define LOG_INSTR 267
-#define LOGP_INSTR 268
-#define M3X2_INSTR 269
-#define M3X3_INSTR 270
-#define M3X4_INSTR 271
-#define M4X3_INSTR 272
-#define M4X4_INSTR 273
-#define MAD_INSTR 274
-#define MAX_INSTR 275
-#define MIN_INSTR 276
-#define MOV_INSTR 277
-#define MUL_INSTR 278
-#define NOP_INSTR 279
-#define RCP_INSTR 280
-#define RSQ_INSTR 281
-#define SGE_INSTR 282
-#define SLT_INSTR 283
-#define SUB_INSTR 284
-#define ILLEGAL 285
-#define UNKNOWN_STRING 286
-#define INTVAL 287
-#define REGISTER 288
-#define XYZW_MODIFIER 289
-#define COMMENT 290
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 3 "vs1.0_grammar.y"
-
-void yyerror(const char *s);
-int yylex(void);
-
-#include <math.h>
-#include <string>
-
-#include <stdlib.h>
-#include "vs1.0_inst_list.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-//extern bool gbTempInsideMacro;
-//extern unsigned int &base_linenumber;
-void LexError(const char *format, ...);
-extern int line_incr;
-
-#define do_linenum_incr()		{ line_number+=line_incr; line_incr = 0; }
-//int get_linenum()			{ return( gbTempInsideMacro ? base_linenumber : line_number ); }
-int get_linenum()			{ return( line_number ); }
-
-#define YYDEBUG 1
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 27 "vs1.0_grammar.y"
-typedef union YYSTYPE {
-  int ival;
-  unsigned int lval;
-  float fval;
-  char mask[4];
-  char *comment;
-  VS10Reg reg;
-  VS10InstPtr inst;
-  VS10InstListPtr instList;
-} YYSTYPE;
-/* Line 191 of yacc.c.  */
-#line 190 "_vs1.0_parser.c"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 214 of yacc.c.  */
-#line 202 "_vs1.0_parser.c"
-
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-
-
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  short yyss;
-  YYSTYPE yyvs;
-  };
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-#if defined (__STDC__) || defined (__cplusplus)
-   typedef signed char yysigned_char;
-#else
-   typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL  44
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   88
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  44
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  18
-/* YYNRULES -- Number of rules. */
-#define YYNRULES  59
-/* YYNRULES -- Number of states. */
-#define YYNSTATES  103
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   290
-
-#define YYTRANSLATE(YYX) 						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const unsigned char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      36,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    43,    37,    38,    39,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    41,     2,    42,     2,     2,     2,     2,     2,    40,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     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,     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
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const unsigned char yyprhs[] =
-{
-       0,     0,     3,     5,     8,    10,    12,    14,    16,    18,
-      20,    22,    24,    26,    28,    30,    35,    40,    44,    47,
-      49,    51,    53,    58,    65,    74,    79,    86,    92,   100,
-     108,   118,   123,   128,   135,   144,   146,   148,   150,   152,
-     154,   156,   158,   160,   162,   164,   166,   168,   170,   172,
-     174,   176,   178,   180,   182,   184,   186,   188,   190,   192
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
-{
-      45,     0,    -1,    46,    -1,    46,    47,    -1,    47,    -1,
-      48,    -1,    36,    -1,    49,    -1,    53,    -1,    54,    -1,
-      55,    -1,    56,    -1,    24,    -1,    35,    -1,     3,    -1,
-      57,    50,    37,    50,    -1,    38,    51,    39,    34,    -1,
-      51,    39,    34,    -1,    38,    51,    -1,    51,    -1,    33,
-      -1,    52,    -1,    40,    41,    32,    42,    -1,    40,    41,
-      33,    39,    34,    42,    -1,    40,    41,    33,    39,    34,
-      43,    32,    42,    -1,    40,    41,    33,    42,    -1,    40,
-      41,    33,    43,    32,    42,    -1,    40,    41,    38,    33,
-      42,    -1,    40,    41,    38,    33,    43,    32,    42,    -1,
-      40,    41,    38,    33,    39,    34,    42,    -1,    40,    41,
-      38,    33,    39,    34,    43,    32,    42,    -1,    58,    50,
-      37,    50,    -1,    59,    50,    37,    50,    -1,    60,    50,
-      37,    50,    37,    50,    -1,    61,    50,    37,    50,    37,
-      50,    37,    50,    -1,    22,    -1,    11,    -1,    25,    -1,
-      26,    -1,     8,    -1,     9,    -1,    12,    -1,    13,    -1,
-      10,    -1,    23,    -1,     4,    -1,     5,    -1,     6,    -1,
-       7,    -1,    21,    -1,    20,    -1,    28,    -1,    27,    -1,
-      14,    -1,    15,    -1,    16,    -1,    17,    -1,    18,    -1,
-      29,    -1,    19,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const unsigned short yyrline[] =
-{
-       0,    96,    96,   104,   110,   122,   127,   134,   135,   136,
-     137,   138,   139,   143,   147,   153,   159,   169,   179,   189,
-     200,   200,   204,   211,   246,   282,   287,   292,   297,   302,
-     307,   314,   320,   326,   332,   339,   343,   349,   353,   357,
-     361,   365,   369,   375,   381,   385,   389,   393,   397,   401,
-     405,   409,   413,   417,   421,   425,   429,   433,   437,   443
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "VERTEX_SHADER", "ADD_INSTR", "DP3_INSTR", 
-  "DP4_INSTR", "DST_INSTR", "EXP_INSTR", "EXPP_INSTR", "FRC_INSTR", 
-  "LIT_INSTR", "LOG_INSTR", "LOGP_INSTR", "M3X2_INSTR", "M3X3_INSTR", 
-  "M3X4_INSTR", "M4X3_INSTR", "M4X4_INSTR", "MAD_INSTR", "MAX_INSTR", 
-  "MIN_INSTR", "MOV_INSTR", "MUL_INSTR", "NOP_INSTR", "RCP_INSTR", 
-  "RSQ_INSTR", "SGE_INSTR", "SLT_INSTR", "SUB_INSTR", "ILLEGAL", 
-  "UNKNOWN_STRING", "INTVAL", "REGISTER", "XYZW_MODIFIER", "COMMENT", 
-  "'\\n'", "','", "'-'", "'.'", "'c'", "'['", "']'", "'+'", "$accept", 
-  "VS10Program", "InstSequence", "InstLine", "Instruction", 
-  "VECTORopinstruction", "genericReg", "genReg", "constantReg", 
-  "SCALARopinstruction", "UNARYopinstruction", "BINopinstruction", 
-  "TRIopinstruction", "VECTORop", "SCALARop", "UNARYop", "BINop", "TRIop", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const unsigned short yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,    10,    44,    45,    46,
-      99,    91,    93,    43
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const unsigned char yyr1[] =
-{
-       0,    44,    45,    46,    46,    47,    47,    48,    48,    48,
-      48,    48,    48,    48,    48,    49,    50,    50,    50,    50,
-      51,    51,    52,    52,    52,    52,    52,    52,    52,    52,
-      52,    53,    54,    55,    56,    57,    57,    58,    58,    58,
-      58,    58,    58,    59,    60,    60,    60,    60,    60,    60,
-      60,    60,    60,    60,    60,    60,    60,    60,    60,    61
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const unsigned char yyr2[] =
-{
-       0,     2,     1,     2,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     4,     4,     3,     2,     1,
-       1,     1,     4,     6,     8,     4,     6,     5,     7,     7,
-       9,     4,     4,     6,     8,     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
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const unsigned char yydefact[] =
-{
-       0,    14,    45,    46,    47,    48,    39,    40,    43,    36,
-      41,    42,    53,    54,    55,    56,    57,    59,    50,    49,
-      35,    44,    12,    37,    38,    52,    51,    58,    13,     6,
-       0,     2,     4,     5,     7,     8,     9,    10,    11,     0,
-       0,     0,     0,     0,     1,     3,    20,     0,     0,     0,
-      19,    21,     0,     0,     0,     0,    18,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    15,    17,
-      31,    32,     0,     0,    16,    22,     0,    25,     0,     0,
-       0,     0,     0,     0,     0,    27,     0,    33,     0,    23,
-       0,    26,     0,     0,     0,     0,    29,     0,    28,    34,
-      24,     0,    30
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
-{
-      -1,    30,    31,    32,    33,    34,    49,    50,    51,    35,
-      36,    37,    38,    39,    40,    41,    42,    43
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -41
-static const yysigned_char yypact[] =
-{
-      52,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,
-     -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,
-     -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,
-       6,    52,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -29,
-     -29,   -29,   -29,   -29,   -41,   -41,   -41,   -28,   -31,   -23,
-     -22,   -41,   -18,   -12,    -4,    -3,    -2,   -25,   -29,     1,
-     -29,   -29,   -29,   -29,     2,     0,   -15,     5,   -41,   -41,
-     -41,   -41,     7,     8,   -41,   -41,     9,   -41,    14,   -13,
-     -29,   -29,   -27,    10,    13,   -41,    16,   -41,    12,   -41,
-      18,   -41,   -11,    11,   -29,    40,   -41,    19,   -41,   -41,
-     -41,    41,   -41
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yysigned_char yypgoto[] =
-{
-     -41,   -41,   -41,    53,   -41,   -41,   -40,    -8,   -41,   -41,
-     -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
-{
-      52,    53,    54,    55,    46,    46,    44,    65,    66,    47,
-      57,    48,    48,    67,    58,    89,    90,    59,    68,    60,
-      70,    71,    72,    73,    76,    61,    84,    77,    78,    85,
-      86,    96,    97,    62,    63,    69,    74,    64,    79,    56,
-      87,    88,    75,    82,    80,    81,    83,    92,    93,    94,
-      95,   101,    91,    98,    99,     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,   100,   102,    45,     0,     0,    28,    29
-};
-
-static const yysigned_char yycheck[] =
-{
-      40,    41,    42,    43,    33,    33,     0,    32,    33,    38,
-      41,    40,    40,    38,    37,    42,    43,    39,    58,    37,
-      60,    61,    62,    63,    39,    37,    39,    42,    43,    42,
-      43,    42,    43,    37,    37,    34,    34,    39,    33,    47,
-      80,    81,    42,    34,    37,    37,    32,    34,    32,    37,
-      32,    32,    42,    42,    94,     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,    42,    42,    31,    -1,    -1,    35,    36
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const unsigned char yystos[] =
-{
-       0,     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,    35,    36,
-      45,    46,    47,    48,    49,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,     0,    47,    33,    38,    40,    50,
-      51,    52,    50,    50,    50,    50,    51,    41,    37,    39,
-      37,    37,    37,    37,    39,    32,    33,    38,    50,    34,
-      50,    50,    50,    50,    34,    42,    39,    42,    43,    33,
-      37,    37,    34,    32,    39,    42,    43,    50,    50,    42,
-      43,    42,    34,    32,    37,    32,    42,    43,    42,    50,
-      42,    32,    42
-};
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrlab1
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");\
-      YYERROR;							\
-    }								\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)         \
-  Current.first_line   = Rhs[1].first_line;      \
-  Current.first_column = Rhs[1].first_column;    \
-  Current.last_line    = Rhs[N].last_line;       \
-  Current.last_column  = Rhs[N].last_column;
-#endif
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
-
-# define YYDSYMPRINT(Args)			\
-do {						\
-  if (yydebug)					\
-    yysymprint Args;				\
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location)		\
-do {								\
-  if (yydebug)							\
-    {								\
-      YYFPRINTF (stderr, "%s ", Title);				\
-      yysymprint (stderr, 					\
-                  Token, Value);	\
-      YYFPRINTF (stderr, "\n");					\
-    }								\
-} while (0)
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded).                                                   |
-`------------------------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_stack_print (short *bottom, short *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    short *bottom;
-    short *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (/* Nothing. */; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_reduce_print (int yyrule)
-#else
-static void
-yy_reduce_print (yyrule)
-    int yyrule;
-#endif
-{
-  int yyi;
-  unsigned int yylineno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
-             yyrule - 1, yylineno);
-  /* Print the symbols being reduced, and their result.  */
-  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
-    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
-  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (Rule);		\
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-#   else
-yystrlen (yystr)
-     const char *yystr;
-#   endif
-{
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
-    continue;
-
-  return yys - yystr - 1;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-#   if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-#   else
-yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
-{
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-#endif /* !YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  switch (yytype)
-    {
-      default:
-        break;
-    }
-  YYFPRINTF (yyoutput, ")");
-}
-
-#endif /* ! YYDEBUG */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yytype, yyvaluep)
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-
-  switch (yytype)
-    {
-
-      default:
-        break;
-    }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM);
-# else
-int yyparse ();
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
-  void *YYPARSE_PARAM;
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK   (yyvsp--, yyssp--)
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule.  */
-  int yylen;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack. Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
-
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyoverflowlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	short *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-#line 97 "vs1.0_grammar.y"
-    {
-	yyvsp[0].instList->Validate();
-	yyvsp[0].instList->Translate();
-	delete yyvsp[0].instList;
-	;}
-    break;
-
-  case 3:
-#line 105 "vs1.0_grammar.y"
-    {
-		*(yyvsp[-1].instList) += yyvsp[0].inst;
-		delete yyvsp[0].inst;
-		yyval.instList = yyvsp[-1].instList
-	;}
-    break;
-
-  case 4:
-#line 111 "vs1.0_grammar.y"
-    {
- 		VS10InstListPtr instList = new VS10InstList;
-		if ( yyvsp[0].inst != NULL )
-			{
-			*instList += yyvsp[0].inst;
-			delete yyvsp[0].inst;
-			}
-		yyval.instList = instList;
-	;}
-    break;
-
-  case 5:
-#line 123 "vs1.0_grammar.y"
-    {
-		yyval.inst = yyvsp[0].inst;
-		do_linenum_incr();
-	;}
-    break;
-
-  case 6:
-#line 128 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum() );
-		do_linenum_incr();
-	;}
-    break;
-
-  case 12:
-#line 140 "vs1.0_grammar.y"
-    {
-		   yyval.inst = new VS10Inst( get_linenum(), VS10_NOP );
-		   ;}
-    break;
-
-  case 13:
-#line 144 "vs1.0_grammar.y"
-    {
-		   yyval.inst = new VS10Inst( get_linenum(), VS10_COMMENT, yyvsp[0].comment );
-		   ;}
-    break;
-
-  case 14:
-#line 148 "vs1.0_grammar.y"
-    {
-		   yyval.inst = new VS10Inst( get_linenum(), VS10_HEADER );
-		   ;}
-    break;
-
-  case 15:
-#line 154 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum(), yyvsp[-3].ival, yyvsp[-2].reg, yyvsp[0].reg );
-	;}
-    break;
-
-  case 16:
-#line 160 "vs1.0_grammar.y"
-    {
-		   VS10Reg reg;
-		   reg = yyvsp[-2].reg;
-		   reg.sign = -1;
-		   reg.type = yyvsp[-2].reg.type;
-		   reg.index = yyvsp[-2].reg.index;
-		   for ( int i = 0; i < 4; i++ ) reg.mask[i] = yyvsp[0].mask[i];
-		   yyval.reg = reg;
-		   ;}
-    break;
-
-  case 17:
-#line 170 "vs1.0_grammar.y"
-    {
-		   VS10Reg reg;
-		   reg = yyvsp[-2].reg;
-		   reg.sign = 1;
-		   reg.type = yyvsp[-2].reg.type;
-		   reg.index = yyvsp[-2].reg.index;
-		   for ( int i = 0; i < 4; i++ ) reg.mask[i] = yyvsp[0].mask[i];
-		   yyval.reg = reg;
-		   ;}
-    break;
-
-  case 18:
-#line 180 "vs1.0_grammar.y"
-    {
-		   VS10Reg reg;
-		   reg = yyvsp[0].reg;
-		   reg.sign = -1;
-		   reg.type = yyvsp[0].reg.type;
-		   reg.index = yyvsp[0].reg.index;
-		   for ( int i = 0; i < 4; i++ ) reg.mask[i] = 0;
-		   yyval.reg = reg;
-		   ;}
-    break;
-
-  case 19:
-#line 190 "vs1.0_grammar.y"
-    {
-		   VS10Reg reg;
-		   reg = yyvsp[0].reg;
-		   reg.sign = 1;
-		   reg.type = yyvsp[0].reg.type;
-		   reg.index = yyvsp[0].reg.index;
-		   for ( int i = 0; i < 4; i++ ) reg.mask[i] = 0;
-		   yyval.reg = reg;
-		   ;}
-    break;
-
-  case 21:
-#line 201 "vs1.0_grammar.y"
-    {
-	  ;}
-    break;
-
-  case 22:
-#line 205 "vs1.0_grammar.y"
-    {
-		   VS10Reg reg;
-		   reg.type = TYPE_CONSTANT_MEM_REG;
-		   reg.index = yyvsp[-1].ival;
-		   yyval.reg = reg;
-		   ;}
-    break;
-
-  case 23:
-#line 212 "vs1.0_grammar.y"
-    {
-		   // Register is valid only if
-		   //	type = TYPE_ADDRESS_REG
-		   //	index = 0
-		   //	len(mask) = 1
-		   //	mask[0] = 'x'
-		   VS10Reg reg;
-		   yyval.reg.type = TYPE_CONSTANT_A0_REG;
-		   if ( yyvsp[-3].reg.type != TYPE_ADDRESS_REG )
-		       {
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-			   }
-		       else if ( yyvsp[-3].reg.index != 0 )
-			   {
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-			   }
-			   else
-			   {
-			       int len = 0;
-				   while ( len < 2 )
-				   {
-				       if ( yyvsp[-1].mask[len] == 0 )
-				           break;
-					   len++;
-				   }
-				   if ( len != 1 || yyvsp[-1].mask[0] != 'x' )
-				   {
-			       LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-				   }
-
-				   reg.type = TYPE_CONSTANT_A0_REG;
-				   yyval.reg = reg;
-			   }
-		   ;}
-    break;
-
-  case 24:
-#line 247 "vs1.0_grammar.y"
-    {
-		   // Register is valid only if
-		   //	type = TYPE_ADDRESS_REG
-		   //	index = 0
-		   //	len(mask) = 1
-		   //	mask[0] = 'x'
-		   VS10Reg reg;
-		   yyval.reg.type = TYPE_CONSTANT_A0_OFFSET_REG;
-		   if ( yyvsp[-5].reg.type != TYPE_ADDRESS_REG )
-		       {
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-			   }
-		       else if ( yyvsp[-5].reg.index != 0 )
-			   {
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-			   }
-			   else
-			   {
-			       int len = 0;
-				   while ( len < 2 )
-				   {
-				       if ( yyvsp[-3].mask[len] == 0 )
-				           break;
-					   len++;
-				   }
-				   if ( len != 1 || yyvsp[-3].mask[0] != 'x' )
-				   {
-			       LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-				   }
-
-				   reg.type = TYPE_CONSTANT_A0_OFFSET_REG;
-				   reg.index = yyvsp[-1].ival;
-				   yyval.reg = reg;
-			   }
-		   ;}
-    break;
-
-  case 25:
-#line 283 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 26:
-#line 288 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 27:
-#line 293 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 28:
-#line 298 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 29:
-#line 303 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 30:
-#line 308 "vs1.0_grammar.y"
-    {
-		       yyval.reg.type = TYPE_CONSTANT_A0_REG;
-			   LexError( "constant register index must be:\t<int>, a0.x, or a0.x + <int>.\n" );
-		   ;}
-    break;
-
-  case 31:
-#line 315 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum(), yyvsp[-3].ival, yyvsp[-2].reg, yyvsp[0].reg );
-	;}
-    break;
-
-  case 32:
-#line 321 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum(), yyvsp[-3].ival, yyvsp[-2].reg, yyvsp[0].reg );
-	;}
-    break;
-
-  case 33:
-#line 327 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum(), yyvsp[-5].ival, yyvsp[-4].reg, yyvsp[-2].reg, yyvsp[0].reg );
-	;}
-    break;
-
-  case 34:
-#line 334 "vs1.0_grammar.y"
-    {
-		yyval.inst = new VS10Inst( get_linenum(), yyvsp[-7].ival, yyvsp[-6].reg, yyvsp[-4].reg, yyvsp[-2].reg, yyvsp[0].reg );
-	;}
-    break;
-
-  case 35:
-#line 340 "vs1.0_grammar.y"
-    {
-		yyval.ival = VS10_MOV;
-	;}
-    break;
-
-  case 36:
-#line 344 "vs1.0_grammar.y"
-    {
-		yyval.ival = VS10_LIT;
-	;}
-    break;
-
-  case 37:
-#line 350 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_RCP;
-	;}
-    break;
-
-  case 38:
-#line 354 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_RSQ;
-	;}
-    break;
-
-  case 39:
-#line 358 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_EXP;
-	;}
-    break;
-
-  case 40:
-#line 362 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_EXPP;
-	;}
-    break;
-
-  case 41:
-#line 366 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_LOG;
-	;}
-    break;
-
-  case 42:
-#line 370 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_LOGP;
-	;}
-    break;
-
-  case 43:
-#line 376 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_FRC;
-	;}
-    break;
-
-  case 44:
-#line 382 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_MUL;
-	;}
-    break;
-
-  case 45:
-#line 386 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_ADD;
-	;}
-    break;
-
-  case 46:
-#line 390 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_DP3;
-	;}
-    break;
-
-  case 47:
-#line 394 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_DP4;
-	;}
-    break;
-
-  case 48:
-#line 398 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_DST;
-	;}
-    break;
-
-  case 49:
-#line 402 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_MIN;
-	;}
-    break;
-
-  case 50:
-#line 406 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_MAX;
-	;}
-    break;
-
-  case 51:
-#line 410 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_SLT;
-	;}
-    break;
-
-  case 52:
-#line 414 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_SGE;
-	;}
-    break;
-
-  case 53:
-#line 418 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_M3X2;
-	;}
-    break;
-
-  case 54:
-#line 422 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_M3X3;
-	;}
-    break;
-
-  case 55:
-#line 426 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_M3X4;
-	;}
-    break;
-
-  case 56:
-#line 430 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_M4X3;
-	;}
-    break;
-
-  case 57:
-#line 434 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_M4X4;
-	;}
-    break;
-
-  case 58:
-#line 438 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_SUB;
-	;}
-    break;
-
-  case 59:
-#line 444 "vs1.0_grammar.y"
-    {
-	yyval.ival = VS10_MAD;
-	;}
-    break;
-
-
-    }
-
-/* Line 999 of yacc.c.  */
-#line 1639 "_vs1.0_parser.c"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-
-
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (YYPACT_NINF < yyn && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  int yytype = YYTRANSLATE (yychar);
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("syntax error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[yytype]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[yytype]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("syntax error; also virtual memory exhausted");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror ("syntax error");
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      /* Return failure if at end of input.  */
-      if (yychar == YYEOF)
-        {
-	  /* Pop the error token.  */
-          YYPOPSTACK;
-	  /* Pop the rest of the stack.  */
-	  while (yyss < yyssp)
-	    {
-	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-	      yydestruct (yystos[*yyssp], yyvsp);
-	      YYPOPSTACK;
-	    }
-	  YYABORT;
-        }
-
-      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
-      yydestruct (yytoken, &yylval);
-      yychar = YYEMPTY;
-
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action.  |
-`----------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
-      yydestruct (yystos[yystate], yyvsp);
-      yyvsp--;
-      yystate = *--yyssp;
-
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  YYDPRINTF ((stderr, "Shifting error token, "));
-
-  *++yyvsp = yylval;
-
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here.  |
-`----------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-  return yyresult;
-}
-
-
-#line 450 "vs1.0_grammar.y"
-
-void yyerror(const char* s)
-{
-    LexError( "Syntax Error.\n" );
-    //errors.set(s);
-    //errors.set("unrecognized token");
-}
-

+ 0 - 153
CamelotRenderer/RenderSystemGL/Source/nvparse/_vs1.0_parser.h

@@ -1,153 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-/* A Bison parser, made by GNU Bison 1.875.  */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     VERTEX_SHADER = 258,
-     ADD_INSTR = 259,
-     DP3_INSTR = 260,
-     DP4_INSTR = 261,
-     DST_INSTR = 262,
-     EXP_INSTR = 263,
-     EXPP_INSTR = 264,
-     FRC_INSTR = 265,
-     LIT_INSTR = 266,
-     LOG_INSTR = 267,
-     LOGP_INSTR = 268,
-     M3X2_INSTR = 269,
-     M3X3_INSTR = 270,
-     M3X4_INSTR = 271,
-     M4X3_INSTR = 272,
-     M4X4_INSTR = 273,
-     MAD_INSTR = 274,
-     MAX_INSTR = 275,
-     MIN_INSTR = 276,
-     MOV_INSTR = 277,
-     MUL_INSTR = 278,
-     NOP_INSTR = 279,
-     RCP_INSTR = 280,
-     RSQ_INSTR = 281,
-     SGE_INSTR = 282,
-     SLT_INSTR = 283,
-     SUB_INSTR = 284,
-     ILLEGAL = 285,
-     UNKNOWN_STRING = 286,
-     INTVAL = 287,
-     REGISTER = 288,
-     XYZW_MODIFIER = 289,
-     COMMENT = 290
-   };
-#endif
-#define VERTEX_SHADER 258
-#define ADD_INSTR 259
-#define DP3_INSTR 260
-#define DP4_INSTR 261
-#define DST_INSTR 262
-#define EXP_INSTR 263
-#define EXPP_INSTR 264
-#define FRC_INSTR 265
-#define LIT_INSTR 266
-#define LOG_INSTR 267
-#define LOGP_INSTR 268
-#define M3X2_INSTR 269
-#define M3X3_INSTR 270
-#define M3X4_INSTR 271
-#define M4X3_INSTR 272
-#define M4X4_INSTR 273
-#define MAD_INSTR 274
-#define MAX_INSTR 275
-#define MIN_INSTR 276
-#define MOV_INSTR 277
-#define MUL_INSTR 278
-#define NOP_INSTR 279
-#define RCP_INSTR 280
-#define RSQ_INSTR 281
-#define SGE_INSTR 282
-#define SLT_INSTR 283
-#define SUB_INSTR 284
-#define ILLEGAL 285
-#define UNKNOWN_STRING 286
-#define INTVAL 287
-#define REGISTER 288
-#define XYZW_MODIFIER 289
-#define COMMENT 290
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 27 "vs1.0_grammar.y"
-typedef union YYSTYPE {
-  int ival;
-  unsigned int lval;
-  float fval;
-  char mask[4];
-  char *comment;
-  VS10Reg reg;
-  VS10InstPtr inst;
-  VS10InstListPtr instList;
-} YYSTYPE;
-/* Line 1240 of yacc.c.  */
-#line 117 "_vs1.0_parser.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE vs10_lval;
-
-
-

+ 0 - 188
CamelotRenderer/RenderSystemGL/Source/nvparse/avp1.0_impl.cpp

@@ -1,188 +0,0 @@
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-#include <string>
-#include <ctype.h>
-
-#if defined(__APPLE__) && defined(__GNUC__)
-#include <OpenGL/glu.h>
-#else
-#include <GL/glu.h>
-#endif
-
-using namespace std;
-
-namespace
-{
-	void LoadProgram( GLenum target, GLuint id, char *instring );
-	void StrToUpper(char * string);
-	GLint vpid;
-}
-
-
-bool is_avp10(const char * s)
-{
-	return ! strncmp(s, "!!ARBvp1.0", 10);
-}
-
-bool avp10_init(char * s)
-{
-	static bool avpinit = false;
-	if (avpinit == false )
-	{
-      /*
-		if(! glh_init_extensions("GL_ARB_vertex_program"))
-		{
-			errors.set("unable to initialize GL_ARB_vertex_program");
-			return false;
-		}
-		else
-		{
-        */
-			avpinit = true;
-            /*
-		}
-        */
-	}
-	
-	errors.reset();
-	line_number = 1;
-	myin = s;
-
-    glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &vpid);
-        
-    if ( vpid == 0 )
-    {
-        char str[128];
-        sprintf( str, "No vertex program id bound for nvparse() invocation.  Bound id = %d\n", (int)vpid );
-        errors.set( str );
-		return false;
-    }
-	
-	return true;	
-}
-
-int avp10_parse()
-{
-    LoadProgram( GL_VERTEX_PROGRAM_ARB, vpid, myin );
-	return 0;
-}
-
-namespace
-{
-	//.----------------------------------------------------------------------------.
-	//|   Function   : LoadProgram                                                 |
-	//|   Description: Load a program into GL, and report any errors encountered.  |
-	//.----------------------------------------------------------------------------.
-	void LoadProgram( GLenum target, GLuint id, char *instring )
-	{
-        GLint  errPos;
-        GLenum errCode;
-        const GLubyte *errString;
-        int len = strlen(instring);
-
-        glBindProgramARB(target, id);
-        errCode = glGetError();
-        if (errCode == GL_INVALID_OPERATION)
-                errString = gluErrorString(errCode);
-
-        glProgramStringARB(target, 
-                           GL_PROGRAM_FORMAT_ASCII_ARB, 
-                           len,
-                           instring);
-
-		if ((errCode = glGetError()) != GL_NO_ERROR)
-		{
-			errString = gluErrorString(errCode);
-			
-			glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
-            if (errPos == -1)
-                return;
-			
-			int nlines = 1;
-			int nchar  = 1;
-			int i;
-			for (i = 0; i < errPos; i++)
-			{
-				if (instring[i] == '\n')
-				{
-					nlines++;
-					nchar = 1;
-				}
-				else
-				{
-					nchar++;
-				}
-			}
-			int start = 0;
-			int end = 0;
-			int flag = ((instring[errPos]==';') | (instring[errPos-1]==';')) ? 1 : 0;
-			for (i = errPos; i >= 0; i--)
-			{
-				start = i;
-				if (flag && (start >= errPos-1))
-					continue;
-				if (instring[i] == ';')
-				{
-					if (!flag)
-					{
-						start = i+1;
-						if (instring[start] == '\n')
-							start++;
-					}
-					break;
-				}
-			}
-			for (i = errPos; i < len; i++)
-			{
-				end = i;
-				if (instring[i] == ';' && end > start)
-				{
-					break;
-				}
-			}
-			if (errPos - start > 30)
-			{
-				start = errPos - 30;
-			}
-			if (end - errPos > 30)
-			{
-				end = errPos + 30;
-			}
-			
-			char substring[96];
-			memset( substring, 0, 96 );
-			strncpy( substring, &(instring[start]), end-start+1 );
-
-            char str[256];
-			sprintf(str, "error at line %d character %d\n\"%s\"\n", nlines, nchar, substring);
-			int width = errPos-start;
-
-			for (i = 0; i < width; i++)
-			{
-				strcat(str, " ");
-			}
-
-			strcat(str, "|\n");
-			for (i = 0; i < width; i++)
-			{
-				strcat(str, " ");
-			}
-			strcat(str, "^\n");
-			
-			errors.set(str);
-		}
-	}
-	
-	
-	//.----------------------------------------------------------------------------.
-	//|   Function   : StrToUpper                                                  |
-	//|   Description: Converts all lowercase chars in a string to uppercase.      |
-	//.----------------------------------------------------------------------------.
-	void StrToUpper(char *string)
-	{
-		for (unsigned int i = 0; i < strlen(string); i++)
-			string[i] = toupper(string[i]);
-	}
-	
-}

+ 0 - 43
CamelotRenderer/RenderSystemGL/Source/nvparse/macro.h

@@ -1,43 +0,0 @@
-#ifdef _WIN32
-#include <io.h>
-#else
-#include <ctype.h>
-#endif
-typedef struct MACROTEXT {
-	MACROTEXT *next;
-	MACROTEXT *prev;
-	char *macroText;
-} MACROTEXT;
-
-typedef struct MACROENTRY
-{
-	MACROENTRY *next;
-	MACROENTRY *prev;
-	char *macroName;
-	MACROTEXT *firstMacroParms;
-	MACROTEXT *lastMacroParms;
-	MACROTEXT *firstMacroLines;
-	MACROTEXT *lastMacroLines;
-	unsigned int numParms;
-	char *fileName;
-	unsigned int lineNo;
-	unsigned int nLines;
-	bool bIsDefine;
-} MACROENTRY;
-
-#define MAX_IFDEF_DEPTH 1024
-typedef struct IFDEFINFO
-{
-	bool			lastbProcessingIFDEF;			// save off for if we were processing #ifdef
-	bool			lastbIFDEF;						// wether ifdef was true or not
-	bool			lastbCompareDefine;				// wether we compare #ifdef or #ifndef
-	unsigned int	lastIfDefStartLine;				// where we started for this #ifdef
-} IFDEFINFO;
-
-
-typedef void (*MACROFUNCTIONPTR)(char *, unsigned int *, char **);
-
-typedef struct MACROFUNCTIONS {
-	const char *name;
-	MACROFUNCTIONPTR function;
-} MACROFUNCTIONS;

+ 0 - 216
CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse.cpp

@@ -1,216 +0,0 @@
-#ifdef _WIN32
-#  define WIN32_LEAN_AND_MEAN
-#  if !defined(NOMINMAX) && defined(_MSC_VER)
-#	define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#  include <windows.h>
-#else
-#include <stdarg.h>
-#define strnicmp strncasecmp
-#endif
-
-#include <stdio.h>
-
-#if defined(__APPLE__) && defined(__GNUC__)
-#include <OpenGL/glu.h>
-#else
-#include <GL/glu.h>
-#endif
-
-#include <string>
-#include <vector>
-#include <string.h>
-#include <stdlib.h>
-
-#include "nvparse.h"
-#include "nvparse_errors.h"
-
-//void yyinit(char*);
-//int yyparse(void);
-
-
-// RC1.0  -- register combiners 1.0 configuration
-bool rc10_init(char *);
-int  rc10_parse();
-bool is_rc10(const char *);
-
-// TS1.0  -- texture shader 1.0 configuration
-bool ts10_init(char *);
-int  ts10_parse();
-bool is_ts10(const char *);
-
-// ARBvp1.0  -- ARB vertex program
-bool avp10_init(char *);
-int  avp10_parse();
-bool is_avp10(const char *);
-
-#if !defined(__APPLE__)
-// VP1.0  -- vertex program
-bool vp10_init(char *);
-int  vp10_parse();
-bool is_vp10(const char *);
-
-// VSP1.0  -- vertex state program
-bool vsp10_init(char *);
-int  vsp10_parse(int vspid);
-bool is_vsp10(const char *);
-
-// VCP1.0  -- vertex constant program
-bool vcp10_init(char *);
-int  vcp10_parse();
-bool is_vcp10(const char *);
-
-// DX8 stuff
-
-// PS1.0  -- DX8 Pixel Shader 1.0 configuration
-bool ps10_init(char *);
-int  ps10_parse();
-bool ps10_set_map(const std::vector<int>& argv);
-bool is_ps10(const char *);
-const int* ps10_get_info(int* pcount);
-
-// VS1.0  -- DX8 Vertex Shader 1.0
-bool vs10_init(char *);
-int  vs10_parse();
-bool is_vs10(const char *);
-void vs10_load_program();
-#endif
-
-nvparse_errors errors;
-int line_number;
-char * myin = 0;
-
-void nvparse(const char * input_string, int argc /* = 0 */,...)
-{
-    if (NULL == input_string)
-    {
-        errors.set("NULL string passed to nvparse");
-        return;
-    }
-    
-    char * instring = strdup(input_string);
-
-    // register combiners (1 and 2)
-    if(is_rc10(instring))
-    {
-        if(rc10_init(instring))
-        {
-            rc10_parse();
-        }
-    }
-
-    // texture shader
-    else if(is_ts10(instring))
-    {
-        if(ts10_init(instring))
-        {
-            ts10_parse();
-        }
-    }
-
-    // vertex program
-    else if(is_avp10(instring))
-    {
-        if(avp10_init(instring))
-        {
-            avp10_parse();
-        }
-    }
-
-#if !defined(__APPLE__)
-    // vertex constant program
-    else if(is_vcp10(instring))
-    {
-        if(vcp10_init(instring))
-        {
-            vcp10_parse();
-        }
-    }
-
-    // vertex state program
-    else if(is_vsp10(instring))
-    {
-        if(vsp10_init(instring))
-        {
-            vsp10_parse(argc);
-        }
-    }
-
-    // vertex program
-    else if(is_vp10(instring))
-    {
-        if(vp10_init(instring))
-        {
-            vp10_parse();
-        }
-    }
-
-    // DX8 vertex shader
-    else if ( is_vs10(instring) )
-    {
-        if(vs10_init(instring))
-        {
-            vs10_parse();
-            vs10_load_program();
-        }
-
-    }
-    else if (is_ps10(instring))
-    {
-        if(ps10_init(instring))
-        {
-            va_list ap;
-            std::vector<int> argv;
-            va_start(ap,argc);
-            for (int i=0;i<argc;++i)
-            {
-                int arg = va_arg(ap,int);
-                argv.push_back(arg);
-            }
-            va_end(ap);
-            if (!ps10_set_map(argv))
-                return;
-            ps10_parse();
-        }
-    }
-#endif
-    else
-    {
-        errors.set("invalid string.\n "
-                   "first characters must be: !!ARBvp1.0 or !!VP1.0 or !!VSP1.0 or !!RC1.0 or !!TS1.0\n "
-                   "or it must be a valid DirectX 8.0 Vertex Shader");
-    }
-    free(instring);
-}
-
-char * const * const nvparse_get_errors()
-{
-    return errors.get_errors();
-}
-
-char * const * const nvparse_print_errors(FILE * errfp)
-{
-    for (char * const *  ep = nvparse_get_errors(); *ep; ep++)
-    {
-        const char * errstr = *ep;
-        fprintf(errfp, "%s\n", errstr);
-    }
-    return nvparse_get_errors();
-}
-
-
-const int* nvparse_get_info(const char* input_string, int* pcount)
-{
-#if !defined(__APPLE__)
-    if (NULL == input_string)
-    {
-        errors.set("NULL string passed to nvparse_get_info");
-        return 0;
-    }
-    if (is_ps10(input_string))
-    {
-        return ps10_get_info(pcount);
-    }
-#endif
-    return 0;
-}

+ 0 - 22
CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse.h

@@ -1,22 +0,0 @@
-#ifndef NVPARSE_H
-#define NVPARSE_H
-
-#define NVPARSE 1
-
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-void nvparse(const char * input_string, int argc = 0,...);
-char * const * const nvparse_get_errors();
-char * const * const nvparse_print_errors(FILE *fp);
-const int* nvparse_get_info(const char* input_string, int* pcount);
-#ifdef __cplusplus
-}
-#endif
-
-#endif

+ 0 - 47
CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_errors.cpp

@@ -1,47 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "nvparse_errors.h"
-
-
-
-nvparse_errors::nvparse_errors()
-{
-	num_errors = 0;
-	reset();
-}
-
-nvparse_errors::~nvparse_errors()
-{
-	reset();
-}
-
-
-void nvparse_errors::reset()
-{
-	for(int i=0; i < num_errors; i++)
-	    free(elist[i]);//FIXME detail_nmap something is writing 0x2 to elist[1] blah!
-	for(int j=0; j <= NVPARSE_MAX_ERRORS; j++)
-		elist[j] = 0;
-	num_errors = 0;
-}
-
-void nvparse_errors::set(const char * e)
-{
-	if(num_errors < NVPARSE_MAX_ERRORS)
-		elist[num_errors++] = strdup(e);
-}
-
-void nvparse_errors::set(const char * e, int line_number)
-{
-	char buff[256];
-	sprintf(buff, "error on line %d: %s", line_number, e);
-	if(num_errors < NVPARSE_MAX_ERRORS)
-		elist[num_errors++] = strdup(buff);
-}
-
-char * const * const nvparse_errors::get_errors()
-{
-	return elist;
-}

+ 0 - 25
CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_errors.h

@@ -1,25 +0,0 @@
-#ifndef _NVPARSE_ERRORS_H_
-#define _NVPARSE_ERRORS_H_
-
-#ifdef _WIN32
-    #pragma warning(disable:4786)   // stupid symbol size limitation
-#endif
-
-#define NVPARSE_MAX_ERRORS 32
-class nvparse_errors
-{
-public:
-	nvparse_errors();
-	~nvparse_errors();
-
-	void reset();
-	void set(const char * e);
-	void set(const char * e, int line_number);
-	char * const * const get_errors();
-    inline int  get_num_errors() { return num_errors; }
-private:
-        char* elist [NVPARSE_MAX_ERRORS+1];
-	int num_errors;
-};
-
-#endif

+ 0 - 10
CamelotRenderer/RenderSystemGL/Source/nvparse/nvparse_externs.h

@@ -1,10 +0,0 @@
-#ifndef NVPARSE_EXTERNS_H
-#define NVPARSE_EXTERNS_H
-
-extern nvparse_errors errors;
-extern int line_number;
-extern char * myin;
-#include <CmGLPrerequisites.h>
-#include <GL/glew.h>
-
-#endif

+ 0 - 1013
CamelotRenderer/RenderSystemGL/Source/nvparse/ps1.0_program.cpp

@@ -1,1013 +0,0 @@
-#include "ps1.0_program.h"
-
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-#include <string>
-#include <map>
-#include <algorithm>
-#include <string.h>
-#include <set>
-
-
-using namespace std;
-using namespace ps10;
-struct ltstr
-{
-	bool operator()(const char* s1, const char* s2) const
-	{
-		return strcmp(s1, s2) < 0;
-	}
-};
-
-#define DBG_MESG(msg, line)  	errors.set(msg, line)
-//#define DBG_MESG(msg, line)
-namespace ps10
-{
-	std::map<int, std::pair<int,int> > constToStageAndConstMap;
-	std::vector<int> constToStageArray;
-	std::map<int, int> stageToConstMap; // to keep track of which constants have been used up for this stage.
-		// r-value of 0 means none, r-value of 1 means c0 used, and r-value of 2 means both used.
-	//std::map<int, int> constToStageMap;
-	std::map<int, GLenum> stageToTargetMap;
-	std::set<const char*, ltstr> alphaBlueRegisters; // Keeps track of whether the result of a register
-		// was a dp3, if a register is in this set, it means that if it is used a source for the alpha 
-		// component the blue component should be used, and not the alpha component.
-	void SetFinalCombinerStage();
-}
-
-void RemoveFromAlphaBlue(std::string s)
-{
-	std::set<const char*, ltstr>::iterator iter = 
-		ps10::alphaBlueRegisters.find(s.c_str());
-	if (iter != alphaBlueRegisters.end())
-		alphaBlueRegisters.erase(iter);
-}
-
-/*
-void AddToMap(string s, int stage)
-{
-	const char* cstr = s.c_str();
-	if (cstr[0] == 'c')
-	{
-		int constNum = atoi(&cstr[1]);
-		if (constNum < 0 || constNum > 7)
-			return;
-		constToStageMap[constNum] = stage;
-	}
-}
-*/
-
-bool AddToMap(string s, int stage, GLenum& constVal)
-{
-	const char* cstr = s.c_str();
-	if (cstr[0] == 'c')
-	{
-		int constNum = atoi(&cstr[1]);
-		std::map<int, int>::iterator iter = stageToConstMap.find(stage);
-		if (iter == stageToConstMap.end())
-		{
-			// no constants used for this stage. 
-			std::pair<int, int> temp;
-			temp.first = stage;
-			temp.second = 0;
-			constToStageAndConstMap[constNum] = temp;
-			stageToConstMap[stage] = 0;
-			constVal = 0;
-			constToStageArray.push_back(constNum);
-			constToStageArray.push_back(stage);
-			constToStageArray.push_back(constVal);
-		}
-		else
-		{
-			int constUsed = (*iter).second;
-			if (constUsed >= 1)
-				return false;
-			else // const0 has been used, so use const1 for this stage.
-			{
-				std::pair<int,int> temp;
-				temp.first = stage;
-				temp.second = 1;
-				constToStageAndConstMap[constNum] = temp;
-				stageToConstMap[stage] = 1;
-				constVal = 1;
-				constToStageArray.push_back(constNum);
-				constToStageArray.push_back(stage);
-				constToStageArray.push_back(constVal);
-			}
-			
-		}
-	}
-	constVal += GL_CONSTANT_COLOR0_NV;
-	return true;
-}
-
-bool IsLegalTarget(int target)
-{
-	if (target == GL_TEXTURE_CUBE_MAP_ARB)
-		return true;
-	if (target == GL_TEXTURE_3D)
-		return true;
-#if defined(GL_EXT_texture_rectangle)
-	if (target == GL_TEXTURE_RECTANGLE_EXT)
-		return true;
-#elif defined(GL_NV_texture_rectangle)
-        if (target == GL_TEXTURE_RECTANGLE_NV)
-                return true;
-#endif
-	if (target == GL_TEXTURE_2D)
-		return true;
-	if (target == GL_TEXTURE_1D)
-		return true;
-	return false;
-}
-
-bool ps10_set_map(const std::vector<int>& argv)
-{
-	if (argv.size() % 2 != 0)
-	{
-		errors.set("Odd number of arguments for texture target map.");
-		return false;
-	}
-	for (unsigned int i=0;i<argv.size();i=i+2)
-	{
-		int stage = argv[i];
-		int target = argv[i+1];
-		if (!IsLegalTarget(target))
-		{
-			errors.set("Illegal target in texture target map.");
-			return false;
-		}
-		ps10::stageToTargetMap[stage] = target;
-	}
-	return true;
-}
-
-int const_to_combiner_reg_mapping[32][3]; // each 3 tuple is: (constant#, stage #, reg #)
-int const_to_combiner_reg_mapping_count = 0;
-
-
-namespace
-{
-	struct set_constants
-	{
-		void operator() (constdef c)
-		{
-			if(c.reg[0] != 'c' && c.reg.size() != 2)
-				DBG_MESG("def line must use constant registers", 0);
-			int reg = c.reg[1] - '0';
-			GLenum stage = GL_COMBINER0_NV + (reg / 2);
-			GLenum cclr  = GL_CONSTANT_COLOR0_NV + (reg % 2);
-
-			GLfloat cval[4];
-			cval[0] = c.r;
-			cval[1] = c.g;
-			cval[2] = c.b;
-			cval[3] = c.a;
-			glCombinerStageParameterfvNV(stage, cclr, cval);
-		}
-	};
-
-	GLenum get_tex_target(int stage)
-	{
-		std::map<int, GLenum>::iterator iter = stageToTargetMap.find(stage);
-		if (iter != stageToTargetMap.end())
-			return (*iter).second;
-		// If no mapping set, use the current state. This will not work correctly, in general,
-		// if nvparse was invoked within a display list.
-		if(glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB))
-			return GL_TEXTURE_CUBE_MAP_ARB;
-		if(glIsEnabled(GL_TEXTURE_3D))
-			return GL_TEXTURE_3D;
-#if defined(GL_EXT_texture_rectangle)
-		if(glIsEnabled(GL_TEXTURE_RECTANGLE_EXT))
-			return GL_TEXTURE_RECTANGLE_EXT;
-#elif defined(GL_NV_texture_rectangle)
-                if(glIsEnabled(GL_TEXTURE_RECTANGLE_NV))
-                        return GL_TEXTURE_RECTANGLE_NV;
-#endif
-		if(glIsEnabled(GL_TEXTURE_2D))
-			return GL_TEXTURE_2D;
-		if(glIsEnabled(GL_TEXTURE_1D))
-			return GL_TEXTURE_1D;
-
-		//otherwise make the op none...
-		return GL_NONE;
-	}
-
-	
-
-	struct set_texture_shaders
-	{
-		set_texture_shaders(vector<constdef> * cdef)
-		{
-			for(stage = 0; stage < 4; stage++)
-			{
-				glActiveTextureARB(GL_TEXTURE0_ARB + stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
-			}
-			stage = 0;
-			c = cdef;
-		}
-
-		void operator() (vector<string> & instr)
-		{
-			if(stage > 3)
-				return;
-			glActiveTextureARB(GL_TEXTURE0_ARB + stage);
-
-			string op = instr[0];
-			if(op == "tex")
-			{
-				if(instr.size() != 2)
-					fprintf(stderr,"incorrect \"tex\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, get_tex_target(stage));
-			}
-			else if(op == "texbem")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texbem\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_2D_NV);
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texbem\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texbeml")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texbeml\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_SCALE_NV);
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texbeml\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texcoord")
-			{
-				if(instr.size() != 2)
-					fprintf(stderr,"incorrect \"texcoord\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_PASS_THROUGH_NV);
-			}
-			else if(op == "texkill")
-			{
-				if(instr.size() != 2)
-					fprintf(stderr,"incorrect \"texkill\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_CULL_FRAGMENT_NV);
-			}
-			else if(op == "texm3x2pad")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x2pad\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x2pad\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texm3x2tex")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x2tex\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_2D_NV);
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x2tex\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texm3x3pad")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x3pad\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x3pad\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texm3x3tex")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x3tex\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV);
-
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x3tex\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texm3x3spec")
-			{
-				if(instr.size() != 4 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x3spec\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-
-				if(! c)
-					return;
-				constdef cd;
-				for(int i = c->size()-1; i >= 0; i--)
-				{
-					cd = (*c)[i];
-					if(cd.reg == "c0")
-						break;
-				}
-
-				if(cd.reg != "c0" || instr[3] != "c0")
-					return;
-				GLfloat eye[4];
-				eye[0] = cd.r;
-				eye[1] = cd.g;
-				eye[2] = cd.b;
-				eye[3] = cd.a;
-
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV);
-				glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_CONST_EYE_NV, eye);
-
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x3tex\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texm3x3vspec")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texm3x3vspec\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV);
-
-				if(instr[2].find("_bx2") != string::npos)
-				{
-				   instr[2].erase(instr[2].begin() + instr[2].find("_bx2"), instr[2].end());
-				   glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-				}
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texm3x3tex\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texreg2ar")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texreg2ar\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_AR_TEXTURE_2D_NV);
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texreg2ar\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			else if(op == "texreg2gb")
-			{
-				if(instr.size() != 3 || stage == 0)
-					fprintf(stderr,"incorrect \"texreg2gb\" instruction, stage %d...\n", stage);
-				reg2stage[instr[1]] = stage;
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_GB_TEXTURE_2D_NV);
-				if(reg2stage.count(instr[2]) == 0)
-					fprintf(stderr,"incorrect \"texreg2gb\" instruction, stage %d...\n", stage);
-				glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + reg2stage[instr[2]]);
-			}
-			stage++;
-		}
-
-		map<string, int> reg2stage;
-		int stage;
-		vector<constdef> * c;
-	};
-	
-	GLenum reg_enum(string s, int stage)
-	{
-		/*if(s == "c0")
-			return GL_CONSTANT_COLOR0_NV;
-		else if(s == "c1")
-			return GL_CONSTANT_COLOR1_NV;
-		else if(s == "c2")
-			return GL_CONSTANT_COLOR0_NV;
-		else if(s == "c3")
-			return GL_CONSTANT_COLOR1_NV;
-		else if(s == "c4")
-			return GL_CONSTANT_COLOR0_NV;
-		else if(s == "c5")
-			return GL_CONSTANT_COLOR1_NV;
-		else if(s == "c6")
-			return GL_CONSTANT_COLOR0_NV;
-		else if(s == "c7")
-			return GL_CONSTANT_COLOR1_NV;
-			*/
-		if (s == "c0" || s == "c1" || s == "c2" || s == "c3" || 
-			s == "c4" || s == "c5" || s == "c6" || s == "c7")
-		{
-			GLenum result;
-			if (!AddToMap(s,stage,result))
-				errors.set("Illegal constant usage.",line_number);
-			  // This is a pain, since the caller is a void and no check is made for errors. Sigh.
-			return result;
-		}
-		else if(s == "t0")
-			return GL_TEXTURE0_ARB;
-		else if(s == "t1")
-			return GL_TEXTURE1_ARB;
-		else if(s == "t2")
-			return GL_TEXTURE2_ARB;
-		else if(s == "t3")
-			return GL_TEXTURE3_ARB;
-		else if(s == "v0")
-			return GL_PRIMARY_COLOR_NV;
-		else if(s == "v1")
-			return GL_SECONDARY_COLOR_NV;
-		else if(s == "r0")
-			return GL_SPARE0_NV;
-		else if(s == "r1")
-			return GL_SPARE1_NV;
-		else // ??
-			return GL_DISCARD_NV;
-	}
-
-	struct src
-	{
-		src(string s, int stage, string *regname=NULL)
-		{
-			init(s, stage, regname);
-		}
-
-
-		void init(string s, int stage, string *regname=NULL)
-		{
-			arg = s;
-			comp = GL_RGB;
-            alphaComp = GL_ALPHA;
-			map = GL_SIGNED_IDENTITY_NV;
-
-			unsigned int offset;
-			if(
-                (offset = s.find(".a")) != string::npos ||
-                (offset = s.find(".w")) != string::npos
-              )
-			{
-				comp = GL_ALPHA;
-				s.erase(offset, offset+2);
-			}
-            else if ((offset = s.find(".b")) != string::npos ||
-                     (offset = s.find(".z")) != string::npos)
-            {
-                alphaComp = GL_BLUE;
-                s.erase(offset,offset+2);
-            }
-
-			bool negate = false;
-
-			if(s[0] == '1')
-			{
-				s.erase(0, 1);
-				while(s[0] == ' ')
-					s.erase(0,1);
-				if(s[0] == '-')
-					s.erase(0,1);
-				while(s[0] == ' ')
-					s.erase(0,1);
-				map = GL_UNSIGNED_INVERT_NV;
-			}
-			else if(s[0] == '-')
-			{
-				s.erase(0, 1);
-				while(s[0] == ' ')
-					s.erase(0,1);
-				negate = true;
-				map = GL_UNSIGNED_INVERT_NV;
-			}
-
-			bool half_bias = false;
-			bool expand = false;
-			if(s.find("_bias") != string::npos)
-			{
-				s.erase(s.find("_bias"), 5);
-				half_bias = true;
-			}
-			else if(s.find("_bx2") != string::npos)
-			{
-				s.erase(s.find("_bx2"), 4);
-				expand = true;
-			}
-			
-			if(expand)
-			{
-				if(negate)
-					map = GL_EXPAND_NEGATE_NV;
-				else
-					map = GL_EXPAND_NORMAL_NV;
-			}
-			else if(half_bias)
-			{
-				if(negate)
-					map = GL_HALF_BIAS_NEGATE_NV;
-				else
-					map = GL_HALF_BIAS_NORMAL_NV;
-			}
-			reg = reg_enum(s,stage);
-
-			if (regname != NULL) 
-				*regname = s; // return the bare register name
-
-			
-            //alphaComp = GL_ALPHA;
-			std::set<const char*, ltstr>::iterator iter = 
-				ps10::alphaBlueRegisters.find(s.c_str());
-			if (iter != ps10::alphaBlueRegisters.end())
-				alphaComp = GL_BLUE;
-
-		}
-
-		string arg;
-		GLenum reg;
-		GLenum map;
-		GLenum comp;
-		GLenum alphaComp;
-	};
-
-
-	struct set_register_combiners
-	{
-		set_register_combiners()
-		{
-          // combiner = 0;
-          combiner = -1;
-		}
-
-		void operator() (vector<string> & instr)
-		{
-			string op;
-			GLenum scale = GL_NONE;
-			bool op_sat = false;
-            bool paired_instr = false;
-            int instr_base = 0;
-            if (instr[0]=="+") {
-              paired_instr = true;
-              instr_base = 1;
-            }
-			op = instr[instr_base];
-			unsigned int offset;
-			if((offset = op.find("_x2")) != string::npos)
-			{
-				scale = GL_SCALE_BY_TWO_NV;
-				op.erase(op.begin()+offset, op.begin()+offset+3);
-			}
-			else if((offset = op.find("_x4")) != string::npos)
-			{
-				scale = GL_SCALE_BY_FOUR_NV;
-				op.erase(op.begin()+offset, op.begin()+offset+3);
-			}
-			else if((offset = op.find("_d2")) != string::npos)
-			{
-				scale = GL_SCALE_BY_ONE_HALF_NV;
-				op.erase(op.begin()+offset, op.begin()+offset+3);
-			}
-
-			if((offset = op.find("_sat")) != string::npos)
-			{
-				// need to actually use this...
-				op_sat = true;
-				op.erase(op.begin()+offset, op.begin()+offset+4);
-			}
-			
-			string dst = instr[1+instr_base];
-			int mask = GL_RGBA;
-			if(
-                (offset = dst.find(".rgba")) != string::npos  ||
-                (offset = dst.find(".xyzw")) != string::npos 
-                )
-			{
-				dst.erase(offset, offset + 5);
-			}
-			else if(
-                (offset = dst.find(".rgb")) != string::npos  ||
-                (offset = dst.find(".xyz")) != string::npos 
-                )
-			{
-				dst.erase(offset, offset + 4);
-				mask = GL_RGB;
-			}
-			else if(
-                (offset = dst.find(".a")) != string::npos  ||
-                (offset = dst.find(".w")) != string::npos 
-                )
-			{
-				dst.erase(offset, offset + 2);
-				mask = GL_ALPHA;
-			}
-
-            if (!paired_instr) 
-              combiner++;
-
-			GLenum dreg = reg_enum(dst,combiner);
-			GLenum C = GL_COMBINER0_NV + combiner;
-
-			bool isAlphaBlue = false; // To keep track of whether the dst register's alpha was its blue value.
-
-			if(op == "add" || op == "sub")
-			{
-				src a(instr[2+instr_base],combiner);
-				src b(instr[3+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_C_NV, b.reg, b.map, b.comp);
-					if(op == "add")
-						glCombinerInputNV(C, GL_RGB, GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					else
-						glCombinerInputNV(C, GL_RGB, GL_VARIABLE_D_NV, GL_ZERO, GL_EXPAND_NORMAL_NV, GL_RGB);
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, a.map, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_C_NV, b.reg, b.map, b.alphaComp);
-					if(op == "add")
-						glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					else
-						glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_D_NV, GL_ZERO, GL_EXPAND_NORMAL_NV, GL_ALPHA);
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "cnd")
-			{
-				src a(instr[3+instr_base],combiner);
-				src b(instr[4+instr_base],combiner);
-
-				if(instr[2+instr_base] != "r0.a" && instr[2+instr_base] != "r0.w")
-				{} // bad
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_C_NV, b.reg, b.map, b.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_TRUE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, a.map, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_C_NV, b.reg, b.map, b.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_TRUE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "dp3")
-			{
-				src a(instr[2+instr_base],combiner);
-				src b(instr[3+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, b.reg, b.map, b.comp);
-					glCombinerOutputNV(C, GL_RGB, dreg, GL_DISCARD_NV, GL_DISCARD_NV, scale, GL_NONE,
-						GL_TRUE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					// ooh.. what to do here?
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					// todo -- make next ref to dst.a actually ref dst.b since combiners can't write dp3 to the alpha channel
-					// Done by Ashu: Put this register in the alphaBlueRegister set. 
-					isAlphaBlue = true;
-					ps10::alphaBlueRegisters.insert(dst.c_str());
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "lrp")
-			{
-				src a(instr[2+instr_base],combiner);
-				src b(instr[3+instr_base],combiner);
-				src c(instr[4+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, GL_UNSIGNED_IDENTITY_NV, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, b.reg, b.map, b.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_C_NV, a.reg, GL_UNSIGNED_INVERT_NV, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_D_NV, c.reg, c.map, c.comp);
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, GL_UNSIGNED_IDENTITY_NV, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, b.reg, b.map, b.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_C_NV, a.reg, GL_UNSIGNED_INVERT_NV, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_D_NV, c.reg, c.map, c.alphaComp);
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "mad")
-			{
-				src a(instr[2+instr_base],combiner);
-				src b(instr[3+instr_base],combiner);
-				src c(instr[4+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, b.reg, b.map, b.comp);					
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_D_NV, c.reg, c.map, c.comp);
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, a.map, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, b.reg, b.map, b.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_D_NV, c.reg, c.map, c.alphaComp);
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, dreg, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "mov")
-			{
-				src a(instr[2+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_RGB);
-					glCombinerOutputNV(C, GL_RGB, dreg, GL_DISCARD_NV, GL_DISCARD_NV, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, a.map, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
-					glCombinerOutputNV(C, GL_ALPHA, dreg, GL_DISCARD_NV, GL_DISCARD_NV, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-			else if(op == "mul")
-			{
-				src a(instr[2+instr_base],combiner);
-				src b(instr[3+instr_base],combiner);
-
-				if(mask == GL_RGBA || mask == GL_RGB)
-				{
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_A_NV, a.reg, a.map, a.comp);
-					glCombinerInputNV(C, GL_RGB, GL_VARIABLE_B_NV, b.reg, b.map, b.comp);
-					glCombinerOutputNV(C, GL_RGB, dreg, GL_DISCARD_NV, GL_DISCARD_NV, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-
-				if(mask == GL_RGBA || mask == GL_ALPHA)
-				{
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_A_NV, a.reg, a.map, a.alphaComp);
-					glCombinerInputNV(C, GL_ALPHA, GL_VARIABLE_B_NV, b.reg, b.map, b.alphaComp);
-					glCombinerOutputNV(C, GL_ALPHA, dreg, GL_DISCARD_NV, GL_DISCARD_NV, scale, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-				else if (!paired_instr)
-				{
-					glCombinerOutputNV(C, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE,
-									   GL_FALSE, GL_FALSE, GL_FALSE);
-				}
-			}
-            // combiner++;
-			if (!isAlphaBlue)
-				RemoveFromAlphaBlue(dst);
-		}
-
-		int combiner;
-	};
-
-
-}
-
-void ps10::SetFinalCombinerStage()
-{
-	glFinalCombinerInputNV(GL_VARIABLE_A_NV,GL_FOG,GL_UNSIGNED_IDENTITY_NV,GL_ALPHA);
-	glFinalCombinerInputNV(GL_VARIABLE_B_NV,GL_SPARE0_NV,
-			GL_UNSIGNED_IDENTITY_NV,GL_RGB);
-	glFinalCombinerInputNV(GL_VARIABLE_C_NV,GL_FOG,GL_UNSIGNED_IDENTITY_NV,GL_RGB);
-	glFinalCombinerInputNV(GL_VARIABLE_D_NV,GL_ZERO,GL_UNSIGNED_IDENTITY_NV,GL_RGB);
-	glFinalCombinerInputNV(GL_VARIABLE_E_NV,GL_ZERO,GL_UNSIGNED_IDENTITY_NV,GL_RGB);
-	glFinalCombinerInputNV(GL_VARIABLE_F_NV,GL_ZERO,GL_UNSIGNED_IDENTITY_NV,GL_RGB);
-	std::set<const char*, ltstr>::iterator iter = ps10::alphaBlueRegisters.find("r0");
-	GLenum alphaComp = GL_ALPHA;
-	if (iter != ps10::alphaBlueRegisters.end())
-		alphaComp = GL_BLUE;
-	glFinalCombinerInputNV(GL_VARIABLE_G_NV,GL_SPARE0_NV,GL_UNSIGNED_IDENTITY_NV,alphaComp);
-	// We can now clear alphaBlueRegisters for the next go around
-	alphaBlueRegisters.clear();
-}
-
-void ps10::invoke(vector<constdef> * c,
-	              list<vector<string> > * a,
-				  list<vector<string> > * b)
-{
-	const_to_combiner_reg_mapping_count = 0; // Hansong
-
-
-	glEnable(GL_PER_STAGE_CONSTANTS_NV); // should we require apps to do this?
-	if(c)
-		for_each(c->begin(), c->end(), set_constants());
-	if(a)
-		for_each(a->begin(), a->end(), set_texture_shaders(c));
-	glActiveTextureARB( GL_TEXTURE0_ARB );
-    int numCombiners = 0;
-    list<vector<string> >::iterator it = b->begin();
-    for(; it!=b->end(); ++it) {
-      if ( (*it)[0] != "+" )
-        numCombiners++;
-    }
-    glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, numCombiners);
-	if(b)
-		for_each(b->begin(), b->end(), set_register_combiners());
-	SetFinalCombinerStage();
-	// We can clear the stageToTarget map now.
-	stageToTargetMap.clear();
-}
-
-// simple identification - just look for magic substring
-//  -- easy to break...
-bool is_ps10(const char * s)
-{
-	if(strstr(s, "ps.1.0"))
-		return true;
-	if(strstr(s, "Ps.1.0"))
-		return true;
-	if(strstr(s, "ps.1.1"))
-		return true;
-	if(strstr(s, "Ps.1.1"))
-		return true;
-	return false;
-}
-
-bool ps10::init_extensions()
-{
-	// register combiners	
-	static bool rcinit = false;
-	if(rcinit == false)
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_register_combiners"))
-		{
-			errors.set("unable to initialize GL_NV_register_combiners\n");
-			return false;
-		}
-		else
-		{
-        */
-			rcinit = true;
-            /*
-		}
-        */
-	}
-
-	// register combiners 2
-	static bool rc2init = false;
-	if(rc2init == false)
-	{
-      /*
-		if( ! glh_init_extensions("GL_NV_register_combiners2"))
-		{
-			errors.set("unable to initialize GL_NV_register_combiners2\n");
-			return false;
-		}
-		else
-		{
-        */
-			rc2init = true;
-            /*
-		}
-        */
-	}
-	
-	static bool tsinit = 0;	
-	if (tsinit == false )
-	{
-      /*
-		if(! glh_init_extensions( "GL_NV_texture_shader " "GL_ARB_multitexture " ))
-		{
-			errors.set("unable to initialize GL_NV_texture_shader\n");
-			return false;
-		}
-		else
-		{
-        */
-			tsinit = true;
-            /*
-		}
-        */
-	}
-	constToStageAndConstMap.clear();
-	constToStageArray.clear();
-	stageToConstMap.clear();
-	line_number = 1;
-	return true;
-}
-
-const int* ps10_get_info(int* pcount)
-{
-	if (pcount)
-		*pcount = constToStageArray.size();
-	return &(constToStageArray[0]);
-}

+ 0 - 30
CamelotRenderer/RenderSystemGL/Source/nvparse/ps1.0_program.h

@@ -1,30 +0,0 @@
-#ifndef _PS10_PROGRAM_H
-#define _PS10_PROGRAM_H
-
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-#include <string>
-#include <list>
-#include <vector>
-#include <map>
-
-namespace ps10
-{
-
-	struct constdef
-	{
-		std::string reg;
-		float r,g,b,a;
-	};
-
-	extern std::map<int, std::pair<int,int> > constToStageAndConstMap;
-	extern std::map<int, GLenum> stageToTargetMap;
-	void invoke(std::vector<constdef> * c,
-		        std::list<std::vector<std::string> > * a,
-				std::list<std::vector<std::string> > * b);
-	
-	bool init_extensions();
-}
-
-#endif

+ 0 - 90
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_combiners.cpp

@@ -1,90 +0,0 @@
-#include "rc1.0_combiners.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-
-void CombinersStruct::Validate()
-{
-	if (2 == numConsts &&
-		cc[0].reg.bits.name == cc[1].reg.bits.name)
-		errors.set("global constant set twice");
-
-	generals.Validate(numConsts, &cc[0]);
-
-	final.Validate();
-}
-
-void CombinersStruct::Invoke()
-{
-	for (int i = 0; i < numConsts; i++)
-		glCombinerParameterfvNV(cc[i].reg.bits.name, &(cc[i].v[0]));
-
-	generals.Invoke();
-
-	final.Invoke();
-}
-
-bool is_rc10(const char * s)
-{
-	return ! strncmp(s, "!!RC1.0", 7);
-}
-
-
-bool rc10_init_more()
-{
-	bool rcinit = false;
-	if(rcinit == false)
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_register_combiners"))
-		{
-			errors.set("unable to initialize GL_NV_register_combiners\n");
-			return false;
-		}
-		else
-		{
-        */
-			rcinit = true;
-            /*
-		}
-        */
-	}
-
-	bool rc2init = false;
-	if(rc2init == false)
-	{
-		//glh_init_extensions("GL_NV_register_combiners2");
-		// Don't fail if this doesn't initialize.
-		// We will run even if it doesn't exist.
-		rc2init = true;
-	}
-	
-	errors.reset();
-	line_number = 1;
-
-	return true;
-}
-/*
-    else if(!strncmp(instring, "!!RC1.0", 7))
-    {
-        if(glCombinerParameterfvNV == 0)
-        {
-            if(! glh_init_extensions("GL_NV_register_combiners"))
-            {
-                errors.set("unable to initialize GL_NV_register_combiners\n");
-                free(instring);
-                return;
-            }
-        }
-        if(glCombinerStageParameterfvNV == 0)
-        {
-            glh_init_extensions("GL_NV_register_combiners2");
-            // Don't fail if this doesn't initialize.
-            // We will run even if it doesn't exist.
-        }
-        errors.reset();
-        line_number = 1;
-        rc10_init(instring+7);
-        rc10_parse();
-    }
-*/

+ 0 - 24
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_combiners.h

@@ -1,24 +0,0 @@
-#ifndef _RC10_COMBINERS_H
-#define _RC10_COMBINERS_H
-
-#include "rc1.0_general.h"
-#include "rc1.0_final.h"
-
-class CombinersStruct {
-public:
-	void Init(GeneralCombinersStruct _gcs, FinalCombinerStruct _fc, ConstColorStruct _cc0, ConstColorStruct _cc1)
-	{ generals = _gcs; final = _fc; cc[0] = _cc0; cc[1] = _cc1; numConsts = 2;}
-	void Init(GeneralCombinersStruct _gcs, FinalCombinerStruct _fc, ConstColorStruct _cc0)
-	{ generals = _gcs; final = _fc; cc[0] = _cc0; numConsts = 1;}
-	void Init(GeneralCombinersStruct _gcs, FinalCombinerStruct _fc)
-	{ generals = _gcs; final = _fc; numConsts = 0;}
-	void Validate();
-	void Invoke();
-private:
-	GeneralCombinersStruct generals;
-	FinalCombinerStruct final;
-	ConstColorStruct cc[2];
-	int numConsts;
-};
-
-#endif

+ 0 - 157
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_final.cpp

@@ -1,157 +0,0 @@
-#include "rc1.0_final.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-void FinalRgbFunctionStruct::ZeroOut()
-{
-	RegisterEnum zero;
-	zero.word = RCP_ZERO;
-	a.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-	b.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-	c.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-	d.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-}
-
-void FinalAlphaFunctionStruct::ZeroOut()
-{
-	RegisterEnum zero;
-	zero.word = RCP_ZERO;
-	g.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-}
-
-void FinalProductStruct::ZeroOut()
-{
-	RegisterEnum zero;
-	zero.word = RCP_ZERO;
-	e.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-	f.Init(zero, GL_UNSIGNED_IDENTITY_NV);
-}
-void FinalCombinerStruct::Validate()
-{
-	if (hasProduct &&
-		(GL_E_TIMES_F_NV == product.e.reg.bits.name ||
-		 GL_SPARE0_PLUS_SECONDARY_COLOR_NV == product.e.reg.bits.name ||
-		 GL_DISCARD_NV == product.e.reg.bits.name ||
-		 GL_E_TIMES_F_NV == product.f.reg.bits.name ||
-		 GL_SPARE0_PLUS_SECONDARY_COLOR_NV == product.f.reg.bits.name ||
-		 GL_DISCARD_NV == product.f.reg.bits.name))
-		errors.set("invalid input register for final_product");
-
-	if (hasProduct &&
-		(RCP_BLUE == product.e.reg.bits.channel ||
-		 RCP_BLUE == product.f.reg.bits.channel))
-		errors.set("blue register used in final_product");
-
-	if (GL_E_TIMES_F_NV == alpha.g.reg.bits.name ||
-		GL_SPARE0_PLUS_SECONDARY_COLOR_NV == alpha.g.reg.bits.name ||
-		GL_DISCARD_NV == alpha.g.reg.bits.name)
-		errors.set("invalid input register for final alpha");
-
-	if (RCP_RGB == alpha.g.reg.bits.channel)
-		errors.set("rgb register used in final alpha");
-
-	if (GL_SPARE0_PLUS_SECONDARY_COLOR_NV == rgb.a.reg.bits.name &&
-		GL_SPARE0_PLUS_SECONDARY_COLOR_NV != rgb.b.reg.bits.name &&
-		GL_ZERO == rgb.c.reg.bits.name && GL_UNSIGNED_IDENTITY_NV == rgb.c.map)
-	{
-		MappedRegisterStruct temp;
-		temp = rgb.a;
-		rgb.a = rgb.b;
-		rgb.b = temp;
-	}
-
-	if (GL_SPARE0_PLUS_SECONDARY_COLOR_NV == rgb.a.reg.bits.name &&
-		GL_ZERO == rgb.b.reg.bits.name && GL_UNSIGNED_INVERT_NV == rgb.b.map &&
-		GL_ZERO == rgb.c.reg.bits.name && GL_UNSIGNED_IDENTITY_NV == rgb.c.map &&
-		GL_SPARE0_PLUS_SECONDARY_COLOR_NV != rgb.d.reg.bits.name)
-	{
-		MappedRegisterStruct temp;
-		temp = rgb.a;
-		rgb.a = rgb.d;
-		rgb.d = temp;
-	}
-
-	if (GL_SPARE0_PLUS_SECONDARY_COLOR_NV == rgb.a.reg.bits.name ||
-		GL_DISCARD_NV == rgb.a.reg.bits.name ||
-		GL_DISCARD_NV == rgb.b.reg.bits.name ||
-		GL_DISCARD_NV == rgb.c.reg.bits.name ||
-		GL_DISCARD_NV == rgb.d.reg.bits.name)
-		errors.set("invalid input register for final rgb");
-
-	if (RCP_BLUE == rgb.a.reg.bits.channel ||
-		RCP_BLUE == rgb.b.reg.bits.channel ||
-		RCP_BLUE == rgb.c.reg.bits.channel ||
-		RCP_BLUE == rgb.d.reg.bits.channel)
-		errors.set("blue register used in final rgb");
-
-	if ((GL_E_TIMES_F_NV == rgb.a.reg.bits.name ||
-		GL_E_TIMES_F_NV == rgb.b.reg.bits.name ||
-		GL_E_TIMES_F_NV == rgb.c.reg.bits.name ||
-		GL_E_TIMES_F_NV == rgb.d.reg.bits.name) && !hasProduct)
-		errors.set("final_product used but not set");
-
-	if (RCP_NONE == rgb.a.reg.bits.channel)
-		rgb.a.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == rgb.b.reg.bits.channel)
-		rgb.b.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == rgb.c.reg.bits.channel)
-		rgb.c.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == rgb.d.reg.bits.channel)
-		rgb.d.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == product.e.reg.bits.channel)
-		product.e.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == product.f.reg.bits.channel)
-		product.f.reg.bits.channel = RCP_RGB;
-	if (RCP_NONE == alpha.g.reg.bits.channel)
-		alpha.g.reg.bits.channel = RCP_ALPHA;
-}
-
-void FinalCombinerStruct::Invoke()
-{
-	if(clamp)
-		glCombinerParameteriNV(GL_COLOR_SUM_CLAMP_NV, GL_TRUE);
-	else
-		glCombinerParameteriNV(GL_COLOR_SUM_CLAMP_NV, GL_FALSE);
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_A_NV,
-		rgb.a.reg.bits.name,
-		rgb.a.map,
-		MAP_CHANNEL(rgb.a.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_B_NV,
-		rgb.b.reg.bits.name,
-		rgb.b.map,
-		MAP_CHANNEL(rgb.b.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_C_NV,
-		rgb.c.reg.bits.name,
-		rgb.c.map,
-		MAP_CHANNEL(rgb.c.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_D_NV,
-		rgb.d.reg.bits.name,
-		rgb.d.map,
-		MAP_CHANNEL(rgb.d.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_E_NV,
-		product.e.reg.bits.name,
-		product.e.map,
-		MAP_CHANNEL(product.e.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_F_NV,
-		product.f.reg.bits.name,
-		product.f.map,
-		MAP_CHANNEL(product.f.reg.bits.channel));
-
-	glFinalCombinerInputNV(
-		GL_VARIABLE_G_NV,
-		alpha.g.reg.bits.name,
-		alpha.g.map,
-		MAP_CHANNEL(alpha.g.reg.bits.channel));
-}

+ 0 - 48
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_final.h

@@ -1,48 +0,0 @@
-#ifndef _RC10_FINAL_H
-#define _RC10_FINAL_H
-
-#include "rc1.0_register.h"
-
-class FinalAlphaFunctionStruct {
-public:
-	void Init(MappedRegisterStruct _g) { g = _g; }
-	void ZeroOut();
-	MappedRegisterStruct g;
-};
-
-class FinalRgbFunctionStruct {
-public:
-	void Init(MappedRegisterStruct _a, MappedRegisterStruct _b, MappedRegisterStruct _c, MappedRegisterStruct _d)
-	{ a = _a; b = _b; c = _c; d = _d; }
-	void ZeroOut();
-	MappedRegisterStruct a;
-	MappedRegisterStruct b;
-	MappedRegisterStruct c;
-	MappedRegisterStruct d;
-};
-
-class FinalProductStruct {
-public:
-	void Init(MappedRegisterStruct _e, MappedRegisterStruct _f) { e = _e; f = _f; }
-	void ZeroOut();
-	MappedRegisterStruct e;
-	MappedRegisterStruct f;
-};
-
-class FinalCombinerStruct {
-public:
-	void Init(FinalRgbFunctionStruct _rgb, FinalAlphaFunctionStruct _alpha, int _clamp, FinalProductStruct _product)
-	{ rgb = _rgb; alpha = _alpha; clamp = _clamp; product = _product; hasProduct = true;}
-	void Init(FinalRgbFunctionStruct _rgb, FinalAlphaFunctionStruct _alpha, int _clamp)
-	{ rgb = _rgb; alpha = _alpha; clamp = _clamp; hasProduct = false; product.ZeroOut();}
-
-	int hasProduct;
-	FinalProductStruct product;
-	int clamp;
-	FinalRgbFunctionStruct rgb;
-	FinalAlphaFunctionStruct alpha;
-	void Validate();
-	void Invoke();
-};
-
-#endif

+ 0 - 298
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_general.cpp

@@ -1,298 +0,0 @@
-#include "rc1.0_general.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <stdio.h>
-
-void GeneralCombinersStruct::Validate(int numConsts, ConstColorStruct *pcc)
-{
-	GLint maxGCs;
-	glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &maxGCs);
-	if (num > maxGCs) {
-		char buffer[256];
-		sprintf(buffer, "%d general combiners specified, only %d supported", num, (int)maxGCs);
-		errors.set(buffer);
-		num = maxGCs;
-	}
-
-	if (0 == num) {
-		// Setup a "fake" general combiner 0
-		general[0].ZeroOut();
-		num = 1;
-	}
-
-	localConsts = 0;
-	int i;
-	for (i = 0; i < num; i++)
-		localConsts += general[i].numConsts;
-
-	if (localConsts > 0)
-		if (NULL == glCombinerStageParameterfvNV)
-			errors.set("local constant(s) specified, but not supported -- ignored");
-		else
-			for (i = 0; i < num; i++)
-				general[i].SetUnusedLocalConsts(numConsts, pcc);
-
-	for (i = 0; i < num; i++)
-		general[i].Validate(i);
-
-
-	for (; i < maxGCs; i++)
-		general[i].ZeroOut();
-}
-
-void GeneralCombinersStruct::Invoke()
-{
-	glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, num);
-	int i;
-	for (i = 0; i < num; i++)
-		general[i].Invoke(i);
-	
-	if (NULL != glCombinerStageParameterfvNV) {
-		if (localConsts > 0)
-			glEnable(GL_PER_STAGE_CONSTANTS_NV);
-		else
-			glDisable(GL_PER_STAGE_CONSTANTS_NV);
-	}
-		
-}
-
-void GeneralCombinerStruct::ZeroOut()
-{
-		numPortions = 2;
-		numConsts = 0;
-
-		portion[0].ZeroOut();
-		portion[0].designator = RCP_RGB;
-		portion[1].ZeroOut();
-		portion[1].designator = RCP_ALPHA;
-}
-
-
-void GeneralCombinerStruct::SetUnusedLocalConsts(int numGlobalConsts, ConstColorStruct *globalCCs)
-{
-        int i;
-	for (i = 0; i < numGlobalConsts; i++) {
-		bool constUsed = false;
-		int j;
-		for (j = 0; j < numConsts; j++)
-			constUsed |= (cc[j].reg.bits.name == globalCCs[i].reg.bits.name);
-		if (!constUsed)
-			cc[numConsts++] = globalCCs[i];
-	}
-}
-
-
-void GeneralCombinerStruct::Validate(int stage)
-{
-	if (2 == numConsts &&
-		cc[0].reg.bits.name == cc[1].reg.bits.name)
-		errors.set("local constant set twice");
-
-	switch (numPortions)
-	{
-	case 0:
-		portion[0].designator = RCP_RGB;
-		// Fallthru
-	case 1:
-		portion[1].designator = ((RCP_RGB == portion[0].designator) ? RCP_ALPHA : RCP_RGB);
-		// Fallthru
-	case 2:
-		if (portion[0].designator == portion[1].designator)
-			errors.set("portion declared twice");
-		break;
-	}
-	int i;
-	for (i = 0; i < numPortions; i++)
-		portion[i].Validate(stage);
-
-	for (; i < 2; i++)
-		portion[i].ZeroOut();
-
-}
-
-void GeneralCombinerStruct::Invoke(int stage)
-{
-	int i;
-
-	if (NULL != glCombinerStageParameterfvNV)
-		for (i = 0; i < numConsts; i++)
-			glCombinerStageParameterfvNV(GL_COMBINER0_NV + stage, cc[i].reg.bits.name, &(cc[i].v[0]));
-
-	for (i = 0; i < 2; i++)
-		portion[i].Invoke(stage);
-}
-
-void GeneralPortionStruct::Validate(int stage)
-{
-	gf.Validate(stage, designator);
-}
-
-void GeneralPortionStruct::Invoke(int stage)
-{
-	gf.Invoke(stage, designator, bs);
-}
-
-void GeneralPortionStruct::ZeroOut()
-{
-	gf.ZeroOut();
-	bs.word = RCP_SCALE_BY_ONE;
-}
-
-void GeneralFunctionStruct::ZeroOut()
-{
-	// Create mapped registers for zero and discard
-	MappedRegisterStruct unsignedZero;
-	RegisterEnum zero;
-	zero.word = RCP_ZERO;
-	unsignedZero.Init(zero);
-
-	MappedRegisterStruct unsignedDiscard;
-	RegisterEnum discard;
-	discard.word = RCP_DISCARD;
-	unsignedDiscard.Init(discard);
-
-	numOps = 3;
-
-	op[0].op = RCP_MUL;
-	op[0].reg[0] = unsignedDiscard;
-	op[0].reg[1] = unsignedZero;
-	op[0].reg[2] = unsignedZero;
-
-	op[1].op = RCP_MUL;
-	op[1].reg[0] = unsignedDiscard;
-	op[1].reg[1] = unsignedZero;
-	op[1].reg[2] = unsignedZero;
-
-	op[2].op = RCP_SUM;
-	op[2].reg[0] = unsignedDiscard;
-
-}
-
-void GeneralFunctionStruct::Validate(int stage, int portion)
-{
-        int i;
-	for (i = 0; i < numOps; i++)
-		op[i].Validate(stage, portion);
-	// Check if multiple ops are writing to same register (and it's not DISCARD)
-	if (numOps > 1 &&
-		op[0].reg[0].reg.bits.name == op[1].reg[0].reg.bits.name &&
-		GL_DISCARD_NV != op[0].reg[0].reg.bits.name)
-		errors.set("writing to same register twice");
-	if (numOps > 2 &&
-		(op[0].reg[0].reg.bits.name == op[2].reg[0].reg.bits.name ||
-		 op[1].reg[0].reg.bits.name == op[2].reg[0].reg.bits.name) &&
-		GL_DISCARD_NV != op[2].reg[0].reg.bits.name)
-		errors.set("writing to same register twice");
-
-	// Set unused outputs to discard, unused inputs to zero/unsigned_identity
-	if (numOps < 2) {
-		// Set C input to zero
-		op[1].reg[1].reg.bits.name = GL_ZERO;
-		op[1].reg[1].map = GL_UNSIGNED_IDENTITY_NV;
-		op[1].reg[1].reg.bits.channel = portion;
-
-		// Set D input to zero
-		op[1].reg[2].reg.bits.name = GL_ZERO;
-		op[1].reg[2].map = GL_UNSIGNED_IDENTITY_NV;
-		op[1].reg[2].reg.bits.channel = portion;
-
-		// Discard CD output
-		op[1].op = false;
-		op[1].reg[0].reg.bits.name = GL_DISCARD_NV;
-	}
-
-	if (numOps < 3) {
-		// Discard muxSum output
-		op[2].reg[0].reg.bits.name = GL_DISCARD_NV;
-		op[2].op = RCP_SUM;
-	}
-}
-
-
-void GeneralFunctionStruct::Invoke(int stage, int portion, BiasScaleEnum bs)
-{
-	GLenum portionEnum = (RCP_RGB == portion) ? GL_RGB : GL_ALPHA;
-
-	glCombinerInputNV(GL_COMBINER0_NV + stage,
-		portionEnum,
-		GL_VARIABLE_A_NV,
-		op[0].reg[1].reg.bits.name,
-		op[0].reg[1].map,
-		MAP_CHANNEL(op[0].reg[1].reg.bits.channel));
-
-	glCombinerInputNV(GL_COMBINER0_NV + stage,
-		portionEnum,
-		GL_VARIABLE_B_NV,
-		op[0].reg[2].reg.bits.name,
-		op[0].reg[2].map,
-		MAP_CHANNEL(op[0].reg[2].reg.bits.channel));
-
-	glCombinerInputNV(GL_COMBINER0_NV + stage,
-		portionEnum,
-		GL_VARIABLE_C_NV,
-		op[1].reg[1].reg.bits.name,
-		op[1].reg[1].map,
-		MAP_CHANNEL(op[1].reg[1].reg.bits.channel));
-
-	glCombinerInputNV(GL_COMBINER0_NV + stage,
-		portionEnum,
-		GL_VARIABLE_D_NV,
-		op[1].reg[2].reg.bits.name,
-		op[1].reg[2].map,
-		MAP_CHANNEL(op[1].reg[2].reg.bits.channel));
-
-	glCombinerOutputNV(GL_COMBINER0_NV + stage,
-		portionEnum,
-		op[0].reg[0].reg.bits.name,
-		op[1].reg[0].reg.bits.name,
-		op[2].reg[0].reg.bits.name,
-		bs.bits.scale,
-		bs.bits.bias,
-		op[0].op,
-		op[1].op,
-		(op[2].op == RCP_MUX) ? true : false);
-}
-
-// This helper function assigns a channel to an undesignated input register
-static void ConvertRegister(RegisterEnum& reg, int portion)
-{
-	if (RCP_NONE == reg.bits.channel) {
-		reg.bits.channel = portion;
-		if (GL_FOG == reg.bits.name && RCP_ALPHA == portion)
-			// Special case where fog alpha is final only, but RGB is not
-			reg.bits.finalOnly = true;
-	}
-}
-
-
-void OpStruct::Validate(int stage, int portion)
-{
-	int args = 1;
-
-	if (RCP_DOT == op || RCP_MUL == op)
-		args = 3;
-	else
-		args = 1;
-
-	if (reg[0].reg.bits.readOnly)
-		errors.set("writing to a read-only register");
-
-	if (RCP_ALPHA == portion &&
-		RCP_DOT == op)
-		errors.set("dot used in alpha portion");
-	int i;
-	for (i = 0; i < args; i++) {
-		ConvertRegister(reg[i].reg, portion);
-		if (reg[i].reg.bits.finalOnly)
-			errors.set("final register used in general combiner");
-		if (RCP_RGB == portion &&
-			RCP_BLUE == reg[i].reg.bits.channel)
-			errors.set("blue register used in rgb portion");
-		if (RCP_ALPHA == portion &&
-			RCP_RGB == reg[i].reg.bits.channel)
-			errors.set("rgb register used in alpha portion");
-		if (i > 0 &&
-			GL_DISCARD_NV == reg[i].reg.bits.name)
-			errors.set("reading from discard");
-	}
-}

+ 0 - 107
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_general.h

@@ -1,107 +0,0 @@
-#ifndef _RC10_GENERAL_H
-#define _RC10_GENERAL_H
-
-#include "rc1.0_register.h"
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-enum {
-	RCP_MUL = 0,
-	RCP_DOT,
-	RCP_MUX,
-	RCP_SUM
-};
-
-class ConstColorStruct {
-public:
-	void Init(RegisterEnum _reg, float _v0, float _v1, float _v2, float _v3)
-	{ reg = _reg; v[0] = _v0; v[1] = _v1; v[2] = _v2; v[3] = _v3; }
-	RegisterEnum reg;
-	float v[4];
-};
-
-class OpStruct {
-public:
-	void Init(int _op, RegisterEnum _reg0, MappedRegisterStruct _reg1, MappedRegisterStruct _reg2)
-	{ op = _op; reg[0].reg = _reg0; reg[1] = _reg1; reg[2] = _reg2; }
-	void Init(int _op, RegisterEnum _reg0)
-	{ op = _op; reg[0].reg = _reg0; }
-	int op;
-	MappedRegisterStruct reg[3];
-	void Validate(int stage, int portion);
-};
-
-class GeneralFunctionStruct {
-public:
-	void Init(OpStruct _op0, OpStruct _op1, OpStruct _op2) { op[0] = _op0; op[1] = _op1; op[2] = _op2; numOps = 3; }
-	void Init(OpStruct _op0, OpStruct _op1) { op[0] = _op0; op[1] = _op1; numOps = 2; }
-	void Init(OpStruct _op0) { op[0] = _op0; numOps = 1; }
-	void Validate(int stage, int portion);
-	void Invoke(int stage, int portion, BiasScaleEnum bs);
-	void ZeroOut();
-	int numOps;
-	OpStruct op[3];
-};
-
-
-class GeneralPortionStruct {
-public:
-	void Init(int _designator, GeneralFunctionStruct _gf, BiasScaleEnum _bs)
-	{ designator = _designator; gf = _gf; bs = _bs; }
-
-	void Validate(int stage);
-	void Invoke(int stage);
-	void ZeroOut();
-	int designator;
-	GeneralFunctionStruct gf;
-	BiasScaleEnum bs;
-};
-
-class GeneralCombinerStruct {
-public:
-	void Init(GeneralPortionStruct _portion0, GeneralPortionStruct _portion1, ConstColorStruct _cc0, ConstColorStruct _cc1)
-	{ portion[0] = _portion0; portion[1] = _portion1; numPortions = 2; cc[0] = _cc0; cc[1] = _cc1; numConsts = 2; }
-	void Init(GeneralPortionStruct _portion0, GeneralPortionStruct _portion1, ConstColorStruct _cc0)
-	{ portion[0] = _portion0; portion[1] = _portion1; numPortions = 2; cc[0] = _cc0; numConsts = 1; }
-	void Init(GeneralPortionStruct _portion0, GeneralPortionStruct _portion1)
-	{ portion[0] = _portion0; portion[1] = _portion1; numPortions = 2; numConsts = 0; }
-
-	void Init(GeneralPortionStruct _portion0, ConstColorStruct _cc0, ConstColorStruct _cc1)
-	{ portion[0] = _portion0; numPortions = 1; cc[0] = _cc0; cc[1] = _cc1; numConsts = 2; }
-	void Init(GeneralPortionStruct _portion0, ConstColorStruct _cc0)
-	{ portion[0] = _portion0; numPortions = 1; cc[0] = _cc0; numConsts = 1; }
-	void Init(GeneralPortionStruct _portion0)
-	{ portion[0] = _portion0; numPortions = 1; numConsts = 0; }
-
-	void Validate(int stage);
-	void SetUnusedLocalConsts(int numGlobalConsts, ConstColorStruct *globalCCs);
-	void Invoke(int stage);
-	void ZeroOut();
-	GeneralPortionStruct portion[2];
-	int numPortions;
-	ConstColorStruct cc[2];
-	int numConsts;
-};
-
-class GeneralCombinersStruct {
-public:
-	void Init() {num = 0;}
-	void Init(GeneralCombinerStruct _gc) { num = 1; general[0] = _gc; }
-	GeneralCombinersStruct& operator+=(GeneralCombinerStruct& _gc)
-	{
-		if (num < RCP_NUM_GENERAL_COMBINERS)
-			general[num++] = _gc;
-		else
-			errors.set("Too many general combiners.");
-		return *this;
-	}
-	void Validate(int numConsts, ConstColorStruct *cc);
-	void Invoke();
-	GeneralCombinerStruct general[RCP_NUM_GENERAL_COMBINERS];
-	int num;
-private:
-	int localConsts;
-};
-
-
-#endif

+ 0 - 202
CamelotRenderer/RenderSystemGL/Source/nvparse/rc1.0_register.h

@@ -1,202 +0,0 @@
-#ifndef _RC10_REGISTER_H
-#define _RC10_REGISTER_H
-
-#include <stdlib.h>
-#include <CmGLPrerequisites.h>
-#include <GL/glew.h>
-
-#define RCP_NUM_GENERAL_COMBINERS 8
-
-#define RCP_RGB		0
-#define RCP_ALPHA	1
-#define RCP_BLUE	2
-#define RCP_NONE	3
-
-typedef union _RegisterEnum {
-  struct {
-#if BYTE_ORDER != BIG_ENDIAN
-    unsigned int name          :16; // OpenGL enum for register
-    unsigned int channel       : 2; // RCP_RGB, RCP_ALPHA, etc
-    unsigned int readOnly      : 1; // true or false
-    unsigned int finalOnly     : 1; // true or false
-    unsigned int unused        :12;
-#else
-    unsigned int unused        :12;
-    unsigned int finalOnly     : 1; // true or false
-    unsigned int readOnly      : 1; // true or false
-    unsigned int channel       : 2; // RCP_RGB, RCP_ALPHA, RCP_BLUE, RCP_NONE
-    unsigned int name          :16; // OpenGL enum for register
-#endif
-  } bits;
-  unsigned int word;
-} RegisterEnum;
-// No need for writeOnly flag, since DISCARD is the only register in that category
-
-// WARNING:  Don't monkey with the above structure or this macro
-// unless you're absolutely sure of what you're doing!
-// This constant allocation makes validation *much* cleaner.
-#define RCP_SET_REGISTER_ENUM(name, channel, readonly, finalonly) \
-	 ((finalonly << 19) | (readonly << 18) | (channel << 16) | name)
-
-#define RCP_FOG_RGB					RCP_SET_REGISTER_ENUM(GL_FOG, RCP_RGB,   1, 0)
-#define RCP_FOG_ALPHA				RCP_SET_REGISTER_ENUM(GL_FOG, RCP_ALPHA, 1, 1)
-#define RCP_FOG_BLUE				RCP_SET_REGISTER_ENUM(GL_FOG, RCP_BLUE,  1, 0)
-#define RCP_FOG						RCP_SET_REGISTER_ENUM(GL_FOG, RCP_NONE,  1, 0)
-#define RCP_PRIMARY_COLOR_RGB		RCP_SET_REGISTER_ENUM(GL_PRIMARY_COLOR_NV, RCP_RGB,   0, 0)
-#define RCP_PRIMARY_COLOR_ALPHA		RCP_SET_REGISTER_ENUM(GL_PRIMARY_COLOR_NV, RCP_ALPHA, 0, 0)
-#define RCP_PRIMARY_COLOR_BLUE		RCP_SET_REGISTER_ENUM(GL_PRIMARY_COLOR_NV, RCP_BLUE,  0, 0)
-#define RCP_PRIMARY_COLOR			RCP_SET_REGISTER_ENUM(GL_PRIMARY_COLOR_NV, RCP_NONE,  0, 0)
-#define RCP_SECONDARY_COLOR_RGB		RCP_SET_REGISTER_ENUM(GL_SECONDARY_COLOR_NV, RCP_RGB,   0, 0)
-#define RCP_SECONDARY_COLOR_ALPHA	RCP_SET_REGISTER_ENUM(GL_SECONDARY_COLOR_NV, RCP_ALPHA, 0, 0)
-#define RCP_SECONDARY_COLOR_BLUE	RCP_SET_REGISTER_ENUM(GL_SECONDARY_COLOR_NV, RCP_BLUE,  0, 0)
-#define RCP_SECONDARY_COLOR			RCP_SET_REGISTER_ENUM(GL_SECONDARY_COLOR_NV, RCP_NONE,  0, 0)
-#define RCP_SPARE0_RGB				RCP_SET_REGISTER_ENUM(GL_SPARE0_NV, RCP_RGB,   0, 0)
-#define RCP_SPARE0_ALPHA			RCP_SET_REGISTER_ENUM(GL_SPARE0_NV, RCP_ALPHA, 0, 0)
-#define RCP_SPARE0_BLUE				RCP_SET_REGISTER_ENUM(GL_SPARE0_NV, RCP_BLUE,  0, 0)
-#define RCP_SPARE0					RCP_SET_REGISTER_ENUM(GL_SPARE0_NV, RCP_NONE,  0, 0)
-#define RCP_SPARE1_RGB				RCP_SET_REGISTER_ENUM(GL_SPARE1_NV, RCP_RGB,   0, 0)
-#define RCP_SPARE1_ALPHA			RCP_SET_REGISTER_ENUM(GL_SPARE1_NV, RCP_ALPHA, 0, 0)
-#define RCP_SPARE1_BLUE				RCP_SET_REGISTER_ENUM(GL_SPARE1_NV, RCP_BLUE,  0, 0)
-#define RCP_SPARE1					RCP_SET_REGISTER_ENUM(GL_SPARE1_NV, RCP_NONE,  0, 0)
-#define RCP_TEXTURE0_RGB			RCP_SET_REGISTER_ENUM(GL_TEXTURE0_ARB, RCP_RGB,   0, 0)
-#define RCP_TEXTURE0_ALPHA			RCP_SET_REGISTER_ENUM(GL_TEXTURE0_ARB, RCP_ALPHA, 0, 0)
-#define RCP_TEXTURE0_BLUE			RCP_SET_REGISTER_ENUM(GL_TEXTURE0_ARB, RCP_BLUE,  0, 0)
-#define RCP_TEXTURE0				RCP_SET_REGISTER_ENUM(GL_TEXTURE0_ARB, RCP_NONE,  0, 0)
-#define RCP_TEXTURE1_RGB			RCP_SET_REGISTER_ENUM(GL_TEXTURE1_ARB, RCP_RGB,   0, 0)
-#define RCP_TEXTURE1_ALPHA			RCP_SET_REGISTER_ENUM(GL_TEXTURE1_ARB, RCP_ALPHA, 0, 0)
-#define RCP_TEXTURE1_BLUE			RCP_SET_REGISTER_ENUM(GL_TEXTURE1_ARB, RCP_BLUE,  0, 0)
-#define RCP_TEXTURE1				RCP_SET_REGISTER_ENUM(GL_TEXTURE1_ARB, RCP_NONE,  0, 0)
-#define RCP_TEXTURE2_RGB			RCP_SET_REGISTER_ENUM(GL_TEXTURE2_ARB, RCP_RGB,   0, 0)
-#define RCP_TEXTURE2_ALPHA			RCP_SET_REGISTER_ENUM(GL_TEXTURE2_ARB, RCP_ALPHA, 0, 0)
-#define RCP_TEXTURE2_BLUE			RCP_SET_REGISTER_ENUM(GL_TEXTURE2_ARB, RCP_BLUE,  0, 0)
-#define RCP_TEXTURE2				RCP_SET_REGISTER_ENUM(GL_TEXTURE2_ARB, RCP_NONE,  0, 0)
-#define RCP_TEXTURE3_RGB			RCP_SET_REGISTER_ENUM(GL_TEXTURE3_ARB, RCP_RGB,   0, 0)
-#define RCP_TEXTURE3_ALPHA			RCP_SET_REGISTER_ENUM(GL_TEXTURE3_ARB, RCP_ALPHA, 0, 0)
-#define RCP_TEXTURE3_BLUE			RCP_SET_REGISTER_ENUM(GL_TEXTURE3_ARB, RCP_BLUE,  0, 0)
-#define RCP_TEXTURE3				RCP_SET_REGISTER_ENUM(GL_TEXTURE3_ARB, RCP_NONE,  0, 0)
-#define RCP_CONST_COLOR0_RGB		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR0_NV, RCP_RGB,   1, 0)
-#define RCP_CONST_COLOR0_ALPHA		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR0_NV, RCP_ALPHA, 1, 0)
-#define RCP_CONST_COLOR0_BLUE		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR0_NV, RCP_BLUE,  1, 0)
-#define RCP_CONST_COLOR0			RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR0_NV, RCP_NONE,  1, 0)
-#define RCP_CONST_COLOR1_RGB		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR1_NV, RCP_RGB,   1, 0)
-#define RCP_CONST_COLOR1_ALPHA		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR1_NV, RCP_ALPHA, 1, 0)
-#define RCP_CONST_COLOR1_BLUE		RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR1_NV, RCP_BLUE,  1, 0)
-#define RCP_CONST_COLOR1			RCP_SET_REGISTER_ENUM(GL_CONSTANT_COLOR1_NV, RCP_NONE,  1, 0)
-#define RCP_ZERO_RGB				RCP_SET_REGISTER_ENUM(GL_ZERO, RCP_RGB,   1, 0)
-#define RCP_ZERO_ALPHA				RCP_SET_REGISTER_ENUM(GL_ZERO, RCP_ALPHA, 1, 0)
-#define RCP_ZERO_BLUE				RCP_SET_REGISTER_ENUM(GL_ZERO, RCP_BLUE,  1, 0)
-#define RCP_ZERO					RCP_SET_REGISTER_ENUM(GL_ZERO, RCP_NONE,  1, 0)
-#define RCP_ONE_RGB					RCP_SET_REGISTER_ENUM(GL_ONE, RCP_RGB,   1, 0)
-#define RCP_ONE_ALPHA				RCP_SET_REGISTER_ENUM(GL_ONE, RCP_ALPHA, 1, 0)
-#define RCP_ONE_BLUE				RCP_SET_REGISTER_ENUM(GL_ONE, RCP_BLUE,  1, 0)
-#define RCP_ONE						RCP_SET_REGISTER_ENUM(GL_ONE, RCP_NONE,  1, 0)
-#define RCP_DISCARD					RCP_SET_REGISTER_ENUM(GL_DISCARD_NV, RCP_NONE, 0, 0)
-#define RCP_FINAL_PRODUCT			RCP_SET_REGISTER_ENUM(GL_E_TIMES_F_NV, RCP_NONE, 1, 1)
-#define RCP_COLOR_SUM				RCP_SET_REGISTER_ENUM(GL_SPARE0_PLUS_SECONDARY_COLOR_NV, RCP_NONE, 1, 1)
-
-#define MAP_CHANNEL(channel) ((RCP_RGB == (channel)) ? GL_RGB : (RCP_ALPHA == (channel) ? GL_ALPHA : GL_BLUE))
-
-typedef union _BiasScaleEnum {
-  struct {
-#if BYTE_ORDER != BIG_ENDIAN
-    unsigned int bias          :16; // OpenGL enum for bias
-    unsigned int scale         :16; // OpenGL enum for scale
-#else
-    unsigned int scale         :16; // OpenGL enum for scale
-    unsigned int bias          :16; // OpenGL enum for bias
-#endif
-  } bits;
-  unsigned int word;
-} BiasScaleEnum;
-
-// WARNING:  Don't monkey with the above structure or this macro
-// unless you're absolutely sure of what you're doing!
-// This constant allocation makes validation *much* cleaner.
-#define RCP_SET_BIAS_SCALE_ENUM(bias, scale) ((scale << 16) | bias)
-
-#define RCP_BIAS_BY_NEGATIVE_ONE_HALF_SCALE_BY_TWO	RCP_SET_BIAS_SCALE_ENUM(GL_BIAS_BY_NEGATIVE_ONE_HALF_NV, GL_SCALE_BY_TWO_NV)
-#define RCP_BIAS_BY_NEGATIVE_ONE_HALF				RCP_SET_BIAS_SCALE_ENUM(GL_BIAS_BY_NEGATIVE_ONE_HALF_NV, GL_NONE)
-#define RCP_SCALE_BY_ONE_HALF						RCP_SET_BIAS_SCALE_ENUM(GL_NONE, GL_SCALE_BY_ONE_HALF_NV)
-#define RCP_SCALE_BY_ONE							RCP_SET_BIAS_SCALE_ENUM(GL_NONE, GL_NONE)
-#define RCP_SCALE_BY_TWO							RCP_SET_BIAS_SCALE_ENUM(GL_NONE, GL_SCALE_BY_TWO_NV)
-#define RCP_SCALE_BY_FOUR							RCP_SET_BIAS_SCALE_ENUM(GL_NONE, GL_SCALE_BY_FOUR_NV)
-
-class MappedRegisterStruct {
-public:
-	void Init(RegisterEnum _reg, int _map = GL_UNSIGNED_IDENTITY_NV)
-	{
-		if (RCP_ONE == _reg.word) {
-			_reg.word = RCP_ZERO;
-			switch (_map) {
-			case GL_UNSIGNED_IDENTITY_NV:
-				_map = GL_UNSIGNED_INVERT_NV;
-				break;
-			case GL_UNSIGNED_INVERT_NV:
-				_map = GL_UNSIGNED_IDENTITY_NV;
-				break;
-			case GL_EXPAND_NORMAL_NV:
-				_map = GL_UNSIGNED_INVERT_NV;
-				break;
-			case GL_EXPAND_NEGATE_NV:
-				_map = GL_EXPAND_NORMAL_NV;
-				break;
-			case GL_HALF_BIAS_NORMAL_NV:
-				_map = GL_HALF_BIAS_NEGATE_NV;
-				break;
-			case GL_HALF_BIAS_NEGATE_NV:
-				_map = GL_HALF_BIAS_NORMAL_NV;
-				break;
-			case GL_SIGNED_IDENTITY_NV:
-				_map = GL_UNSIGNED_INVERT_NV;
-				break;
-			case GL_SIGNED_NEGATE_NV:
-				_map = GL_EXPAND_NORMAL_NV;
-				break;
-			}
-		}
-		map = _map;
-		reg = _reg;
-	}
-	int	map;
-	RegisterEnum reg;
-};
-
-#ifdef TEST_BIT_FIELDS
-
-class RegisterEnumTest {
-  public:
-    RegisterEnumTest()
-    {
-      RegisterEnum reg;
-      bool error = false;
-
-      if (sizeof(reg.bits) != sizeof(reg.word))
-        error = true;
-
-      reg.word = 0; reg.bits.name = 0xFFFF;
-      if (RCP_SET_REGISTER_ENUM(0xFFFF, 0, 0, 0) != reg.word)
-        error = true;
-
-      reg.word = 0; reg.bits.channel = 3;
-      if (RCP_SET_REGISTER_ENUM(0, 3, 0, 0) != reg.word) 
-        error = true;
-
-      reg.word = 0; reg.bits.readOnly = true;
-      if (RCP_SET_REGISTER_ENUM(0, 0, 1, 0) != reg.word) 
-        error = true;
-
-      reg.word = 0; reg.bits.finalOnly = true;
-      if (RCP_SET_REGISTER_ENUM(0, 0, 0, 1) != reg.word) 
-        error = true;
-
-      if (error) {
-	fprintf(stderr, "ERROR: Bit Fields were not compiled correctly in " __FILE__ "!\n");
-	exit(1);
-      }
-    }
-};
-
-static RegisterEnumTest registerEnumTest;
-#endif
-
-#endif

+ 0 - 293
CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst.cpp

@@ -1,293 +0,0 @@
-#include "ts1.0_inst.h"
-
-Inst::Inst(int inst, float arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6)
-{
-	opcode.word = inst;
-	expand = 0;
-	args[0] = arg0;
-	args[1] = arg1;
-	args[2] = arg2;
-	args[3] = arg3;
-	args[4] = arg4;
-	args[5] = arg5;
-	args[6] = arg6;
-}
-
-Inst::Inst(int inst, MappedVariablePtr arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6)
-{
-	opcode.word = inst;
-	expand = arg0->expand;
-	args[0] = arg0->var;
-	args[1] = arg1;
-	args[2] = arg2;
-	args[3] = arg3;
-	args[4] = arg4;
-	args[5] = arg5;
-	args[6] = arg6;
-}
-
-void Inst::Invoke()
-{
-	switch(opcode.word) {
-	case TSP_NOP:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
-		break;
-	case TSP_TEXTURE_1D:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_1D);
-		break;
-	case TSP_TEXTURE_2D:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_2D);
-		break;
-#if defined(GL_EXT_texture_rectangle)
-	case TSP_TEXTURE_RECTANGLE:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_RECTANGLE_EXT);
-		break;
-#elif defined(GL_NV_texture_rectangle)
-        case TSP_TEXTURE_RECTANGLE:
-                glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_RECTANGLE_NV);
-                break;
-#else
-	case TSP_TEXTURE_RECTANGLE:
-                break;
-#endif
-	case TSP_TEXTURE_3D:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_3D);
-		break;
-	case TSP_TEXTURE_CUBE_MAP:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_CUBE_MAP_ARB);
-		break;
-	case TSP_CULL_FRAGMENT:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_CULL_FRAGMENT_NV);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_CULL_MODES_NV, &args[0]);
-		break;
-	case TSP_PASS_THROUGH:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_PASS_THROUGH_NV);
-		break;
-	case TSP_OFFSET_2D_SCALE:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_SCALE_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, &args[1]);
-		glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_SCALE_NV, args[5]);
-		glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_BIAS_NV, args[6]);
-		break;
-	case TSP_OFFSET_2D:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_2D_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, &args[1]);
-		break;
-	case TSP_OFFSET_RECTANGLE_SCALE:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, &args[1]);
-		glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_SCALE_NV, args[5]);
-		glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_BIAS_NV, args[6]);
-		break;
-	case TSP_OFFSET_RECTANGLE:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_RECTANGLE_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, &args[1]);
-		break;
-	case TSP_DEPENDENT_AR:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_AR_TEXTURE_2D_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DEPENDENT_GB:
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_GB_TEXTURE_2D_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_2D_1_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_2D_2_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_2D_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_RECTANGLE_1_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_RECTANGLE_2_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_DEPTH_REPLACE_1_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_DEPTH_REPLACE_2_OF_2:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_DEPTH_REPLACE_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_3D_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_3D_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_3D_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_2D_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_CONST_EYE_NV, &args[1]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		break;
-	case TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3:
-		if (expand)
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
-		else
-			glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_UNSIGNED_IDENTITY_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV);
-		glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + (int)args[0]);
-		glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_CONST_EYE_NV, &args[1]);
-		break;
-	}
-}

+ 0 - 140
CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst.h

@@ -1,140 +0,0 @@
-#ifndef _INST_H
-#define _INST_H
-
-#define TSP_MAX_ARGS 7
-#define TSP_NUM_TEXTURE_UNITS 4
-#include <CmGLPrerequisites.h>
-#ifdef _WIN32
-# define BYTE_ORDER !BIG_ENDIAN
-#endif
-#include <stdlib.h>  
-
-typedef union _InstructionEnum {
-  struct {
-#if BYTE_ORDER != BIG_ENDIAN
-    unsigned int instruction   :10; // instruction id
-    unsigned int stage         : 4; // stage number
-    unsigned int dependent     : 1; // dependent operation
-    unsigned int noOutput      : 1; // no RGBA output
-#else
-    unsigned int noOutput      : 1;
-    unsigned int dependent     : 1;
-    unsigned int stage         : 4;
-    unsigned int instruction   :10;
-#endif
-  } bits;
-  unsigned int word;
-} InstructionEnum;
-
-// WARNING:  Don't monkey with the above structure or this macro
-// unless you're absolutely sure of what you're doing!
-// This constant allocation makes validation *much* cleaner.
-#define TSP_SET_INSTRUCTION_ENUM(inst, st, dep, noout) \
-	 ((noout << 15) | (dep << 14) | (st << 10) | inst)
-
-#define TSP_NOP					TSP_SET_INSTRUCTION_ENUM(0, 0, 0, 1)
-#define TSP_TEXTURE_1D			TSP_SET_INSTRUCTION_ENUM(1, 0, 0, 0)
-#define TSP_TEXTURE_2D			TSP_SET_INSTRUCTION_ENUM(2, 0, 0, 0)
-#define TSP_TEXTURE_RECTANGLE	TSP_SET_INSTRUCTION_ENUM(3, 0, 0, 0)
-#define TSP_TEXTURE_3D			TSP_SET_INSTRUCTION_ENUM(4, 0, 0, 0)
-#define TSP_TEXTURE_CUBE_MAP	TSP_SET_INSTRUCTION_ENUM(5, 0, 0, 0)
-#define TSP_CULL_FRAGMENT		TSP_SET_INSTRUCTION_ENUM(6, 0, 0, 1)
-#define TSP_PASS_THROUGH		TSP_SET_INSTRUCTION_ENUM(7, 0, 0, 0)
-#define TSP_DEPENDENT_AR		TSP_SET_INSTRUCTION_ENUM(8, 0, 1, 0)
-#define TSP_DEPENDENT_GB		TSP_SET_INSTRUCTION_ENUM(9, 0, 1, 0)
-#define TSP_OFFSET_2D			TSP_SET_INSTRUCTION_ENUM(10, 0, 1, 0)
-#define TSP_OFFSET_2D_SCALE		TSP_SET_INSTRUCTION_ENUM(11, 0, 1, 0)
-#define TSP_OFFSET_RECTANGLE			TSP_SET_INSTRUCTION_ENUM(12, 0, 1, 0)
-#define TSP_OFFSET_RECTANGLE_SCALE		TSP_SET_INSTRUCTION_ENUM(13, 0, 1, 0)
-
-#define TSP_DOT_PRODUCT_2D_1_OF_2				TSP_SET_INSTRUCTION_ENUM(14, 0, 1, 1)
-#define TSP_DOT_PRODUCT_2D_2_OF_2				TSP_SET_INSTRUCTION_ENUM(14, 1, 1, 0)
-
-#define TSP_DOT_PRODUCT_RECTANGLE_1_OF_2				TSP_SET_INSTRUCTION_ENUM(15, 0, 1, 1)
-#define TSP_DOT_PRODUCT_RECTANGLE_2_OF_2				TSP_SET_INSTRUCTION_ENUM(15, 1, 1, 0)
-
-#define TSP_DOT_PRODUCT_DEPTH_REPLACE_1_OF_2	TSP_SET_INSTRUCTION_ENUM(16, 0, 1, 1)
-#define TSP_DOT_PRODUCT_DEPTH_REPLACE_2_OF_2	TSP_SET_INSTRUCTION_ENUM(16, 1, 1, 0)
-
-#define TSP_DOT_PRODUCT_3D_1_OF_3		TSP_SET_INSTRUCTION_ENUM(17, 0, 1, 1)
-#define TSP_DOT_PRODUCT_3D_2_OF_3		TSP_SET_INSTRUCTION_ENUM(17, 1, 1, 1)
-#define TSP_DOT_PRODUCT_3D_3_OF_3		TSP_SET_INSTRUCTION_ENUM(17, 2, 1, 0)
-
-#define TSP_DOT_PRODUCT_CUBE_MAP_1_OF_3	TSP_SET_INSTRUCTION_ENUM(18, 0, 1, 1)
-#define TSP_DOT_PRODUCT_CUBE_MAP_2_OF_3	TSP_SET_INSTRUCTION_ENUM(18, 1, 1, 1)
-#define TSP_DOT_PRODUCT_CUBE_MAP_3_OF_3	TSP_SET_INSTRUCTION_ENUM(18, 2, 1, 0)
-
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3	TSP_SET_INSTRUCTION_ENUM(19, 0, 1, 1)
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3	TSP_SET_INSTRUCTION_ENUM(19, 1, 1, 1)
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3	TSP_SET_INSTRUCTION_ENUM(19, 2, 1, 0)
-
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3	TSP_SET_INSTRUCTION_ENUM(20, 0, 1, 1)
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3	TSP_SET_INSTRUCTION_ENUM(20, 1, 1, 1)
-#define TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3	TSP_SET_INSTRUCTION_ENUM(20, 2, 1, 0)
-
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3	TSP_SET_INSTRUCTION_ENUM(21, 0, 1, 1)
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3	TSP_SET_INSTRUCTION_ENUM(21, 1, 1, 0)
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3	TSP_SET_INSTRUCTION_ENUM(21, 2, 1, 0)
-
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3		TSP_SET_INSTRUCTION_ENUM(22, 0, 1, 1)
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3		TSP_SET_INSTRUCTION_ENUM(22, 1, 1, 0)
-#define TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3		TSP_SET_INSTRUCTION_ENUM(22, 2, 1, 0)
-
-typedef struct _MappedVariable {
-	float var;
-	int expand;
-} MappedVariable, *MappedVariablePtr;
-
-typedef class Inst {
-public:
-	Inst(int inst, float arg0 = 0., float arg1 = 0., float arg2 = 0., float arg3 = 0., float arg4 = 0., float arg5 = 0., float arg6 = 0.);
-	Inst(int inst, MappedVariablePtr arg0, float arg1 = 0., float arg2 = 0., float arg3 = 0., float arg4 = 0., float arg5 = 0., float arg6 = 0.);
-	void Invoke();
-	InstructionEnum opcode;
-	float args[TSP_MAX_ARGS];
-private:
-	int expand;
-} Inst, *InstPtr;
-
-#ifdef TEST_BIT_FIELDS
-
-#include <stdio.h>
-
-class InstructionEnumTest {
-  public:
-    InstructionEnumTest()
-    {
-      InstructionEnum inst;
-      bool error = false;
-
-      if (sizeof(inst.bits) != sizeof(inst.word))
-        error = true;
-
-      inst.word = 0; inst.bits.instruction = 0x3FF;
-      if (TSP_SET_INSTRUCTION_ENUM(0x3FF, 0, 0, 0) != inst.word)
-        error = true;
-
-      inst.word = 0; inst.bits.stage = 0x0F;
-      if (TSP_SET_INSTRUCTION_ENUM(0, 0x0F, 0, 0) != inst.word) 
-        error = true;
-
-      inst.word = 0; inst.bits.dependent = true;
-      if (TSP_SET_INSTRUCTION_ENUM(0, 0, 1, 0) != inst.word) 
-        error = true;
-
-      inst.word = 0; inst.bits.noOutput = true;
-      if (TSP_SET_INSTRUCTION_ENUM(0, 0, 0, 1) != inst.word) 
-        error = true;
-
-      if (error) {
-	fprintf(stderr, "ERROR: Bit Fields were not compiled correctly in " __FILE__ "!\n");
-	exit(1);
-      }
-    }
-};
-
-static InstructionEnumTest instructionEnumTest;
-
-#endif /* TEST_BIT_FIELDS */
-
-#endif

+ 0 - 137
CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst_list.cpp

@@ -1,137 +0,0 @@
-#include "ts1.0_inst_list.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-using namespace CamelotEngine;
-
-const int instListInc = 4;
-
-InstList::InstList()
-{
-	size = 0;
-	max = instListInc;
-	list = (InstPtr)malloc(sizeof(Inst) * max);
-}
-
-InstList::~InstList()
-{
-	free(list);
-}
-
-int InstList::Size()
-{
-	return size;
-}
-
-InstList& InstList::operator+=(InstPtr t)
-{
-	if (size == max) {
-		/* Extend list size by instListInc amount */
-		max += instListInc;
-		list = (InstPtr)realloc(list, sizeof(Inst) * max);
-	}
-	list[size++] = *t;
-	return *this;
-}
-
-void InstList::Invoke()
-{
-        int i;
-	for (i = 0; i < size; i++) {
-		// set active texture
-		glActiveTextureARB(GL_TEXTURE0_ARB + i);
-		list[i].Invoke();
-	}
-	// Reset active texture to unit 0
-	// Could do a glGet to figure out what the initial active texunit was,
-	// and reset to that, but the glGet would not behave well within
-	// a display list...
-	glActiveTextureARB(GL_TEXTURE0_ARB);
-}
-
-void InstList::Validate()
-{
-	if (size > TSP_NUM_TEXTURE_UNITS)
-		errors.set("too many instructions");
-	int i;
-	for (i = 0; i < size; i++) {
-		int stage = list[i].opcode.bits.stage;
-		if (stage > i)
-			errors.set("prior stage missing");
-		if (list[i].opcode.bits.instruction != list[i - stage].opcode.bits.instruction)
-			errors.set("stage mismatch");
-		if (list[i].opcode.bits.dependent) {
-			int previousTexture = (int)list[i].args[0];
-			if (previousTexture >= i - stage)
-				errors.set("invalid texture reference");
-			if (list[previousTexture].opcode.bits.noOutput)
-				errors.set("no output on referenced texture");
-		}
-	}
-
-	// Assign remaining undesignated texture units to nop
-	for (; i < TSP_NUM_TEXTURE_UNITS; i++) {
-		InstPtr nopInst = new Inst(TSP_NOP);
-		*this += nopInst;
-		delete nopInst;
-	}
-}
-
-bool is_ts10(const char * s)
-{
-	return ! strncmp(s, "!!TS1.0", 7);
-}
-
-bool ts10_init_more()
-{
-	static bool tsinit = false;
-	if (tsinit == false )
-	{
-      /*
-		if(! glh_init_extensions( "GL_NV_texture_shader " "GL_ARB_multitexture " ))
-		{
-			errors.set("unable to initialize GL_NV_texture_shader\n");
-			return false;
-		}
-		else
-		{
-        */
-			tsinit = true;
-            /*
-		}
-        */
-	}
-	errors.reset();
-	line_number = 1;
-	return true;
-}
-
-/*
-
-      else if(!strncmp(instring, "!!TS1.0", 7))
-    {
-        if (tsinit == 0 )
-        {
-            if(! glh_init_extensions( "GL_NV_texture_shader " "GL_ARB_multitexture " ))
-            {
-                errors.set("unable to initialize GL_NV_texture_shader\n");
-                free(instring);
-                return;
-            }
-            else
-            {
-                tsinit = 1;
-            }
-        }
-        errors.reset();
-        line_number = 1;
-        ts10_init(instring+7);
-        ts10_parse();
-    }
-    
-
-  */

+ 0 - 20
CamelotRenderer/RenderSystemGL/Source/nvparse/ts1.0_inst_list.h

@@ -1,20 +0,0 @@
-#ifndef _InstList_h
-#define _InstList_h
-
-#include "ts1.0_inst.h"
-
-typedef class InstList {
-public:
-	InstList();
-	~InstList();
-	int Size();
-	InstList& operator+=(InstPtr t);
-	void Validate();
-	void Invoke();
-private:
-    InstPtr list;
-    int size;
-    int max;
-} *InstListPtr;
-
-#endif

+ 0 - 354
CamelotRenderer/RenderSystemGL/Source/nvparse/vcp1.0_impl.cpp

@@ -1,354 +0,0 @@
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-#include <string>
-#include <ctype.h>
-
-#ifndef _WIN32
-# define strnicmp strncasecmp
-#endif
-
-using namespace std;
-
-namespace
-{
-	void ParseVertexProgramConstants( GLenum target, char *instring);
-	GLuint LookupTrackMatrix(char *matrixName);
-	GLuint LookupTrackMatrixTransform(char *matrixTransformName);
-}
-
-bool is_vcp10(const char * s)
-{
-	return ! strncmp(s, "!!VCP1.0", 8);
-}
-
-bool vcp10_init(char * s)
-{
-	static int vpinit = 0;
-	
-	if (vpinit == 0 )
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_vertex_program"))
-		{
-			errors.set("unable to initialize GL_NV_vertex_program");
-			return false;
-		}
-		else
-		{
-        */
-			vpinit = 1;
-            /*
-		}
-        */
-	}
-	
-	errors.reset();
-	line_number = 1;
-	
-	myin = s;
-	
-	return true;
-}
-
-int vcp10_parse()
-{
-	// parse the constant declarations, setting their values in the GL.
-	ParseVertexProgramConstants( GL_VERTEX_PROGRAM_NV, myin);
-	return 0;
-}
-
-
-namespace
-{
-	
-	//.----------------------------------------------------------------------------.
-	//|   Function   : ParseVertexProgramConstants                                 |
-	//|   Description: Parse and set VP1.0 constant memory based on const          |
-	//|                directives.                                                 |
-	//|                                                                            |
-	//|   Format     : c[XX] = (x, y, z, w);    # where XXX is an integer 0-95.    | 
-	//|              : c[XX] = TRACK(matrix, transform);   # track a matrix        |
-	//.----------------------------------------------------------------------------.
-	void ParseVertexProgramConstants(GLenum target, char *instring)
-	{
-		// don't overwrite the original string.
-		char *tmpstring = new char[strlen(instring)+1];
-		strcpy(tmpstring, instring);
-		
-		char lineSeparator[] = "\n";
-		//char wordSeparator[] = " \t";
-		char error[256];
-		char dummy[256];
-		char *token;
-		
-		//iterate over the lines in the string
-		token = strtok(tmpstring, lineSeparator);
-		
-		// we assume the first line is the "!!VCP1.0 line".
-		if (token != NULL)
-		{
-			token = strtok(NULL, lineSeparator);
-		}
-		
-		int iLineCount = 1; // skip first line
-		
-		while (token != NULL)
-		{
-			iLineCount++;
-			
-			// if the first non-whitespace character is a #, this is a comment.  Skip.
-			if (!sscanf(token, " #%s", dummy))
-			{ // not a comment.  Is it a constant?
-				
-				// strip whitespace from the beginning of the string
-				int i;
-				for (i = 0; i < (int)strlen(token) && isspace(token[i]); i++);
-				token += i;
-				
-				if (strlen(token) > 0 &&                  // this is not a blank line and
-					!strnicmp(token, "c[", 2)) // the first word is of the form "c[xx]", so its a constant.
-				{
-					int iConstID;
-					int iNumValuesAssigned;
-					char c[6];
-					
-					iNumValuesAssigned = sscanf(token, " %c [ %d ] = %s ", &c[0], &iConstID, dummy);
-					
-					if (3 != iNumValuesAssigned || toupper(c[0]) != 'C')
-					{  // error in constant directive.
-						sprintf(error, "error at line %d \n\"%s\"\n", iLineCount, token);
-						errors.set(error);
-					}
-					else if (!strnicmp(dummy, "track", 5))
-					{ // this is a TrackMatrix directive
-						char matrixName[256], matrixTransformName[256];
-						
-						// the series of %c's are to make sure "track(" doesn't get glommed onto the matrixName
-						iNumValuesAssigned = sscanf(token, 
-							" %c [ %d ] = %c%c%c%c%c ( %s %s ) ;",
-							&c[0], &iConstID, &c[1], &c[2], &c[3], &c[4], &c[5],
-							matrixName, matrixTransformName);
-						
-						if (iNumValuesAssigned < 8)
-						{
-							sprintf(error, "error at line %d \n\"%s\"\n", iLineCount, token);
-							errors.set(error);
-						}
-						else
-						{
-							char *buffer;
-							if (9 == iNumValuesAssigned)
-							{
-								// just need to remove any junk from the matrix names and IDs.
-								buffer = strstr(matrixName, ",");
-								if (buffer) 
-									*buffer = 0;
-								
-								buffer = strstr(matrixTransformName, ")");
-								if (buffer)
-									*buffer = 0;
-							}
-							else // 8 == iNumValuesAssigned
-							{
-								// have to split the two names, since they both were put into the matrixName
-								buffer = strstr(matrixName, ",");
-								if (buffer)
-								{
-									strcpy(matrixTransformName, buffer + 1);
-									*buffer = 0;
-									// get rid of paren at end of transform name, if it is there
-									buffer = strstr(matrixTransformName, ")");
-									if (buffer)
-										*buffer = 0;
-									
-								}
-								else
-								{
-									sprintf(error, "error at line %d \n\"%s\"\n", iLineCount, token);
-									errors.set(error);
-								}
-							}
-							
-							// constant ID must be modulo 4.
-							if (0 != (iConstID % 4))
-							{
-								sprintf(error, 
-									"error at line %d \n\"%s\"\n\tglTrackMatrixNV address must be modulo 4\n",
-									iLineCount, token);
-								errors.set(error);
-							}
-							else if (iConstID < 0 || iConstID > 95)
-							{
-								sprintf(error, 
-									"error at line %d \n\"%s\"\n\tConstant address out of range\n",
-									iLineCount, token);
-								errors.set(error);
-							}
-							else
-							{
-								// get the enum values for the specified matrices
-								GLuint iMatrixID     = LookupTrackMatrix(matrixName);
-								GLuint iTransformID  = LookupTrackMatrixTransform(matrixTransformName);
-								
-								if (0 == iMatrixID)
-								{
-									sprintf(error, 
-										"error at line %d \n\"%s\"\n\tInvalid Matrix parameter in glTrackMatrixNV.\n",
-										iLineCount, token);
-									errors.set(error);
-								}
-								else if (0 == iTransformID)
-								{
-									sprintf(error, 
-										"error at line %d \n\"%s\"\n\tInvalid Transform parameter in glTrackMatrixNV\n",
-										iLineCount, token);
-									errors.set(error);
-								}
-								else
-								{
-									// untrack any currently tracked matrix
-									glTrackMatrixNV(target, iConstID, GL_NONE, GL_IDENTITY_NV);
-									
-									// tell GL the matrix to track
-									glTrackMatrixNV(target, iConstID, iMatrixID, iTransformID);         
-								}
-							}
-						}
-					}
-					else                         // this is a constant directive
-					{  
-						float xyzw[4] = {0, 0, 0, 0};
-						iNumValuesAssigned = sscanf(token, 
-							" %c [ %d ] = ( %f , %f , %f , %f ) ; ", 
-							&c[0], &iConstID, xyzw, xyzw + 1, xyzw + 2, xyzw + 3);
-						
-						if (6 != iNumValuesAssigned)
-						{ // error in constant directive.
-							sprintf(error, "error at line %d \n\"%s\"\n", iLineCount, token);
-							errors.set(error);
-						}
-						else if (iConstID < 0 || iConstID > 95)
-						{
-							sprintf(error, 
-								"error at line %d \n\"%s\"\n\tConstant address out of range\n",
-								iLineCount, token);
-							errors.set(error);
-						}
-						else 
-						{
-							// Always set the closest matrix location to tracking NONE to avoid errors!
-							glTrackMatrixNV(target, iConstID - (iConstID % 4), GL_NONE, GL_IDENTITY_NV);
-							
-							// tell GL the constant values
-							glProgramParameter4fvNV(target, iConstID, xyzw);
-						}
-					}
-        }
-      }
-      
-      // get the next line
-      token = strtok(NULL, lineSeparator);
-  }
-}
-
-
-struct MatrixLookupEntry
-{
-    string name;
-    GLuint      ID; 
-};
-
-
-//.----------------------------------------------------------------------------.
-//|   Function   : LookupTrackMatrix                                           |
-//|   Description: Returns the enumerated matrix name given a valid string     |
-//|                or 0 if an unknown matrix is requested.                    |
-//.----------------------------------------------------------------------------.
-GLuint LookupTrackMatrix(char *matrixName)
-{
-    static bool bFirstTime = true;
-    static int iNumEntries = 14;
-    static MatrixLookupEntry* matrixLookupTable = new MatrixLookupEntry[iNumEntries];
-    
-    if (bFirstTime) // build the lookup table
-    {
-        matrixLookupTable[0].name   = "GL_NONE";
-        matrixLookupTable[0].ID     = GL_NONE;
-        matrixLookupTable[1].name   = "GL_MODELVIEW";
-        matrixLookupTable[1].ID     = GL_MODELVIEW;
-        matrixLookupTable[2].name   = "GL_PROJECTION";
-        matrixLookupTable[2].ID     = GL_PROJECTION;
-        matrixLookupTable[3].name   = "GL_TEXTURE";
-        matrixLookupTable[3].ID     = GL_TEXTURE;
-        matrixLookupTable[4].name   = "GL_COLOR";
-        matrixLookupTable[4].ID     = GL_COLOR;
-        matrixLookupTable[5].name   = "GL_MODELVIEW_PROJECTION_NV";
-        matrixLookupTable[5].ID     = GL_MODELVIEW_PROJECTION_NV;
-        matrixLookupTable[6].name   = "GL_MATRIX0_NV";
-        matrixLookupTable[6].ID     = GL_MATRIX0_NV;
-        matrixLookupTable[7].name   = "GL_MATRIX1_NV";
-        matrixLookupTable[7].ID     = GL_MATRIX1_NV;
-        matrixLookupTable[8].name   = "GL_MATRIX2_NV";
-        matrixLookupTable[8].ID     = GL_MATRIX2_NV;
-        matrixLookupTable[9].name   = "GL_MATRIX3_NV";
-        matrixLookupTable[9].ID     = GL_MATRIX3_NV;
-        matrixLookupTable[10].name  = "GL_MATRIX4_NV";
-        matrixLookupTable[10].ID    = GL_MATRIX4_NV;
-        matrixLookupTable[11].name  = "GL_MATRIX5_NV";
-        matrixLookupTable[11].ID    = GL_MATRIX5_NV;
-        matrixLookupTable[12].name  = "GL_MATRIX6_NV";
-        matrixLookupTable[12].ID    = GL_MATRIX6_NV;
-        matrixLookupTable[13].name  = "GL_MATRIX7_NV";
-        matrixLookupTable[13].ID    = GL_MATRIX7_NV;
-        bFirstTime = false;
-    }
-    
-    for (int i = 0; i < iNumEntries; i++)
-    {
-        if (!strcmp(matrixName, matrixLookupTable[i].name.c_str()))
-        {
-            
-            return matrixLookupTable[i].ID;
-        }
-    }
-    
-    return 0;
-}
-
-//.----------------------------------------------------------------------------.
-//|   Function   : LookupTrackMatrixTransform                                  |
-//|   Description: Returns the enumerated matrix transform name given a valid  |
-//|                string name or 0 if an unknown transform is requested.     |
-//.----------------------------------------------------------------------------.
-GLuint LookupTrackMatrixTransform(char *matrixTransformName)
-{
-    static bool bFirstTime = true;
-    static int iNumEntries = 4;
-    static MatrixLookupEntry* transformLookupTable = new MatrixLookupEntry[iNumEntries];
-    
-    if (bFirstTime)
-    {
-        transformLookupTable[0].name  = "GL_IDENTITY_NV";
-        transformLookupTable[0].ID    = GL_IDENTITY_NV;
-        transformLookupTable[1].name  = "GL_INVERSE_NV";
-        transformLookupTable[1].ID    = GL_INVERSE_NV;
-        transformLookupTable[2].name  = "GL_TRANSPOSE_NV";
-        transformLookupTable[2].ID    = GL_TRANSPOSE_NV;
-        transformLookupTable[3].name  = "GL_INVERSE_TRANSPOSE_NV";
-        transformLookupTable[3].ID    = GL_INVERSE_TRANSPOSE_NV;
-        bFirstTime = false;
-    }
-    
-    for (int i = 0; i < iNumEntries; i++)
-    {
-        if (!strcmp( matrixTransformName, transformLookupTable[i].name.c_str()))
-        {
-            return transformLookupTable[i].ID;
-        }
-    }
-    
-    return 0;
-}
-
-}

+ 0 - 217
CamelotRenderer/RenderSystemGL/Source/nvparse/vp1.0_impl.cpp

@@ -1,217 +0,0 @@
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-#include <string>
-#include <ctype.h>
-
-#if CM_PLATFORM == CM_PLATFORM_APPLE
-#	include <OpenGL/glu.h>
-#else
-#	include <GL/glu.h>
-#endif
-
-using namespace std;
-
-
-namespace
-{
-	void LoadProgram( GLenum target, GLuint id, char *instring );
-	void StrToUpper(char * string);
-	GLint vpid;
-}
-
-
-bool is_vp10(const char * s)
-{
-	return ! strncmp(s, "!!VP1.0", 7);
-}
-
-bool vp10_init(char * s)
-{
-	static bool vpinit = false;
-	if (vpinit == false )
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_vertex_program"))
-		{
-			errors.set("unable to initialize GL_NV_vertex_program");
-			return false;
-		}
-		else
-		{
-        */
-			vpinit = true;
-            /*
-		}
-        */
-	}
-	
-	errors.reset();
-	line_number = 1;
-	myin = s;
-
-    glGetIntegerv( GL_VERTEX_PROGRAM_BINDING_NV, &vpid );
-        
-    if ( vpid == 0 )
-    {
-        char str[128];
-        sprintf( str, "No vertex program id bound for nvparse() invocation.  Bound id = %d\n", (int)vpid );
-        errors.set( str );
-		return false;
-    }
-	
-	return true;	
-}
-
-int vp10_parse()
-{
-    LoadProgram( GL_VERTEX_PROGRAM_NV, vpid, myin );
-	return 0;
-}
-
-namespace
-{
-	//.----------------------------------------------------------------------------.
-	//|   Function   : LoadProgram                                                 |
-	//|   Description: Load a program into GL, and report any errors encountered.  |
-	//.----------------------------------------------------------------------------.
-	void LoadProgram( GLenum target, GLuint id, char *instring )
-	{
-		GLint  errPos;
-		GLenum errCode;
-		const GLubyte *errString;
-		
-		int len = strlen(instring);
-		glLoadProgramNV( target, id, len, (const GLubyte *) instring );
-		if ( (errCode = glGetError()) != GL_NO_ERROR )
-		{
-			errString = gluErrorString( errCode );
-			
-			glGetIntegerv( GL_PROGRAM_ERROR_POSITION_NV, &errPos );
-            if (errPos == -1)
-                return;
-			
-			int nlines = 1;
-			int nchar  = 1;
-			int i;
-			for ( i = 0; i < errPos; i++ )
-			{
-				if ( instring[i] == '\n' )
-				{
-					nlines++;
-					nchar = 1;
-				}
-				else
-				{
-					nchar++;
-				}
-			}
-			int start = 0;
-			int end = 0;
-			int flag = ((instring[errPos]==';') | (instring[errPos-1]==';')) ? 1 : 0;
-			for ( i = errPos; i >= 0; i-- )
-			{
-				start = i;
-				if ( flag && (start >= errPos-1)  )
-					continue;
-				if ( instring[i] == ';' )
-				{
-					if ( !flag )
-					{
-						start = i+1;
-						if ( instring[start] == '\n' )
-							start++;
-					}
-					break;
-				}
-			}
-			for ( i = errPos; i < len; i++ )
-			{
-				end = i;
-				if ( instring[i] == ';' && end > start)
-				{
-					break;
-				}
-			}
-			if ( errPos - start > 30 )
-			{
-				start = errPos - 30;
-			}
-			if ( end - errPos > 30 )
-			{
-				end = errPos + 30;
-			}
-			
-			char substring[96];
-			memset( substring, 0, 96 );
-			strncpy( substring, &(instring[start]), end-start+1 );
-			char str[256];
-			//sprintf( str, "error at line %d character %d\n    \"%s\"\n", nlines, nchar, substring );
-			sprintf( str, "error at line %d character %d\n\"%s\"\n", nlines, nchar, substring );
-			int width = errPos-start;
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "|\n" );
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "^\n" );
-			
-			errors.set( str );
-		}
-	}
-	
-	
-	//.----------------------------------------------------------------------------.
-	//|   Function   : StrToUpper                                                  |
-	//|   Description: Converts all lowercase chars in a string to uppercase.      |
-	//.----------------------------------------------------------------------------.
-	void StrToUpper(char *string)
-	{
-		for (unsigned int i = 0; i < strlen(string); i++)
-			string[i] = toupper(string[i]);
-	}
-	
-}
-/*    else if(!strncmp(instring, "!!VP1.0", 7))
-    {
-        if (vpinit == 0 )
-        {
-            if(! glh_init_extensions("GL_NV_vertex_program"))
-            {
-                errors.set("unable to initialize GL_NV_vertex_program");
-                free(instring);
-                return;
-            }
-            else
-            {
-                vpinit = 1;
-            }
-        }
-        
-        errors.reset();
-        line_number = 1;
-        
-        int vpid;
-        glGetIntegerv( GL_VERTEX_PROGRAM_BINDING_NV, &vpid );
-        
-        if ( glGetError() != GL_NO_ERROR )
-        {
-            errors.set( "Previous GL_ERROR prior to vertex program parsing.\n" );
-        }
-        
-        if ( vpid == 0 )
-        {
-            char str[128];
-            sprintf( str, "No vertex program id bound for nvparse() invocation.  Bound id = %d\n", vpid );
-            errors.set( str );
-        }
-        else
-        {
-            LoadProgram( GL_VERTEX_PROGRAM_NV, vpid, instring );
-        }
-    }
-  */

+ 0 - 1476
CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst.cpp

@@ -1,1476 +0,0 @@
-#ifdef WIN32
-#pragma warning(disable:4786)
-#endif
-#include "vs1.0_inst.h"
-#include <stdio.h>
-#include <string>
-#include <map>
-#include <string.h>
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-
-std::string vs10_transstring;
-
-#if 0
-VS10Reg::VS10Reg()
-{
-    type = 0;
-    index = 0;
-	sign = 0;
-    mask = 0;
-}
-
-VS10Reg::VS10Reg(const VS10Reg &r)
-{
-    type = r.type;
-    index = r.index;
-	sign = r.sign;
-    mask = r.mask;
-}
-
-VS10Reg& VS10Reg::operator=(const VS10Reg &r)
-{
-    if ( this != &r )
-    {
-        type = r.type;
-        index = r.index;
-		sign = r.sign;
-        mask = r.mask;
-    }
-    return *this;
-}
-#endif
-
-void VS10Reg::Init()
-{
-    type = 0;
-    index = -1;
-    sign = 0;
-    mask[0] = 'j';
-    mask[1] = 'j';
-    mask[2] = 'j';
-    mask[3] = 'j';
-}
-
-int VS10Reg::ValidateIndex()
-{
-    switch( type )
-    {
-    case TYPE_TEMPORARY_REG:
-        if ( index < 0 || index > 11 ) return 0;
-        else return 1;
-        break;
-    case TYPE_VERTEX_ATTRIB_REG:
-        if ( index < 0 || index > 15 ) return 0;
-        else return 1;
-        break;
-    case TYPE_ADDRESS_REG:        
-        if ( index != 0 ) return 0;
-        else return 1;
-        break;
-    case TYPE_CONSTANT_MEM_REG:
-        if ( index < 0 || index > 95 ) return 0;
-        else return 1;
-        break;
-    case TYPE_CONSTANT_A0_REG:
-    case TYPE_CONSTANT_A0_OFFSET_REG:
-        return 1;
-        break;
-    case TYPE_POSITION_RESULT_REG:
-        return 1;
-        break;
-    case TYPE_COLOR_RESULT_REG:
-        if ( index < 0 || index > 1 ) return 0;
-        else return 1;
-        break;
-    case TYPE_TEXTURE_RESULT_REG:
-        if ( index < 0 || index > 3 ) return 0;
-        else return 1;
-        break;
-    case TYPE_FOG_RESULT_REG:
-        return 1;
-        break;
-    case TYPE_POINTS_RESULT_REG:
-        return 1;
-        break;
-    default:
-        errors.set( "VS10Reg::ValidateIndex() Internal Error: unknown register type\n" );
-        return 1;
-    }
-	return 1;
-}
-
-void VS10Reg::Translate()
-{
-    char str[16];
-
-    if ( sign == -1 )
-        vs10_transstring.append( "-" );
-    
-    switch ( type )
-    {
-    case TYPE_TEMPORARY_REG:
-        sprintf( str, "R%d", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_VERTEX_ATTRIB_REG:
-        sprintf( str, "v[%d]", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_ADDRESS_REG:        
-        sprintf( str, "A%d", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_CONSTANT_MEM_REG:
-        sprintf( str, "c[%d]", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_CONSTANT_A0_REG:
-        vs10_transstring.append( "c[ A0.x ]" );
-        break;
-    case TYPE_CONSTANT_A0_OFFSET_REG:
-        sprintf( str, "c[ A0.x + %d ]", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_POSITION_RESULT_REG:
-        vs10_transstring.append( "o[HPOS]" );
-        break;
-    case TYPE_COLOR_RESULT_REG:
-        sprintf( str, "o[COL%d]", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_TEXTURE_RESULT_REG:
-        sprintf( str, "o[TEX%d]", index );
-        vs10_transstring.append( str );
-        break;
-    case TYPE_FOG_RESULT_REG:
-        vs10_transstring.append( "o[FOGC]" );
-        break;
-    case TYPE_POINTS_RESULT_REG:
-        vs10_transstring.append( "o[PSIZ]" );
-        break;
-    default:
-        errors.set( "VS10Reg::Translate() Internal Error: unknown register type\n" );
-    }
-
-    if ( mask[0] != 0 )
-    {
-        str[0] = '.';
-        strncpy( str+1, mask, 4 );
-        str[5] = 0;
-        vs10_transstring.append( str );
-    }
-}
-
-VS10Inst::~VS10Inst()
-{
-    if (comment != NULL ) delete [] comment;
-}
-
-VS10Inst::VS10Inst()
-{
-    line = -1;
-    instid = -1;
-    dst.Init();
-    src[0].Init();
-    src[1].Init();
-    src[2].Init();
-    comment = NULL;
-}
-
-VS10Inst::VS10Inst( int currline )
-{
-    line = currline;
-    instid = -1;
-    dst.Init();
-    src[0].Init();
-    src[1].Init();
-    src[2].Init();
-    comment = NULL;
-}
-
-VS10Inst::VS10Inst( const VS10Inst &inst )
-{
-    line = inst.line;
-    instid = inst.instid;
-    dst = inst.dst;
-    src[0] = inst.src[0];
-    src[1] = inst.src[1];
-    src[2] = inst.src[2];
-    if ( inst.comment == NULL )
-        comment = NULL;
-    else
-    {
-        comment = new char[strlen(inst.comment)+1];
-        strcpy( comment, inst.comment );
-    }
-}
-
-VS10Inst& VS10Inst::operator=(const VS10Inst &inst)
-{
-    if ( this != &inst )
-    {
-        line = inst.line;
-        instid = inst.instid;
-        dst = inst.dst;
-        src[0] = inst.src[0];
-        src[1] = inst.src[1];
-        src[2] = inst.src[2];
-        if ( inst.comment == NULL )
-            comment = NULL;
-        else
-        {
-            comment = new char[strlen(inst.comment)+1];
-            strcpy( comment, inst.comment );
-        }
-    }
-    return *this;
-}
-
-
-VS10Inst::VS10Inst(int currline, int inst)
-{
-    line = currline;
-    instid = inst;
-    dst.Init();
-    src[0].Init();
-    src[1].Init();
-    src[2].Init();
-    comment = NULL;
-}
-
-VS10Inst::VS10Inst(int currline, int inst, char *cmt)
-{
-    line = currline;
-    instid = inst;
-    dst.Init();
-    src[0].Init();
-    src[1].Init();
-    src[2].Init();
-    comment = cmt;
-}
-
-VS10Inst::VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0)
-{
-    line = currline;
-	instid = inst;
-	dst = dreg;
-    src[0] = src0;
-    src[1].Init();
-    src[2].Init();
-    comment = NULL;
-}
-
-VS10Inst::VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0, VS10Reg src1)
-{
-    line = currline;
-	instid = inst;
-	dst = dreg;
-    src[0] = src0;
-    src[1] = src1;
-    src[2].Init();
-    comment = NULL;
-}
-
-VS10Inst::VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0, VS10Reg src1, VS10Reg src2)
-{
-    line = currline;
-	instid = inst;
-	dst = dreg;
-    src[0] = src0;
-    src[1] = src1;
-    src[2] = src2;
-    comment = NULL;
-}
-
-void VS10Inst::Validate( int &vsflag )
-{
-
-    // Handle comments, noops, and newlines.
-    if ( instid == VS10_COMMENT || instid == VS10_NOP || instid == -1 ) return;
-
-    // Handle the header case.
-    if ( instid == VS10_HEADER )
-    {
-        if ( vsflag == 0 )
-        {
-            vsflag = 1;
-            return;
-        }
-        else
-        {
-            char temp[128];
-            sprintf( temp, "(%d) Error: vs.1.0 token already encountered\n", line );
-            errors.set( temp );
-            return;
-        }
-    }
-
-    // Validate register indices are valid.
-    ValidateRegIndices();
-
-    // Verify destination masking is valid.
-    ValidateDestMask();
-
-    // Verify source swizzling is valid.
-    ValidateSrcMasks();
-
-    // Verify destination register is writable.
-    ValidateDestWritable();
-
-    // Verify source registers are readable.
-    ValidateSrcReadable();
-
-    // Verify not reading from multiple vertex attributes or constants
-    ValidateReadPorts();
-}
-
-void VS10Inst::ValidateRegIndices()
-{
-    char temp[256];
-    int result;
-
-    // Destination register.
-    result = dst.ValidateIndex();
-    if ( !result )
-    {
-        sprintf( temp, "(%d) Error: destination register index out of range\n", line );
-        errors.set( temp );
-    }
-
-    // Source register.
-    result = src[0].ValidateIndex();
-    if ( !result )
-    {
-        sprintf( temp, "(%d) Error: source register index out of range\n", line );
-        errors.set( temp );
-    }
-
-    switch( instid )
-    {
-        // Vector operations.
-        case VS10_MOV: 
-        case VS10_LIT:
-            break;
-
-        // Unary operations.
-        case VS10_FRC: 
-            break;
-
-        // Scalar operations.
-        case VS10_EXP: 
-        case VS10_EXPP:
-        case VS10_LOG: 
-        case VS10_LOGP:
-        case VS10_RCP: 
-        case VS10_RSQ:
-            break;
-        
-        // Binary operations.
-        case VS10_ADD:
-        case VS10_DP3:
-        case VS10_DP4: 
-        case VS10_DST: 
-        case VS10_SGE: 
-        case VS10_SLT: 
-        case VS10_SUB:
-        case VS10_MAX: 
-        case VS10_MIN: 
-        case VS10_MUL: 
-            result = src[1].ValidateIndex();
-            if ( !result )
-            {
-                sprintf( temp, "(%d) Error: second source register index out of range\n", line );
-                errors.set( temp );
-            }
-            break;
-
-        case VS10_M3X2:
-        case VS10_M3X3:
-        case VS10_M3X4:
-        case VS10_M4X3:
-        case VS10_M4X4:
-            {
-                result = src[1].ValidateIndex();
-                if ( !result )
-                {
-                    sprintf( temp, "(%d) Error: second source register index out of range\n", line );
-                    errors.set( temp );
-                }
-                int orig;
-                orig = src[1].index;
-                switch( instid )
-                {
-                    case VS10_M3X2:
-                        src[1].index = src[1].index + 1;
-                        break;
-                    case VS10_M3X3:
-                    case VS10_M4X3:
-                        src[1].index = src[1].index + 2;
-                        break;
-                    case VS10_M3X4:
-                    case VS10_M4X4:
-                        src[1].index = src[1].index + 3;
-                        break;
-                }
-                result = src[1].ValidateIndex();
-                src[1].index = orig;
-                if ( !result )
-                {
-                    sprintf( temp, "(%d) Error: macro expansion produces source register index out of range\n", line );
-                    errors.set( temp );
-                }
-            }
-            break;
-
-        // Trinary operations.
-        case VS10_MAD:
-            result = src[1].ValidateIndex();
-            if ( !result )
-            {
-                sprintf( temp, "(%d) Error: second source register index out of range\n", line );
-                errors.set( temp );
-            }
-            result = src[2].ValidateIndex();
-            if ( !result )
-            {
-                sprintf( temp, "(%d) Error: third source register index out of range\n", line );
-                errors.set( temp );
-            }
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateRegIndices() Internal Error: unknown instruction type\n" );
-            break;
-    }
-}
-
-void VS10Inst::ValidateDestMask()
-{
-    char temp[256];
-    typedef std::map<char, int> MyMap;
-    typedef MyMap::value_type MyPair;
-    static const MyPair pairs[] = 
-    {
-        MyPair('x',1),
-        MyPair('y',2),
-        MyPair('z',3),
-        MyPair('w',4),
-    };
-    static const MyMap swizzleMap(pairs, pairs+(sizeof(pairs)/sizeof(pairs[0])));
-
-    if ( dst.mask[0] == 0 ) return;
-    int i = 1;
-    while ( i < 4 && dst.mask[i] != 0 )
-    {
-        MyMap::const_iterator lastMaskIt = swizzleMap.find(dst.mask[i-1]);
-        MyMap::const_iterator curMaskIt = swizzleMap.find(dst.mask[i]);
-        if (lastMaskIt == swizzleMap.end() || curMaskIt == swizzleMap.end() ||
-            lastMaskIt->second >= curMaskIt->second)
-//        if ( dst.mask[i-1] >= dst.mask[i] )
-        {
-            char mask[5];
-            strncpy( mask, dst.mask, 4 );
-            mask[4] = 0;
-            sprintf( temp, "(%d) Error: destination register has invalid mask: %s\n", line, mask );
-            errors.set( temp );
-            break;
-        }
-        i++;
-    }
-}
-
-void VS10Inst::ValidateSrcMasks()
-{
-    char temp[256];
-    char mask[5];
-    int len;
-    int i;
-
-    switch( instid )
-    {
-        // Vector operations.
-        case VS10_MOV: 
-        case VS10_LIT:
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[0].mask[i] = src[0].mask[len-1];
-            }
-            break;
-
-        // Unary operations.
-        case VS10_FRC: 
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[0].mask[i] = src[0].mask[len-1];
-            }
-            break;
-
-        // Scalar operations.
-        case VS10_EXP: 
-        case VS10_EXPP:
-        case VS10_LOG: 
-        case VS10_LOGP:
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if( len != 1 )
-            {
-                sprintf( temp, "(%d) Error: source register has invalid mask: %s\n", line, mask );
-                errors.set( temp );
-            }
-            break;
-
-        case VS10_RCP: 
-        case VS10_RSQ:
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if( len != 0 && len != 1 )
-            {
-                sprintf( temp, "(%d) Error: source register has invalid mask: %s\n", line, mask );
-                errors.set( temp );
-            }
-            if ( len == 0 )
-            {
-                strcpy( src[0].mask, "w" );
-            }
-            break;
-        
-        // Binary operations.
-        case VS10_ADD:
-        case VS10_DP3:
-        case VS10_DP4: 
-        case VS10_DST: 
-        case VS10_SGE: 
-        case VS10_SLT: 
-        case VS10_SUB:
-        case VS10_M3X2:
-        case VS10_M3X3:
-        case VS10_M3X4:
-        case VS10_M4X3:
-        case VS10_M4X4:
-        case VS10_MAX: 
-        case VS10_MIN: 
-        case VS10_MUL: 
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 0 && len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[0].mask[i] = src[0].mask[len-1];
-            }
-            strncpy( mask, src[1].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 0 && len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[1].mask[i] = src[1].mask[len-1];
-            }
-            break;
-
-        // Trinary operations.
-        case VS10_MAD:
-            strncpy( mask, src[0].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 0 && len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[0].mask[i] = src[0].mask[len-1];
-            }
-            strncpy( mask, src[1].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 0 && len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[1].mask[i] = src[1].mask[len-1];
-            }
-            strncpy( mask, src[2].mask, 4 );
-            mask[4] = 0;
-            len = strlen( mask );
-            if ( len != 0 && len != 1 )
-            {
-                for ( i = len; i < 4; i++ )
-                    src[2].mask[i] = src[2].mask[len-1];
-            }
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateSrcMasks() Internal Error: unknown instruction type\n" );
-            break;
-    }
-}
-
-void VS10Inst::ValidateDestWritable()
-{
-    char temp[256];
-
-    switch ( dst.type )
-    {
-        case TYPE_TEMPORARY_REG:
-        case TYPE_POSITION_RESULT_REG:
-        case TYPE_COLOR_RESULT_REG:
-        case TYPE_TEXTURE_RESULT_REG:
-        case TYPE_FOG_RESULT_REG:
-        case TYPE_POINTS_RESULT_REG:
-            break;
-        case TYPE_VERTEX_ATTRIB_REG:
-        case TYPE_CONSTANT_MEM_REG:
-        case TYPE_CONSTANT_A0_REG:
-        case TYPE_CONSTANT_A0_OFFSET_REG:
-            sprintf( temp, "(%d) Error: destination register is not writable\n", line );
-            errors.set( temp );
-            break;
-        case TYPE_ADDRESS_REG:
-            if ( instid != VS10_MOV )
-            {
-                sprintf( temp, "(%d) Error: destination register is not writable using this instruction\n", line );
-                errors.set( temp );
-            }
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateDestWritable() Internal Error: unknown register type\n" );
-    }
-
-    if ( instid == VS10_FRC && dst.type != TYPE_TEMPORARY_REG )
-    {
-        sprintf( temp, "(%d) Error: destination register must be a temporary register\n", line );
-        errors.set( temp );
-    }
-}
-
-void VS10Inst::ValidateSrcReadable()
-{
-    char temp[256];
-
-    // Source register.
-    switch( src[0].type )
-    {
-        case TYPE_TEMPORARY_REG:
-        case TYPE_VERTEX_ATTRIB_REG:
-        case TYPE_CONSTANT_MEM_REG:
-        case TYPE_CONSTANT_A0_REG:
-        case TYPE_CONSTANT_A0_OFFSET_REG:
-            break;
-        case TYPE_ADDRESS_REG:
-        case TYPE_POSITION_RESULT_REG:
-        case TYPE_COLOR_RESULT_REG:
-        case TYPE_TEXTURE_RESULT_REG:
-        case TYPE_FOG_RESULT_REG:
-        case TYPE_POINTS_RESULT_REG:
-            sprintf( temp, "(%d) Error: source register is not readable\n", line );
-            errors.set( temp );
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-    }
-    
-    switch( instid )
-    {
-        // Vector operations.
-        case VS10_MOV: 
-        case VS10_LIT:
-            break;
-
-        // Unary operations.
-        case VS10_FRC: 
-            break;
-
-        // Scalar operations.
-        case VS10_EXP: 
-        case VS10_EXPP:
-        case VS10_LOG: 
-        case VS10_LOGP:
-        case VS10_RCP: 
-        case VS10_RSQ:
-            break;
-        
-        // Binary operations.
-        case VS10_ADD:
-        case VS10_DP3:
-        case VS10_DP4: 
-        case VS10_DST: 
-        case VS10_SGE: 
-        case VS10_SLT: 
-        case VS10_SUB:
-        case VS10_M3X2:
-        case VS10_M3X3:
-        case VS10_M3X4:
-        case VS10_M4X3:
-        case VS10_M4X4:
-        case VS10_MAX: 
-        case VS10_MIN: 
-        case VS10_MUL: 
-            switch( src[1].type )
-            {
-                case TYPE_TEMPORARY_REG:
-                case TYPE_VERTEX_ATTRIB_REG:
-                case TYPE_CONSTANT_MEM_REG:
-                case TYPE_CONSTANT_A0_REG:
-                case TYPE_CONSTANT_A0_OFFSET_REG:
-                    break;
-                case TYPE_ADDRESS_REG:
-                case TYPE_POSITION_RESULT_REG:
-                case TYPE_COLOR_RESULT_REG:
-                case TYPE_TEXTURE_RESULT_REG:
-                case TYPE_FOG_RESULT_REG:
-                case TYPE_POINTS_RESULT_REG:
-                    sprintf( temp, "(%d) Error: second source register is not readable\n", line );
-                    errors.set( temp );
-                    break;
-                default:
-                    errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-            }
-            break;
-
-        // Trinary operations.
-        case VS10_MAD:
-            switch( src[1].type )
-            {
-                case TYPE_TEMPORARY_REG:
-                case TYPE_VERTEX_ATTRIB_REG:
-                case TYPE_CONSTANT_MEM_REG:
-                case TYPE_CONSTANT_A0_REG:
-                case TYPE_CONSTANT_A0_OFFSET_REG:
-                    break;
-                case TYPE_ADDRESS_REG:
-                case TYPE_POSITION_RESULT_REG:
-                case TYPE_COLOR_RESULT_REG:
-                case TYPE_TEXTURE_RESULT_REG:
-                case TYPE_FOG_RESULT_REG:
-                case TYPE_POINTS_RESULT_REG:
-                    sprintf( temp, "(%d) Error: second source register is not readable\n", line );
-                    errors.set( temp );
-                    break;
-                default:
-                    errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-            }
-            switch( src[2].type )
-            {
-                case TYPE_TEMPORARY_REG:
-                case TYPE_VERTEX_ATTRIB_REG:
-                case TYPE_CONSTANT_MEM_REG:
-                case TYPE_CONSTANT_A0_REG:
-                case TYPE_CONSTANT_A0_OFFSET_REG:
-                    break;
-                case TYPE_ADDRESS_REG:
-                case TYPE_POSITION_RESULT_REG:
-                case TYPE_COLOR_RESULT_REG:
-                case TYPE_TEXTURE_RESULT_REG:
-                case TYPE_FOG_RESULT_REG:
-                case TYPE_POINTS_RESULT_REG:
-                    sprintf( temp, "(%d) Error: third source register is not readable\n", line );
-                    errors.set( temp );
-                    break;
-                default:
-                    errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-            }
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-            break;
-    }
-}
-
-void VS10Inst::ValidateReadPorts()
-{
-    int constidx[3];
-    int attribidx[3];
-    int i;
-    int acount;
-    int ccount;
-    char temp[256];
-
-    switch( instid )
-    {
-        // Vector operations.
-        case VS10_MOV: 
-        case VS10_LIT:
-            break;
-
-        // Unary operations.
-        case VS10_FRC: 
-            break;
-
-        // Scalar operations.
-        case VS10_EXP: 
-        case VS10_EXPP:
-        case VS10_LOG: 
-        case VS10_LOGP:
-        case VS10_RCP: 
-        case VS10_RSQ:
-            break;
-        
-        // Binary operations.
-        case VS10_ADD:
-        case VS10_DP3:
-        case VS10_DP4: 
-        case VS10_DST: 
-        case VS10_SGE: 
-        case VS10_SLT: 
-        case VS10_SUB:
-        case VS10_M3X2:
-        case VS10_M3X3:
-        case VS10_M3X4:
-        case VS10_M4X3:
-        case VS10_M4X4:
-        case VS10_MAX: 
-        case VS10_MIN: 
-        case VS10_MUL: 
-            acount = 0;
-            ccount = 0;
-            for ( i = 0; i < 2; i++ )
-            {
-                switch( src[i].type )
-                {
-                    case TYPE_VERTEX_ATTRIB_REG:
-                        attribidx[acount] = src[i].index;
-                        acount++;
-                        break;
-                    case TYPE_CONSTANT_MEM_REG:
-                        constidx[ccount] = src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_CONSTANT_A0_REG:
-                        constidx[ccount] = 100 + src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_CONSTANT_A0_OFFSET_REG:
-                        constidx[ccount] = 200 + src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_TEMPORARY_REG:
-                    case TYPE_ADDRESS_REG:
-                    case TYPE_POSITION_RESULT_REG:
-                    case TYPE_COLOR_RESULT_REG:
-                    case TYPE_TEXTURE_RESULT_REG:
-                    case TYPE_FOG_RESULT_REG:
-                    case TYPE_POINTS_RESULT_REG:
-                        break;
-                    default:
-                        errors.set( "VS10Inst::ValidateReadPorts() Internal Error: unknown register type\n" );
-                }
-            }
-            if ( acount == 2 )
-            {
-                if ( attribidx[0] != attribidx[1] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique attribute registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            else if ( ccount == 2 )
-            {
-                if ( constidx[0] != constidx[1] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique constant registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            break;
-
-        // Trinary operations.
-        case VS10_MAD:
-            acount = 0;
-            ccount = 0;
-            for ( i = 0; i < 3; i++ )
-            {
-                switch( src[i].type )
-                {
-                    case TYPE_VERTEX_ATTRIB_REG:
-                        attribidx[acount] = src[i].index;
-                        acount++;
-                        break;
-                    case TYPE_CONSTANT_MEM_REG:
-                        constidx[ccount] = src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_CONSTANT_A0_REG:
-                        constidx[ccount] = 100 + src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_CONSTANT_A0_OFFSET_REG:
-                        constidx[ccount] = 200 + src[i].index;
-                        ccount++;
-                        break;
-                    case TYPE_TEMPORARY_REG:
-                    case TYPE_ADDRESS_REG:
-                    case TYPE_POSITION_RESULT_REG:
-                    case TYPE_COLOR_RESULT_REG:
-                    case TYPE_TEXTURE_RESULT_REG:
-                    case TYPE_FOG_RESULT_REG:
-                    case TYPE_POINTS_RESULT_REG:
-                        break;
-                    default:
-                        errors.set( "VS10Inst::ValidateReadPorts() Internal Error: unknown register type\n" );
-                }
-            }
-            if ( acount == 3 )
-            {
-                if ( attribidx[0] != attribidx[1] || attribidx[1] != attribidx[2] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique attribute registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            else if ( acount == 2 )
-            {
-                if ( attribidx[0] != attribidx[1] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique attribute registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            else if ( ccount == 3 )
-            {
-                if ( constidx[0] != constidx[1] || constidx[1] != constidx[2] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique constant registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            else if ( ccount == 2 )
-            {
-                if ( constidx[0] != constidx[1] )
-                {
-                    sprintf( temp, "(%d) Error: multiple unique constant registers accessed in this instruction\n", line );
-                    errors.set( temp );
-                }
-            }
-            break;
-        default:
-            errors.set( "VS10Inst::ValidateSrcReadable() Internal Error: unknown register type\n" );
-            break;
-    }
-}
-
-int VS10Inst::Translate()
-{
-    int flag;
-    int ninstr = 0;
-
-#if DEBUGGING_PURPOSES
-    char mystr[16];
-    if ( instid == VS10_HEADER )
-    {
-        sprintf( mystr, "%d:\tvs.1.0 (skip)\n", line );
-        vs10_transstring.append( mystr );
-        return 0;
-    }
-    sprintf( mystr, "%d:\t", line );
-    vs10_transstring.append( mystr );
-#endif
-
-    switch( instid )
-    {
-    case VS10_ADD:
-        vs10_transstring.append( "ADD    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_DP3:
-        vs10_transstring.append( "DP3    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_DP4: 
-        vs10_transstring.append( "DP4    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_DST: 
-        vs10_transstring.append( "DST    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_EXP: 
-        vs10_transstring.append( "EXP    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_EXPP:
-        vs10_transstring.append( "EXP    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_FRC:
-        char temp[128];
-        sprintf( temp, "(%d) Error: FRC built-in macro not yet supported.\n", line );
-        errors.set( temp );
-        ninstr = 0;
-        break;
-    case VS10_LIT: 
-        vs10_transstring.append( "LIT    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_LOG: 
-        vs10_transstring.append( "LOG    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_LOGP:
-        vs10_transstring.append( "LOG    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_M3X2:
-    case VS10_M3X3:
-    case VS10_M3X4:
-        if ( dst.mask[0] != 0 )
-        {
-            ninstr = 0;
-            int i = 0;
-            while ( i < 4 && dst.mask[i] != 0 )
-            {
-                if ( dst.mask[i] == 'x' )
-                {
-                    char oldval;
-                    vs10_transstring.append( "DP3    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".x, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    src[1].Translate();
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'y' )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP3    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".y, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 1;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'z' && (instid == VS10_M3X3 || instid == VS10_M3X4) )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP3    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".z, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 2;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'w' && instid == VS10_M3X4 )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP3    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".w, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 3;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                i++;
-            }
-            return ninstr;
-        }
-        else
-        {
-            ninstr = 0;
-
-            char oldval;
-            int  oldindex;
-
-            vs10_transstring.append( "DP3    " );
-            oldval = dst.mask[0];
-            dst.mask[0] = 0;
-            dst.Translate();
-            dst.mask[0] = oldval;
-            vs10_transstring.append( ".x, " );
-            src[0].Translate();
-            vs10_transstring.append( ", " );
-            src[1].Translate();
-            vs10_transstring.append( ";\n" );
-            ninstr++;
-
-            vs10_transstring.append( "DP3    " );
-            oldval = dst.mask[0];
-            dst.mask[0] = 0;
-            dst.Translate();
-            dst.mask[0] = oldval;
-            vs10_transstring.append( ".y, " );
-            src[0].Translate();
-            vs10_transstring.append( ", " );
-            oldindex = src[1].index;
-            src[1].index = src[1].index + 1;
-            src[1].Translate();
-            src[1].index = oldindex;
-            vs10_transstring.append( ";\n" );
-            ninstr++;
-
-            if ( instid == VS10_M3X3 || instid == VS10_M3X4 )
-            {
-                vs10_transstring.append( "DP3    " );
-                oldval = dst.mask[0];
-                dst.mask[0] = 0;
-                dst.Translate();
-                dst.mask[0] = oldval;
-                vs10_transstring.append( ".z, " );
-                src[0].Translate();
-                vs10_transstring.append( ", " );
-                oldindex = src[1].index;
-                src[1].index = src[1].index + 2;
-                src[1].Translate();
-                src[1].index = oldindex;
-                vs10_transstring.append( ";\n" );
-                ninstr++;
-            }
-
-            if ( instid == VS10_M3X4 )
-            {
-                vs10_transstring.append( "DP3    " );
-                oldval = dst.mask[0];
-                dst.mask[0] = 0;
-                dst.Translate();
-                dst.mask[0] = oldval;
-                vs10_transstring.append( ".w, " );
-                src[0].Translate();
-                vs10_transstring.append( ", " );
-                oldindex = src[1].index;
-                src[1].index = src[1].index + 3;
-                src[1].Translate();
-                src[1].index = oldindex;
-                vs10_transstring.append( ";\n" );
-                ninstr++;
-            }
-            return ninstr;
-        }
-        break;
-    case VS10_M4X3:
-    case VS10_M4X4:
-        if ( dst.mask[0] != 0 )
-        {
-            ninstr = 0;
-            int i = 0;
-            while ( i < 4 && dst.mask[i] != 0 )
-            {
-                if ( dst.mask[i] == 'x' )
-                {
-                    char oldval;
-                    vs10_transstring.append( "DP4    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".x, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    src[1].Translate();
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'y' )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP4    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".y, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 1;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'z' )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP4    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".z, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 2;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                if ( dst.mask[i] == 'w' && instid == VS10_M4X4 )
-                {
-                    char oldval;
-                    int  oldindex;
-                    vs10_transstring.append( "DP4    " );
-                    oldval = dst.mask[0];
-                    dst.mask[0] = 0;
-                    dst.Translate();
-                    dst.mask[0] = oldval;
-                    vs10_transstring.append( ".w, " );
-                    src[0].Translate();
-                    vs10_transstring.append( ", " );
-                    oldindex = src[1].index;
-                    src[1].index = src[1].index + 3;
-                    src[1].Translate();
-                    src[1].index = oldindex;
-                    vs10_transstring.append( ";\n" );
-                    ninstr++;
-                }
-                i++;
-            }
-            return ninstr;
-        }
-        else
-        {
-            ninstr = 0;
-
-            char oldval;
-            int  oldindex;
-
-            vs10_transstring.append( "DP4    " );
-            oldval = dst.mask[0];
-            dst.mask[0] = 0;
-            dst.Translate();
-            dst.mask[0] = oldval;
-            vs10_transstring.append( ".x, " );
-            src[0].Translate();
-            vs10_transstring.append( ", " );
-            src[1].Translate();
-            vs10_transstring.append( ";\n" );
-            ninstr++;
-
-            vs10_transstring.append( "DP4    " );
-            oldval = dst.mask[0];
-            dst.mask[0] = 0;
-            dst.Translate();
-            dst.mask[0] = oldval;
-            vs10_transstring.append( ".y, " );
-            src[0].Translate();
-            vs10_transstring.append( ", " );
-            oldindex = src[1].index;
-            src[1].index = src[1].index + 1;
-            src[1].Translate();
-            src[1].index = oldindex;
-            vs10_transstring.append( ";\n" );
-            ninstr++;
-
-            vs10_transstring.append( "DP4    " );
-            oldval = dst.mask[0];
-            dst.mask[0] = 0;
-            dst.Translate();
-            dst.mask[0] = oldval;
-            vs10_transstring.append( ".z, " );
-            src[0].Translate();
-            vs10_transstring.append( ", " );
-            oldindex = src[1].index;
-            src[1].index = src[1].index + 2;
-            src[1].Translate();
-            src[1].index = oldindex;
-            vs10_transstring.append( ";\n" );
-            ninstr++;
-
-            if ( instid == VS10_M4X4 )
-            {
-                vs10_transstring.append( "DP4    " );
-                oldval = dst.mask[0];
-                dst.mask[0] = 0;
-                dst.Translate();
-                dst.mask[0] = oldval;
-                vs10_transstring.append( ".w, " );
-                src[0].Translate();
-                vs10_transstring.append( ", " );
-                oldindex = src[1].index;
-                src[1].index = src[1].index + 3;
-                src[1].Translate();
-                src[1].index = oldindex;
-                vs10_transstring.append( ";\n" );
-                ninstr++;
-            }
-            return ninstr;
-        }
-        break;
-    case VS10_MAD: 
-        vs10_transstring.append( "MAD    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        vs10_transstring.append( ", " );
-        src[2].Translate();
-        ninstr = 1;
-        break;
-    case VS10_MAX: 
-        vs10_transstring.append( "MAX    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_MIN: 
-        vs10_transstring.append( "MIN    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_MOV:
-        if ( dst.type == TYPE_ADDRESS_REG )
-            vs10_transstring.append( "ARL    " );
-        else
-            vs10_transstring.append( "MOV    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_MUL: 
-        vs10_transstring.append( "MUL    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_NOP: 
-        return 0;
-        break;
-    case VS10_RCP: 
-        vs10_transstring.append( "RCP    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_RSQ: 
-        vs10_transstring.append( "RSQ    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        ninstr = 1;
-        break;
-    case VS10_SGE: 
-        vs10_transstring.append( "SGE    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_SLT: 
-        vs10_transstring.append( "SLT    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        src[1].Translate();
-        ninstr = 1;
-        break;
-    case VS10_SUB:
-        vs10_transstring.append( "ADD    " );
-        dst.Translate();
-        vs10_transstring.append( ", " );
-        src[0].Translate();
-        vs10_transstring.append( ", " );
-        flag = src[1].sign;
-        if ( flag == -1 ) src[1].sign = 1;
-        else src[1].sign = -1;
-        src[1].Translate();
-        src[1].sign = flag;
-        ninstr = 1;
-        break;
-    case VS10_COMMENT:
-        vs10_transstring.append( comment );
-        return 0;
-        break;
-    case VS10_HEADER:
-        //vs10_transstring.append( "!!VP1.0\n" );
-        return 0;
-        break;
-    case -1:
-        vs10_transstring.append( "\n" );
-        return 0;
-    default:
-        errors.set( "VS10Inst::Translate() Internal Error: unknown instruction type\n" );
-    }
-
-    vs10_transstring.append( ";\n" );
-    return ninstr;
-}

+ 0 - 89
CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst.h

@@ -1,89 +0,0 @@
-#ifndef _VS10INST_H
-#define _VS10INST_H
-
-#define VS10_ADD        1
-#define VS10_DP3        2
-#define VS10_DP4        3
-#define VS10_DST        4
-#define VS10_EXP        5
-#define VS10_EXPP       6
-#define VS10_FRC        7
-#define VS10_LIT        8
-#define VS10_LOG        9
-#define VS10_LOGP       10
-#define VS10_M3X2       11
-#define VS10_M3X3       12
-#define VS10_M3X4       13
-#define VS10_M4X3       14
-#define VS10_M4X4       15
-#define VS10_MAD        16
-#define VS10_MAX        17
-#define VS10_MIN        18
-#define VS10_MOV        19
-#define VS10_MUL        20
-#define VS10_NOP        21
-#define VS10_RCP        22
-#define VS10_RSQ        23
-#define VS10_SGE        24
-#define VS10_SLT        25
-#define VS10_SUB        26
-#define VS10_COMMENT    27
-#define VS10_HEADER     28
-
-#define TYPE_TEMPORARY_REG          1
-#define TYPE_VERTEX_ATTRIB_REG      2
-#define TYPE_ADDRESS_REG            3
-#define TYPE_CONSTANT_MEM_REG       4
-#define TYPE_CONSTANT_A0_REG        5
-#define TYPE_CONSTANT_A0_OFFSET_REG 6
-#define TYPE_POSITION_RESULT_REG    7
-#define TYPE_COLOR_RESULT_REG       8
-#define TYPE_TEXTURE_RESULT_REG     9
-#define TYPE_FOG_RESULT_REG         10
-#define TYPE_POINTS_RESULT_REG      11
-
-class VS10Reg {
-public:
-//    VS10Reg();
-//    VS10Reg(const VS10Reg &r);
-//	VS10Reg& operator=(const VS10Reg &r);
-	void Init();
-    void Translate();
-    int type;
-    int index;
-	int sign;
-    char mask[4];
-
-    int ValidateIndex();
-};
-
-typedef class VS10Inst {
-public:
-	~VS10Inst();
-	VS10Inst();
-	VS10Inst(int currline);
-	VS10Inst(const VS10Inst &inst);
-    VS10Inst& operator=(const VS10Inst &inst);
-	VS10Inst(int currline, int inst);
-	VS10Inst(int currline, int inst, char *cmt);
-	VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0);
-	VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0, VS10Reg src1);
-	VS10Inst(int currline, int inst, VS10Reg dreg, VS10Reg src0, VS10Reg src1, VS10Reg src2);
-    void Validate( int &vsflag );
-	int Translate();
-	VS10Reg dst;
-    VS10Reg src[3];
-private:
-    int line;
-    int instid;
-    char *comment;
-    void ValidateRegIndices();
-    void ValidateDestMask();
-    void ValidateSrcMasks();
-    void ValidateDestWritable();
-    void ValidateSrcReadable();
-    void ValidateReadPorts();
-
-} *VS10InstPtr;
-
-#endif

+ 0 - 314
CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst_list.cpp

@@ -1,314 +0,0 @@
-#include "vs1.0_inst_list.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-
-#if CM_PLATFORM == CM_PLATFORM_APPLE
-#	include <OpenGL/glu.h>
-#else
-#	include <GL/glu.h>
-#endif
-
-using namespace std;
-
-extern string vs10_transstring;
-
-#define MAX_NUM_INSTRUCTIONS    128
-#define INSTRUCTION_LIST_INC    128
-
-VS10InstList::VS10InstList()
-{
-	size = 0;
-	max = INSTRUCTION_LIST_INC;
-    list = new VS10Inst[max];
-}
-
-VS10InstList::~VS10InstList()
-{
-    delete [] list;
-}
-
-int VS10InstList::Size()
-{
-	return size;
-}
-
-VS10InstList& VS10InstList::operator+=(VS10InstPtr t)
-{
-	if (size == max) {
-		// Extend list size by increment amount.
-        VS10InstPtr newlist;
-		max += INSTRUCTION_LIST_INC;
-        newlist = new VS10Inst[max];
-        for ( int i = 0; i < size; i++ )
-            newlist[i] = list[i];
-        delete [] list;
-        list = newlist;
-	}
-	list[size++] = *t;
-	return *this;
-}
-
-void VS10InstList::Translate()
-{
-    int ntranslated = 0;
-
-    vs10_transstring.append( "!!VP1.0\n" );
-	for (int i = 0; i < size; i++)
-        {
-	    ntranslated += list[i].Translate();
-	    }
-    vs10_transstring.append( "END\n" );
-
-    if ( ntranslated > 128 )
-    {
-        char str[256];
-        sprintf( str, "Vertex Shader had more than 128 instructions. (Converted to: %d)\n", ntranslated );
-        errors.set( str );
-    }
-    //fprintf( stderr, "Converted vertex shader to vertex program with %d instructions.\n\n", ntranslated );
-}
-
-void VS10InstList::Validate()
-{
-    int vsflag = 0;
-    for ( int i = 0; i < size; i++ )
-        {
-        list[i].Validate( vsflag );
-        }
-}
-
-
-
-namespace
-{
-	void LoadProgram( GLenum target, GLuint id, char *instring );
-	void StrToUpper(char * string);
-	GLint vpid;
-}
-
-
-
-bool is_vs10(const char *s)
-{
-    int len;
-    char *temp;
-    bool vshader_flag;
-
-    temp = NULL;
-    len = strlen(s);
-    if ( len > 0 )
-        temp = new char [len+1];
-    for ( int k = 0; k < len; k++ )
-    {
-        temp[k] = (char) tolower( (char) s[k] );
-    }
-    if ( len == 0 )
-        vshader_flag = false;
-    else
-    {
-        vshader_flag = ( NULL != strstr(temp, "vs.1.0") ) ||
-                       ( NULL != strstr(temp, "vs.1.1") );
-        delete [] temp;
-    }
-    return vshader_flag;
-}
-
-bool vs10_init_more()
-{
-	static bool vpinit = false;
-	if (vpinit == false )
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_vertex_program"))
-		{
-			errors.set("unable to initialize GL_NV_vertex_program");
-			return false;
-		}
-		else
-		{
-        */
-			vpinit = true;
-            /*
-		}
-        */
-	}
-	
-	glGetIntegerv( GL_VERTEX_PROGRAM_BINDING_NV, &vpid );
-	
-	if ( vpid == 0 )
-	{
-		char str[128];
-		sprintf( str, "No vertex program id bound for nvparse() invocation.  Bound id = %d\n", (int)vpid );
-		errors.set( str );
-		return false;
-	}
-    errors.reset();
-    line_number = 1;
-    vs10_transstring = "";
-	return true;	
-}
-
-void vs10_load_program()
-{
-    // Only load the program if no errors occurred.
-    if ( errors.get_num_errors() == 0 )
-    	LoadProgram( GL_VERTEX_PROGRAM_NV, vpid, (char *) vs10_transstring.c_str() );
-}
-
-
-namespace
-{
-	//.----------------------------------------------------------------------------.
-	//|   Function   : LoadProgram                                                 |
-	//|   Description: Load a program into GL, and report any errors encountered.  |
-	//.----------------------------------------------------------------------------.
-	void LoadProgram( GLenum target, GLuint id, char *instring )
-	{
-		GLint  errPos;
-		GLenum errCode;
-		const GLubyte *errString;
-		
-		int len = strlen(instring);
-		glLoadProgramNV( target, id, len, (const GLubyte *) instring );
-		if ( (errCode = glGetError()) != GL_NO_ERROR )
-		{
-			errString = gluErrorString( errCode );
-			
-			glGetIntegerv( GL_PROGRAM_ERROR_POSITION_NV, &errPos );
-			
-			int nlines = 1;
-			int nchar  = 1;
-			int i;
-			for ( i = 0; i < errPos; i++ )
-			{
-				if ( instring[i] == '\n' )
-				{
-					nlines++;
-					nchar = 1;
-				}
-				else
-				{
-					nchar++;
-				}
-			}
-			int start = 0;
-			int end = 0;
-			int flag = ((instring[errPos]==';') | (instring[errPos-1]==';')) ? 1 : 0;
-			for ( i = errPos; i >= 0; i-- )
-			{
-				start = i;
-				if ( flag && (start >= errPos-1)  )
-					continue;
-				if ( instring[i] == ';' )
-				{
-					if ( !flag )
-					{
-						start = i+1;
-						if ( instring[start] == '\n' )
-							start++;
-					}
-					break;
-				}
-			}
-			for ( i = errPos; i < len; i++ )
-			{
-				end = i;
-				if ( instring[i] == ';' && end > start)
-				{
-					break;
-				}
-			}
-			if ( errPos - start > 30 )
-			{
-				start = errPos - 30;
-			}
-			if ( end - errPos > 30 )
-			{
-				end = errPos + 30;
-			}
-			
-			char substring[96];
-			memset( substring, 0, 96 );
-			strncpy( substring, &(instring[start]), end-start+1 );
-			char str[256];
-			//sprintf( str, "error at line %d character %d\n    \"%s\"\n", nlines, nchar, substring );
-			sprintf( str, "error at line %d character %d\n\"%s\"\n", nlines, nchar, substring );
-			int width = errPos-start;
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "|\n" );
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "^\n" );
-			
-			errors.set( str );
-		}
-	}
-	
-	
-	//.----------------------------------------------------------------------------.
-	//|   Function   : StrToUpper                                                  |
-	//|   Description: Converts all lowercase chars in a string to uppercase.      |
-	//.----------------------------------------------------------------------------.
-	void StrToUpper(char *string)
-	{
-		for (unsigned int i = 0; i < strlen(string); i++)
-			string[i] = toupper(string[i]);
-	}
-	
-}
-
-/*
-    else if ( is_vs10(instring) )
-    {
-        if (vpinit == 0 )
-        {
-            if(! glh_init_extensions("GL_NV_vertex_program"))
-            {
-                errors.set("unable to initialize GL_NV_vertex_program");
-                free(instring);
-                return;
-            }
-            else
-            {
-                vpinit = 1;
-            }
-        }
-
-        if ( glGetError() != GL_NO_ERROR )
-        {
-            errors.set( "Previous GL_ERROR prior to vertex shader parsing.\n" );
-        }
-
-        int vpid;
-        glGetIntegerv( GL_VERTEX_PROGRAM_BINDING_NV, &vpid );
-        
-        if ( vpid == 0 )
-        {
-            char str[128];
-            sprintf( str, "No vertex program id bound for nvparse() invocation.  Bound id = %d\n", vpid );
-            errors.set( str );
-        }
-        else
-        {
-            errors.reset();
-            line_number = 1;
-            vs10_init(instring);
-            vs10_transstring = "";
-            vs10_parse();
-            //fprintf( stderr, "Converted text:\n%s\n\n\n", vs10_transstring.c_str() );
-            LoadProgram( GL_VERTEX_PROGRAM_NV, vpid, (char *) vs10_transstring.c_str() );
-        }
-        
-    }
-
-*/

+ 0 - 25
CamelotRenderer/RenderSystemGL/Source/nvparse/vs1.0_inst_list.h

@@ -1,25 +0,0 @@
-#ifndef _VS10_H
-#define _VS10_H
-
-#define WRITEMASK_X		0x01
-#define WRITEMASK_Y		0x02
-#define WRITEMASK_Z		0x04
-#define WRITEMASK_W		0x08
-
-#include "vs1.0_inst.h"
-
-typedef class VS10InstList {
-public:
-	VS10InstList();
-	~VS10InstList();
-	int Size();
-	VS10InstList& operator+=(VS10InstPtr t);
-	void Validate();
-	void Translate();
-private:
-    VS10InstPtr list;
-    int size;
-    int max;
-} *VS10InstListPtr;
-
-#endif

+ 0 - 199
CamelotRenderer/RenderSystemGL/Source/nvparse/vsp1.0_impl.cpp

@@ -1,199 +0,0 @@
-#include "nvparse_errors.h"
-#include "nvparse_externs.h"
-#include <string.h>
-#include <string>
-#include <ctype.h>
-
-#if CM_PLATFORM == CM_PLATFORM_APPLE
-#	include <OpenGL/glu.h>
-#else
-#	include <GL/glu.h>
-#endif
-
-
-using namespace std;
-
-
-namespace
-{
-	void LoadProgram( GLenum target, GLuint id, char *instring );
-	void StrToUpper(char * string);
-}
-
-
-bool is_vsp10(const char * s)
-{
-	return ! strncmp(s, "!!VSP1.0", 8);
-}
-
-bool vsp10_init(char * s)
-{
-	static bool vpinit = false;
-	if (vpinit == false )
-	{
-      /*
-		if(! glh_init_extensions("GL_NV_vertex_program"))
-		{
-			errors.set("unable to initialize GL_NV_vertex_program");
-			return false;
-		}
-		else
-		{
-        */
-			vpinit = true;
-            /*
-		}
-        */
-	}
-	
-	errors.reset();
-	line_number = 1;
-	myin = s;
-	
-	return true;	
-}
-
-int vsp10_parse(int vpsid)
-{
-    LoadProgram( GL_VERTEX_STATE_PROGRAM_NV, vpsid, myin );
-	return 0;
-}
-
-namespace
-{
-	//.----------------------------------------------------------------------------.
-	//|   Function   : LoadProgram                                                 |
-	//|   Description: Load a program into GL, and report any errors encountered.  |
-	//.----------------------------------------------------------------------------.
-	void LoadProgram( GLenum target, GLuint id, char *instring )
-	{
-		GLint  errPos;
-		GLenum errCode;
-		const GLubyte *errString;
-		
-		int len = strlen(instring);
-		glLoadProgramNV( target, id, len, (const GLubyte *) instring );
-		if ( (errCode = glGetError()) != GL_NO_ERROR )
-		{
-			errString = gluErrorString( errCode );
-			
-			glGetIntegerv( GL_PROGRAM_ERROR_POSITION_NV, &errPos );
-			
-			int nlines = 1;
-			int nchar  = 1;
-			int i;
-			for ( i = 0; i < errPos; i++ )
-			{
-				if ( instring[i] == '\n' )
-				{
-					nlines++;
-					nchar = 1;
-				}
-				else
-				{
-					nchar++;
-				}
-			}
-			int start = 0;
-			int end = 0;
-			int flag = ((instring[errPos]==';') | (instring[errPos-1]==';')) ? 1 : 0;
-			for ( i = errPos; i >= 0; i-- )
-			{
-				start = i;
-				if ( flag && (start >= errPos-1)  )
-					continue;
-				if ( instring[i] == ';' )
-				{
-					if ( !flag )
-					{
-						start = i+1;
-						if ( instring[start] == '\n' )
-							start++;
-					}
-					break;
-				}
-			}
-			for ( i = errPos; i < len; i++ )
-			{
-				end = i;
-				if ( instring[i] == ';' && end > start)
-				{
-					break;
-				}
-			}
-			if ( errPos - start > 30 )
-			{
-				start = errPos - 30;
-			}
-			if ( end - errPos > 30 )
-			{
-				end = errPos + 30;
-			}
-			
-			char substring[96];
-			memset( substring, 0, 96 );
-			strncpy( substring, &(instring[start]), end-start+1 );
-			char str[256];
-			//sprintf( str, "error at line %d character %d\n    \"%s\"\n", nlines, nchar, substring );
-			sprintf( str, "error at line %d character %d\n\"%s\"\n", nlines, nchar, substring );
-			int width = errPos-start;
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "|\n" );
-			for ( i = 0; i < width; i++ )
-			{
-				strcat( str, " " );
-			}
-			strcat( str, "^\n" );
-			
-			errors.set( str );
-		}
-	}
-	
-	
-	//.----------------------------------------------------------------------------.
-	//|   Function   : StrToUpper                                                  |
-	//|   Description: Converts all lowercase chars in a string to uppercase.      |
-	//.----------------------------------------------------------------------------.
-	void StrToUpper(char *string)
-	{
-		for (unsigned int i = 0; i < strlen(string); i++)
-			string[i] = toupper(string[i]);
-	}
-	
-}
-/*
-else if(!strncmp(instring, "!!VSP1.0", 8))
-{
-if (vpinit == 0 )
-{
-if(! glh_init_extensions("GL_NV_vertex_program"))
-{
-errors.set("unable to initialize GL_NV_vertex_program");
-free(instring);
-return;
-}
-else
-{
-vpinit = 1;
-}
-}
-
-  errors.reset();
-  line_number = 1;
-  
-	va_list ap;
-	va_start(ap, input_string);
-	int vpsid = va_arg(ap,int);
-	va_end(ap);
-	
-	  if ( glGetError() != GL_NO_ERROR )
-	  {
-	  errors.set( "Previous GL_ERROR prior to vertex state program parsing." );
-	  }
-	  
-        LoadProgram( GL_VERTEX_STATE_PROGRAM_NV, vpsid, instring );
-		}
-		*/