Bug 734657 - Upgrade ANGLE to r1042 - no review
authorBenoit Jacob <bjacob@mozilla.com>
Sun, 15 Apr 2012 15:05:00 -0400
changeset 91730 7aa6a96404c08bc6272de85a243f0c9aa5b694a0
parent 91729 f9196b054d14b2ba8ca0a66e5747c6e4a86dde67
child 91731 3b35598ce292c9cfc0d6b27389198a43ad3d4bfc
push id687
push userrcampbell@mozilla.com
push dateTue, 17 Apr 2012 17:29:54 +0000
treeherderfx-team@3a9629092a5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs734657
milestone14.0a1
Bug 734657 - Upgrade ANGLE to r1042 - no review The upstream is at: http://code.google.com/p/angleproject/ This update allows to pass all conformance tests on Windows with ANGLE renderer; also fixes 2 crashes (see dependent bugs).
content/canvas/test/webgl/failing_tests_windows.txt
gfx/angle/CONTRIBUTORS
gfx/angle/DEPS
gfx/angle/Makefile.in
gfx/angle/README.mozilla
gfx/angle/angle-enforce-readpixels-spec.patch
gfx/angle/angle-impl-read-bgra.patch
gfx/angle/angle-intrinsic-msvc2005.patch
gfx/angle/angle-long-identifier-hash-spooky.patch
gfx/angle/angle-renaming-debug.patch
gfx/angle/angle-use-xmalloc.patch
gfx/angle/build/all.gyp
gfx/angle/build/common.gypi
gfx/angle/extensions/ANGLE_instanced_arrays.txt
gfx/angle/extensions/ANGLE_pack_reverse_row_order.txt
gfx/angle/include/GLES2/gl2ext.h
gfx/angle/samples/build_samples.gyp
gfx/angle/samples/gles2_book/Common/esTransform.c
gfx/angle/samples/gles2_book/Common/esUtil.c
gfx/angle/samples/gles2_book/MipMap2D/MipMap2D.c
gfx/angle/samples/translator/translator.cpp
gfx/angle/src/build_angle.gyp
gfx/angle/src/common/version.h
gfx/angle/src/compiler/BaseTypes.h
gfx/angle/src/compiler/BuiltInFunctionEmulator.cpp
gfx/angle/src/compiler/BuiltInFunctionEmulator.h
gfx/angle/src/compiler/ConstantUnion.h
gfx/angle/src/compiler/Intermediate.cpp
gfx/angle/src/compiler/OutputHLSL.cpp
gfx/angle/src/compiler/OutputHLSL.h
gfx/angle/src/compiler/ParseHelper.cpp
gfx/angle/src/compiler/PoolAlloc.cpp
gfx/angle/src/compiler/SymbolTable.cpp
gfx/angle/src/compiler/SymbolTable.h
gfx/angle/src/compiler/Types.h
gfx/angle/src/compiler/glslang.h
gfx/angle/src/compiler/glslang.l
gfx/angle/src/compiler/glslang.y
gfx/angle/src/compiler/glslang_lex.cpp
gfx/angle/src/compiler/glslang_tab.cpp
gfx/angle/src/compiler/glslang_tab.h
gfx/angle/src/compiler/preprocessor/cpp.c
gfx/angle/src/compiler/preprocessor/cpp.h
gfx/angle/src/compiler/preprocessor/lexer_glue.cpp
gfx/angle/src/compiler/preprocessor/lexer_glue.h
gfx/angle/src/compiler/preprocessor/memory.c
gfx/angle/src/compiler/preprocessor/memory.h
gfx/angle/src/compiler/preprocessor/new/Context.cpp
gfx/angle/src/compiler/preprocessor/new/Context.h
gfx/angle/src/compiler/preprocessor/new/Input.cpp
gfx/angle/src/compiler/preprocessor/new/Lexer.cpp
gfx/angle/src/compiler/preprocessor/new/Lexer.h
gfx/angle/src/compiler/preprocessor/new/Preprocessor.cpp
gfx/angle/src/compiler/preprocessor/new/Preprocessor.h
gfx/angle/src/compiler/preprocessor/new/Token.cpp
gfx/angle/src/compiler/preprocessor/new/Token.h
gfx/angle/src/compiler/preprocessor/new/pp.l
gfx/angle/src/compiler/preprocessor/new/pp.y
gfx/angle/src/compiler/preprocessor/new/pp_lex.cpp
gfx/angle/src/compiler/preprocessor/new/pp_tab.cpp
gfx/angle/src/compiler/preprocessor/new/pp_tab.h
gfx/angle/src/compiler/preprocessor/new/pp_utils.h
gfx/angle/src/compiler/preprocessor/preprocess.h
gfx/angle/src/compiler/preprocessor/scanner.c
gfx/angle/src/compiler/preprocessor/scanner.h
gfx/angle/src/compiler/preprocessor/symbols.c
gfx/angle/src/compiler/preprocessor/symbols.h
gfx/angle/src/compiler/preprocessor/tokens.c
gfx/angle/src/compiler/preprocessor/tokens.h
gfx/angle/src/libEGL/Config.cpp
gfx/angle/src/libEGL/Display.cpp
gfx/angle/src/libEGL/Display.h
gfx/angle/src/libEGL/Makefile.in
gfx/angle/src/libEGL/Surface.cpp
gfx/angle/src/libEGL/libEGL.cpp
gfx/angle/src/libEGL/libEGL.vcproj
gfx/angle/src/libGLESv2/Blit.cpp
gfx/angle/src/libGLESv2/Buffer.h
gfx/angle/src/libGLESv2/Context.cpp
gfx/angle/src/libGLESv2/Context.h
gfx/angle/src/libGLESv2/Fence.cpp
gfx/angle/src/libGLESv2/Fence.h
gfx/angle/src/libGLESv2/IndexDataManager.cpp
gfx/angle/src/libGLESv2/IndexDataManager.h
gfx/angle/src/libGLESv2/Makefile.in
gfx/angle/src/libGLESv2/Program.cpp
gfx/angle/src/libGLESv2/Program.h
gfx/angle/src/libGLESv2/Shader.cpp
gfx/angle/src/libGLESv2/Shader.h
gfx/angle/src/libGLESv2/Texture.cpp
gfx/angle/src/libGLESv2/Texture.h
gfx/angle/src/libGLESv2/VertexDataManager.cpp
gfx/angle/src/libGLESv2/VertexDataManager.h
gfx/angle/src/libGLESv2/libGLESv2.cpp
gfx/angle/src/libGLESv2/libGLESv2.def
gfx/angle/tests/build_tests.gyp
gfx/angle/tests/preprocessor_tests/identifier_test.cpp
gfx/angle/tests/preprocessor_tests/number_test.cpp
gfx/angle/tests/preprocessor_tests/space_test.cpp
gfx/angle/tests/preprocessor_tests/token_test.cpp
--- a/content/canvas/test/webgl/failing_tests_windows.txt
+++ b/content/canvas/test/webgl/failing_tests_windows.txt
@@ -1,3 +1,1 @@
-conformance/glsl/functions/glsl-function-atan-xy.html
-conformance/glsl/misc/struct-nesting-under-maximum.html
 conformance/more/functions/uniformfArrayLen1.html
--- a/gfx/angle/CONTRIBUTORS
+++ b/gfx/angle/CONTRIBUTORS
@@ -42,9 +42,10 @@ Apple Inc.
 Aitor Moreno <aitormoreno at gmail.com>
 Jim Hauxwell <james at dattrax.co.uk>
 ddefrostt
 timeless
 Yore Apex
 Mark Callow
 Yuriy O'Donnell
 Sam Hocevar
+Pierre Leveille
 
