OSDN Git Service

Implement GL_OES_EGL_image_external support.
authorNicolas Capens <capn@google.com>
Thu, 29 May 2014 02:46:43 +0000 (22:46 -0400)
committerNicolas Capens <nicolascapens@google.com>
Thu, 12 Jun 2014 05:19:29 +0000 (05:19 +0000)
BUG=14610416

Change-Id: I9ca6d1779c7b6f1b28d5d5665264815881ee01b5
Reviewed-on: https://swiftshader-review.googlesource.com/1071
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
22 files changed:
src/GLES2/compiler/BaseTypes.h
src/GLES2/compiler/Initialize.cpp
src/GLES2/compiler/Intermediate.cpp
src/GLES2/compiler/OutputASM.cpp
src/GLES2/compiler/ParseHelper.cpp
src/GLES2/compiler/ShaderLang.cpp
src/GLES2/compiler/SymbolTable.cpp
src/GLES2/compiler/VariableInfo.cpp
src/GLES2/compiler/glslang.l
src/GLES2/compiler/glslang.y
src/GLES2/compiler/glslang_lex.cpp
src/GLES2/compiler/glslang_tab.cpp
src/GLES2/compiler/glslang_tab.h
src/GLES2/include/GLSLANG/ShaderLang.h
src/GLES2/libGLESv2/Context.cpp
src/GLES2/libGLESv2/Context.h
src/GLES2/libGLESv2/Program.cpp
src/GLES2/libGLESv2/ResourceManager.h
src/GLES2/libGLESv2/Texture.cpp
src/GLES2/libGLESv2/Texture.h
src/GLES2/libGLESv2/libGLESv2.cpp
src/GLES2/libGLESv2/utilities.cpp

index c1ae09c..60a838d 100644 (file)
@@ -42,6 +42,7 @@ enum TBasicType
     EbtGuardSamplerBegin,  // non type:  see implementation of IsSampler()
     EbtSampler2D,
     EbtSamplerCube,
+    EbtSamplerExternalOES,
     EbtGuardSamplerEnd,    // non type:  see implementation of IsSampler()
     EbtStruct,
     EbtAddress,            // should be deprecated??
@@ -52,14 +53,15 @@ inline const char* getBasicString(TBasicType t)
 {
     switch (t)
     {
-    case EbtVoid:              return "void";              break;
-    case EbtFloat:             return "float";             break;
-    case EbtInt:               return "int";               break;
-    case EbtBool:              return "bool";              break;
-    case EbtSampler2D:         return "sampler2D";         break;
-    case EbtSamplerCube:       return "samplerCube";       break;
-    case EbtStruct:            return "structure";         break;
-    default:                   return "unknown type";
+    case EbtVoid:               return "void";
+    case EbtFloat:              return "float";
+    case EbtInt:                return "int";
+    case EbtBool:               return "bool";
+    case EbtSampler2D:          return "sampler2D";
+    case EbtSamplerCube:        return "samplerCube";
+    case EbtSamplerExternalOES: return "samplerExternalOES";
+    case EbtStruct:             return "structure";
+    default:                    return "unknown type";
     }
 }
 
index 8085370..f92ee02 100644 (file)
@@ -295,6 +295,15 @@ void InsertBuiltInFunctions(ShShaderType type, const ShBuiltInResources &resourc
                symbolTable.insertBuiltIn(float4, "textureCubeLod", samplerCube, float3, float1);
        }
 
+    TType *samplerExternalOES = new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1);
+
+    if(resources.OES_EGL_image_external)
+    {
+        symbolTable.insertBuiltIn(float4, "texture2D", samplerExternalOES, float2);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", samplerExternalOES, float3);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", samplerExternalOES, float4);
+    }
+
        TTypeList *members = NewPoolTTypeList();
        TTypeLine near = {new TType(EbtFloat, EbpHigh, EvqGlobal, 1), 0};
        TTypeLine far = {new TType(EbtFloat, EbpHigh, EvqGlobal, 1), 0};
index b96e23e..2e562e3 100644 (file)
@@ -420,12 +420,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     //
     // Does the base type allow operation?
     //
-    switch (node->getBasicType()) {
-        case EbtVoid:
-        case EbtSampler2D:
-        case EbtSamplerCube:
-            return 0;
-        default: break;
+    if (node->getBasicType() == EbtVoid || IsSampler(node->getBasicType()))
+    {
+        return 0;
     }
 
     //
index 995eb16..90e634d 100644 (file)
@@ -18,6 +18,7 @@
 \r
 #define GL_APICALL\r
 #include <GLES2/gl2.h>\r
+#include <GLES2/gl2ext.h>\r
 \r
 namespace sh\r
 {\r
@@ -2280,6 +2281,10 @@ namespace sh
                {\r
                        return GL_SAMPLER_CUBE;\r
                }\r
+        else if(type.getBasicType() == EbtSamplerExternalOES)\r
+        {\r
+            return GL_SAMPLER_EXTERNAL_OES;\r
+        }\r
                else UNREACHABLE();\r
 \r
                return GL_NONE;\r
index af8fbbf..21a3fe7 100644 (file)
@@ -326,16 +326,13 @@ bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* nod
         //
         // Type that can't be written to?
         //
-        switch (node->getBasicType()) {
-        case EbtSampler2D:
-        case EbtSamplerCube:
+        if(IsSampler(node->getBasicType()))
+        {
             message = "can't modify a sampler";
-            break;
-        case EbtVoid:
+        }
+        else if(node->getBasicType() == EbtVoid)
+        {
             message = "can't modify void";
-            break;
-        default: 
-            break;
         }
     }
 
index 85b5654..7c5e070 100644 (file)
@@ -110,6 +110,7 @@ void ShInitBuiltInResources(ShBuiltInResources* resources)
     // Extensions.
     resources->OES_standard_derivatives = 0;
        resources->OES_fragment_precision_high = 0;
+    resources->OES_EGL_image_external = 0;
 
        resources->MaxCallStackDepth = UINT_MAX;
 }
index 7113a3a..93937af 100644 (file)
@@ -52,6 +52,7 @@ void TType::buildMangledName(TString& mangledName)
     case EbtBool:               mangledName += 'b';      break;
     case EbtSampler2D:          mangledName += "s2";     break;
     case EbtSamplerCube:        mangledName += "sC";     break;
+    case EbtSamplerExternalOES: mangledName += "sE";     break;
     case EbtStruct:
         mangledName += "struct-";
         if (typeName)
index 071d05e..ea41dce 100644 (file)
@@ -63,6 +63,7 @@ static ShDataType getVariableDataType(const TType& type)
           }
       case EbtSampler2D: return SH_SAMPLER_2D;
       case EbtSamplerCube: return SH_SAMPLER_CUBE;
+      case EbtSamplerExternalOES: return SH_SAMPLER_EXTERNAL_OES;
       default: UNREACHABLE();
     }
     return SH_NONE;
index ca29a62..bf9f157 100644 (file)
@@ -133,6 +133,7 @@ O           [0-7]
 
 "sampler2D"       { context->lexAfterType = true; return SAMPLER2D; }
 "samplerCube"     { context->lexAfterType = true; return SAMPLERCUBE; }
+"samplerExternalOES" { context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
 
 "struct"       { context->lexAfterType = true; return(STRUCT); }
 
index fb44af0..eca0478 100644 (file)
@@ -113,7 +113,7 @@ extern void yyerror(TParseContext* context, const char* reason);
 %token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4
 %token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING
 %token <lex> STRUCT VOID_TYPE WHILE
-%token <lex> SAMPLER2D SAMPLERCUBE
+%token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES
 
 %token <lex> IDENTIFIER TYPE_NAME FLOATCONSTANT INTCONSTANT BOOLCONSTANT
 %token <lex> FIELD_SELECTION
@@ -1657,6 +1657,15 @@ type_specifier_nonarray
         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         $$.setBasic(EbtSamplerCube, qual, $1.line);
     }
+       | SAMPLER_EXTERNAL_OES {
+        if (!context->supportsExtension("GL_OES_EGL_image_external")) {
+            context->error($1.line, "unsupported type", "samplerExternalOES", "");
+            context->recover();
+        }
+        FRAG_VERT_ONLY("samplerExternalOES", $1.line);
+        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+        $$.setBasic(EbtSamplerExternalOES, qual, $1.line);
+    }
     | struct_specifier {
         FRAG_VERT_ONLY("struct", $1.line);
         $$ = $1;
index e2c8a9e..bbb2a9f 100644 (file)
@@ -75,7 +75,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -106,6 +105,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -179,7 +180,15 @@ typedef void* yyscan_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -383,8 +392,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
        *yy_cp = '\0'; \
        yyg->yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 154
-#define YY_END_OF_BUFFER 155
+#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
@@ -392,57 +401,58 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static yyconst flex_int16_t yy_accept[448] =
+static yyconst flex_int16_t yy_accept[459] =
     {   0,
-        0,    0,    0,    0,    0,    0,  155,  153,  152,  152,
-      137,  143,  148,  132,  133,  141,  140,  129,  138,  136,
-      142,  101,  101,  130,  126,  144,  131,  145,  149,   97,
-      134,  135,  147,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,  127,  146,  128,  139,    3,    4,    3,
-      151,  154,  150,  123,  109,  128,  117,  112,  107,  115,
-      105,  116,  106,  104,    2,    1,  108,  103,   99,  100,
-        0,    0,  101,  135,  127,  134,  124,  120,  122,  121,
-      125,   97,  113,  119,   97,   97,   97,   97,   97,   97,
-
-       97,   97,   97,   97,   17,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   20,   22,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,  114,  118,    5,
-      150,    0,    1,  103,    0,    0,  102,   98,  110,  111,
-       48,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   18,
-       97,   97,   97,   97,   97,   97,   97,   97,   26,   97,
-       97,   97,   97,   97,   97,   97,   97,   23,   97,   97,
-
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,    0,  104,    0,  103,   97,   28,   97,   97,   94,
-       97,   97,   97,   97,   97,   97,   97,   21,   51,   97,
-       97,   97,   67,   97,   97,   56,   71,   97,   97,   97,
-       97,   97,   97,   97,   97,   68,    9,   33,   34,   35,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   54,   29,   97,   97,
-       97,   97,   97,   97,   36,   37,   38,   27,   97,   97,
-       97,   15,   42,   43,   44,   49,   12,   97,   97,   97,
-
-       97,   80,   81,   82,   97,   30,   72,   25,   83,   84,
-       85,    7,   77,   78,   79,   97,   24,   75,   97,   97,
-       39,   40,   41,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   69,   97,   97,   97,   97,   97,   97,   97,
-       97,   50,   97,   96,   97,   97,   19,   97,   97,   97,
-       97,   70,   64,   59,   97,   97,   97,   97,   97,   76,
-       55,   97,   62,   32,   97,   93,   63,   47,   74,   57,
-       97,   97,   97,   97,   97,   97,   97,   97,   58,   31,
-       97,   97,   97,    8,   97,   97,   97,   97,   97,   52,
-       13,   97,   14,   97,   97,   16,   65,   97,   97,   97,
-
-       60,   97,   97,   97,   97,   97,   53,   73,   61,   11,
-       66,    6,   95,   10,   86,   45,   87,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   46,   97,   97,
-       97,   97,   97,   90,   97,   91,   97,   97,   97,   88,
-       97,   89,   97,   97,   97,   92,    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,
+       49,   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,   52,   98,
+       98,   98,   68,   98,   98,   57,   72,   98,   98,   98,
+       98,   98,   98,   98,   98,   69,    9,   33,   34,   35,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,   98,   98,   98,   55,   29,   98,   98,
+       98,   98,   98,   98,   36,   37,   38,   27,   98,   98,
+       98,   15,   42,   43,   44,   50,   12,   98,   98,   98,
+
+       98,   81,   82,   83,   98,   30,   73,   25,   84,   85,
+       86,    7,   78,   79,   80,   98,   24,   76,   98,   98,
+       39,   40,   41,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   70,   98,   98,   98,   98,   98,   98,   98,
+       98,   51,   98,   97,   98,   98,   19,   98,   98,   98,
+       98,   71,   65,   60,   98,   98,   98,   98,   98,   77,
+       56,   98,   63,   32,   98,   94,   64,   48,   75,   58,
+       98,   98,   98,   98,   98,   98,   98,   98,   59,   31,
+       98,   98,   98,    8,   98,   98,   98,   98,   98,   53,
+       13,   98,   14,   98,   98,   16,   66,   98,   98,   98,
+
+       61,   98,   98,   98,   98,   98,   98,   54,   74,   62,
+       11,   67,    6,   96,   10,   87,   45,   88,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       46,   98,   98,   98,   98,   98,   98,   98,   91,   98,
+       92,   98,   98,   98,   98,   98,   89,   98,   90,   98,
+       98,   98,   98,   98,   98,   47,   93,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -454,13 +464,13 @@ static yyconst flex_int32_t yy_ec[256] =
         8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
        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,   32,   32,
-       32,   33,   34,   32,   32,   32,   32,   35,   32,   32,
-       36,    1,   37,   38,   32,    1,   39,   40,   41,   42,
+       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,
 
-       43,   44,   45,   46,   47,   32,   48,   49,   50,   51,
-       52,   53,   32,   54,   55,   56,   57,   58,   59,   60,
-       61,   62,   63,   64,   65,   66,    1,    1,    1,    1,
+       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,
@@ -477,209 +487,214 @@ static yyconst flex_int32_t yy_ec[256] =
         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,    3,    1,    4,    4,    4,    4,    4,    4,
-        4,    1,    1,    1,    1,    1,    1,    5,    5,    5,
-        4,    6,    6,    6,    6,    1,    1,    1,    5,    5,
-        5,    5,    4,    5,    6,    6,    6,    6,    6,    6,
-        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
-        6,    6,    1,    1,    1,    1
+        1,    1,    1,    1,    3,    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,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        4,    4,    4,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[455] =
+static yyconst flex_int16_t yy_base[464] =
     {   0,
-        0,    0,   64,   65,   74,    0,  649,  650,  650,  650,
-      623,   44,  135,  650,  650,  622,  132,  650,  131,  129,
-      144,  157,  148,  620,  650,  158,  620,   46,  650,    0,
-      650,  650,  126,   99,  113,  145,  138,  138,  154,  592,
-      160,  108,  591,  165,  163,  585,  156,  598,  175,  181,
-      154,  177,  594,  650,  161,  650,  650,  650,  650,  625,
-      650,  650,    0,  650,  650,  650,  650,  650,  650,  650,
-      650,  650,  650,  228,  650,    0,  650,  235,  176,  226,
-      264,    0,  227,  650,  650,  650,  613,  650,  650,  650,
-      612,    0,  650,  650,  586,  579,  582,  590,  589,  576,
-
-      591,  578,  584,  572,  569,  582,  569,  566,  566,  572,
-      560,  189,  565,  575,  561,  567,  570,  571,    0,  237,
-      570,  179,  556,  569,  560,  562,  552,  566,  563,  565,
-      548,  553,  550,  539,  221,  547,  552,  548,  550,  539,
-      542,  217,  547,  539,  551,  214,  544,  650,  650,  650,
-        0,  282,    0,  289,  306,  318,  325,    0,  650,  650,
-        0,  536,  540,  549,  546,  530,  530,  212,  545,  542,
-      542,  540,  537,  529,  535,  522,  533,  519,  535,    0,
-      532,  520,  527,  524,  528,  521,  510,  509,  522,  525,
-      522,  517,  508,  294,  513,  516,  507,  504,  508,  514,
-
-      505,  496,  499,  497,  507,  493,  491,  504,  490,  492,
-      489,  500,  499,  221,  494,  489,  478,  311,  496,  498,
-      487,  332,  339,  346,  353,  488,    0,  486,  358,    0,
-      478,  476,  484,  473,  490,  479,  361,    0,    0,  473,
-      483,  483,    0,  468,  364,    0,    0,  470,  367,  471,
-      465,  464,  465,  464,  370,    0,    0,    0,    0,    0,
-      460,  461,  466,  457,  470,  465,  464,  456,  460,  452,
-      455,  459,  464,  450,  462,  453,    0,    0,  459,  448,
-      448,  453,  452,  449,    0,    0,    0,    0,  439,  451,
-      453,    0,    0,    0,    0,    0,    0,  441,  442,  436,
-
-      446,    0,    0,    0,  437,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,  444,    0,    0,  442,  438,
-        0,    0,    0,  434,  430,  435,  425,  438,  424,  437,
-      426,  433,    0,  431,  433,  417,  419,  425,  431,  426,
-      414,    0,  416,    0,  415,  418,    0,  407,  406,  406,
-      419,    0,  421,    0,  420,  419,  404,  417,  404,    0,
-        0,  407,    0,    0,  399,    0,    0,    0,    0,    0,
-      396,  407,  400,  406,  403,  398,  390,  402,    0,    0,
-      395,  402,  391,    0,  400,  397,  387,  374,  395,    0,
-        0,  395,    0,  393,  392,    0,    0,  391,  377,  389,
-
-        0,  380,  400,  399,  398,  362,    0,    0,    0,    0,
-        0,    0,    0,    0,  368,  254,  368,  360,  353,  355,
-      351,  353,  352,  355,  352,  292,  278,    0,  275,  259,
-      272,  240,  239,  243,  210,    0,  178,  187,  167,    0,
-      184,    0,  177,  116,  103,    0,  650,  403,  407,  408,
-      411,  417,  421,  422
+        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[455] =
+static yyconst flex_int16_t yy_def[464] =
     {   0,
-      447,    1,  448,  448,  447,    5,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  449,  447,  447,  447,  447,  447,  447,  450,
-      447,  447,  447,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  451,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  452,  447,  447,   22,  453,
-      447,  454,  449,  447,  447,  447,  447,  447,  447,  447,
-      447,  450,  447,  447,  450,  450,  450,  450,  450,  450,
-
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  447,  447,  447,
-      451,  447,  452,  447,  447,  447,  447,  454,  447,  447,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  447,  447,  447,  447,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,  450,  450,  450,  450,
-      450,  450,  450,  450,  450,  450,    0,  447,  447,  447,
-      447,  447,  447,  447
+      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[717] =
+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,
        23,   24,   25,   26,   27,   28,   29,   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,
+       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,
 
-        8,   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,   74,
-       93,  119,   75,   95,   96,   73,   71,   76,  120,   68,
-       78,  446,   85,   94,   97,  121,   98,  445,   77,   78,
-       99,   79,   79,   79,   79,   79,   79,   80,   81,   86,
-      103,   87,   88,  100,  104,  148,  107,   81,  108,  105,
-       81,   82,  110,  101,  128,  106,  102,  109,  116,   81,
-
-      111,  125,  112,  123,  142,  113,  117,  124,  143,  129,
-      447,  114,  130,  132,  126,  144,   82,  118,  444,  145,
-      133,  134,  443,  138,  149,  442,  139,  178,  146,  192,
-      135,  136,  441,  137,  140,  447,  440,  193,   78,   78,
-      179,  141,   74,   74,   74,   74,   74,   74,   74,  154,
-      154,  154,  154,  154,  154,  154,   81,   81,  152,  206,
-      219,  439,  220,  214,  280,  155,  232,  233,   81,   81,
-      152,  215,  281,  156,  207,  156,  438,  155,  157,  157,
-      157,  157,  157,  157,  157,  186,  420,  421,  187,  188,
-      437,  222,  189,  222,  190,  436,  223,  223,  223,  223,
-
-      223,  223,  223,  154,  154,  154,  154,  154,  154,  154,
-      258,  259,  260,  435,  434,  224,  433,  224,  432,  155,
-      225,  225,  225,  225,  225,  225,  225,  285,  286,  287,
-      431,  155,  157,  157,  157,  157,  157,  157,  157,  157,
-      157,  157,  157,  157,  157,  157,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+       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,  225,  293,  294,  295,  302,  303,  304,
-      309,  310,  311,  313,  314,  315,  321,  322,  323,  403,
-      404,  405,  430,  429,  428,  427,  426,  425,  424,  423,
-
-      422,  419,  406,   58,   58,   58,   58,   58,   58,   83,
-       83,   92,   92,   92,  151,  151,  151,  153,  418,  153,
-      153,  153,  153,   80,   80,  158,  158,  417,  416,  415,
-      414,  413,  412,  411,  410,  409,  408,  407,  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,  447,    7,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447
+      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[717] =
+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,
@@ -687,8 +702,8 @@ static yyconst flex_int16_t yy_chk[717] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    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,
 
@@ -696,74 +711,77 @@ static yyconst flex_int16_t yy_chk[717] =
         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,   20,
-       33,   42,   21,   34,   34,   19,   17,   21,   42,   13,
-       23,  445,   26,   33,   35,   42,   35,  444,   21,   22,
-       35,   22,   22,   22,   22,   22,   22,   22,   23,   26,
-       37,   26,   26,   36,   37,   55,   38,   22,   38,   37,
-       23,   22,   39,   36,   47,   37,   36,   38,   41,   22,
-
-       39,   45,   39,   44,   51,   39,   41,   44,   51,   47,
-       79,   39,   47,   49,   45,   52,   22,   41,  443,   52,
-       49,   49,  441,   50,   55,  439,   50,  112,   52,  122,
-       49,   49,  438,   49,   50,   79,  437,  122,   80,   83,
-      112,   50,   74,   74,   74,   74,   74,   74,   74,   78,
-       78,   78,   78,   78,   78,   78,   80,   83,   74,  135,
-      146,  435,  146,  142,  214,   78,  168,  168,   80,   83,
-       74,  142,  214,   81,  135,   81,  434,   78,   81,   81,
-       81,   81,   81,   81,   81,  120,  416,  416,  120,  120,
-      433,  152,  120,  152,  120,  432,  152,  152,  152,  152,
-
-      152,  152,  152,  154,  154,  154,  154,  154,  154,  154,
-      194,  194,  194,  431,  430,  155,  429,  155,  427,  154,
-      155,  155,  155,  155,  155,  155,  155,  218,  218,  218,
-      426,  154,  156,  156,  156,  156,  156,  156,  156,  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,  229,  229,  229,  237,  237,  237,
-      245,  245,  245,  249,  249,  249,  255,  255,  255,  388,
-      388,  388,  425,  424,  423,  422,  421,  420,  419,  418,
-
-      417,  415,  388,  448,  448,  448,  448,  448,  448,  449,
-      449,  450,  450,  450,  451,  451,  451,  452,  406,  452,
-      452,  452,  452,  453,  453,  454,  454,  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,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447
+        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[155] =
+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, 
@@ -772,7 +790,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[155] =
     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.
@@ -938,7 +956,12 @@ static int input (yyscan_t yyscanner );
     
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -946,7 +969,7 @@ static int input (yyscan_t yyscanner );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -957,7 +980,7 @@ static int input (yyscan_t yyscanner );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -1099,13 +1122,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 448 )
+                               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 != 447 );
+               while ( yy_current_state != 458 );
                yy_cp = yyg->yy_last_accepting_cpos;
                yy_current_state = yyg->yy_last_accepting_state;
 
@@ -1322,11 +1345,11 @@ YY_RULE_SETUP
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-{ context->lexAfterType = true; return(STRUCT); }
+{ context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-{ return reserved_word(yyscanner); }
+{ context->lexAfterType = true; return(STRUCT); }
        YY_BREAK
 case 49:
 YY_RULE_SETUP
@@ -1522,30 +1545,30 @@ YY_RULE_SETUP
        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 98:
-YY_RULE_SETUP
-{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
-       YY_BREAK
 case 99:
 YY_RULE_SETUP
 { yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
        YY_BREAK
 case 100:
 YY_RULE_SETUP
-{ context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;}
+{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
        YY_BREAK
 case 101:
 YY_RULE_SETUP
-{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
+{ context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;}
        YY_BREAK
 case 102:
 YY_RULE_SETUP
-{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
+{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
        YY_BREAK
 case 103:
 YY_RULE_SETUP
@@ -1557,198 +1580,202 @@ YY_RULE_SETUP
        YY_BREAK
 case 105:
 YY_RULE_SETUP
-{  return(ADD_ASSIGN); }
+{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
        YY_BREAK
 case 106:
 YY_RULE_SETUP
-{  return(SUB_ASSIGN); }
+{  return(ADD_ASSIGN); }
        YY_BREAK
 case 107:
 YY_RULE_SETUP
-{  return(MUL_ASSIGN); }
+{  return(SUB_ASSIGN); }
        YY_BREAK
 case 108:
 YY_RULE_SETUP
-{  return(DIV_ASSIGN); }
+{  return(MUL_ASSIGN); }
        YY_BREAK
 case 109:
 YY_RULE_SETUP
-{  return(MOD_ASSIGN); }
+{  return(DIV_ASSIGN); }
        YY_BREAK
 case 110:
 YY_RULE_SETUP
-{  return(LEFT_ASSIGN); }
+{  return(MOD_ASSIGN); }
        YY_BREAK
 case 111:
 YY_RULE_SETUP
-{  return(RIGHT_ASSIGN); }
+{  return(LEFT_ASSIGN); }
        YY_BREAK
 case 112:
 YY_RULE_SETUP
-{  return(AND_ASSIGN); }
+{  return(RIGHT_ASSIGN); }
        YY_BREAK
 case 113:
 YY_RULE_SETUP
-{  return(XOR_ASSIGN); }
+{  return(AND_ASSIGN); }
        YY_BREAK
 case 114:
 YY_RULE_SETUP
-{  return(OR_ASSIGN); }
+{  return(XOR_ASSIGN); }
        YY_BREAK
 case 115:
 YY_RULE_SETUP
-{  return(INC_OP); }
+{  return(OR_ASSIGN); }
        YY_BREAK
 case 116:
 YY_RULE_SETUP
-{  return(DEC_OP); }
+{  return(INC_OP); }
        YY_BREAK
 case 117:
 YY_RULE_SETUP
-{  return(AND_OP); }
+{  return(DEC_OP); }
        YY_BREAK
 case 118:
 YY_RULE_SETUP
-{  return(OR_OP); }
+{  return(AND_OP); }
        YY_BREAK
 case 119:
 YY_RULE_SETUP
-{  return(XOR_OP); }
+{  return(OR_OP); }
        YY_BREAK
 case 120:
 YY_RULE_SETUP
-{  return(LE_OP); }
+{  return(XOR_OP); }
        YY_BREAK
 case 121:
 YY_RULE_SETUP
-{  return(GE_OP); }
+{  return(LE_OP); }
        YY_BREAK
 case 122:
 YY_RULE_SETUP
-{  return(EQ_OP); }
+{  return(GE_OP); }
        YY_BREAK
 case 123:
 YY_RULE_SETUP
-{  return(NE_OP); }
+{  return(EQ_OP); }
        YY_BREAK
 case 124:
 YY_RULE_SETUP
-{  return(LEFT_OP); }
+{  return(NE_OP); }
        YY_BREAK
 case 125:
 YY_RULE_SETUP
-{  return(RIGHT_OP); }
+{  return(LEFT_OP); }
        YY_BREAK
 case 126:
 YY_RULE_SETUP
-{ context->lexAfterType = false; return(SEMICOLON); }
+{  return(RIGHT_OP); }
        YY_BREAK
 case 127:
 YY_RULE_SETUP
-{ context->lexAfterType = false; return(LEFT_BRACE); }
+{ context->lexAfterType = false; return(SEMICOLON); }
        YY_BREAK
 case 128:
 YY_RULE_SETUP
-{ return(RIGHT_BRACE); }
+{ context->lexAfterType = false; return(LEFT_BRACE); }
        YY_BREAK
 case 129:
 YY_RULE_SETUP
-{ if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
+{ return(RIGHT_BRACE); }
        YY_BREAK
 case 130:
 YY_RULE_SETUP
-{ return(COLON); }
+{ if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
        YY_BREAK
 case 131:
 YY_RULE_SETUP
-{ context->lexAfterType = false; return(EQUAL); }
+{ return(COLON); }
        YY_BREAK
 case 132:
 YY_RULE_SETUP
-{ context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
+{ context->lexAfterType = false; return(EQUAL); }
        YY_BREAK
 case 133:
 YY_RULE_SETUP
-{ context->inTypeParen = false; return(RIGHT_PAREN); }
+{ context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
        YY_BREAK
 case 134:
 YY_RULE_SETUP
-{ return(LEFT_BRACKET); }
+{ context->inTypeParen = false; return(RIGHT_PAREN); }
        YY_BREAK
 case 135:
 YY_RULE_SETUP
-{ return(RIGHT_BRACKET); }
+{ return(LEFT_BRACKET); }
        YY_BREAK
 case 136:
 YY_RULE_SETUP
-{ BEGIN(FIELDS);  return(DOT); }
+{ return(RIGHT_BRACKET); }
        YY_BREAK
 case 137:
 YY_RULE_SETUP
-{ return(BANG); }
+{ BEGIN(FIELDS);  return(DOT); }
        YY_BREAK
 case 138:
 YY_RULE_SETUP
-{ return(DASH); }
+{ return(BANG); }
        YY_BREAK
 case 139:
 YY_RULE_SETUP
-{ return(TILDE); }
+{ return(DASH); }
        YY_BREAK
 case 140:
 YY_RULE_SETUP
-{ return(PLUS); }
+{ return(TILDE); }
        YY_BREAK
 case 141:
 YY_RULE_SETUP
-{ return(STAR); }
+{ return(PLUS); }
        YY_BREAK
 case 142:
 YY_RULE_SETUP
-{ return(SLASH); }
+{ return(STAR); }
        YY_BREAK
 case 143:
 YY_RULE_SETUP
-{ return(PERCENT); }
+{ return(SLASH); }
        YY_BREAK
 case 144:
 YY_RULE_SETUP
-{ return(LEFT_ANGLE); }
+{ return(PERCENT); }
        YY_BREAK
 case 145:
 YY_RULE_SETUP
-{ return(RIGHT_ANGLE); }
+{ return(LEFT_ANGLE); }
        YY_BREAK
 case 146:
 YY_RULE_SETUP
-{ return(VERTICAL_BAR); }
+{ return(RIGHT_ANGLE); }
        YY_BREAK
 case 147:
 YY_RULE_SETUP
-{ return(CARET); }
+{ return(VERTICAL_BAR); }
        YY_BREAK
 case 148:
 YY_RULE_SETUP
-{ return(AMPERSAND); }
+{ return(CARET); }
        YY_BREAK
 case 149:
 YY_RULE_SETUP
-{ return(QUESTION); }
+{ return(AMPERSAND); }
        YY_BREAK
 case 150:
 YY_RULE_SETUP
+{ return(QUESTION); }
+       YY_BREAK
+case 151:
+YY_RULE_SETUP
 { 
     BEGIN(INITIAL);
     yylval->lex.string = NewPoolTString(yytext); 
     return FIELD_SELECTION;
 }
        YY_BREAK
-case 151:
+case 152:
 YY_RULE_SETUP
 {}
        YY_BREAK
-case 152:
-/* rule 152 can match eol */
+case 153:
+/* rule 153 can match eol */
 YY_RULE_SETUP
 {  }
        YY_BREAK
@@ -1757,11 +1784,11 @@ case YY_STATE_EOF(COMMENT):
 case YY_STATE_EOF(FIELDS):
 { context->AfterEOF = true; yyterminate(); }
        YY_BREAK
-case 153:
+case 154:
 YY_RULE_SETUP
 { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
        YY_BREAK
-case 154:
+case 155:
 YY_RULE_SETUP
 ECHO;
        YY_BREAK
@@ -2057,7 +2084,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
                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 >= 448 )
+                       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];
@@ -2086,11 +2113,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        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 >= 448 )
+               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 == 447);
+       yy_is_jam = (yy_current_state == 458);
 
        return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2500,8 +2527,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
 
 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * @param yyscanner The scanner object.
  * @return the newly allocated buffer state object.
  */
index a49ad92..9d6085f 100644 (file)
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.2.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
-   Foundation, Inc.
+      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
    it under the terms of the GNU General Public License as published by
@@ -45,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.2"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
      WHILE = 295,
      SAMPLER2D = 296,
      SAMPLERCUBE = 297,
-     IDENTIFIER = 298,
-     TYPE_NAME = 299,
-     FLOATCONSTANT = 300,
-     INTCONSTANT = 301,
-     BOOLCONSTANT = 302,
-     FIELD_SELECTION = 303,
-     LEFT_OP = 304,
-     RIGHT_OP = 305,
-     INC_OP = 306,
-     DEC_OP = 307,
-     LE_OP = 308,
-     GE_OP = 309,
-     EQ_OP = 310,
-     NE_OP = 311,
-     AND_OP = 312,
-     OR_OP = 313,
-     XOR_OP = 314,
-     MUL_ASSIGN = 315,
-     DIV_ASSIGN = 316,
-     ADD_ASSIGN = 317,
-     MOD_ASSIGN = 318,
-     LEFT_ASSIGN = 319,
-     RIGHT_ASSIGN = 320,
-     AND_ASSIGN = 321,
-     XOR_ASSIGN = 322,
-     OR_ASSIGN = 323,
-     SUB_ASSIGN = 324,
-     LEFT_PAREN = 325,
-     RIGHT_PAREN = 326,
-     LEFT_BRACKET = 327,
-     RIGHT_BRACKET = 328,
-     LEFT_BRACE = 329,
-     RIGHT_BRACE = 330,
-     DOT = 331,
-     COMMA = 332,
-     COLON = 333,
-     EQUAL = 334,
-     SEMICOLON = 335,
-     BANG = 336,
-     DASH = 337,
-     TILDE = 338,
-     PLUS = 339,
-     STAR = 340,
-     SLASH = 341,
-     PERCENT = 342,
-     LEFT_ANGLE = 343,
-     RIGHT_ANGLE = 344,
-     VERTICAL_BAR = 345,
-     CARET = 346,
-     AMPERSAND = 347,
-     QUESTION = 348
+     SAMPLER_EXTERNAL_OES = 298,
+     IDENTIFIER = 299,
+     TYPE_NAME = 300,
+     FLOATCONSTANT = 301,
+     INTCONSTANT = 302,
+     BOOLCONSTANT = 303,
+     FIELD_SELECTION = 304,
+     LEFT_OP = 305,
+     RIGHT_OP = 306,
+     INC_OP = 307,
+     DEC_OP = 308,
+     LE_OP = 309,
+     GE_OP = 310,
+     EQ_OP = 311,
+     NE_OP = 312,
+     AND_OP = 313,
+     OR_OP = 314,
+     XOR_OP = 315,
+     MUL_ASSIGN = 316,
+     DIV_ASSIGN = 317,
+     ADD_ASSIGN = 318,
+     MOD_ASSIGN = 319,
+     LEFT_ASSIGN = 320,
+     RIGHT_ASSIGN = 321,
+     AND_ASSIGN = 322,
+     XOR_ASSIGN = 323,
+     OR_ASSIGN = 324,
+     SUB_ASSIGN = 325,
+     LEFT_PAREN = 326,
+     RIGHT_PAREN = 327,
+     LEFT_BRACKET = 328,
+     RIGHT_BRACKET = 329,
+     LEFT_BRACE = 330,
+     RIGHT_BRACE = 331,
+     DOT = 332,
+     COMMA = 333,
+     COLON = 334,
+     EQUAL = 335,
+     SEMICOLON = 336,
+     BANG = 337,
+     DASH = 338,
+     TILDE = 339,
+     PLUS = 340,
+     STAR = 341,
+     SLASH = 342,
+     PERCENT = 343,
+     LEFT_ANGLE = 344,
+     RIGHT_ANGLE = 345,
+     VERTICAL_BAR = 346,
+     CARET = 347,
+     AMPERSAND = 348,
+     QUESTION = 349
    };
 #endif
 
@@ -341,7 +343,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -504,22 +506,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  69
+#define YYFINAL  70
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1385
+#define YYLAST   1404
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  94
+#define YYNTOKENS  95
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  83
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  199
+#define YYNRULES  200
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  302
+#define YYNSTATES  303
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   348
+#define YYMAXUTOK   349
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -561,7 +563,7 @@ static const yytype_uint8 yytranslate[] =
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    87,    88,    89,    90,    91,    92,    93
+      85,    86,    87,    88,    89,    90,    91,    92,    93,    94
 };
 
 #if YYDEBUG
@@ -582,75 +584,76 @@ static const yytype_uint16 yyprhs[] =
      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,   381,   388,   389,
-     395,   397,   400,   404,   406,   410,   412,   417,   419,   421,
-     423,   425,   427,   429,   431,   433,   435,   438,   439,   440,
-     446,   448,   450,   451,   454,   455,   458,   461,   465,   467,
-     470,   472,   475,   481,   485,   487,   489,   494,   495,   502,
-     503,   512,   513,   521,   523,   525,   527,   528,   531,   535,
-     538,   541,   544,   548,   551,   553,   556,   558,   560,   561
+     368,   370,   372,   374,   376,   378,   380,   382,   383,   390,
+     391,   397,   399,   402,   406,   408,   412,   414,   419,   421,
+     423,   425,   427,   429,   431,   433,   435,   437,   440,   441,
+     442,   448,   450,   452,   453,   456,   457,   460,   463,   467,
+     469,   472,   474,   477,   483,   487,   489,   491,   496,   497,
+     504,   505,   514,   515,   523,   525,   527,   529,   530,   533,
+     537,   540,   543,   546,   550,   553,   555,   558,   560,   562,
+     563
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-     173,     0,    -1,    43,    -1,    95,    -1,    46,    -1,    45,
-      -1,    47,    -1,    70,   122,    71,    -1,    96,    -1,    97,
-      72,    98,    73,    -1,    99,    -1,    97,    76,    48,    -1,
-      97,    51,    -1,    97,    52,    -1,   122,    -1,   100,    -1,
-     101,    -1,    97,    76,   101,    -1,   103,    71,    -1,   102,
-      71,    -1,   104,    39,    -1,   104,    -1,   104,   120,    -1,
-     103,    77,   120,    -1,   105,    70,    -1,   140,    -1,    43,
-      -1,    48,    -1,    97,    -1,    51,   106,    -1,    52,   106,
-      -1,   107,   106,    -1,    84,    -1,    82,    -1,    81,    -1,
-     106,    -1,   108,    85,   106,    -1,   108,    86,   106,    -1,
-     108,    -1,   109,    84,   108,    -1,   109,    82,   108,    -1,
-     109,    -1,   110,    -1,   111,    88,   110,    -1,   111,    89,
-     110,    -1,   111,    53,   110,    -1,   111,    54,   110,    -1,
-     111,    -1,   112,    55,   111,    -1,   112,    56,   111,    -1,
-     112,    -1,   113,    -1,   114,    -1,   115,    -1,   116,    57,
-     115,    -1,   116,    -1,   117,    59,   116,    -1,   117,    -1,
-     118,    58,   117,    -1,   118,    -1,   118,    93,   122,    78,
-     120,    -1,   119,    -1,   106,   121,   120,    -1,    79,    -1,
-      60,    -1,    61,    -1,    62,    -1,    69,    -1,   120,    -1,
-     122,    77,   120,    -1,   119,    -1,   125,    80,    -1,   133,
-      80,    -1,     7,   138,   139,    80,    -1,   126,    71,    -1,
-     128,    -1,   127,    -1,   128,   130,    -1,   127,    77,   130,
-      -1,   135,    43,    70,    -1,   137,    43,    -1,   137,    43,
-      72,   123,    73,    -1,   136,   131,   129,    -1,   131,   129,
-      -1,   136,   131,   132,    -1,   131,   132,    -1,    -1,    33,
-      -1,    34,    -1,    35,    -1,   137,    -1,   134,    -1,   133,
-      77,    43,    -1,   133,    77,    43,    72,    73,    -1,   133,
-      77,    43,    72,   123,    73,    -1,   133,    77,    43,    79,
-     148,    -1,   135,    -1,   135,    43,    -1,   135,    43,    72,
-      73,    -1,   135,    43,    72,   123,    73,    -1,   135,    43,
-      79,   148,    -1,     3,    43,    -1,   137,    -1,   136,   137,
+     174,     0,    -1,    44,    -1,    96,    -1,    47,    -1,    46,
+      -1,    48,    -1,    71,   123,    72,    -1,    97,    -1,    98,
+      73,    99,    74,    -1,   100,    -1,    98,    77,    49,    -1,
+      98,    52,    -1,    98,    53,    -1,   123,    -1,   101,    -1,
+     102,    -1,    98,    77,   102,    -1,   104,    72,    -1,   103,
+      72,    -1,   105,    39,    -1,   105,    -1,   105,   121,    -1,
+     104,    78,   121,    -1,   106,    71,    -1,   141,    -1,    44,
+      -1,    49,    -1,    98,    -1,    52,   107,    -1,    53,   107,
+      -1,   108,   107,    -1,    85,    -1,    83,    -1,    82,    -1,
+     107,    -1,   109,    86,   107,    -1,   109,    87,   107,    -1,
+     109,    -1,   110,    85,   109,    -1,   110,    83,   109,    -1,
+     110,    -1,   111,    -1,   112,    89,   111,    -1,   112,    90,
+     111,    -1,   112,    54,   111,    -1,   112,    55,   111,    -1,
+     112,    -1,   113,    56,   112,    -1,   113,    57,   112,    -1,
+     113,    -1,   114,    -1,   115,    -1,   116,    -1,   117,    58,
+     116,    -1,   117,    -1,   118,    60,   117,    -1,   118,    -1,
+     119,    59,   118,    -1,   119,    -1,   119,    94,   123,    79,
+     121,    -1,   120,    -1,   107,   122,   121,    -1,    80,    -1,
+      61,    -1,    62,    -1,    63,    -1,    70,    -1,   121,    -1,
+     123,    78,   121,    -1,   120,    -1,   126,    81,    -1,   134,
+      81,    -1,     7,   139,   140,    81,    -1,   127,    72,    -1,
+     129,    -1,   128,    -1,   129,   131,    -1,   128,    78,   131,
+      -1,   136,    44,    71,    -1,   138,    44,    -1,   138,    44,
+      73,   124,    74,    -1,   137,   132,   130,    -1,   132,   130,
+      -1,   137,   132,   133,    -1,   132,   133,    -1,    -1,    33,
+      -1,    34,    -1,    35,    -1,   138,    -1,   135,    -1,   134,
+      78,    44,    -1,   134,    78,    44,    73,    74,    -1,   134,
+      78,    44,    73,   124,    74,    -1,   134,    78,    44,    80,
+     149,    -1,   136,    -1,   136,    44,    -1,   136,    44,    73,
+      74,    -1,   136,    44,    73,   124,    74,    -1,   136,    44,
+      80,   149,    -1,     3,    44,    -1,   138,    -1,   137,   138,
       -1,     9,    -1,     8,    -1,    37,    -1,     3,    37,    -1,
-      36,    -1,   139,    -1,   138,   139,    -1,     4,    -1,     5,
-      -1,     6,    -1,   140,    -1,   140,    72,   123,    73,    -1,
+      36,    -1,   140,    -1,   139,   140,    -1,     4,    -1,     5,
+      -1,     6,    -1,   141,    -1,   141,    73,   124,    74,    -1,
       39,    -1,    11,    -1,    12,    -1,    10,    -1,    27,    -1,
       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,   141,    -1,    44,    -1,
-      -1,    38,    43,    74,   142,   144,    75,    -1,    -1,    38,
-      74,   143,   144,    75,    -1,   145,    -1,   144,   145,    -1,
-     137,   146,    80,    -1,   147,    -1,   146,    77,   147,    -1,
-      43,    -1,    43,    72,   123,    73,    -1,   120,    -1,   124,
-      -1,   152,    -1,   151,    -1,   149,    -1,   161,    -1,   162,
-      -1,   165,    -1,   172,    -1,    74,    75,    -1,    -1,    -1,
-      74,   153,   160,   154,    75,    -1,   159,    -1,   151,    -1,
-      -1,   157,   159,    -1,    -1,   158,   151,    -1,    74,    75,
-      -1,    74,   160,    75,    -1,   150,    -1,   160,   150,    -1,
-      80,    -1,   122,    80,    -1,    18,    70,   122,    71,   163,
-      -1,   156,    16,   156,    -1,   156,    -1,   122,    -1,   135,
-      43,    79,   148,    -1,    -1,    40,    70,   166,   164,    71,
-     155,    -1,    -1,    15,   167,   156,    40,    70,   122,    71,
-      80,    -1,    -1,    17,    70,   168,   169,   171,    71,   155,
-      -1,   161,    -1,   149,    -1,   164,    -1,    -1,   170,    80,
-      -1,   170,    80,   122,    -1,    14,    80,    -1,    13,    80,
-      -1,    20,    80,    -1,    20,   122,    80,    -1,    19,    80,
-      -1,   174,    -1,   173,   174,    -1,   175,    -1,   124,    -1,
-      -1,   125,   176,   159,    -1
+      32,    -1,    41,    -1,    42,    -1,    43,    -1,   142,    -1,
+      45,    -1,    -1,    38,    44,    75,   143,   145,    76,    -1,
+      -1,    38,    75,   144,   145,    76,    -1,   146,    -1,   145,
+     146,    -1,   138,   147,    81,    -1,   148,    -1,   147,    78,
+     148,    -1,    44,    -1,    44,    73,   124,    74,    -1,   121,
+      -1,   125,    -1,   153,    -1,   152,    -1,   150,    -1,   162,
+      -1,   163,    -1,   166,    -1,   173,    -1,    75,    76,    -1,
+      -1,    -1,    75,   154,   161,   155,    76,    -1,   160,    -1,
+     152,    -1,    -1,   158,   160,    -1,    -1,   159,   152,    -1,
+      75,    76,    -1,    75,   161,    76,    -1,   151,    -1,   161,
+     151,    -1,    81,    -1,   123,    81,    -1,    18,    71,   123,
+      72,   164,    -1,   157,    16,   157,    -1,   157,    -1,   123,
+      -1,   136,    44,    80,   149,    -1,    -1,    40,    71,   167,
+     165,    72,   156,    -1,    -1,    15,   168,   157,    40,    71,
+     123,    72,    81,    -1,    -1,    17,    71,   169,   170,   172,
+      72,   156,    -1,   162,    -1,   150,    -1,   165,    -1,    -1,
+     171,    81,    -1,   171,    81,   123,    -1,    14,    81,    -1,
+      13,    81,    -1,    20,    81,    -1,    20,   123,    81,    -1,
+      19,    81,    -1,   175,    -1,   174,   175,    -1,   176,    -1,
+     125,    -1,    -1,   126,   177,   160,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -669,13 +672,14 @@ static const yytype_uint16 yyrline[] =
     1345,  1365,  1454,  1463,  1486,  1489,  1495,  1503,  1511,  1519,
     1529,  1536,  1539,  1542,  1548,  1551,  1566,  1570,  1574,  1578,
     1587,  1592,  1597,  1602,  1607,  1612,  1617,  1622,  1627,  1632,
-    1638,  1644,  1650,  1655,  1660,  1665,  1678,  1678,  1692,  1692,
-    1701,  1704,  1719,  1755,  1759,  1765,  1773,  1789,  1793,  1797,
-    1798,  1804,  1805,  1806,  1807,  1808,  1812,  1813,  1813,  1813,
-    1823,  1824,  1828,  1828,  1829,  1829,  1834,  1837,  1847,  1850,
-    1856,  1857,  1861,  1869,  1873,  1883,  1888,  1905,  1905,  1910,
-    1910,  1917,  1917,  1925,  1928,  1934,  1937,  1943,  1947,  1954,
-    1961,  1968,  1975,  1986,  1995,  1999,  2006,  2009,  2015,  2015
+    1638,  1644,  1650,  1655,  1660,  1669,  1674,  1687,  1687,  1701,
+    1701,  1710,  1713,  1728,  1764,  1768,  1774,  1782,  1798,  1802,
+    1806,  1807,  1813,  1814,  1815,  1816,  1817,  1821,  1822,  1822,
+    1822,  1832,  1833,  1837,  1837,  1838,  1838,  1843,  1846,  1856,
+    1859,  1865,  1866,  1870,  1878,  1882,  1892,  1897,  1914,  1914,
+    1919,  1919,  1926,  1926,  1934,  1937,  1943,  1946,  1952,  1956,
+    1963,  1970,  1977,  1984,  1995,  2004,  2008,  2015,  2018,  2024,
+    2024
 };
 #endif
 
@@ -691,12 +695,12 @@ static const char *const yytname[] =
   "BVEC4", "IVEC2", "IVEC3", "IVEC4", "VEC2", "VEC3", "VEC4", "MATRIX2",
   "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
   "VARYING", "STRUCT", "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE",
-  "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
-  "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP",
-  "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP",
-  "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN",
-  "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN",
-  "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
+  "SAMPLER_EXTERNAL_OES", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT",
+  "INTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
+  "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
+  "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
+  "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
+  "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
   "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
   "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
   "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
@@ -746,33 +750,34 @@ static const yytype_uint16 yytoknum[] =
      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
-     345,   346,   347,   348
+     345,   346,   347,   348,   349
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    94,    95,    96,    96,    96,    96,    96,    97,    97,
-      97,    97,    97,    97,    98,    99,   100,   100,   101,   101,
-     102,   102,   103,   103,   104,   105,   105,   105,   106,   106,
-     106,   106,   107,   107,   107,   108,   108,   108,   109,   109,
-     109,   110,   111,   111,   111,   111,   111,   112,   112,   112,
-     113,   114,   115,   116,   116,   117,   117,   118,   118,   119,
-     119,   120,   120,   121,   121,   121,   121,   121,   122,   122,
-     123,   124,   124,   124,   125,   126,   126,   127,   127,   128,
-     129,   129,   130,   130,   130,   130,   131,   131,   131,   131,
-     132,   133,   133,   133,   133,   133,   134,   134,   134,   134,
-     134,   134,   135,   135,   136,   136,   136,   136,   136,   137,
-     137,   138,   138,   138,   139,   139,   140,   140,   140,   140,
-     140,   140,   140,   140,   140,   140,   140,   140,   140,   140,
-     140,   140,   140,   140,   140,   140,   142,   141,   143,   141,
-     144,   144,   145,   146,   146,   147,   147,   148,   149,   150,
-     150,   151,   151,   151,   151,   151,   152,   153,   154,   152,
-     155,   155,   157,   156,   158,   156,   159,   159,   160,   160,
-     161,   161,   162,   163,   163,   164,   164,   166,   165,   167,
-     165,   168,   165,   169,   169,   170,   170,   171,   171,   172,
-     172,   172,   172,   172,   173,   173,   174,   174,   176,   175
+       0,    95,    96,    97,    97,    97,    97,    97,    98,    98,
+      98,    98,    98,    98,    99,   100,   101,   101,   102,   102,
+     103,   103,   104,   104,   105,   106,   106,   106,   107,   107,
+     107,   107,   108,   108,   108,   109,   109,   109,   110,   110,
+     110,   111,   112,   112,   112,   112,   112,   113,   113,   113,
+     114,   115,   116,   117,   117,   118,   118,   119,   119,   120,
+     120,   121,   121,   122,   122,   122,   122,   122,   123,   123,
+     124,   125,   125,   125,   126,   127,   127,   128,   128,   129,
+     130,   130,   131,   131,   131,   131,   132,   132,   132,   132,
+     133,   134,   134,   134,   134,   134,   135,   135,   135,   135,
+     135,   135,   136,   136,   137,   137,   137,   137,   137,   138,
+     138,   139,   139,   139,   140,   140,   141,   141,   141,   141,
+     141,   141,   141,   141,   141,   141,   141,   141,   141,   141,
+     141,   141,   141,   141,   141,   141,   141,   143,   142,   144,
+     142,   145,   145,   146,   147,   147,   148,   148,   149,   150,
+     151,   151,   152,   152,   152,   152,   152,   153,   154,   155,
+     153,   156,   156,   158,   157,   159,   157,   160,   160,   161,
+     161,   162,   162,   163,   164,   164,   165,   165,   167,   166,
+     168,   166,   169,   166,   170,   170,   171,   171,   172,   172,
+     173,   173,   173,   173,   173,   174,   174,   175,   175,   177,
+     176
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -791,13 +796,14 @@ static const yytype_uint8 yyr2[] =
        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,     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,     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
+       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,     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
@@ -807,392 +813,396 @@ 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,   135,
-     197,   198,     0,    76,    86,     0,    91,    96,     0,   102,
-       0,   109,   114,   134,     0,   194,   196,   107,   101,     0,
-       0,   138,    71,     0,    74,    86,     0,    87,    88,    89,
-      77,     0,    86,     0,    72,    97,   103,   110,     0,     1,
-     195,     0,   136,     0,     0,   199,    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,   140,     0,     0,   179,
-       0,     0,     0,     0,     0,   157,   166,   170,    35,    61,
-      68,     0,   148,     0,   114,   151,   168,   150,   149,     0,
-     152,   153,   154,   155,    80,    82,    84,     0,     0,    98,
-       0,   147,   100,    29,    30,     0,    12,    13,     0,     0,
-      19,    18,     0,    20,    22,    24,    31,     0,     0,     0,
+     129,   130,   131,   108,   106,     0,   116,   132,   133,   134,
+     136,   198,   199,     0,    76,    86,     0,    91,    96,     0,
+     102,     0,   109,   114,   135,     0,   195,   197,   107,   101,
+       0,     0,   139,    71,     0,    74,    86,     0,    87,    88,
+      89,    77,     0,    86,     0,    72,    97,   103,   110,     0,
+       1,   196,     0,   137,     0,     0,   200,    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,   141,     0,     0,
+     180,     0,     0,     0,     0,     0,   158,   167,   171,    35,
+      61,    68,     0,   149,     0,   114,   152,   169,   151,   150,
+       0,   153,   154,   155,   156,    80,    82,    84,     0,     0,
+      98,     0,   148,   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,   115,     0,   145,     0,   143,   139,   141,   190,   189,
-     164,   181,     0,   193,   191,     0,   177,   156,     0,    64,
-      65,    66,    67,    63,     0,     0,   171,   167,   169,     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,   137,     0,     0,   142,     0,
-       0,     0,     0,     0,   192,     0,   158,    62,    69,     0,
-      94,     9,     0,     0,   144,     0,   163,   165,   184,   183,
-     186,   164,   175,     0,     0,     0,    81,    60,   146,     0,
-     185,     0,     0,   174,   172,     0,     0,   159,     0,   187,
-       0,   164,     0,   161,   178,   160,     0,   188,   182,   173,
-     176,   180
+       0,     0,   115,     0,   146,     0,   144,   140,   142,   191,
+     190,   165,   182,     0,   194,   192,     0,   178,   157,     0,
+      64,    65,    66,    67,    63,     0,     0,   172,   168,   170,
+       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,   138,     0,     0,   143,
+       0,     0,     0,     0,     0,   193,     0,   159,    62,    69,
+       0,    94,     9,     0,     0,   145,     0,   164,   166,   185,
+     184,   187,   165,   176,     0,     0,     0,    81,    60,   147,
+       0,   186,     0,     0,   175,   173,     0,     0,   160,     0,
+     188,     0,   165,     0,   162,   179,   161,     0,   189,   183,
+     174,   177,   181
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    96,    97,    98,   225,    99,   100,   101,   102,   103,
-     104,   105,   138,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   139,   140,   214,   141,   120,
-     142,   143,    32,    33,    34,    77,    60,    61,    78,    35,
-      36,    37,    38,    39,    40,    41,   121,    43,   123,    73,
-     125,   126,   194,   195,   162,   145,   146,   147,   148,   208,
-     275,   294,   249,   250,   251,   295,   149,   150,   151,   284,
-     274,   152,   255,   200,   252,   270,   281,   282,   153,    44,
-      45,    46,    53
+      -1,    97,    98,    99,   226,   100,   101,   102,   103,   104,
+     105,   106,   139,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   140,   141,   215,   142,   121,
+     143,   144,    33,    34,    35,    78,    61,    62,    79,    36,
+      37,    38,    39,    40,    41,    42,   122,    44,   124,    74,
+     126,   127,   195,   196,   163,   146,   147,   148,   149,   209,
+     276,   295,   250,   251,   252,   296,   150,   151,   152,   285,
+     275,   153,   256,   201,   253,   271,   282,   283,   154,    45,
+      46,    47,    54
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -260
+#define YYPACT_NINF -256
 static const yytype_int16 yypact[] =
 {
-    1241,   -23,  -260,  -260,  -260,   152,  -260,  -260,  -260,  -260,
-    -260,  -260,  -260,  -260,  -260,  -260,  -260,  -260,  -260,  -260,
-    -260,  -260,  -260,  -260,  -260,   -32,  -260,  -260,  -260,  -260,
-    -260,   -18,   -35,    17,    82,    29,  -260,    26,  1282,  -260,
-    1341,  -260,    11,  -260,  1199,  -260,  -260,  -260,  -260,  1341,
-      28,  -260,  -260,    36,  -260,    62,    67,  -260,  -260,  -260,
-    -260,  1282,   126,    79,  -260,     7,  -260,  -260,   972,  -260,
-    -260,    40,  -260,  1282,   288,  -260,  -260,  -260,  -260,    87,
-    1282,   -13,  -260,   193,   972,    80,  -260,  -260,  -260,  -260,
-     972,   972,   972,  -260,  -260,  -260,  -260,  -260,    16,  -260,
-    -260,  -260,    81,   -40,  1036,    84,  -260,   972,    77,   -67,
-    -260,   -31,   111,  -260,  -260,  -260,   107,   115,   -29,  -260,
-     103,  -260,  -260,  1282,   138,  1103,  -260,   104,   105,  -260,
-     113,   116,   108,   844,   117,   118,  -260,  -260,   -34,  -260,
-    -260,    31,  -260,   -18,   -16,  -260,  -260,  -260,  -260,   370,
-    -260,  -260,  -260,  -260,   119,  -260,  -260,   908,   972,  -260,
-     121,  -260,  -260,  -260,  -260,     5,  -260,  -260,   972,  1306,
-    -260,  -260,   972,   120,  -260,  -260,  -260,   972,   972,   972,
-     972,   972,   972,   972,   972,   972,   972,   972,   972,   972,
-     972,  -260,  1144,   123,    44,  -260,  -260,  -260,  -260,  -260,
-     122,  -260,   972,  -260,  -260,    71,  -260,  -260,   452,  -260,
-    -260,  -260,  -260,  -260,   972,   972,  -260,  -260,  -260,   972,
-    -260,   124,  -260,  -260,  -260,   125,   129,  -260,   131,  -260,
-    -260,  -260,  -260,    77,    77,  -260,  -260,  -260,  -260,   -31,
-     -31,  -260,   107,   115,    91,  -260,   972,   138,  -260,   167,
-      36,   616,   698,    10,  -260,   780,   452,  -260,  -260,   137,
-    -260,  -260,   972,   139,  -260,   141,  -260,  -260,  -260,  -260,
-     780,   122,   129,   170,   155,   153,  -260,  -260,  -260,   972,
-    -260,   147,   158,   214,  -260,   154,   534,  -260,    30,   972,
-     534,   122,   972,  -260,  -260,  -260,   162,   129,  -260,  -260,
-    -260,  -260
+    1256,   -17,  -256,  -256,  -256,   147,  -256,  -256,  -256,  -256,
+    -256,  -256,  -256,  -256,  -256,  -256,  -256,  -256,  -256,  -256,
+    -256,  -256,  -256,  -256,  -256,   -32,  -256,  -256,  -256,  -256,
+    -256,  -256,   -60,   -64,   -29,    20,   -43,  -256,   -10,  1298,
+    -256,  1359,  -256,   -27,  -256,  1213,  -256,  -256,  -256,  -256,
+    1359,    56,  -256,  -256,    74,  -256,    70,    51,  -256,  -256,
+    -256,  -256,  1298,   123,   110,  -256,     9,  -256,  -256,   982,
+    -256,  -256,    86,  -256,  1298,   289,  -256,  -256,  -256,  -256,
+     126,  1298,    35,  -256,   194,   982,   100,  -256,  -256,  -256,
+    -256,   982,   982,   982,  -256,  -256,  -256,  -256,  -256,    18,
+    -256,  -256,  -256,   101,   -62,  1047,   104,  -256,   982,   -19,
+      76,  -256,   -24,    41,  -256,  -256,  -256,   114,   117,   -33,
+    -256,   107,  -256,  -256,  1298,   134,  1115,  -256,   102,   103,
+    -256,   115,   116,   108,   852,   119,   109,  -256,  -256,    39,
+    -256,  -256,     5,  -256,   -60,    89,  -256,  -256,  -256,  -256,
+     372,  -256,  -256,  -256,  -256,   118,  -256,  -256,   917,   982,
+    -256,   120,  -256,  -256,  -256,  -256,    38,  -256,  -256,   982,
+    1323,  -256,  -256,   982,   121,  -256,  -256,  -256,   982,   982,
+     982,   982,   982,   982,   982,   982,   982,   982,   982,   982,
+     982,   982,  -256,  1157,   122,     6,  -256,  -256,  -256,  -256,
+    -256,   124,  -256,   982,  -256,  -256,    44,  -256,  -256,   455,
+    -256,  -256,  -256,  -256,  -256,   982,   982,  -256,  -256,  -256,
+     982,  -256,   127,  -256,  -256,  -256,   128,   129,  -256,   125,
+    -256,  -256,  -256,  -256,   -19,   -19,  -256,  -256,  -256,  -256,
+     -24,   -24,  -256,   114,   117,    42,  -256,   982,   134,  -256,
+     157,    74,   621,   704,    40,  -256,   787,   455,  -256,  -256,
+     137,  -256,  -256,   982,   138,  -256,   142,  -256,  -256,  -256,
+    -256,   787,   124,   129,   164,   155,   152,  -256,  -256,  -256,
+     982,  -256,   133,   158,   213,  -256,   151,   538,  -256,    45,
+     982,   538,   124,   982,  -256,  -256,  -256,   153,   129,  -256,
+    -256,  -256,  -256
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -260,  -260,  -260,  -260,  -260,  -260,  -260,    74,  -260,  -260,
-    -260,  -260,   -44,  -260,    -9,  -260,   -55,    -8,  -260,  -260,
-    -260,    59,    60,    58,  -260,   -64,   -83,  -260,   -90,   -73,
-       6,     8,  -260,  -260,  -260,   169,   195,   191,   174,  -260,
-    -260,  -222,   -25,   -20,   252,   -15,     0,  -260,  -260,  -260,
-     135,  -120,  -260,    12,  -145,     9,  -142,  -235,  -260,  -260,
-    -260,   -30,  -259,  -260,  -260,   -50,    54,    13,  -260,  -260,
-      -6,  -260,  -260,  -260,  -260,  -260,  -260,  -260,  -260,  -260,
-     223,  -260,  -260
+    -256,  -256,  -256,  -256,  -256,  -256,  -256,    75,  -256,  -256,
+    -256,  -256,   -44,  -256,   -15,  -256,   -55,   -18,  -256,  -256,
+    -256,    60,    55,    59,  -256,   -65,   -83,  -256,   -92,   -73,
+       7,    13,  -256,  -256,  -256,   169,   195,   191,   174,  -256,
+    -256,  -238,   -20,   -30,   253,    19,     0,  -256,  -256,  -256,
+     135,  -121,  -256,    12,  -145,     8,  -144,  -228,  -256,  -256,
+    -256,   -28,  -255,  -256,  -256,   -51,    53,    11,  -256,  -256,
+      -5,  -256,  -256,  -256,  -256,  -256,  -256,  -256,  -256,  -256,
+     222,  -256,  -256
 };
 
 /* 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 -163
+#define YYTABLE_NINF -164
 static const yytype_int16 yytable[] =
 {
-      42,   161,   165,    75,   119,   197,    30,   218,    31,    62,
-     160,    50,   283,   222,    47,   179,   267,   180,    66,   119,
-      48,   174,   181,   182,   106,    67,   209,   210,   211,   189,
-      62,   171,   299,   273,    71,   212,    54,   172,    42,   106,
-      42,    79,    51,   205,    42,   213,   163,   164,   273,    42,
-      30,   293,    31,   124,   -25,   293,    68,   183,   184,   157,
-      79,    42,    52,   176,   190,    56,   158,   166,   167,    65,
-       6,     7,   197,    42,   144,   161,   224,    82,   226,    83,
-      42,   271,   215,    68,   221,    56,    84,   215,   168,   230,
-       6,     7,   169,   119,    55,    57,    58,    59,    23,    24,
-     244,   296,    72,   124,    47,   124,    63,   215,   215,    64,
-      74,   216,   253,   106,   218,    57,    58,    59,    23,    24,
-     122,   247,    81,    42,   248,    42,   235,   236,   237,   238,
-     154,   257,   258,   231,   232,   106,   106,   106,   106,   106,
-     106,   106,   106,   106,   106,   106,   259,   300,   215,   144,
-     -26,   254,   170,   -75,   175,   119,     2,     3,     4,    57,
-      58,    59,   177,   178,   187,   272,   185,   186,   215,   262,
-     233,   234,   124,   263,   188,   106,   191,   239,   240,   277,
-     272,   193,   119,   201,   198,   199,   202,   206,   203,   288,
-    -116,   219,    42,   207,   223,   246,  -162,   260,   261,   297,
-     266,   -27,   106,     8,     9,    10,   215,   265,   144,   161,
-     276,   279,   278,   285,    11,    12,    13,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,   286,   289,   287,   290,
-     291,    25,    26,   292,    27,    28,    85,    29,    86,    87,
-      88,    89,   301,   229,    90,    91,   241,   243,   242,   155,
-      76,   144,   144,    80,   156,   144,   144,    49,   192,   264,
-     298,   268,   256,    92,   280,   269,   159,    70,     0,     0,
-     144,     0,     0,     0,    93,    94,     0,    95,     0,     0,
-       0,     0,     0,     0,     0,     0,   144,     0,     0,     0,
-     144,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      10,   127,   128,   129,     0,   130,   131,   132,   133,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,     0,     0,     0,    23,    24,    25,    26,   134,    27,
-      28,    85,    29,    86,    87,    88,    89,     0,     0,    90,
-      91,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    92,     0,
-       0,     0,   135,   136,     0,     0,     0,     0,   137,    93,
-      94,     0,    95,     1,     2,     3,     4,     5,     6,     7,
-       8,     9,    10,   127,   128,   129,     0,   130,   131,   132,
-     133,    11,    12,    13,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,     0,     0,     0,    23,    24,    25,    26,
-     134,    27,    28,    85,    29,    86,    87,    88,    89,     0,
-       0,    90,    91,     0,     0,     0,     0,     0,     0,     0,
+      43,   166,   162,    76,   120,   198,   219,    31,    55,    67,
+     172,   161,    51,    32,   223,    63,   173,   284,   274,   120,
+      48,    53,   175,    57,   268,   107,   190,    49,     6,     7,
+     182,   183,    80,   274,    66,    64,    63,   300,    65,    43,
+     107,    43,   206,    52,   125,    43,    69,   164,   165,    56,
+      43,    80,    31,    58,    59,    60,    23,    24,    32,   294,
+      68,   191,    43,   294,   177,   184,   185,   178,   179,    72,
+     167,   168,   198,    57,    43,   145,   162,   227,     6,     7,
+      83,    43,    84,   216,   248,   222,   217,   249,    48,    85,
+     231,   169,   -75,   120,   125,   170,   125,   186,   187,   245,
+     210,   211,   212,    58,    59,    60,    23,    24,   158,   213,
+     225,   254,   272,   219,   107,   159,   216,   297,   216,   214,
+     216,   263,   216,   216,    43,   255,    43,   236,   237,   238,
+     239,    73,   258,   259,   232,   233,   107,   107,   107,   107,
+     107,   107,   107,   107,   107,   107,   107,   260,   301,    75,
+     145,     2,     3,     4,    82,   120,    58,    59,    60,   180,
+     -25,   181,    69,   125,   273,   234,   235,   123,   240,   241,
+     155,   -26,   188,   171,   264,   176,   107,   189,   194,   273,
+     278,   192,   120,   199,   200,   208,   202,   203,   289,   204,
+     207,   220,  -116,    43,   224,   247,   -27,   266,   298,  -163,
+     267,   261,   262,   107,     8,     9,    10,   216,   286,   145,
+     162,   277,   279,   280,   290,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,   287,   288,   292,
+     291,   293,    25,    26,   302,    27,    28,    29,    86,    30,
+      87,    88,    89,    90,   243,   230,    91,    92,   242,   244,
+     156,    77,   145,   145,    81,   157,   145,   145,    50,   193,
+     265,   269,   257,   299,   270,    93,   281,    71,   160,     0,
+       0,   145,     0,     0,     0,     0,    94,    95,     0,    96,
+       0,     0,     0,     0,     0,     0,     0,   145,     0,     0,
+       0,   145,     1,     2,     3,     4,     5,     6,     7,     8,
+       9,    10,   128,   129,   130,     0,   131,   132,   133,   134,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,     0,     0,     0,    23,    24,    25,    26,   135,
+      27,    28,    29,    86,    30,    87,    88,    89,    90,     0,
+       0,    91,    92,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      92,     0,     0,     0,   135,   217,     0,     0,     0,     0,
-     137,    93,    94,     0,    95,     1,     2,     3,     4,     5,
-       6,     7,     8,     9,    10,   127,   128,   129,     0,   130,
-     131,   132,   133,    11,    12,    13,    14,    15,    16,    17,
+      93,     0,     0,     0,   136,   137,     0,     0,     0,     0,
+     138,    94,    95,     0,    96,     1,     2,     3,     4,     5,
+       6,     7,     8,     9,    10,   128,   129,   130,     0,   131,
+     132,   133,   134,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,     0,     0,     0,    23,    24,
-      25,    26,   134,    27,    28,    85,    29,    86,    87,    88,
-      89,     0,     0,    90,    91,     0,     0,     0,     0,     0,
+      25,    26,   135,    27,    28,    29,    86,    30,    87,    88,
+      89,    90,     0,     0,    91,    92,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    92,     0,     0,     0,   135,     0,     0,     0,
-       0,     0,   137,    93,    94,     0,    95,     1,     2,     3,
-       4,     5,     6,     7,     8,     9,    10,   127,   128,   129,
-       0,   130,   131,   132,   133,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,     0,     0,     0,
-      23,    24,    25,    26,   134,    27,    28,    85,    29,    86,
-      87,    88,    89,     0,     0,    90,    91,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    92,     0,     0,     0,    74,     0,
-       0,     0,     0,     0,   137,    93,    94,     0,    95,     1,
-       2,     3,     4,     5,     6,     7,     8,     9,    10,   127,
-     128,   129,     0,   130,   131,   132,   133,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
-       0,     0,    23,    24,    25,    26,   134,    27,    28,    85,
-      29,    86,    87,    88,    89,     0,     0,    90,    91,     0,
+       0,     0,     0,    93,     0,     0,     0,   136,   218,     0,
+       0,     0,     0,   138,    94,    95,     0,    96,     1,     2,
+       3,     4,     5,     6,     7,     8,     9,    10,   128,   129,
+     130,     0,   131,   132,   133,   134,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,     0,     0,
+       0,    23,    24,    25,    26,   135,    27,    28,    29,    86,
+      30,    87,    88,    89,    90,     0,     0,    91,    92,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    92,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   137,    93,    94,     0,
-      95,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      10,     0,     0,     0,     0,     0,     0,     0,     0,    11,
+       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
+     136,     0,     0,     0,     0,     0,   138,    94,    95,     0,
+      96,     1,     2,     3,     4,     5,     6,     7,     8,     9,
+      10,   128,   129,   130,     0,   131,   132,   133,   134,    11,
       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,     0,     0,     0,    23,    24,    25,    26,     0,    27,
-      28,    85,    29,    86,    87,    88,    89,     0,     0,    90,
-      91,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    92,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   137,    93,
-      94,     0,    95,    56,     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,    85,    29,    86,    87,    88,    89,     0,
-       0,    90,    91,     0,     0,     0,     0,     0,     0,     0,
+      22,     0,     0,     0,    23,    24,    25,    26,   135,    27,
+      28,    29,    86,    30,    87,    88,    89,    90,     0,     0,
+      91,    92,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
+       0,     0,     0,    75,     0,     0,     0,     0,     0,   138,
+      94,    95,     0,    96,     1,     2,     3,     4,     5,     6,
+       7,     8,     9,    10,   128,   129,   130,     0,   131,   132,
+     133,   134,    11,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,     0,     0,     0,    23,    24,    25,
+      26,   135,    27,    28,    29,    86,    30,    87,    88,    89,
+      90,     0,     0,    91,    92,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      92,     0,     0,     0,     8,     9,    10,     0,     0,     0,
-       0,    93,    94,     0,    95,    11,    12,    13,    14,    15,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   138,    94,    95,     0,    96,     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,
-       0,     0,    25,    26,     0,    27,    28,    85,    29,    86,
-      87,    88,    89,     0,     0,    90,    91,     0,     0,     0,
+      23,    24,    25,    26,     0,    27,    28,    29,    86,    30,
+      87,    88,    89,    90,     0,     0,    91,    92,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    92,     0,     0,     0,     8,     9,
-      10,     0,     0,     0,   204,    93,    94,     0,    95,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,     0,     0,     0,     0,     0,    25,    26,     0,    27,
-      28,    85,    29,    86,    87,    88,    89,     0,     0,    90,
-      91,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    92,     0,
-       0,   220,     8,     9,    10,     0,     0,     0,     0,    93,
-      94,     0,    95,    11,    12,    13,    14,    15,    16,    17,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   138,    94,    95,     0,    96,
+      57,     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,    86,    30,    87,    88,    89,    90,     0,     0,    91,
+      92,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
+       0,     0,     8,     9,    10,     0,     0,     0,     0,    94,
+      95,     0,    96,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,     0,     0,     0,     0,     0,
-      25,    26,     0,    27,    28,    85,    29,    86,    87,    88,
-      89,     0,     0,    90,    91,     0,     0,     0,     0,     0,
+      25,    26,     0,    27,    28,    29,    86,    30,    87,    88,
+      89,    90,     0,     0,    91,    92,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    92,     0,     0,     0,     8,     9,    10,     0,
-       0,     0,     0,    93,    94,     0,    95,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
-       0,     0,     0,     0,    25,   173,     0,    27,    28,    85,
-      29,    86,    87,    88,    89,     0,     0,    90,    91,     0,
+       0,     0,     0,    93,     0,     0,     0,     8,     9,    10,
+       0,     0,     0,   205,    94,    95,     0,    96,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+       0,     0,     0,     0,     0,    25,    26,     0,    27,    28,
+      29,    86,    30,    87,    88,    89,    90,     0,     0,    91,
+      92,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
+       0,   221,     8,     9,    10,     0,     0,     0,     0,    94,
+      95,     0,    96,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,     0,     0,     0,     0,     0,
+      25,    26,     0,    27,    28,    29,    86,    30,    87,    88,
+      89,    90,     0,     0,    91,    92,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    92,     2,     3,     4,
-       0,     0,     0,     8,     9,    10,     0,    93,    94,     0,
-      95,     0,     0,     0,    11,    12,    13,    14,    15,    16,
+       0,     0,     0,    93,     0,     0,     0,     8,     9,    10,
+       0,     0,     0,     0,    94,    95,     0,    96,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+       0,     0,     0,     0,     0,    25,   174,     0,    27,    28,
+      29,    86,    30,    87,    88,    89,    90,     0,     0,    91,
+      92,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    93,     2,
+       3,     4,     0,     0,     0,     8,     9,    10,     0,    94,
+      95,     0,    96,     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,     0,
+      30,     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,   197,     0,     0,     0,    25,    26,     0,    27,    28,
+      29,     0,    30,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    70,     0,     0,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,     0,     0,     0,     0,
+       0,     0,     0,   246,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,     0,     0,     0,    23,
+      24,    25,    26,     0,    27,    28,    29,     0,    30,     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,
+       0,    30,     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,     0,     8,     9,    10,    25,    26,     0,    27,
+      28,    29,     0,    30,    11,    12,    13,    14,    15,    16,
       17,    18,    19,    20,    21,    22,     0,     0,     0,     0,
-       0,    25,    26,     0,    27,    28,     0,    29,     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,   196,     0,
-       0,     0,    25,    26,     0,    27,    28,     0,    29,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    69,
-       0,     0,     1,     2,     3,     4,     5,     6,     7,     8,
-       9,    10,     0,     0,     0,     0,     0,     0,     0,   245,
+       0,    25,    26,     0,    27,    28,    29,   228,    30,     8,
+       9,    10,   229,     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,     0,    29,     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,     0,    29,     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,     8,     9,    10,     0,
-      25,    26,     0,    27,    28,     0,    29,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,     0,
-       0,     0,     0,     0,    25,    26,     0,    27,    28,   227,
-      29,     8,     9,    10,   228,     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,     0,    29
+      21,    22,     0,     0,     0,     0,     0,    25,    26,     0,
+      27,    28,    29,     0,    30
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    84,    92,    53,    68,   125,     0,   149,     0,    34,
-      83,    43,   271,   158,    37,    82,   251,    84,    38,    83,
-      43,   104,    53,    54,    68,    40,    60,    61,    62,    58,
-      55,    71,   291,   255,    49,    69,    71,    77,    38,    83,
-      40,    61,    74,   133,    44,    79,    90,    91,   270,    49,
-      44,   286,    44,    73,    70,   290,    72,    88,    89,    72,
-      80,    61,    80,   107,    93,     3,    79,    51,    52,    43,
-       8,     9,   192,    73,    74,   158,    71,    70,   168,    72,
-      80,    71,    77,    72,   157,     3,    79,    77,    72,   172,
-       8,     9,    76,   157,    77,    33,    34,    35,    36,    37,
-     190,    71,    74,   123,    37,   125,    77,    77,    77,    80,
-      74,    80,   202,   157,   256,    33,    34,    35,    36,    37,
-      80,    77,    43,   123,    80,   125,   181,   182,   183,   184,
-      43,   214,   215,   177,   178,   179,   180,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,   219,   292,    77,   149,
-      70,    80,    71,    71,    70,   219,     4,     5,     6,    33,
-      34,    35,    85,    86,    57,   255,    55,    56,    77,    78,
-     179,   180,   192,   246,    59,   219,    73,   185,   186,   262,
-     270,    43,   246,    70,    80,    80,    70,    70,    80,   279,
-      70,    72,   192,    75,    73,    72,    74,    73,    73,   289,
-     250,    70,   246,    10,    11,    12,    77,    40,   208,   292,
-      73,    70,    73,    43,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    71,    80,    75,    71,
-      16,    38,    39,    79,    41,    42,    43,    44,    45,    46,
-      47,    48,    80,   169,    51,    52,   187,   189,   188,    80,
-      55,   251,   252,    62,    80,   255,   256,     5,   123,   247,
-     290,   252,   208,    70,   270,   252,    73,    44,    -1,    -1,
-     270,    -1,    -1,    -1,    81,    82,    -1,    84,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   286,    -1,    -1,    -1,
-     290,     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,    -1,    -1,    51,
-      52,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    70,    -1,
-      -1,    -1,    74,    75,    -1,    -1,    -1,    -1,    80,    81,
-      82,    -1,    84,     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,    -1,
-      -1,    51,    52,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+       0,    93,    85,    54,    69,   126,   150,     0,    72,    39,
+      72,    84,    44,     0,   159,    35,    78,   272,   256,    84,
+      37,    81,   105,     3,   252,    69,    59,    44,     8,     9,
+      54,    55,    62,   271,    44,    78,    56,   292,    81,    39,
+      84,    41,   134,    75,    74,    45,    73,    91,    92,    78,
+      50,    81,    45,    33,    34,    35,    36,    37,    45,   287,
+      41,    94,    62,   291,   108,    89,    90,    86,    87,    50,
+      52,    53,   193,     3,    74,    75,   159,   169,     8,     9,
+      71,    81,    73,    78,    78,   158,    81,    81,    37,    80,
+     173,    73,    72,   158,   124,    77,   126,    56,    57,   191,
+      61,    62,    63,    33,    34,    35,    36,    37,    73,    70,
+      72,   203,    72,   257,   158,    80,    78,    72,    78,    80,
+      78,    79,    78,    78,   124,    81,   126,   182,   183,   184,
+     185,    75,   215,   216,   178,   179,   180,   181,   182,   183,
+     184,   185,   186,   187,   188,   189,   190,   220,   293,    75,
+     150,     4,     5,     6,    44,   220,    33,    34,    35,    83,
+      71,    85,    73,   193,   256,   180,   181,    81,   186,   187,
+      44,    71,    58,    72,   247,    71,   220,    60,    44,   271,
+     263,    74,   247,    81,    81,    76,    71,    71,   280,    81,
+      71,    73,    71,   193,    74,    73,    71,    40,   290,    75,
+     251,    74,    74,   247,    10,    11,    12,    78,    44,   209,
+     293,    74,    74,    71,    81,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    72,    76,    16,
+      72,    80,    38,    39,    81,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,   189,   170,    52,    53,   188,   190,
+      81,    56,   252,   253,    63,    81,   256,   257,     5,   124,
+     248,   253,   209,   291,   253,    71,   271,    45,    74,    -1,
+      -1,   271,    -1,    -1,    -1,    -1,    82,    83,    -1,    85,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   287,    -1,    -1,
+      -1,   291,     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,    -1,
+      -1,    52,    53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      70,    -1,    -1,    -1,    74,    75,    -1,    -1,    -1,    -1,
-      80,    81,    82,    -1,    84,     3,     4,     5,     6,     7,
+      71,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
+      81,    82,    83,    -1,    85,     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,    -1,    -1,    51,    52,    -1,    -1,    -1,    -1,    -1,
+      48,    49,    -1,    -1,    52,    53,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    70,    -1,    -1,    -1,    74,    -1,    -1,    -1,
-      -1,    -1,    80,    81,    82,    -1,    84,     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,    -1,    -1,    51,    52,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    70,    -1,    -1,    -1,    74,    -1,
-      -1,    -1,    -1,    -1,    80,    81,    82,    -1,    84,     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,    -1,    -1,    51,    52,    -1,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    75,    76,    -1,
+      -1,    -1,    -1,    81,    82,    83,    -1,    85,     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,    -1,    -1,    52,    53,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    70,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    80,    81,    82,    -1,
-      84,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,
+      -1,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,
+      75,    -1,    -1,    -1,    -1,    -1,    81,    82,    83,    -1,
+      85,     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,    -1,    41,
-      42,    43,    44,    45,    46,    47,    48,    -1,    -1,    51,
-      52,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    70,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    80,    81,
-      82,    -1,    84,     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,    -1,
-      -1,    51,    52,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      32,    -1,    -1,    -1,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    -1,    -1,
+      52,    53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    71,
+      -1,    -1,    -1,    75,    -1,    -1,    -1,    -1,    -1,    81,
+      82,    83,    -1,    85,     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,    -1,    -1,    52,    53,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      70,    -1,    -1,    -1,    10,    11,    12,    -1,    -1,    -1,
-      -1,    81,    82,    -1,    84,    21,    22,    23,    24,    25,
+      -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    81,    82,    83,    -1,    85,     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,
-      -1,    -1,    38,    39,    -1,    41,    42,    43,    44,    45,
-      46,    47,    48,    -1,    -1,    51,    52,    -1,    -1,    -1,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    70,    -1,    -1,    -1,    10,    11,
-      12,    -1,    -1,    -1,    80,    81,    82,    -1,    84,    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,    -1,    -1,    51,
-      52,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    70,    -1,
-      -1,    73,    10,    11,    12,    -1,    -1,    -1,    -1,    81,
-      82,    -1,    84,    21,    22,    23,    24,    25,    26,    27,
+      -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    81,    82,    83,    -1,    85,
+       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,    -1,    -1,    52,
+      53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    71,    -1,
+      -1,    -1,    10,    11,    12,    -1,    -1,    -1,    -1,    82,
+      83,    -1,    85,    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,    -1,    -1,    51,    52,    -1,    -1,    -1,    -1,    -1,
+      48,    49,    -1,    -1,    52,    53,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    70,    -1,    -1,    -1,    10,    11,    12,    -1,
-      -1,    -1,    -1,    81,    82,    -1,    84,    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,    -1,    -1,    51,    52,    -1,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    10,    11,    12,
+      -1,    -1,    -1,    81,    82,    83,    -1,    85,    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,    -1,    -1,    52,
+      53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    71,    -1,
+      -1,    74,    10,    11,    12,    -1,    -1,    -1,    -1,    82,
+      83,    -1,    85,    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,    -1,    -1,    52,    53,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    70,     4,     5,     6,
-      -1,    -1,    -1,    10,    11,    12,    -1,    81,    82,    -1,
-      84,    -1,    -1,    -1,    21,    22,    23,    24,    25,    26,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    10,    11,    12,
+      -1,    -1,    -1,    -1,    82,    83,    -1,    85,    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,    -1,    -1,    52,
+      53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    71,     4,
+       5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,    82,
+      83,    -1,    85,    -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,    -1,
+      45,     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,    76,    -1,    -1,    -1,    38,    39,    -1,    41,    42,
+      43,    -1,    45,    -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,    76,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    -1,    -1,    -1,    36,
+      37,    38,    39,    -1,    41,    42,    43,    -1,    45,     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,
+      -1,    45,     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,    10,    11,    12,    38,    39,    -1,    41,
+      42,    43,    -1,    45,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    -1,    -1,    -1,    -1,
-      -1,    38,    39,    -1,    41,    42,    -1,    44,     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,    75,    -1,
-      -1,    -1,    38,    39,    -1,    41,    42,    -1,    44,    -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,    75,
+      -1,    38,    39,    -1,    41,    42,    43,    44,    45,    10,
+      11,    12,    49,    -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,    -1,    44,     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,    -1,    44,     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,    10,    11,    12,    -1,
-      38,    39,    -1,    41,    42,    -1,    44,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
-      -1,    -1,    -1,    -1,    38,    39,    -1,    41,    42,    43,
-      44,    10,    11,    12,    48,    -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,    -1,    44
+      31,    32,    -1,    -1,    -1,    -1,    -1,    38,    39,    -1,
+      41,    42,    43,    -1,    45
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1201,35 +1211,35 @@ 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,    44,
-     124,   125,   126,   127,   128,   133,   134,   135,   136,   137,
-     138,   139,   140,   141,   173,   174,   175,    37,    43,   138,
-      43,    74,    80,   176,    71,    77,     3,    33,    34,    35,
-     130,   131,   136,    77,    80,    43,   137,   139,    72,     0,
-     174,   139,    74,   143,    74,   159,   130,   129,   132,   137,
-     131,    43,    70,    72,    79,    43,    45,    46,    47,    48,
-      51,    52,    70,    81,    82,    84,    95,    96,    97,    99,
+      30,    31,    32,    36,    37,    38,    39,    41,    42,    43,
+      45,   125,   126,   127,   128,   129,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   174,   175,   176,    37,    44,
+     139,    44,    75,    81,   177,    72,    78,     3,    33,    34,
+      35,   131,   132,   137,    78,    81,    44,   138,   140,    73,
+       0,   175,   140,    75,   144,    75,   160,   131,   130,   133,
+     138,   132,    44,    71,    73,    80,    44,    46,    47,    48,
+      49,    52,    53,    71,    82,    83,    85,    96,    97,    98,
      100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     123,   140,    80,   142,   137,   144,   145,    13,    14,    15,
-      17,    18,    19,    20,    40,    74,    75,    80,   106,   119,
-     120,   122,   124,   125,   140,   149,   150,   151,   152,   160,
-     161,   162,   165,   172,    43,   129,   132,    72,    79,    73,
-     123,   120,   148,   106,   106,   122,    51,    52,    72,    76,
-      71,    71,    77,    39,   120,    70,   106,    85,    86,    82,
-      84,    53,    54,    88,    89,    55,    56,    57,    59,    58,
-      93,    73,   144,    43,   146,   147,    75,   145,    80,    80,
-     167,    70,    70,    80,    80,   122,    70,    75,   153,    60,
-      61,    62,    69,    79,   121,    77,    80,    75,   150,    72,
-      73,   123,   148,    73,    71,    98,   122,    43,    48,   101,
-     120,   106,   106,   108,   108,   110,   110,   110,   110,   111,
-     111,   115,   116,   117,   122,    75,    72,    77,    80,   156,
-     157,   158,   168,   122,    80,   166,   160,   120,   120,   123,
-      73,    73,    78,   123,   147,    40,   159,   151,   149,   161,
-     169,    71,   122,   135,   164,   154,    73,   120,    73,    70,
-     164,   170,   171,   156,   163,    43,    71,    75,   122,    80,
-      71,    16,    79,   151,   155,   159,    71,   122,   155,   156,
-     148,    80
+     120,   124,   141,    81,   143,   138,   145,   146,    13,    14,
+      15,    17,    18,    19,    20,    40,    75,    76,    81,   107,
+     120,   121,   123,   125,   126,   141,   150,   151,   152,   153,
+     161,   162,   163,   166,   173,    44,   130,   133,    73,    80,
+      74,   124,   121,   149,   107,   107,   123,    52,    53,    73,
+      77,    72,    72,    78,    39,   121,    71,   107,    86,    87,
+      83,    85,    54,    55,    89,    90,    56,    57,    58,    60,
+      59,    94,    74,   145,    44,   147,   148,    76,   146,    81,
+      81,   168,    71,    71,    81,    81,   123,    71,    76,   154,
+      61,    62,    63,    70,    80,   122,    78,    81,    76,   151,
+      73,    74,   124,   149,    74,    72,    99,   123,    44,    49,
+     102,   121,   107,   107,   109,   109,   111,   111,   111,   111,
+     112,   112,   116,   117,   118,   123,    76,    73,    78,    81,
+     157,   158,   159,   169,   123,    81,   167,   161,   121,   121,
+     124,    74,    74,    79,   124,   148,    40,   160,   152,   150,
+     162,   170,    72,   123,   136,   165,   155,    74,   121,    74,
+      71,   165,   171,   172,   157,   164,    44,    72,    76,   123,
+      81,    72,    16,    80,   152,   156,   160,    72,   123,   156,
+     157,   149,    81
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -1244,18 +1254,9 @@ static const yytype_uint8 yystos[] =
 
 /* 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.  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.  */
+   Once GCC version 2 has supplanted version 1, this can go.  */
 
 #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)
 
@@ -1312,7 +1313,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)                 \
      fprintf (File, "%d.%d-%d.%d",                     \
              (Loc).first_line, (Loc).first_column,     \
@@ -3852,13 +3853,26 @@ yyreduce:
   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:
+
+    {
         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 135:
+  case 136:
 
     {
         //
@@ -3872,12 +3886,12 @@ yyreduce:
     }
     break;
 
-  case 136:
+  case 137:
 
     { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
     break;
 
-  case 137:
+  case 138:
 
     {
         if (context->reservedErrorCheck((yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string))
@@ -3895,12 +3909,12 @@ yyreduce:
     }
     break;
 
-  case 138:
+  case 139:
 
     { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
     break;
 
-  case 139:
+  case 140:
 
     {
         TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString(""));
@@ -3910,14 +3924,14 @@ yyreduce:
     }
     break;
 
-  case 140:
+  case 141:
 
     {
         (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
     }
     break;
 
-  case 141:
+  case 142:
 
     {
         (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList);
@@ -3933,7 +3947,7 @@ yyreduce:
     }
     break;
 
-  case 142:
+  case 143:
 
     {
         (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList);
@@ -3970,7 +3984,7 @@ yyreduce:
     }
     break;
 
-  case 143:
+  case 144:
 
     {
         (yyval.interm.typeList) = NewPoolTTypeList();
@@ -3978,14 +3992,14 @@ yyreduce:
     }
     break;
 
-  case 144:
+  case 145:
 
     {
         (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
     }
     break;
 
-  case 145:
+  case 146:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
@@ -3997,7 +4011,7 @@ yyreduce:
     }
     break;
 
-  case 146:
+  case 147:
 
     {
         if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string))
@@ -4014,24 +4028,19 @@ yyreduce:
     }
     break;
 
-  case 147:
-
-    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
-    break;
-
   case 148:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
+    { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
     break;
 
   case 149:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 150:
 
-    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
     break;
 
   case 151:
@@ -4061,21 +4070,26 @@ yyreduce:
 
   case 156:
 
-    { (yyval.interm.intermAggregate) = 0; }
+    { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
   case 157:
 
-    { context->symbolTable.push(); }
+    { (yyval.interm.intermAggregate) = 0; }
     break;
 
   case 158:
 
-    { context->symbolTable.pop(); }
+    { context->symbolTable.push(); }
     break;
 
   case 159:
 
+    { context->symbolTable.pop(); }
+    break;
+
+  case 160:
+
     {
         if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
             (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
@@ -4085,44 +4099,44 @@ yyreduce:
     }
     break;
 
-  case 160:
+  case 161:
 
     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
-  case 161:
+  case 162:
 
     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
     break;
 
-  case 162:
+  case 163:
 
     { context->symbolTable.push(); }
     break;
 
-  case 163:
+  case 164:
 
     { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
     break;
 
-  case 164:
+  case 165:
 
     { context->symbolTable.push(); }
     break;
 
-  case 165:
+  case 166:
 
     { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
     break;
 
-  case 166:
+  case 167:
 
     {
         (yyval.interm.intermNode) = 0;
     }
     break;
 
-  case 167:
+  case 168:
 
     {
         if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
@@ -4133,31 +4147,31 @@ yyreduce:
     }
     break;
 
-  case 168:
+  case 169:
 
     {
         (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
     }
     break;
 
-  case 169:
+  case 170:
 
     {
         (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
     }
     break;
 
-  case 170:
+  case 171:
 
     { (yyval.interm.intermNode) = 0; }
     break;
 
-  case 171:
+  case 172:
 
     { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
     break;
 
-  case 172:
+  case 173:
 
     {
         if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
@@ -4166,7 +4180,7 @@ yyreduce:
     }
     break;
 
-  case 173:
+  case 174:
 
     {
         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
@@ -4174,7 +4188,7 @@ yyreduce:
     }
     break;
 
-  case 174:
+  case 175:
 
     {
         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
@@ -4182,7 +4196,7 @@ yyreduce:
     }
     break;
 
-  case 175:
+  case 176:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
@@ -4191,7 +4205,7 @@ yyreduce:
     }
     break;
 
-  case 176:
+  case 177:
 
     {
         TIntermNode* intermNode;
@@ -4209,12 +4223,12 @@ yyreduce:
     }
     break;
 
-  case 177:
+  case 178:
 
     { context->symbolTable.push(); ++context->loopNestingLevel; }
     break;
 
-  case 178:
+  case 179:
 
     {
         context->symbolTable.pop();
@@ -4223,12 +4237,12 @@ yyreduce:
     }
     break;
 
-  case 179:
+  case 180:
 
     { ++context->loopNestingLevel; }
     break;
 
-  case 180:
+  case 181:
 
     {
         if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode)))
@@ -4239,12 +4253,12 @@ yyreduce:
     }
     break;
 
-  case 181:
+  case 182:
 
     { context->symbolTable.push(); ++context->loopNestingLevel; }
     break;
 
-  case 182:
+  case 183:
 
     {
         context->symbolTable.pop();
@@ -4253,35 +4267,35 @@ yyreduce:
     }
     break;
 
-  case 183:
+  case 184:
 
     {
         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
     }
     break;
 
-  case 184:
+  case 185:
 
     {
         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
     }
     break;
 
-  case 185:
+  case 186:
 
     {
         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
     }
     break;
 
-  case 186:
+  case 187:
 
     {
         (yyval.interm.intermTypedNode) = 0;
     }
     break;
 
-  case 187:
+  case 188:
 
     {
         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
@@ -4289,7 +4303,7 @@ yyreduce:
     }
     break;
 
-  case 188:
+  case 189:
 
     {
         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
@@ -4297,7 +4311,7 @@ yyreduce:
     }
     break;
 
-  case 189:
+  case 190:
 
     {
         if (context->loopNestingLevel <= 0) {
@@ -4308,7 +4322,7 @@ yyreduce:
     }
     break;
 
-  case 190:
+  case 191:
 
     {
         if (context->loopNestingLevel <= 0) {
@@ -4319,7 +4333,7 @@ yyreduce:
     }
     break;
 
-  case 191:
+  case 192:
 
     {
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line);
@@ -4330,7 +4344,7 @@ yyreduce:
     }
     break;
 
-  case 192:
+  case 193:
 
     {
         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line);
@@ -4345,7 +4359,7 @@ yyreduce:
     }
     break;
 
-  case 193:
+  case 194:
 
     {
         FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
@@ -4353,7 +4367,7 @@ yyreduce:
     }
     break;
 
-  case 194:
+  case 195:
 
     {
         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
@@ -4361,7 +4375,7 @@ yyreduce:
     }
     break;
 
-  case 195:
+  case 196:
 
     {
         (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
@@ -4369,21 +4383,21 @@ yyreduce:
     }
     break;
 
-  case 196:
+  case 197:
 
     {
         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
     }
     break;
 
-  case 197:
+  case 198:
 
     {
         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
     }
     break;
 
-  case 198:
+  case 199:
 
     {
         TFunction* function = (yyvsp[(1) - (1)].interm).function;
@@ -4472,7 +4486,7 @@ yyreduce:
     }
     break;
 
-  case 199:
+  case 200:
 
     {
         //?? Check that all paths return a value if return type != void ?
index 5227361..eb3237c 100644 (file)
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.2.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
-   Foundation, Inc.
+      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
    it under the terms of the GNU General Public License as published by
      WHILE = 295,
      SAMPLER2D = 296,
      SAMPLERCUBE = 297,
-     IDENTIFIER = 298,
-     TYPE_NAME = 299,
-     FLOATCONSTANT = 300,
-     INTCONSTANT = 301,
-     BOOLCONSTANT = 302,
-     FIELD_SELECTION = 303,
-     LEFT_OP = 304,
-     RIGHT_OP = 305,
-     INC_OP = 306,
-     DEC_OP = 307,
-     LE_OP = 308,
-     GE_OP = 309,
-     EQ_OP = 310,
-     NE_OP = 311,
-     AND_OP = 312,
-     OR_OP = 313,
-     XOR_OP = 314,
-     MUL_ASSIGN = 315,
-     DIV_ASSIGN = 316,
-     ADD_ASSIGN = 317,
-     MOD_ASSIGN = 318,
-     LEFT_ASSIGN = 319,
-     RIGHT_ASSIGN = 320,
-     AND_ASSIGN = 321,
-     XOR_ASSIGN = 322,
-     OR_ASSIGN = 323,
-     SUB_ASSIGN = 324,
-     LEFT_PAREN = 325,
-     RIGHT_PAREN = 326,
-     LEFT_BRACKET = 327,
-     RIGHT_BRACKET = 328,
-     LEFT_BRACE = 329,
-     RIGHT_BRACE = 330,
-     DOT = 331,
-     COMMA = 332,
-     COLON = 333,
-     EQUAL = 334,
-     SEMICOLON = 335,
-     BANG = 336,
-     DASH = 337,
-     TILDE = 338,
-     PLUS = 339,
-     STAR = 340,
-     SLASH = 341,
-     PERCENT = 342,
-     LEFT_ANGLE = 343,
-     RIGHT_ANGLE = 344,
-     VERTICAL_BAR = 345,
-     CARET = 346,
-     AMPERSAND = 347,
-     QUESTION = 348
+     SAMPLER_EXTERNAL_OES = 298,
+     IDENTIFIER = 299,
+     TYPE_NAME = 300,
+     FLOATCONSTANT = 301,
+     INTCONSTANT = 302,
+     BOOLCONSTANT = 303,
+     FIELD_SELECTION = 304,
+     LEFT_OP = 305,
+     RIGHT_OP = 306,
+     INC_OP = 307,
+     DEC_OP = 308,
+     LE_OP = 309,
+     GE_OP = 310,
+     EQ_OP = 311,
+     NE_OP = 312,
+     AND_OP = 313,
+     OR_OP = 314,
+     XOR_OP = 315,
+     MUL_ASSIGN = 316,
+     DIV_ASSIGN = 317,
+     ADD_ASSIGN = 318,
+     MOD_ASSIGN = 319,
+     LEFT_ASSIGN = 320,
+     RIGHT_ASSIGN = 321,
+     AND_ASSIGN = 322,
+     XOR_ASSIGN = 323,
+     OR_ASSIGN = 324,
+     SUB_ASSIGN = 325,
+     LEFT_PAREN = 326,
+     RIGHT_PAREN = 327,
+     LEFT_BRACKET = 328,
+     RIGHT_BRACKET = 329,
+     LEFT_BRACE = 330,
+     RIGHT_BRACE = 331,
+     DOT = 332,
+     COMMA = 333,
+     COLON = 334,
+     EQUAL = 335,
+     SEMICOLON = 336,
+     BANG = 337,
+     DASH = 338,
+     TILDE = 339,
+     PLUS = 340,
+     STAR = 341,
+     SLASH = 342,
+     PERCENT = 343,
+     LEFT_ANGLE = 344,
+     RIGHT_ANGLE = 345,
+     VERTICAL_BAR = 346,
+     CARET = 347,
+     AMPERSAND = 348,
+     QUESTION = 349
    };
 #endif
 
index 4346986..2563092 100644 (file)
@@ -53,7 +53,8 @@ typedef enum {
   SH_FLOAT_MAT3     = 0x8B5B,
   SH_FLOAT_MAT4     = 0x8B5C,
   SH_SAMPLER_2D     = 0x8B5E,
-  SH_SAMPLER_CUBE   = 0x8B60
+  SH_SAMPLER_CUBE   = 0x8B60,
+  SH_SAMPLER_EXTERNAL_OES = 0x8D66
 } ShDataType;
 
 typedef enum {
@@ -108,6 +109,7 @@ typedef struct
     // Set to 1 to enable the extension, else 0.
     int OES_standard_derivatives;
        int OES_fragment_precision_high;
+    int OES_EGL_image_external;
 
     unsigned int MaxCallStackDepth;
 } ShBuiltInResources;
index 3e66aa2..7ca8fa5 100644 (file)
@@ -126,6 +126,7 @@ Context::Context(const egl::Config *config, const Context *shareContext) : mConf
 \r
     mTexture2DZero.set(new Texture2D(0));\r
     mTextureCubeMapZero.set(new TextureCubeMap(0));\r
+    mTextureExternalZero.set(new TextureExternal(0));\r
 \r
     mState.activeSampler = 0;\r
     bindArrayBuffer(0);\r
@@ -206,6 +207,7 @@ Context::~Context()
 \r
     mTexture2DZero.set(NULL);\r
     mTextureCubeMapZero.set(NULL);\r
+    mTextureExternalZero.set(NULL);\r
 \r
     delete mVertexDataManager;\r
     delete mIndexDataManager;\r
@@ -222,8 +224,6 @@ void Context::makeCurrent(egl::Display *display, egl::Surface *surface)
         mVertexDataManager = new VertexDataManager(this);\r
         mIndexDataManager = new IndexDataManager();\r
 \r
-        initExtensionString();\r
-\r
         mState.viewportX = 0;\r
         mState.viewportY = 0;\r
         mState.viewportWidth = surface->getWidth();\r
@@ -929,6 +929,13 @@ void Context::bindTextureCubeMap(GLuint texture)
     mState.samplerTexture[TEXTURE_CUBE][mState.activeSampler].set(getTexture(texture));\r
 }\r
 \r
+void Context::bindTextureExternal(GLuint texture)\r
+{\r
+    mResourceManager->checkTextureAllocation(texture, TEXTURE_EXTERNAL);\r
+\r
+    mState.samplerTexture[TEXTURE_EXTERNAL][mState.activeSampler].set(getTexture(texture));\r
+}\r
+\r
 void Context::bindReadFramebuffer(GLuint framebuffer)\r
 {\r
     if(!getFramebuffer(framebuffer))\r
@@ -1150,6 +1157,11 @@ TextureCubeMap *Context::getTextureCubeMap()
     return static_cast<TextureCubeMap*>(getSamplerTexture(mState.activeSampler, TEXTURE_CUBE));\r
 }\r
 \r
+TextureExternal *Context::getTextureExternal()\r
+{\r
+    return static_cast<TextureExternal*>(getSamplerTexture(mState.activeSampler, TEXTURE_EXTERNAL));\r
+}\r
+\r
 Texture *Context::getSamplerTexture(unsigned int sampler, TextureType type)\r
 {\r
     GLuint texid = mState.samplerTexture[type][sampler].id();\r
@@ -1158,9 +1170,10 @@ Texture *Context::getSamplerTexture(unsigned int sampler, TextureType type)
     {\r
         switch (type)\r
         {\r
-          default: UNREACHABLE();\r
-          case TEXTURE_2D: return mTexture2DZero.get();\r
-          case TEXTURE_CUBE: return mTextureCubeMapZero.get();\r
+        case TEXTURE_2D: return mTexture2DZero.get();\r
+        case TEXTURE_CUBE: return mTextureCubeMapZero.get();\r
+        case TEXTURE_EXTERNAL: return mTextureExternalZero.get();\r
+        default: UNREACHABLE();\r
         }\r
     }\r
 \r
@@ -1457,6 +1470,17 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
             *params = mState.samplerTexture[TEXTURE_CUBE][mState.activeSampler].id();\r
         }\r
         break;\r
+    case GL_TEXTURE_BINDING_EXTERNAL_OES:\r
+        {\r
+            if(mState.activeSampler < 0 || mState.activeSampler > MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1)\r
+            {\r
+                error(GL_INVALID_OPERATION);\r
+                return false;\r
+            }\r
+\r
+            *params = mState.samplerTexture[TEXTURE_EXTERNAL][mState.activeSampler].id();\r
+        }\r
+        break;\r
     default:\r
         return false;\r
     }\r
@@ -1546,6 +1570,7 @@ bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *nu
       case GL_IMPLEMENTATION_COLOR_READ_FORMAT:\r
       case GL_TEXTURE_BINDING_2D:\r
       case GL_TEXTURE_BINDING_CUBE_MAP:\r
+      case GL_TEXTURE_BINDING_EXTERNAL_OES:\r
         {\r
             *type = GL_INT;\r
             *numParams = 1;\r
@@ -2065,7 +2090,7 @@ void Context::applyTexture(sw::SamplerType type, int index, Texture *baseTexture
        {\r
                int levelCount = baseTexture->getLevelCount();\r
 \r
-               if(baseTexture->isTexture2D())\r
+               if(baseTexture->getTarget() == GL_TEXTURE_2D || baseTexture->getTarget() == GL_TEXTURE_EXTERNAL_OES)\r
                {\r
                        Texture2D *texture = static_cast<Texture2D*>(baseTexture);\r
 \r
@@ -2086,7 +2111,7 @@ void Context::applyTexture(sw::SamplerType type, int index, Texture *baseTexture
                                device->setTextureLevel(sampler, 0, mipmapLevel, surface, sw::TEXTURE_2D);\r
                        }\r
                }\r
-               else if(baseTexture->isTextureCubeMap())\r
+               else if(baseTexture->getTarget() == GL_TEXTURE_CUBE_MAP)\r
                {\r
                        for(int face = 0; face < 6; face++)\r
                        {\r
@@ -2724,53 +2749,6 @@ void Context::setVertexAttrib(GLuint index, const GLfloat *values)
     mVertexDataManager->dirtyCurrentValue(index);\r
 }\r
 \r
-void Context::initExtensionString()\r
-{\r
-       // Keep list sorted in following order:\r
-       // OES extensions\r
-       // EXT extensions\r
-       // Vendor extensions\r
-\r
-       mExtensionString += "GL_OES_depth_texture ";\r
-       mExtensionString += "GL_OES_depth_texture_cube_map ";\r
-       mExtensionString += "GL_OES_element_index_uint ";\r
-       mExtensionString += "GL_OES_packed_depth_stencil ";\r
-       mExtensionString += "GL_OES_rgb8_rgba8 ";\r
-       mExtensionString += "GL_OES_standard_derivatives ";\r
-       mExtensionString += "GL_OES_texture_float ";\r
-       mExtensionString += "GL_OES_texture_float_linear ";\r
-       mExtensionString += "GL_OES_texture_half_float ";\r
-       mExtensionString += "GL_OES_texture_half_float_linear ";\r
-       mExtensionString += "GL_OES_texture_npot ";\r
-       mExtensionString += "GL_EXT_blend_minmax ";\r
-       mExtensionString += "GL_EXT_occlusion_query_boolean ";\r
-       mExtensionString += "GL_EXT_read_format_bgra ";\r
-\r
-       if(S3TC_SUPPORT)\r
-       {\r
-               mExtensionString += "GL_EXT_texture_compression_dxt1 ";\r
-               mExtensionString += "GL_ANGLE_texture_compression_dxt3 ";\r
-               mExtensionString += "GL_ANGLE_texture_compression_dxt5 ";\r
-       }\r
-\r
-       mExtensionString += "GL_EXT_texture_filter_anisotropic ";\r
-       mExtensionString += "GL_EXT_texture_format_BGRA8888 ";\r
-       mExtensionString += "GL_ANGLE_framebuffer_blit ";\r
-       mExtensionString += "GL_ANGLE_framebuffer_multisample ";\r
-       mExtensionString += "GL_NV_fence ";\r
-\r
-       std::string::size_type end = mExtensionString.find_last_not_of(' ');\r
-       if(end != std::string::npos)\r
-       {\r
-               mExtensionString.resize(end + 1);\r
-       }\r
-}\r
-\r
-const char *Context::getExtensionString() const\r
-{\r
-    return mExtensionString.c_str();\r
-}\r
-\r
 void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, \r
                               GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,\r
                               GLbitfield mask)\r
index b154c6d..cbeb2bd 100644 (file)
@@ -48,6 +48,7 @@ class Program;
 class Texture;\r
 class Texture2D;\r
 class TextureCubeMap;\r
+class TextureExternal;\r
 class Framebuffer;\r
 class Renderbuffer;\r
 class RenderbufferStorage;\r
@@ -356,6 +357,7 @@ class Context
     void bindElementArrayBuffer(GLuint buffer);\r
     void bindTexture2D(GLuint texture);\r
     void bindTextureCubeMap(GLuint texture);\r
+    void bindTextureExternal(GLuint texture);\r
     void bindReadFramebuffer(GLuint framebuffer);\r
     void bindDrawFramebuffer(GLuint framebuffer);\r
     void bindRenderbuffer(GLuint renderbuffer);\r
@@ -384,6 +386,7 @@ class Context
     Program *getCurrentProgram();\r
     Texture2D *getTexture2D();\r
     TextureCubeMap *getTextureCubeMap();\r
+    TextureExternal *getTextureExternal();\r
     Texture *getSamplerTexture(unsigned int sampler, TextureType type);\r
     Framebuffer *getReadFramebuffer();\r
     Framebuffer *getDrawFramebuffer();\r
@@ -410,7 +413,6 @@ class Context
     GLenum getError();\r
 \r
     static int getSupportedMultiSampleDepth(sw::Format format, int requested);\r
-    const char *getExtensionString() const;\r
     \r
     void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, \r
                          GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,\r
@@ -440,6 +442,7 @@ class Context
 \r
     BindingPointer<Texture2D> mTexture2DZero;\r
     BindingPointer<TextureCubeMap> mTextureCubeMapZero;\r
+    BindingPointer<TextureExternal> mTextureExternalZero;\r
 \r
     typedef std::map<GLint, Framebuffer*> FramebufferMap;\r
     FramebufferMap mFramebufferMap;\r
@@ -453,9 +456,6 @@ class Context
     QueryMap mQueryMap;\r
     HandleAllocator mQueryHandleAllocator;\r
 \r
-    void initExtensionString();\r
-    std::string mExtensionString;\r
-\r
     VertexDataManager *mVertexDataManager;\r
     IndexDataManager *mIndexDataManager;\r
 \r
index 41fa7bf..ca0ddd6 100644 (file)
@@ -590,7 +590,8 @@ namespace gl
 \r
                if(targetUniform->type == GL_INT ||\r
                   targetUniform->type == GL_SAMPLER_2D ||\r
-                  targetUniform->type == GL_SAMPLER_CUBE)\r
+                  targetUniform->type == GL_SAMPLER_CUBE ||\r
+           targetUniform->type == GL_SAMPLER_EXTERNAL_OES)\r
                {\r
                        memcpy(targetUniform->data + uniformIndex[location].element * sizeof(GLint),\r
                                   v, sizeof(GLint) * count);\r
@@ -923,6 +924,7 @@ namespace gl
                                  case GL_FLOAT_MAT4: applyUniformMatrix4fv(location, size, f); break;\r
                                  case GL_SAMPLER_2D:\r
                                  case GL_SAMPLER_CUBE:\r
+                  case GL_SAMPLER_EXTERNAL_OES:\r
                                  case GL_INT:        applyUniform1iv(location, size, i);       break;\r
                                  case GL_INT_VEC2:   applyUniform2iv(location, size, i);       break;\r
                                  case GL_INT_VEC3:   applyUniform3iv(location, size, i);       break;\r
@@ -1313,7 +1315,7 @@ namespace gl
 \r
        bool Program::defineUniform(GLenum shader, GLenum type, GLenum precision, const std::string &name, unsigned int arraySize, int registerIndex)\r
        {\r
-               if(type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE)\r
+               if(type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES)\r
            {\r
                        int index = registerIndex;\r
                        \r
@@ -1733,8 +1735,9 @@ namespace gl
 \r
                if(targetUniform->psRegisterIndex != -1)\r
                {\r
-                       if(targetUniform->type == GL_SAMPLER_2D ||\r
-                          targetUniform->type == GL_SAMPLER_CUBE)\r
+            if(targetUniform->type == GL_SAMPLER_2D ||\r
+               targetUniform->type == GL_SAMPLER_CUBE ||\r
+               targetUniform->type == GL_SAMPLER_EXTERNAL_OES)\r
                        {\r
                                for(int i = 0; i < count; i++)\r
                                {\r
@@ -1756,7 +1759,8 @@ namespace gl
                if(targetUniform->vsRegisterIndex != -1)\r
                {\r
                        if(targetUniform->type == GL_SAMPLER_2D ||\r
-                          targetUniform->type == GL_SAMPLER_CUBE)\r
+               targetUniform->type == GL_SAMPLER_CUBE ||\r
+               targetUniform->type == GL_SAMPLER_EXTERNAL_OES)\r
                        {\r
                                for(int i = 0; i < count; i++)\r
                                {\r
index 6c6031b..cd4ae12 100644 (file)
@@ -34,6 +34,7 @@ enum TextureType
 {\r
     TEXTURE_2D,\r
     TEXTURE_CUBE,\r
+    TEXTURE_EXTERNAL,\r
 \r
     TEXTURE_TYPE_COUNT,\r
     TEXTURE_UNKNOWN\r
index 9b51f5c..25dbdb1 100644 (file)
@@ -48,27 +48,22 @@ sw::Resource *Texture::getResource() const
        return resource;\r
 }\r
 \r
-bool Texture::isTexture2D()\r
-{\r
-       return false;\r
-}\r
-\r
-bool Texture::isTextureCubeMap()\r
-{\r
-       return false;\r
-}\r
-\r
 // Returns true on successful filter state update (valid enum parameter)\r
 bool Texture::setMinFilter(GLenum filter)\r
 {\r
     switch(filter)\r
     {\r
-    case GL_NEAREST:\r
-    case GL_LINEAR:\r
     case GL_NEAREST_MIPMAP_NEAREST:\r
     case GL_LINEAR_MIPMAP_NEAREST:\r
     case GL_NEAREST_MIPMAP_LINEAR:\r
     case GL_LINEAR_MIPMAP_LINEAR:\r
+        if(getTarget() == GL_TEXTURE_EXTERNAL_OES)\r
+        {\r
+            return false;\r
+        }\r
+        // Fall through\r
+    case GL_NEAREST:\r
+    case GL_LINEAR:\r
         mMinFilter = filter;\r
         return true;\r
     default:\r
@@ -96,8 +91,13 @@ bool Texture::setWrapS(GLenum wrap)
     switch(wrap)\r
     {\r
     case GL_REPEAT:\r
-    case GL_CLAMP_TO_EDGE:\r
     case GL_MIRRORED_REPEAT:\r
+        if(getTarget() == GL_TEXTURE_EXTERNAL_OES)\r
+        {\r
+            return false;\r
+        }\r
+        // Fall through\r
+    case GL_CLAMP_TO_EDGE:\r
         mWrapS = wrap;\r
         return true;\r
     default:\r
@@ -111,8 +111,13 @@ bool Texture::setWrapT(GLenum wrap)
     switch(wrap)\r
     {\r
     case GL_REPEAT:\r
-    case GL_CLAMP_TO_EDGE:\r
     case GL_MIRRORED_REPEAT:\r
+        if(getTarget() == GL_TEXTURE_EXTERNAL_OES)\r
+        {\r
+            return false;\r
+        }\r
+        // Fall through\r
+    case GL_CLAMP_TO_EDGE:\r
          mWrapT = wrap;\r
          return true;\r
     default:\r
@@ -312,11 +317,6 @@ Texture2D::~Texture2D()
        mColorbufferProxy = NULL;\r
 }\r
 \r
-bool Texture2D::isTexture2D()\r
-{\r
-       return true;\r
-}\r
-\r
 // We need to maintain a count of references to renderbuffers acting as \r
 // proxies for this texture, so that we do not attempt to use a pointer \r
 // to a renderbuffer proxy which has been deleted.\r
@@ -730,11 +730,6 @@ TextureCubeMap::~TextureCubeMap()
     }\r
 }\r
 \r
-bool TextureCubeMap::isTextureCubeMap()\r
-{\r
-       return true;\r
-}\r
-\r
 // We need to maintain a count of references to renderbuffers acting as \r
 // proxies for this texture, so that the texture is not deleted while \r
 // proxy references still exist. If the reference count drops to zero,\r
@@ -1127,6 +1122,34 @@ bool TextureCubeMap::isShared(GLenum target, unsigned int level) const
     return image[face][level]->isShared();\r
 }\r
 \r
+TextureExternal::TextureExternal(GLuint id) : Texture2D(id)\r
+{\r
+    mMinFilter = GL_LINEAR;\r
+    mMagFilter = GL_LINEAR;\r
+    mWrapS = GL_CLAMP_TO_EDGE;\r
+    mWrapT = GL_CLAMP_TO_EDGE;\r
+}\r
+\r
+TextureExternal::~TextureExternal()\r
+{\r
+}\r
+\r
+GLenum TextureExternal::getTarget() const\r
+{\r
+    return GL_TEXTURE_EXTERNAL_OES;\r
+}\r
+\r
+void TextureExternal::setImage(Image *sharedImage)\r
+{\r
+    if(image[0])\r
+    {\r
+        image[0]->release();\r
+    }\r
+\r
+    sharedImage->addRef();\r
+    image[0] = sharedImage;\r
+}\r
+\r
 }\r
 \r
 // Exported functions for use by EGL\r
index 377ac66..085fe92 100644 (file)
@@ -53,8 +53,6 @@ public:
     virtual ~Texture();\r
 \r
        sw::Resource *getResource() const;\r
-       virtual bool isTexture2D();\r
-       virtual bool isTextureCubeMap();\r
 \r
        virtual void addProxyRef(const Renderbuffer *proxy) = 0;\r
     virtual void releaseProxy(const Renderbuffer *proxy) = 0;\r
@@ -118,8 +116,6 @@ public:
 \r
     virtual ~Texture2D();\r
 \r
-       virtual bool isTexture2D();\r
-\r
        void addProxyRef(const Renderbuffer *proxy);\r
     void releaseProxy(const Renderbuffer *proxy);\r
 \r
@@ -153,7 +149,7 @@ public:
 \r
     Image *getImage(unsigned int level);\r
 \r
-private:\r
+protected:\r
        bool isMipmapComplete() const;\r
 \r
        Image *image[IMPLEMENTATION_MAX_TEXTURE_LEVELS];\r
@@ -176,8 +172,6 @@ public:
 \r
     virtual ~TextureCubeMap();\r
 \r
-       virtual bool isTextureCubeMap();\r
-\r
        void addProxyRef(const Renderbuffer *proxy);\r
     void releaseProxy(const Renderbuffer *proxy);\r
 \r
@@ -227,6 +221,18 @@ private:
     Renderbuffer *mFaceProxies[6];\r
        unsigned int mFaceProxyRefs[6];\r
 };\r
+\r
+class TextureExternal : public Texture2D\r
+{\r
+public:\r
+    explicit TextureExternal(GLuint id);\r
+\r
+    virtual ~TextureExternal();\r
+\r
+    virtual GLenum getTarget() const;\r
+\r
+    void setImage(Image *image);\r
+};\r
 }\r
 \r
 #endif   // LIBGLESV2_TEXTURE_H_\r
index 3d8a434..cde61ed 100644 (file)
@@ -375,13 +375,16 @@ void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
 \r
             switch(target)\r
             {\r
-              case GL_TEXTURE_2D:\r
+            case GL_TEXTURE_2D:\r
                 context->bindTexture2D(texture);\r
                 return;\r
-              case GL_TEXTURE_CUBE_MAP:\r
+            case GL_TEXTURE_CUBE_MAP:\r
                 context->bindTextureCubeMap(texture);\r
                 return;\r
-              default:\r
+            case GL_TEXTURE_EXTERNAL_OES:\r
+                context->bindTextureExternal(texture);\r
+                return;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
         }\r
@@ -428,7 +431,7 @@ void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
         case GL_FUNC_ADD:\r
         case GL_FUNC_SUBTRACT:\r
         case GL_FUNC_REVERSE_SUBTRACT:\r
-        case GL_MIN_EXT:
+        case GL_MIN_EXT:\r
         case GL_MAX_EXT:\r
             break;\r
         default:\r
@@ -440,7 +443,7 @@ void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
         case GL_FUNC_ADD:\r
         case GL_FUNC_SUBTRACT:\r
         case GL_FUNC_REVERSE_SUBTRACT:\r
-        case GL_MIN_EXT:
+        case GL_MIN_EXT:\r
         case GL_MAX_EXT:\r
             break;\r
         default:\r
@@ -3389,17 +3392,46 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name)
 \r
         switch(name)\r
         {\r
-          case GL_VENDOR:\r
+        case GL_VENDOR:\r
             return (GLubyte*)"TransGaming Inc.";\r
-          case GL_RENDERER:\r
+        case GL_RENDERER:\r
             return (GLubyte*)"SwiftShader";\r
-          case GL_VERSION:\r
+        case GL_VERSION:\r
             return (GLubyte*)"OpenGL ES 2.0 SwiftShader "VERSION_STRING;\r
-          case GL_SHADING_LANGUAGE_VERSION:\r
+        case GL_SHADING_LANGUAGE_VERSION:\r
             return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader "VERSION_STRING;\r
-          case GL_EXTENSIONS:\r
-            return (GLubyte*)((context != NULL) ? context->getExtensionString() : "");\r
-          default:\r
+        case GL_EXTENSIONS:\r
+            // Keep list sorted in following order:\r
+               // OES extensions\r
+               // EXT extensions\r
+               // Vendor extensions\r
+            return (GLubyte*)\r
+                "GL_OES_depth_texture "\r
+                "GL_OES_depth_texture_cube_map "\r
+                "GL_OES_EGL_image_external "\r
+                "GL_OES_element_index_uint "\r
+                "GL_OES_packed_depth_stencil "\r
+                "GL_OES_rgb8_rgba8 "\r
+                "GL_OES_standard_derivatives "\r
+                "GL_OES_texture_float "\r
+                "GL_OES_texture_float_linear "\r
+                "GL_OES_texture_half_float "\r
+                "GL_OES_texture_half_float_linear "\r
+                "GL_OES_texture_npot "\r
+                "GL_EXT_blend_minmax "\r
+                "GL_EXT_occlusion_query_boolean "\r
+                "GL_EXT_read_format_bgra "\r
+                   #if (S3TC_SUPPORT)\r
+                "GL_EXT_texture_compression_dxt1 "\r
+                "GL_ANGLE_texture_compression_dxt3 "\r
+                "GL_ANGLE_texture_compression_dxt5 "\r
+                   #endif\r
+                "GL_EXT_texture_filter_anisotropic "\r
+                "GL_EXT_texture_format_BGRA8888 "\r
+                "GL_ANGLE_framebuffer_blit "\r
+                "GL_ANGLE_framebuffer_multisample "\r
+                "GL_NV_fence";\r
+        default:\r
             return error(GL_INVALID_ENUM, (GLubyte*)NULL);\r
         }\r
     }\r
@@ -3425,34 +3457,40 @@ void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* param
 \r
             switch(target)\r
             {\r
-              case GL_TEXTURE_2D:\r
+            case GL_TEXTURE_2D:\r
                 texture = context->getTexture2D();\r
                 break;\r
-              case GL_TEXTURE_CUBE_MAP:\r
+            case GL_TEXTURE_CUBE_MAP:\r
                 texture = context->getTextureCubeMap();\r
                 break;\r
-              default:\r
+            case GL_TEXTURE_EXTERNAL_OES:\r
+                texture = context->getTextureExternal();\r
+                break;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
 \r
             switch(pname)\r
             {\r
-              case GL_TEXTURE_MAG_FILTER:\r
+            case GL_TEXTURE_MAG_FILTER:\r
                 *params = (GLfloat)texture->getMagFilter();\r
                 break;\r
-              case GL_TEXTURE_MIN_FILTER:\r
+            case GL_TEXTURE_MIN_FILTER:\r
                 *params = (GLfloat)texture->getMinFilter();\r
                 break;\r
-              case GL_TEXTURE_WRAP_S:\r
+            case GL_TEXTURE_WRAP_S:\r
                 *params = (GLfloat)texture->getWrapS();\r
                 break;\r
-              case GL_TEXTURE_WRAP_T:\r
+            case GL_TEXTURE_WRAP_T:\r
                 *params = (GLfloat)texture->getWrapT();\r
                 break;\r
-                         case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
+                       case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
                 *params = texture->getMaxAnisotropy();\r
                 break;\r
-              default:\r
+            case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES:\r
+                *params = (GLfloat)1;\r
+                break;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
         }\r
@@ -3477,34 +3515,40 @@ void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
 \r
             switch(target)\r
             {\r
-              case GL_TEXTURE_2D:\r
+            case GL_TEXTURE_2D:\r
                 texture = context->getTexture2D();\r
                 break;\r
-              case GL_TEXTURE_CUBE_MAP:\r
+            case GL_TEXTURE_CUBE_MAP:\r
                 texture = context->getTextureCubeMap();\r
                 break;\r
-              default:\r
+            case GL_TEXTURE_EXTERNAL_OES:\r
+                texture = context->getTextureExternal();\r
+                break;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
 \r
             switch(pname)\r
             {\r
-              case GL_TEXTURE_MAG_FILTER:\r
+            case GL_TEXTURE_MAG_FILTER:\r
                 *params = texture->getMagFilter();\r
                 break;\r
-              case GL_TEXTURE_MIN_FILTER:\r
+            case GL_TEXTURE_MIN_FILTER:\r
                 *params = texture->getMinFilter();\r
                 break;\r
-              case GL_TEXTURE_WRAP_S:\r
+            case GL_TEXTURE_WRAP_S:\r
                 *params = texture->getWrapS();\r
                 break;\r
-              case GL_TEXTURE_WRAP_T:\r
+            case GL_TEXTURE_WRAP_T:\r
                 *params = texture->getWrapT();\r
                 break;\r
-                         case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
+                   case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
                 *params = (GLint)texture->getMaxAnisotropy();\r
                 break;\r
-              default:\r
+            case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES:\r
+                *params = 1;\r
+                break;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
         }\r
@@ -4954,6 +4998,9 @@ void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
             case GL_TEXTURE_CUBE_MAP:\r
                 texture = context->getTextureCubeMap();\r
                 break;\r
+            case GL_TEXTURE_EXTERNAL_OES:\r
+                texture = context->getTextureExternal();\r
+                break;\r
             default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
@@ -5020,49 +5067,52 @@ void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
 \r
             switch(target)\r
             {\r
-              case GL_TEXTURE_2D:\r
+            case GL_TEXTURE_2D:\r
                 texture = context->getTexture2D();\r
                 break;\r
-              case GL_TEXTURE_CUBE_MAP:\r
+            case GL_TEXTURE_CUBE_MAP:\r
                 texture = context->getTextureCubeMap();\r
                 break;\r
-              default:\r
+            case GL_TEXTURE_EXTERNAL_OES:\r
+                  texture = context->getTextureExternal();\r
+                  break;\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
 \r
             switch(pname)\r
             {\r
-              case GL_TEXTURE_WRAP_S:\r
+            case GL_TEXTURE_WRAP_S:\r
                 if(!texture->setWrapS((GLenum)param))\r
                 {\r
                     return error(GL_INVALID_ENUM);\r
                 }\r
                 break;\r
-              case GL_TEXTURE_WRAP_T:\r
+            case GL_TEXTURE_WRAP_T:\r
                 if(!texture->setWrapT((GLenum)param))\r
                 {\r
                     return error(GL_INVALID_ENUM);\r
                 }\r
                 break;\r
-              case GL_TEXTURE_MIN_FILTER:\r
+            case GL_TEXTURE_MIN_FILTER:\r
                 if(!texture->setMinFilter((GLenum)param))\r
                 {\r
                     return error(GL_INVALID_ENUM);\r
                 }\r
                 break;\r
-              case GL_TEXTURE_MAG_FILTER:\r
+            case GL_TEXTURE_MAG_FILTER:\r
                 if(!texture->setMagFilter((GLenum)param))\r
                 {\r
                     return error(GL_INVALID_ENUM);\r
                 }\r
                 break;\r
-                         case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
+                       case GL_TEXTURE_MAX_ANISOTROPY_EXT:\r
                 if(!texture->setMaxAnisotropy((GLfloat)param))\r
                 {\r
                     return error(GL_INVALID_VALUE);\r
                 }\r
                 break;\r
-              default:\r
+            default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
         }\r
@@ -6045,6 +6095,47 @@ void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalform
     }\r
 }\r
 \r
+void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)\r
+{\r
+    TRACE("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image);\r
+\r
+    try\r
+    {\r
+        switch(target)\r
+        {\r
+        case GL_TEXTURE_EXTERNAL_OES:\r
+            break;\r
+        default:\r
+            return error(GL_INVALID_ENUM);\r
+        }\r
+\r
+        if(!image)\r
+        {\r
+            return error(GL_INVALID_OPERATION);\r
+        }\r
+\r
+        gl::Context *context = gl::getContext();\r
+\r
+        if(context)\r
+        {\r
+            gl::TextureExternal *texture = context->getTextureExternal();\r
+\r
+            if(!texture)\r
+            {\r
+                return error(GL_INVALID_OPERATION);\r
+            }\r
+\r
+            gl::Image *glImage = static_cast<gl::Image*>(image);\r
+\r
+            texture->setImage(glImage);\r
+        }\r
+    }\r
+    catch(std::bad_alloc&)\r
+    {\r
+        return error(GL_OUT_OF_MEMORY);\r
+    }\r
+}\r
+\r
 __eglMustCastToProperFunctionPointerType glGetProcAddress(const char *procname)\r
 {\r
     struct Extension\r
@@ -6076,6 +6167,7 @@ __eglMustCastToProperFunctionPointerType glGetProcAddress(const char *procname)
         {"glEndQueryEXT", (__eglMustCastToProperFunctionPointerType)glEndQueryEXT},\r
         {"glGetQueryivEXT", (__eglMustCastToProperFunctionPointerType)glGetQueryivEXT},\r
         {"glGetQueryObjectuivEXT", (__eglMustCastToProperFunctionPointerType)glGetQueryObjectuivEXT},\r
+        {"glEGLImageTargetTexture2DOES", (__eglMustCastToProperFunctionPointerType)glEGLImageTargetTexture2DOES}\r
     };\r
 \r
     for(int ext = 0; ext < sizeof(glExtensions) / sizeof(Extension); ext++)\r
index 930258f..b71fea5 100644 (file)
@@ -31,6 +31,7 @@ namespace gl
                case GL_INT:\r
                case GL_SAMPLER_2D:\r
                case GL_SAMPLER_CUBE:\r
+        case GL_SAMPLER_EXTERNAL_OES:\r
                        return 1;\r
                case GL_BOOL_VEC2:\r
                case GL_FLOAT_VEC2:\r
@@ -76,6 +77,7 @@ namespace gl
                case GL_INT:\r
                case GL_SAMPLER_2D:\r
                case GL_SAMPLER_CUBE:\r
+        case GL_SAMPLER_EXTERNAL_OES:\r
                case GL_INT_VEC2:\r
                case GL_INT_VEC3:\r
                case GL_INT_VEC4:\r
@@ -119,6 +121,7 @@ namespace gl
                case GL_INT_VEC4:\r
                case GL_SAMPLER_2D:\r
                case GL_SAMPLER_CUBE:\r
+        case GL_SAMPLER_EXTERNAL_OES:\r
                        return 1;\r
                case GL_FLOAT_MAT2:\r
                        return 2;\r