--- a/gfx/angle/DEPS
+++ b/gfx/angle/DEPS
@@ -1,11 +1,14 @@
 deps = {
   "trunk/third_party/gyp":
       "http://gyp.googlecode.com/svn/trunk@1080",
+
+  "trunk/third_party/googletest":
+      "http://googletest.googlecode.com/svn/trunk@573", #release 1.6.0
 }
 
 hooks = [
   {
     # A change to a .gyp, .gypi, or to GYP itself should run the generator.
     "pattern": ".",
     "action": ["python", "trunk/build/gyp_angle"],
   },
--- a/gfx/angle/Makefile.in
+++ b/gfx/angle/Makefile.in
@@ -55,16 +55,17 @@ EXPORTS_angle = \
 	include/GLSLANG/ShaderLang.h \
 	$(NULL)
 
 LOCAL_INCLUDES += -I$(srcdir)/include -I$(srcdir)/src
 
 VPATH += $(srcdir)/src
 VPATH += $(srcdir)/src/compiler
 VPATH += $(srcdir)/src/compiler/preprocessor
+VPATH += $(srcdir)/src/compiler/preprocessor/new
 
 CPPSRCS = \
 	Compiler.cpp \
         DetectRecursion.cpp \
         InfoSink.cpp \
         Initialize.cpp \
         InitializeDll.cpp \
         Intermediate.cpp \
@@ -81,16 +82,22 @@ CPPSRCS = \
         compilerdebug.cpp \
         ossource_nspr.cpp \
         util.cpp \
         ValidateLimitations.cpp \
         ForLoopUnroll.cpp \
         MapLongVariableNames.cpp \
         spooky.cpp \
         BuiltInFunctionEmulator.cpp \
+        Input.cpp \
+        Lexer.cpp \
+        pp_lex.cpp \
+        Preprocessor.cpp \
+        Token.cpp \
+        lexer_glue.cpp \
         $(NULL)
 
 # flex/yacc generated files
 CPPSRCS += \
         glslang_lex.cpp \
         glslang_tab.cpp \
         $(NULL)
 
--- a/gfx/angle/README.mozilla
+++ b/gfx/angle/README.mozilla
@@ -1,22 +1,21 @@
 This is the ANGLE project, from http://code.google.com/p/angleproject/
 
-Current revision: r963
+Current revision: r1042
 
 == Applied local patches ==
 
 In this order:
   angle-renaming-debug.patch - rename debug.h to compilerdebug.h to avoid conflict in our makefiles
   angle-intrinsic-msvc2005.patch - work around a MSVC 2005 compile error
   angle-use-xmalloc.patch - see bug 680840. Can drop this patch whenever the new preprocessor lands.
-  angle-castrate-bug-241.patch - see bug 699033 / angle bug 241
   angle-enforce-readpixels-spec.patch - see bug 724476.
   angle-impl-read-bgra.patch - see bug 724476.
-  gfx/angle/angle-long-identifier-hash-spooky.patch - see bug 676071
+  angle-long-identifier-hash-spooky.patch - see bug 676071
 
 In addition to these patches, the Makefile.in files are ours, they're not present in upsteam ANGLE.
 
 == How to update this ANGLE copy ==
 
 1. Unapply patches
 2. Apply diff with new ANGLE version
 3. Reapply patches.
--- a/gfx/angle/angle-enforce-readpixels-spec.patch
+++ b/gfx/angle/angle-enforce-readpixels-spec.patch
@@ -1,11 +1,10 @@
-From: Jeff Gilbert <jgilbert@mozilla.com>
-Bug 724476 - ANGLE Bug 293 - Enforce readPixels format/type semantics
-
+# HG changeset patch
+# Parent 8d84c8d4e3ed41a4941afdf9d51819b19ca64716
 diff --git a/gfx/angle/src/libGLESv2/libGLESv2.cpp b/gfx/angle/src/libGLESv2/libGLESv2.cpp
 --- a/gfx/angle/src/libGLESv2/libGLESv2.cpp
 +++ b/gfx/angle/src/libGLESv2/libGLESv2.cpp
 @@ -98,27 +98,16 @@ bool validReadFormatType(GLenum format, 
          switch (type)
          {
            case GL_UNSIGNED_BYTE:
              break;
--- a/gfx/angle/angle-impl-read-bgra.patch
+++ b/gfx/angle/angle-impl-read-bgra.patch
@@ -1,15 +1,14 @@
-From: Jeff Gilbert <jgilbert@mozilla.com>
-Bug 724476 - ANGLE Bug 294 - Use BGRA/UBYTE as exposed fast format/type for readPixels
-
+# HG changeset patch
+# Parent 8b838be49f115022e403c850c24b28ad62d72ad6
 diff --git a/gfx/angle/src/libGLESv2/Context.cpp b/gfx/angle/src/libGLESv2/Context.cpp
 --- a/gfx/angle/src/libGLESv2/Context.cpp
 +++ b/gfx/angle/src/libGLESv2/Context.cpp
-@@ -2520,16 +2520,17 @@ void Context::readPixels(GLint x, GLint 
+@@ -2518,16 +2518,17 @@ void Context::readPixels(GLint x, GLint 
      {
          if (desc.Format == D3DFMT_A8R8G8B8 &&
              format == GL_BGRA_EXT &&
              type == GL_UNSIGNED_BYTE)
          {
              // Fast path for EXT_read_format_bgra, given
              // an RGBA source buffer.  Note that buffers with no
              // alpha go through the slow path below.
@@ -17,17 +16,17 @@ diff --git a/gfx/angle/src/libGLESv2/Con
              memcpy(dest + j * outputPitch,
                     source + j * inputPitch,
                     (rect.right - rect.left) * 4);
              continue;
          }
  
          for (int i = 0; i < rect.right - rect.left; i++)
          {
-@@ -2666,20 +2667,20 @@ void Context::readPixels(GLint x, GLint 
+@@ -2665,20 +2666,20 @@ void Context::readPixels(GLint x, GLint 
                          ((unsigned short)(     a + 0.5f) << 15) |
                          ((unsigned short)(31 * r + 0.5f) << 10) |
                          ((unsigned short)(31 * g + 0.5f) << 5) |
                          ((unsigned short)(31 * b + 0.5f) << 0);
                      break;
                    default: UNREACHABLE();
                  }
                  break;
--- a/gfx/angle/angle-intrinsic-msvc2005.patch
+++ b/gfx/angle/angle-intrinsic-msvc2005.patch
@@ -1,10 +1,10 @@
 # HG changeset patch
-# Parent 6ee54a11fd135a2b594db77f7eaf83f06ee7b1d8
+# Parent 4ef86d96d456866537beea57b0a4451cf919cd34
 diff --git a/gfx/angle/src/libGLESv2/Texture.cpp b/gfx/angle/src/libGLESv2/Texture.cpp
 --- a/gfx/angle/src/libGLESv2/Texture.cpp
 +++ b/gfx/angle/src/libGLESv2/Texture.cpp
 @@ -8,16 +8,22 @@
  // Texture2D and TextureCubeMap. Implements GL texture objects and related
  // functionality. [OpenGL ES 2.0.24] section 3.7 page 63.
  
  #include "libGLESv2/Texture.h"
--- a/gfx/angle/angle-long-identifier-hash-spooky.patch
+++ b/gfx/angle/angle-long-identifier-hash-spooky.patch
@@ -1,11 +1,10 @@
 # HG changeset patch
-# Parent 69255fe4cb94f1681bc9200db37c0ad3de171abc
-
+# Parent 268bda9ac676b6f4cca5aa044d0dcefff2008535
 diff --git a/gfx/angle/Makefile.in b/gfx/angle/Makefile.in
 --- a/gfx/angle/Makefile.in
 +++ b/gfx/angle/Makefile.in
 @@ -79,16 +79,17 @@ CPPSRCS = \
          SymbolTable.cpp \
          VariableInfo.cpp \
          compilerdebug.cpp \
          ossource_nspr.cpp \
--- a/gfx/angle/angle-renaming-debug.patch
+++ b/gfx/angle/angle-renaming-debug.patch
@@ -1,14 +1,14 @@
 # HG changeset patch
-# Parent 326590fb862cf7e277487f48c7a434bde3566ea0
+# Parent f22671e05062a082c7b22192868b804fbf42653b
 diff --git a/gfx/angle/Makefile.in b/gfx/angle/Makefile.in
 --- a/gfx/angle/Makefile.in
 +++ b/gfx/angle/Makefile.in
-@@ -75,17 +75,17 @@ CPPSRCS = \
+@@ -73,17 +73,17 @@ CPPSRCS = \
          parseConst.cpp \
          ParseHelper.cpp \
          PoolAlloc.cpp \
          QualifierAlive.cpp \
          RemoveTree.cpp \
          ShaderLang.cpp \
          SymbolTable.cpp \
          VariableInfo.cpp \
@@ -43,17 +43,17 @@ diff --git a/gfx/angle/src/compiler/Outp
      TInfoSinkBase out;
      if (type.isMatrix())
      {
 diff --git a/gfx/angle/src/compiler/OutputHLSL.cpp b/gfx/angle/src/compiler/OutputHLSL.cpp
 --- a/gfx/angle/src/compiler/OutputHLSL.cpp
 +++ b/gfx/angle/src/compiler/OutputHLSL.cpp
 @@ -1,17 +1,17 @@
  //
- // Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+ // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  //
  
  #include "compiler/OutputHLSL.h"
  
 -#include "compiler/debug.h"
 +#include "compiler/compilerdebug.h"
@@ -186,13 +186,13 @@ diff --git a/gfx/angle/src/compiler/prep
  #include <string.h>
  #include <ctype.h>
  
 -#include "compiler/debug.h"
 +#include "compiler/compilerdebug.h"
  #include "compiler/preprocessor/slglobals.h"
  #include "compiler/util.h"
  
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //////////////////////// Preprocessor and Token Recorder and Playback: ////////////////////////
- ///////////////////////////////////////////////////////////////////////////////////////////////
+ #if defined(_MSC_VER)
+ #pragma warning(disable: 4054)
+ #pragma warning(disable: 4152)
+ #endif
  
- /*
--- a/gfx/angle/angle-use-xmalloc.patch
+++ b/gfx/angle/angle-use-xmalloc.patch
@@ -1,14 +1,14 @@
 # HG changeset patch
-# Parent 93033f21b121382b50e5bc9787edf704d6906508
+# Parent 6ccfe6b908da8ade8b37e772ed8a9f3c494d8ef9
 diff --git a/gfx/angle/Makefile.in b/gfx/angle/Makefile.in
 --- a/gfx/angle/Makefile.in
 +++ b/gfx/angle/Makefile.in
-@@ -129,16 +129,18 @@ CSRCS   = \
+@@ -127,16 +127,18 @@ CSRCS   = \
  	$(NULL)
  
  DEFINES += -DANGLE_USE_NSPR -DANGLE_BUILD -DCOMPILER_IMPLEMENTATION
  
  #these defines are from ANGLE's build_angle.gyp
  DEFINES += -DANGLE_DISABLE_TRACE
  DEFINES += -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0
  
--- a/gfx/angle/build/all.gyp
+++ b/gfx/angle/build/all.gyp
@@ -9,17 +9,17 @@
       'type': 'none',
       'dependencies': [
         # TODO(alokp): build_ prefix should be removed from the gyp files
         # as soon as we can get rid of manually-maintained sln files.
         # Otherwise auto-generated sln files will overwrite/conflict the
         # manually maintained ones.
         '../samples/build_samples.gyp:*',
         '../src/build_angle.gyp:*',
-        # '../tests/tests.gyp:*',
+        '../tests/build_tests.gyp:*',
       ],
     },
   ],
 }
 
 # Local Variables:
 # tab-width:2
 # indent-tabs-mode:nil
--- a/gfx/angle/build/common.gypi
+++ b/gfx/angle/build/common.gypi
@@ -35,26 +35,26 @@
             'DebugInformationFormat': '3',
             # TODO(alokp): Disable exceptions before integrating with chromium.
             #'ExceptionHandling': '0',
             'EnableFunctionLevelLinking': 'true',
             'MinimalRebuild': 'false',
             'PreprocessorDefinitions': [
               '_CRT_SECURE_NO_DEPRECATE',
               '_HAS_EXCEPTIONS=0',
-              '_HAS_TR1=0',
               '_WIN32_WINNT=0x0600',
               '_WINDOWS',
               'NOMINMAX',
               'WIN32',
               'WIN32_LEAN_AND_MEAN',
               'WINVER=0x0600',
             ],
             'RuntimeTypeInfo': 'false',
-            'WarningLevel': '3',
+            'WarningLevel': '4',
+            'DisableSpecificWarnings': '4100;4127;4189;4239;4244;4245;4512;4702',
           },
           'VCLinkerTool': {
             'FixedBaseAddress': '1',
             'GenerateDebugInformation': 'true',
             'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
             'MapFileName': '$(OutDir)\\$(TargetName).map',
             # Most of the executables we'll ever create are tests
             # and utilities with console output.
new file mode 100644
--- /dev/null
+++ b/gfx/angle/extensions/ANGLE_instanced_arrays.txt
@@ -0,0 +1,359 @@
+Name
+
+    ANGLE_instanced_arrays
+
+Name Strings
+
+    GL_ANGLE_instanced_arrays
+
+Contributors
+
+    Contributors to ARB_instanced_arrays
+    Nicolas Capens, TransGaming Inc.
+    James Helferty, TransGaming Inc.
+    Kenneth Russell, Google Inc.
+    Vangelis Kokkevis, Google Inc.
+
+Contact
+
+    Daniel Koch, TransGaming Inc. (daniel 'at' transgaming.com)
+
+Status
+
+    Implemented in ANGLE r976.
+
+Version
+
+    Last Modified Date: February 8, 2012
+    Author Revision: 3
+
+Number
+
+    OpenGL ES Extension #??
+
+Dependencies
+
+    OpenGL ES 2.0 is required.
+
+    This extension is written against the OpenGL ES 2.0 Specification.
+
+Overview
+
+    A common use case in GL for some applications is to be able to
+    draw the same object, or groups of similar objects that share
+    vertex data, primitive count and type, multiple times.  This 
+    extension provides a means of accelerating such use cases while 
+    restricting the number of API calls, and keeping the amount of 
+    duplicate data to a minimum.
+    
+    This extension introduces an array "divisor" for generic
+    vertex array attributes, which when non-zero specifies that the
+    attribute is "instanced."  An instanced attribute does not
+    advance per-vertex as usual, but rather after every <divisor>
+    conceptual draw calls.
+    
+    (Attributes which aren't instanced are repeated in their entirety
+    for every conceptual draw call.)
+    
+    By specifying transform data in an instanced attribute or series
+    of instanced attributes, vertex shaders can, in concert with the 
+    instancing draw calls, draw multiple instances of an object with 
+    one draw call.
+
+IP Status
+
+    No known IP claims.
+
+New Tokens
+
+    Accepted by the <pname> parameters of GetVertexAttribfv and 
+    GetVertexAttribiv:
+
+        VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE               0x88FE
+
+New Procedures and Functions
+
+    void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
+            sizei primcount);
+
+    void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
+            const void *indices, sizei primcount);
+
+    void VertexAttribDivisorANGLE(uint index, uint divisor);
+
+Additions to Chapter 2 of the OpenGL ES 2.0 Specification
+(OpenGL ES Operation)
+
+    Modify section 2.8 (Vertex Arrays), p. 21
+
+    After description of EnableVertexAttribArray / DisableVertexAttribArray
+    add the following:
+
+    "The command
+
+        void VertexAttribDivisorANGLE(uint index, uint divisor);
+
+    modifies the rate at which generic vertex attributes advance when
+    rendering multiple instances of primitives in a single draw call
+    (see DrawArraysInstancedANGLE and DrawElementsInstancedANGLE below).
+    If <divisor> is zero, the attribute at slot <index> advances once
+    per vertex.  If <divisor> is non-zero, the attribute advances once
+    per <divisor> instances of the primitives being rendered.
+    An attribute is referred to as "instanced" if its <divisor> value is
+    non-zero."
+
+    Replace the text describing DrawArrays and DrawElements in the
+    "Transferring Array Elements" subsection of 2.8, from the second paragraph
+    through the end of the section with the following:
+
+    "The command
+
+        void DrawArraysOneInstance( enum mode, int first, sizei count, int instance );
+
+    does not exist in the GL, but is used to describe functionality in
+    the rest of this section.  This function constructs a sequence of
+    geometric primitives by transferring elements <first> through <first> +
+    <count> - 1 of each enabled non-instanced array to the GL. <mode>
+    specifies what kind of primitives are constructed, as defined in section
+    2.6.1.
+
+    If an enabled vertex attribute array is instanced (it has a non-zero
+    attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
+    that is transferred to the GL is given by:
+
+        floor( <instance> / <divisor> ).
+
+    If an array corresponding to a generic attribute required by a vertex shader
+    is not enabled, then the corresponding element is taken from the current
+    generic attribute state (see section 2.7).
+
+    If an array corresponding to a generic attribute required by a vertex shader
+    is enabled, the corresponding current generic attribute value is unaffected 
+    by the execution of DrawArraysOneInstance.
+
+    Specifying <first> < 0 results in undefined behavior. Generating the error 
+    INVALID_VALUE is recommended in this case.
+
+    The command
+
+        void DrawArrays( enum mode, int first, sizei count );
+
+    is equivalent to the command sequence
+    
+        DrawArraysOneInstance(mode, first, count, 0);
+
+    The command
+
+        void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
+                sizei primcount);
+
+    behaves identically to DrawArrays except that <primcount>
+    instances of the range of elements are executed, and the
+    <instance> advances for each iteration. Instanced attributes that
+    have <divisor> N, (where N > 0, as specified by
+    VertexAttribDivisorANGLE) advance once every N instances.
+    
+    It has the same effect as: 
+
+        if (mode, count, or primcount is invalid)
+            generate appropriate error
+        else {
+            for (i = 0; i < primcount; i++) {
+                DrawArraysOneInstance(mode, first, count, i);
+            }
+        }
+
+    The command
+
+       void DrawElementsOneInstance( enum mode, sizei count, enum type,
+            void *indices, int instance );
+
+    does not exist in the GL, but is used to describe functionality in
+    the rest of this section.  This command constructs a sequence of
+    geometric primitives by successively transferring the <count> elements
+    whose indices are stored in the currently bound element array buffer
+    (see section 2.9.2) at the offset defined by <indices> to the GL.
+    The <i>-th element transferred by DrawElementsOneInstance will be taken
+    from element <indices>[i] of each enabled non-instanced array.
+    <type> must be one of UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT, 
+    indicating that the index values are of GL type ubyte, ushort, or uint
+    respectively. <mode> specifies what kind of primitives are constructed,
+    as defined in section 2.6.1.
+
+    If an enabled vertex attribute array is instanced (it has a non-zero
+    attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
+    that is transferred to the GL is given by:
+
+        floor( <instance> / <divisor> );
+
+    If an array corresponding to a generic attribute required by a vertex
+    shader is not enabled, then the corresponding element is taken from the 
+    current generic attribute state (see section 2.7). Otherwise, if an array
+    is enabled, the corresponding current generic attribute value is 
+    unaffected by the execution of DrawElementsOneInstance.
+
+    The command
+
+        void DrawElements( enum mode, sizei count, enum type,
+             const void *indices);
+
+    behaves identically to DrawElementsOneInstance with the <instance> 
+    parameter set to zero; the effect of calling
+
+        DrawElements(mode, count, type, indices);
+
+    is equivalent to the command sequence:
+
+       if (mode, count or type is invalid )
+            generate appropriate error
+        else
+            DrawElementsOneInstance(mode, count, type, indices, 0);
+
+    The command
+
+        void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
+                const void *indices, sizei primcount);
+
+    behaves identically to DrawElements except that <primcount>
+    instances of the set of elements are executed and the instance
+    advances between each set. Instanced attributes are advanced as they do
+    during the execution of DrawArraysInstancedANGLE. It has the same effect as:
+
+        if (mode, count, primcount, or type is invalid )
+            generate appropriate error
+        else {
+            for (int i = 0; i < primcount; i++) {
+                DrawElementsOneInstance(mode, count, type, indices, i);
+            }
+        }
+
+    If the number of supported generic vertex attributes (the value of 
+    MAX_VERTEX_ATTRIBS) is <n>, then the client state required to implement
+    vertex arrays consists of <n> boolean values, <n> memory pointers, <n>
+    integer stride values, <n> symbolic constants representing array types,
+    <n> integers representing values per element, <n> boolean values 
+    indicating normalization, and <n> integers representing vertex attribute
+    divisors. 
+
+    In the initial state, the boolean values are each false, the memory
+    pointers are each NULL, the strides are each zero, the array types are 
+    each FLOAT, the integers representing values per element are each four,
+    and the divisors are each zero."
+
+Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
+
+    None
+
+Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
+Operations and the Framebuffer)
+
+    None
+
+Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
+
+    None
+
+Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
+Requests)
+
+    In section 6.1.8, add VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE to the list of 
+    pnames accepted by GetVertexAttribfv and GetVertexAttribiv.
+
+Additions to the AGL/EGL/GLX/WGL Specifications
+
+    None
+
+Dependencies on OES_element_index_uint
+
+    If OES_element_index_uint is not supported, removed all references
+    to UNSIGNED_INT indices and the associated GL data type uint in 
+    the description of DrawElementsOneInstance.
+
+Errors
+
+    INVALID_VALUE is generated by VertexAttribDivisorANGLE if <index>
+    is greater than or equal to MAX_VERTEX_ATTRIBS.
+
+    INVALID_ENUM is generated by DrawElementsInstancedANGLE if <type> is
+    not one of UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT.
+
+    INVALID_VALUE is generated by DrawArraysInstancedANGLE if <first>,
+    <count>, or <primcount> is less than zero.
+
+    INVALID_ENUM is generated by DrawArraysInstancedANGLE or 
+    DrawElementsInstancedANGLE if <mode> is not one of the modes described in
+    section 2.6.1.
+
+    INVALID_VALUE is generated by DrawElementsInstancedANGLE if <count> or
+    <primcount> is less than zero.
+
+    INVALID_OPERATION is generated by DrawArraysInstancedANGLE or 
+    DrawElementsInstancedANGLE if there is not at least one enabled
+    vertex attribute array that has a <divisor> of zero and is bound to an
+    active generic attribute value in the program used for the draw command.
+
+New State
+
+    Changes to table 6.7, p. 268 (Vertex Array Data)
+
+                                                               Initial
+    Get Value                          Type   Get Command      Value    Description       Sec.  
+    ---------                          -----  -----------      -------  -----------       ----
+    VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE  8*xZ+  GetVertexAttrib  0        Instance Divisor  2.8
+
+Issues
+
+    1) Should vertex attribute zero be instance-able?
+
+       Resolved: Yes. 
+       Discussion: In Direct3D 9 stream 0 must be specified as indexed data
+       and it cannot be instanced. In ANGLE we can work around this by
+       remapping any other stream that does have indexed data (ie a zero
+       attribute divisor) to stream 0 in D3D9. This works because the HLSL
+       vertex shader matches attributes against the stream by using the 
+       shader semantic index.
+
+    2) Can all vertex attributes be instanced simultaneously?
+
+       Resolved: No
+       Discussion: In rare cases it is possible for no attribute to have a 
+       divisor of 0, meaning that all attributes are instanced and none of
+       them are regularly indexed. This in turn means each instance can only
+       have a single position element, and so it only actually renders
+       something when rendering point primitives. This is not a very 
+       meaningful way of using instancing (which is likely why D3D restricts
+       stream 0 to be indexed regularly for position data in the first place).
+       We could implement it by drawing these points one at a time (essentially
+       emulating instancing), but it would not be very efficient and there
+       seems to be little-to-no value in doing so.
+
+       If all of the enabled vertex attribute arrays that are bound to active
+       generic attributes in the program have a non-zero divisor, the draw
+       call should return INVALID_OPERATION.
+
+    3) Direct3D 9 only supports instancing for DrawIndexedPrimitive which
+       corresponds to DrawElementsInstanced.  Should we support 
+       DrawArraysInstanced?
+
+       Resolved: Yes
+       Discussion: This can be supported easily enough by simply manufacturing
+       a linear index buffer of sufficient size and using that to do indexed
+       D3D9 drawing.
+
+    4) How much data is needed in a buffer for an instanced attribute?
+
+       Resolved: Where stride is the value passed to VertexAttribPointer:
+
+       if stride > 0
+         size = stride * ceil(primcount / divisor);
+       else
+         size = elementsize * ceil(primcount / divisor);
+
+Revision History
+
+    #3 February 8, 2012 dgkoch
+       - clarify Issue 3 and the error condition for no indexed attributes
+    #2 January 24, 2012 dgkoch
+       - fix typos, add clarifications, and more errors
+    #1 January 17, 2012 dgkoch
+       - initial GLES2 version from ARB_instanced_arrays
--- a/gfx/angle/extensions/ANGLE_pack_reverse_row_order.txt
+++ b/gfx/angle/extensions/ANGLE_pack_reverse_row_order.txt
@@ -13,26 +13,26 @@ Contact
 
 Contributors
 
     Brian Salomon
     Daniel Koch
 
 Status
 
-    XXX - Not complete yet!!!
+    Implemented in ANGLE ES2
 
 Version
 
-    Last Modified Date: November 22, 2011
-    Author Revision: 1
+    Last Modified Date: February 22, 2011
+    Author Revision: 22
 
 Number
 
-    XXX not yet
+    TBD
 
 Dependencies
 
     OpenGL 1.5 or OpenGL ES 1.0 are required.
 
     Some of the functionality of this extension is not supported
     when implemented against OpenGL ES.
 
@@ -54,19 +54,16 @@ Overview
     buffer before calling ReadPixels or perform a flip in software after
     ReadPixels. In some systems the GL can perform the row reversal during
     ReadPixels without incurring additional cost.
 
 IP Status
 
     No known IP claims.
 
-Issues
-
-
 New Procedures and Functions
 
     None
 
 New Types
 
     None
 
@@ -103,16 +100,18 @@ Additions to Chapter 3 of the OpenGL 3.2
         three elements are written. Otherwise all the elements of each group are
         written. When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of the rows
         of elements is reversed before the data is packed. That is, the element
         corresponding to pixel (x, y + height - 1) becomes the first element
         packed, followed by (x + 1, y + height - 1), etc. Otherwise, pixel data
         is packed in the same manner as when PACK_REVERSE_ROW_ORDER_ANGLE is
         FALSE.
 
+Additions to Chapter 6 of the OpenGL 3.2 Specification (State and State Requests)
+
     In Section 6.1.4 add the following sentence to the fifth paragraph
     (beginning with "For three-dimensional and two-dimensional array
     textures..."):
         When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of rows within
         each image are reversed without reordering the images themselves.
 
 Dependencies on OpenGL ES
 
@@ -137,28 +136,34 @@ New State
     Get Value                       Type  Get Command      Value    Description                    Sec.
     ---------                       ----  -----------      -------  -----------                    ----
     PACK_REVERSE_ROW_ORDER_ANGLE    B     GetIntegerv      FALSE    Pixel pack row order reversal  4.3.1
 
 New Implementation Dependent State
 
     None
 
+Issues
+
+    None
+
 Sample Code
 
     /* Allocate space to hold the pixel data */
     const GLvoid* pixels = malloc(width * height * 4);
 
     /* Bind the framebuffer object to be read */
-    glBindFramebuffer(READ_FRAMEBUFFER, framebuffer);
+    glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer);
 
     /* Enable row order reversal */
-    glPixelStore(PACK_REVERSE_ROW_ORDER_ANGLE, TRUE);
+    glPixelStore(GL_PACK_REVERSE_ROW_ORDER_ANGLE, TRUE);
 
     /* The pixel data stored in pixels will be in top-down order, ready for
      * use with a windowing system API that expects this order.
      */
-    glReadPixels(x, y, width, height, RGBA, UNSIGNED_BYTE, pixels);
+    glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
 
 Revision History
 
     Revision 1, 2011/11/22 (Brian Salomon)
       - First version
+    Revision 2, 2012/02/22 (dgkoch)
+      - prepare for publishing
--- a/gfx/angle/include/GLES2/gl2ext.h
+++ b/gfx/angle/include/GLES2/gl2ext.h
@@ -228,16 +228,21 @@ typedef void* GLeglImageOES;
 #endif
 
 /* GL_ANGLE_texture_usage */
 #ifndef GL_ANGLE_texture_usage
 #define GL_TEXTURE_USAGE_ANGLE                                  0x93A2
 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3
 #endif
 
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE
+#endif
+
 /*------------------------------------------------------------------------*
  * APPLE extension tokens
  *------------------------------------------------------------------------*/
 
 /* GL_APPLE_rgb_422 */
 #ifndef GL_APPLE_rgb_422
 #define GL_RGB_422_APPLE                                        0x8A1F
 #define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA
@@ -946,16 +951,29 @@ GL_APICALL void GL_APIENTRY glGetTransla
 typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
 #endif
 
 /* GL_ANGLE_texture_usage */
 #ifndef GL_ANGLE_texture_usage
 #define GL_ANGLE_texture_usage 1
 #endif
 
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_ANGLE_instanced_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
 /*------------------------------------------------------------------------*
  * APPLE extension functions
  *------------------------------------------------------------------------*/
 
 /* GL_APPLE_rgb_422 */
 #ifndef GL_APPLE_rgb_422
 #define GL_APPLE_rgb_422 1
 #endif
--- a/gfx/angle/samples/build_samples.gyp
+++ b/gfx/angle/samples/build_samples.gyp
@@ -12,42 +12,42 @@
       ],
       'include_dirs': [
         '../include',
       ],
       'sources': [
         'translator/translator.cpp',
       ],
     },
-    {
-      'target_name': 'essl_to_hlsl',
-      'type': 'executable',
-      'dependencies': [
-        '../src/build_angle.gyp:translator_hlsl',
-      ],
-      'include_dirs': [
-        '../include',
-        '../src',
-      ],
-      'sources': [
-        'translator/translator.cpp',
-        '../src/common/debug.cpp',
-      ],
-      'msvs_settings': {
-        'VCLinkerTool': {
-          'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
-          'AdditionalDependencies': ['d3d9.lib'],
-        }
-      }
-    },
   ],
   'conditions': [
     ['OS=="win"', {
       'targets': [
         {
+          'target_name': 'essl_to_hlsl',
+          'type': 'executable',
+          'dependencies': [
+            '../src/build_angle.gyp:translator_hlsl',
+          ],
+          'include_dirs': [
+            '../include',
+            '../src',
+          ],
+          'sources': [
+            'translator/translator.cpp',
+            '../src/common/debug.cpp',
+          ],
+          'msvs_settings': {
+            'VCLinkerTool': {
+              'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
+              'AdditionalDependencies': ['d3d9.lib'],
+            }
+          }
+        },
+        {
           'target_name': 'es_util',
           'type': 'static_library',
           'dependencies': [
             '../src/build_angle.gyp:libEGL',
             '../src/build_angle.gyp:libGLESv2',
           ],
           'include_dirs': [
             'gles2_book/Common',
--- a/gfx/angle/samples/gles2_book/Common/esTransform.c
+++ b/gfx/angle/samples/gles2_book/Common/esTransform.c
@@ -166,17 +166,17 @@ esOrtho(ESMatrix *result, float left, fl
 
     esMatrixMultiply(result, &ortho, result);
 }
 
 
 void ESUTIL_API
 esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
 {
-    ESMatrix    tmp;
+    ESMatrix    tmp = { 0.0f };
     int         i;
 
 	for (i=0; i<4; i++)
 	{
 		tmp.m[i][0] =	(srcA->m[i][0] * srcB->m[0][0]) +
 						(srcA->m[i][1] * srcB->m[1][0]) +
 						(srcA->m[i][2] * srcB->m[2][0]) +
 						(srcA->m[i][3] * srcB->m[3][0]) ;
--- a/gfx/angle/samples/gles2_book/Common/esUtil.c
+++ b/gfx/angle/samples/gles2_book/Common/esUtil.c
@@ -21,16 +21,19 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <GLES2/gl2.h>
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 #include "esUtil.h"
 #include "esUtil_win.h"
 
+#if defined(_MSC_VER)
+#pragma warning(disable: 4204) // nonstandard extension used : non-constant aggregate initializer
+#endif
 
 ///
 //  Extensions
 //
 
 PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
 PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
 
--- a/gfx/angle/samples/gles2_book/MipMap2D/MipMap2D.c
+++ b/gfx/angle/samples/gles2_book/MipMap2D/MipMap2D.c
@@ -146,17 +146,17 @@ GLuint CreateMipMappedTexture2D( )
 {
    // Texture object handle
    GLuint textureId;
    int    width = 256,
           height = 256;
    int    level;
    GLubyte *pixels;
    GLubyte *prevImage;
-   GLubyte *newImage;
+   GLubyte *newImage = NULL;
       
    pixels = GenCheckImage( width, height, 8 );
    if ( pixels == NULL )
       return 0;
 
    // Generate a texture object
    glGenTextures ( 1, &textureId );
 
--- a/gfx/angle/samples/translator/translator.cpp
+++ b/gfx/angle/samples/translator/translator.cpp
@@ -214,17 +214,18 @@ ShShaderType FindShaderType(const char* 
 {
     assert(fileName);
 
     const char* ext = strrchr(fileName, '.');
 
     if (ext && strcmp(ext, ".sl") == 0)
         for (; ext > fileName && ext[0] != '.'; ext--);
 
-    if (ext = strrchr(fileName, '.')) {
+    ext = strrchr(fileName, '.');
+    if (ext) {
         if (strncmp(ext, ".frag", 4) == 0) return SH_FRAGMENT_SHADER;
         if (strncmp(ext, ".vert", 4) == 0) return SH_VERTEX_SHADER;
     }
 
     return SH_FRAGMENT_SHADER;
 }
 
 //
--- a/gfx/angle/src/build_angle.gyp
+++ b/gfx/angle/src/build_angle.gyp
@@ -1,26 +1,41 @@
 # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 {
-  'variables': {
-    'chromium_code': 1,
-  },
   'target_defaults': {
     'defines': [
       'ANGLE_DISABLE_TRACE',
       'ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0',
     ],
   },
   'targets': [
     {
+      'target_name': 'preprocessor',
+      'type': 'static_library',
+      'include_dirs': [
+      ],
+      'sources': [
+        'compiler/preprocessor/new/Input.cpp',
+        'compiler/preprocessor/new/Input.h',
+        'compiler/preprocessor/new/Lexer.cpp',
+        'compiler/preprocessor/new/Lexer.h',
+        'compiler/preprocessor/new/pp_lex.cpp',
+        'compiler/preprocessor/new/Preprocessor.cpp',
+        'compiler/preprocessor/new/Preprocessor.h',
+        'compiler/preprocessor/new/Token.cpp',
+        'compiler/preprocessor/new/Token.h',
+      ],
+    },
+    {
       'target_name': 'translator_common',
       'type': 'static_library',
+      'dependencies': ['preprocessor'],
       'include_dirs': [
         '.',
         '../include',
       ],
       'defines': [
         'COMPILER_IMPLEMENTATION',
       ],
       'sources': [
@@ -71,23 +86,26 @@
         'compiler/SymbolTable.h',
         'compiler/Types.h',
         'compiler/util.cpp',
         'compiler/util.h',
         'compiler/ValidateLimitations.cpp',
         'compiler/ValidateLimitations.h',
         'compiler/VariableInfo.cpp',
         'compiler/VariableInfo.h',
+        # Old preprocessor
         'compiler/preprocessor/atom.c',
         'compiler/preprocessor/atom.h',
         'compiler/preprocessor/compile.h',
         'compiler/preprocessor/cpp.c',
         'compiler/preprocessor/cpp.h',
         'compiler/preprocessor/cppstruct.c',
         'compiler/preprocessor/length_limits.h',
+        'compiler/preprocessor/lexer_glue.cpp',
+        'compiler/preprocessor/lexer_glue.h',
         'compiler/preprocessor/memory.c',
         'compiler/preprocessor/memory.h',
         'compiler/preprocessor/parser.h',
         'compiler/preprocessor/preprocess.h',
         'compiler/preprocessor/scanner.c',
         'compiler/preprocessor/scanner.h',
         'compiler/preprocessor/slglobals.h',
         'compiler/preprocessor/symbols.c',
@@ -126,45 +144,45 @@
         'compiler/TranslatorESSL.cpp',
         'compiler/TranslatorESSL.h',
         'compiler/TranslatorGLSL.cpp',
         'compiler/TranslatorGLSL.h',
         'compiler/VersionGLSL.cpp',
         'compiler/VersionGLSL.h',
       ],
     },
-    {
-      'target_name': 'translator_hlsl',
-      'type': '<(component)',
-      'dependencies': ['translator_common'],
-      'include_dirs': [
-        '.',
-        '../include',
-      ],
-      'defines': [
-        'COMPILER_IMPLEMENTATION',
-      ],
-      'sources': [
-        'compiler/ShaderLang.cpp',
-        'compiler/CodeGenHLSL.cpp',
-        'compiler/OutputHLSL.cpp',
-        'compiler/OutputHLSL.h',
-        'compiler/TranslatorHLSL.cpp',
-        'compiler/TranslatorHLSL.h',
-        'compiler/UnfoldSelect.cpp',
-        'compiler/UnfoldSelect.h',
-        'compiler/SearchSymbol.cpp',
-        'compiler/SearchSymbol.h',
-      ],
-    },
   ],
   'conditions': [
     ['OS=="win"', {
       'targets': [
         {
+          'target_name': 'translator_hlsl',
+          'type': '<(component)',
+          'dependencies': ['translator_common'],
+          'include_dirs': [
+            '.',
+            '../include',
+          ],
+          'defines': [
+            'COMPILER_IMPLEMENTATION',
+          ],
+          'sources': [
+            'compiler/ShaderLang.cpp',
+            'compiler/CodeGenHLSL.cpp',
+            'compiler/OutputHLSL.cpp',
+            'compiler/OutputHLSL.h',
+            'compiler/TranslatorHLSL.cpp',
+            'compiler/TranslatorHLSL.h',
+            'compiler/UnfoldSelect.cpp',
+            'compiler/UnfoldSelect.h',
+            'compiler/SearchSymbol.cpp',
+            'compiler/SearchSymbol.h',
+          ],
+        },
+        {
           'target_name': 'libGLESv2',
           'type': 'shared_library',
           'dependencies': ['translator_hlsl'],
           'include_dirs': [
             '.',
             '../include',
             '$(DXSDK_DIR)/include',
           ],
--- a/gfx/angle/src/common/version.h
+++ b/gfx/angle/src/common/version.h
@@ -1,10 +1,10 @@
 #define MAJOR_VERSION 1
 #define MINOR_VERSION 0
 #define BUILD_VERSION 0
-#define BUILD_REVISION 963
+#define BUILD_REVISION 1041
 
 #define STRINGIFY(x) #x
 #define MACRO_STRINGIFY(x) STRINGIFY(x)
 
 #define REVISION_STRING MACRO_STRINGIFY(BUILD_REVISION)
 #define VERSION_STRING MACRO_STRINGIFY(MAJOR_VERSION) "." MACRO_STRINGIFY(MINOR_VERSION) "." MACRO_STRINGIFY(BUILD_VERSION) "." MACRO_STRINGIFY(BUILD_REVISION)
--- a/gfx/angle/src/compiler/BaseTypes.h
+++ b/gfx/angle/src/compiler/BaseTypes.h
@@ -42,16 +42,17 @@ enum TBasicType
     EbtGuardSamplerBegin,  // non type:  see implementation of IsSampler()
     EbtSampler2D,
     EbtSamplerCube,
     EbtSamplerExternalOES,  // Only valid if OES_EGL_image_external exists.
     EbtSampler2DRect,       // Only valid if GL_ARB_texture_rectangle exists.
     EbtGuardSamplerEnd,    // non type:  see implementation of IsSampler()
     EbtStruct,
     EbtAddress,            // should be deprecated??
+    EbtInvariant,          // used as a type when qualifying a previously declared variable as being invariant
 };
 
 inline const char* getBasicString(TBasicType t)
 {
     switch (t)
     {
     case EbtVoid:              return "void";              break;
     case EbtFloat:             return "float";             break;
--- a/gfx/angle/src/compiler/BuiltInFunctionEmulator.cpp
+++ b/gfx/angle/src/compiler/BuiltInFunctionEmulator.cpp
@@ -11,21 +11,16 @@
 namespace {
 
 // we use macros here instead of function definitions to work around more GLSL
 // compiler bugs, in particular on NVIDIA hardware on Mac OSX. Macros are
 // problematic because if the argument has side-effects they will be repeatedly
 // evaluated. This is unlikely to show up in real shaders, but is something to
 // consider.
 const char* kFunctionEmulationVertexSource[] = {
-    "#error no emulation for atan(float, float)",
-    "vec2 webgl_atan_emu(vec2 y, vec2 x) { return vec2(atan(y[0], x[0]), atan(y[1], x[1])); }",
-    "vec3 webgl_atan_emu(vec3 y, vec3 x) { return vec3(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2])); }",
-    "vec4 webgl_atan_emu(vec4 y, vec4 x) { return vec4(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2]), atan(y[3], x[3])); }",
-
     "#error no emulation for cos(float)",
     "#error no emulation for cos(vec2)",
     "#error no emulation for cos(vec3)",
     "#error no emulation for cos(vec4)",
 
     "#define webgl_distance_emu(x, y) ((x) >= (y) ? (x) - (y) : (y) - (x))",
     "#error no emulation for distance(vec2, vec2)",
     "#error no emulation for distance(vec3, vec3)",
@@ -36,188 +31,170 @@ const char* kFunctionEmulationVertexSour
     "#error no emulation for dot(vec3, vec3)",
     "#error no emulation for dot(vec4, vec4)",
 
     "#define webgl_length_emu(x) ((x) >= 0.0 ? (x) : -(x))",
     "#error no emulation for length(vec2)",
     "#error no emulation for length(vec3)",
     "#error no emulation for length(vec4)",
 
-    "#error no emulation for mod(float, float)",
-    "vec2 webgl_mod_emu(vec2 x, vec2 y) { return vec2(mod(x[0], y[0]), mod(x[1], y[1])); }",
-    "vec3 webgl_mod_emu(vec3 x, vec3 y) { return vec3(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2])); }",
-    "vec4 webgl_mod_emu(vec4 x, vec4 y) { return vec4(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2]), mod(x[3], y[3])); }",
-
     "#define webgl_normalize_emu(x) ((x) == 0.0 ? 0.0 : ((x) > 0.0 ? 1.0 : -1.0))",
     "#error no emulation for normalize(vec2)",
     "#error no emulation for normalize(vec3)",
     "#error no emulation for normalize(vec4)",
 
     "#define webgl_reflect_emu(I, N) ((I) - 2.0 * (N) * (I) * (N))",
     "#error no emulation for reflect(vec2, vec2)",
     "#error no emulation for reflect(vec3, vec3)",
     "#error no emulation for reflect(vec4, vec4)"
 };
 
 const char* kFunctionEmulationFragmentSource[] = {
-    "#error no emulation for atan(float, float)",
-    "#error no emulation for atan(vec2, vec2)",
-    "#error no emulation for atan(vec3, vec3)",
-    "#error no emulation for atan(vec4, vec4)",
-
     "webgl_emu_precision float webgl_cos_emu(webgl_emu_precision float a) { return cos(a); }",
     "webgl_emu_precision vec2 webgl_cos_emu(webgl_emu_precision vec2 a) { return cos(a); }",
     "webgl_emu_precision vec3 webgl_cos_emu(webgl_emu_precision vec3 a) { return cos(a); }",
     "webgl_emu_precision vec4 webgl_cos_emu(webgl_emu_precision vec4 a) { return cos(a); }",
 
-    "#error no emulation for distance(float, float)",
+    "#define webgl_distance_emu(x, y) ((x) >= (y) ? (x) - (y) : (y) - (x))",
     "#error no emulation for distance(vec2, vec2)",
     "#error no emulation for distance(vec3, vec3)",
     "#error no emulation for distance(vec4, vec4)",
 
-    "#error no emulation for dot(float, float)",
+    "#define webgl_dot_emu(x, y) ((x) * (y))",
     "#error no emulation for dot(vec2, vec2)",
     "#error no emulation for dot(vec3, vec3)",
     "#error no emulation for dot(vec4, vec4)",
 
-    "#error no emulation for length(float)",
+    "#define webgl_length_emu(x) ((x) >= 0.0 ? (x) : -(x))",
     "#error no emulation for length(vec2)",
     "#error no emulation for length(vec3)",
     "#error no emulation for length(vec4)",
 
-    "#error no emulation for mod(float, float)",
-    "#error no emulation for mod(vec2, vec2)",
-    "#error no emulation for mod(vec3, vec3)",
-    "#error no emulation for mod(vec4, vec4)",
-
-    "#error no emulation for normalize(float)",
+    "#define webgl_normalize_emu(x) ((x) == 0.0 ? 0.0 : ((x) > 0.0 ? 1.0 : -1.0))",
     "#error no emulation for normalize(vec2)",
     "#error no emulation for normalize(vec3)",
     "#error no emulation for normalize(vec4)",
 
-    "#error no emulation for reflect(float, float)",
+    "#define webgl_reflect_emu(I, N) ((I) - 2.0 * (N) * (I) * (N))",
     "#error no emulation for reflect(vec2, vec2)",
     "#error no emulation for reflect(vec3, vec3)",
     "#error no emulation for reflect(vec4, vec4)"
 };
 
 const bool kFunctionEmulationVertexMask[] = {
 #if defined(__APPLE__)
     // Work around ATI driver bugs in Mac.
-    false, // TFunctionAtan1_1
-    false, // TFunctionAtan2_2
-    false, // TFunctionAtan3_3
-    false, // TFunctionAtan4_4
     false, // TFunctionCos1
     false, // TFunctionCos2
     false, // TFunctionCos3
     false, // TFunctionCos4
     true,  // TFunctionDistance1_1
     false, // TFunctionDistance2_2
     false, // TFunctionDistance3_3
     false, // TFunctionDistance4_4
     true,  // TFunctionDot1_1
     false, // TFunctionDot2_2
     false, // TFunctionDot3_3
     false, // TFunctionDot4_4
     true,  // TFunctionLength1
     false, // TFunctionLength2
     false, // TFunctionLength3
     false, // TFunctionLength4
-    false, // TFunctionMod1_1
-    false, // TFunctionMod2_2
-    false, // TFunctionMod3_3
-    false, // TFunctionMod4_4
     true,  // TFunctionNormalize1
     false, // TFunctionNormalize2
     false, // TFunctionNormalize3
     false, // TFunctionNormalize4
     true,  // TFunctionReflect1_1
     false, // TFunctionReflect2_2
     false, // TFunctionReflect3_3
     false, // TFunctionReflect4_4
 #else
     // Work around D3D driver bug in Win.
-    false, // TFunctionAtan1_1
-    true,  // TFunctionAtan2_2
-    true,  // TFunctionAtan3_3
-    true,  // TFunctionAtan4_4
     false, // TFunctionCos1
     false, // TFunctionCos2
     false, // TFunctionCos3
     false, // TFunctionCos4
     false, // TFunctionDistance1_1
     false, // TFunctionDistance2_2
     false, // TFunctionDistance3_3
     false, // TFunctionDistance4_4
     false, // TFunctionDot1_1
     false, // TFunctionDot2_2
     false, // TFunctionDot3_3
     false, // TFunctionDot4_4
     false, // TFunctionLength1
     false, // TFunctionLength2
     false, // TFunctionLength3
     false, // TFunctionLength4
-    false, // TFunctionMod1_1
-    true,  // TFunctionMod2_2
-    true,  // TFunctionMod3_3
-    true,  // TFunctionMod4_4
     false, // TFunctionNormalize1
     false, // TFunctionNormalize2
     false, // TFunctionNormalize3
     false, // TFunctionNormalize4
     false, // TFunctionReflect1_1
     false, // TFunctionReflect2_2
     false, // TFunctionReflect3_3
     false, // TFunctionReflect4_4
 #endif
     false  // TFunctionUnknown
 };
 
 const bool kFunctionEmulationFragmentMask[] = {
-    false, // TFunctionAtan1_1
-    false, // TFunctionAtan2_2
-    false, // TFunctionAtan3_3
-    false, // TFunctionAtan4_4
 #if defined(__APPLE__)
-    // Work around a ATI driver bug in Mac that causes crashes.
+    // Work around ATI driver bugs in Mac.
     true,  // TFunctionCos1
     true,  // TFunctionCos2
     true,  // TFunctionCos3
     true,  // TFunctionCos4
+    true,  // TFunctionDistance1_1
+    false, // TFunctionDistance2_2
+    false, // TFunctionDistance3_3
+    false, // TFunctionDistance4_4
+    true,  // TFunctionDot1_1
+    false, // TFunctionDot2_2
+    false, // TFunctionDot3_3
+    false, // TFunctionDot4_4
+    true,  // TFunctionLength1
+    false, // TFunctionLength2
+    false, // TFunctionLength3
+    false, // TFunctionLength4
+    true,  // TFunctionNormalize1
+    false, // TFunctionNormalize2
+    false, // TFunctionNormalize3
+    false, // TFunctionNormalize4
+    true,  // TFunctionReflect1_1
+    false, // TFunctionReflect2_2
+    false, // TFunctionReflect3_3
+    false, // TFunctionReflect4_4
 #else
+    // Work around D3D driver bug in Win.
     false, // TFunctionCos1
     false, // TFunctionCos2
     false, // TFunctionCos3
     false, // TFunctionCos4
-#endif
     false, // TFunctionDistance1_1
     false, // TFunctionDistance2_2
     false, // TFunctionDistance3_3
     false, // TFunctionDistance4_4
     false, // TFunctionDot1_1
     false, // TFunctionDot2_2
     false, // TFunctionDot3_3
     false, // TFunctionDot4_4
     false, // TFunctionLength1
     false, // TFunctionLength2
     false, // TFunctionLength3
     false, // TFunctionLength4
-    false, // TFunctionMod1_1
-    false, // TFunctionMod2_2
-    false, // TFunctionMod3_3
-    false, // TFunctionMod4_4
     false, // TFunctionNormalize1
     false, // TFunctionNormalize2
     false, // TFunctionNormalize3
     false, // TFunctionNormalize4
     false, // TFunctionReflect1_1
     false, // TFunctionReflect2_2
     false, // TFunctionReflect3_3
     false, // TFunctionReflect4_4
+#endif
     false  // TFunctionUnknown
 };
 
 class BuiltInFunctionEmulationMarker : public TIntermTraverser {
 public:
     BuiltInFunctionEmulationMarker(BuiltInFunctionEmulator& emulator)
         : mEmulator(emulator)
     {
@@ -381,28 +358,22 @@ BuiltInFunctionEmulator::IdentifyFunctio
     // parameters have the same type.
     if (param1.isVector() != param2.isVector() ||
         param1.getNominalSize() != param2.getNominalSize() ||
         param1.getNominalSize() > 4)
         return TFunctionUnknown;
 
     unsigned int function = TFunctionUnknown;
     switch (op) {
-        case EOpAtan:
-            function = TFunctionAtan1_1;
-            break;
         case EOpDistance:
             function = TFunctionDistance1_1;
             break;
         case EOpDot:
             function = TFunctionDot1_1;
             break;
-        case EOpMod:
-            function = TFunctionMod1_1;
-            break;
         case EOpReflect:
             function = TFunctionReflect1_1;
             break;
         default:
             break;
     }
     if (function == TFunctionUnknown)
         return TFunctionUnknown;
--- a/gfx/angle/src/compiler/BuiltInFunctionEmulator.h
+++ b/gfx/angle/src/compiler/BuiltInFunctionEmulator.h
@@ -40,22 +40,17 @@ public:
     // "name(" becomes "webgl_name_emu(".
     static TString GetEmulatedFunctionName(const TString& name);
 
 private:
     //
     // Built-in functions.
     //
     enum TBuiltInFunction {
-        TFunctionAtan1_1 = 0,  // float atan(float, float);
-        TFunctionAtan2_2,  // vec2 atan(vec2, vec2);
-        TFunctionAtan3_3,  // vec3 atan(vec3, vec2);
-        TFunctionAtan4_4,  // vec4 atan(vec4, vec2);
-
-        TFunctionCos1,  // float cos(float);
+        TFunctionCos1 = 0,  // float cos(float);
         TFunctionCos2,  // vec2 cos(vec2);
         TFunctionCos3,  // vec3 cos(vec3);
         TFunctionCos4,  // vec4 cos(vec4);
 
         TFunctionDistance1_1,  // float distance(float, float);
         TFunctionDistance2_2,  // vec2 distance(vec2, vec2);
         TFunctionDistance3_3,  // vec3 distance(vec3, vec3);
         TFunctionDistance4_4,  // vec4 distance(vec4, vec4);
@@ -65,21 +60,16 @@ private:
         TFunctionDot3_3,  // vec3 dot(vec3, vec3);
         TFunctionDot4_4,  // vec4 dot(vec4, vec4);
 
         TFunctionLength1,  // float length(float);
         TFunctionLength2,  // float length(vec2);
         TFunctionLength3,  // float length(vec3);
         TFunctionLength4,  // float length(vec4);
 
-        TFunctionMod1_1,  // float mod(float, float);
-        TFunctionMod2_2,  // vec2 mod(vec2, vec2);
-        TFunctionMod3_3,  // vec3 mod(vec3, vec3);
-        TFunctionMod4_4,  // vec4 mod(vec4, vec4);
-
         TFunctionNormalize1,  // float normalize(float);
         TFunctionNormalize2,  // vec2 normalize(vec2);
         TFunctionNormalize3,  // vec3 normalize(vec3);
         TFunctionNormalize4,  // vec4 normalize(vec4);
 
         TFunctionReflect1_1,  // float reflect(float, float);
         TFunctionReflect2_2,  // vec2 reflect(vec2, vec2);
         TFunctionReflect3_3,  // vec3 reflect(vec3, vec3);
--- a/gfx/angle/src/compiler/ConstantUnion.h
+++ b/gfx/angle/src/compiler/ConstantUnion.h
@@ -6,16 +6,20 @@
 
 #ifndef _CONSTANT_UNION_INCLUDED_
 #define _CONSTANT_UNION_INCLUDED_
 
 #include <assert.h>
 
 class ConstantUnion {
 public:
+    ConstantUnion()
+    {
+        iConst = 0;
+    }
 
     POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)        
     void setIConst(int i) {iConst = i; type = EbtInt; }
     void setFConst(float f) {fConst = f; type = EbtFloat; }
     void setBConst(bool b) {bConst = b; type = EbtBool; }
 
     int getIConst() { return iConst; }
     float getFConst() { return fConst; }
@@ -49,18 +53,16 @@ public:
             return constant.iConst == iConst;
         case EbtFloat:
             return constant.fConst == fConst;
         case EbtBool:
             return constant.bConst == bConst;
         default:
             return false;
         }
-
-        return false;
     }
 
     bool operator!=(const int i) const
     {
         return !operator==(i);
     }
 
     bool operator!=(const float f) const
@@ -84,33 +86,29 @@ public:
         switch (type) {
         case EbtInt:
             return iConst > constant.iConst;
         case EbtFloat:
             return fConst > constant.fConst;
         default:
             return false;   // Invalid operation, handled at semantic analysis
         }
-
-        return false;
     }
 
     bool operator<(const ConstantUnion& constant) const
     { 
         assert(type == constant.type);
         switch (type) {
         case EbtInt:
             return iConst < constant.iConst;
         case EbtFloat:
             return fConst < constant.fConst;
         default:
             return false;   // Invalid operation, handled at semantic analysis
         }
-
-        return false;
     }
 
     ConstantUnion operator+(const ConstantUnion& constant) const
     { 
         ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
--- a/gfx/angle/src/compiler/Intermediate.cpp
+++ b/gfx/angle/src/compiler/Intermediate.cpp
@@ -1,10 +1,10 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 //
 // Build the intermediate representation.
 //
 
@@ -368,17 +368,17 @@ TIntermTyped* TIntermediate::addUnaryMat
 //
 // This is the safe way to change the operator on an aggregate, as it
 // does lots of error checking and fixing.  Especially for establishing
 // a function call's operation on it's set of parameters.  Sequences
 // of instructions are also aggregates, but they just direnctly set
 // their operator to EOpSequence.
 //
 // Returns an aggregate node, which could be the one passed in if
-// it was already an aggregate.
+// it was already an aggregate but no operator was set.
 //
 TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, TSourceLoc line)
 {
     TIntermAggregate* aggNode;
 
     //
     // Make sure we have an aggregate.  If not turn it into one.
     //
@@ -587,20 +587,20 @@ TIntermAggregate* TIntermediate::makeAgg
 TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, TSourceLoc line)
 {
     //
     // For compile time constant selections, prune the code and
     // test now.
     //
 
     if (cond->getAsTyped() && cond->getAsTyped()->getAsConstantUnion()) {
-        if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getBConst())
-            return nodePair.node1;
+        if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getBConst() == true)
+            return nodePair.node1 ? setAggregateOperator(nodePair.node1, EOpSequence, nodePair.node1->getLine()) : NULL;
         else
-            return nodePair.node2;
+            return nodePair.node2 ? setAggregateOperator(nodePair.node2, EOpSequence, nodePair.node2->getLine()) : NULL;
     }
 
     TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2);
     node->setLine(line);
 
     return node;
 }
 
@@ -651,16 +651,17 @@ TIntermTyped* TIntermediate::addSelectio
         else
             return falseBlock;
     }
 
     //
     // Make a selection node.
     //
     TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType());
+    node->getTypePointer()->setQualifier(EvqTemporary);
     node->setLine(line);
 
     return node;
 }
 
 //
 // Constant terminal nodes.  Has a union that contains bool, float or int constants
 //
@@ -1366,18 +1367,16 @@ TIntermTyped* TIntermConstantUnion::fold
                 default:
                     return 0;
             }
         }
         newNode = new TIntermConstantUnion(tempConstArray, getType());
         newNode->setLine(getLine());
         return newNode;
     }
-
-    return this;
 }
 
 TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node)
 {
     ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
     int size = node->getType().getObjectSize();
 
     ConstantUnion *leftUnionArray = new ConstantUnion[size];
--- a/gfx/angle/src/compiler/OutputHLSL.cpp
+++ b/gfx/angle/src/compiler/OutputHLSL.cpp
@@ -1,10 +1,10 @@
 //
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/OutputHLSL.h"
 
 #include "compiler/compilerdebug.h"
 #include "compiler/InfoSink.h"
@@ -62,17 +62,20 @@ OutputHLSL::OutputHLSL(TParseContext &co
     mUsesEqualVec3 = false;
     mUsesEqualVec4 = false;
     mUsesEqualIVec2 = false;
     mUsesEqualIVec3 = false;
     mUsesEqualIVec4 = false;
     mUsesEqualBVec2 = false;
     mUsesEqualBVec3 = false;
     mUsesEqualBVec4 = false;
-    mUsesAtan2 = false;
+    mUsesAtan2_1 = false;
+    mUsesAtan2_2 = false;
+    mUsesAtan2_3 = false;
+    mUsesAtan2_4 = false;
 
     mScopeDepth = 0;
 
     mUniqueIndex = 0;
 }
 
 OutputHLSL::~OutputHLSL()
 {
@@ -698,24 +701,57 @@ void OutputHLSL::header()
     if (mUsesEqualBVec4)
     {
         out << "bool equal(bool4 v, bool4 u)\n"
                "{\n"
                "    return v.x == u.x && v.y == u.y && v.z == u.z && v.w == u.w;\n"
                "}\n";
     }
 
-    if (mUsesAtan2)
+    if (mUsesAtan2_1)
     {
         out << "float atanyx(float y, float x)\n"
                "{\n"
                "    if(x == 0 && y == 0) x = 1;\n"   // Avoid producing a NaN
                "    return atan2(y, x);\n"
                "}\n";
     }
+
+    if (mUsesAtan2_2)
+    {
+        out << "float2 atanyx(float2 y, float2 x)\n"
+               "{\n"
+               "    if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+               "    if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+               "    return float2(atan2(y[0], x[0]), atan2(y[1], x[1]));\n"
+               "}\n";
+    }
+
+    if (mUsesAtan2_3)
+    {
+        out << "float3 atanyx(float3 y, float3 x)\n"
+               "{\n"
+               "    if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+               "    if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+               "    if(x[2] == 0 && y[2] == 0) x[2] = 1;\n"
+               "    return float3(atan2(y[0], x[0]), atan2(y[1], x[1]), atan2(y[2], x[2]));\n"
+               "}\n";
+    }
+
+    if (mUsesAtan2_4)
+    {
+        out << "float4 atanyx(float4 y, float4 x)\n"
+               "{\n"
+               "    if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+               "    if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+               "    if(x[2] == 0 && y[2] == 0) x[2] = 1;\n"
+               "    if(x[3] == 0 && y[3] == 0) x[3] = 1;\n"
+               "    return float4(atan2(y[0], x[0]), atan2(y[1], x[1]), atan2(y[2], x[2]), atan2(y[3], x[3]));\n"
+               "}\n";
+    }
 }
 
 void OutputHLSL::visitSymbol(TIntermSymbol *node)
 {
     TInfoSinkBase &out = mBody;
 
     TString name = node->getSymbol();
 
@@ -856,17 +892,17 @@ bool OutputHLSL::visitBinary(Visit visit
         }
         break;
       case EOpDivAssign:               outputTriplet(visit, "(", " /= ", ")");          break;
       case EOpIndexDirect:             outputTriplet(visit, "", "[", "]");              break;
       case EOpIndexIndirect:           outputTriplet(visit, "", "[", "]");              break;
       case EOpIndexDirectStruct:
         if (visit == InVisit)
         {
-            out << "." + node->getType().getFieldName();
+            out << "." + decorateField(node->getType().getFieldName(), node->getLeft()->getType());
 
             return false;
         }
         break;
       case EOpVectorSwizzle:
         if (visit == InVisit)
         {
             out << ".";
@@ -932,19 +968,19 @@ bool OutputHLSL::visitBinary(Visit visit
 
             const TTypeList *fields = node->getLeft()->getType().getStruct();
 
             for (size_t i = 0; i < fields->size(); i++)
             {
                 const TType *fieldType = (*fields)[i].type;
 
                 node->getLeft()->traverse(this);
-                out << "." + fieldType->getFieldName() + " == ";
+                out << "." + decorateField(fieldType->getFieldName(), node->getLeft()->getType()) + " == ";
                 node->getRight()->traverse(this);
-                out << "." + fieldType->getFieldName();
+                out << "." + decorateField(fieldType->getFieldName(), node->getLeft()->getType());
 
                 if (i < fields->size() - 1)
                 {
                     out << " && ";
                 }
             }
 
             out << ")";
@@ -1027,18 +1063,16 @@ bool OutputHLSL::visitBinary(Visit visit
       default: UNREACHABLE();
     }
 
     return true;
 }
 
 bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
 {
-    TInfoSinkBase &out = mBody;
-
     switch (node->getOp())
     {
       case EOpNegative:         outputTriplet(visit, "(-", "", ")");  break;
       case EOpVectorLogicalNot: outputTriplet(visit, "(!", "", ")");  break;
       case EOpLogicalNot:       outputTriplet(visit, "(!", "", ")");  break;
       case EOpPostIncrement:    outputTriplet(visit, "(", "", "++)"); break;
       case EOpPostDecrement:    outputTriplet(visit, "(", "", "--)"); break;
       case EOpPreIncrement:     outputTriplet(visit, "(++", "", ")"); break;
@@ -1105,17 +1139,16 @@ bool OutputHLSL::visitUnary(Visit visit,
       default: UNREACHABLE();
     }
 
     return true;
 }
 
 bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
 {
-    ShShaderType shaderType = mContext.shaderType;
     TInfoSinkBase &out = mBody;
 
     switch (node->getOp())
     {
       case EOpSequence:
         {
             if (mInsideFunction)
             {
@@ -1247,17 +1280,17 @@ bool OutputHLSL::visitAggregate(Visit vi
                 else UNREACHABLE();
             }
 
             out << ");\n";
 
             return false;
         }
         break;
-      case EOpComma:            outputTriplet(visit, "", ", ", "");                break;
+      case EOpComma:            outputTriplet(visit, "(", ", ", ")");                break;
       case EOpFunction:
         {
             TString name = TFunction::unmangleName(node->getName());
 
             if (visit == PreVisit)
             {
                 out << typeString(node->getType()) << " ";
 
@@ -1274,16 +1307,21 @@ bool OutputHLSL::visitAggregate(Visit vi
                 TIntermSequence &arguments = sequence[0]->getAsAggregate()->getSequence();
 
                 for (unsigned int i = 0; i < arguments.size(); i++)
                 {
                     TIntermSymbol *symbol = arguments[i]->getAsSymbolNode();
 
                     if (symbol)
                     {
+                        if (symbol->getType().getStruct())
+                        {
+                            addConstructor(symbol->getType(), scopedStruct(symbol->getType().getTypeName()), NULL);
+                        }
+
                         out << argumentString(symbol);
 
                         if (i < arguments.size() - 1)
                         {
                             out << ", ";
                         }
                     }
                     else UNREACHABLE();
@@ -1492,17 +1530,24 @@ bool OutputHLSL::visitAggregate(Visit vi
             }
 
             outputTriplet(visit, "mod(", ", ", ")");
         }
         break;
       case EOpPow:              outputTriplet(visit, "pow(", ", ", ")");               break;
       case EOpAtan:
         ASSERT(node->getSequence().size() == 2);   // atan(x) is a unary operator
-        mUsesAtan2 = true;
+        switch (node->getSequence()[0]->getAsTyped()->getNominalSize())
+        {
+          case 1: mUsesAtan2_1 = true; break;
+          case 2: mUsesAtan2_2 = true; break;
+          case 3: mUsesAtan2_3 = true; break;
+          case 4: mUsesAtan2_4 = true; break;
+          default: UNREACHABLE();
+        }
         outputTriplet(visit, "atanyx(", ", ", ")");
         break;
       case EOpMin:           outputTriplet(visit, "min(", ", ", ")");           break;
       case EOpMax:           outputTriplet(visit, "max(", ", ", ")");           break;
       case EOpClamp:         outputTriplet(visit, "clamp(", ", ", ")");         break;
       case EOpMix:           outputTriplet(visit, "lerp(", ", ", ")");          break;
       case EOpStep:          outputTriplet(visit, "step(", ", ", ")");          break;
       case EOpSmoothStep:    outputTriplet(visit, "smoothstep(", ", ", ")");    break;
@@ -1590,24 +1635,24 @@ bool OutputHLSL::visitLoop(Visit visit, 
     {
         return false;
     }
 
     TInfoSinkBase &out = mBody;
 
     if (node->getType() == ELoopDoWhile)
     {
-        out << "do\n";
+        out << "{do\n";
 
         outputLineDirective(node->getLine());
         out << "{\n";
     }
     else
     {
-        out << "for(";
+        out << "{for(";
         
         if (node->getInit())
         {
             node->getInit()->traverse(this);
         }
 
         out << "; ";
 
@@ -1639,20 +1684,20 @@ bool OutputHLSL::visitLoop(Visit visit, 
 
     if (node->getType() == ELoopDoWhile)
     {
         outputLineDirective(node->getCondition()->getLine());
         out << "while(\n";
 
         node->getCondition()->traverse(this);
 
-        out << ")";
+        out << ");";
     }
 
-    out << ";\n";
+    out << "}\n";
 
     return false;
 }
 
 bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node)
 {
     TInfoSinkBase &out = mBody;
 
@@ -1834,17 +1879,16 @@ bool OutputHLSL::handleExcessiveLoop(TIn
 
             if (iterations <= 255)
             {
                 return false;   // Not an excessive loop
             }
 
             while (iterations > 0)
             {
-                int remainder = (limit - initial) % increment;
                 int clampedLimit = initial + increment * std::min(255, iterations);
 
                 // for(int index = initial; index < clampedLimit; index += increment)
 
                 out << "for(int ";
                 index->traverse(this);
                 out << " = ";
                 out << initial;
@@ -1963,17 +2007,17 @@ TString OutputHLSL::typeString(const TTy
 
             TString string = "struct\n"
                              "{\n";
 
             for (unsigned int i = 0; i < fields.size(); i++)
             {
                 const TType &field = *fields[i].type;
 
-                string += "    " + typeString(field) + " " + field.getFieldName() + arrayString(field) + ";\n";
+                string += "    " + typeString(field) + " " + decorate(field.getFieldName()) + arrayString(field) + ";\n";
             }
 
             string += "} ";
 
             return string;
         }
     }
     else if (type.isMatrix())
@@ -2057,16 +2101,21 @@ TString OutputHLSL::initializer(const TT
 
 void OutputHLSL::addConstructor(const TType &type, const TString &name, const TIntermSequence *parameters)
 {
     if (name == "")
     {
         return;   // Nameless structures don't have constructors
     }
 
+    if (type.getStruct() && mStructNames.find(decorate(name)) != mStructNames.end())
+    {
+        return;   // Already added
+    }
+
     TType ctorType = type;
     ctorType.clearArrayness();
     ctorType.setPrecision(EbpHigh);
     ctorType.setQualifier(EvqTemporary);
 
     TString ctorName = type.getStruct() ? decorate(name) : name;
 
     typedef std::vector<TType> ParameterArray;
@@ -2081,17 +2130,17 @@ void OutputHLSL::addConstructor(const TT
                      "{\n";
 
         const TTypeList &fields = *type.getStruct();
 
         for (unsigned int i = 0; i < fields.size(); i++)
         {
             const TType &field = *fields[i].type;
 
-            structure += "    " + typeString(field) + " " + field.getFieldName() + arrayString(field) + ";\n";
+            structure += "    " + typeString(field) + " " + decorateField(field.getFieldName(), type) + arrayString(field) + ";\n";
         }
 
         structure += "};\n";
 
         if (std::find(mStructDeclarations.begin(), mStructDeclarations.end(), structure) == mStructDeclarations.end())
         {
             mStructDeclarations.push_back(structure);
         }
@@ -2380,9 +2429,19 @@ TString OutputHLSL::decorateUniform(cons
     }
     else if (type.getBasicType() == EbtSamplerExternalOES)
     {
         return "ex_" + string;
     }
     
     return decorate(string);
 }
+
+TString OutputHLSL::decorateField(const TString &string, const TType &structure)
+{
+    if (structure.getTypeName().compare(0, 3, "gl_") != 0)
+    {
+        return decorate(string);
+    }
+
+    return string;
 }
+}
--- a/gfx/angle/src/compiler/OutputHLSL.h
+++ b/gfx/angle/src/compiler/OutputHLSL.h
@@ -1,10 +1,10 @@
 //
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_OUTPUTHLSL_H_
 #define COMPILER_OUTPUTHLSL_H_
 
 #include <list>
@@ -28,16 +28,17 @@ class OutputHLSL : public TIntermTravers
     TInfoSinkBase &getBodyStream();
 
     TString typeString(const TType &type);
     static TString qualifierString(TQualifier qualifier);
     static TString arrayString(const TType &type);
     static TString initializer(const TType &type);
     static TString decorate(const TString &string);                      // Prepends an underscore to avoid naming clashes
     static TString decorateUniform(const TString &string, const TType &type);
+    static TString decorateField(const TString &string, const TType &structure);
 
   protected:
     void header();
 
     // Visit AST nodes and output their code to the body stream
     void visitSymbol(TIntermSymbol*);
     void visitConstantUnion(TIntermConstantUnion*);
     bool visitBinary(Visit visit, TIntermBinary*);
@@ -108,17 +109,20 @@ class OutputHLSL : public TIntermTravers
     bool mUsesEqualVec3;
     bool mUsesEqualVec4;
     bool mUsesEqualIVec2;
     bool mUsesEqualIVec3;
     bool mUsesEqualIVec4;
     bool mUsesEqualBVec2;
     bool mUsesEqualBVec3;
     bool mUsesEqualBVec4;
-    bool mUsesAtan2;
+    bool mUsesAtan2_1;
+    bool mUsesAtan2_2;
+    bool mUsesAtan2_3;
+    bool mUsesAtan2_4;
 
     typedef std::set<TString> Constructors;
     Constructors mConstructors;
 
     typedef std::set<TString> StructNames;
     StructNames mStructNames;
 
     typedef std::list<TString> StructDeclarations;
--- a/gfx/angle/src/compiler/ParseHelper.cpp
+++ b/gfx/angle/src/compiler/ParseHelper.cpp
@@ -1,10 +1,10 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/ParseHelper.h"
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -458,20 +458,18 @@ bool TParseContext::reservedErrorCheck(i
                 return true;
             }
             if (identifier.compare(0, 7, "_webgl_") == 0) {
                 error(line, reservedErrMsg, "_webgl_", "");
                 return true;
             }
         }
         if (identifier.find("__") != TString::npos) {
-            //error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
-            //return true;
-            infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
-            return false;
+            error(line, "identifiers containing two consecutive underscores (__) are reserved as possible future keywords", identifier.c_str(), "", "");
+            return true;
         }
     }
 
     return false;
 }
 
 //
 // Make sure there is enough data provided to the constructor to build
@@ -1485,18 +1483,19 @@ int PaParseStrings(int count, const char
     // setup preprocessor.
     if (InitPreprocessor())
         return 1;
     DefineExtensionMacros(context->extensionBehavior);
 
     if (glslang_initialize(context))
         return 1;
 
-    glslang_scan(count, string, length, context);
-    int error = glslang_parse(context);
+    int error = glslang_scan(count, string, length, context);
+    if (!error)
+        error = glslang_parse(context);
 
     glslang_finalize(context);
     FinalizePreprocessor();
     return (error == 0) && (context->numErrors == 0) ? 0 : 1;
 }
 
 OS_TLSIndex GlobalParseContextIndex = OS_INVALID_TLS_INDEX;
 
--- a/gfx/angle/src/compiler/PoolAlloc.cpp
+++ b/gfx/angle/src/compiler/PoolAlloc.cpp
@@ -152,18 +152,23 @@ const unsigned char TAllocation::userDat
 void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const
 {
 #ifdef GUARD_BLOCKS
     for (size_t x = 0; x < guardBlockSize; x++) {
         if (blockMem[x] != val) {
             char assertMsg[80];
 
             // We don't print the assert message.  It's here just to be helpful.
-            sprintf(assertMsg, "PoolAlloc: Damage %s %lu byte allocation at 0x%p\n",
+#if defined(_MSC_VER)
+            sprintf(assertMsg, "PoolAlloc: Damage %s %Iu byte allocation at 0x%p\n",
                     locText, size, data());
+#else
+            sprintf(assertMsg, "PoolAlloc: Damage %s %zu byte allocation at 0x%p\n",
+                    locText, size, data());
+#endif
             assert(0 && "PoolAlloc: Damage in guard block");
         }
     }
 #endif
 }
 
 
 void TPoolAllocator::push()
--- a/gfx/angle/src/compiler/SymbolTable.cpp
+++ b/gfx/angle/src/compiler/SymbolTable.cpp
@@ -4,16 +4,20 @@
 // found in the LICENSE file.
 //
 
 //
 // Symbol table for parsing.  Most functionaliy and main ideas
 // are documented in the header file.
 //
 
+#if defined(_MSC_VER)
+#pragma warning(disable: 4718)
+#endif
+
 #include "compiler/SymbolTable.h"
 
 #include <stdio.h>
 
 #include <algorithm>
 
 //
 // TType helper function needs a place to live.
--- a/gfx/angle/src/compiler/SymbolTable.h
+++ b/gfx/angle/src/compiler/SymbolTable.h
@@ -297,16 +297,22 @@ public:
             *sameScope = level == currentLevel();
         return symbol;
     }
 
     TSymbolTableLevel* getGlobalLevel() {
         assert(table.size() >= 2);
         return table[1];
     }
+
+    TSymbolTableLevel* getOuterLevel() {
+        assert(table.size() >= 2);
+        return table[currentLevel() - 1];
+    }
+
     void relateToOperator(const char* name, TOperator op) {
         table[0]->relateToOperator(name, op);
     }
     void relateToExtension(const char* name, const TString& ext) {
         table[0]->relateToExtension(name, ext);
     }
     int getMaxSymbolId() { return uniqueId; }
     void dump(TInfoSink &infoSink) const;
--- a/gfx/angle/src/compiler/Types.h
+++ b/gfx/angle/src/compiler/Types.h
@@ -5,17 +5,16 @@
 //
 
 #ifndef _TYPES_INCLUDED
 #define _TYPES_INCLUDED
 
 #include "compiler/BaseTypes.h"
 #include "compiler/Common.h"
 #include "compiler/compilerdebug.h"
-#include <cstdlib>
 
 //
 // Need to have association of line numbers to types in a list for building structs.
 //
 class TType;
 struct TTypeLine {
     TType* type;
     int line;
@@ -204,17 +203,17 @@ public:
     bool isVector() const { return size > 1 && !matrix; }
     bool isScalar() const { return size == 1 && !matrix && !structure; }
 
     TTypeList* getStruct() const { return structure; }
     void setStruct(TTypeList* s) { structure = s; computeDeepestStructNesting(); }
 
     const TString& getTypeName() const
     {
-        if(!typeName) abort();
+        assert(typeName);
         return *typeName;
     }
     void setTypeName(const TString& n)
     {
         typeName = NewPoolTString(n.c_str());
     }
 
     bool isField() const { return fieldName != 0; }
--- a/gfx/angle/src/compiler/glslang.h
+++ b/gfx/angle/src/compiler/glslang.h
@@ -3,14 +3,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 struct TParseContext;
 extern int glslang_initialize(TParseContext* context);
 extern int glslang_finalize(TParseContext* context);
 
-extern void glslang_scan(int count,
-                         const char* const string[],
-                         const int length[],
-                         TParseContext* context);
+extern int glslang_scan(int count,
+                        const char* const string[],
+                        const int length[],
+                        TParseContext* context);
 extern int glslang_parse(TParseContext* context);
 
--- a/gfx/angle/src/compiler/glslang.l
+++ b/gfx/angle/src/compiler/glslang.l
@@ -1,37 +1,42 @@
 /*
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 This file contains the Lex specification for GLSL ES.
 Based on ANSI C grammar, Lex specification:
 http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
 
 IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
 WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
 */
 
 %top{
 //
-// Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
 
 // Ignore errors in auto-generated code.
 #if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
 #endif
 }
 
 %{
 #include "compiler/glslang.h"
 #include "compiler/ParseHelper.h"
 #include "compiler/util.h"
 #include "glslang_tab.h"
@@ -149,36 +154,47 @@ O           [0-7]
 "inline"       { return reserved_word(yyscanner); }
 "noinline"     { return reserved_word(yyscanner); }
 "volatile"     { return reserved_word(yyscanner); }
 "public"       { return reserved_word(yyscanner); }
 "static"       { return reserved_word(yyscanner); }
 "extern"       { return reserved_word(yyscanner); }
 "external"     { return reserved_word(yyscanner); }
 "interface"    { return reserved_word(yyscanner); }
+"flat"         { return reserved_word(yyscanner); }
 
 "long"         { return reserved_word(yyscanner); }
 "short"        { return reserved_word(yyscanner); }
 "double"       { return reserved_word(yyscanner); }
 "half"         { return reserved_word(yyscanner); }
 "fixed"        { return reserved_word(yyscanner); }
 "unsigned"     { return reserved_word(yyscanner); }
+"superp"       { return reserved_word(yyscanner); }
 
 "input"        { return reserved_word(yyscanner); }
 "output"       { return reserved_word(yyscanner); }
 
 "hvec2"        { return reserved_word(yyscanner); }
 "hvec3"        { return reserved_word(yyscanner); }
 "hvec4"        { return reserved_word(yyscanner); }
+"dvec2"        { return reserved_word(yyscanner); }
+"dvec3"        { return reserved_word(yyscanner); }
+"dvec4"        { return reserved_word(yyscanner); }
 "fvec2"        { return reserved_word(yyscanner); }
 "fvec3"        { return reserved_word(yyscanner); }
 "fvec4"        { return reserved_word(yyscanner); }
-"dvec2"        { return reserved_word(yyscanner); }
-"dvec3"        { return reserved_word(yyscanner); }
-"dvec4"        { return reserved_word(yyscanner); }
+
+"sampler1D"    { return reserved_word(yyscanner); }
+"sampler3D"    { return reserved_word(yyscanner); }
+
+"sampler1DShadow" { return reserved_word(yyscanner); }
+"sampler2DShadow" { return reserved_word(yyscanner); }
+
+"sampler3DRect" { return reserved_word(yyscanner); }
+"sampler2DRectShadow" { return reserved_word(yyscanner); }
 
 "sizeof"       { return reserved_word(yyscanner); }
 "cast"         { return reserved_word(yyscanner); }
 
 "namespace"    { return reserved_word(yyscanner); }
 "using"        { return reserved_word(yyscanner); }
 
 {L}({L}|{D})*       {
@@ -558,24 +574,20 @@ int glslang_initialize(TParseContext* co
 int glslang_finalize(TParseContext* context) {
     yyscan_t scanner = context->scanner;
     if (scanner == NULL) return 0;
     
     context->scanner = NULL;
     return yylex_destroy(scanner);
 }
 
-void glslang_scan(int count, const char* const string[], const int length[],
-                  TParseContext* context) {
+int glslang_scan(int count, const char* const string[], const int length[],
+                 TParseContext* context) {
     yyrestart(NULL, context->scanner);
     yyset_lineno(EncodeSourceLoc(0, 1), context->scanner);
     context->AfterEOF = false;
     
     // Init preprocessor.
     cpp->pC = context;
-    cpp->PaWhichStr = 0;
-    cpp->PaArgv     = string;
-    cpp->PaArgc     = count;
-    cpp->PaStrLen   = length;
     cpp->pastFirstStatement = 0;
-    ScanFromString(string[0]);
+    return InitScannerInput(cpp, count, string, length);
 }
 
--- a/gfx/angle/src/compiler/glslang.y
+++ b/gfx/angle/src/compiler/glslang.y
@@ -19,19 +19,24 @@ WHICH GENERATES THE GLSL ES PARSER (glsl
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
 
 // Ignore errors in auto-generated code.
 #if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
 #endif
 
 #include "compiler/SymbolTable.h"
 #include "compiler/ParseHelper.h"
 #include "GLSLANG/ShaderLang.h"
 
 #define YYLEX_PARAM context->scanner
 %}
@@ -131,17 +136,17 @@ extern void yyerror(TParseContext* conte
 
 %type <interm.intermNode> translation_unit function_definition
 %type <interm.intermNode> statement simple_statement
 %type <interm.intermAggregate>  statement_list compound_statement
 %type <interm.intermNode> declaration_statement selection_statement expression_statement
 %type <interm.intermNode> declaration external_declaration
 %type <interm.intermNode> for_init_statement compound_statement_no_new_scope
 %type <interm.nodePair> selection_rest_statement for_rest_statement
-%type <interm.intermNode> iteration_statement jump_statement statement_no_new_scope
+%type <interm.intermNode> iteration_statement jump_statement statement_no_new_scope statement_with_scope
 %type <interm> single_declaration init_declarator_list
 
 %type <interm> parameter_declaration parameter_declarator parameter_type_specifier
 %type <interm.qualifier> parameter_qualifier
 
 %type <interm.precision> precision_qualifier
 %type <interm.type> type_qualifier fully_specified_type type_specifier
 %type <interm.type> type_specifier_no_prec type_specifier_nonarray
@@ -970,16 +975,18 @@ declaration
             else
             {
                 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, $1.line), $1.line);
             }
         }
         
         prototype->setOp(EOpPrototype);
         $$ = prototype;
+
+        context->symbolTable.pop();
     }
     | init_declarator_list SEMICOLON {
         if ($1.intermAggregate)
             $1.intermAggregate->setOp(EOpDeclaration);
         $$ = $1.intermAggregate;
     }
     | PRECISION precision_qualifier type_specifier_no_prec SEMICOLON {
         context->symbolTable.setDefaultPrecision( $3.type, $2 );
@@ -1014,17 +1021,19 @@ function_prototype
         //
         // If this is a redeclaration, it could also be a definition,
         // in which case, we want to use the variable names from this one, and not the one that's
         // being redeclared.  So, pass back up this declaration, not the one in the symbol table.
         //
         $$.function = $1;
         $$.line = $2.line;
 
-        context->symbolTable.insert(*$$.function);
+        // We're at the inner scope level of the function's arguments and body statement.
+        // Add the function prototype to the surrounding scope instead.
+        context->symbolTable.getOuterLevel()->insert(*$$.function);
     }
     ;
 
 function_declarator
     : function_header {
         $$ = $1;
     }
     | function_header_with_parameters {
@@ -1072,16 +1081,18 @@ function_header
         if (context->structQualifierErrorCheck($2.line, $1))
             context->recover();
 
         // Add the function as a prototype after parsing it (we do not support recursion)
         TFunction *function;
         TType type($1);
         function = new TFunction($2.string, type);
         $$ = function;
+        
+        context->symbolTable.push();
     }
     ;
 
 parameter_declarator
     // Type + name
     : type_specifier IDENTIFIER {
         if ($1.type == EbtVoid) {
             context->error($2.line, "illegal use of type 'void'", $2.string->c_str(), "");
@@ -1173,16 +1184,22 @@ parameter_type_specifier
     }
     ;
 
 init_declarator_list
     : single_declaration {
         $$ = $1;
     }
     | init_declarator_list COMMA IDENTIFIER {
+        if ($1.type.type == EbtInvariant && !$3.symbol)
+        {
+            context->error($3.line, "undeclared identifier declared as invariant", $3.string->c_str(), "");
+            context->recover();
+        }
+
         TIntermSymbol* symbol = context->intermediate.addSymbol(0, *$3.string, TType($1.type), $3.line);
         $$.intermAggregate = context->intermediate.growAggregate($1.intermNode, symbol, $3.line);
         
         if (context->structQualifierErrorCheck($3.line, $$.type))
             context->recover();
 
         if (context->nonInitConstErrorCheck($3.line, *$3.string, $$.type))
             context->recover();
@@ -1337,18 +1354,31 @@ single_declaration
                 $$.intermAggregate = 0;
         } else {
             context->recover();
             $$.intermAggregate = 0;
         }
     }
     | INVARIANT IDENTIFIER {
         VERTEX_ONLY("invariant declaration", $1.line);
-        $$.qualifier = EvqInvariantVaryingOut;
-        $$.intermAggregate = 0;
+        if (context->globalErrorCheck($1.line, context->symbolTable.atGlobalLevel(), "invariant varying"))
+            context->recover();
+        $$.type.setBasic(EbtInvariant, EvqInvariantVaryingOut, $2.line);
+        if (!$2.symbol)
+        {
+            context->error($2.line, "undeclared identifier declared as invariant", $2.string->c_str(), "");
+            context->recover();
+            
+            $$.intermAggregate = 0;
+        }
+        else
+        {
+            TIntermSymbol *symbol = context->intermediate.addSymbol(0, *$2.string, TType($$.type), $2.line);
+            $$.intermAggregate = context->intermediate.makeAggregate(symbol, $2.line);
+        }
     }
 
 //
 // Place holder for the pack/unpack languages.
 //
 //    | buffer_specifier {
 //        $$.intermAggregate = 0;
 //    }
@@ -1802,16 +1832,21 @@ compound_statement
     }
     ;
 
 statement_no_new_scope
     : compound_statement_no_new_scope { $$ = $1; }
     | simple_statement                { $$ = $1; }
     ;
 
+statement_with_scope
+    : { context->symbolTable.push(); } compound_statement_no_new_scope { context->symbolTable.pop(); $$ = $2; }
+    | { context->symbolTable.push(); } simple_statement                { context->symbolTable.pop(); $$ = $2; }
+    ;
+
 compound_statement_no_new_scope
     // Statement that doesn't create a new scope, for selection_statement, iteration_statement
     : LEFT_BRACE RIGHT_BRACE {
         $$ = 0;
     }
     | LEFT_BRACE statement_list RIGHT_BRACE {
         if ($2) {
             $2->setOp(EOpSequence);
@@ -1839,21 +1874,21 @@ selection_statement
     : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement {
         if (context->boolErrorCheck($1.line, $3))
             context->recover();
         $$ = context->intermediate.addSelection($3, $5, $1.line);
     }
     ;
 
 selection_rest_statement
-    : statement ELSE statement {
+    : statement_with_scope ELSE statement_with_scope {
         $$.node1 = $1;
         $$.node2 = $3;
     }
-    | statement {
+    | statement_with_scope {
         $$.node1 = $1;
         $$.node2 = 0;
     }
     ;
 
 // Grammar Note:  No 'switch'.  Switch statements not supported.
 
 condition
@@ -1880,17 +1915,17 @@ condition
     ;
 
 iteration_statement
     : WHILE LEFT_PAREN { context->symbolTable.push(); ++context->loopNestingLevel; } condition RIGHT_PAREN statement_no_new_scope {
         context->symbolTable.pop();
         $$ = context->intermediate.addLoop(ELoopWhile, 0, $4, 0, $6, $1.line);
         --context->loopNestingLevel;
     }
-    | DO { ++context->loopNestingLevel; } statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON {
+    | DO { ++context->loopNestingLevel; } statement_with_scope WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON {
         if (context->boolErrorCheck($8.line, $6))
             context->recover();
 
         $$ = context->intermediate.addLoop(ELoopDoWhile, 0, $6, 0, $3, $4.line);
         --context->loopNestingLevel;
     }
     | FOR LEFT_PAREN { context->symbolTable.push(); ++context->loopNestingLevel; } for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope {
         context->symbolTable.pop();
@@ -2017,21 +2052,16 @@ function_definition
             }
             if (function->getReturnType().getBasicType() != EbtVoid) {
                 context->error($1.line, "", function->getReturnType().getBasicString(), "main function cannot return a value");
                 context->recover();
             }
         }
 
         //
-        // New symbol table scope for body of function plus its arguments
-        //
-        context->symbolTable.push();
-
-        //
         // Remember the return type for later checking for RETURN statements.
         //
         context->currentFunctionType = &(prevDec->getReturnType());
         context->functionReturnsValue = false;
 
         //
         // Insert parameters into the symbol table.
         // If the parameter has no name, it's not an error, just don't insert it
@@ -2073,30 +2103,32 @@ function_definition
     }
     compound_statement_no_new_scope {
         //?? Check that all paths return a value if return type != void ?
         //   May be best done as post process phase on intermediate code
         if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) {
             context->error($1.line, "function does not return a value:", "", $1.function->getName().c_str());
             context->recover();
         }
-        context->symbolTable.pop();
+        
         $$ = context->intermediate.growAggregate($1.intermAggregate, $3, 0);
         context->intermediate.setAggregateOperator($$, EOpFunction, $1.line);
         $$->getAsAggregate()->setName($1.function->getMangledName().c_str());
         $$->getAsAggregate()->setType($1.function->getReturnType());
 
         // store the pragma information for debug and optimize and other vendor specific
         // information. This information can be queried from the parse tree
         $$->getAsAggregate()->setOptimize(context->contextPragma.optimize);
         $$->getAsAggregate()->setDebug(context->contextPragma.debug);
         $$->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable);
 
         if ($3 && $3->getAsAggregate())
             $$->getAsAggregate()->setEndLine($3->getAsAggregate()->getEndLine());
+
+        context->symbolTable.pop();
     }
     ;
 
 %%
 
 int glslang_parse(TParseContext* context) {
     return yyparse(context);
 }
--- a/gfx/angle/src/compiler/glslang_lex.cpp
+++ b/gfx/angle/src/compiler/glslang_lex.cpp
@@ -1,27 +1,32 @@
-#line 17 "./glslang.l"
+#line 17 "./compiler/glslang.l"
 //
-// Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
 
 // Ignore errors in auto-generated code.
 #if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
 #endif
 
 
 
-#line 20 "./glslang_lex.cpp"
+#line 25 "./compiler/glslang_lex.cpp"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
@@ -373,405 +378,426 @@ static void yy_fatal_error (yyconst char
  */
 #define YY_DO_BEFORE_ACTION \
 	yyg->yytext_ptr = yy_bp; \
 	yyleng = (size_t) (yy_cp - yy_bp); \
 	yyg->yy_hold_char = *yy_cp; \
 	*yy_cp = '\0'; \
 	yyg->yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 147
-#define YY_END_OF_BUFFER 148
+#define YY_NUM_RULES 155
+#define YY_END_OF_BUFFER 156
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
 	{
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[426] =
+static yyconst flex_int16_t yy_accept[459] =
     {   0,
-        0,    0,    0,    0,    0,    0,  148,  146,  145,  145,
-      130,  136,  141,  125,  126,  134,  133,  122,  131,  129,
-      135,   94,   94,  123,  119,  137,  124,  138,  142,   90,
-      127,  128,  140,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,  120,  139,  121,  132,    3,    4,    3,
-      144,  147,  143,  116,  102,  121,  110,  105,  100,  108,
-       98,  109,   99,   97,    2,    1,  101,   96,   92,   93,
-        0,    0,   94,  128,  120,  127,  117,  113,  115,  114,
-      118,   90,  106,  112,   90,   90,   90,   90,   90,   90,
-
-       90,   90,   90,   90,   17,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   20,   22,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,  107,  111,    5,  143,
-        0,    1,   96,    0,    0,   95,   91,  103,  104,   50,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   18,   90,   90,
-       90,   90,   90,   90,   90,   90,   26,   90,   90,   90,
-       90,   90,   90,   90,   90,   23,   90,   90,   90,   90,
-
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,    0,   97,
-        0,   96,   90,   28,   90,   90,   87,   90,   90,   90,
-       90,   90,   90,   90,   21,   53,   90,   90,   90,   90,
-       90,   58,   72,   90,   90,   90,   90,   90,   90,   90,
-       90,   69,    9,   33,   34,   35,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   56,   29,   90,   90,   90,   90,   90,   90,   36,
-       37,   38,   27,   90,   90,   90,   15,   42,   43,   44,
-       51,   12,   90,   90,   90,   90,   83,   84,   85,   90,
-
-       30,   73,   25,   80,   81,   82,    7,   77,   78,   79,
-       90,   24,   75,   90,   90,   39,   40,   41,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   70,   90,   90,
-       90,   90,   90,   90,   90,   52,   90,   89,   90,   90,
-       19,   90,   90,   90,   90,   71,   66,   61,   90,   90,
-       90,   90,   90,   76,   57,   90,   64,   32,   90,   86,
-       65,   49,   59,   90,   90,   90,   90,   90,   90,   90,
-       90,   60,   31,   90,   90,   90,    8,   90,   90,   90,
-       90,   90,   54,   13,   90,   14,   90,   90,   16,   67,
-       90,   90,   90,   62,   90,   90,   90,   90,   55,   74,
-
-       63,   11,   68,    6,   88,   10,   45,   90,   90,   90,
-       90,   90,   90,   46,   90,   90,   90,   48,   90,   90,
-       90,   90,   90,   47,    0
+        0,    0,    0,    0,    0,    0,  156,  154,  153,  153,
+      138,  144,  149,  133,  134,  142,  141,  130,  139,  137,
+      143,  102,  102,  131,  127,  145,  132,  146,  150,   98,
+      135,  136,  148,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,  128,  147,  129,  140,    3,    4,    3,
+      152,  155,  151,  124,  110,  129,  118,  113,  108,  116,
+      106,  117,  107,  105,    2,    1,  109,  104,  100,  101,
+        0,    0,  102,  136,  128,  135,  125,  121,  123,  122,
+      126,   98,  114,  120,   98,   98,   98,   98,   98,   98,
+
+       98,   98,   98,   98,   17,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   20,   22,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,  115,  119,    5,
+      151,    0,    1,  104,    0,    0,  103,   99,  111,  112,
+       50,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   18,
+       98,   98,   98,   98,   98,   98,   98,   98,   26,   98,
+       98,   98,   98,   98,   98,   98,   98,   23,   98,   98,
+
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,    0,  105,    0,  104,   98,   28,   98,   98,   95,
+       98,   98,   98,   98,   98,   98,   98,   21,   53,   98,
+       98,   98,   69,   98,   98,   58,   73,   98,   98,   98,
+       98,   98,   98,   98,   98,   70,    9,   33,   34,   35,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   56,   29,   98,   98,
+       98,   98,   98,   98,   36,   37,   38,   27,   98,   98,
+       98,   15,   42,   43,   44,   51,   12,   98,   98,   98,
+
+       98,   82,   83,   84,   98,   30,   74,   25,   85,   86,
+       87,    7,   79,   80,   81,   98,   24,   77,   98,   98,
+       39,   40,   41,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   71,   98,   98,   98,   98,   98,   98,   98,
+       98,   52,   98,   97,   98,   98,   19,   98,   98,   98,
+       98,   72,   66,   61,   98,   98,   98,   98,   98,   78,
+       57,   98,   64,   32,   98,   94,   65,   49,   76,   59,
+       98,   98,   98,   98,   98,   98,   98,   98,   60,   31,
+       98,   98,   98,    8,   98,   98,   98,   98,   98,   54,
+       13,   98,   14,   98,   98,   16,   67,   98,   98,   98,
+
+       62,   98,   98,   98,   98,   98,   98,   55,   75,   63,
+       11,   68,    6,   96,   10,   88,   45,   89,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       46,   98,   98,   98,   98,   98,   98,   98,   48,   98,
+       92,   98,   98,   98,   98,   98,   90,   98,   91,   98,
+       98,   98,   98,   98,   98,   47,   93,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    2,    4,    1,    1,    1,    5,    6,    1,    7,
         8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
-       18,   19,   16,   16,   16,   20,   20,   21,   22,   23,
-       24,   25,   26,    1,   27,   27,   28,   29,   30,   27,
-       31,   31,   31,   31,   31,   31,   31,   31,   32,   31,
-       31,   33,   34,   31,   31,   31,   31,   35,   31,   31,
-       36,    1,   37,   38,   31,    1,   39,   40,   41,   42,
-
-       43,   44,   45,   46,   47,   31,   48,   49,   50,   51,
-       52,   53,   31,   54,   55,   56,   57,   58,   59,   60,
-       61,   62,   63,   64,   65,   66,    1,    1,    1,    1,
+       18,   19,   20,   20,   20,   21,   21,   22,   23,   24,
+       25,   26,   27,    1,   28,   28,   29,   30,   31,   28,
+       32,   32,   32,   32,   32,   32,   32,   32,   33,   32,
+       32,   34,   35,   32,   32,   32,   32,   36,   32,   32,
+       37,    1,   38,   39,   32,    1,   40,   41,   42,   43,
+
+       44,   45,   46,   47,   48,   32,   49,   50,   51,   52,
+       53,   54,   32,   55,   56,   57,   58,   59,   60,   61,
+       62,   63,   64,   65,   66,   67,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    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 flex_int32_t yy_meta[67] =
+static yyconst flex_int32_t yy_meta[68] =
     {   0,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    3,    3,    3,    3,    3,    3,
-        1,    1,    1,    1,    1,    1,    3,    3,    3,    3,
-        4,    4,    4,    4,    4,    1,    1,    1,    3,    3,
-        3,    3,    3,    3,    4,    4,    4,    4,    4,    4,
+        3,    1,    1,    1,    1,    1,    1,    3,    3,    3,
+        3,    4,    4,    4,    4,    4,    1,    1,    1,    3,
+        3,    3,    3,    3,    3,    4,    4,    4,    4,    4,
         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    1,    1,    1,    1
+        4,    4,    4,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[431] =
+static yyconst flex_int16_t yy_base[464] =
     {   0,
-        0,    0,   64,   65,   74,    0,  627,  628,  628,  628,
-      602,   45,  135,  628,  628,  601,  132,  628,  131,  129,
-      143,  155,  163,  599,  628,  179,  599,   47,  628,    0,
-      628,  628,  126,   98,  108,  147,  158,  158,  165,  570,
-      130,  107,  569,  148,  156,  563,  172,  576,  174,  181,
-      177,  195,  572,  628,  173,  628,  628,  628,  628,  603,
-      628,  628,    0,  628,  628,  628,  628,  628,  628,  628,
-      628,  628,  628,  233,  628,    0,  628,  239,  255,  271,
-      287,    0,  300,  628,  628,  628,  592,  628,  628,  628,
-      591,    0,  628,  628,  564,  557,  560,  568,  567,  554,
-
-      569,  556,  562,  550,  547,  560,  547,  544,  544,  550,
-      538,  545,  542,  552,  538,  544,  547,  548,    0,  187,
-      547,  241,  533,  546,  537,  539,  529,  543,  540,  542,
-      525,  530,  527,  516,  192,  530,  526,  528,  517,  520,
-      274,  525,  517,  529,  114,  522,  628,  628,  628,    0,
-      316,    0,  322,  338,  344,  351,    0,  628,  628,    0,
-      514,  518,  527,  524,  508,  508,  205,  523,  520,  520,
-      518,  515,  507,  513,  500,  511,  514,    0,  511,  499,
-      506,  503,  507,  500,  489,  488,  501,  504,  501,  496,
-      487,  247,  492,  495,  486,  483,  487,  493,  484,  475,
-
-      478,  476,  486,  472,  470,  470,  472,  469,  480,  479,
-      328,  474,  469,  458,  260,  476,  478,  467,  358,  366,
-      372,  378,  468,    0,  466,  276,    0,  458,  456,  464,
-      453,  470,  459,  291,    0,    0,  453,  463,  463,  448,
-      305,    0,    0,  450,  327,  451,  445,  444,  445,  444,
-      382,    0,    0,    0,    0,    0,  440,  441,  446,  437,
-      450,  445,  444,  436,  440,  432,  435,  439,  444,  443,
-      434,    0,    0,  440,  429,  429,  434,  433,  430,    0,
-        0,    0,    0,  420,  432,  434,    0,    0,    0,    0,
-        0,    0,  422,  423,  417,  427,    0,    0,    0,  418,
-
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-      425,    0,    0,  423,  419,    0,    0,    0,  415,  411,
-      416,  406,  419,  405,  418,  407,  414,    0,  412,  414,
-      398,  407,  413,  408,  396,    0,  398,    0,  397,  400,
-        0,  389,  388,  388,  401,    0,  403,    0,  402,  401,
-      386,  399,  386,    0,    0,  389,    0,    0,  381,    0,
-        0,    0,    0,  378,  389,  382,  388,  385,  380,  372,
-      382,    0,    0,  365,  371,  360,    0,  369,  366,  356,
-      385,  364,    0,    0,  364,    0,  362,  361,    0,    0,
-      360,  323,  308,    0,  298,  318,  270,  265,    0,    0,
-
-        0,    0,    0,    0,    0,    0,  279,  271,  240,  240,
-      238,  237,  226,    0,  208,  188,  190,    0,  186,  173,
-      187,  164,  158,    0,  628,  415,  417,  419,  423,  186
+        0,    0,   65,   66,   75,    0,  680,  681,  681,  681,
+      654,   45,  137,  681,  681,  653,  134,  681,  133,  131,
+      146,  159,  168,  651,  681,  186,  651,   47,  681,    0,
+      681,  681,  128,  100,  110,  152,  156,  146,  166,  622,
+      173,  109,  621,  126,  177,  615,  178,  628,  187,  184,
+      141,  197,  624,  681,  157,  681,  681,  681,  681,  656,
+      681,  681,    0,  681,  681,  681,  681,  681,  681,  681,
+      681,  681,  681,  236,  681,    0,  681,  243,  273,  282,
+      304,    0,  314,  681,  681,  681,  644,  681,  681,  681,
+      643,    0,  681,  681,  616,  609,  612,  620,  619,  606,
+
+      621,  608,  614,  602,  599,  612,  599,  596,  596,  602,
+      590,  189,  595,  605,  591,  597,  600,  601,    0,  216,
+      600,  188,  586,  599,  590,  592,  582,  596,  593,  595,
+      578,  583,  580,  569,  183,  577,  582,  578,  580,  569,
+      572,  220,  577,  569,  581,  176,  574,  681,  681,  681,
+        0,  331,    0,  344,  361,  290,  374,    0,  681,  681,
+        0,  566,  570,  579,  576,  560,  560,  215,  575,  572,
+      572,  570,  567,  559,  565,  552,  563,  549,  565,    0,
+      562,  550,  557,  554,  558,  551,  540,  539,  552,  555,
+      552,  547,  538,  260,  543,  546,  537,  534,  538,  544,
+
+      535,  526,  529,  527,  537,  523,  521,  534,  520,  522,
+      519,  530,  529,  283,  524,  519,  508,  264,  526,  528,
+      517,  381,  388,  395,  402,  518,    0,  516,  320,    0,
+      508,  506,  514,  503,  520,  509,  336,    0,    0,  503,
+      513,  513,    0,  498,  349,    0,    0,  500,  366,  501,
+      495,  494,  495,  494,  407,    0,    0,    0,    0,    0,
+      490,  491,  496,  487,  500,  495,  494,  486,  490,  482,
+      485,  489,  494,  480,  492,  483,    0,    0,  489,  478,
+      478,  483,  482,  479,    0,    0,    0,    0,  469,  481,
+      483,    0,    0,    0,    0,    0,    0,  471,  472,  466,
+
+      476,    0,    0,    0,  467,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,  474,    0,    0,  472,  468,
+        0,    0,    0,  464,  460,  465,  455,  468,  454,  467,
+      456,  463,    0,  461,  463,  447,  449,  455,  461,  456,
+      444,    0,  446,    0,  445,  448,    0,  437,  436,  436,
+      449,    0,  451,    0,  450,  449,  434,  447,  434,    0,
+        0,  437,    0,    0,  429,    0,    0,    0,    0,    0,
+      426,  437,  430,  436,  433,  428,  420,  432,    0,    0,
+      425,  432,  421,    0,  430,  427,  417,  411,  425,    0,
+        0,  425,    0,  423,  422,    0,    0,  421,  407,  419,
+
+        0,  410,  431,  430,  429,  400,  396,    0,    0,    0,
+        0,    0,    0,    0,    0,  421,  250,  421,  411,  384,
+      392,  394,  390,  392,  391,  390,  393,  390,  391,  388,
+        0,  332,  343,  317,  329,  313,  317,  304,  321,  291,
+        0,  302,  280,  271,  255,  262,    0,  256,    0,  232,
+      206,  212,  148,  159,  113,    0,    0,  681,  442,  444,
+      446,  450,  161
     } ;
 
-static yyconst flex_int16_t yy_def[431] =
+static yyconst flex_int16_t yy_def[464] =
     {   0,
-      425,    1,  426,  426,  425,    5,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  427,
-      425,  425,  425,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  428,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  429,  425,  425,  425,  425,
-      425,  430,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  427,  425,  425,  427,  427,  427,  427,  427,  427,
-
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  425,  425,  425,  428,
-      425,  429,  425,  425,  425,  425,  430,  425,  425,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  425,  425,
-      425,  425,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
-      427,  427,  427,  427,    0,  425,  425,  425,  425,  425
+      458,    1,  459,  459,  458,    5,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  460,
+      458,  458,  458,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  461,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  462,  458,  458,  458,  458,
+      458,  463,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  460,  458,  458,  460,  460,  460,  460,  460,  460,
+
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  458,  458,  458,
+      461,  458,  462,  458,  458,  458,  458,  463,  458,  458,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  458,  458,  458,  458,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,  460,  460,  460,
+      460,  460,  460,  460,  460,  460,  460,    0,  458,  458,
+      458,  458,  458
     } ;
 
-static yyconst flex_int16_t yy_nxt[695] =
+static yyconst flex_int16_t yy_nxt[749] =
     {   0,
         8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
        18,   19,   20,   21,   22,   23,   23,   23,   23,   23,
-       24,   25,   26,   27,   28,   29,   30,   30,   30,   30,
-       30,   30,   30,   30,   30,   31,   32,   33,   34,   35,
-       36,   37,   38,   39,   40,   41,   42,   30,   43,   44,
-       45,   46,   47,   48,   49,   50,   51,   52,   53,   30,
-       30,   30,   54,   55,   56,   57,   59,   59,   65,   66,
-       90,   91,   60,   60,    8,   61,   62,    8,    8,    8,
+       23,   24,   25,   26,   27,   28,   29,   30,   30,   30,
+       30,   30,   30,   30,   30,   30,   31,   32,   33,   34,
+       35,   36,   37,   38,   39,   40,   41,   42,   30,   43,
+       44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
+       30,   30,   30,   54,   55,   56,   57,   59,   59,   65,
+       66,   90,   91,   60,   60,    8,   61,   62,    8,    8,
         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
 
-       63,   63,   63,   63,   63,   63,   63,   63,   63,    8,
         8,    8,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,    8,    8,    8,   63,   63,   63,   63,   63,   63,
        63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
-       63,   63,   63,   63,   63,   63,    8,    8,    8,    8,
-       67,   70,   72,   74,   74,   74,   74,   74,   74,   93,
-      119,   75,   95,   96,   73,   71,   76,  120,   68,   97,
-      216,   98,  217,   94,  121,   99,   77,   78,  116,   79,
-       79,   79,   79,   79,   80,   78,  117,   83,   83,   83,
-       83,   83,   83,   85,   81,  100,  123,  118,  157,   82,
-      124,  424,   81,  423,  125,  101,  147,   81,  102,   86,
-
-      103,   87,   88,  110,  104,   81,  107,  126,  108,  105,
-      128,  111,  132,  112,   82,  106,  113,  109,  422,  133,
-      134,  421,  114,  137,  420,  129,  138,  141,  130,  135,
-      204,  142,  136,  143,  139,  184,  148,  144,  185,  186,
-      419,  140,  187,  418,  188,  205,  145,   74,   74,   74,
-       74,   74,   74,  153,  153,  153,  153,  153,  153,  229,
-      230,  417,  151,  254,  255,  256,  416,   78,  154,   79,
-       79,   79,   79,   79,   80,  151,  280,  281,  282,  415,
-      414,  154,  413,   78,   81,   80,   80,   80,   80,   80,
-       80,  190,  288,  289,  290,  412,  155,   81,  155,  191,
-
-       81,  156,  156,  156,  156,  156,  156,  297,  298,  299,
-      411,  410,   78,   81,   83,   83,   83,   83,   83,   83,
-      211,  304,  305,  306,  409,  219,  408,  219,  212,   81,
-      220,  220,  220,  220,  220,  220,  153,  153,  153,  153,
-      153,  153,   81,  308,  309,  310,  407,  221,  406,  221,
-      405,  154,  222,  222,  222,  222,  222,  222,  156,  156,
-      156,  156,  156,  156,  154,  156,  156,  156,  156,  156,
-      156,  275,  220,  220,  220,  220,  220,  220,  404,  276,
-      220,  220,  220,  220,  220,  220,  222,  222,  222,  222,
-      222,  222,  222,  222,  222,  222,  222,  222,  316,  317,
-
-      318,  396,  403,  402,  401,  400,  399,  395,  394,  393,
-      392,  391,  397,  390,  398,   58,   58,   58,   58,   92,
-       92,  150,  150,  152,  389,  152,  152,  388,  387,  386,
-      385,  384,  383,  382,  381,  380,  379,  378,  377,  376,
-      375,  374,  373,  372,  371,  370,  369,  368,  367,  366,
-      365,  364,  363,  362,  361,  360,  359,  358,  357,  356,
-      355,  354,  353,  352,  351,  350,  349,  348,  347,  346,
-      345,  344,  343,  342,  341,  340,  339,  338,  337,  336,
-      335,  334,  333,  332,  331,  330,  329,  328,  327,  326,
-      325,  324,  323,  322,  321,  320,  319,  315,  314,  313,
-
-      312,  311,  307,  303,  302,  301,  300,  296,  295,  294,
-      293,  292,  291,  287,  286,  285,  284,  283,  279,  278,
-      277,  274,  273,  272,  271,  270,  269,  268,  267,  266,
-      265,  264,  263,  262,  261,  260,  259,  258,  257,  253,
-      252,  251,  250,  249,  248,  247,  246,  245,  244,  243,
-      242,  241,  240,  239,  238,  237,  236,  235,  234,  233,
-      232,  231,  228,  227,  226,  225,  224,  223,  218,  215,
-      214,  213,  210,  209,  208,  207,  206,  203,  202,  201,
-      200,  199,  198,  197,  196,  195,  194,  193,  192,  189,
-      183,  182,  181,  180,  179,  178,  177,  176,  175,  174,
-
-      173,  172,  171,  170,  169,  168,  167,  166,  165,  164,
-      163,  162,  161,  160,  159,  158,  149,  146,  131,  127,
-      122,  115,   89,   84,   69,   64,  425,    7,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425
-
+       63,   63,   63,   63,   63,   63,   63,   63,    8,    8,
+        8,    8,   67,   70,   72,   74,   74,   74,   74,   74,
+       74,   74,   93,  119,   75,   95,   96,   73,   71,   76,
+      120,   68,   97,  158,   98,  123,   94,  121,   99,  124,
+       77,   78,  457,   79,   79,   79,   79,   79,   79,   80,
+       78,  148,   83,   83,   83,   83,   83,   83,   83,   81,
+       85,  100,  142,  456,   82,  107,  143,  108,   81,  103,
+
+      455,  101,   81,  104,  102,  110,  109,   86,  105,   87,
+       88,   81,  116,  111,  106,  112,  125,  128,  113,   82,
+      117,  149,  206,  219,  114,  220,  132,  138,  178,  126,
+      139,  118,  129,  133,  134,  130,  144,  207,  140,  192,
+      145,  179,  454,  135,  136,  141,  137,  193,  453,  146,
+       74,   74,   74,   74,   74,   74,   74,  154,  154,  154,
+      154,  154,  154,  154,  452,  186,  152,  214,  187,  188,
+      232,  233,  189,  155,  190,  215,  258,  259,  260,  152,
+      285,  286,  287,  422,  423,   78,  155,   79,   79,   79,
+       79,   79,   79,   80,   78,  451,   80,   80,   80,   80,
+
+       80,   80,   80,   81,  157,  157,  157,  157,  157,  157,
+      157,  450,   81,  156,  449,  156,   81,  448,  157,  157,
+      157,  157,  157,  157,  157,   81,   78,  280,   83,   83,
+       83,   83,   83,   83,   83,  281,  293,  294,  295,  447,
+      222,  446,  222,  445,   81,  223,  223,  223,  223,  223,
+      223,  223,  302,  303,  304,  444,  443,   81,  154,  154,
+      154,  154,  154,  154,  154,  309,  310,  311,  442,  441,
+      224,  440,  224,  439,  155,  225,  225,  225,  225,  225,
+      225,  225,  313,  314,  315,  438,  437,  155,  157,  157,
+      157,  157,  157,  157,  157,  223,  223,  223,  223,  223,
+
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  225,
+      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
+      225,  225,  225,  321,  322,  323,  403,  404,  405,  436,
+      435,  434,  433,  432,  431,  430,  429,  428,  427,  406,
+      426,  407,   58,   58,   58,   58,   92,   92,  151,  151,
+      153,  425,  153,  153,  424,  421,  420,  419,  418,  417,
+      416,  415,  414,  413,  412,  411,  410,  409,  408,  402,
+      401,  400,  399,  398,  397,  396,  395,  394,  393,  392,
+      391,  390,  389,  388,  387,  386,  385,  384,  383,  382,
+      381,  380,  379,  378,  377,  376,  375,  374,  373,  372,
+
+      371,  370,  369,  368,  367,  366,  365,  364,  363,  362,
+      361,  360,  359,  358,  357,  356,  355,  354,  353,  352,
+      351,  350,  349,  348,  347,  346,  345,  344,  343,  342,
+      341,  340,  339,  338,  337,  336,  335,  334,  333,  332,
+      331,  330,  329,  328,  327,  326,  325,  324,  320,  319,
+      318,  317,  316,  312,  308,  307,  306,  305,  301,  300,
+      299,  298,  297,  296,  292,  291,  290,  289,  288,  284,
+      283,  282,  279,  278,  277,  276,  275,  274,  273,  272,
+      271,  270,  269,  268,  267,  266,  265,  264,  263,  262,
+      261,  257,  256,  255,  254,  253,  252,  251,  250,  249,
+
+      248,  247,  246,  245,  244,  243,  242,  241,  240,  239,
+      238,  237,  236,  235,  234,  231,  230,  229,  228,  227,
+      226,  221,  218,  217,  216,  213,  212,  211,  210,  209,
+      208,  205,  204,  203,  202,  201,  200,  199,  198,  197,
+      196,  195,  194,  191,  185,  184,  183,  182,  181,  180,
+      177,  176,  175,  174,  173,  172,  171,  170,  169,  168,
+      167,  166,  165,  164,  163,  162,  161,  160,  159,  150,
+      147,  131,  127,  122,  115,   89,   84,   69,   64,  458,
+        7,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458
     } ;
 
-static yyconst flex_int16_t yy_chk[695] =
+static yyconst flex_int16_t yy_chk[749] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    3,    4,   12,   12,
-       28,   28,    3,    4,    5,    5,    5,    5,    5,    5,
+        1,    1,    1,    1,    1,    1,    1,    3,    4,   12,
+       12,   28,   28,    3,    4,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
 
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
-       13,   17,   19,   20,   20,   20,   20,   20,   20,   33,
-       42,   21,   34,   34,   19,   17,   21,   42,   13,   35,
-      145,   35,  145,   33,   42,   35,   21,   22,   41,   22,
-       22,   22,   22,   22,   22,   23,   41,   23,   23,   23,
-       23,   23,   23,   26,   22,   36,   44,   41,  430,   22,
-       44,  423,   23,  422,   45,   36,   55,   22,   36,   26,
-
-       37,   26,   26,   39,   37,   23,   38,   45,   38,   37,
-       47,   39,   49,   39,   22,   37,   39,   38,  421,   49,
-       49,  420,   39,   50,  419,   47,   50,   51,   47,   49,
-      135,   51,   49,   52,   50,  120,   55,   52,  120,  120,
-      417,   50,  120,  416,  120,  135,   52,   74,   74,   74,
-       74,   74,   74,   78,   78,   78,   78,   78,   78,  167,
-      167,  415,   74,  192,  192,  192,  413,   79,   78,   79,
-       79,   79,   79,   79,   79,   74,  215,  215,  215,  412,
-      411,   78,  410,   80,   79,   80,   80,   80,   80,   80,
-       80,  122,  226,  226,  226,  409,   81,   79,   81,  122,
-
-       80,   81,   81,   81,   81,   81,   81,  234,  234,  234,
-      408,  407,   83,   80,   83,   83,   83,   83,   83,   83,
-      141,  241,  241,  241,  398,  151,  397,  151,  141,   83,
-      151,  151,  151,  151,  151,  151,  153,  153,  153,  153,
-      153,  153,   83,  245,  245,  245,  396,  154,  395,  154,
-      393,  153,  154,  154,  154,  154,  154,  154,  155,  155,
-      155,  155,  155,  155,  153,  156,  156,  156,  156,  156,
-      156,  211,  219,  219,  219,  219,  219,  219,  392,  211,
-      220,  220,  220,  220,  220,  220,  221,  221,  221,  221,
-      221,  221,  222,  222,  222,  222,  222,  222,  251,  251,
-
-      251,  381,  391,  388,  387,  385,  382,  380,  379,  378,
-      376,  375,  381,  374,  381,  426,  426,  426,  426,  427,
-      427,  428,  428,  429,  371,  429,  429,  370,  369,  368,
-      367,  366,  365,  364,  359,  356,  353,  352,  351,  350,
-      349,  347,  345,  344,  343,  342,  340,  339,  337,  335,
-      334,  333,  332,  331,  330,  329,  327,  326,  325,  324,
-      323,  322,  321,  320,  319,  315,  314,  311,  300,  296,
-      295,  294,  293,  286,  285,  284,  279,  278,  277,  276,
-      275,  274,  271,  270,  269,  268,  267,  266,  265,  264,
-      263,  262,  261,  260,  259,  258,  257,  250,  249,  248,
-
-      247,  246,  244,  240,  239,  238,  237,  233,  232,  231,
-      230,  229,  228,  225,  223,  218,  217,  216,  214,  213,
-      212,  210,  209,  208,  207,  206,  205,  204,  203,  202,
-      201,  200,  199,  198,  197,  196,  195,  194,  193,  191,
-      190,  189,  188,  187,  186,  185,  184,  183,  182,  181,
-      180,  179,  177,  176,  175,  174,  173,  172,  171,  170,
-      169,  168,  166,  165,  164,  163,  162,  161,  146,  144,
-      143,  142,  140,  139,  138,  137,  136,  134,  133,  132,
-      131,  130,  129,  128,  127,  126,  125,  124,  123,  121,
-      118,  117,  116,  115,  114,  113,  112,  111,  110,  109,
-
-      108,  107,  106,  105,  104,  103,  102,  101,  100,   99,
-       98,   97,   96,   95,   91,   87,   60,   53,   48,   46,
-       43,   40,   27,   24,   16,   11,    7,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
-      425,  425,  425,  425
-
+        5,    5,   13,   17,   19,   20,   20,   20,   20,   20,
+       20,   20,   33,   42,   21,   34,   34,   19,   17,   21,
+       42,   13,   35,  463,   35,   44,   33,   42,   35,   44,
+       21,   22,  455,   22,   22,   22,   22,   22,   22,   22,
+       23,   55,   23,   23,   23,   23,   23,   23,   23,   22,
+       26,   36,   51,  454,   22,   38,   51,   38,   23,   37,
+
+      453,   36,   22,   37,   36,   39,   38,   26,   37,   26,
+       26,   23,   41,   39,   37,   39,   45,   47,   39,   22,
+       41,   55,  135,  146,   39,  146,   49,   50,  112,   45,
+       50,   41,   47,   49,   49,   47,   52,  135,   50,  122,
+       52,  112,  452,   49,   49,   50,   49,  122,  451,   52,
+       74,   74,   74,   74,   74,   74,   74,   78,   78,   78,
+       78,   78,   78,   78,  450,  120,   74,  142,  120,  120,
+      168,  168,  120,   78,  120,  142,  194,  194,  194,   74,
+      218,  218,  218,  417,  417,   79,   78,   79,   79,   79,
+       79,   79,   79,   79,   80,  448,   80,   80,   80,   80,
+
+       80,   80,   80,   79,  156,  156,  156,  156,  156,  156,
+      156,  446,   80,   81,  445,   81,   79,  444,   81,   81,
+       81,   81,   81,   81,   81,   80,   83,  214,   83,   83,
+       83,   83,   83,   83,   83,  214,  229,  229,  229,  443,
+      152,  442,  152,  440,   83,  152,  152,  152,  152,  152,
+      152,  152,  237,  237,  237,  439,  438,   83,  154,  154,
+      154,  154,  154,  154,  154,  245,  245,  245,  437,  436,
+      155,  435,  155,  434,  154,  155,  155,  155,  155,  155,
+      155,  155,  249,  249,  249,  433,  432,  154,  157,  157,
+      157,  157,  157,  157,  157,  222,  222,  222,  222,  222,
+
+      222,  222,  223,  223,  223,  223,  223,  223,  223,  224,
+      224,  224,  224,  224,  224,  224,  225,  225,  225,  225,
+      225,  225,  225,  255,  255,  255,  388,  388,  388,  430,
+      429,  428,  427,  426,  425,  424,  423,  422,  421,  388,
+      420,  388,  459,  459,  459,  459,  460,  460,  461,  461,
+      462,  419,  462,  462,  418,  416,  407,  406,  405,  404,
+      403,  402,  400,  399,  398,  395,  394,  392,  389,  387,
+      386,  385,  383,  382,  381,  378,  377,  376,  375,  374,
+      373,  372,  371,  365,  362,  359,  358,  357,  356,  355,
+      353,  351,  350,  349,  348,  346,  345,  343,  341,  340,
+
+      339,  338,  337,  336,  335,  334,  332,  331,  330,  329,
+      328,  327,  326,  325,  324,  320,  319,  316,  305,  301,
+      300,  299,  298,  291,  290,  289,  284,  283,  282,  281,
+      280,  279,  276,  275,  274,  273,  272,  271,  270,  269,
+      268,  267,  266,  265,  264,  263,  262,  261,  254,  253,
+      252,  251,  250,  248,  244,  242,  241,  240,  236,  235,
+      234,  233,  232,  231,  228,  226,  221,  220,  219,  217,
+      216,  215,  213,  212,  211,  210,  209,  208,  207,  206,
+      205,  204,  203,  202,  201,  200,  199,  198,  197,  196,
+      195,  193,  192,  191,  190,  189,  188,  187,  186,  185,
+
+      184,  183,  182,  181,  179,  178,  177,  176,  175,  174,
+      173,  172,  171,  170,  169,  167,  166,  165,  164,  163,
+      162,  147,  145,  144,  143,  141,  140,  139,  138,  137,
+      136,  134,  133,  132,  131,  130,  129,  128,  127,  126,
+      125,  124,  123,  121,  118,  117,  116,  115,  114,  113,
+      111,  110,  109,  108,  107,  106,  105,  104,  103,  102,
+      101,  100,   99,   98,   97,   96,   95,   91,   87,   60,
+       53,   48,   46,   43,   40,   27,   24,   16,   11,    7,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
+      458,  458,  458,  458,  458,  458,  458,  458
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[148] =
+static yyconst flex_int32_t yy_rule_can_match_eol[156] =
     {   0,
 0, 0, 0, 1, 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, 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, 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, 1, 0, 0,     };
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,     };
 
 /* 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
 /*
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 This file contains the Lex specification for GLSL ES.
 Based on ANSI C grammar, Lex specification:
 http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
 
@@ -1076,23 +1102,23 @@ yy_match:
 			if ( yy_accept[yy_current_state] )
 				{
 				yyg->yy_last_accepting_state = yy_current_state;
 				yyg->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 >= 426 )
+				if ( yy_current_state >= 459 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 425 );
+		while ( yy_current_state != 458 );
 		yy_cp = yyg->yy_last_accepting_cpos;
 		yy_current_state = yyg->yy_last_accepting_state;
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
 
 		YY_DO_BEFORE_ACTION;
 
@@ -1471,256 +1497,288 @@ YY_RULE_SETUP
 { return reserved_word(yyscanner); }
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
 { return reserved_word(yyscanner); }
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 91:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 92:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 93:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 94:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 95:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 96:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 97:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+	YY_BREAK
+case 98:
+YY_RULE_SETUP
 {
    yylval->lex.string = NewPoolTString(yytext); 
    return check_type(yyscanner);
 }
 	YY_BREAK
-case 91:
+case 99:
 YY_RULE_SETUP
 { yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
 	YY_BREAK
-case 92:
-YY_RULE_SETUP
-{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
-	YY_BREAK
-case 93:
-YY_RULE_SETUP
-{ context->error(yylineno, "Invalid Octal number.", yytext, "", ""); context->recover(); return 0;}
-	YY_BREAK
-case 94:
+case 100:
 YY_RULE_SETUP
 { yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
 	YY_BREAK
-case 95:
-YY_RULE_SETUP
-{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
-	YY_BREAK
-case 96:
-YY_RULE_SETUP
-{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
-	YY_BREAK
-case 97:
-YY_RULE_SETUP
-{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
-	YY_BREAK
-case 98:
-YY_RULE_SETUP
-{  return(ADD_ASSIGN); }
-	YY_BREAK
-case 99:
-YY_RULE_SETUP
-{  return(SUB_ASSIGN); }
-	YY_BREAK
-case 100:
-YY_RULE_SETUP
-{  return(MUL_ASSIGN); }
-	YY_BREAK
 case 101:
 YY_RULE_SETUP
-{  return(DIV_ASSIGN); }
+{ context->error(yylineno, "Invalid Octal number.", yytext, "", ""); context->recover(); return 0;}
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
-{  return(MOD_ASSIGN); }
+{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
 	YY_BREAK
 case 103:
 YY_RULE_SETUP
-{  return(LEFT_ASSIGN); }
+{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
 	YY_BREAK
 case 104:
 YY_RULE_SETUP
-{  return(RIGHT_ASSIGN); }
+{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
-{  return(AND_ASSIGN); }
+{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
 	YY_BREAK
 case 106:
 YY_RULE_SETUP
+{  return(ADD_ASSIGN); }
+	YY_BREAK
+case 107:
+YY_RULE_SETUP
+{  return(SUB_ASSIGN); }
+	YY_BREAK
+case 108:
+YY_RULE_SETUP
+{  return(MUL_ASSIGN); }
+	YY_BREAK
+case 109:
+YY_RULE_SETUP
+{  return(DIV_ASSIGN); }
+	YY_BREAK
+case 110:
+YY_RULE_SETUP
+{  return(MOD_ASSIGN); }
+	YY_BREAK
+case 111:
+YY_RULE_SETUP
+{  return(LEFT_ASSIGN); }
+	YY_BREAK
+case 112:
+YY_RULE_SETUP
+{  return(RIGHT_ASSIGN); }
+	YY_BREAK
+case 113:
+YY_RULE_SETUP
+{  return(AND_ASSIGN); }
+	YY_BREAK
+case 114:
+YY_RULE_SETUP
 {  return(XOR_ASSIGN); }
 	YY_BREAK
-case 107:
+case 115:
 YY_RULE_SETUP
 {  return(OR_ASSIGN); }
 	YY_BREAK
-case 108:
+case 116:
 YY_RULE_SETUP
 {  return(INC_OP); }
 	YY_BREAK
-case 109:
+case 117:
 YY_RULE_SETUP
 {  return(DEC_OP); }
 	YY_BREAK
-case 110:
+case 118:
 YY_RULE_SETUP
 {  return(AND_OP); }
 	YY_BREAK
-case 111:
+case 119:
 YY_RULE_SETUP
 {  return(OR_OP); }
 	YY_BREAK
-case 112:
+case 120:
 YY_RULE_SETUP
 {  return(XOR_OP); }
 	YY_BREAK
-case 113:
+case 121:
 YY_RULE_SETUP
 {  return(LE_OP); }
 	YY_BREAK
-case 114:
+case 122:
 YY_RULE_SETUP
 {  return(GE_OP); }
 	YY_BREAK
-case 115:
+case 123:
 YY_RULE_SETUP
 {  return(EQ_OP); }
 	YY_BREAK
-case 116:
+case 124:
 YY_RULE_SETUP
 {  return(NE_OP); }
 	YY_BREAK
-case 117:
+case 125:
 YY_RULE_SETUP
 {  return(LEFT_OP); }
 	YY_BREAK
-case 118:
+case 126:
 YY_RULE_SETUP
 {  return(RIGHT_OP); }
 	YY_BREAK
-case 119:
+case 127:
 YY_RULE_SETUP
 { context->lexAfterType = false; return(SEMICOLON); }
 	YY_BREAK
-case 120:
+case 128:
 YY_RULE_SETUP
 { context->lexAfterType = false; return(LEFT_BRACE); }
 	YY_BREAK
-case 121:
+case 129:
 YY_RULE_SETUP
 { return(RIGHT_BRACE); }
 	YY_BREAK
-case 122:
+case 130:
 YY_RULE_SETUP
 { if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
 	YY_BREAK
-case 123:
+case 131:
 YY_RULE_SETUP
 { return(COLON); }
 	YY_BREAK
-case 124:
+case 132:
 YY_RULE_SETUP
 { context->lexAfterType = false; return(EQUAL); }
 	YY_BREAK
-case 125:
+case 133:
 YY_RULE_SETUP
 { context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
 	YY_BREAK
-case 126:
+case 134:
 YY_RULE_SETUP
 { context->inTypeParen = false; return(RIGHT_PAREN); }
 	YY_BREAK
-case 127:
+case 135:
 YY_RULE_SETUP
 { return(LEFT_BRACKET); }
 	YY_BREAK
-case 128:
+case 136:
 YY_RULE_SETUP
 { return(RIGHT_BRACKET); }
 	YY_BREAK
-case 129:
+case 137:
 YY_RULE_SETUP
 { BEGIN(FIELDS);  return(DOT); }
 	YY_BREAK
-case 130:
+case 138:
 YY_RULE_SETUP
 { return(BANG); }
 	YY_BREAK
-case 131:
+case 139:
 YY_RULE_SETUP
 { return(DASH); }
 	YY_BREAK
-case 132:
+case 140:
 YY_RULE_SETUP
 { return(TILDE); }
 	YY_BREAK
-case 133:
+case 141:
 YY_RULE_SETUP
 { return(PLUS); }
 	YY_BREAK
-case 134:
+case 142:
 YY_RULE_SETUP
 { return(STAR); }
 	YY_BREAK
-case 135:
+case 143:
 YY_RULE_SETUP
 { return(SLASH); }
 	YY_BREAK
-case 136:
+case 144:
 YY_RULE_SETUP
 { return(PERCENT); }
 	YY_BREAK
-case 137:
+case 145:
 YY_RULE_SETUP
 { return(LEFT_ANGLE); }
 	YY_BREAK
-case 138:
+case 146:
 YY_RULE_SETUP
 { return(RIGHT_ANGLE); }
 	YY_BREAK
-case 139:
+case 147:
 YY_RULE_SETUP
 { return(VERTICAL_BAR); }
 	YY_BREAK
-case 140:
+case 148:
 YY_RULE_SETUP
 { return(CARET); }
 	YY_BREAK
-case 141:
+case 149:
 YY_RULE_SETUP
 { return(AMPERSAND); }
 	YY_BREAK
-case 142:
+case 150:
 YY_RULE_SETUP
 { return(QUESTION); }
 	YY_BREAK
-case 143:
+case 151:
 YY_RULE_SETUP
 { 
     BEGIN(INITIAL);
     yylval->lex.string = NewPoolTString(yytext); 
     return FIELD_SELECTION;
 }
 	YY_BREAK
-case 144:
+case 152:
 YY_RULE_SETUP
 {}
 	YY_BREAK
-case 145:
-/* rule 145 can match eol */
+case 153:
+/* rule 153 can match eol */
 YY_RULE_SETUP
 {  }
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(COMMENT):
 case YY_STATE_EOF(FIELDS):
 { context->AfterEOF = true; yyterminate(); }
 	YY_BREAK
-case 146:
+case 154:
 YY_RULE_SETUP
 { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
 	YY_BREAK
-case 147:
+case 155:
 YY_RULE_SETUP
 ECHO;
 	YY_BREAK
 
 	case YY_END_OF_BUFFER:
 		{
 		/* Amount of text matched not including the EOB char. */
 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
@@ -2006,17 +2064,17 @@ static int yy_get_next_buffer (yyscan_t 
 		if ( yy_accept[yy_current_state] )
 			{
 			yyg->yy_last_accepting_state = yy_current_state;
 			yyg->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 >= 426 )
+			if ( yy_current_state >= 459 )
 				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;
 }
 
@@ -2035,21 +2093,21 @@ static int yy_get_next_buffer (yyscan_t 
 	if ( yy_accept[yy_current_state] )
 		{
 		yyg->yy_last_accepting_state = yy_current_state;
 		yyg->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 >= 426 )
+		if ( yy_current_state >= 459 )
 			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 == 425);
+	yy_is_jam = (yy_current_state == 458);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
 
 #ifndef YY_NO_INPUT
 #ifdef __cplusplus
     static int yyinput (yyscan_t yyscanner)
 #else
@@ -2912,17 +2970,17 @@ void CPPWarningToInfoLog(const char *msg
 
 void CPPShInfoLogMsg(const char *msg)
 {
     SETUP_CONTEXT(cpp);
     context->error(yylineno, msg, "", "");
     context->recover();
 }
 
-void CPPErrorToInfoLog(char *msg)
+void CPPErrorToInfoLog(const char *msg)
 {
     SETUP_CONTEXT(cpp);
     context->error(yylineno, msg, "", "");
     context->recover();
 }
 
 void SetLineNumber(int line)
 {
@@ -3192,24 +3250,20 @@ int glslang_initialize(TParseContext* co
 int glslang_finalize(TParseContext* context) {
     yyscan_t scanner = context->scanner;
     if (scanner == NULL) return 0;
     
     context->scanner = NULL;
     return yylex_destroy(scanner);
 }
 
-void glslang_scan(int count, const char* const string[], const int length[],
-                  TParseContext* context) {
+int glslang_scan(int count, const char* const string[], const int length[],
+                 TParseContext* context) {
     yyrestart(NULL,context->scanner);
     yyset_lineno(EncodeSourceLoc(0, 1),context->scanner);
     context->AfterEOF = false;
     
     // Init preprocessor.
     cpp->pC = context;
-    cpp->PaWhichStr = 0;
-    cpp->PaArgv     = string;
-    cpp->PaArgc     = count;
-    cpp->PaStrLen   = length;
     cpp->pastFirstStatement = 0;
-    ScanFromString(string[0]);
+    return InitScannerInput(cpp, count, string, length);
 }
 
--- a/gfx/angle/src/compiler/glslang_tab.cpp
+++ b/gfx/angle/src/compiler/glslang_tab.cpp
@@ -1,40 +1,38 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.4.2.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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.
-
+   the Free Software Foundation, either version 3 of the License, 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., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    under terms of your choice, so long as that work isn't itself a
    parser generator using the skeleton or a modified version thereof
    as a parser skeleton.  Alternatively, if you modify or redistribute
    the parser skeleton itself, you may (at your option) remove this
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
 /* C LALR(1) parser skeleton 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
@@ -42,29 +40,85 @@
    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
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.2"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
 
 /* Pure parsers.  */
 #define YYPURE 1
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 
 
+/* Copy the first part of user declarations.  */
+
+
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+// Ignore errors in auto-generated code.
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
+#endif
+
+#include "compiler/SymbolTable.h"
+#include "compiler/ParseHelper.h"
+#include "GLSLANG/ShaderLang.h"
+
+#define YYLEX_PARAM context->scanner
+
+
+
+/* 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
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */
    enum yytokentype {
      INVARIANT = 258,
      HIGH_PRECISION = 259,
@@ -156,161 +210,24 @@
      LEFT_ANGLE = 345,
      RIGHT_ANGLE = 346,
      VERTICAL_BAR = 347,
      CARET = 348,
      AMPERSAND = 349,
      QUESTION = 350
    };
 #endif
-/* Tokens.  */
-#define INVARIANT 258
-#define HIGH_PRECISION 259
-#define MEDIUM_PRECISION 260
-#define LOW_PRECISION 261
-#define PRECISION 262
-#define ATTRIBUTE 263
-#define CONST_QUAL 264
-#define BOOL_TYPE 265
-#define FLOAT_TYPE 266
-#define INT_TYPE 267
-#define BREAK 268
-#define CONTINUE 269
-#define DO 270
-#define ELSE 271
-#define FOR 272
-#define IF 273
-#define DISCARD 274
-#define RETURN 275
-#define BVEC2 276
-#define BVEC3 277
-#define BVEC4 278
-#define IVEC2 279
-#define IVEC3 280
-#define IVEC4 281
-#define VEC2 282
-#define VEC3 283
-#define VEC4 284
-#define MATRIX2 285
-#define MATRIX3 286
-#define MATRIX4 287
-#define IN_QUAL 288
-#define OUT_QUAL 289
-#define INOUT_QUAL 290
-#define UNIFORM 291
-#define VARYING 292
-#define STRUCT 293
-#define VOID_TYPE 294
-#define WHILE 295
-#define SAMPLER2D 296
-#define SAMPLERCUBE 297
-#define SAMPLER_EXTERNAL_OES 298
-#define SAMPLER2DRECT 299
-#define IDENTIFIER 300
-#define TYPE_NAME 301
-#define FLOATCONSTANT 302
-#define INTCONSTANT 303
-#define BOOLCONSTANT 304
-#define FIELD_SELECTION 305
-#define LEFT_OP 306
-#define RIGHT_OP 307
-#define INC_OP 308
-#define DEC_OP 309
-#define LE_OP 310
-#define GE_OP 311
-#define EQ_OP 312
-#define NE_OP 313
-#define AND_OP 314
-#define OR_OP 315
-#define XOR_OP 316
-#define MUL_ASSIGN 317
-#define DIV_ASSIGN 318
-#define ADD_ASSIGN 319
-#define MOD_ASSIGN 320
-#define LEFT_ASSIGN 321
-#define RIGHT_ASSIGN 322
-#define AND_ASSIGN 323
-#define XOR_ASSIGN 324
-#define OR_ASSIGN 325
-#define SUB_ASSIGN 326
-#define LEFT_PAREN 327
-#define RIGHT_PAREN 328
-#define LEFT_BRACKET 329
-#define RIGHT_BRACKET 330
-#define LEFT_BRACE 331
-#define RIGHT_BRACE 332
-#define DOT 333
-#define COMMA 334
-#define COLON 335
-#define EQUAL 336
-#define SEMICOLON 337
-#define BANG 338
-#define DASH 339
-#define TILDE 340
-#define PLUS 341
-#define STAR 342
-#define SLASH 343
-#define PERCENT 344
-#define LEFT_ANGLE 345
-#define RIGHT_ANGLE 346
-#define VERTICAL_BAR 347
-#define CARET 348
-#define AMPERSAND 349
-#define QUESTION 350
-
-
-
-
-/* Copy the first part of user declarations.  */
-
-
-//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-
-// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
-
-// Ignore errors in auto-generated code.
-#if defined(__GNUC__)
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#elif defined(_MSC_VER)
-#pragma warning(disable: 4065)
-#endif
-
-#include "compiler/SymbolTable.h"
-#include "compiler/ParseHelper.h"
-#include "GLSLANG/ShaderLang.h"
-
-#define YYLEX_PARAM context->scanner
-
-
-/* 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
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
+
+
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-
 {
+
+
     struct {
         TSourceLoc line;
         union {
             TString *string;
             float f;
             int i;
             bool b;
         };
@@ -330,27 +247,26 @@ typedef union YYSTYPE
             TPrecision precision;
             TQualifier qualifier;
             TFunction* function;
             TParameter param;
             TTypeLine typeLine;
             TTypeList* typeList;
         };
     } interm;
-}
-/* Line 187 of yacc.c.  */
-
-	YYSTYPE;
+
+
+
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # 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.  */
 
 
 extern int yylex(YYSTYPE* yylval_param, void* yyscanner);
 extern void yyerror(TParseContext* context, const char* reason);
 
 #define FRAG_VERT_ONLY(S, L) {  \
     if (context->shaderType != SH_FRAGMENT_SHADER &&  \
@@ -370,18 +286,16 @@ extern void yyerror(TParseContext* conte
 #define FRAG_ONLY(S, L) {  \
     if (context->shaderType != SH_FRAGMENT_SHADER) {  \
         context->error(L, " supported in fragment shaders only ", S, "", "");  \
         context->recover();  \
     }  \
 }
 
 
-/* Line 216 of yacc.c.  */
-
 
 #ifdef short
 # undef short
 #endif
 
 #ifdef YYTYPE_UINT8
 typedef YYTYPE_UINT8 yytype_uint8;
 #else
@@ -421,17 +335,17 @@ typedef short int yytype_int16;
 # else
 #  define YYSIZE_T unsigned int
 # endif
 #endif
 
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
 #  endif
 # endif
 # ifndef YY_
 #  define YY_(msgid) msgid
 # endif
@@ -446,24 +360,24 @@ typedef short int yytype_int16;
 
 /* Identity function, used to suppress warnings about constant conditions.  */
 #ifndef lint
 # define YYID(n) (n)
 #else
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
 #if ! defined yyoverflow || YYERROR_VERBOSE
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
 # ifdef YYSTACK_USE_ALLOCA
@@ -534,19 +448,19 @@ void free (void *); /* INFRINGES ON USER
 
 #if (! defined yyoverflow \
      && (! defined __cplusplus \
 	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
 
 /* 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 (yytype_int16) + sizeof (YYSTYPE)) \
@@ -570,42 +484,42 @@ union yyalloc
 #  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)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
     while (YYID (0))
 
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  71
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1370
+#define YYLAST   1416
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  96
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  80
+#define YYNNTS  83
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  197
+#define YYNRULES  201
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  300
+#define YYNSTATES  304
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
 #define YYMAXUTOK   350
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
@@ -666,26 +580,27 @@ static const yytype_uint16 yyprhs[] =
      225,   228,   234,   238,   241,   245,   248,   249,   251,   253,
      255,   257,   259,   263,   269,   276,   282,   284,   287,   292,
      298,   303,   306,   308,   311,   313,   315,   317,   320,   322,
      324,   327,   329,   331,   333,   335,   340,   342,   344,   346,
      348,   350,   352,   354,   356,   358,   360,   362,   364,   366,
      368,   370,   372,   374,   376,   378,   380,   382,   384,   385,
      392,   393,   399,   401,   404,   408,   410,   414,   416,   421,
      423,   425,   427,   429,   431,   433,   435,   437,   439,   442,
-     443,   444,   450,   452,   454,   457,   461,   463,   466,   468,
-     471,   477,   481,   483,   485,   490,   491,   498,   499,   508,
-     509,   517,   519,   521,   523,   524,   527,   531,   534,   537,
-     540,   544,   547,   549,   552,   554,   556,   557
+     443,   444,   450,   452,   454,   455,   458,   459,   462,   465,
+     469,   471,   474,   476,   479,   485,   489,   491,   493,   498,
+     499,   506,   507,   516,   517,   525,   527,   529,   531,   532,
+     535,   539,   542,   545,   548,   552,   555,   557,   560,   562,
+     564,   565
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-     172,     0,    -1,    45,    -1,    97,    -1,    48,    -1,    47,
+     175,     0,    -1,    45,    -1,    97,    -1,    48,    -1,    47,
       -1,    49,    -1,    72,   124,    73,    -1,    98,    -1,    99,
       74,   100,    75,    -1,   101,    -1,    99,    78,    50,    -1,
       99,    53,    -1,    99,    54,    -1,   124,    -1,   102,    -1,
      103,    -1,    99,    78,   103,    -1,   105,    73,    -1,   104,
       73,    -1,   106,    39,    -1,   106,    -1,   106,   122,    -1,
      105,    79,   122,    -1,   107,    72,    -1,   142,    -1,    45,
       -1,    50,    -1,    99,    -1,    53,   108,    -1,    54,   108,
       -1,   109,   108,    -1,    86,    -1,    84,    -1,    83,    -1,
@@ -718,55 +633,56 @@ static const yytype_int16 yyrhs[] =
       28,    -1,    29,    -1,    21,    -1,    22,    -1,    23,    -1,
       24,    -1,    25,    -1,    26,    -1,    30,    -1,    31,    -1,
       32,    -1,    41,    -1,    42,    -1,    43,    -1,    44,    -1,
      143,    -1,    46,    -1,    -1,    38,    45,    76,   144,   146,
       77,    -1,    -1,    38,    76,   145,   146,    77,    -1,   147,
       -1,   146,   147,    -1,   139,   148,    82,    -1,   149,    -1,
      148,    79,   149,    -1,    45,    -1,    45,    74,   125,    75,
       -1,   122,    -1,   126,    -1,   154,    -1,   153,    -1,   151,
-      -1,   160,    -1,   161,    -1,   164,    -1,   171,    -1,    76,
-      77,    -1,    -1,    -1,    76,   155,   159,   156,    77,    -1,
-     158,    -1,   153,    -1,    76,    77,    -1,    76,   159,    77,
-      -1,   152,    -1,   159,   152,    -1,    82,    -1,   124,    82,
-      -1,    18,    72,   124,    73,   162,    -1,   152,    16,   152,
-      -1,   152,    -1,   124,    -1,   137,    45,    81,   150,    -1,
-      -1,    40,    72,   165,   163,    73,   157,    -1,    -1,    15,
-     166,   152,    40,    72,   124,    73,    82,    -1,    -1,    17,
-      72,   167,   168,   170,    73,   157,    -1,   160,    -1,   151,
-      -1,   163,    -1,    -1,   169,    82,    -1,   169,    82,   124,
-      -1,    14,    82,    -1,    13,    82,    -1,    20,    82,    -1,
-      20,   124,    82,    -1,    19,    82,    -1,   173,    -1,   172,
-     173,    -1,   174,    -1,   126,    -1,    -1,   127,   175,   158,
-      -1
+      -1,   163,    -1,   164,    -1,   167,    -1,   174,    -1,    76,
+      77,    -1,    -1,    -1,    76,   155,   162,   156,    77,    -1,
+     161,    -1,   153,    -1,    -1,   159,   161,    -1,    -1,   160,
+     153,    -1,    76,    77,    -1,    76,   162,    77,    -1,   152,
+      -1,   162,   152,    -1,    82,    -1,   124,    82,    -1,    18,
+      72,   124,    73,   165,    -1,   158,    16,   158,    -1,   158,
+      -1,   124,    -1,   137,    45,    81,   150,    -1,    -1,    40,
+      72,   168,   166,    73,   157,    -1,    -1,    15,   169,   158,
+      40,    72,   124,    73,    82,    -1,    -1,    17,    72,   170,
+     171,   173,    73,   157,    -1,   163,    -1,   151,    -1,   166,
+      -1,    -1,   172,    82,    -1,   172,    82,   124,    -1,    14,
+      82,    -1,    13,    82,    -1,    20,    82,    -1,    20,   124,
+      82,    -1,    19,    82,    -1,   176,    -1,   175,   176,    -1,
+     177,    -1,   126,    -1,    -1,   127,   178,   161,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   160,   160,   195,   198,   211,   216,   221,   227,   230,
-     303,   306,   415,   425,   438,   446,   545,   548,   556,   560,
-     567,   571,   578,   584,   593,   601,   656,   663,   673,   676,
-     686,   696,   717,   718,   719,   724,   725,   734,   746,   747,
-     755,   766,   770,   771,   781,   791,   801,   814,   815,   825,
-     838,   842,   846,   850,   851,   864,   865,   878,   879,   892,
-     893,   910,   911,   924,   925,   926,   927,   928,   932,   935,
-     946,   954,   979,   984,   991,  1027,  1030,  1037,  1045,  1066,
-    1085,  1096,  1125,  1130,  1140,  1145,  1155,  1158,  1161,  1164,
-    1170,  1177,  1180,  1196,  1214,  1238,  1261,  1265,  1283,  1291,
-    1323,  1343,  1419,  1428,  1451,  1454,  1460,  1468,  1476,  1484,
-    1494,  1501,  1504,  1507,  1513,  1516,  1531,  1535,  1539,  1543,
-    1552,  1557,  1562,  1567,  1572,  1577,  1582,  1587,  1592,  1597,
-    1603,  1609,  1615,  1620,  1625,  1634,  1643,  1648,  1661,  1661,
-    1675,  1675,  1684,  1687,  1702,  1738,  1742,  1748,  1756,  1772,
-    1776,  1780,  1781,  1787,  1788,  1789,  1790,  1791,  1795,  1796,
-    1796,  1796,  1806,  1807,  1812,  1815,  1825,  1828,  1834,  1835,
-    1839,  1847,  1851,  1861,  1866,  1883,  1883,  1888,  1888,  1895,
-    1895,  1903,  1906,  1912,  1915,  1921,  1925,  1932,  1939,  1946,
-    1953,  1964,  1973,  1977,  1984,  1987,  1993,  1993
+       0,   165,   165,   200,   203,   216,   221,   226,   232,   235,
+     308,   311,   420,   430,   443,   451,   550,   553,   561,   565,
+     572,   576,   583,   589,   598,   606,   661,   668,   678,   681,
+     691,   701,   722,   723,   724,   729,   730,   739,   751,   752,
+     760,   771,   775,   776,   786,   796,   806,   819,   820,   830,
+     843,   847,   851,   855,   856,   869,   870,   883,   884,   897,
+     898,   915,   916,   929,   930,   931,   932,   933,   937,   940,
+     951,   959,   986,   991,   998,  1036,  1039,  1046,  1054,  1075,
+    1096,  1107,  1136,  1141,  1151,  1156,  1166,  1169,  1172,  1175,
+    1181,  1188,  1191,  1213,  1231,  1255,  1278,  1282,  1300,  1308,
+    1340,  1360,  1449,  1458,  1481,  1484,  1490,  1498,  1506,  1514,
+    1524,  1531,  1534,  1537,  1543,  1546,  1561,  1565,  1569,  1573,
+    1582,  1587,  1592,  1597,  1602,  1607,  1612,  1617,  1622,  1627,
+    1633,  1639,  1645,  1650,  1655,  1664,  1673,  1678,  1691,  1691,
+    1705,  1705,  1714,  1717,  1732,  1768,  1772,  1778,  1786,  1802,
+    1806,  1810,  1811,  1817,  1818,  1819,  1820,  1821,  1825,  1826,
+    1826,  1826,  1836,  1837,  1841,  1841,  1842,  1842,  1847,  1850,
+    1860,  1863,  1869,  1870,  1874,  1882,  1886,  1896,  1901,  1918,
+    1918,  1923,  1923,  1930,  1930,  1938,  1941,  1947,  1950,  1956,
+    1960,  1967,  1974,  1981,  1988,  1999,  2008,  2012,  2019,  2022,
+    2028,  2028
 };
 #endif
 
 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
@@ -800,26 +716,26 @@ static const char *const yytname[] =
   "assignment_expression", "assignment_operator", "expression",
   "constant_expression", "declaration", "function_prototype",
   "function_declarator", "function_header_with_parameters",
   "function_header", "parameter_declarator", "parameter_declaration",
   "parameter_qualifier", "parameter_type_specifier",
   "init_declarator_list", "single_declaration", "fully_specified_type",
   "type_qualifier", "type_specifier", "precision_qualifier",
   "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
-  "@1", "@2", "struct_declaration_list", "struct_declaration",
+  "$@1", "$@2", "struct_declaration_list", "struct_declaration",
   "struct_declarator_list", "struct_declarator", "initializer",
   "declaration_statement", "statement", "simple_statement",
-  "compound_statement", "@3", "@4", "statement_no_new_scope",
-  "compound_statement_no_new_scope", "statement_list",
-  "expression_statement", "selection_statement",
-  "selection_rest_statement", "condition", "iteration_statement", "@5",
-  "@6", "@7", "for_init_statement", "conditionopt", "for_rest_statement",
+  "compound_statement", "$@3", "$@4", "statement_no_new_scope",
+  "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
+  "statement_list", "expression_statement", "selection_statement",
+  "selection_rest_statement", "condition", "iteration_statement", "$@7",
+  "$@8", "$@9", "for_init_statement", "conditionopt", "for_rest_statement",
   "jump_statement", "translation_unit", "external_declaration",
-  "function_definition", "@8", 0
+  "function_definition", "$@10", 0
 };
 #endif
 
 # ifdef YYPRINT
 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
    token YYLEX-NUM.  */
 static const yytype_uint16 yytoknum[] =
 {
@@ -850,20 +766,21 @@ static const yytype_uint8 yyr1[] =
      131,   131,   132,   132,   132,   132,   133,   133,   133,   133,
      134,   135,   135,   135,   135,   135,   136,   136,   136,   136,
      136,   136,   137,   137,   138,   138,   138,   138,   138,   139,
      139,   140,   140,   140,   141,   141,   142,   142,   142,   142,
      142,   142,   142,   142,   142,   142,   142,   142,   142,   142,
      142,   142,   142,   142,   142,   142,   142,   142,   144,   143,
      145,   143,   146,   146,   147,   148,   148,   149,   149,   150,
      151,   152,   152,   153,   153,   153,   153,   153,   154,   155,
-     156,   154,   157,   157,   158,   158,   159,   159,   160,   160,
-     161,   162,   162,   163,   163,   165,   164,   166,   164,   167,
-     164,   168,   168,   169,   169,   170,   170,   171,   171,   171,
-     171,   171,   172,   172,   173,   173,   175,   174
+     156,   154,   157,   157,   159,   158,   160,   158,   161,   161,
+     162,   162,   163,   163,   164,   165,   165,   166,   166,   168,
+     167,   169,   167,   170,   167,   171,   171,   172,   172,   173,
+     173,   174,   174,   174,   174,   174,   175,   175,   176,   176,
+     178,   177
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
        0,     2,     1,     1,     1,     1,     1,     3,     1,     4,
        1,     3,     2,     2,     1,     1,     1,     3,     2,     2,
        2,     1,     2,     3,     2,     1,     1,     1,     1,     2,
@@ -875,462 +792,485 @@ static const yytype_uint8 yyr2[] =
        2,     5,     3,     2,     3,     2,     0,     1,     1,     1,
        1,     1,     3,     5,     6,     5,     1,     2,     4,     5,
        4,     2,     1,     2,     1,     1,     1,     2,     1,     1,
        2,     1,     1,     1,     1,     4,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     0,     6,
        0,     5,     1,     2,     3,     1,     3,     1,     4,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     2,     0,
-       0,     5,     1,     1,     2,     3,     1,     2,     1,     2,
-       5,     3,     1,     1,     4,     0,     6,     0,     8,     0,
-       7,     1,     1,     1,     0,     2,     3,     2,     2,     2,
-       3,     2,     1,     2,     1,     1,     0,     3
+       0,     5,     1,     1,     0,     2,     0,     2,     2,     3,
+       1,     2,     1,     2,     5,     3,     1,     1,     4,     0,
+       6,     0,     8,     0,     7,     1,     1,     1,     0,     2,
+       3,     2,     2,     2,     3,     2,     1,     2,     1,     1,
+       0,     3
 };
 
 /* 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 yytype_uint8 yydefact[] =
 {
        0,     0,   111,   112,   113,     0,   105,   104,   119,   117,
      118,   123,   124,   125,   126,   127,   128,   120,   121,   122,
      129,   130,   131,   108,   106,     0,   116,   132,   133,   134,
-     135,   137,   195,   196,     0,    76,    86,     0,    91,    96,
-       0,   102,     0,   109,   114,   136,     0,   192,   194,   107,
+     135,   137,   199,   200,     0,    76,    86,     0,    91,    96,
+       0,   102,     0,   109,   114,   136,     0,   196,   198,   107,
      101,     0,     0,   140,    71,     0,    74,    86,     0,    87,
       88,    89,    77,     0,    86,     0,    72,    97,   103,   110,
-       0,     1,   193,     0,   138,     0,     0,   197,    78,    83,
+       0,     1,   197,     0,   138,     0,     0,   201,    78,    83,
       85,    90,     0,    92,    79,     0,     0,     2,     5,     4,
        6,    27,     0,     0,     0,    34,    33,    32,     3,     8,
       28,    10,    15,    16,     0,     0,    21,     0,    35,     0,
       38,    41,    42,    47,    50,    51,    52,    53,    55,    57,
       59,    70,     0,    25,    73,     0,     0,     0,   142,     0,
-       0,   177,     0,     0,     0,     0,     0,   159,   164,   168,
-      35,    61,    68,     0,   150,     0,   114,   153,   166,   152,
+       0,   181,     0,     0,     0,     0,     0,   159,   168,   172,
+      35,    61,    68,     0,   150,     0,   114,   153,   170,   152,
      151,     0,   154,   155,   156,   157,    80,    82,    84,     0,
        0,    98,     0,   149,   100,    29,    30,     0,    12,    13,
        0,     0,    19,    18,     0,    20,    22,    24,    31,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,   115,     0,   147,     0,   145,   141,   143,
-     188,   187,     0,   179,     0,   191,   189,     0,   175,   158,
-       0,    64,    65,    66,    67,    63,     0,     0,   169,   165,
-     167,     0,    93,     0,    95,    99,     7,     0,    14,    26,
+     192,   191,   166,   183,     0,   195,   193,     0,   179,   158,
+       0,    64,    65,    66,    67,    63,     0,     0,   173,   169,
+     171,     0,    93,     0,    95,    99,     7,     0,    14,    26,
       11,    17,    23,    36,    37,    40,    39,    45,    46,    43,
       44,    48,    49,    54,    56,    58,     0,   139,     0,     0,
-     144,     0,     0,     0,   190,     0,   160,    62,    69,     0,
-      94,     9,     0,     0,   146,     0,   182,   181,   184,     0,
-     173,     0,     0,     0,    81,    60,   148,     0,   183,     0,
-       0,   172,   170,     0,     0,   161,     0,   185,     0,     0,
-       0,   163,   176,   162,     0,   186,   180,   171,   174,   178
+     144,     0,     0,     0,     0,     0,   194,     0,   160,    62,
+      69,     0,    94,     9,     0,     0,   146,     0,   165,   167,
+     186,   185,   188,   166,   177,     0,     0,     0,    81,    60,
+     148,     0,   187,     0,     0,   176,   174,     0,     0,   161,
+       0,   189,     0,   166,     0,   163,   180,   162,     0,   190,
+     184,   175,   178,   182
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
       -1,    98,    99,   100,   227,   101,   102,   103,   104,   105,
      106,   107,   140,   109,   110,   111,   112,   113,   114,   115,
      116,   117,   118,   119,   120,   141,   142,   216,   143,   122,
      144,   145,    34,    35,    36,    79,    62,    63,    80,    37,
       38,    39,    40,    41,    42,    43,   123,    45,   125,    75,
      127,   128,   196,   197,   164,   147,   148,   149,   150,   210,
-     273,   292,   293,   151,   152,   153,   282,   272,   154,   255,
-     202,   252,   268,   279,   280,   155,    46,    47,    48,    55
+     277,   296,   251,   252,   253,   297,   151,   152,   153,   286,
+     276,   154,   257,   202,   254,   272,   283,   284,   155,    46,
+      47,    48,    55
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -251
+#define YYPACT_NINF -266
 static const yytype_int16 yypact[] =
 {
-    1250,   -17,  -251,  -251,  -251,   113,  -251,  -251,  -251,  -251,
-    -251,  -251,  -251,  -251,  -251,  -251,  -251,  -251,  -251,  -251,
-    -251,  -251,  -251,  -251,  -251,   -39,  -251,  -251,  -251,  -251,
-    -251,  -251,  -251,   -65,   -34,   -10,    21,   -32,  -251,    28,
-     207,  -251,  1324,  -251,    56,  -251,  1206,  -251,  -251,  -251,
-    -251,  1324,    74,  -251,  -251,    86,  -251,    71,    95,  -251,
-    -251,  -251,  -251,   207,   119,   120,  -251,   -56,  -251,  -251,
-     971,  -251,  -251,    84,  -251,   207,   287,  -251,  -251,  -251,
-    -251,   124,   207,   -59,  -251,   773,   971,    98,  -251,  -251,
-    -251,  -251,   971,   971,   971,  -251,  -251,  -251,  -251,  -251,
-      35,  -251,  -251,  -251,   100,    -9,  1037,   102,  -251,   971,
-     -27,    -1,  -251,   -24,    99,  -251,  -251,  -251,   112,   111,
-     -51,  -251,   103,  -251,  -251,   207,   135,  1106,  -251,   101,
-     104,  -251,   109,   115,   106,   839,   117,   107,  -251,  -251,
-      39,  -251,  -251,   -11,  -251,   -65,    54,  -251,  -251,  -251,
-    -251,   371,  -251,  -251,  -251,  -251,   116,  -251,  -251,   905,
-     971,  -251,   118,  -251,  -251,  -251,  -251,     8,  -251,  -251,
-     971,  1287,  -251,  -251,   971,   125,  -251,  -251,  -251,   971,
-     971,   971,   971,   971,   971,   971,   971,   971,   971,   971,
-     971,   971,   971,  -251,  1149,   122,    17,  -251,  -251,  -251,
-    -251,  -251,   455,  -251,   971,  -251,  -251,    32,  -251,  -251,
-     455,  -251,  -251,  -251,  -251,  -251,   971,   971,  -251,  -251,
-    -251,   971,  -251,   123,  -251,  -251,  -251,   126,   121,  -251,
-     127,  -251,  -251,  -251,  -251,   -27,   -27,  -251,  -251,  -251,
-    -251,   -24,   -24,  -251,   112,   111,    79,  -251,   971,   135,
-    -251,   151,   623,    11,  -251,   707,   455,  -251,  -251,   128,
-    -251,  -251,   971,   130,  -251,   134,  -251,  -251,   707,   455,
-     121,   147,   136,   131,  -251,  -251,  -251,   971,  -251,   132,
-     142,   200,  -251,   139,   539,  -251,    19,   971,   539,   455,
-     971,  -251,  -251,  -251,   140,   121,  -251,  -251,  -251,  -251
+    1253,   -20,  -266,  -266,  -266,   148,  -266,  -266,  -266,  -266,
+    -266,  -266,  -266,  -266,  -266,  -266,  -266,  -266,  -266,  -266,
+    -266,  -266,  -266,  -266,  -266,   -39,  -266,  -266,  -266,  -266,
+    -266,  -266,  -266,   -18,    -2,     6,    21,   -61,  -266,    51,
+    1296,  -266,  1370,  -266,    25,  -266,  1209,  -266,  -266,  -266,
+    -266,  1370,    42,  -266,  -266,    50,  -266,    71,    95,  -266,
+    -266,  -266,  -266,  1296,   123,   105,  -266,     9,  -266,  -266,
+     974,  -266,  -266,    81,  -266,  1296,   290,  -266,  -266,  -266,
+    -266,   125,  1296,   -13,  -266,   776,   974,    99,  -266,  -266,
+    -266,  -266,   974,   974,   974,  -266,  -266,  -266,  -266,  -266,
+      35,  -266,  -266,  -266,   100,    -6,  1040,   104,  -266,   974,
+      36,   -64,  -266,   -21,   102,  -266,  -266,  -266,   113,   117,
+     -51,  -266,   108,  -266,  -266,  1296,   129,  1109,  -266,    97,
+     103,  -266,   112,   114,   106,   842,   115,   116,  -266,  -266,
+      39,  -266,  -266,   -43,  -266,   -18,    47,  -266,  -266,  -266,
+    -266,   374,  -266,  -266,  -266,  -266,   118,  -266,  -266,   908,
+     974,  -266,   120,  -266,  -266,  -266,  -266,    19,  -266,  -266,
+     974,  1333,  -266,  -266,   974,   119,  -266,  -266,  -266,   974,
+     974,   974,   974,   974,   974,   974,   974,   974,   974,   974,
+     974,   974,   974,  -266,  1152,   122,   -29,  -266,  -266,  -266,
+    -266,  -266,   121,  -266,   974,  -266,  -266,     5,  -266,  -266,
+     458,  -266,  -266,  -266,  -266,  -266,   974,   974,  -266,  -266,
+    -266,   974,  -266,   137,  -266,  -266,  -266,   138,   111,  -266,
+     142,  -266,  -266,  -266,  -266,    36,    36,  -266,  -266,  -266,
+    -266,   -21,   -21,  -266,   113,   117,    82,  -266,   974,   129,
+    -266,   175,    50,   626,   710,    38,  -266,   197,   458,  -266,
+    -266,   141,  -266,  -266,   974,   155,  -266,   145,  -266,  -266,
+    -266,  -266,   197,   121,   111,   186,   159,   160,  -266,  -266,
+    -266,   974,  -266,   166,   176,   236,  -266,   174,   542,  -266,
+      43,   974,   542,   121,   974,  -266,  -266,  -266,   177,   111,
+    -266,  -266,  -266,  -266
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -251,  -251,  -251,  -251,  -251,  -251,  -251,    50,  -251,  -251,
-    -251,  -251,   -44,  -251,   -21,  -251,   -62,   -20,  -251,  -251,
-    -251,    34,    36,    33,  -251,   -66,   -83,  -251,   -92,   -73,
-       7,    13,  -251,  -251,  -251,   143,   170,   176,   159,  -251,
-    -251,  -247,   -22,   -30,   237,   -15,     0,  -251,  -251,  -251,
-     129,  -122,  -251,    -6,  -159,    -8,  -140,  -250,  -251,  -251,
-    -251,   -41,   202,    48,     9,  -251,  -251,    -5,  -251,  -251,
-    -251,  -251,  -251,  -251,  -251,  -251,  -251,   213,  -251,  -251
+    -266,  -266,  -266,  -266,  -266,  -266,  -266,    85,  -266,  -266,
+    -266,  -266,   -44,  -266,   -15,  -266,   -55,   -19,  -266,  -266,
+    -266,    72,    70,    73,  -266,   -66,   -83,  -266,   -92,   -73,
+      13,    14,  -266,  -266,  -266,   180,   206,   201,   184,  -266,
+    -266,  -241,   -25,   -30,   262,    -4,     0,  -266,  -266,  -266,
+     143,  -122,  -266,    22,  -145,    16,  -144,  -226,  -266,  -266,
+    -266,   -17,  -265,  -266,  -266,   -54,    63,    20,  -266,  -266,
+       4,  -266,  -266,  -266,  -266,  -266,  -266,  -266,  -266,  -266,
+     231,  -266,  -266
 };
 
 /* 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 -117
+#define YYTABLE_NINF -165
 static const yytype_int16 yytable[] =
 {
-      44,   224,   167,   163,   121,   199,    52,    32,   271,   191,
-      68,   220,   162,    33,    64,   159,    84,    54,    85,   121,
-      49,   271,   160,   176,    58,    86,   108,    69,    50,     6,
-       7,   183,   184,    81,   291,    64,    73,    53,   291,    56,
-      44,   108,    44,   207,   192,   126,    44,    65,   165,   166,
-      66,    44,    81,    32,    59,    60,    61,    23,    24,    33,
-     179,   180,   251,    44,   173,   178,   185,   186,   217,    57,
-     174,   218,   199,    67,    58,    44,   146,   163,   228,     6,
-       7,   226,    44,   181,   269,   182,   223,   217,   168,   169,
-     217,   232,   294,   121,   -75,   126,   249,   126,   217,   250,
+      44,    77,   167,   163,   121,   199,    52,   220,   285,   191,
+      68,    64,   162,    32,    33,   224,   275,    49,    65,   121,
+     181,    66,   182,   176,    58,    50,   108,   269,   301,     6,
+       7,   275,    64,    81,   183,   184,   217,    53,    69,   218,
+      44,   108,    44,   207,   192,   126,    44,    73,   165,   166,
+     249,    44,    81,   250,    59,    60,    61,    23,    24,    32,
+      33,   159,   295,    44,    54,   178,   295,   173,   160,   185,
+     186,    56,   199,   174,    58,    44,   146,   163,   228,     6,
+       7,    84,    44,    85,   217,    57,   223,   256,   168,   169,
+      86,   232,   226,   121,   -75,   126,    67,   126,   217,    70,
      246,   211,   212,   213,    59,    60,    61,    23,    24,   170,
-     214,   217,   253,   171,   254,   108,   220,     2,     3,     4,
-     215,   237,   238,   239,   240,    44,   -25,    44,    70,   281,
-      70,   298,    49,   257,   258,   233,   234,   108,   108,   108,
-     108,   108,   108,   108,   108,   108,   108,   108,   259,   297,
-      74,   146,    59,    60,    61,   121,   187,   188,   217,   262,
-     235,   236,    76,   270,   126,    83,   124,   241,   242,   156,
-     -26,   189,   190,   172,   177,   263,   270,   108,   193,   275,
-     195,   203,   121,   200,   209,   286,   201,   204,   205,   208,
-     221,   265,   283,   225,    44,   295,   248,  -116,   260,   -27,
-     217,   261,   146,   274,   108,   276,   277,   163,   285,   284,
-     146,     2,     3,     4,   287,   288,   289,     8,     9,    10,
-     290,   231,   299,   243,   245,   157,   244,    78,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      82,   158,    51,   264,   266,    25,    26,   296,    27,    28,
-      29,    30,   146,    31,   194,   146,   146,    77,   256,    72,
-       0,   267,     0,   278,     0,     0,     0,     0,   146,   146,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   146,     0,     0,     0,   146,   146,
-       1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
-     129,   130,   131,     0,   132,   133,   134,   135,    11,    12,
+     214,   273,   255,   171,   220,   108,   298,   217,    74,   -25,
+     215,    70,   217,   179,   180,    44,    76,    44,   237,   238,
+     239,   240,    49,   259,   260,   233,   234,   108,   108,   108,
+     108,   108,   108,   108,   108,   108,   108,   108,   261,   302,
+      83,   146,     2,     3,     4,   121,    59,    60,    61,   187,
+     188,   217,   264,   124,   126,   274,   235,   236,   241,   242,
+     156,   -26,   189,   172,   195,   265,   177,   108,   190,   200,
+     274,   279,   121,   193,   203,   201,   204,   208,   205,   290,
+     217,  -116,   221,   209,    44,   225,   248,  -164,   268,   299,
+      58,     2,     3,     4,   108,     6,     7,     8,     9,    10,
+     146,   163,   262,   263,   -27,   267,   278,   281,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-       0,     0,     0,    23,    24,    25,    26,   136,    27,    28,
-      29,    30,    87,    31,    88,    89,    90,    91,     0,     0,
-      92,    93,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    94,
-       0,     0,     0,   137,   138,     0,     0,     0,     0,   139,
-      95,    96,     0,    97,     1,     2,     3,     4,     5,     6,
-       7,     8,     9,    10,   129,   130,   131,     0,   132,   133,
-     134,   135,    11,    12,    13,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,     0,     0,     0,    23,    24,    25,
-      26,   136,    27,    28,    29,    30,    87,    31,    88,    89,
-      90,    91,     0,     0,    92,    93,     0,     0,     0,     0,
+     280,   287,   288,    23,    24,    25,    26,   289,    27,    28,
+      29,    30,    87,    31,    88,    89,    90,    91,   291,   292,
+      92,    93,   293,   146,   146,   294,   231,   146,   146,   303,
+     244,   243,   157,    78,   245,    82,   158,    51,   194,    94,
+     270,   266,   146,   258,   271,   300,   282,    72,     0,     0,
+      95,    96,     0,    97,     0,     0,     0,     0,   146,     0,
+       0,     0,   146,     1,     2,     3,     4,     5,     6,     7,
+       8,     9,    10,   129,   130,   131,     0,   132,   133,   134,
+     135,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,     0,     0,     0,    23,    24,    25,    26,
+     136,    27,    28,    29,    30,    87,    31,    88,    89,    90,
+      91,     0,     0,    92,    93,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    94,     0,     0,     0,   137,   138,     0,     0,
+       0,     0,   139,    95,    96,     0,    97,     1,     2,     3,
+       4,     5,     6,     7,     8,     9,    10,   129,   130,   131,
+       0,   132,   133,   134,   135,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,     0,     0,     0,
+      23,    24,    25,    26,   136,    27,    28,    29,    30,    87,
+      31,    88,    89,    90,    91,     0,     0,    92,    93,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    94,     0,     0,     0,
+     137,   219,     0,     0,     0,     0,   139,    95,    96,     0,
+      97,     1,     2,     3,     4,     5,     6,     7,     8,     9,
+      10,   129,   130,   131,     0,   132,   133,   134,   135,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,     0,     0,     0,    23,    24,    25,    26,   136,    27,
+      28,    29,    30,    87,    31,    88,    89,    90,    91,     0,
+       0,    92,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      94,     0,     0,     0,   137,     0,     0,     0,     0,     0,
+     139,    95,    96,     0,    97,     1,     2,     3,     4,     5,
+       6,     7,     8,     9,    10,   129,   130,   131,     0,   132,
+     133,   134,   135,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,     0,     0,     0,    23,    24,
+      25,    26,   136,    27,    28,    29,    30,    87,    31,    88,
+      89,    90,    91,     0,     0,    92,    93,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    94,     0,     0,     0,   137,   219,     0,
-       0,     0,     0,   139,    95,    96,     0,    97,     1,     2,
-       3,     4,     5,     6,     7,     8,     9,    10,   129,   130,
-     131,     0,   132,   133,   134,   135,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,     0,     0,
-       0,    23,    24,    25,    26,   136,    27,    28,    29,    30,
-      87,    31,    88,    89,    90,    91,     0,     0,    92,    93,
+       0,     0,     0,     0,    94,     0,     0,     0,    76,     0,
+       0,     0,     0,     0,   139,    95,    96,     0,    97,     1,
+       2,     3,     4,     5,     6,     7,     8,     9,    10,   129,
+     130,   131,     0,   132,   133,   134,   135,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
+       0,     0,    23,    24,    25,    26,   136,    27,    28,    29,
+      30,    87,    31,    88,    89,    90,    91,     0,     0,    92,
+      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    94,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   139,    95,
+      96,     0,    97,     1,     2,     3,     4,     5,     6,     7,
+       8,     9,    10,     0,     0,     0,     0,     0,     0,     0,
+       0,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,     0,     0,     0,    23,    24,    25,    26,
+       0,    27,    28,    29,    30,    87,    31,    88,    89,    90,
+      91,     0,     0,    92,    93,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    94,     0,     0,     0,     8,     9,    10,     0,
+       0,     0,   139,    95,    96,     0,    97,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
+       0,     0,     0,     0,    25,    26,     0,    27,    28,    29,
+      30,    87,    31,    88,    89,    90,    91,     0,     0,    92,
+      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    94,     0,
+       0,   161,     8,     9,    10,     0,     0,     0,     0,    95,
+      96,     0,    97,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,     0,     0,     0,     0,     0,
+      25,    26,     0,    27,    28,    29,    30,    87,    31,    88,
+      89,    90,    91,     0,     0,    92,    93,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    94,     0,     0,
-       0,   137,     0,     0,     0,     0,     0,   139,    95,    96,
-       0,    97,     1,     2,     3,     4,     5,     6,     7,     8,
-       9,    10,   129,   130,   131,     0,   132,   133,   134,   135,
+       0,     0,     0,     0,    94,     0,     0,     0,     8,     9,
+      10,     0,     0,     0,   206,    95,    96,     0,    97,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,     0,     0,     0,     0,     0,    25,    26,     0,    27,
+      28,    29,    30,    87,    31,    88,    89,    90,    91,     0,
+       0,    92,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      94,     0,     0,   222,     8,     9,    10,     0,     0,     0,
+       0,    95,    96,     0,    97,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,     0,     0,     0,
+       0,     0,    25,    26,     0,    27,    28,    29,    30,    87,
+      31,    88,    89,    90,    91,     0,     0,    92,    93,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    94,     0,     0,     0,
+       8,     9,    10,     0,     0,     0,     0,    95,    96,     0,
+      97,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,     0,     0,     0,     0,     0,    25,   175,
+       0,    27,    28,    29,    30,    87,    31,    88,    89,    90,
+      91,     0,     0,    92,    93,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    94,     2,     3,     4,     0,     0,     0,     8,
+       9,    10,     0,    95,    96,     0,    97,     0,     0,     0,
       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,     0,     0,     0,    23,    24,    25,    26,   136,
-      27,    28,    29,    30,    87,    31,    88,    89,    90,    91,
-       0,     0,    92,    93,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    94,     0,     0,     0,    76,     0,     0,     0,     0,
-       0,   139,    95,    96,     0,    97,     1,     2,     3,     4,
+      21,    22,     0,     0,     0,     0,     0,    25,    26,     0,
+      27,    28,    29,    30,     0,    31,     2,     3,     4,     0,
+       0,     0,     8,     9,    10,     0,     0,     0,     0,     0,
+       0,     0,     0,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,     0,   198,     0,     0,     0,
+      25,    26,     0,    27,    28,    29,    30,     0,    31,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    71,
+       0,     0,     1,     2,     3,     4,     5,     6,     7,     8,
+       9,    10,     0,     0,     0,     0,     0,     0,     0,   247,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,     0,     0,     0,    23,    24,    25,    26,     0,
+      27,    28,    29,    30,     0,    31,     1,     2,     3,     4,
        5,     6,     7,     8,     9,    10,     0,     0,     0,     0,
        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
       17,    18,    19,    20,    21,    22,     0,     0,     0,    23,
-      24,    25,    26,     0,    27,    28,    29,    30,    87,    31,
-      88,    89,    90,    91,     0,     0,    92,    93,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    94,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   139,    95,    96,     0,    97,
-      58,     2,     3,     4,     0,     6,     7,     8,     9,    10,
-       0,     0,     0,     0,     0,     0,     0,     0,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-       0,     0,     0,    23,    24,    25,    26,     0,    27,    28,
-      29,    30,    87,    31,    88,    89,    90,    91,     0,     0,
-      92,    93,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    94,
-       0,     0,     0,     8,     9,    10,     0,     0,     0,     0,
-      95,    96,     0,    97,    11,    12,    13,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,     0,     0,     0,     0,
-       0,    25,    26,     0,    27,    28,    29,    30,    87,    31,
-      88,    89,    90,    91,     0,     0,    92,    93,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    94,     0,     0,   161,     8,
-       9,    10,     0,     0,     0,     0,    95,    96,     0,    97,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,     0,     0,     0,     0,     0,    25,    26,     0,
-      27,    28,    29,    30,    87,    31,    88,    89,    90,    91,
-       0,     0,    92,    93,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    94,     0,     0,     0,     8,     9,    10,     0,     0,
-       0,   206,    95,    96,     0,    97,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,     0,     0,
-       0,     0,     0,    25,    26,     0,    27,    28,    29,    30,
-      87,    31,    88,    89,    90,    91,     0,     0,    92,    93,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    94,     0,     0,
-     222,     8,     9,    10,     0,     0,     0,     0,    95,    96,
-       0,    97,    11,    12,    13,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,     0,     0,     0,     0,     0,    25,
-      26,     0,    27,    28,    29,    30,    87,    31,    88,    89,
-      90,    91,     0,     0,    92,    93,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    94,     0,     0,     0,     8,     9,    10,
-       0,     0,     0,     0,    95,    96,     0,    97,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-       0,     0,     0,     0,     0,    25,   175,     0,    27,    28,
-      29,    30,    87,    31,    88,    89,    90,    91,     0,     0,
-      92,    93,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    94,
+      24,    25,    26,     0,    27,    28,    29,    30,     0,    31,
        2,     3,     4,     0,     0,     0,     8,     9,    10,     0,
-      95,    96,     0,    97,     0,     0,     0,    11,    12,    13,
+       0,     0,     0,     0,     0,     0,     0,    11,    12,    13,
       14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
        0,     0,     0,     0,    25,    26,     0,    27,    28,    29,
-      30,     0,    31,     2,     3,     4,     0,     0,     0,     8,
-       9,    10,     0,     0,     0,     0,     0,     0,     0,     0,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,     0,   198,     0,     0,     0,    25,    26,     0,
-      27,    28,    29,    30,     0,    31,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    71,     0,     0,     1,
-       2,     3,     4,     5,     6,     7,     8,     9,    10,     0,
-       0,     0,     0,     0,     0,     0,   247,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
-       0,     0,    23,    24,    25,    26,     0,    27,    28,    29,
-      30,     0,    31,     1,     2,     3,     4,     5,     6,     7,
-       8,     9,    10,     0,     0,     0,     0,     0,     0,     0,
+      30,     0,    31,     8,     9,    10,     0,     0,     0,     0,
+       0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,     0,     0,     0,     0,
+       0,    25,    26,     0,    27,    28,    29,    30,   229,    31,
+       8,     9,    10,   230,     0,     0,     0,     0,     0,     0,
        0,    11,    12,    13,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,     0,     0,     0,    23,    24,    25,    26,
-       0,    27,    28,    29,    30,     0,    31,     8,     9,    10,
-       0,     0,     0,     0,     0,     0,     0,     0,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-       0,     0,     0,     0,     0,    25,    26,     0,    27,    28,
-      29,    30,   229,    31,     8,     9,    10,   230,     0,     0,
-       0,     0,     0,     0,     0,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,     0,     0,     0,
-       0,     0,    25,    26,     0,    27,    28,    29,    30,     0,
-      31
+      20,    21,    22,     0,     0,     0,     0,     0,    25,    26,
+       0,    27,    28,    29,    30,     0,    31
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,   160,    94,    86,    70,   127,    45,     0,   255,    60,
-      40,   151,    85,     0,    36,    74,    72,    82,    74,    85,
-      37,   268,    81,   106,     3,    81,    70,    42,    45,     8,
-       9,    55,    56,    63,   284,    57,    51,    76,   288,    73,
-      40,    85,    42,   135,    95,    75,    46,    79,    92,    93,
-      82,    51,    82,    46,    33,    34,    35,    36,    37,    46,
-      87,    88,   202,    63,    73,   109,    90,    91,    79,    79,
-      79,    82,   194,    45,     3,    75,    76,   160,   170,     8,
-       9,    73,    82,    84,    73,    86,   159,    79,    53,    54,
-      79,   174,    73,   159,    73,   125,    79,   127,    79,    82,
+       0,    55,    94,    86,    70,   127,    45,   151,   273,    60,
+      40,    36,    85,     0,     0,   160,   257,    37,    79,    85,
+      84,    82,    86,   106,     3,    45,    70,   253,   293,     8,
+       9,   272,    57,    63,    55,    56,    79,    76,    42,    82,
+      40,    85,    42,   135,    95,    75,    46,    51,    92,    93,
+      79,    51,    82,    82,    33,    34,    35,    36,    37,    46,
+      46,    74,   288,    63,    82,   109,   292,    73,    81,    90,
+      91,    73,   194,    79,     3,    75,    76,   160,   170,     8,
+       9,    72,    82,    74,    79,    79,   159,    82,    53,    54,
+      81,   174,    73,   159,    73,   125,    45,   127,    79,    74,
      192,    62,    63,    64,    33,    34,    35,    36,    37,    74,
-      71,    79,   204,    78,    82,   159,   256,     4,     5,     6,
-      81,   183,   184,   185,   186,   125,    72,   127,    74,   269,
-      74,   290,    37,   216,   217,   179,   180,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,   190,   191,   221,   289,
-      76,   151,    33,    34,    35,   221,    57,    58,    79,    80,
-     181,   182,    76,   255,   194,    45,    82,   187,   188,    45,
-      72,    59,    61,    73,    72,   248,   268,   221,    75,   262,
-      45,    72,   248,    82,    77,   277,    82,    72,    82,    72,
-      74,    40,    45,    75,   194,   287,    74,    72,    75,    72,
-      79,    75,   202,    75,   248,    75,    72,   290,    77,    73,
-     210,     4,     5,     6,    82,    73,    16,    10,    11,    12,
-      81,   171,    82,   189,   191,    82,   190,    57,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      64,    82,     5,   249,   252,    38,    39,   288,    41,    42,
-      43,    44,   252,    46,   125,   255,   256,    55,   210,    46,
-      -1,   252,    -1,   268,    -1,    -1,    -1,    -1,   268,   269,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   284,    -1,    -1,    -1,   288,   289,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    -1,    17,    18,    19,    20,    21,    22,
+      71,    73,   204,    78,   258,   159,    73,    79,    76,    72,
+      81,    74,    79,    87,    88,   125,    76,   127,   183,   184,
+     185,   186,    37,   216,   217,   179,   180,   181,   182,   183,
+     184,   185,   186,   187,   188,   189,   190,   191,   221,   294,
+      45,   151,     4,     5,     6,   221,    33,    34,    35,    57,
+      58,    79,    80,    82,   194,   257,   181,   182,   187,   188,
+      45,    72,    59,    73,    45,   248,    72,   221,    61,    82,
+     272,   264,   248,    75,    72,    82,    72,    72,    82,   281,
+      79,    72,    74,    77,   194,    75,    74,    76,   252,   291,
+       3,     4,     5,     6,   248,     8,     9,    10,    11,    12,
+     210,   294,    75,    75,    72,    40,    75,    72,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      -1,    -1,    -1,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    -1,    -1,
-      53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,
-      -1,    -1,    -1,    76,    77,    -1,    -1,    -1,    -1,    82,
-      83,    84,    -1,    86,     3,     4,     5,     6,     7,     8,
-       9,    10,    11,    12,    13,    14,    15,    -1,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    -1,    -1,    -1,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,
+      75,    45,    73,    36,    37,    38,    39,    77,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    82,    73,
+      53,    54,    16,   253,   254,    81,   171,   257,   258,    82,
+     190,   189,    82,    57,   191,    64,    82,     5,   125,    72,
+     254,   249,   272,   210,   254,   292,   272,    46,    -1,    -1,
+      83,    84,    -1,    86,    -1,    -1,    -1,    -1,   288,    -1,
+      -1,    -1,   292,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    -1,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    -1,    -1,    -1,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    72,    -1,    -1,    -1,    76,    77,    -1,    -1,
+      -1,    -1,    82,    83,    84,    -1,    86,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      -1,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    -1,    -1,    -1,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    -1,    -1,    53,    54,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,    -1,
+      76,    77,    -1,    -1,    -1,    -1,    82,    83,    84,    -1,
+      86,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    -1,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    -1,    -1,    -1,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    -1,
+      -1,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      72,    -1,    -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,
+      82,    83,    84,    -1,    86,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    -1,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    -1,    -1,    -1,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    -1,    -1,    53,    54,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    72,    -1,    -1,    -1,    76,    77,    -1,
-      -1,    -1,    -1,    82,    83,    84,    -1,    86,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    -1,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    -1,    -1,
-      -1,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    -1,    -1,    53,    54,
+      -1,    -1,    -1,    -1,    72,    -1,    -1,    -1,    76,    -1,
+      -1,    -1,    -1,    -1,    82,    83,    84,    -1,    86,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    -1,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
+      -1,    -1,    36,    37,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    -1,    -1,    53,
+      54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    83,
+      84,    -1,    86,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    -1,    -1,    -1,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    72,    -1,    -1,    -1,    10,    11,    12,    -1,
+      -1,    -1,    82,    83,    84,    -1,    86,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
+      -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    -1,    -1,    53,
+      54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,
+      -1,    75,    10,    11,    12,    -1,    -1,    -1,    -1,    83,
+      84,    -1,    86,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,
+      38,    39,    -1,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    -1,    -1,    53,    54,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,
-      -1,    76,    -1,    -1,    -1,    -1,    -1,    82,    83,    84,
-      -1,    86,     3,     4,     5,     6,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    -1,    17,    18,    19,    20,
+      -1,    -1,    -1,    -1,    72,    -1,    -1,    -1,    10,    11,
+      12,    -1,    -1,    -1,    82,    83,    84,    -1,    86,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    -1,    -1,    -1,    -1,    -1,    38,    39,    -1,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    -1,
+      -1,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      72,    -1,    -1,    75,    10,    11,    12,    -1,    -1,    -1,
+      -1,    83,    84,    -1,    86,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    -1,    -1,    -1,
+      -1,    -1,    38,    39,    -1,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    -1,    -1,    53,    54,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,    -1,
+      10,    11,    12,    -1,    -1,    -1,    -1,    83,    84,    -1,
+      86,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    -1,    -1,    -1,    -1,    -1,    38,    39,
+      -1,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    72,     4,     5,     6,    -1,    -1,    -1,    10,
+      11,    12,    -1,    83,    84,    -1,    86,    -1,    -1,    -1,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    -1,    -1,    -1,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    72,    -1,    -1,    -1,    76,    -1,    -1,    -1,    -1,
-      -1,    82,    83,    84,    -1,    86,     3,     4,     5,     6,
+      31,    32,    -1,    -1,    -1,    -1,    -1,    38,    39,    -1,
+      41,    42,    43,    44,    -1,    46,     4,     5,     6,    -1,
+      -1,    -1,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    -1,    77,    -1,    -1,    -1,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    46,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,
+      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    -1,    -1,    -1,    36,    37,    38,    39,    -1,
+      41,    42,    43,    44,    -1,    46,     3,     4,     5,     6,
        7,     8,     9,    10,    11,    12,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    -1,    -1,    -1,    36,
-      37,    38,    39,    -1,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    -1,    -1,    53,    54,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    82,    83,    84,    -1,    86,
-       3,     4,     5,     6,    -1,     8,     9,    10,    11,    12,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      -1,    -1,    -1,    36,    37,    38,    39,    -1,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    -1,    -1,
-      53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,
-      -1,    -1,    -1,    10,    11,    12,    -1,    -1,    -1,    -1,
-      83,    84,    -1,    86,    21,    22,    23,    24,    25,    26,
+      37,    38,    39,    -1,    41,    42,    43,    44,    -1,    46,
+       4,     5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
+      -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    46,    10,    11,    12,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    -1,    -1,    -1,    -1,
       -1,    38,    39,    -1,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    -1,    -1,    53,    54,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,    75,    10,
-      11,    12,    -1,    -1,    -1,    -1,    83,    84,    -1,    86,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    -1,    -1,    -1,    -1,    -1,    38,    39,    -1,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    72,    -1,    -1,    -1,    10,    11,    12,    -1,    -1,
-      -1,    82,    83,    84,    -1,    86,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    -1,    -1,
-      -1,    -1,    -1,    38,    39,    -1,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    -1,    -1,    53,    54,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,
-      75,    10,    11,    12,    -1,    -1,    -1,    -1,    83,    84,
-      -1,    86,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,    38,
-      39,    -1,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    72,    -1,    -1,    -1,    10,    11,    12,
-      -1,    -1,    -1,    -1,    83,    84,    -1,    86,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      -1,    -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    -1,    -1,
-      53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,
-       4,     5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,
-      83,    84,    -1,    86,    -1,    -1,    -1,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
-      -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,    43,
-      44,    -1,    46,     4,     5,     6,    -1,    -1,    -1,    10,
-      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    -1,    77,    -1,    -1,    -1,    38,    39,    -1,
-      41,    42,    43,    44,    -1,    46,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    77,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
-      -1,    -1,    36,    37,    38,    39,    -1,    41,    42,    43,
-      44,    -1,    46,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      10,    11,    12,    50,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    -1,    -1,    -1,    36,    37,    38,    39,
-      -1,    41,    42,    43,    44,    -1,    46,    10,    11,    12,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      -1,    -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,
-      43,    44,    45,    46,    10,    11,    12,    50,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    -1,    -1,    -1,
-      -1,    -1,    38,    39,    -1,    41,    42,    43,    44,    -1,
-      46
+      30,    31,    32,    -1,    -1,    -1,    -1,    -1,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    46
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
       12,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    36,    37,    38,    39,    41,    42,    43,
       44,    46,   126,   127,   128,   129,   130,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   172,   173,   174,    37,
-      45,   140,    45,    76,    82,   175,    73,    79,     3,    33,
+     138,   139,   140,   141,   142,   143,   175,   176,   177,    37,
+      45,   140,    45,    76,    82,   178,    73,    79,     3,    33,
       34,    35,   132,   133,   138,    79,    82,    45,   139,   141,
-      74,     0,   173,   141,    76,   145,    76,   158,   132,   131,
+      74,     0,   176,   141,    76,   145,    76,   161,   132,   131,
      134,   139,   133,    45,    72,    74,    81,    45,    47,    48,
       49,    50,    53,    54,    72,    83,    84,    86,    97,    98,
       99,   101,   102,   103,   104,   105,   106,   107,   108,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
      120,   121,   125,   142,    82,   144,   139,   146,   147,    13,
       14,    15,    17,    18,    19,    20,    40,    76,    77,    82,
      108,   121,   122,   124,   126,   127,   142,   151,   152,   153,
-     154,   159,   160,   161,   164,   171,    45,   131,   134,    74,
+     154,   162,   163,   164,   167,   174,    45,   131,   134,    74,
       81,    75,   125,   122,   150,   108,   108,   124,    53,    54,
       74,    78,    73,    73,    79,    39,   122,    72,   108,    87,
       88,    84,    86,    55,    56,    90,    91,    57,    58,    59,
       61,    60,    95,    75,   146,    45,   148,   149,    77,   147,
-      82,    82,   166,    72,    72,    82,    82,   124,    72,    77,
+      82,    82,   169,    72,    72,    82,    82,   124,    72,    77,
      155,    62,    63,    64,    71,    81,   123,    79,    82,    77,
      152,    74,    75,   125,   150,    75,    73,   100,   124,    45,
       50,   103,   122,   108,   108,   110,   110,   112,   112,   112,
      112,   113,   113,   117,   118,   119,   124,    77,    74,    79,
-      82,   152,   167,   124,    82,   165,   159,   122,   122,   125,
-      75,    75,    80,   125,   149,    40,   151,   160,   168,    73,
-     124,   137,   163,   156,    75,   122,    75,    72,   163,   169,
-     170,   152,   162,    45,    73,    77,   124,    82,    73,    16,
-      81,   153,   157,   158,    73,   124,   157,   152,   150,    82
+      82,   158,   159,   160,   170,   124,    82,   168,   162,   122,
+     122,   125,    75,    75,    80,   125,   149,    40,   161,   153,
+     151,   163,   171,    73,   124,   137,   166,   156,    75,   122,
+      75,    72,   166,   172,   173,   158,   165,    45,    73,    77,
+     124,    82,    73,    16,    81,   153,   157,   161,    73,   124,
+     157,   158,   150,    82
 };
 
 #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 yyerrorlab
 
 
 /* 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.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
 #define YYBACKUP(Token, Value)					\
 do								\
   if (yychar == YYEMPTY && yylen == 1)				\
     {								\
       yychar = (Token);						\
@@ -1377,17 +1317,17 @@ while (YYID (0))
 #endif
 
 
 /* YY_LOCATION_PRINT -- Print the location on the stream.
    This macro was not mandated originally: define only if we know
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
 	      (Loc).last_line,  (Loc).last_column)
 # else
 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 # endif
 #endif
@@ -1491,27 +1431,30 @@ yy_symbol_print (yyoutput, yytype, yyval
 /*------------------------------------------------------------------.
 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
 | TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
 # define YY_STACK_PRINT(Bottom, Top)				\
 do {								\
   if (yydebug)							\
     yy_stack_print ((Bottom), (Top));				\
 } while (YYID (0))
@@ -1536,21 +1479,21 @@ yy_reduce_print (yyvsp, yyrule, context)
   int yynrhs = yyr2[yyrule];
   int yyi;
   unsigned long int yylno = yyrline[yyrule];
   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
 	     yyrule - 1, yylno);
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       		       , context);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
 do {					\
   if (yydebug)				\
     yy_reduce_print (yyvsp, Rule, context); \
 } while (YYID (0))
@@ -1822,20 +1765,18 @@ yydestruct (yymsg, yytype, yyvaluep, con
 
   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
@@ -1844,20 +1785,19 @@ int yyparse (TParseContext* context);
 int yyparse ();
 #endif
 #endif /* ! YYPARSE_PARAM */
 
 
 
 
 
-
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
 yyparse (void *YYPARSE_PARAM)
 #else
 int
@@ -1871,84 +1811,85 @@ int
 yyparse (TParseContext* context)
 #else
 int
 yyparse (context)
     TParseContext* context;
 #endif
 #endif
 {
-  /* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-  int yystate;
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
   int yyn;
   int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
   char *yymsg = yymsgbuf;
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* 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.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-
-
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
+  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.  |
 `------------------------------------------------------------*/
@@ -1968,25 +1909,23 @@ int yynerrs;
 #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;
 	yytype_int16 *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 (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
 	yyvs = yyvs1;
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
       goto yyexhaustedlab;
@@ -1999,57 +1938,58 @@ int yynerrs;
 	yystacksize = YYMAXDEPTH;
 
       {
 	yytype_int16 *yyss1 = yyss;
 	union yyalloc *yyptr =
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, 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));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
 | yybackup.  |
 `-----------*/
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to look-ahead token.  */
+     lookahead token if we need one and don't already have one.  */
+
+  /* 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 look-ahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* 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)
     {
@@ -2071,30 +2011,26 @@ yybackup:
   if (yyn <= 0)
     {
       if (yyn == 0 || yyn == YYTABLE_NINF)
 	goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
 
   goto yynewstate;
 
 
 /*-----------------------------------------------------------.
@@ -2156,73 +2092,73 @@ yyreduce:
         if (variable->getType().getQualifier() == EvqConst ) {
             ConstantUnion* constArray = variable->getConstPointer();
             TType t(variable->getType());
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yyvsp[(1) - (1)].lex).line);
         } else
             (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
                                                      variable->getName(),
                                                      variable->getType(), (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 3:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 4:
 
     {
         //
         // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders,
         // check for overflow for constants
         //
         if (abs((yyvsp[(1) - (1)].lex).i) >= (1 << 16)) {
             context->error((yyvsp[(1) - (1)].lex).line, " integer constant overflow", "", "");
             context->recover();
         }
         ConstantUnion *unionArray = new ConstantUnion[1];
         unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 5:
 
     {
         ConstantUnion *unionArray = new ConstantUnion[1];
         unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 6:
 
     {
         ConstantUnion *unionArray = new ConstantUnion[1];
         unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 7:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 8:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 9:
 
     {
         if (!(yyvsp[(1) - (4)].interm.intermTypedNode)->isArray() && !(yyvsp[(1) - (4)].interm.intermTypedNode)->isMatrix() && !(yyvsp[(1) - (4)].interm.intermTypedNode)->isVector()) {
             if ((yyvsp[(1) - (4)].interm.intermTypedNode)->getAsSymbolNode())
                 context->error((yyvsp[(2) - (4)].lex).line, " left of '[' is not of type array, matrix, or vector ", (yyvsp[(1) - (4)].interm.intermTypedNode)->getAsSymbolNode()->getSymbol().c_str(), "");
@@ -2289,24 +2225,24 @@ yyreduce:
         else if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isMatrix())
             (yyval.interm.intermTypedNode)->setType(TType((yyvsp[(1) - (4)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getPrecision(), EvqTemporary, (yyvsp[(1) - (4)].interm.intermTypedNode)->getNominalSize()));
         else if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isVector() && (yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getQualifier() == EvqConst)
             (yyval.interm.intermTypedNode)->setType(TType((yyvsp[(1) - (4)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getPrecision(), EvqConst));
         else if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isVector())
             (yyval.interm.intermTypedNode)->setType(TType((yyvsp[(1) - (4)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getPrecision(), EvqTemporary));
         else
             (yyval.interm.intermTypedNode)->setType((yyvsp[(1) - (4)].interm.intermTypedNode)->getType());
-    ;}
+    }
     break;
 
   case 10:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 11:
 
     {
         if ((yyvsp[(1) - (3)].interm.intermTypedNode)->isArray()) {
             context->error((yyvsp[(3) - (3)].lex).line, "cannot apply dot operator to an array", ".", "");
             context->recover();
@@ -2409,54 +2345,54 @@ yyreduce:
                 }
             }
         } else {
             context->error((yyvsp[(2) - (3)].lex).line, " field selection requires structure, vector, or matrix on left hand side", (yyvsp[(3) - (3)].lex).string->c_str(), "");
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
         // don't delete $3.string, it's from the pool
-    ;}
+    }
     break;
 
   case 12:
 
     {
         if (context->lValueErrorCheck((yyvsp[(2) - (2)].lex).line, "++", (yyvsp[(1) - (2)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yyvsp[(2) - (2)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->unaryOpError((yyvsp[(2) - (2)].lex).line, "++", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 13:
 
     {
         if (context->lValueErrorCheck((yyvsp[(2) - (2)].lex).line, "--", (yyvsp[(1) - (2)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yyvsp[(2) - (2)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->unaryOpError((yyvsp[(2) - (2)].lex).line, "--", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 14:
 
     {
         if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
             context->recover();
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 15:
 
     {
         TFunction* fnCall = (yyvsp[(1) - (1)].interm).function;
         TOperator op = fnCall->getBuiltInOp();
 
@@ -2546,92 +2482,92 @@ yyreduce:
                 // Put on a dummy node for error recovery
                 ConstantUnion *unionArray = new ConstantUnion[1];
                 unionArray->setFConst(0.0f);
                 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].interm).line);
                 context->recover();
             }
         }
         delete fnCall;
-    ;}
+    }
     break;
 
   case 16:
 
     {
         (yyval.interm) = (yyvsp[(1) - (1)].interm);
-    ;}
+    }
     break;
 
   case 17:
 
     {
         context->error((yyvsp[(3) - (3)].interm).line, "methods are not supported", "", "");
         context->recover();
         (yyval.interm) = (yyvsp[(3) - (3)].interm);
-    ;}
+    }
     break;
 
   case 18:
 
     {
         (yyval.interm) = (yyvsp[(1) - (2)].interm);
         (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
-    ;}
+    }
     break;
 
   case 19:
 
     {
         (yyval.interm) = (yyvsp[(1) - (2)].interm);
         (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
-    ;}
+    }
     break;
 
   case 20:
 
     {
         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
         (yyval.interm).intermNode = 0;
-    ;}
+    }
     break;
 
   case 21:
 
     {
         (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
         (yyval.interm).intermNode = 0;
-    ;}
+    }
     break;
 
   case 22:
 
     {
         TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
         (yyvsp[(1) - (2)].interm.function)->addParameter(param);
         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
         (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 23:
 
     {
         TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
         (yyvsp[(1) - (3)].interm).function->addParameter(param);
         (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
         (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line);
-    ;}
+    }
     break;
 
   case 24:
 
     {
         (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
-    ;}
+    }
     break;
 
   case 25:
 
     {
         //
         // Constructor
         //
@@ -2680,74 +2616,74 @@ yyreduce:
                 (yyvsp[(1) - (1)].interm.type).type = EbtFloat;
                 op = EOpConstructFloat;
             }
         }
         TString tempString;
         TType type((yyvsp[(1) - (1)].interm.type));
         TFunction *function = new TFunction(&tempString, type, op);
         (yyval.interm.function) = function;
-    ;}
+    }
     break;
 
   case 26:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
             context->recover();
         TType type(EbtVoid, EbpUndefined);
         TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
         (yyval.interm.function) = function;
-    ;}
+    }
     break;
 
   case 27:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
             context->recover();
         TType type(EbtVoid, EbpUndefined);
         TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
         (yyval.interm.function) = function;
-    ;}
+    }
     break;
 
   case 28:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 29:
 
     {
         if (context->lValueErrorCheck((yyvsp[(1) - (2)].lex).line, "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yyvsp[(1) - (2)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->unaryOpError((yyvsp[(1) - (2)].lex).line, "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 30:
 
     {
         if (context->lValueErrorCheck((yyvsp[(1) - (2)].lex).line, "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yyvsp[(1) - (2)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->unaryOpError((yyvsp[(1) - (2)].lex).line, "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 31:
 
     {
         if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
             (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yyvsp[(1) - (2)].interm).line, context->symbolTable);
             if ((yyval.interm.intermTypedNode) == 0) {
@@ -2758,268 +2694,268 @@ yyreduce:
                 default: break;
                 }
                 context->unaryOpError((yyvsp[(1) - (2)].interm).line, errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
                 context->recover();
                 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
             }
         } else
             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 32:
 
-    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNull; ;}
+    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNull; }
     break;
 
   case 33:
 
-    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNegative; ;}
+    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNegative; }
     break;
 
   case 34:
 
-    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpLogicalNot; ;}
+    { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpLogicalNot; }
     break;
 
   case 35:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 36:
 
     {
         FRAG_VERT_ONLY("*", (yyvsp[(2) - (3)].lex).line);
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 37:
 
     {
         FRAG_VERT_ONLY("/", (yyvsp[(2) - (3)].lex).line);
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 38:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 39:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "+", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 40:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "-", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 41:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 42:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 43:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "<", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 44:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, ">", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 45:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "<=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 46:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, ">=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 47:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 48:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "==", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 49:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "!=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 50:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 51:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 52:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 53:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 54:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "&&", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 55:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 56:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "^^", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 57:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 58:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line, context->symbolTable);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, "||", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             ConstantUnion *unionArray = new ConstantUnion[1];
             unionArray->setBConst(false);
             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 59:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 60:
 
     {
        if (context->boolErrorCheck((yyvsp[(2) - (5)].lex).line, (yyvsp[(1) - (5)].interm.intermTypedNode)))
             context->recover();
 
@@ -3027,89 +2963,89 @@ yyreduce:
         if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType())
             (yyval.interm.intermTypedNode) = 0;
 
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (5)].lex).line, ":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 61:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 62:
 
     {
         if (context->lValueErrorCheck((yyvsp[(2) - (3)].interm).line, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].interm).line);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->assignError((yyvsp[(2) - (3)].interm).line, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 63:
 
-    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAssign; ;}
+    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAssign; }
     break;
 
   case 64:
 
-    { FRAG_VERT_ONLY("*=", (yyvsp[(1) - (1)].lex).line);     (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpMulAssign; ;}
+    { FRAG_VERT_ONLY("*=", (yyvsp[(1) - (1)].lex).line);     (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpMulAssign; }
     break;
 
   case 65:
 
-    { FRAG_VERT_ONLY("/=", (yyvsp[(1) - (1)].lex).line);     (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpDivAssign; ;}
+    { FRAG_VERT_ONLY("/=", (yyvsp[(1) - (1)].lex).line);     (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpDivAssign; }
     break;
 
   case 66:
 
-    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAddAssign; ;}
+    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAddAssign; }
     break;
 
   case 67:
 
-    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpSubAssign; ;}
+    {                                    (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpSubAssign; }
     break;
 
   case 68:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 69:
 
     {
         (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line);
         if ((yyval.interm.intermTypedNode) == 0) {
             context->binaryOpError((yyvsp[(2) - (3)].lex).line, ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
             context->recover();
             (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
         }
-    ;}
+    }
     break;
 
   case 70:
 
     {
         if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
             context->recover();
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
+    }
     break;
 
   case 71:
 
     {
         TFunction &function = *((yyvsp[(1) - (2)].interm).function);
         
         TIntermAggregate *prototype = new TIntermAggregate;
@@ -3128,34 +3064,36 @@ yyreduce:
             else
             {
                 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yyvsp[(1) - (2)].interm).line), (yyvsp[(1) - (2)].interm).line);
             }
         }
         
         prototype->setOp(EOpPrototype);
         (yyval.interm.intermNode) = prototype;
-    ;}
+
+        context->symbolTable.pop();
+    }
     break;
 
   case 72:
 
     {
         if ((yyvsp[(1) - (2)].interm).intermAggregate)
             (yyvsp[(1) - (2)].interm).intermAggregate->setOp(EOpDeclaration);
         (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermAggregate;
-    ;}
+    }
     break;
 
   case 73:
 
     {
         context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type).type, (yyvsp[(2) - (4)].interm.precision) );
         (yyval.interm.intermNode) = 0;
-    ;}
+    }
     break;
 
   case 74:
 
     {
         //
         // Multiple declarations of the same function are allowed.
         //
@@ -3181,44 +3119,46 @@ yyreduce:
         //
         // If this is a redeclaration, it could also be a definition,
         // in which case, we want to use the variable names from this one, and not the one that's
         // being redeclared.  So, pass back up this declaration, not the one in the symbol table.
         //
         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
         (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
 
-        context->symbolTable.insert(*(yyval.interm).function);
-    ;}
+        // We're at the inner scope level of the function's arguments and body statement.
+        // Add the function prototype to the surrounding scope instead.
+        context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
+    }
     break;
 
   case 75:
 
     {
         (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
-    ;}
+    }
     break;
 
   case 76:
 
     {
         (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
-    ;}
+    }
     break;
 
   case 77:
 
     {
         // Add the parameter
         (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
         if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
             (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
         else
             delete (yyvsp[(2) - (2)].interm).param.type;
-    ;}
+    }
     break;
 
   case 78:
 
     {
         //
         // Only first parameter of one-parameter functions can be void
         // The check for named parameters not being void is done in parameter_declarator
@@ -3230,17 +3170,17 @@ yyreduce:
             context->error((yyvsp[(2) - (3)].lex).line, "cannot be an argument type except for '(void)'", "void", "");
             context->recover();
             delete (yyvsp[(3) - (3)].interm).param.type;
         } else {
             // Add the parameter
             (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
             (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
         }
-    ;}
+    }
     break;
 
   case 79:
 
     {
         if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
             context->error((yyvsp[(2) - (3)].lex).line, "no qualifiers allowed for function return", getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier), "");
             context->recover();
@@ -3249,32 +3189,34 @@ yyreduce:
         if (context->structQualifierErrorCheck((yyvsp[(2) - (3)].lex).line, (yyvsp[(1) - (3)].interm.type)))
             context->recover();
 
         // Add the function as a prototype after parsing it (we do not support recursion)
         TFunction *function;
         TType type((yyvsp[(1) - (3)].interm.type));
         function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
         (yyval.interm.function) = function;
-    ;}
+        
+        context->symbolTable.push();
+    }
     break;
 
   case 80:
 
     {
         if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
             context->error((yyvsp[(2) - (2)].lex).line, "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str(), "");
             context->recover();
         }
         if (context->reservedErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string))
             context->recover();
         TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
         (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
         (yyval.interm).param = param;
-    ;}
+    }
     break;
 
   case 81:
 
     {
         // Check that we can make an array out of this type
         if (context->arrayTypeErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm.type)))
             context->recover();
@@ -3286,120 +3228,126 @@ yyreduce:
         if (context->arraySizeErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(4) - (5)].interm.intermTypedNode), size))
             context->recover();
         (yyvsp[(1) - (5)].interm.type).setArray(true, size);
 
         TType* type = new TType((yyvsp[(1) - (5)].interm.type));
         TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
         (yyval.interm).line = (yyvsp[(2) - (5)].lex).line;
         (yyval.interm).param = param;
-    ;}
+    }
     break;
 
   case 82:
 
     {
         (yyval.interm) = (yyvsp[(3) - (3)].interm);
         if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
             context->recover();
-    ;}
+    }
     break;
 
   case 83:
 
     {
         (yyval.interm) = (yyvsp[(2) - (2)].interm);
         if (context->parameterSamplerErrorCheck((yyvsp[(2) - (2)].interm).line, (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
             context->recover();
         if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
             context->recover();
-    ;}
+    }
     break;
 
   case 84:
 
     {
         (yyval.interm) = (yyvsp[(3) - (3)].interm);
         if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
             context->recover();
-    ;}
+    }
     break;
 
   case 85:
 
     {
         (yyval.interm) = (yyvsp[(2) - (2)].interm);
         if (context->parameterSamplerErrorCheck((yyvsp[(2) - (2)].interm).line, (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
             context->recover();
         if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
             context->recover();
-    ;}
+    }
     break;
 
   case 86:
 
     {
         (yyval.interm.qualifier) = EvqIn;
-    ;}
+    }
     break;
 
   case 87:
 
     {
         (yyval.interm.qualifier) = EvqIn;
-    ;}
+    }
     break;
 
   case 88:
 
     {
         (yyval.interm.qualifier) = EvqOut;
-    ;}
+    }
     break;
 
   case 89:
 
     {
         (yyval.interm.qualifier) = EvqInOut;
-    ;}
+    }
     break;
 
   case 90:
 
     {
         TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
         (yyval.interm).param = param;
-    ;}
+    }
     break;
 
   case 91:
 
     {
         (yyval.interm) = (yyvsp[(1) - (1)].interm);
-    ;}
+    }
     break;
 
   case 92:
 
     {
+        if ((yyvsp[(1) - (3)].interm).type.type == EbtInvariant && !(yyvsp[(3) - (3)].lex).symbol)
+        {
+            context->error((yyvsp[(3) - (3)].lex).line, "undeclared identifier declared as invariant", (yyvsp[(3) - (3)].lex).string->c_str(), "");
+            context->recover();
+        }
+
         TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(3) - (3)].lex).string, TType((yyvsp[(1) - (3)].interm).type), (yyvsp[(3) - (3)].lex).line);
         (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, symbol, (yyvsp[(3) - (3)].lex).line);
         
         if (context->structQualifierErrorCheck((yyvsp[(3) - (3)].lex).line, (yyval.interm).type))
             context->recover();
 
         if (context->nonInitConstErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type))
             context->recover();
 
         TVariable* variable = 0;
         if (context->nonInitErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type, variable))
             context->recover();
         if (symbol && variable)
             symbol->setId(variable->getUniqueId());
-    ;}
+    }
     break;
 
   case 93:
 
     {
         if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
             context->recover();
 
@@ -3411,17 +3359,17 @@ yyreduce:
         if (context->arrayTypeErrorCheck((yyvsp[(4) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type) || context->arrayQualifierErrorCheck((yyvsp[(4) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
             context->recover();
         else {
             (yyvsp[(1) - (5)].interm).type.setArray(true);
             TVariable* variable;
             if (context->arrayErrorCheck((yyvsp[(4) - (5)].lex).line, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, variable))
                 context->recover();
         }
-    ;}
+    }
     break;
 
   case 94:
 
     {
         if (context->structQualifierErrorCheck((yyvsp[(3) - (6)].lex).line, (yyvsp[(1) - (6)].interm).type))
             context->recover();
 
@@ -3439,17 +3387,17 @@ yyreduce:
             (yyvsp[(1) - (6)].interm).type.setArray(true, size);
             TVariable* variable = 0;
             if (context->arrayErrorCheck((yyvsp[(4) - (6)].lex).line, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, variable))
                 context->recover();
             TType type = TType((yyvsp[(1) - (6)].interm).type);
             type.setArraySize(size);
             (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, context->intermediate.addSymbol(variable ? variable->getUniqueId() : 0, *(yyvsp[(3) - (6)].lex).string, type, (yyvsp[(3) - (6)].lex).line), (yyvsp[(3) - (6)].lex).line);
         }
-    ;}
+    }
     break;
 
   case 95:
 
     {
         if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
             context->recover();
 
@@ -3463,25 +3411,25 @@ yyreduce:
             if (intermNode)
         (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (5)].interm).intermNode, intermNode, (yyvsp[(4) - (5)].lex).line);
             else
                 (yyval.interm).intermAggregate = (yyvsp[(1) - (5)].interm).intermAggregate;
         } else {
             context->recover();
             (yyval.interm).intermAggregate = 0;
         }
-    ;}
+    }
     break;
 
   case 96:
 
     {
         (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
         (yyval.interm).intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, "", TType((yyvsp[(1) - (1)].interm.type)), (yyvsp[(1) - (1)].interm.type).line), (yyvsp[(1) - (1)].interm.type).line);
-    ;}
+    }
     break;
 
   case 97:
 
     {
         TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyvsp[(1) - (2)].interm.type)), (yyvsp[(2) - (2)].lex).line);
         (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (2)].lex).line);
         
@@ -3493,29 +3441,29 @@ yyreduce:
             
             (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
 
         TVariable* variable = 0;
         if (context->nonInitErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type, variable))
             context->recover();
         if (variable && symbol)
             symbol->setId(variable->getUniqueId());
-    ;}
+    }
     break;
 
   case 98:
 
     {
         context->error((yyvsp[(2) - (4)].lex).line, "unsized array declarations not supported", (yyvsp[(2) - (4)].lex).string->c_str(), "");
         context->recover();
 
         TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).string, TType((yyvsp[(1) - (4)].interm.type)), (yyvsp[(2) - (4)].lex).line);
         (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (4)].lex).line);
         (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
-    ;}
+    }
     break;
 
   case 99:
 
     {
         TType type = TType((yyvsp[(1) - (5)].interm.type));
         int size;
         if (context->arraySizeErrorCheck((yyvsp[(2) - (5)].lex).line, (yyvsp[(4) - (5)].interm.intermTypedNode), size))
@@ -3541,17 +3489,17 @@ yyreduce:
 
             (yyvsp[(1) - (5)].interm.type).setArray(true, size);
             TVariable* variable = 0;
             if (context->arrayErrorCheck((yyvsp[(3) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), variable))
                 context->recover();
             if (variable && symbol)
                 symbol->setId(variable->getUniqueId());
         }
-    ;}
+    }
     break;
 
   case 100:
 
     {
         if (context->structQualifierErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
             context->recover();
 
@@ -3565,39 +3513,52 @@ yyreduce:
             if(intermNode)
                 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(intermNode, (yyvsp[(3) - (4)].lex).line);
             else
                 (yyval.interm).intermAggregate = 0;
         } else {
             context->recover();
             (yyval.interm).intermAggregate = 0;
         }
-    ;}
+    }
     break;
 
   case 101:
 
     {
         VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line);
-        (yyval.interm).qualifier = EvqInvariantVaryingOut;
-        (yyval.interm).intermAggregate = 0;
-    ;}
+        if (context->globalErrorCheck((yyvsp[(1) - (2)].lex).line, context->symbolTable.atGlobalLevel(), "invariant varying"))
+            context->recover();
+        (yyval.interm).type.setBasic(EbtInvariant, EvqInvariantVaryingOut, (yyvsp[(2) - (2)].lex).line);
+        if (!(yyvsp[(2) - (2)].lex).symbol)
+        {
+            context->error((yyvsp[(2) - (2)].lex).line, "undeclared identifier declared as invariant", (yyvsp[(2) - (2)].lex).string->c_str(), "");
+            context->recover();
+            
+            (yyval.interm).intermAggregate = 0;
+        }
+        else
+        {
+            TIntermSymbol *symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyval.interm).type), (yyvsp[(2) - (2)].lex).line);
+            (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (2)].lex).line);
+        }
+    }
     break;
 
   case 102:
 
     {
         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
 
         if ((yyvsp[(1) - (1)].interm.type).array) {
             context->error((yyvsp[(1) - (1)].interm.type).line, "not supported", "first-class array", "");
             context->recover();
             (yyvsp[(1) - (1)].interm.type).setArray(false);
         }
-    ;}
+    }
     break;
 
   case 103:
 
     {
         if ((yyvsp[(2) - (2)].interm.type).array) {
             context->error((yyvsp[(2) - (2)].interm.type).line, "not supported", "first-class array", "");
             context->recover();
@@ -3611,348 +3572,348 @@ yyreduce:
         }
         if (((yyvsp[(1) - (2)].interm.type).qualifier == EvqVaryingIn || (yyvsp[(1) - (2)].interm.type).qualifier == EvqVaryingOut) &&
             ((yyvsp[(2) - (2)].interm.type).type == EbtBool || (yyvsp[(2) - (2)].interm.type).type == EbtInt)) {
             context->error((yyvsp[(2) - (2)].interm.type).line, "cannot be bool or int", getQualifierString((yyvsp[(1) - (2)].interm.type).qualifier), "");
             context->recover();
         }
         (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
         (yyval.interm.type).qualifier = (yyvsp[(1) - (2)].interm.type).qualifier;
-    ;}
+    }
     break;
 
   case 104:
 
     {
         (yyval.interm.type).setBasic(EbtVoid, EvqConst, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 105:
 
     {
         VERTEX_ONLY("attribute", (yyvsp[(1) - (1)].lex).line);
         if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "attribute"))
             context->recover();
         (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 106:
 
     {
         if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "varying"))
             context->recover();
         if (context->shaderType == SH_VERTEX_SHADER)
             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yyvsp[(1) - (1)].lex).line);
         else
             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 107:
 
     {
         if (context->globalErrorCheck((yyvsp[(1) - (2)].lex).line, context->symbolTable.atGlobalLevel(), "invariant varying"))
             context->recover();
         if (context->shaderType == SH_VERTEX_SHADER)
             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yyvsp[(1) - (2)].lex).line);
         else
             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yyvsp[(1) - (2)].lex).line);
-    ;}
+    }
     break;
 
   case 108:
 
     {
         if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "uniform"))
             context->recover();
         (yyval.interm.type).setBasic(EbtVoid, EvqUniform, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 109:
 
     {
         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
 
         if ((yyval.interm.type).precision == EbpUndefined) {
             (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
             if (context->precisionErrorCheck((yyvsp[(1) - (1)].interm.type).line, (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
                 context->recover();
             }
         }
-    ;}
+    }
     break;
 
   case 110:
 
     {
         (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
         (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
-    ;}
+    }
     break;
 
   case 111:
 
     {
         (yyval.interm.precision) = EbpHigh;
-    ;}
+    }
     break;
 
   case 112:
 
     {
         (yyval.interm.precision) = EbpMedium;
-    ;}
+    }
     break;
 
   case 113:
 
     {
         (yyval.interm.precision) = EbpLow;
-    ;}
+    }
     break;
 
   case 114:
 
     {
         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
-    ;}
+    }
     break;
 
   case 115:
 
     {
         (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
 
         if (context->arrayTypeErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
             context->recover();
         else {
             int size;
             if (context->arraySizeErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(3) - (4)].interm.intermTypedNode), size))
                 context->recover();
             (yyval.interm.type).setArray(true, size);
         }
-    ;}
+    }
     break;
 
   case 116:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtVoid, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 117:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 118:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 119:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 120:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(2);
-    ;}
+    }
     break;
 
   case 121:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(3);
-    ;}
+    }
     break;
 
   case 122:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(4);
-    ;}
+    }
     break;
 
   case 123:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(2);
-    ;}
+    }
     break;
 
   case 124:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(3);
-    ;}
+    }
     break;
 
   case 125:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(4);
-    ;}
+    }
     break;
 
   case 126:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(2);
-    ;}
+    }
     break;
 
   case 127:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(3);
-    ;}
+    }
     break;
 
   case 128:
 
     {
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(4);
-    ;}
+    }
     break;
 
   case 129:
 
     {
         FRAG_VERT_ONLY("mat2", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(2, true);
-    ;}
+    }
     break;
 
   case 130:
 
     {
         FRAG_VERT_ONLY("mat3", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(3, true);
-    ;}
+    }
     break;
 
   case 131:
 
     {
         FRAG_VERT_ONLY("mat4", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).setAggregate(4, true);
-    ;}
+    }
     break;
 
   case 132:
 
     {
         FRAG_VERT_ONLY("sampler2D", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtSampler2D, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 133:
 
     {
         FRAG_VERT_ONLY("samplerCube", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 134:
 
     {
         if (!context->supportsExtension("GL_OES_EGL_image_external")) {
             context->error((yyvsp[(1) - (1)].lex).line, "unsupported type", "samplerExternalOES", "");
             context->recover();
         }
         FRAG_VERT_ONLY("samplerExternalOES", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 135:
 
     {
         if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
             context->error((yyvsp[(1) - (1)].lex).line, "unsupported type", "sampler2DRect", "");
             context->recover();
         }
         FRAG_VERT_ONLY("sampler2DRect", (yyvsp[(1) - (1)].lex).line);
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yyvsp[(1) - (1)].lex).line);
-    ;}
+    }
     break;
 
   case 136:
 
     {
         FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line);
         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
         (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
-    ;}
+    }
     break;
 
   case 137:
 
     {
         //
         // This is for user defined type names.  The lexical phase looked up the
         // type.
         //
         TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         (yyval.interm.type).setBasic(EbtStruct, qual, (yyvsp[(1) - (1)].lex).line);
         (yyval.interm.type).userDef = &structure;
-    ;}
+    }
     break;
 
   case 138:
 
-    { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); ;}
+    { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
     break;
 
   case 139:
 
     {
         if (context->reservedErrorCheck((yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string))
             context->recover();
 
@@ -3960,55 +3921,55 @@ yyreduce:
         TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true);
         if (! context->symbolTable.insert(*userTypeDef)) {
             context->error((yyvsp[(2) - (6)].lex).line, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct");
             context->recover();
         }
         (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (6)].lex).line);
         (yyval.interm.type).userDef = structure;
         context->exitStructDeclaration();
-    ;}
+    }
     break;
 
   case 140:
 
-    { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); ;}
+    { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
     break;
 
   case 141:
 
     {
         TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString(""));
         (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line);
         (yyval.interm.type).userDef = structure;
         context->exitStructDeclaration();
-    ;}
+    }
     break;
 
   case 142:
 
     {
         (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
-    ;}
+    }
     break;
 
   case 143:
 
     {
         (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList);
         for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.typeList)->size(); ++i) {
             for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) {
                 if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName()) {
                     context->error((*(yyvsp[(2) - (2)].interm.typeList))[i].line, "duplicate field name in structure:", "struct", (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName().c_str());
                     context->recover();
                 }
             }
             (yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]);
         }
-    ;}
+    }
     break;
 
   case 144:
 
     {
         (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList);
 
         if (context->voidErrorCheck((yyvsp[(1) - (3)].interm.type).line, (*(yyvsp[(2) - (3)].interm.typeList))[0].type->getFieldName(), (yyvsp[(1) - (3)].interm.type))) {
@@ -4035,415 +3996,435 @@ yyreduce:
                 type->setStruct((yyvsp[(1) - (3)].interm.type).userDef->getStruct());
                 type->setTypeName((yyvsp[(1) - (3)].interm.type).userDef->getTypeName());
             }
 
             if (context->structNestingErrorCheck((yyvsp[(1) - (3)].interm.type).line, *type)) {
                 context->recover();
             }
         }
-    ;}
+    }
     break;
 
   case 145:
 
     {
         (yyval.interm.typeList) = NewPoolTTypeList();
         (yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine));
-    ;}
+    }
     break;
 
   case 146:
 
     {
         (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
-    ;}
+    }
     break;
 
   case 147:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
             context->recover();
 
         (yyval.interm.typeLine).type = new TType(EbtVoid, EbpUndefined);
         (yyval.interm.typeLine).line = (yyvsp[(1) - (1)].lex).line;
         (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string);
-    ;}
+    }
     break;
 
   case 148:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string))
             context->recover();
 
         (yyval.interm.typeLine).type = new TType(EbtVoid, EbpUndefined);
         (yyval.interm.typeLine).line = (yyvsp[(1) - (4)].lex).line;
         (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (4)].lex).string);
 
         int size;
         if (context->arraySizeErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(3) - (4)].interm.intermTypedNode), size))
             context->recover();
         (yyval.interm.typeLine).type->setArraySize(size);
-    ;}
+    }
     break;
 
   case 149:
 
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 150:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 151:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
     break;
 
   case 152:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 153:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 154:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 155:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 156:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 157:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 158:
 
-    { (yyval.interm.intermAggregate) = 0; ;}
+    { (yyval.interm.intermAggregate) = 0; }
     break;
 
   case 159:
 
-    { context->symbolTable.push(); ;}
+    { context->symbolTable.push(); }
     break;
 
   case 160:
 
-    { context->symbolTable.pop(); ;}
+    { context->symbolTable.pop(); }
     break;
 
   case 161:
 
     {
         if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
             (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
             (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yyvsp[(5) - (5)].lex).line);
         }
         (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
-    ;}
+    }
     break;
 
   case 162:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 163:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 164:
 
-    {
-        (yyval.interm.intermNode) = 0;
-    ;}
+    { context->symbolTable.push(); }
     break;
 
   case 165:
 
+    { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
+    break;
+
+  case 166:
+
+    { context->symbolTable.push(); }
+    break;
+
+  case 167:
+
+    { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
+    break;
+
+  case 168:
+
+    {
+        (yyval.interm.intermNode) = 0;
+    }
+    break;
+
+  case 169:
+
     {
         if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
             (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
             (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yyvsp[(3) - (3)].lex).line);
         }
         (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
-    ;}
-    break;
-
-  case 166:
-
-    {
-        (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
-    ;}
-    break;
-
-  case 167:
-
-    {
-        (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
-    ;}
-    break;
-
-  case 168:
-
-    { (yyval.interm.intermNode) = 0; ;}
-    break;
-
-  case 169:
-
-    { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); ;}
+    }
     break;
 
   case 170:
 
     {
-        if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
-            context->recover();
-        (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).line);
-    ;}
+        (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
+    }
     break;
 
   case 171:
 
     {
-        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
-        (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
-    ;}
+        (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
+    }
     break;
 
   case 172:
 
+    { (yyval.interm.intermNode) = 0; }
+    break;
+
+  case 173:
+
+    { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
+    break;
+
+  case 174:
+
+    {
+        if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
+            context->recover();
+        (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).line);
+    }
+    break;
+
+  case 175:
+
+    {
+        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
+        (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
+    }
+    break;
+
+  case 176:
+
     {
         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
         (yyval.interm.nodePair).node2 = 0;
-    ;}
+    }
     break;
 
-  case 173:
+  case 177:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
         if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
             context->recover();
-    ;}
+    }
     break;
 
-  case 174:
+  case 178:
 
     {
         TIntermNode* intermNode;
         if (context->structQualifierErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
             context->recover();
         if (context->boolErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
             context->recover();
 
         if (!context->executeInitializer((yyvsp[(2) - (4)].lex).line, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode))
             (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
         else {
             context->recover();
             (yyval.interm.intermTypedNode) = 0;
         }
-    ;}
+    }
     break;
 
-  case 175:
-
-    { context->symbolTable.push(); ++context->loopNestingLevel; ;}
+  case 179:
+
+    { context->symbolTable.push(); ++context->loopNestingLevel; }
     break;
 
-  case 176:
+  case 180:
 
     {
         context->symbolTable.pop();
         (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(1) - (6)].lex).line);
         --context->loopNestingLevel;
-    ;}
+    }
     break;
 
-  case 177:
-
-    { ++context->loopNestingLevel; ;}
+  case 181:
+
+    { ++context->loopNestingLevel; }
     break;
 
-  case 178:
+  case 182:
 
     {
         if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode)))
             context->recover();
 
         (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(4) - (8)].lex).line);
         --context->loopNestingLevel;
-    ;}
+    }
     break;
 
-  case 179:
-
-    { context->symbolTable.push(); ++context->loopNestingLevel; ;}
+  case 183:
+
+    { context->symbolTable.push(); ++context->loopNestingLevel; }
     break;
 
-  case 180:
+  case 184:
 
     {
         context->symbolTable.pop();
         (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[(4) - (7)].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node2), (yyvsp[(7) - (7)].interm.intermNode), (yyvsp[(1) - (7)].lex).line);
         --context->loopNestingLevel;
-    ;}
-    break;
-
-  case 181:
-
-    {
-        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
-    ;}
-    break;
-
-  case 182:
-
-    {
-        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
-    ;}
-    break;
-
-  case 183:
-
-    {
-        (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
-    ;}
-    break;
-
-  case 184:
-
-    {
-        (yyval.interm.intermTypedNode) = 0;
-    ;}
+    }
     break;
 
   case 185:
 
     {
-        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
-        (yyval.interm.nodePair).node2 = 0;
-    ;}
+        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
+    }
     break;
 
   case 186:
 
     {
-        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
-        (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
-    ;}
+        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
+    }
     break;
 
   case 187:
 
     {
+        (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
+    }
+    break;
+
+  case 188:
+
+    {
+        (yyval.interm.intermTypedNode) = 0;
+    }
+    break;
+
+  case 189:
+
+    {
+        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
+        (yyval.interm.nodePair).node2 = 0;
+    }
+    break;
+
+  case 190:
+
+    {
+        (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
+        (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
+    }
+    break;
+
+  case 191:
+
+    {
         if (context->loopNestingLevel <= 0) {
             context->error((yyvsp[(1) - (2)].lex).line, "continue statement only allowed in loops", "", "");
             context->recover();
         }
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).line);
-    ;}
+    }
     break;
 
-  case 188:
+  case 192:
 
     {
         if (context->loopNestingLevel <= 0) {
             context->error((yyvsp[(1) - (2)].lex).line, "break statement only allowed in loops", "", "");
             context->recover();
         }
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).line);
-    ;}
+    }
     break;
 
-  case 189:
+  case 193:
 
     {
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line);
         if (context->currentFunctionType->getBasicType() != EbtVoid) {
             context->error((yyvsp[(1) - (2)].lex).line, "non-void function must return a value", "return", "");
             context->recover();
         }
-    ;}
+    }
     break;
 
-  case 190:
+  case 194:
 
     {
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line);
         context->functionReturnsValue = true;
         if (context->currentFunctionType->getBasicType() == EbtVoid) {
             context->error((yyvsp[(1) - (3)].lex).line, "void function cannot return a value", "return", "");
             context->recover();
         } else if (*(context->currentFunctionType) != (yyvsp[(2) - (3)].interm.intermTypedNode)->getType()) {
             context->error((yyvsp[(1) - (3)].lex).line, "function return is not matching type:", "return", "");
             context->recover();
         }
-    ;}
-    break;
-
-  case 191:
-
-    {
-        FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
-        (yyval.interm.intermNode) = context->intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).line);
-    ;}
-    break;
-
-  case 192:
-
-    {
-        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
-        context->treeRoot = (yyval.interm.intermNode);
-    ;}
-    break;
-
-  case 193:
-
-    {
-        (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
-        context->treeRoot = (yyval.interm.intermNode);
-    ;}
-    break;
-
-  case 194:
-
-    {
-        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
-    ;}
+    }
     break;
 
   case 195:
 
     {
-        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
-    ;}
+        FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
+        (yyval.interm.intermNode) = context->intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).line);
+    }
     break;
 
   case 196:
 
     {
+        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
+        context->treeRoot = (yyval.interm.intermNode);
+    }
+    break;
+
+  case 197:
+
+    {
+        (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
+        context->treeRoot = (yyval.interm.intermNode);
+    }
+    break;
+
+  case 198:
+
+    {
+        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
+    }
+    break;
+
+  case 199:
+
+    {
+        (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
+    }
+    break;
+
+  case 200:
+
+    {
         TFunction* function = (yyvsp[(1) - (1)].interm).function;
         TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName()));
         //
         // Note:  'prevDec' could be 'function' if this is the first time we've seen function
         // as it would have just been put in the symbol table.  Otherwise, we're looking up
         // an earlier occurance.
         //
         if (prevDec->isDefined()) {
@@ -4465,21 +4446,16 @@ yyreduce:
             }
             if (function->getReturnType().getBasicType() != EbtVoid) {
                 context->error((yyvsp[(1) - (1)].interm).line, "", function->getReturnType().getBasicString(), "main function cannot return a value");
                 context->recover();
             }
         }
 
         //
-        // New symbol table scope for body of function plus its arguments
-        //
-        context->symbolTable.push();
-
-        //
         // Remember the return type for later checking for RETURN statements.
         //
         context->currentFunctionType = &(prevDec->getReturnType());
         context->functionReturnsValue = false;
 
         //
         // Insert parameters into the symbol table.
         // If the parameter has no name, it's not an error, just don't insert it
@@ -4513,59 +4489,59 @@ yyreduce:
                                                (yyvsp[(1) - (1)].interm).line);
             } else {
                 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yyvsp[(1) - (1)].interm).line), (yyvsp[(1) - (1)].interm).line);
             }
         }
         context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yyvsp[(1) - (1)].interm).line);
         (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
         context->loopNestingLevel = 0;
-    ;}
+    }
     break;
 
-  case 197:
+  case 201:
 
     {
         //?? Check that all paths return a value if return type != void ?
         //   May be best done as post process phase on intermediate code
         if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) {
             context->error((yyvsp[(1) - (3)].interm).line, "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str());
             context->recover();
         }
-        context->symbolTable.pop();
+        
         (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), 0);
         context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[(1) - (3)].interm).line);
         (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
         (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
 
         // store the pragma information for debug and optimize and other vendor specific
         // information. This information can be queried from the parse tree
         (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->contextPragma.optimize);
         (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->contextPragma.debug);
         (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable);
 
         if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
             (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
-    ;}
+
+        context->symbolTable.pop();
+    }
     break;
 
 
-/* Line 1267 of yacc.c.  */
 
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
   yylen = 0;
   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)
@@ -4620,34 +4596,34 @@ yyerrlab:
       }
 #endif
     }
 
 
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
 	{
 	  /* Return failure if at end of input.  */
 	  if (yychar == YYEOF)
 	    YYABORT;
 	}
       else
 	{
 	  yydestruct ("Error: discarding",
 		      yytoken, &yylval, context);
 	  yychar = YYEMPTY;
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
 
 /*---------------------------------------------------.
 | yyerrorlab -- error raised explicitly by YYERROR.  |
 `---------------------------------------------------*/
 yyerrorlab:
@@ -4694,19 +4670,16 @@ yyerrlab1:
 
       yydestruct ("Error: popping",
 		  yystos[yystate], yyvsp, context);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
   /* Shift the error token.  */
   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
 
   yystate = yyn;
   goto yynewstate;
@@ -4721,28 +4694,28 @@ yyacceptlab:
 
 /*-----------------------------------.
 | yyabortlab -- YYABORT comes here.  |
 `-----------------------------------*/
 yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
   yyerror (context, YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
 		 yytoken, &yylval, context);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
   YY_STACK_PRINT (yyss, yyssp);
   while (yyssp != yyss)
     {
--- a/gfx/angle/src/compiler/glslang_tab.h
+++ b/gfx/angle/src/compiler/glslang_tab.h
@@ -1,43 +1,42 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.4.2.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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.
-
+   the Free Software Foundation, either version 3 of the License, 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., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    under terms of your choice, so long as that work isn't itself a
    parser generator using the skeleton or a modified version thereof
    as a parser skeleton.  Alternatively, if you modify or redistribute
    the parser skeleton itself, you may (at your option) remove this
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 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 {
      INVARIANT = 258,
      HIGH_PRECISION = 259,
@@ -129,118 +128,24 @@
      LEFT_ANGLE = 345,
      RIGHT_ANGLE = 346,
      VERTICAL_BAR = 347,
      CARET = 348,
      AMPERSAND = 349,
      QUESTION = 350
    };
 #endif
-/* Tokens.  */
-#define INVARIANT 258
-#define HIGH_PRECISION 259
-#define MEDIUM_PRECISION 260
-#define LOW_PRECISION 261
-#define PRECISION 262
-#define ATTRIBUTE 263
-#define CONST_QUAL 264
-#define BOOL_TYPE 265
-#define FLOAT_TYPE 266
-#define INT_TYPE 267
-#define BREAK 268
-#define CONTINUE 269
-#define DO 270
-#define ELSE 271
-#define FOR 272
-#define IF 273
-#define DISCARD 274
-#define RETURN 275
-#define BVEC2 276
-#define BVEC3 277
-#define BVEC4 278
-#define IVEC2 279
-#define IVEC3 280
-#define IVEC4 281
-#define VEC2 282
-#define VEC3 283
-#define VEC4 284
-#define MATRIX2 285
-#define MATRIX3 286
-#define MATRIX4 287
-#define IN_QUAL 288
-#define OUT_QUAL 289
-#define INOUT_QUAL 290
-#define UNIFORM 291
-#define VARYING 292
-#define STRUCT 293
-#define VOID_TYPE 294
-#define WHILE 295
-#define SAMPLER2D 296
-#define SAMPLERCUBE 297
-#define SAMPLER_EXTERNAL_OES 298
-#define SAMPLER2DRECT 299
-#define IDENTIFIER 300
-#define TYPE_NAME 301
-#define FLOATCONSTANT 302
-#define INTCONSTANT 303
-#define BOOLCONSTANT 304
-#define FIELD_SELECTION 305
-#define LEFT_OP 306
-#define RIGHT_OP 307
-#define INC_OP 308
-#define DEC_OP 309
-#define LE_OP 310
-#define GE_OP 311
-#define EQ_OP 312
-#define NE_OP 313
-#define AND_OP 314
-#define OR_OP 315
-#define XOR_OP 316
-#define MUL_ASSIGN 317
-#define DIV_ASSIGN 318
-#define ADD_ASSIGN 319
-#define MOD_ASSIGN 320
-#define LEFT_ASSIGN 321
-#define RIGHT_ASSIGN 322
-#define AND_ASSIGN 323
-#define XOR_ASSIGN 324
-#define OR_ASSIGN 325
-#define SUB_ASSIGN 326
-#define LEFT_PAREN 327
-#define RIGHT_PAREN 328
-#define LEFT_BRACKET 329
-#define RIGHT_BRACKET 330
-#define LEFT_BRACE 331
-#define RIGHT_BRACE 332
-#define DOT 333
-#define COMMA 334
-#define COLON 335
-#define EQUAL 336
-#define SEMICOLON 337
-#define BANG 338
-#define DASH 339
-#define TILDE 340
-#define PLUS 341
-#define STAR 342
-#define SLASH 343
-#define PERCENT 344
-#define LEFT_ANGLE 345
-#define RIGHT_ANGLE 346
-#define VERTICAL_BAR 347
-#define CARET 348
-#define AMPERSAND 349
-#define QUESTION 350
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+{
 
-{
+
     struct {
         TSourceLoc line;
         union {
             TString *string;
             float f;
             int i;
             bool b;
         };
@@ -260,19 +165,20 @@ typedef union YYSTYPE
             TPrecision precision;
             TQualifier qualifier;
             TFunction* function;
             TParameter param;
             TTypeLine typeLine;
             TTypeList* typeList;
         };
     } interm;
-}
-/* Line 1489 of yacc.c.  */
+
+
 
-	YYSTYPE;
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
 
+
--- a/gfx/angle/src/compiler/preprocessor/cpp.c
+++ b/gfx/angle/src/compiler/preprocessor/cpp.c
@@ -48,16 +48,22 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILI
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 
 #include "compiler/preprocessor/slglobals.h"
 
+#if defined(_MSC_VER)
+#pragma warning(disable: 4054)
+#pragma warning(disable: 4152)
+#pragma warning(disable: 4706)
+#endif
+
 static int CPPif(yystypepp * yylvalpp);
 
 /* Don't use memory.c's replacements, as we clean up properly here */
 #undef malloc
 #undef free
 
 static int bindAtom = 0;
 static int constAtom = 0;
@@ -677,19 +683,17 @@ static int CPPpragma(yystypepp * yylvalp
 			SrcStrName[0] = token;
 			SrcStrName[1] = '\0';
 			allTokens[tokenCount] = (char*)malloc(2);
 			strcpy(allTokens[tokenCount++], SrcStrName);
 		}
 		token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
 	}
 
-	cpp->currentInput->ungetch(cpp->currentInput, token, yylvalpp);
 	HandlePragma((const char**)allTokens, tokenCount);
-	token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
 	
 	for (i = 0; i < tokenCount; ++i) {
 		free (allTokens[i]);
 	}
 	free (allTokens);	
 
 	return token;    
 } // CPPpragma
--- a/gfx/angle/src/compiler/preprocessor/cpp.h
+++ b/gfx/angle/src/compiler/preprocessor/cpp.h
@@ -68,17 +68,17 @@ typedef struct MacroSymbol {
 void FreeMacro(MacroSymbol *);
 void PredefineIntMacro(const char *name, int value);
 
 void  CPPDebugLogMsg(const char *msg);      // Prints information into debug log
 void  CPPShInfoLogMsg(const char*);         // Store cpp Err Msg into Sh.Info.Log
 void  CPPWarningToInfoLog(const char *msg); // Prints warning messages into info log
 void  HandlePragma(const char**, int numTokens);  // #pragma directive container.
 void  ResetTString(void);                   // #error Message as TString.
-void  CPPErrorToInfoLog(char*);             // Stick all cpp errors into Sh.Info.log   .
+void  CPPErrorToInfoLog(const char*);       // Stick all cpp errors into Sh.Info.log   .
 void  StoreStr(char*);                      // Store the TString in Parse Context.
 void  SetLineNumber(int);                   // Set line number.  
 void  SetStringNumber(int);                 // Set string number.    
 int   GetLineNumber(void);                  // Get the current String Number. 
 int   GetStringNumber(void);                // Get the current String Number. 
 const char* GetStrfromTStr(void);           // Convert TString to String.  
 void  updateExtensionBehavior(const char* extName, const char* behavior);
 int   FreeCPP(void);
new file mode 100644
--- /dev/null
+++ b/gfx/angle/src/compiler/preprocessor/lexer_glue.cpp
@@ -0,0 +1,151 @@
+//
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include <stdlib.h>
+#include <string.h>
+
+extern "C" {
+#include "compiler/preprocessor/lexer_glue.h"
+#include "compiler/preprocessor/slglobals.h"
+#include "compiler/preprocessor/scanner.h"
+}
+#include "compiler/preprocessor/new/Lexer.h"
+#include "compiler/preprocessor/new/Token.h"
+
+struct InputSrcLexer
+{
+    InputSrc base;
+    pp::Lexer* lexer;
+};
+
+static bool CopySymbolName(const std::string& name, yystypepp* yylvalpp)
+{
+    if (name.length() > MAX_SYMBOL_NAME_LEN)
+    {
+        CPPErrorToInfoLog("BUFFER OVERFLOW");
+        return false;
+    }
+    strcpy(yylvalpp->symbol_name, name.c_str());
+    return true;
+}
+
+static int lex(InputSrc* in, yystypepp* yylvalpp)
+{
+    InputSrcLexer* src = ((InputSrcLexer *)in);
+
+    pp::Token token;
+    int ret = src->lexer->lex(&token);
+    switch (ret)
+    {
+    case 0:  // EOF
+        delete src->lexer;
+        free(src);
+        cpp->currentInput = 0;
+        ret = EOF;
+        break;
+    case pp::Token::IDENTIFIER:
+        if (CopySymbolName(token.value, yylvalpp))
+        {
+            yylvalpp->sc_ident = LookUpAddString(atable, token.value.c_str());
+        }
+        ret = CPP_IDENTIFIER;
+        break;
+    case pp::Token::CONST_INT:
+        if (CopySymbolName(token.value, yylvalpp))
+        {
+            yylvalpp->sc_int = atoi(token.value.c_str());
+        }
+        ret = CPP_INTCONSTANT;
+        break;
+    case pp::Token::CONST_FLOAT:
+        CopySymbolName(token.value, yylvalpp);
+        ret = CPP_FLOATCONSTANT;
+        break;
+    case pp::Token::OP_INC:
+        ret = CPP_INC_OP;
+        break;
+    case pp::Token::OP_DEC:
+        ret = CPP_DEC_OP;
+        break;
+    case pp::Token::OP_RIGHT:
+        ret = CPP_RIGHT_OP;
+        break;
+    case pp::Token::OP_LE:
+        ret = CPP_LE_OP;
+        break;
+    case pp::Token::OP_GE:
+        ret = CPP_GE_OP;
+        break;
+    case pp::Token::OP_EQ:
+        ret = CPP_EQ_OP;
+        break;
+    case pp::Token::OP_NE:
+        ret = CPP_NE_OP;
+        break;
+    case pp::Token::OP_AND:
+        ret = CPP_AND_OP;
+        break;
+    case pp::Token::OP_XOR:
+        ret = CPP_XOR_OP;
+        break;
+    case pp::Token::OP_OR:
+        ret = CPP_OR_OP;
+        break;
+    case pp::Token::OP_ADD_ASSIGN:
+        ret = CPP_ADD_ASSIGN;
+        break;
+    case pp::Token::OP_SUB_ASSIGN:
+        ret = CPP_SUB_ASSIGN;
+        break;
+    case pp::Token::OP_MUL_ASSIGN:
+        ret = CPP_MUL_ASSIGN;
+        break;
+    case pp::Token::OP_DIV_ASSIGN:
+        ret = CPP_DIV_ASSIGN;
+        break;
+    case pp::Token::OP_MOD_ASSIGN:
+        ret = CPP_MOD_ASSIGN;
+        break;
+    case pp::Token::OP_LEFT_ASSIGN:
+        ret = CPP_LEFT_ASSIGN;
+        break;
+    case pp::Token::OP_RIGHT_ASSIGN:
+        ret = CPP_RIGHT_ASSIGN;
+        break;
+    case pp::Token::OP_AND_ASSIGN:
+        ret = CPP_AND_ASSIGN;
+        break;
+    case pp::Token::OP_XOR_ASSIGN:
+        ret = CPP_XOR_ASSIGN;
+        break;
+    case pp::Token::OP_OR_ASSIGN:
+        ret = CPP_OR_ASSIGN;
+        break;
+    default:
+        break;
+    }
+    SetLineNumber(token.location.line);
+    SetStringNumber(token.location.string);
+    return ret;
+}
+
+InputSrc* LexerInputSrc(int count, const char* const string[], const int length[])
+{
+    pp::Lexer* lexer = new pp::Lexer;
+    if (!lexer->init(count, string, length))
+    {
+        delete lexer;
+        return 0;
+    }
+
+    InputSrcLexer* in = (InputSrcLexer *) malloc(sizeof(InputSrcLexer));
+    memset(in, 0, sizeof(InputSrcLexer));
+    in->base.line = 1;
+    in->base.scan = lex;
+    in->lexer = lexer;
+
+    return &in->base;
+}
new file mode 100644
--- /dev/null
+++ b/gfx/angle/src/compiler/preprocessor/lexer_glue.h
@@ -0,0 +1,15 @@
+//
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_PREPROCESSOR_LEXER_GLUE_H_
+#define COMPILER_PREPROCESSOR_LEXER_GLUE_H_
+
+struct InputSrc;
+
+InputSrc* LexerInputSrc(int count, const char* const string[], const int length[]);
+
+#endif  // COMPILER_PREPROCESSOR_LEXER_GLUE_H_
+
--- a/gfx/angle/src/compiler/preprocessor/memory.c
+++ b/gfx/angle/src/compiler/preprocessor/memory.c
@@ -47,16 +47,20 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILI
 #include <string.h>
 
 #ifndef _MSC_VER
 #include <stdint.h>
 #endif
 
 #include "compiler/preprocessor/memory.h"
 
+#if defined(_MSC_VER)
+#pragma warning(disable: 4706)
+#endif
+
 // default alignment and chunksize, if called with 0 arguments
 #define CHUNKSIZE       (64*1024)
 #define ALIGN           8
 
 // we need to call the `real' malloc and free, not our replacements
 #undef malloc
 #undef free
 
--- a/gfx/angle/src/compiler/preprocessor/memory.h
+++ b/gfx/angle/src/compiler/preprocessor/memory.h
@@ -40,16 +40,18 @@ OUT OF THE USE, REPRODUCTION, MODIFICATI
 NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
 TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
 NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 \****************************************************************************/
 //
 #ifndef __MEMORY_H
 #define __MEMORY_H
 
+#include <stddef.h>
+
 typedef struct MemoryPool_rec MemoryPool;
 
 extern MemoryPool *mem_CreatePool(size_t chunksize, unsigned int align);
 extern void mem_FreePool(MemoryPool *);
 extern void *mem_Alloc(MemoryPool *p, size_t size);
 extern void *mem_Realloc(MemoryPool *p, void *old, size_t oldsize, size_t newsize);
 extern int mem_AddCleanup(MemoryPool *p, void (*fn)(void *), void *arg);
 
--- a/gfx/angle/src/compiler/preprocessor/new/Context.cpp
+++ b/gfx/angle/src/compiler/preprocessor/new/Context.cpp
@@ -5,16 +5,17 @@
 //
 
 #include "Context.h"
 
 #include <algorithm>
 #include <sstream>
 
 #include "compiler/debug.h"
+#include "Lexer.h"
 #include "stl_utils.h"
 #include "token_type.h"
 
 static bool isMacroNameReserved(const std::string* name)
 {
     ASSERT(name);
 
     // Names prefixed with "GL_" are reserved.
@@ -26,56 +27,50 @@ static bool isMacroNameReserved(const st
         return true;
 
     return false;
 }
 
 namespace pp
 {
 
-Context::Context()
-    : mLexer(NULL),
-      mInput(NULL),
-      mOutput(NULL)
+Context::Context() : mOutput(NULL)
 {
 }
 
 Context::~Context()
 {
-    destroyLexer();
-}
-
-bool Context::init()
-{
-    return initLexer();
-
-    // TODO(alokp): Define built-in macros here so that we do not need to
-    // define them everytime in process().
 }
 
 bool Context::process(int count,
                       const char* const string[],
                       const int length[],
                       TokenVector* output)
 {
     ASSERT((count >=0) && (string != NULL) && (output != NULL));
 
     // Setup.
-    mInput = new Input(count, string, length);
+    mLexer.reset(new Lexer);
+    if (!mLexer->init(count, string, length)) return false;
     mOutput = output;
     defineBuiltInMacro("GL_ES", 1);
 
     // Parse.
     bool success = parse();
 
     // Cleanup.
     reset();
     return success;
 }
 
+int Context::lex(YYSTYPE* lvalp, YYLTYPE* llocp)
+{
+    return mLexer->lex(lvalp, llocp);
+}
+
 bool Context::defineMacro(pp::Token::Location location,
                           pp::Macro::Type type,
                           std::string* name,
                           pp::TokenVector* parameters,
                           pp::TokenVector* replacements)
 {
     std::auto_ptr<Macro> macro(new Macro(type, name, parameters, replacements));
     if (isMacroNameReserved(name))
@@ -111,20 +106,18 @@ bool Context::isMacroDefined(const std::
 }
 
 // Reset to initialized state.
 void Context::reset()
 {
     std::for_each(mMacros.begin(), mMacros.end(), DeleteSecond());
     mMacros.clear();
 
-    delete mInput;
-    mInput = NULL;
-
     mOutput = NULL;
+    mLexer.reset();
 }
 
 void Context::defineBuiltInMacro(const std::string& name, int value)
 {
     std::ostringstream stream;
     stream << value;
     Token* token = new Token(0, INT_CONSTANT, new std::string(stream.str()));
     TokenVector* replacements = new pp::TokenVector(1, token);
--- a/gfx/angle/src/compiler/preprocessor/new/Context.h
+++ b/gfx/angle/src/compiler/preprocessor/new/Context.h
@@ -5,56 +5,56 @@
 //
 
 #ifndef COMPILER_PREPROCESSOR_CONTEXT_H_
 #define COMPILER_PREPROCESSOR_CONTEXT_H_
 
 #include <map>
 
 #include "common/angleutils.h"
-#include "Input.h"
 #include "Macro.h"
 #include "Token.h"
 
+struct YYLTYPE;
+union YYSTYPE;
+
 namespace pp
 {
 
+class Lexer;
+
 class Context
 {
   public:
     Context();
     ~Context();
 
-    bool init();
     bool process(int count, const char* const string[], const int length[],
                  TokenVector* output);
 
-    void* lexer() { return mLexer; }
-    int readInput(char* buf, int maxSize);
     TokenVector* output() { return mOutput; }
 
+    int lex(YYSTYPE* lvalp, YYLTYPE* llocp);
+
     bool defineMacro(pp::Token::Location location,
                      pp::Macro::Type type,
                      std::string* name,
                      pp::TokenVector* parameters,
                      pp::TokenVector* replacements);
     bool undefineMacro(const std::string* name);
     bool isMacroDefined(const std::string* name);
 
   private:
     DISALLOW_COPY_AND_ASSIGN(Context);
     typedef std::map<std::string, Macro*> MacroSet;
 
     void reset();
-    bool initLexer();
-    void destroyLexer();
     void defineBuiltInMacro(const std::string& name, int value);
     bool parse();
 
-    void* mLexer;  // Lexer handle.
-    Input* mInput;
+    std::auto_ptr<Lexer> mLexer;
     TokenVector* mOutput;
     MacroSet mMacros;  // Defined macros.
 };
 
 }  // namespace pp
 #endif  // COMPILER_PREPROCESSOR_CONTEXT_H_
 
--- a/gfx/angle/src/compiler/preprocessor/new/Input.cpp
+++ b/gfx/angle/src/compiler/preprocessor/new/Input.cpp
@@ -1,39 +1,38 @@
 //
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "Input.h"
 
+#include <cassert>
 #include <cstdio>
 
-#include "compiler/debug.h"
-
 namespace pp
 {
 
 Input::Input(int count, const char* const string[], const int length[])
     : mCount(count),
       mString(string),
       mLength(length),
       mIndex(-1),
       mSize(0),
       mError(kErrorNone),
       mState(kStateInitial)
 {
-    ASSERT(mCount >= 0);
+    assert(mCount >= 0);
     switchToNextString();
 }
 
 bool Input::eof() const
 {
-    ASSERT(mIndex <= mCount);
+    assert(mIndex <= mCount);
     return mIndex == mCount;
 }
 
 int Input::read(char* buf, int bufSize)
 {
     int nread = 0;
     int startIndex = mIndex;
     // Keep reading until the buffer is full or the current string is exhausted.
@@ -91,17 +90,17 @@ int Input::read(char* buf, int bufSize)
             } else if (c == '\n')
             {
                 // Line breaks are never skipped.
                 buf[nread++] = c;
             }
             break;
 
           default:
-            ASSERT(false);
+            assert(false);
             break;
         }
     }
 
     return nread;
 }
 
 int Input::getChar()
@@ -109,17 +108,17 @@ int Input::getChar()
     if (eof()) return EOF;
 
     const char* str = mString[mIndex];
     int c = str[mSize++];
 
     // Switch to next string if the current one is fully read.
     int length = stringLength(mIndex);
     // We never read from empty string.
-    ASSERT(length != 0);
+    assert(length != 0);
     if (((length < 0) && (str[mSize] == '\0')) ||
         ((length > 0) && (mSize == length)))
         switchToNextString();
 
     return c;
 }
 
 int Input::peekChar()
@@ -132,34 +131,34 @@ int Input::peekChar()
     // Restore read position.
     mIndex = index;
     mSize = size;
     return c;
 }
 
 void Input::switchToNextString()
 {
-    ASSERT(mIndex < mCount);
+    assert(mIndex < mCount);
 
     mSize = 0;
     do
     {
         ++mIndex;
     } while (!eof() && isStringEmpty(mIndex));
 }
 
 bool Input::isStringEmpty(int index)
 {
-    ASSERT(index < mCount);
+    assert(index < mCount);
 
     const char* str = mString[mIndex];
     int length = stringLength(mIndex);
     return (length == 0) || ((length < 0) && (str[0] == '\0'));
 }
 
 int Input::stringLength(int index)
 {
-    ASSERT(index < mCount);
+    assert(index < mCount);
     return mLength ? mLength[index] : -1;
 }
 
 }  // namespace pp
 
new file mode 100644
--- /dev/null
+++ b/gfx/angle/src/compiler/preprocessor/new/Lexer.cpp
@@ -0,0 +1,36 @@
+//
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "Lexer.h"
+
+#include <cassert>
+
+#include "Input.h"
+
+namespace pp
+{
+
+Lexer::Lexer() : mHandle(0), mLeadingSpace(false)
+{
+}
+
+Lexer::~Lexer()
+{
+    destroyLexer();
+}
+
+bool Lexer::init(int count, const char* const string[], const int length[])
+{
+    assert((count >=0) && (string != NULL));
+    if ((count < 0) || (string == NULL))
+        return false;
+
+    mInput.reset(new Input(count, string, length));
+    return initLexer();
+}
+
+}  // namespace pp
+
new file mode 100644
--- /dev/null
+++ b/gfx/angle/src/compiler/preprocessor/new/Lexer.h
@@ -0,0 +1,42 @@
+//
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_PREPROCESSOR_LEXER_H_
+#define COMPILER_PREPROCESSOR_LEXER_H_
+
+#include <memory>
+
+#include "pp_utils.h"
+
+namespace pp
+{
+
+class Input;
+struct Token;
+
+class Lexer
+{
+  public:
+    Lexer();
+    ~Lexer();
+
+    bool init(int count, const char* const string[], const int length[]);
+
+    int lex(Token* token);
+
+  private:
+    PP_DISALLOW_COPY_AND_ASSIGN(Lexer);
+    bool initLexer();
+    void destroyLexer();
+
+    void* mHandle;  // Lexer handle.
+    bool mLeadingSpace;
+    std::auto_ptr<Input> mInput;  // Input buffer.
+};
+
+}  // namespace pp
+#endif  // COMPILER_PREPROCESSOR_LEXER_H_
+
--- a/gfx/angle/src/compiler/preprocessor/new/Preprocessor.cpp
+++ b/gfx/angle/src/compiler/preprocessor/new/Preprocessor.cpp
@@ -1,53 +1,25 @@
 //
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "Preprocessor.h"
 
-#include <algorithm>
-
-#include "compiler/debug.h"
-#include "Context.h"
-#include "stl_utils.h"
-
 namespace pp
 {
 
-Preprocessor::Preprocessor() : mContext(NULL)
-{
-}
-
-Preprocessor::~Preprocessor()
+bool Preprocessor::init(int count,
+                        const char* const string[],
+                        const int length[])
 {
-    delete mContext;
-}
-
-bool Preprocessor::init()
-{
-    mContext = new Context;
-    return mContext->init();
+    return mLexer.init(count, string, length);
 }
 
-bool Preprocessor::process(int count,
-                           const char* const string[],
-                           const int length[])
+int Preprocessor::lex(Token* token)
 {
-    ASSERT((count >=0) && (string != NULL));
-    if ((count < 0) || (string == NULL))
-        return false;
-
-    reset();
-
-    return mContext->process(count, string, length, &mTokens);
-}
-
-void Preprocessor::reset()
-{
-    std::for_each(mTokens.begin(), mTokens.end(), Delete());
-    mTokens.clear();
+    return mLexer.lex(token);
 }
 
 }  // namespace pp
 
--- a/gfx/angle/src/compiler/preprocessor/new/Preprocessor.h
+++ b/gfx/angle/src/compiler/preprocessor/new/Preprocessor.h
@@ -2,41 +2,30 @@
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
 #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
 
-#include "common/angleutils.h"
-#include "Token.h"
+#include "Lexer.h"
+#include "pp_utils.h"
 
 namespace pp
 {
 
-class Context;
-
 class Preprocessor
 {
   public:
-    Preprocessor();
-    ~Preprocessor();
+    Preprocessor() { }
 
-    bool init();
-
-    bool process(int count, const char* const string[], const int length[]);
-    TokenIterator begin() const { return mTokens.begin(); }
-    TokenIterator end() const { return mTokens.end(); }
+    bool init(int count, const char* const string[], const int length[]);
+    int lex(Token* token);
 
   private:
-    DISALLOW_COPY_AND_ASSIGN(Preprocessor);
-
-    // Reset to initialized state.
-    void reset();
-
-    Context* mContext;
-    TokenVector mTokens;  // Output.
+    PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);
+    Lexer mLexer;
 };
 
 }  // namespace pp
 #endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_
 
--- a/gfx/angle/src/compiler/preprocessor/new/Token.cpp
+++ b/gfx/angle/src/compiler/preprocessor/new/Token.cpp
@@ -1,55 +1,21 @@
 //
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "Token.h"
 
-#include "token_type.h"
-
-static const int kLocationLineSize = 16;  // in bits.
-static const int kLocationLineMask = (1 << kLocationLineSize) - 1;
-
 namespace pp
 {
 
-Token::Location Token::encodeLocation(int line, int file)
-{
-    return (file << kLocationLineSize) | (line & kLocationLineMask);
-}
-
-void Token::decodeLocation(Location loc, int* line, int* file)
+std::ostream& operator<<(std::ostream& out, const Token& token)
 {
-    if (file) *file = loc >> kLocationLineSize;
-    if (line) *line = loc & kLocationLineMask;
-}
+    if (token.hasLeadingSpace())
+        out << " ";
 
-Token::Token(Location location, int type, std::string* value)
-    : mLocation(location),
-      mType(type),
-      mValue(value)
-{
+    out << token.value;
+    return out;
 }
 
-Token::~Token() {
-    delete mValue;
-}
-
-std::ostream& operator<<(std::ostream& out, const Token& token)
-{
-    switch (token.type())
-    {
-      case INT_CONSTANT:
-      case FLOAT_CONSTANT:
-      case IDENTIFIER:
-        out << *(token.value());
-        break;
-      default:
-        out << static_cast<char>(token.type());
-        break;
-    }
-    return out;
-}
 }  // namespace pp
-
--- a/gfx/angle/src/compiler/preprocessor/new/Token.h
+++ b/gfx/angle/src/compiler/preprocessor/new/Token.h
@@ -2,47 +2,90 @@
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #ifndef COMPILER_PREPROCESSOR_TOKEN_H_
 #define COMPILER_PREPROCESSOR_TOKEN_H_
 
+#include <ostream>
 #include <string>
-#include <vector>
-
-#include "common/angleutils.h"
 
 namespace pp
 {
 
-class Token
+struct Token
 {
-  public:
-    typedef int Location;
-    static Location encodeLocation(int line, int file);
-    static void decodeLocation(Location loc, int* line, int* file);
+    enum Type
+    {
+        IDENTIFIER = 258,
 
-    // Takes ownership of string.
-    Token(Location location, int type, std::string* value);
-    ~Token();
+        CONST_INT,
+        CONST_FLOAT,
 
-    Location location() const { return mLocation; }
-    int type() const { return mType; }
-    const std::string* value() const { return mValue; }
-
-  private:
-    DISALLOW_COPY_AND_ASSIGN(Token);
+        OP_INC,
+        OP_DEC,
+        OP_LEFT,
+        OP_RIGHT,
+        OP_LE,
+        OP_GE,
+        OP_EQ,
+        OP_NE,
+        OP_AND,
+        OP_XOR,
+        OP_OR,
+        OP_ADD_ASSIGN,
+        OP_SUB_ASSIGN,
+        OP_MUL_ASSIGN,
+        OP_DIV_ASSIGN,
+        OP_MOD_ASSIGN,
+        OP_LEFT_ASSIGN,
+        OP_RIGHT_ASSIGN,
+        OP_AND_ASSIGN,
+        OP_XOR_ASSIGN,
+        OP_OR_ASSIGN
+    };
+    enum Flags
+    {
+        HAS_LEADING_SPACE = 1 << 0
+    };
+    struct Location
+    {
+        Location() : line(0), string(0) { }
+        bool equals(const Location& other) const
+        {
+            return (line == other.line) && (string == other.string);
+        }
 
-    Location mLocation;
-    int mType;
-    std::string* mValue;
+        int line;
+        int string;
+    };
+
+    Token() : type(0), flags(0) { }
+
+    bool equals(const Token& other) const
+    {
+        return (type == other.type) &&
+               (flags == other.flags) &&
+               (location.equals(other.location)) &&
+               (value == other.value);
+    }
+
+    bool hasLeadingSpace() const { return (flags & HAS_LEADING_SPACE) != 0; }
+    void setHasLeadingSpace(bool space)
+    {
+        if (space)
+            flags |= HAS_LEADING_SPACE;
+        else
+            flags &= ~HAS_LEADING_SPACE;
+    }
+
+    int type;
+    int flags;
+    Location location;
+    std::string value;
 };
 
-typedef std::vector<Token*> TokenVector;
-typedef TokenVector::const_iterator TokenIterator;
-
 extern std::ostream& operator<<(std::ostream& out, const Token& token);
 
 }  // namepsace pp
 #endif  // COMPILER_PREPROCESSOR_TOKEN_H_
-
--- a/gfx/angle/src/compiler/preprocessor/new/pp.l
+++ b/gfx/angle/src/compiler/preprocessor/new/pp.l
@@ -18,164 +18,141 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
 }
 
 %{
-#include "compiler/debug.h"
-#include "Context.h"
-#include "pp_tab.h"
+#include "Input.h"
+#include "Lexer.h"
+#include "Token.h"
 
-#define YY_USER_ACTION                        \
-    do {                                      \
-        yylloc->first_line = yylineno;        \
-        yylloc->first_column = yycolumn + 1;  \
-        yycolumn += yyleng;                   \
+typedef std::string YYSTYPE;
+typedef pp::Token::Location YYLTYPE;
+
+#define YY_USER_ACTION           \
+    do {                         \
+        yylloc->line = yylineno; \
+        yylloc->string = 0;      \
     } while(0);
 
 #define YY_INPUT(buf, result, maxSize) \
-    result = yyextra->readInput(buf, maxSize);
-    
-static std::string* extractMacroName(const char* str, int len);
+    result = readInput(buf, maxSize, yyscanner);
+
+static int readInput(char* buf, int maxSize, yyscan_t scanner);
 %}
 
 %option noyywrap nounput never-interactive
 %option yylineno reentrant bison-bridge bison-locations
-%option stack
 %option prefix="pp"
-%option extra-type="pp::Context*"
+%option extra-type="pp::Input*"
 
-HSPACE      [ \t]
-HASH        ^{HSPACE}*#{HSPACE}*
 IDENTIFIER  [_a-zA-Z][_a-zA-Z0-9]*
 PUNCTUATOR  [][<>(){}.+-/*%^|&~=!:;,?]
 
 DECIMAL_CONSTANT      [1-9][0-9]*
 OCTAL_CONSTANT        0[0-7]*
 HEXADECIMAL_CONSTANT  0[xX][0-9a-fA-F]+
 
 DIGIT                [0-9]
 EXPONENT_PART        [eE][+-]?{DIGIT}+
 FRACTIONAL_CONSTANT  ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
 
 %%
 
-{HASH} { return HASH; }
-
-{HASH}define{HSPACE}+{IDENTIFIER}/[ \t\n] {
-    yylval->sval = extractMacroName(yytext, yyleng);
-    return HASH_DEFINE_OBJ;
-}
-{HASH}define{HSPACE}+{IDENTIFIER}/"(" {
-    yylval->sval = extractMacroName(yytext, yyleng);
-    return HASH_DEFINE_FUNC;
-}
-{HASH}undef{HSPACE}+ { return HASH_UNDEF; }
-
-{HASH}if { return HASH_IF; }
-{HASH}ifdef { return HASH_IFDEF; }
-{HASH}ifndef { return HASH_IFNDEF; }
-{HASH}else { return HASH_ELSE; }
-{HASH}elif { return HASH_ELIF; }
-{HASH}endif { return HASH_ENDIF; }
-"defined" { return DEFINED; }
-
-{HASH}error { return HASH_ERROR; }
-{HASH}pragma { return HASH_PRAGMA; }
-{HASH}extension { return HASH_EXTENSION; }
-{HASH}version { return HASH_VERSION; }
-{HASH}line { return HASH_LINE; }
+# { return yytext[0]; }
 
 {IDENTIFIER} {
-    yylval->sval = new std::string(yytext, yyleng);
-    return IDENTIFIER;
+    yylval->assign(yytext, yyleng);
+    return pp::Token::IDENTIFIER;
 }
 
 {DECIMAL_CONSTANT}|{OCTAL_CONSTANT}|{HEXADECIMAL_CONSTANT} {
-    yylval->sval = new std::string(yytext, yyleng);
-    return INT_CONSTANT;
+    yylval->assign(yytext, yyleng);
+    return pp::Token::CONST_INT;
 }
 
 ({DIGIT}+{EXPONENT_PART})|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?) {
-    yylval->sval = new std::string(yytext, yyleng);
-    return FLOAT_CONSTANT;
+    yylval->assign(yytext, yyleng);
+    return pp::Token::CONST_FLOAT;
 }
 
+"++"  { return pp::Token::OP_INC; }
+"--"  { return pp::Token::OP_DEC; }
+"<<"  { return pp::Token::OP_LEFT; }
+">>"  { return pp::Token::OP_RIGHT; }
+"<="  { return pp::Token::OP_LE; }
+">="  { return pp::Token::OP_GE; }
+"=="  { return pp::Token::OP_EQ; }
+"!="  { return pp::Token::OP_NE; }
+"&&"  { return pp::Token::OP_AND; }
+"^^"  { return pp::Token::OP_XOR; }
+"||"  { return pp::Token::OP_OR; }
+"+="  {  return pp::Token::OP_ADD_ASSIGN; }
+"-="  {  return pp::Token::OP_SUB_ASSIGN; }
+"*="  {  return pp::Token::OP_MUL_ASSIGN; }
+"/="  {  return pp::Token::OP_DIV_ASSIGN; }
+"%="  {  return pp::Token::OP_MOD_ASSIGN; }
+"<<=" {  return pp::Token::OP_LEFT_ASSIGN; }
+">>=" {  return pp::Token::OP_RIGHT_ASSIGN; }
+"&="  {  return pp::Token::OP_AND_ASSIGN; }
+"^="  {  return pp::Token::OP_XOR_ASSIGN; }
+"|="  {  return pp::Token::OP_OR_ASSIGN; }
+
 {PUNCTUATOR} { return yytext[0]; }
-
-[ \t\v\f]+ { /* Ignore whitespace */ }
+[ \t\v\f]+   { return ' '; }
+\n           { return yytext[0]; }
 
-\n {
-    ++yylineno; yycolumn = 0;
-    return yytext[0];
-}
-
-<*><<EOF>>     { yyterminate(); }
+<*><<EOF>>   { yyterminate(); }
 
 %%
 
-std::string* extractMacroName(const char* str, int len)
+int readInput(char* buf, int maxSize, yyscan_t scanner)
 {
-    // The input string is of the form {HASH}define{HSPACE}+{IDENTIFIER}
-    // We just need to find the last HSPACE.
-    ASSERT(str && (len > 8));  // strlen("#define ") == 8;
-
-    std::string* name = NULL;
-    for (int i = len - 1; i >= 0; --i)
+    int nread = YY_NULL;
+    pp::Input* input = yyget_extra(scanner);
+    while (!input->eof() &&
+           (input->error() == pp::Input::kErrorNone) &&
+           (nread == YY_NULL))
     {
-        if ((str[i] == ' ') || (str[i] == '\t'))
-        {
-            name = new std::string(str + i + 1, len - i - 1);
-            break;
-        }
+        nread = input->read(buf, maxSize);
     }
-    ASSERT(name);
-    return name;
+    return nread;
 }
 
 namespace pp {
 
-int Context::readInput(char* buf, int maxSize)
+int Lexer::lex(Token* token)
 {
-    int nread = YY_NULL;
-    while (!mInput->eof() &&
-           (mInput->error() == pp::Input::kErrorNone) &&
-           (nread == YY_NULL))
+    token->type = yylex(&token->value, &token->location, mHandle);
+    while (token->type == ' ')
     {
-        int line = 0, file = 0;
-        pp::Token::decodeLocation(yyget_lineno(mLexer), &line, &file);
-        file = mInput->stringIndex();
-        yyset_lineno(pp::Token::encodeLocation(line, file), mLexer);
-
-        nread = mInput->read(buf, maxSize);
+        mLeadingSpace = true;
+        token->type = yylex(&token->value, &token->location, mHandle);
+    }
+    token->setHasLeadingSpace(mLeadingSpace);
+    mLeadingSpace = false;
 
-        if (mInput->error() == pp::Input::kErrorUnexpectedEOF)
-        {
-            // TODO(alokp): Report error.
-        }
-    }
-    return nread;
+    return token->type;
 }
 
-bool Context::initLexer()
+bool Lexer::initLexer()
 {
-    ASSERT(mLexer == NULL);
-
-    if (yylex_init_extra(this, &mLexer))
+    if ((mHandle == NULL) && yylex_init_extra(mInput.get(), &mHandle))
         return false;
 
-    yyrestart(0, mLexer);
+    yyrestart(0, mHandle);
     return true;
 }
 
-void Context::destroyLexer()
+void Lexer::destroyLexer()
 {
-    ASSERT(mLexer);
+    if (mHandle == NULL)
+        return;
 
-    yylex_destroy(mLexer);
-    mLexer = NULL;
+    yylex_destroy(mHandle);
+    mHandle = NULL;
 }
 
 }  // namespace pp
 
--- a/gfx/angle/src/compiler/preprocessor/new/pp.y
+++ b/gfx/angle/src/compiler/preprocessor/new/pp.y
@@ -17,36 +17,41 @@ WHICH GENERATES THE GLSL ES PARSER.
 //
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_glslang_parser.sh. DO NOT EDIT!
 
+#if defined(__GNUC__)
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#endif
+
 #include "Context.h"
 
-#define YYLEX_PARAM context->lexer()
 #define YYDEBUG 1
 %}
 
 %pure-parser
 %name-prefix="pp"
 %locations
 %parse-param {pp::Context* context}
+%lex-param {pp::Context* context}
 
 %union {
     int ival;
     std::string* sval;
     pp::Token* tval;
     pp::TokenVector* tlist;
 }
 
 %{
-extern int yylex(YYSTYPE* lvalp, YYLTYPE* llocp, void* lexer);
+static int yylex(YYSTYPE* lvalp, YYLTYPE* llocp, pp::Context* context);
 static void yyerror(YYLTYPE* llocp,
                     pp::Context* context,
                     const char* reason);
 
 static void pushConditionalBlock(pp::Context* context, bool condition);
 static void popConditionalBlock(pp::Context* context);
 %}
 
@@ -198,16 +203,21 @@ operator
     | ':' { $$ = ':'; }
     | ';' { $$ = ';'; }
     | ',' { $$ = ','; }
     | '?' { $$ = '?'; }
 ;
 
 %%
 
+int yylex(YYSTYPE* lvalp, YYLTYPE* llocp, pp::Context* context)
+{
+    return context->lex(lvalp, llocp);
+}
+
 void yyerror(YYLTYPE* llocp, pp::Context* context, const char* reason)
 {
 }
 
 void pushConditionalBlock(pp::Context* context, bool condition)
 {
 }
 
--- a/gfx/angle/src/compiler/preprocessor/new/pp_lex.cpp
+++ b/gfx/angle/src/compiler/preprocessor/new/pp_lex.cpp
@@ -1,20 +1,20 @@
-#line 16 "compiler/preprocessor/new/pp.l"
+#line 16 "./pp.l"
 //
 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
 
 
 
-#line 13 "compiler/preprocessor/new/pp_lex.cpp"
+#line 13 "./pp_lex.cpp"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
@@ -366,174 +366,138 @@ static void yy_fatal_error (yyconst char
  */
 #define YY_DO_BEFORE_ACTION \
 	yyg->yytext_ptr = yy_bp; \
 	yyleng = (size_t) (yy_cp - yy_bp); \
 	yyg->yy_hold_char = *yy_cp; \
 	*yy_cp = '\0'; \
 	yyg->yy_c_buf_p = yy_cp;
 <