Add support for parsing interface blocks to the shader translator.

TRAC #22930 Signed-off-by: Nicolas Capens Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2341 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a9100887
...@@ -46,6 +46,7 @@ enum TBasicType ...@@ -46,6 +46,7 @@ enum TBasicType
EbtSampler2DRect, // Only valid if GL_ARB_texture_rectangle exists. EbtSampler2DRect, // Only valid if GL_ARB_texture_rectangle exists.
EbtGuardSamplerEnd, // non type: see implementation of IsSampler() EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
EbtStruct, EbtStruct,
EbtInterfaceBlock,
EbtAddress, // should be deprecated?? EbtAddress, // should be deprecated??
EbtInvariant // used as a type when qualifying a previously declared variable as being invariant EbtInvariant // used as a type when qualifying a previously declared variable as being invariant
}; };
...@@ -63,6 +64,7 @@ inline const char* getBasicString(TBasicType t) ...@@ -63,6 +64,7 @@ inline const char* getBasicString(TBasicType t)
case EbtSamplerExternalOES: return "samplerExternalOES"; break; case EbtSamplerExternalOES: return "samplerExternalOES"; break;
case EbtSampler2DRect: return "sampler2DRect"; break; case EbtSampler2DRect: return "sampler2DRect"; break;
case EbtStruct: return "structure"; break; case EbtStruct: return "structure"; break;
case EbtInterfaceBlock: return "interface block"; break;
default: return "unknown type"; default: return "unknown type";
} }
} }
......
...@@ -656,7 +656,7 @@ bool TParseContext::containsSampler(TType& type) ...@@ -656,7 +656,7 @@ bool TParseContext::containsSampler(TType& type)
if (IsSampler(type.getBasicType())) if (IsSampler(type.getBasicType()))
return true; return true;
if (type.getBasicType() == EbtStruct) { if (type.getBasicType() == EbtStruct || type.getBasicType() == EbtInterfaceBlock) {
TTypeList& structure = *type.getStruct(); TTypeList& structure = *type.getStruct();
for (unsigned int i = 0; i < structure.size(); ++i) { for (unsigned int i = 0; i < structure.size(); ++i) {
if (containsSampler(*structure[i].type)) if (containsSampler(*structure[i].type))
...@@ -1451,6 +1451,102 @@ TIntermTyped* TParseContext::addConstStruct(const TString &identifier, TIntermTy ...@@ -1451,6 +1451,102 @@ TIntermTyped* TParseContext::addConstStruct(const TString &identifier, TIntermTy
return typedNode; return typedNode;
} }
//
// Interface/uniform blocks
//
TIntermAggregate* TParseContext::addInterfaceBlock(const TPublicType& typeQualifier, TSourceLoc nameLine, const TString& blockName, TTypeList* typeList,
const TString& instanceName, TSourceLoc instanceLine, TIntermTyped* arrayIndex, TSourceLoc arrayIndexLine)
{
if (reservedErrorCheck(nameLine, blockName))
recover();
if (typeQualifier.qualifier != EvqUniform)
{
error(typeQualifier.line, "invalid qualifier:", getQualifierString(typeQualifier.qualifier), "interface blocks must be uniform");
recover();
}
TSymbol* blockNameSymbol = new TInterfaceBlockName(&blockName);
if (!symbolTable.declare(*blockNameSymbol)) {
error(nameLine, "redefinition", blockName.c_str(), "interface block name");
recover();
}
// check for sampler types
for (size_t memberIndex = 0; memberIndex < typeList->size(); ++memberIndex) {
const TTypeLine& memberTypeLine = (*typeList)[memberIndex];
TType* memberType = memberTypeLine.type;
if (IsSampler(memberType->getBasicType())) {
error(memberTypeLine.line, "unsupported type", memberType->getBasicString(), "sampler types are not allowed in interface blocks");
recover();
}
const TQualifier qualifier = memberTypeLine.type->getQualifier();
switch (qualifier)
{
case EvqGlobal:
case EvqUniform:
break;
default:
error(memberTypeLine.line, "invalid qualifier on interface block member", getQualifierString(qualifier));
recover();
break;
}
}
TType* interfaceBlock = new TType(typeList, blockName);
interfaceBlock->setBasicType(EbtInterfaceBlock);
interfaceBlock->setQualifier(typeQualifier.qualifier);
TString symbolName = "";
int symbolId = 0;
if (instanceName == "")
{
// define symbols for the members of the interface block
for (size_t memberIndex = 0; memberIndex < typeList->size(); ++memberIndex) {
const TTypeLine& memberTypeLine = (*typeList)[memberIndex];
TType* memberType = memberTypeLine.type;
memberType->setInterfaceBlockType(interfaceBlock);
TVariable* memberVariable = new TVariable(&memberType->getFieldName(), *memberType);
memberVariable->setQualifier(typeQualifier.qualifier);
if (!symbolTable.declare(*memberVariable)) {
error(memberTypeLine.line, "redefinition", memberType->getFieldName().c_str(), "interface block member name");
recover();
}
}
}
else
{
interfaceBlock->setInstanceName(instanceName);
// add array index
if (arrayIndex != NULL)
{
int size;
if (arraySizeErrorCheck(arrayIndexLine, arrayIndex, size))
recover();
interfaceBlock->setArraySize(size);
}
// add a symbol for this interface block
TVariable* instanceTypeDef = new TVariable(&instanceName, *interfaceBlock, false);
instanceTypeDef->setQualifier(typeQualifier.qualifier);
if (!symbolTable.declare(*instanceTypeDef)) {
error(instanceLine, "redefinition", instanceName.c_str(), "interface block instance name");
recover();
}
symbolId = instanceTypeDef->getUniqueId();
symbolName = instanceTypeDef->getName();
}
exitStructDeclaration();
TIntermAggregate *aggregate = intermediate.makeAggregate(intermediate.addSymbol(symbolId, symbolName, *interfaceBlock, typeQualifier.line), nameLine);
aggregate->setOp(EOpDeclaration);
return aggregate;
}
bool TParseContext::enterStructDeclaration(int line, const TString& identifier) bool TParseContext::enterStructDeclaration(int line, const TString& identifier)
{ {
++structNestingLevel; ++structNestingLevel;
...@@ -1768,9 +1864,53 @@ TIntermTyped* TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre ...@@ -1768,9 +1864,53 @@ TIntermTyped* TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre
} }
} }
} }
else if (baseExpression->getBasicType() == EbtInterfaceBlock)
{
bool fieldFound = false;
const TTypeList* fields = baseExpression->getType().getStruct();
if (fields == 0)
{
error(dotLocation, "interface block has no fields", "Internal Error");
recover();
indexedExpression = baseExpression;
}
else
{
unsigned int i;
for (i = 0; i < fields->size(); ++i)
{
if ((*fields)[i].type->getFieldName() == fieldString)
{
fieldFound = true;
break;
}
}
if (fieldFound)
{
ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setIConst(i);
TIntermTyped* index = intermediate.addConstantUnion(unionArray, *(*fields)[i].type, fieldLocation);
indexedExpression = intermediate.addIndex(EOpIndexDirectInterfaceBlock, baseExpression, index, dotLocation);
indexedExpression->setType(*(*fields)[i].type);
}
else
{
error(dotLocation, " no such field in interface block", fieldString.c_str());
recover();
indexedExpression = baseExpression;
}
}
}
else else
{ {
error(dotLocation, " field selection requires structure, vector, or matrix on left hand side", fieldString.c_str()); if (shaderVersion < 300)
{
error(dotLocation, " field selection requires structure, vector, or matrix on left hand side", fieldString.c_str());
}
else
{
error(dotLocation, " field selection requires structure, vector, matrix, or interface block on left hand side", fieldString.c_str());
}
recover(); recover();
indexedExpression = baseExpression; indexedExpression = baseExpression;
} }
......
...@@ -134,6 +134,9 @@ struct TParseContext { ...@@ -134,6 +134,9 @@ struct TParseContext {
TTypeList *addStructDeclaratorList(const TPublicType& typeSpecifier, TTypeList *typeList); TTypeList *addStructDeclaratorList(const TPublicType& typeSpecifier, TTypeList *typeList);
TPublicType addStructure(TSourceLoc structLine, TSourceLoc nameLine, const TString &structName, TTypeList* typeList); TPublicType addStructure(TSourceLoc structLine, TSourceLoc nameLine, const TString &structName, TTypeList* typeList);
TIntermAggregate* addInterfaceBlock(const TPublicType& typeQualifier, TSourceLoc nameLine, const TString& blockName, TTypeList* typeList,
const TString& instanceName, TSourceLoc instanceLine, TIntermTyped* arrayIndex, TSourceLoc arrayIndexLine);
// Performs an error check for embedded struct declarations. // Performs an error check for embedded struct declarations.
// Returns true if an error was raised due to the declaration of // Returns true if an error was raised due to the declaration of
// this struct. // this struct.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
TType::TType(const TPublicType &p) : TType::TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize), type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0) maxArraySize(0), arrayInformationType(0), interfaceBlockType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{ {
if (p.userDef) { if (p.userDef) {
structure = p.userDef->getStruct(); structure = p.userDef->getStruct();
...@@ -57,6 +57,21 @@ void TType::buildMangledName(TString& mangledName) ...@@ -57,6 +57,21 @@ void TType::buildMangledName(TString& mangledName)
(*structure)[i].type->buildMangledName(mangledName); (*structure)[i].type->buildMangledName(mangledName);
} }
} }
break;
case EbtInterfaceBlock:
{
mangledName += "interface-block-";
if (typeName)
{
mangledName += *typeName;
}
for (unsigned int i = 0; i < structure->size(); ++i)
{
mangledName += '-';
(*structure)[i].type->buildMangledName(mangledName);
}
}
break;
default: default:
break; break;
} }
...@@ -136,6 +151,11 @@ void TFunction::dump(TInfoSink &infoSink) const ...@@ -136,6 +151,11 @@ void TFunction::dump(TInfoSink &infoSink) const
infoSink.debug << getName().c_str() << ": " << returnType.getBasicString() << " " << getMangledName().c_str() << "\n"; infoSink.debug << getName().c_str() << ": " << returnType.getBasicString() << " " << getMangledName().c_str() << "\n";
} }
void TInterfaceBlockName::dump(TInfoSink &infoSink) const
{
infoSink.debug << "interface block " << getName().c_str() << "\n";
}
void TSymbolTableLevel::dump(TInfoSink &infoSink) const void TSymbolTableLevel::dump(TInfoSink &infoSink) const
{ {
tLevel::const_iterator it; tLevel::const_iterator it;
...@@ -255,6 +275,11 @@ TFunction* TFunction::clone(TStructureMap& remapper) ...@@ -255,6 +275,11 @@ TFunction* TFunction::clone(TStructureMap& remapper)
return function; return function;
} }
TInterfaceBlockName* TInterfaceBlockName::clone(TStructureMap& remapper)
{
return new TInterfaceBlockName(this->name);
}
TSymbolTableLevel* TSymbolTableLevel::clone(TStructureMap& remapper) TSymbolTableLevel* TSymbolTableLevel::clone(TStructureMap& remapper)
{ {
TSymbolTableLevel *symTableLevel = new TSymbolTableLevel(); TSymbolTableLevel *symTableLevel = new TSymbolTableLevel();
......
...@@ -186,6 +186,21 @@ protected: ...@@ -186,6 +186,21 @@ protected:
bool defined; bool defined;
}; };
//
// Interface block name sub-symbol
//
class TInterfaceBlockName : public TSymbol
{
public:
TInterfaceBlockName(const TString *name)
: TSymbol(name)
{}
virtual ~TInterfaceBlockName() {}
virtual void dump(TInfoSink &infoSink) const;
virtual TInterfaceBlockName* clone(TStructureMap& remapper);
};
class TSymbolTableLevel { class TSymbolTableLevel {
public: public:
......
...@@ -42,13 +42,13 @@ public: ...@@ -42,13 +42,13 @@ public:
TType() {} TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) : TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0) maxArraySize(0), arrayInformationType(0), interfaceBlockType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0), instanceName(0)
{ {
} }
explicit TType(const TPublicType &p); explicit TType(const TPublicType &p);
TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) : TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0), type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0) maxArraySize(0), arrayInformationType(0), interfaceBlockType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), instanceName(0)
{ {
typeName = NewPoolTString(n.c_str()); typeName = NewPoolTString(n.c_str());
} }
...@@ -91,11 +91,16 @@ public: ...@@ -91,11 +91,16 @@ public:
if (copyOf.mangled) if (copyOf.mangled)
mangled = NewPoolTString(copyOf.mangled->c_str()); mangled = NewPoolTString(copyOf.mangled->c_str());
instanceName = 0;
if (copyOf.instanceName)
instanceName = NewPoolTString(copyOf.instanceName->c_str());
structureSize = copyOf.structureSize; structureSize = copyOf.structureSize;
maxArraySize = copyOf.maxArraySize; maxArraySize = copyOf.maxArraySize;
deepestStructNesting = copyOf.deepestStructNesting; deepestStructNesting = copyOf.deepestStructNesting;
assert(copyOf.arrayInformationType == 0); assert(copyOf.arrayInformationType == 0);
arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level
interfaceBlockType = 0;
} }
TType* clone(TStructureMap& remapper) TType* clone(TStructureMap& remapper)
...@@ -184,6 +189,9 @@ public: ...@@ -184,6 +189,9 @@ public:
void clearArrayness() { array = false; arraySize = 0; maxArraySize = 0; } void clearArrayness() { array = false; arraySize = 0; maxArraySize = 0; }
void setArrayInformationType(TType* t) { arrayInformationType = t; } void setArrayInformationType(TType* t) { arrayInformationType = t; }
TType* getArrayInformationType() const { return arrayInformationType; } TType* getArrayInformationType() const { return arrayInformationType; }
void setInterfaceBlockType(TType* t) { interfaceBlockType = t; }
TType* getInterfaceBlockType() const { return interfaceBlockType; }
bool isInterfaceBlockMember() const { return interfaceBlockType != NULL; }
bool isVector() const { return size > 1 && !matrix; } bool isVector() const { return size > 1 && !matrix; }
bool isScalar() const { return size == 1 && !matrix && !structure; } bool isScalar() const { return size == 1 && !matrix && !structure; }
...@@ -222,6 +230,25 @@ public: ...@@ -222,6 +230,25 @@ public:
return *mangled; return *mangled;
} }
void setInstanceName(const TString& n)
{
assert(type == EbtInterfaceBlock);
instanceName = NewPoolTString(n.c_str());
}
bool hasInstanceName() const
{
assert(type == EbtInterfaceBlock);
return instanceName != NULL;
}
const TString& getInstanceName() const
{
assert(type == EbtInterfaceBlock);
assert(instanceName);
return *instanceName;
}
bool sameElementType(const TType& right) const { bool sameElementType(const TType& right) const {
return type == right.type && return type == right.type &&
size == right.size && size == right.size &&
...@@ -285,6 +312,7 @@ protected: ...@@ -285,6 +312,7 @@ protected:
int arraySize; int arraySize;
int maxArraySize; int maxArraySize;
TType* arrayInformationType; TType* arrayInformationType;
TType* interfaceBlockType;
TTypeList* structure; // 0 unless this is a struct TTypeList* structure; // 0 unless this is a struct
mutable int structureSize; mutable int structureSize;
...@@ -293,6 +321,7 @@ protected: ...@@ -293,6 +321,7 @@ protected:
TString *fieldName; // for structure field names TString *fieldName; // for structure field names
TString *mangled; TString *mangled;
TString *typeName; // for structure field type name TString *typeName; // for structure field type name
TString *instanceName; // for interface block instance names
}; };
// //
......
...@@ -42,8 +42,8 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -42,8 +42,8 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
#define YYLTYPE_IS_TRIVIAL 1 #define YYLTYPE_IS_TRIVIAL 1
#define YYLEX_PARAM context->scanner #define YYLEX_PARAM context->scanner
%}
%}
%expect 1 /* One shift reduce conflict because of if | else */ %expect 1 /* One shift reduce conflict because of if | else */
%pure-parser %pure-parser
%parse-param {TParseContext* context} %parse-param {TParseContext* context}
...@@ -113,9 +113,9 @@ extern void yyerror(TParseContext* context, const char* reason); ...@@ -113,9 +113,9 @@ extern void yyerror(TParseContext* context, const char* reason);
} \ } \
} }
#define ES3_ONLY(S, L) { \ #define ES3_ONLY(TOKEN, LINE, REASON) { \
if (context->shaderVersion != 300) { \ if (context->shaderVersion != 300) { \
context->error(L, " supported in GLSL ES 3.00 only ", S); \ context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
context->recover(); \ context->recover(); \
} \ } \
} }
...@@ -177,6 +177,8 @@ extern void yyerror(TParseContext* context, const char* reason); ...@@ -177,6 +177,8 @@ extern void yyerror(TParseContext* context, const char* reason);
%type <interm> function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype %type <interm> function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype
%type <interm> function_call_or_method %type <interm> function_call_or_method
%type <lex> enter_struct
%start translation_unit %start translation_unit
%% %%
...@@ -799,6 +801,14 @@ constant_expression ...@@ -799,6 +801,14 @@ constant_expression
} }
; ;
enter_struct
: IDENTIFIER LEFT_BRACE {
if (context->enterStructDeclaration($1.line, *$1.string))
context->recover();
$$ = $1;
}
;
declaration declaration
: function_prototype SEMICOLON { : function_prototype SEMICOLON {
TFunction &function = *($1.function); TFunction &function = *($1.function);
...@@ -843,6 +853,18 @@ declaration ...@@ -843,6 +853,18 @@ declaration
} }
$$ = 0; $$ = 0;
} }
| type_qualifier enter_struct struct_declaration_list RIGHT_BRACE SEMICOLON {
ES3_ONLY(getQualifierString($1.qualifier), $1.line, "interface blocks");
$$ = context->addInterfaceBlock($1, $2.line, *$2.string, $3, "", 0, NULL, 0);
}
| type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER SEMICOLON {
ES3_ONLY(getQualifierString($1.qualifier), $1.line, "interface blocks");
$$ = context->addInterfaceBlock($1, $2.line, *$2.string, $3, *$5.string, $5.line, NULL, 0);
}
| type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET SEMICOLON {
ES3_ONLY(getQualifierString($1.qualifier), $1.line, "interface blocks");
$$ = context->addInterfaceBlock($1, $2.line, *$2.string, $3, *$5.string, $5.line, $7, $6.line);
}
; ;
function_prototype function_prototype
...@@ -1425,22 +1447,22 @@ storage_qualifier ...@@ -1425,22 +1447,22 @@ storage_qualifier
$$.line = $1.line; $$.line = $1.line;
} }
| IN_QUAL { | IN_QUAL {
ES3_ONLY("in", $1.line); ES3_ONLY("in", $1.line, "storage qualifier");
$$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqSmoothIn : EvqAttribute; $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqSmoothIn : EvqAttribute;
$$.line = $1.line; $$.line = $1.line;
} }
| OUT_QUAL { | OUT_QUAL {
ES3_ONLY("out", $1.line); ES3_ONLY("out", $1.line, "storage qualifier");
$$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqSmoothOut; $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqSmoothOut;
$$.line = $1.line; $$.line = $1.line;
} }
| CENTROID IN_QUAL { | CENTROID IN_QUAL {
ES3_ONLY("centroid in", $1.line); ES3_ONLY("centroid in", $1.line, "storage qualifier");
$$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqAttribute; $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqAttribute;
$$.line = $1.line; $$.line = $1.line;
} }
| CENTROID OUT_QUAL { | CENTROID OUT_QUAL {
ES3_ONLY("centroid out", $1.line); ES3_ONLY("centroid out", $1.line, "storage qualifier");
$$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqCentroidOut; $$.qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqCentroidOut;
$$.line = $1.line; $$.line = $1.line;
} }
...@@ -1660,6 +1682,11 @@ struct_declaration ...@@ -1660,6 +1682,11 @@ struct_declaration
: type_specifier struct_declarator_list SEMICOLON { : type_specifier struct_declarator_list SEMICOLON {
$$ = context->addStructDeclaratorList($1, $2); $$ = context->addStructDeclaratorList($1, $2);
} }
| type_qualifier type_specifier struct_declarator_list SEMICOLON {
// ES3 Only, but errors should be handled elsewhere
$2.qualifier = $1.qualifier;
$$ = context->addStructDeclaratorList($2, $3);
}
; ;
struct_declarator_list struct_declarator_list
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
# ifndef YY_NULL # ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus # if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr # define YY_NULL nullptr
...@@ -330,9 +331,9 @@ extern void yyerror(TParseContext* context, const char* reason); ...@@ -330,9 +331,9 @@ extern void yyerror(TParseContext* context, const char* reason);
} \ } \
} }
#define ES3_ONLY(S, L) { \ #define ES3_ONLY(TOKEN, LINE, REASON) { \
if (context->shaderVersion != 300) { \ if (context->shaderVersion != 300) { \
context->error(L, " supported in GLSL ES 3.00 only ", S); \ context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
context->recover(); \ context->recover(); \
} \ } \
} }
...@@ -555,18 +556,18 @@ union yyalloc ...@@ -555,18 +556,18 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */ #endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 81 #define YYFINAL 83
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1551 #define YYLAST 1721
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 105 #define YYNTOKENS 105
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 86 #define YYNNTS 87
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 211 #define YYNRULES 216
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 315 #define YYNSTATES 332
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
...@@ -628,33 +629,33 @@ static const yytype_uint16 yyprhs[] = ...@@ -628,33 +629,33 @@ static const yytype_uint16 yyprhs[] =
106, 110, 112, 114, 118, 122, 126, 130, 132, 136, 106, 110, 112, 114, 118, 122, 126, 130, 132, 136,
140, 142, 144, 146, 148, 152, 154, 158, 160, 164, 140, 142, 144, 146, 148, 152, 154, 158, 160, 164,
166, 172, 174, 178, 180, 182, 184, 186, 188, 190, 166, 172, 174, 178, 180, 182, 184, 186, 188, 190,
194, 196, 199, 202, 207, 210, 212, 214, 217, 221, 194, 196, 199, 202, 205, 210, 216, 223, 233, 236,
225, 228, 234, 238, 241, 245, 248, 249, 251, 253, 238, 240, 243, 247, 251, 254, 260, 264, 267, 271,
255, 257, 259, 263, 269, 276, 282, 284, 287, 292, 274, 275, 277, 279, 281, 283, 285, 289, 295, 302,
298, 303, 306, 308, 311, 313, 315, 317, 319, 321, 308, 310, 313, 318, 324, 329, 332, 334, 337, 339,
324, 326, 329, 331, 333, 335, 337, 340, 343, 345, 341, 343, 345, 347, 350, 352, 355, 357, 359, 361,
347, 350, 352, 354, 356, 358, 363, 365, 367, 369, 363, 366, 369, 371, 373, 376, 378, 380, 382, 384,
371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407,
391, 393, 395, 397, 399, 401, 403, 405, 407, 408, 409, 411, 413, 415, 417, 419, 421, 423, 425, 427,
415, 416, 422, 424, 427, 431, 433, 437, 439, 444, 429, 431, 433, 434, 441, 442, 448, 450, 453, 457,
446, 448, 450, 452, 454, 456, 458, 460, 462, 465, 462, 464, 468, 470, 475, 477, 479, 481, 483, 485,
466, 467, 473, 475, 477, 478, 481, 482, 485, 488, 487, 489, 491, 493, 496, 497, 498, 504, 506, 508,
492, 494, 497, 499, 502, 508, 512, 514, 516, 521, 509, 512, 513, 516, 519, 523, 525, 528, 530, 533,
522, 529, 530, 539, 540, 548, 550, 552, 554, 555, 539, 543, 545, 547, 552, 553, 560, 561, 570, 571,
558, 562, 565, 568, 571, 575, 578, 580, 583, 585, 579, 581, 583, 585, 586, 589, 593, 596, 599, 602,
587, 588 606, 609, 611, 614, 616, 618, 619
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] = static const yytype_int16 yyrhs[] =
{ {
187, 0, -1, 54, -1, 106, -1, 57, -1, 56, 188, 0, -1, 54, -1, 106, -1, 57, -1, 56,
-1, 58, -1, 81, 133, 82, -1, 107, -1, 108, -1, 58, -1, 81, 133, 82, -1, 107, -1, 108,
83, 109, 84, -1, 110, -1, 108, 87, 59, -1, 83, 109, 84, -1, 110, -1, 108, 87, 59, -1,
108, 62, -1, 108, 63, -1, 133, -1, 111, -1, 108, 62, -1, 108, 63, -1, 133, -1, 111, -1,
112, -1, 108, 87, 112, -1, 114, 82, -1, 113, 112, -1, 108, 87, 112, -1, 114, 82, -1, 113,
82, -1, 115, 45, -1, 115, -1, 115, 131, -1, 82, -1, 115, 45, -1, 115, -1, 115, 131, -1,
114, 88, 131, -1, 116, 81, -1, 154, -1, 54, 114, 88, 131, -1, 116, 81, -1, 155, -1, 54,
-1, 59, -1, 108, -1, 62, 117, -1, 63, 117, -1, 59, -1, 108, -1, 62, 117, -1, 63, 117,
-1, 118, 117, -1, 95, -1, 93, -1, 92, -1, -1, 118, 117, -1, 95, -1, 93, -1, 92, -1,
117, -1, 119, 96, 117, -1, 119, 97, 117, -1, 117, -1, 119, 96, 117, -1, 119, 97, 117, -1,
...@@ -667,74 +668,77 @@ static const yytype_int16 yyrhs[] = ...@@ -667,74 +668,77 @@ static const yytype_int16 yyrhs[] =
129, 69, 128, -1, 129, -1, 129, 104, 133, 89, 129, 69, 128, -1, 129, -1, 129, 104, 133, 89,
131, -1, 130, -1, 117, 132, 131, -1, 90, -1, 131, -1, 130, -1, 117, 132, 131, -1, 90, -1,
71, -1, 72, -1, 73, -1, 80, -1, 131, -1, 71, -1, 72, -1, 73, -1, 80, -1, 131, -1,
133, 88, 131, -1, 130, -1, 136, 91, -1, 144, 133, 88, 131, -1, 130, -1, 54, 85, -1, 137,
91, -1, 7, 152, 153, 91, -1, 137, 82, -1, 91, -1, 145, 91, -1, 7, 153, 154, 91, -1,
139, -1, 138, -1, 139, 141, -1, 138, 88, 141, 150, 135, 159, 86, 91, -1, 150, 135, 159, 86,
-1, 146, 54, 81, -1, 151, 54, -1, 151, 54, 54, 91, -1, 150, 135, 159, 86, 54, 83, 134,
83, 134, 84, -1, 148, 142, 140, -1, 142, 140, 84, 91, -1, 138, 82, -1, 140, -1, 139, -1,
-1, 148, 142, 143, -1, 142, 143, -1, -1, 36, 140, 142, -1, 139, 88, 142, -1, 147, 54, 81,
-1, 37, -1, 38, -1, 151, -1, 145, -1, 144, -1, 152, 54, -1, 152, 54, 83, 134, 84, -1,
88, 54, -1, 144, 88, 54, 83, 84, -1, 144, 149, 143, 141, -1, 143, 141, -1, 149, 143, 144,
88, 54, 83, 134, 84, -1, 144, 88, 54, 90, -1, 143, 144, -1, -1, 36, -1, 37, -1, 38,
162, -1, 146, -1, 146, 54, -1, 146, 54, 83, -1, 152, -1, 146, -1, 145, 88, 54, -1, 145,
84, -1, 146, 54, 83, 134, 84, -1, 146, 54, 88, 54, 83, 84, -1, 145, 88, 54, 83, 134,
90, 162, -1, 3, 54, -1, 151, -1, 149, 151, 84, -1, 145, 88, 54, 90, 163, -1, 147, -1,
-1, 43, -1, 42, -1, 9, -1, 8, -1, 40, 147, 54, -1, 147, 54, 83, 84, -1, 147, 54,
-1, 3, 40, -1, 150, -1, 147, 150, -1, 147, 83, 134, 84, -1, 147, 54, 90, 163, -1, 3,
-1, 9, -1, 36, -1, 37, -1, 41, 36, -1, 54, -1, 152, -1, 150, 152, -1, 43, -1, 42,
41, 37, -1, 39, -1, 153, -1, 152, 153, -1, -1, 9, -1, 8, -1, 40, -1, 3, 40, -1,
4, -1, 5, -1, 6, -1, 154, -1, 154, 83, 151, -1, 148, 151, -1, 148, -1, 9, -1, 36,
134, 84, -1, 45, -1, 11, -1, 12, -1, 10, -1, 37, -1, 41, 36, -1, 41, 37, -1, 39,
-1, 30, -1, 31, -1, 32, -1, 24, -1, 25, -1, 154, -1, 153, 154, -1, 4, -1, 5, -1,
-1, 26, -1, 27, -1, 28, -1, 29, -1, 33, 6, -1, 155, -1, 155, 83, 134, 84, -1, 45,
-1, 34, -1, 35, -1, 47, -1, 48, -1, 49, -1, 11, -1, 12, -1, 10, -1, 30, -1, 31,
-1, 50, -1, 155, -1, 55, -1, -1, 44, 54, -1, 32, -1, 24, -1, 25, -1, 26, -1, 27,
85, 156, 158, 86, -1, -1, 44, 85, 157, 158, -1, 28, -1, 29, -1, 33, -1, 34, -1, 35,
86, -1, 159, -1, 158, 159, -1, 151, 160, 91, -1, 47, -1, 48, -1, 49, -1, 50, -1, 156,
-1, 161, -1, 160, 88, 161, -1, 54, -1, 54, -1, 55, -1, -1, 44, 54, 85, 157, 159, 86,
83, 134, 84, -1, 131, -1, 135, -1, 166, -1, -1, -1, 44, 85, 158, 159, 86, -1, 160, -1,
165, -1, 163, -1, 175, -1, 176, -1, 179, -1, 159, 160, -1, 152, 161, 91, -1, 150, 152, 161,
186, -1, 85, 86, -1, -1, -1, 85, 167, 174, 91, -1, 162, -1, 161, 88, 162, -1, 54, -1,
168, 86, -1, 173, -1, 165, -1, -1, 171, 173, 54, 83, 134, 84, -1, 131, -1, 136, -1, 167,
-1, -1, 172, 165, -1, 85, 86, -1, 85, 174, -1, 166, -1, 164, -1, 176, -1, 177, -1, 180,
86, -1, 164, -1, 174, 164, -1, 91, -1, 133, -1, 187, -1, 85, 86, -1, -1, -1, 85, 168,
91, -1, 18, 81, 133, 82, 177, -1, 170, 16, 175, 169, 86, -1, 174, -1, 166, -1, -1, 172,
170, -1, 170, -1, 133, -1, 146, 54, 90, 162, 174, -1, -1, 173, 166, -1, 85, 86, -1, 85,
-1, -1, 46, 81, 180, 178, 82, 169, -1, -1, 175, 86, -1, 165, -1, 175, 165, -1, 91, -1,
15, 181, 170, 46, 81, 133, 82, 91, -1, -1, 133, 91, -1, 18, 81, 133, 82, 178, -1, 171,
17, 81, 182, 183, 185, 82, 169, -1, 175, -1, 16, 171, -1, 171, -1, 133, -1, 147, 54, 90,
163, -1, 178, -1, -1, 184, 91, -1, 184, 91, 163, -1, -1, 46, 81, 181, 179, 82, 170, -1,
133, -1, 14, 91, -1, 13, 91, -1, 20, 91, -1, 15, 182, 171, 46, 81, 133, 82, 91, -1,
-1, 20, 133, 91, -1, 19, 91, -1, 188, -1, -1, 17, 81, 183, 184, 186, 82, 170, -1, 176,
187, 188, -1, 189, -1, 135, -1, -1, 136, 190, -1, 164, -1, 179, -1, -1, 185, 91, -1, 185,
173, -1 91, 133, -1, 14, 91, -1, 13, 91, -1, 20,
91, -1, 20, 133, 91, -1, 19, 91, -1, 189,
-1, 188, 189, -1, 190, -1, 136, -1, -1, 137,
191, 174, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 184, 184, 219, 222, 235, 240, 245, 251, 254, 0, 186, 186, 221, 224, 237, 242, 247, 253, 256,
257, 260, 263, 273, 286, 294, 394, 397, 405, 409, 259, 262, 265, 275, 288, 296, 396, 399, 407, 411,
416, 420, 427, 433, 442, 450, 505, 512, 522, 525, 418, 422, 429, 435, 444, 452, 507, 514, 524, 527,
535, 545, 566, 567, 568, 573, 574, 583, 595, 596, 537, 547, 568, 569, 570, 575, 576, 585, 597, 598,
604, 615, 619, 620, 630, 640, 650, 663, 664, 674, 606, 617, 621, 622, 632, 642, 652, 665, 666, 676,
687, 691, 695, 699, 700, 713, 714, 727, 728, 741, 689, 693, 697, 701, 702, 715, 716, 729, 730, 743,
742, 759, 760, 773, 774, 775, 776, 777, 781, 784, 744, 761, 762, 775, 776, 777, 778, 779, 783, 786,
795, 803, 830, 835, 849, 887, 890, 897, 905, 926, 797, 805, 813, 840, 845, 856, 860, 864, 871, 909,
947, 958, 987, 992, 1002, 1007, 1017, 1020, 1023, 1026, 912, 919, 927, 948, 969, 980, 1009, 1014, 1024, 1029,
1032, 1039, 1042, 1064, 1082, 1106, 1129, 1133, 1151, 1159, 1039, 1042, 1045, 1048, 1054, 1061, 1064, 1086, 1104, 1128,
1191, 1211, 1300, 1309, 1332, 1336, 1343, 1349, 1356, 1365, 1151, 1155, 1173, 1181, 1213, 1233, 1322, 1331, 1354, 1358,
1374, 1377, 1413, 1423, 1427, 1432, 1437, 1442, 1447, 1456, 1365, 1371, 1378, 1387, 1396, 1399, 1435, 1445, 1449, 1454,
1466, 1473, 1476, 1479, 1485, 1488, 1503, 1507, 1511, 1515, 1459, 1464, 1469, 1478, 1488, 1495, 1498, 1501, 1507, 1510,
1524, 1529, 1534, 1539, 1544, 1549, 1554, 1559, 1564, 1569, 1525, 1529, 1533, 1537, 1546, 1551, 1556, 1561, 1566, 1571,
1575, 1581, 1587, 1592, 1597, 1606, 1615, 1620, 1633, 1633, 1576, 1581, 1586, 1591, 1597, 1603, 1609, 1614, 1619, 1628,
1636, 1636, 1642, 1645, 1660, 1666, 1670, 1676, 1684, 1700, 1637, 1642, 1655, 1655, 1658, 1658, 1664, 1667, 1682, 1685,
1704, 1708, 1709, 1715, 1716, 1717, 1718, 1719, 1723, 1724, 1693, 1697, 1703, 1711, 1727, 1731, 1735, 1736, 1742, 1743,
1724, 1724, 1734, 1735, 1739, 1739, 1740, 1740, 1745, 1748, 1744, 1745, 1746, 1750, 1751, 1751, 1751, 1761, 1762, 1766,
1758, 1761, 1767, 1768, 1772, 1780, 1784, 1794, 1799, 1816, 1766, 1767, 1767, 1772, 1775, 1785, 1788, 1794, 1795, 1799,
1816, 1821, 1821, 1828, 1828, 1836, 1839, 1845, 1848, 1854, 1807, 1811, 1821, 1826, 1843, 1843, 1848, 1848, 1855, 1855,
1858, 1865, 1872, 1879, 1886, 1897, 1906, 1910, 1917, 1920, 1863, 1866, 1872, 1875, 1881, 1885, 1892, 1899, 1906, 1913,
1926, 1926 1924, 1933, 1937, 1944, 1947, 1953, 1953
}; };
#endif #endif
...@@ -773,15 +777,16 @@ static const char *const yytname[] = ...@@ -773,15 +777,16 @@ static const char *const yytname[] =
"logical_and_expression", "logical_xor_expression", "logical_and_expression", "logical_xor_expression",
"logical_or_expression", "conditional_expression", "logical_or_expression", "conditional_expression",
"assignment_expression", "assignment_operator", "expression", "assignment_expression", "assignment_operator", "expression",
"constant_expression", "declaration", "function_prototype", "constant_expression", "enter_struct", "declaration",
"function_declarator", "function_header_with_parameters", "function_prototype", "function_declarator",
"function_header", "parameter_declarator", "parameter_declaration", "function_header_with_parameters", "function_header",
"parameter_qualifier", "parameter_type_specifier", "parameter_declarator", "parameter_declaration", "parameter_qualifier",
"init_declarator_list", "single_declaration", "fully_specified_type", "parameter_type_specifier", "init_declarator_list", "single_declaration",
"interpolation_qualifier", "parameter_type_qualifier", "type_qualifier", "fully_specified_type", "interpolation_qualifier",
"storage_qualifier", "type_specifier", "precision_qualifier", "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
"type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", "type_specifier", "precision_qualifier", "type_specifier_no_prec",
"$@1", "$@2", "struct_declaration_list", "struct_declaration", "type_specifier_nonarray", "struct_specifier", "$@1", "$@2",
"struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer", "struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement", "declaration_statement", "statement", "simple_statement",
"compound_statement", "$@3", "$@4", "statement_no_new_scope", "compound_statement", "$@3", "$@4", "statement_no_new_scope",
...@@ -823,21 +828,21 @@ static const yytype_uint8 yyr1[] = ...@@ -823,21 +828,21 @@ static const yytype_uint8 yyr1[] =
120, 121, 122, 122, 122, 122, 122, 123, 123, 123, 120, 121, 122, 122, 122, 122, 122, 123, 123, 123,
124, 125, 126, 127, 127, 128, 128, 129, 129, 130, 124, 125, 126, 127, 127, 128, 128, 129, 129, 130,
130, 131, 131, 132, 132, 132, 132, 132, 133, 133, 130, 131, 131, 132, 132, 132, 132, 132, 133, 133,
134, 135, 135, 135, 136, 137, 137, 138, 138, 139, 134, 135, 136, 136, 136, 136, 136, 136, 137, 138,
140, 140, 141, 141, 141, 141, 142, 142, 142, 142, 138, 139, 139, 140, 141, 141, 142, 142, 142, 142,
143, 144, 144, 144, 144, 144, 145, 145, 145, 145, 143, 143, 143, 143, 144, 145, 145, 145, 145, 145,
145, 145, 146, 146, 147, 147, 148, 149, 149, 149, 146, 146, 146, 146, 146, 146, 147, 147, 148, 148,
149, 149, 149, 150, 150, 150, 150, 150, 150, 151, 149, 150, 150, 150, 150, 150, 150, 151, 151, 151,
151, 152, 152, 152, 153, 153, 154, 154, 154, 154, 151, 151, 151, 152, 152, 153, 153, 153, 154, 154,
154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
154, 154, 154, 154, 154, 154, 154, 154, 156, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
157, 155, 158, 158, 159, 160, 160, 161, 161, 162, 155, 155, 157, 156, 158, 156, 159, 159, 160, 160,
163, 164, 164, 165, 165, 165, 165, 165, 166, 167, 161, 161, 162, 162, 163, 164, 165, 165, 166, 166,
168, 166, 169, 169, 171, 170, 172, 170, 173, 173, 166, 166, 166, 167, 168, 169, 167, 170, 170, 172,
174, 174, 175, 175, 176, 177, 177, 178, 178, 180, 171, 173, 171, 174, 174, 175, 175, 176, 176, 177,
179, 181, 179, 182, 179, 183, 183, 184, 184, 185, 178, 178, 179, 179, 181, 180, 182, 180, 183, 180,
185, 186, 186, 186, 186, 186, 187, 187, 188, 188, 184, 184, 185, 185, 186, 186, 187, 187, 187, 187,
190, 189 187, 188, 188, 189, 189, 191, 190
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -850,21 +855,21 @@ static const yytype_uint8 yyr2[] = ...@@ -850,21 +855,21 @@ static const yytype_uint8 yyr2[] =
3, 1, 1, 3, 3, 3, 3, 1, 3, 3, 3, 1, 1, 3, 3, 3, 3, 1, 3, 3,
1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1,
5, 1, 3, 1, 1, 1, 1, 1, 1, 3, 5, 1, 3, 1, 1, 1, 1, 1, 1, 3,
1, 2, 2, 4, 2, 1, 1, 2, 3, 3, 1, 2, 2, 2, 4, 5, 6, 9, 2, 1,
2, 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, 2, 3, 3, 2, 5, 3, 2, 3, 2,
1, 1, 3, 5, 6, 5, 1, 2, 4, 5, 0, 1, 1, 1, 1, 1, 3, 5, 6, 5,
4, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 4, 5, 4, 2, 1, 2, 1, 1,
1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 4,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
0, 5, 1, 2, 3, 1, 3, 1, 4, 1, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 0, 5, 1, 1, 0,
0, 5, 1, 1, 0, 2, 0, 2, 2, 3, 2, 0, 2, 2, 3, 1, 2, 1, 2, 5,
1, 2, 1, 2, 5, 3, 1, 1, 4, 0, 3, 1, 1, 4, 0, 6, 0, 8, 0, 7,
6, 0, 8, 0, 7, 1, 1, 1, 0, 2, 1, 1, 1, 0, 2, 3, 2, 2, 2, 3,
3, 2, 2, 2, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 0, 3
0, 3
}; };
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
...@@ -872,251 +877,272 @@ static const yytype_uint8 yyr2[] = ...@@ -872,251 +877,272 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */ means the default is an error. */
static const yytype_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
0, 0, 121, 122, 123, 0, 107, 113, 129, 127, 0, 0, 125, 126, 127, 0, 111, 117, 133, 131,
128, 133, 134, 135, 136, 137, 138, 130, 131, 132, 132, 137, 138, 139, 140, 141, 142, 134, 135, 136,
139, 140, 141, 114, 115, 118, 108, 0, 105, 104, 143, 144, 145, 118, 119, 122, 112, 0, 109, 108,
0, 126, 142, 143, 144, 145, 147, 209, 210, 0, 0, 130, 146, 147, 148, 149, 151, 214, 215, 0,
76, 86, 0, 91, 96, 112, 0, 110, 102, 0, 80, 90, 0, 95, 100, 116, 0, 114, 106, 0,
119, 124, 146, 0, 206, 208, 109, 101, 0, 116, 123, 128, 150, 0, 211, 213, 113, 105, 0, 120,
117, 0, 150, 71, 0, 74, 86, 106, 87, 88, 121, 0, 154, 72, 0, 78, 90, 110, 91, 92,
89, 77, 0, 86, 0, 72, 97, 111, 103, 120, 93, 81, 0, 90, 0, 73, 101, 115, 0, 0,
0, 1, 207, 0, 148, 0, 0, 211, 78, 83, 107, 124, 0, 1, 212, 0, 152, 0, 0, 216,
85, 90, 0, 92, 79, 0, 0, 2, 5, 4, 82, 87, 89, 94, 0, 96, 83, 0, 0, 71,
6, 27, 0, 0, 0, 34, 33, 32, 3, 8, 0, 0, 0, 0, 156, 2, 5, 4, 6, 27,
28, 10, 15, 16, 0, 0, 21, 0, 35, 0, 0, 0, 0, 34, 33, 32, 3, 8, 28, 10,
38, 41, 42, 47, 50, 51, 52, 53, 55, 57, 15, 16, 0, 0, 21, 0, 35, 0, 38, 41,
59, 70, 0, 25, 73, 0, 0, 0, 152, 0, 42, 47, 50, 51, 52, 53, 55, 57, 59, 70,
0, 191, 0, 0, 0, 0, 0, 169, 178, 182, 0, 25, 74, 0, 0, 0, 0, 196, 0, 0,
35, 61, 68, 0, 160, 0, 124, 163, 180, 162, 0, 0, 0, 174, 183, 187, 35, 61, 68, 0,
161, 0, 164, 165, 166, 167, 80, 82, 84, 0, 165, 0, 128, 168, 185, 167, 166, 0, 169, 170,
0, 98, 0, 159, 100, 29, 30, 0, 12, 13, 171, 172, 84, 86, 88, 0, 0, 102, 0, 164,
0, 0, 19, 18, 0, 20, 22, 24, 31, 0, 104, 0, 162, 0, 160, 0, 157, 29, 30, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 0, 0, 19, 18, 0, 20, 22, 24,
0, 0, 0, 125, 0, 157, 0, 155, 151, 153, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202, 201, 176, 193, 0, 205, 203, 0, 189, 168, 0, 0, 0, 0, 0, 129, 0, 155, 207, 206,
0, 64, 65, 66, 67, 63, 0, 0, 183, 179, 181, 198, 0, 210, 208, 0, 194, 173, 0, 64,
181, 0, 93, 0, 95, 99, 7, 0, 14, 26, 65, 66, 67, 63, 0, 0, 188, 184, 186, 0,
11, 17, 23, 36, 37, 40, 39, 45, 46, 43, 97, 0, 99, 103, 0, 0, 0, 158, 0, 75,
44, 48, 49, 54, 56, 58, 0, 149, 0, 0, 7, 0, 14, 26, 11, 17, 23, 36, 37, 40,
154, 0, 0, 0, 0, 0, 204, 0, 170, 62, 39, 45, 46, 43, 44, 48, 49, 54, 56, 58,
69, 0, 94, 9, 0, 0, 156, 0, 175, 177, 0, 153, 0, 0, 0, 0, 0, 209, 0, 175,
196, 195, 198, 176, 0, 187, 0, 0, 0, 81, 62, 69, 0, 98, 159, 0, 161, 0, 76, 9,
60, 158, 0, 197, 0, 0, 186, 184, 0, 0, 0, 0, 180, 182, 201, 200, 203, 181, 192, 0,
171, 0, 199, 0, 176, 0, 173, 190, 172, 0, 0, 0, 0, 85, 163, 0, 60, 0, 202, 0,
200, 194, 185, 188, 192 0, 191, 189, 0, 0, 176, 0, 0, 204, 0,
181, 0, 178, 195, 177, 77, 0, 205, 199, 190,
193, 197
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] = static const yytype_int16 yydefgoto[] =
{ {
-1, 108, 109, 110, 237, 111, 112, 113, 114, 115, -1, 116, 117, 118, 251, 119, 120, 121, 122, 123,
116, 117, 150, 119, 120, 121, 122, 123, 124, 125, 124, 125, 156, 127, 128, 129, 130, 131, 132, 133,
126, 127, 128, 129, 130, 151, 152, 226, 153, 132, 134, 135, 136, 137, 138, 157, 158, 234, 159, 140,
154, 155, 39, 40, 41, 89, 71, 72, 90, 42, 79, 160, 161, 39, 40, 41, 91, 71, 72, 92,
43, 44, 45, 73, 46, 47, 48, 49, 50, 133, 42, 43, 44, 45, 73, 46, 47, 48, 49, 50,
52, 135, 85, 137, 138, 206, 207, 174, 157, 158, 141, 52, 143, 87, 103, 104, 183, 184, 180, 163,
159, 160, 220, 288, 307, 261, 262, 263, 308, 161, 164, 165, 166, 228, 302, 323, 272, 273, 274, 324,
162, 163, 297, 287, 164, 267, 212, 264, 282, 294, 167, 168, 169, 312, 301, 170, 278, 220, 275, 296,
295, 165, 53, 54, 55, 64 309, 310, 171, 53, 54, 55, 64
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -270 #define YYPACT_NINF -277
static const yytype_int16 yypact[] = static const yytype_int16 yypact[] =
{ {
1367, -24, -270, -270, -270, 141, -270, -270, -270, -270, 1489, -22, -277, -277, -277, 129, -277, -277, -277, -277,
-270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
-270, -270, -270, -270, -270, -270, -270, 30, -270, -270, -277, -277, -277, -277, -277, -277, -277, 60, -277, -277,
-28, -270, -270, -270, -270, -270, -270, -270, -62, -32, -25, -277, -277, -277, -277, -277, -277, -277, -64, -31,
-26, 1, -9, -270, 34, 32, 1414, -270, -270, 1496, -52, 2, -15, -277, 10, 71, 236, -277, -277, 1666,
-270, 15, -270, 1314, -270, -270, -270, -270, 1496, -270, -277, 7, -277, 1436, -277, -277, -277, -277, 1666, -277,
-270, 6, -270, -270, 17, -270, 67, -270, -270, -270, -277, 28, -277, -277, 51, -277, 80, -277, -277, -277,
-270, -270, 1414, 113, 57, -270, -20, -270, -270, -270, -277, -277, 1584, 133, 88, -277, -59, -277, 73, 1537,
1060, -270, -270, 37, -270, 1414, 301, -270, -270, -270, -277, -277, 1131, -277, -277, 70, -277, 1537, 298, -277,
-270, 80, 1414, -6, -270, 838, 1060, 62, -270, -270, -277, -277, -277, 112, 1584, -9, -277, 909, 1131, -277,
-270, -270, 1060, 1060, 1060, -270, -270, -270, -270, -270, 136, 1584, 141, 1277, -277, 106, -277, -277, -277, -277,
-31, -270, -270, -270, 56, -65, 1132, 72, -270, 1060, 1131, 1131, 1131, -277, -277, -277, -277, -277, 101, -277,
63, -53, -270, -40, 96, -270, -270, -270, 89, 94, -277, -277, 116, -5, 1203, 118, -277, 1131, 81, 31,
-56, -270, 90, -270, -270, 1414, 121, 1204, -270, 85, -277, 5, 114, -277, -277, -277, 134, 131, -57, -277,
86, -270, 97, 100, 93, 913, 104, 101, -270, -270, 119, -277, -277, 1537, 1325, 113, 115, -277, 124, 128,
68, -270, -270, 22, -270, -62, 71, -270, -270, -270, 120, 984, 132, 135, -277, -277, 102, -277, -277, -13,
-270, 394, -270, -270, -270, -270, 103, -270, -270, 985, -277, -64, 56, -277, -277, -277, -277, 391, -277, -277,
1060, -270, 105, -270, -270, -270, -270, -1, -270, -270, -277, -277, 137, -277, -277, 1056, 1131, -277, 130, -277,
1060, 1455, -270, -270, 1060, 107, -270, -270, -270, 1060, -277, 141, 139, 18, -277, -35, -277, -277, -277, 3,
1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, -277, -277, 1131, 1625, -277, -277, 1131, 142, -277, -277,
1060, 1060, 1060, -270, 1251, 108, 39, -270, -270, -270, -277, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1131,
-270, -270, 109, -270, 1060, -270, -270, 45, -270, -270, 1131, 1131, 1131, 1131, 1131, -277, 1373, -277, -277, -277,
487, -270, -270, -270, -270, -270, 1060, 1060, -270, -270, 140, -277, 1131, -277, -277, 23, -277, -277, 484, -277,
-270, 1060, -270, 111, -270, -270, -270, 112, 110, -270, -277, -277, -277, -277, 1131, 1131, -277, -277, -277, 1131,
116, -270, -270, -270, -270, 63, 63, -270, -270, -270, -277, 145, -277, -277, 37, 1131, 141, -277, -46, -277,
-270, -40, -40, -270, 89, 94, 79, -270, 1060, 121, -277, 146, 127, -277, 143, -277, -277, -277, -277, 81,
-270, 146, 17, 673, 766, 8, -270, 203, 487, -270, 81, -277, -277, -277, -277, 5, 5, -277, 134, 131,
-270, 115, -270, -270, 1060, 118, -270, 122, -270, -270, 97, -277, 171, 51, 670, 763, 4, -277, 837, 484,
-270, -270, 203, 109, 153, 110, 151, 134, 131, -270, -277, -277, 148, -277, -277, 149, -277, 1131, -277, -277,
-270, -270, 1060, -270, 127, 137, 205, -270, 132, 580, 1131, 153, -277, -277, -277, -277, 837, 140, 127, 172,
-270, 13, 1060, 580, 109, 1060, -270, -270, -270, 133, 1584, 154, 151, -277, -277, 155, -277, 1131, -277, 144,
110, -270, -270, -270, -270 156, 227, -277, 159, 577, -277, 160, 39, 1131, 577,
140, 1131, -277, -277, -277, -277, 161, 127, -277, -277,
-277, -277
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] = static const yytype_int16 yypgoto[] =
{ {
-270, -270, -270, -270, -270, -270, -270, 42, -270, -270, -277, -277, -277, -277, -277, -277, -277, 52, -277, -277,
-270, -270, -75, -270, -21, -270, -87, -25, -270, -270, -277, -277, -56, -277, -10, -277, -76, -19, -277, -277,
-270, 26, 41, 25, -270, -76, -95, -270, -102, -89, -277, 33, 38, 40, -277, -77, -94, -277, -99, -80,
11, 12, -270, -270, -270, 157, 188, 182, 164, -270, -277, 8, 14, -277, -277, -277, 163, 188, 182, 164,
-270, -249, -270, -270, -270, 224, -38, 265, -13, 0, -277, -277, -262, -277, -277, -78, 214, -44, 267, -16,
-270, -270, -270, 136, -130, -270, 14, -161, 10, -139, 0, -277, -277, -277, -81, -96, 92, 30, -161, 12,
-248, -270, -270, -270, -27, -269, -270, -270, -61, 52, -157, -251, -277, -277, -277, -42, -276, -277, -277, -61,
16, -270, -270, -7, -270, -270, -270, -270, -270, -270, 54, 13, -277, -277, -7, -277, -277, -277, -277, -277,
-270, -270, -270, 225, -270, -270 -277, -277, -277, -277, 239, -277, -277
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which positive, shift that token. If negative, reduce the rule which
number is the opposite. If YYTABLE_NINF, syntax error. */ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -175 #define YYTABLE_NINF -180
static const yytype_int16 yytable[] = static const yytype_int16 yytable[] =
{ {
51, 173, 177, 87, 131, 118, 172, 209, 78, 234, 51, 101, 80, 89, 179, 139, 144, 186, 37, 101,
67, 37, 38, 201, 296, 279, 56, 183, 286, 131, 238, 67, 213, 189, 38, 242, 299, 178, 56, 248,
118, 186, 230, 184, 193, 194, 61, 175, 176, 63, 139, 311, 96, 293, 97, 101, 126, 63, 93, 61,
57, 178, 179, 286, 91, 312, 79, 68, 69, 70, 198, 98, 57, 81, 299, 102, 66, 287, 68, 69,
191, 7, 192, 217, 188, 83, 51, 136, 202, 51, 70, 126, 85, 102, 329, 288, 51, 214, 186, 51,
65, 306, 180, 51, 91, 306, 181, 62, 51, 195, 93, 65, 225, 51, 187, 188, 249, 181, 51, 102,
196, 94, 66, 95, 37, 38, 59, 60, 23, 24, 62, 37, 216, 322, 76, 101, 101, 38, 322, 205,
96, 25, 51, 27, 209, 173, 67, 169, 238, 74, 206, 200, 51, 74, 175, 235, 75, 195, 236, 51,
233, 236, 75, -75, 170, 51, 156, 227, 76, 242, 7, 176, 179, 196, -79, 250, 297, 51, 162, 67,
283, 84, 51, 131, 118, 309, 227, 136, 80, 136, 82, 235, 235, 252, 51, 241, 59, 60, 139, 102,
256, 227, 86, 68, 69, 70, 247, 248, 249, 250, 102, 51, 256, 51, 207, 208, 246, 23, 24, 247,
227, 93, 265, 228, 243, 244, 118, 118, 118, 118, 25, 235, 27, 86, 277, 270, 68, 69, 70, 126,
118, 118, 118, 118, 118, 118, 118, 259, 134, 230, 186, 326, 238, 276, 203, 246, 204, 235, 284, 261,
260, 269, 270, 227, 166, 51, 266, 51, 182, 221, 262, 263, 264, 2, 3, 4, 88, -25, 101, 82,
222, 223, 271, -26, 313, 2, 3, 4, 224, 68, 280, 281, 95, 51, 51, 257, 258, 126, 126, 126,
69, 70, -25, 187, 80, 131, 118, 199, 225, 189, 126, 126, 126, 126, 126, 126, 126, 126, 99, 282,
190, 156, 197, 198, 200, 285, 136, 227, 274, 275, 330, 142, 139, 190, 191, 285, 172, 162, 139, 68,
245, 246, 251, 252, 203, 205, 210, 211, 213, 290, 69, 70, 102, 229, 230, 231, 56, 201, 202, 298,
285, 214, 131, 118, 215, 218, 231, 219, -126, 235, 209, 210, 232, 126, 192, 235, 290, -26, 193, 126,
301, 258, 277, 56, -174, 272, 273, -27, 227, 289, 265, 266, 233, 259, 260, 182, 306, 298, 194, 199,
310, 278, 291, 292, 51, 298, 284, 2, 3, 4, 300, 212, 211, 215, 218, 221, 219, 305, 317, 222,
173, 6, 7, 8, 9, 10, 299, 300, 302, 303, 139, 223, 292, 226, 243, 235, 51, 291, 300, 327,
156, 304, 305, 241, 314, 253, 255, 11, 12, 13, 239, 227, 245, -130, -27, -179, 313, 179, 162, 283,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 289, 126, 303, 304, 307, 318, 314, 315, 319, 316,
24, 254, 25, 26, 27, 28, 29, 30, 31, 167, 2, 3, 4, 320, 267, 255, 8, 9, 10, 321,
32, 33, 34, 35, 88, 92, 168, 97, 36, 98, 268, 325, 331, 269, 90, 94, 80, 173, 174, 77,
99, 100, 101, 156, 156, 102, 103, 156, 156, 77, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
58, 204, 268, 276, 280, 293, 311, 0, 82, 0, 21, 22, 58, 244, 162, 162, 286, 328, 162, 162,
281, 0, 156, 0, 104, 0, 0, 0, 0, 0, 30, 31, 279, 32, 33, 34, 35, 294, 295, 308,
0, 0, 0, 0, 0, 105, 106, 0, 107, 156, 78, 36, 84, 0, 0, 0, 162, 0, 0, 0,
0, 0, 0, 156, 1, 2, 3, 4, 5, 6, 51, 1, 2, 3, 4, 5, 6, 7, 8, 9,
7, 8, 9, 10, 139, 140, 141, 0, 142, 143, 10, 145, 146, 147, 162, 148, 149, 150, 151, 162,
144, 145, 0, 0, 0, 11, 12, 13, 14, 15, 0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 0, 25, 26, 27,
28, 29, 30, 31, 152, 32, 33, 34, 35, 0,
0, 0, 105, 36, 106, 107, 108, 109, 0, 0,
110, 111, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
0, 0, 0, 153, 154, 0, 0, 0, 0, 155,
113, 114, 0, 115, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 145, 146, 147, 0, 148, 149,
150, 151, 0, 0, 0, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
25, 26, 27, 28, 29, 30, 31, 146, 32, 33, 25, 26, 27, 28, 29, 30, 31, 152, 32, 33,
34, 35, 0, 0, 0, 97, 36, 98, 99, 100, 34, 35, 0, 0, 0, 105, 36, 106, 107, 108,
101, 0, 0, 102, 103, 0, 0, 0, 0, 0, 109, 0, 0, 110, 111, 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, 104, 0, 0, 0, 147, 148, 0, 0, 0, 0, 112, 0, 0, 0, 153, 237, 0, 0,
0, 0, 149, 105, 106, 0, 107, 1, 2, 3, 0, 0, 155, 113, 114, 0, 115, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 139, 140, 141, 4, 5, 6, 7, 8, 9, 10, 145, 146, 147,
0, 142, 143, 144, 145, 0, 0, 0, 11, 12, 0, 148, 149, 150, 151, 0, 0, 0, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 0, 25, 26, 27, 28, 29, 30, 31, 23, 24, 0, 25, 26, 27, 28, 29, 30, 31,
146, 32, 33, 34, 35, 0, 0, 0, 97, 36, 152, 32, 33, 34, 35, 0, 0, 0, 105, 36,
98, 99, 100, 101, 0, 0, 102, 103, 0, 0, 106, 107, 108, 109, 0, 0, 110, 111, 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, 104, 0, 0, 0, 147, 0, 0, 0, 0, 0, 112, 0, 0, 0, 153,
229, 0, 0, 0, 0, 149, 105, 106, 0, 107, 0, 0, 0, 0, 0, 155, 113, 114, 0, 115,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
139, 140, 141, 0, 142, 143, 144, 145, 0, 0, 145, 146, 147, 0, 148, 149, 150, 151, 0, 0,
0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 0, 25, 26, 27, 28, 20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
29, 30, 31, 146, 32, 33, 34, 35, 0, 0, 29, 30, 31, 152, 32, 33, 34, 35, 0, 0,
0, 97, 36, 98, 99, 100, 101, 0, 0, 102, 0, 105, 36, 106, 107, 108, 109, 0, 0, 110,
103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
0, 0, 147, 0, 0, 0, 0, 0, 149, 105, 0, 0, 88, 0, 0, 0, 0, 0, 155, 113,
106, 0, 107, 1, 2, 3, 4, 5, 6, 7, 114, 0, 115, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 139, 140, 141, 0, 142, 143, 144, 8, 9, 10, 145, 146, 147, 0, 148, 149, 150,
145, 0, 0, 0, 11, 12, 13, 14, 15, 16, 151, 0, 0, 0, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 0, 25, 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
26, 27, 28, 29, 30, 31, 146, 32, 33, 34, 26, 27, 28, 29, 30, 31, 152, 32, 33, 34,
35, 0, 0, 0, 97, 36, 98, 99, 100, 101, 35, 0, 0, 0, 105, 36, 106, 107, 108, 109,
0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 110, 111, 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, 104, 0, 0, 0, 86, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
0, 149, 105, 106, 0, 107, 1, 2, 3, 4, 0, 155, 113, 114, 0, 115, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 139, 140, 141, 0, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0,
142, 143, 144, 145, 0, 0, 0, 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 0, 25, 26, 27, 28, 29, 30, 31, 146, 24, 0, 25, 26, 27, 28, 29, 30, 31, 0,
32, 33, 34, 35, 0, 0, 0, 97, 36, 98, 32, 33, 34, 35, 0, 0, 0, 105, 36, 106,
99, 100, 101, 0, 0, 102, 103, 0, 0, 0, 107, 108, 109, 0, 0, 110, 111, 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, 104, 0, 0, 0, 0, 0, 100, 2, 3, 4, 112, 6, 7, 8, 9, 10,
0, 0, 0, 0, 149, 105, 106, 0, 107, 1, 0, 0, 0, 0, 155, 113, 114, 0, 115, 0,
2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
29, 30, 31, 0, 32, 33, 34, 35, 0, 0,
0, 105, 36, 106, 107, 108, 109, 0, 0, 110,
111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 112, 8,
9, 10, 0, 0, 0, 0, 0, 0, 0, 113,
114, 0, 115, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 0, 0, 0, 0, 0,
0, 0, 0, 30, 31, 0, 32, 33, 34, 35,
0, 0, 0, 105, 36, 106, 107, 108, 109, 0,
0, 110, 111, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
112, 0, 0, 177, 8, 9, 10, 0, 0, 0,
0, 113, 114, 0, 115, 0, 0, 0, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
0, 0, 0, 0, 0, 0, 0, 0, 30, 31,
0, 32, 33, 34, 35, 0, 0, 0, 105, 36,
106, 107, 108, 109, 0, 0, 110, 111, 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, 112, 8, 9, 10, 0,
0, 0, 0, 0, 0, 224, 113, 114, 0, 115,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 0, 25, 26, 27, 28, 29, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0,
30, 31, 0, 32, 33, 34, 35, 0, 0, 0, 30, 31, 0, 32, 33, 34, 35, 0, 0, 0,
97, 36, 98, 99, 100, 101, 0, 0, 102, 103, 105, 36, 106, 107, 108, 109, 0, 0, 110, 111,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
240, 8, 9, 10, 0, 0, 0, 0, 113, 114,
0, 115, 0, 0, 0, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
0, 0, 0, 0, 0, 30, 31, 0, 32, 33,
34, 35, 0, 0, 0, 105, 36, 106, 107, 108,
109, 0, 0, 110, 111, 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, 104, 8, 9, 0, 0, 112, 8, 9, 10, 0, 0, 0, 0,
10, 0, 0, 0, 0, 0, 0, 149, 105, 106, 0, 0, 0, 113, 114, 0, 115, 11, 12, 13,
0, 107, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 0, 0, 0, 0, 0, 0,
0, 0, 30, 31, 0, 32, 33, 34, 35, 0,
0, 0, 97, 36, 98, 99, 100, 101, 0, 0,
102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
0, 0, 171, 8, 9, 10, 0, 0, 0, 0,
105, 106, 0, 107, 0, 0, 0, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 30, 197, 0,
32, 33, 34, 35, 0, 0, 0, 97, 36, 98, 32, 33, 34, 35, 0, 0, 0, 105, 36, 106,
99, 100, 101, 0, 0, 102, 103, 0, 0, 0, 107, 108, 109, 0, 0, 110, 111, 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, 104, 8, 9, 10, 0, 0, 100, 2, 3, 4, 112, 6, 7, 8, 9, 10,
0, 0, 0, 0, 216, 105, 106, 0, 107, 11, 0, 0, 0, 0, 0, 113, 114, 0, 115, 0,
0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
29, 30, 31, 0, 32, 33, 34, 35, 100, 2,
3, 4, 36, 6, 7, 8, 9, 10, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 0, 0, 0, 0, 0, 0, 0, 0, 30, 22, 23, 24, 185, 25, 26, 27, 28, 29, 30,
31, 0, 32, 33, 34, 35, 0, 0, 0, 97, 31, 0, 32, 33, 34, 35, 100, 2, 3, 4,
36, 98, 99, 100, 101, 0, 0, 102, 103, 0, 36, 6, 7, 8, 9, 10, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13,
0, 0, 0, 0, 0, 0, 104, 0, 0, 232, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
8, 9, 10, 0, 0, 0, 0, 105, 106, 0, 24, 217, 25, 26, 27, 28, 29, 30, 31, 0,
107, 0, 0, 0, 11, 12, 13, 14, 15, 16, 32, 33, 34, 35, 0, 0, 0, 0, 36, 0,
17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 1,
0, 0, 0, 0, 30, 31, 0, 32, 33, 34, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0,
35, 0, 0, 0, 97, 36, 98, 99, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 271,
0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 23, 24, 0, 25, 26, 27, 28, 29,
0, 104, 8, 9, 10, 0, 0, 0, 0, 0, 30, 31, 0, 32, 33, 34, 35, 0, 0, 0,
0, 0, 105, 106, 0, 107, 11, 12, 13, 14, 0, 36, 1, 2, 3, 4, 5, 6, 7, 8,
15, 16, 17, 18, 19, 20, 21, 22, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 30, 185, 0, 32, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
33, 34, 35, 0, 0, 0, 97, 36, 98, 99, 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
100, 101, 0, 0, 102, 103, 0, 0, 0, 0, 27, 28, 29, 30, 31, 0, 32, 33, 34, 35,
0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 100, 2, 3, 4, 36, 6, 7, 8, 9, 10,
4, 0, 0, 104, 8, 9, 10, 0, 0, 0,
0, 0, 0, 0, 105, 106, 0, 107, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
0, 0, 0, 0, 0, 0, 0, 0, 30, 31,
0, 32, 33, 34, 35, 2, 3, 4, 0, 36,
0, 8, 9, 10, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
208, 0, 0, 0, 0, 30, 31, 0, 32, 33,
34, 35, 0, 0, 0, 0, 36, 0, 0, 0,
0, 0, 0, 0, 81, 0, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 257, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 0, 25, 26, 27, 28, 29, 30, 31,
0, 32, 33, 34, 35, 0, 0, 0, 0, 36,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 0, 25, 26, 27, 28, 20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
...@@ -1129,8 +1155,8 @@ static const yytype_int16 yytable[] = ...@@ -1129,8 +1155,8 @@ static const yytype_int16 yytable[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 0, 0, 0, 0, 0, 0, 0, 0, 30, 22, 0, 0, 0, 0, 0, 0, 0, 0, 30,
31, 0, 32, 33, 34, 35, 8, 9, 10, 239, 31, 0, 32, 33, 34, 35, 8, 9, 10, 253,
36, 0, 0, 0, 240, 0, 0, 0, 0, 0, 36, 0, 0, 0, 254, 0, 0, 0, 0, 0,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0,
30, 31, 0, 32, 33, 34, 35, 0, 0, 0, 30, 31, 0, 32, 33, 34, 35, 0, 0, 0,
...@@ -1138,44 +1164,53 @@ static const yytype_int16 yytable[] = ...@@ -1138,44 +1164,53 @@ static const yytype_int16 yytable[] =
}; };
#define yypact_value_is_default(Yystate) \ #define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-270))) (!!((Yystate) == (-277)))
#define yytable_value_is_error(Yytable_value) \ #define yytable_value_is_error(Yytable_value) \
YYID (0) YYID (0)
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
0, 96, 104, 64, 80, 80, 95, 137, 46, 170, 0, 79, 46, 64, 98, 82, 87, 103, 0, 87,
9, 0, 0, 69, 283, 263, 40, 82, 267, 95, 167, 9, 69, 112, 0, 176, 278, 97, 40, 54,
95, 116, 161, 88, 64, 65, 54, 102, 103, 91, 97, 297, 81, 274, 83, 103, 82, 91, 72, 54,
54, 62, 63, 282, 72, 304, 49, 36, 37, 38, 124, 90, 54, 49, 296, 79, 88, 83, 36, 37,
93, 9, 95, 145, 119, 58, 46, 85, 104, 49, 38, 97, 58, 87, 320, 91, 46, 104, 144, 49,
82, 299, 83, 53, 92, 303, 87, 85, 58, 99, 94, 82, 151, 53, 110, 111, 91, 101, 58, 103,
100, 81, 88, 83, 53, 53, 36, 37, 36, 37, 85, 53, 143, 314, 54, 143, 144, 53, 319, 64,
90, 39, 72, 41, 204, 170, 9, 83, 180, 88, 65, 127, 72, 88, 83, 88, 91, 82, 91, 79,
169, 82, 91, 82, 90, 85, 86, 88, 54, 184, 9, 90, 176, 88, 82, 82, 82, 87, 88, 9,
82, 85, 92, 169, 169, 82, 88, 135, 83, 137, 83, 88, 88, 192, 94, 175, 36, 37, 175, 143,
202, 88, 85, 36, 37, 38, 193, 194, 195, 196, 144, 101, 196, 103, 99, 100, 88, 36, 37, 91,
88, 54, 214, 91, 189, 190, 191, 192, 193, 194, 39, 88, 41, 85, 91, 214, 36, 37, 38, 175,
195, 196, 197, 198, 199, 200, 201, 88, 91, 268, 216, 82, 279, 222, 93, 88, 95, 88, 91, 205,
91, 226, 227, 88, 54, 135, 91, 137, 82, 71, 206, 207, 208, 4, 5, 6, 85, 81, 216, 83,
72, 73, 231, 81, 305, 4, 5, 6, 80, 36, 234, 235, 54, 143, 144, 201, 202, 203, 204, 205,
37, 38, 81, 81, 83, 231, 231, 68, 90, 96, 206, 207, 208, 209, 210, 211, 212, 213, 85, 239,
97, 161, 66, 67, 70, 267, 204, 88, 89, 258, 321, 91, 239, 62, 63, 245, 54, 167, 245, 36,
191, 192, 197, 198, 84, 54, 91, 91, 81, 274, 37, 38, 216, 71, 72, 73, 40, 96, 97, 278,
282, 81, 258, 258, 91, 81, 83, 86, 81, 84, 66, 67, 80, 239, 83, 88, 89, 81, 87, 245,
292, 83, 46, 40, 85, 84, 84, 81, 88, 84, 209, 210, 90, 203, 204, 54, 290, 296, 82, 81,
302, 262, 84, 81, 204, 54, 3, 4, 5, 6, 278, 70, 68, 84, 91, 81, 91, 287, 307, 81,
305, 8, 9, 10, 11, 12, 82, 86, 91, 82, 287, 91, 273, 81, 84, 88, 216, 46, 296, 318,
220, 16, 90, 181, 91, 199, 201, 24, 25, 26, 83, 86, 83, 81, 81, 85, 54, 321, 228, 84,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 84, 287, 84, 84, 81, 91, 82, 86, 82, 84,
37, 200, 39, 40, 41, 42, 43, 44, 45, 92, 4, 5, 6, 16, 211, 193, 10, 11, 12, 90,
47, 48, 49, 50, 66, 73, 92, 54, 55, 56, 212, 91, 91, 213, 66, 73, 300, 94, 94, 45,
57, 58, 59, 263, 264, 62, 63, 267, 268, 45, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
5, 135, 220, 259, 264, 282, 303, -1, 53, -1, 34, 35, 5, 181, 274, 275, 246, 319, 278, 279,
264, -1, 282, -1, 81, -1, -1, -1, -1, -1, 44, 45, 228, 47, 48, 49, 50, 275, 275, 296,
-1, -1, -1, -1, -1, 92, 93, -1, 95, 299, 54, 55, 53, -1, -1, -1, 296, -1, -1, -1,
-1, -1, -1, 303, 3, 4, 5, 6, 7, 8, 300, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 314, 17, 18, 19, 20, 319,
-1, -1, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, -1, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, -1,
-1, -1, 54, 55, 56, 57, 58, 59, -1, -1,
62, 63, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
-1, -1, -1, 85, 86, -1, -1, -1, -1, 91,
92, 93, -1, 95, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, -1, 17, 18, 9, 10, 11, 12, 13, 14, 15, -1, 17, 18,
19, 20, -1, -1, -1, 24, 25, 26, 27, 28, 19, 20, -1, -1, -1, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, -1,
...@@ -1193,7 +1228,7 @@ static const yytype_int16 yycheck[] = ...@@ -1193,7 +1228,7 @@ static const yytype_int16 yycheck[] =
56, 57, 58, 59, -1, -1, 62, 63, -1, -1, 56, 57, 58, 59, -1, -1, 62, 63, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 81, -1, -1, -1, 85, -1, -1, -1, -1, -1, 81, -1, -1, -1, 85,
86, -1, -1, -1, -1, 91, 92, 93, -1, 95, -1, -1, -1, -1, -1, 91, 92, 93, -1, 95,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, -1, 17, 18, 19, 20, -1, -1, 13, 14, 15, -1, 17, 18, 19, 20, -1, -1,
-1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
...@@ -1211,78 +1246,86 @@ static const yytype_int16 yycheck[] = ...@@ -1211,78 +1246,86 @@ static const yytype_int16 yycheck[] =
50, -1, -1, -1, 54, 55, 56, 57, 58, 59, 50, -1, -1, -1, 54, 55, 56, 57, 58, 59,
-1, -1, 62, 63, -1, -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 81, -1, -1, -1, 85, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 91, 92, 93, -1, 95, 3, 4, 5, 6, -1, 91, 92, 93, -1, 95, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, -1, 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
17, 18, 19, 20, -1, -1, -1, 24, 25, 26, -1, -1, -1, -1, -1, -1, -1, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, -1, 39, 40, 41, 42, 43, 44, 45, 46, 37, -1, 39, 40, 41, 42, 43, 44, 45, -1,
47, 48, 49, 50, -1, -1, -1, 54, 55, 56, 47, 48, 49, 50, -1, -1, -1, 54, 55, 56,
57, 58, 59, -1, -1, 62, 63, -1, -1, -1, 57, 58, 59, -1, -1, 62, 63, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 81, -1, -1, -1, -1, -1, 3, 4, 5, 6, 81, 8, 9, 10, 11, 12,
-1, -1, -1, -1, 91, 92, 93, -1, 95, 3, -1, -1, -1, -1, 91, 92, 93, -1, 95, -1,
4, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, -1, 39, 40, 41, 42,
43, 44, 45, -1, 47, 48, 49, 50, -1, -1,
-1, 54, 55, 56, 57, 58, 59, -1, -1, 62,
63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 81, 10,
11, 12, -1, -1, -1, -1, -1, -1, -1, 92,
93, -1, 95, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
-1, -1, -1, 44, 45, -1, 47, 48, 49, 50,
-1, -1, -1, 54, 55, 56, 57, 58, 59, -1,
-1, 62, 63, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
81, -1, -1, 84, 10, 11, 12, -1, -1, -1,
-1, 92, 93, -1, 95, -1, -1, -1, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
-1, -1, -1, -1, -1, -1, -1, -1, 44, 45,
-1, 47, 48, 49, 50, -1, -1, -1, 54, 55,
56, 57, 58, 59, -1, -1, 62, 63, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 81, 10, 11, 12, -1,
-1, -1, -1, -1, -1, 91, 92, 93, -1, 95,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, -1, 39, 40, 41, 42, 43, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1,
44, 45, -1, 47, 48, 49, 50, -1, -1, -1, 44, 45, -1, 47, 48, 49, 50, -1, -1, -1,
54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 81, 10, 11, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1,
12, -1, -1, -1, -1, -1, -1, 91, 92, 93, 84, 10, 11, 12, -1, -1, -1, -1, 92, 93,
-1, 95, 24, 25, 26, 27, 28, 29, 30, 31, -1, 95, -1, -1, -1, 24, 25, 26, 27, 28,
32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1,
-1, -1, 44, 45, -1, 47, 48, 49, 50, -1, -1, -1, -1, -1, -1, 44, 45, -1, 47, 48,
-1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 49, 50, -1, -1, -1, 54, 55, 56, 57, 58,
62, 63, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, 63, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 84, 10, 11, 12, -1, -1, -1, -1, -1, -1, 81, 10, 11, 12, -1, -1, -1, -1,
92, 93, -1, 95, -1, -1, -1, 24, 25, 26, -1, -1, -1, 92, 93, -1, 95, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, -1, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1,
-1, -1, -1, -1, -1, -1, -1, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, -1,
47, 48, 49, 50, -1, -1, -1, 54, 55, 56, 47, 48, 49, 50, -1, -1, -1, 54, 55, 56,
57, 58, 59, -1, -1, 62, 63, -1, -1, -1, 57, 58, 59, -1, -1, 62, 63, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 81, 10, 11, 12, -1, -1, 3, 4, 5, 6, 81, 8, 9, 10, 11, 12,
-1, -1, -1, -1, 91, 92, 93, -1, 95, 24, -1, -1, -1, -1, -1, 92, 93, -1, 95, -1,
-1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, -1, 39, 40, 41, 42,
43, 44, 45, -1, 47, 48, 49, 50, 3, 4,
5, 6, 55, 8, 9, 10, 11, 12, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, -1, -1, -1, -1, -1, -1, -1, -1, 44, 35, 36, 37, 86, 39, 40, 41, 42, 43, 44,
45, -1, 47, 48, 49, 50, -1, -1, -1, 54, 45, -1, 47, 48, 49, 50, 3, 4, 5, 6,
55, 56, 57, 58, 59, -1, -1, 62, 63, -1, 55, 8, 9, 10, 11, 12, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25, 26,
-1, -1, -1, -1, -1, -1, 81, -1, -1, 84, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
10, 11, 12, -1, -1, -1, -1, 92, 93, -1, 37, 86, 39, 40, 41, 42, 43, 44, 45, -1,
95, -1, -1, -1, 24, 25, 26, 27, 28, 29, 47, 48, 49, 50, -1, -1, -1, -1, 55, -1,
30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 3,
-1, -1, -1, -1, 44, 45, -1, 47, 48, 49, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
50, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
-1, -1, 62, 63, -1, -1, -1, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, 35, 36, 37, -1, 39, 40, 41, 42, 43,
-1, 81, 10, 11, 12, -1, -1, -1, -1, -1, 44, 45, -1, 47, 48, 49, 50, -1, -1, -1,
-1, -1, 92, 93, -1, 95, 24, 25, 26, 27, -1, 55, 3, 4, 5, 6, 7, 8, 9, 10,
28, 29, 30, 31, 32, 33, 34, 35, -1, -1, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 44, 45, -1, 47, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30,
48, 49, 50, -1, -1, -1, 54, 55, 56, 57, 31, 32, 33, 34, 35, 36, 37, -1, 39, 40,
58, 59, -1, -1, 62, 63, -1, -1, -1, -1, 41, 42, 43, 44, 45, -1, 47, 48, 49, 50,
-1, -1, -1, -1, -1, -1, -1, -1, 4, 5, 3, 4, 5, 6, 55, 8, 9, 10, 11, 12,
6, -1, -1, 81, 10, 11, 12, -1, -1, -1,
-1, -1, -1, -1, 92, 93, -1, 95, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
-1, -1, -1, -1, -1, -1, -1, -1, 44, 45,
-1, 47, 48, 49, 50, 4, 5, 6, -1, 55,
-1, 10, 11, 12, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, -1, -1, -1,
86, -1, -1, -1, -1, 44, 45, -1, 47, 48,
49, 50, -1, -1, -1, -1, 55, -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, -1, -1, -1, 86, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, -1, 39, 40, 41, 42, 43, 44, 45,
-1, 47, 48, 49, 50, -1, -1, -1, -1, 55,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, -1, 39, 40, 41, 42, 33, 34, 35, 36, 37, -1, 39, 40, 41, 42,
...@@ -1310,35 +1353,37 @@ static const yytype_uint8 yystos[] = ...@@ -1310,35 +1353,37 @@ static const yytype_uint8 yystos[] =
0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 24, 25, 26, 27, 28, 29, 30, 31, 32, 12, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43,
44, 45, 47, 48, 49, 50, 55, 135, 136, 137, 44, 45, 47, 48, 49, 50, 55, 136, 137, 138,
138, 139, 144, 145, 146, 147, 149, 150, 151, 152, 139, 140, 145, 146, 147, 148, 150, 151, 152, 153,
153, 154, 155, 187, 188, 189, 40, 54, 152, 36, 154, 155, 156, 188, 189, 190, 40, 54, 153, 36,
37, 54, 85, 91, 190, 82, 88, 9, 36, 37, 37, 54, 85, 91, 191, 82, 88, 9, 36, 37,
38, 141, 142, 148, 88, 91, 54, 150, 151, 153, 38, 142, 143, 149, 88, 91, 54, 151, 54, 135,
83, 0, 188, 153, 85, 157, 85, 173, 141, 140, 152, 154, 83, 0, 189, 154, 85, 158, 85, 174,
143, 151, 142, 54, 81, 83, 90, 54, 56, 57, 142, 141, 144, 152, 143, 54, 81, 83, 90, 85,
58, 59, 62, 63, 81, 92, 93, 95, 106, 107, 3, 150, 152, 159, 160, 54, 56, 57, 58, 59,
108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 62, 63, 81, 92, 93, 95, 106, 107, 108, 110,
119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
129, 130, 134, 154, 91, 156, 151, 158, 159, 13, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
14, 15, 17, 18, 19, 20, 46, 85, 86, 91, 134, 155, 91, 157, 159, 13, 14, 15, 17, 18,
117, 130, 131, 133, 135, 136, 154, 163, 164, 165, 19, 20, 46, 85, 86, 91, 117, 130, 131, 133,
166, 174, 175, 176, 179, 186, 54, 140, 143, 83, 136, 137, 155, 164, 165, 166, 167, 175, 176, 177,
90, 84, 134, 131, 162, 117, 117, 133, 62, 63, 180, 187, 54, 141, 144, 83, 90, 84, 134, 131,
83, 87, 82, 82, 88, 45, 131, 81, 117, 96, 163, 152, 54, 161, 162, 86, 160, 117, 117, 133,
97, 93, 95, 64, 65, 99, 100, 66, 67, 68, 62, 63, 83, 87, 82, 82, 88, 45, 131, 81,
70, 69, 104, 84, 158, 54, 160, 161, 86, 159, 117, 96, 97, 93, 95, 64, 65, 99, 100, 66,
91, 91, 181, 81, 81, 91, 91, 133, 81, 86, 67, 68, 70, 69, 104, 84, 159, 86, 91, 91,
167, 71, 72, 73, 80, 90, 132, 88, 91, 86, 182, 81, 81, 91, 91, 133, 81, 86, 168, 71,
164, 83, 84, 134, 162, 84, 82, 109, 133, 54, 72, 73, 80, 90, 132, 88, 91, 86, 165, 83,
59, 112, 131, 117, 117, 119, 119, 121, 121, 121, 84, 134, 163, 84, 161, 83, 88, 91, 54, 91,
121, 122, 122, 126, 127, 128, 133, 86, 83, 88, 82, 109, 133, 54, 59, 112, 131, 117, 117, 119,
91, 170, 171, 172, 182, 133, 91, 180, 174, 131, 119, 121, 121, 121, 121, 122, 122, 126, 127, 128,
131, 134, 84, 84, 89, 134, 161, 46, 173, 165, 133, 86, 171, 172, 173, 183, 133, 91, 181, 175,
163, 175, 183, 82, 3, 133, 146, 178, 168, 84, 131, 131, 134, 84, 91, 134, 162, 83, 91, 84,
131, 84, 81, 178, 184, 185, 170, 177, 54, 82, 89, 46, 174, 166, 164, 176, 184, 82, 133, 147,
86, 133, 91, 82, 16, 90, 165, 169, 173, 82, 150, 179, 169, 84, 84, 134, 131, 81, 179, 185,
133, 169, 170, 162, 91 186, 171, 178, 54, 82, 86, 84, 133, 91, 82,
16, 90, 166, 170, 174, 91, 82, 133, 170, 171,
163, 91
}; };
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
...@@ -2964,6 +3009,15 @@ yyreduce: ...@@ -2964,6 +3009,15 @@ yyreduce:
case 71: case 71:
{ {
if (context->enterStructDeclaration((yyvsp[(1) - (2)].lex).line, *(yyvsp[(1) - (2)].lex).string))
context->recover();
(yyval.lex) = (yyvsp[(1) - (2)].lex);
}
break;
case 72:
{
TFunction &function = *((yyvsp[(1) - (2)].interm).function); TFunction &function = *((yyvsp[(1) - (2)].interm).function);
TIntermAggregate *prototype = new TIntermAggregate; TIntermAggregate *prototype = new TIntermAggregate;
...@@ -2992,7 +3046,7 @@ yyreduce: ...@@ -2992,7 +3046,7 @@ yyreduce:
} }
break; break;
case 72: case 73:
{ {
if ((yyvsp[(1) - (2)].interm).intermAggregate) if ((yyvsp[(1) - (2)].interm).intermAggregate)
...@@ -3001,7 +3055,7 @@ yyreduce: ...@@ -3001,7 +3055,7 @@ yyreduce:
} }
break; break;
case 73: case 74:
{ {
if (((yyvsp[(2) - (4)].interm.precision) == EbpHigh) && (context->shaderType == SH_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) { if (((yyvsp[(2) - (4)].interm.precision) == EbpHigh) && (context->shaderType == SH_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
...@@ -3016,7 +3070,31 @@ yyreduce: ...@@ -3016,7 +3070,31 @@ yyreduce:
} }
break; break;
case 74: case 75:
{
ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yyvsp[(1) - (5)].interm.type).line, "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.typeList), "", 0, NULL, 0);
}
break;
case 76:
{
ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yyvsp[(1) - (6)].interm.type).line, "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.typeList), *(yyvsp[(5) - (6)].lex).string, (yyvsp[(5) - (6)].lex).line, NULL, 0);
}
break;
case 77:
{
ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yyvsp[(1) - (9)].interm.type).line, "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yyvsp[(2) - (9)].lex).line, *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.typeList), *(yyvsp[(5) - (9)].lex).string, (yyvsp[(5) - (9)].lex).line, (yyvsp[(7) - (9)].interm.intermTypedNode), (yyvsp[(6) - (9)].lex).line);
}
break;
case 78:
{ {
// //
...@@ -3055,21 +3133,21 @@ yyreduce: ...@@ -3055,21 +3133,21 @@ yyreduce:
} }
break; break;
case 75: case 79:
{ {
(yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
} }
break; break;
case 76: case 80:
{ {
(yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
} }
break; break;
case 77: case 81:
{ {
// Add the parameter // Add the parameter
...@@ -3081,7 +3159,7 @@ yyreduce: ...@@ -3081,7 +3159,7 @@ yyreduce:
} }
break; break;
case 78: case 82:
{ {
// //
...@@ -3103,7 +3181,7 @@ yyreduce: ...@@ -3103,7 +3181,7 @@ yyreduce:
} }
break; break;
case 79: case 83:
{ {
if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) { if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
...@@ -3124,7 +3202,7 @@ yyreduce: ...@@ -3124,7 +3202,7 @@ yyreduce:
} }
break; break;
case 80: case 84:
{ {
if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) { if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
...@@ -3139,7 +3217,7 @@ yyreduce: ...@@ -3139,7 +3217,7 @@ yyreduce:
} }
break; break;
case 81: case 85:
{ {
// Check that we can make an array out of this type // Check that we can make an array out of this type
...@@ -3161,7 +3239,7 @@ yyreduce: ...@@ -3161,7 +3239,7 @@ yyreduce:
} }
break; break;
case 82: case 86:
{ {
(yyval.interm) = (yyvsp[(3) - (3)].interm); (yyval.interm) = (yyvsp[(3) - (3)].interm);
...@@ -3170,7 +3248,7 @@ yyreduce: ...@@ -3170,7 +3248,7 @@ yyreduce:
} }
break; break;
case 83: case 87:
{ {
(yyval.interm) = (yyvsp[(2) - (2)].interm); (yyval.interm) = (yyvsp[(2) - (2)].interm);
...@@ -3181,7 +3259,7 @@ yyreduce: ...@@ -3181,7 +3259,7 @@ yyreduce:
} }
break; break;
case 84: case 88:
{ {
(yyval.interm) = (yyvsp[(3) - (3)].interm); (yyval.interm) = (yyvsp[(3) - (3)].interm);
...@@ -3190,7 +3268,7 @@ yyreduce: ...@@ -3190,7 +3268,7 @@ yyreduce:
} }
break; break;
case 85: case 89:
{ {
(yyval.interm) = (yyvsp[(2) - (2)].interm); (yyval.interm) = (yyvsp[(2) - (2)].interm);
...@@ -3201,35 +3279,35 @@ yyreduce: ...@@ -3201,35 +3279,35 @@ yyreduce:
} }
break; break;
case 86: case 90:
{ {
(yyval.interm.qualifier) = EvqIn; (yyval.interm.qualifier) = EvqIn;
} }
break; break;
case 87: case 91:
{ {
(yyval.interm.qualifier) = EvqIn; (yyval.interm.qualifier) = EvqIn;
} }
break; break;
case 88: case 92:
{ {
(yyval.interm.qualifier) = EvqOut; (yyval.interm.qualifier) = EvqOut;
} }
break; break;
case 89: case 93:
{ {
(yyval.interm.qualifier) = EvqInOut; (yyval.interm.qualifier) = EvqInOut;
} }
break; break;
case 90: case 94:
{ {
TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
...@@ -3237,14 +3315,14 @@ yyreduce: ...@@ -3237,14 +3315,14 @@ yyreduce:
} }
break; break;
case 91: case 95:
{ {
(yyval.interm) = (yyvsp[(1) - (1)].interm); (yyval.interm) = (yyvsp[(1) - (1)].interm);
} }
break; break;
case 92: case 96:
{ {
if ((yyvsp[(1) - (3)].interm).type.type == EbtInvariant && !(yyvsp[(3) - (3)].lex).symbol) if ((yyvsp[(1) - (3)].interm).type.type == EbtInvariant && !(yyvsp[(3) - (3)].lex).symbol)
...@@ -3270,7 +3348,7 @@ yyreduce: ...@@ -3270,7 +3348,7 @@ yyreduce:
} }
break; break;
case 93: case 97:
{ {
if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type)) if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
...@@ -3292,7 +3370,7 @@ yyreduce: ...@@ -3292,7 +3370,7 @@ yyreduce:
} }
break; break;
case 94: case 98:
{ {
if (context->structQualifierErrorCheck((yyvsp[(3) - (6)].lex).line, (yyvsp[(1) - (6)].interm).type)) if (context->structQualifierErrorCheck((yyvsp[(3) - (6)].lex).line, (yyvsp[(1) - (6)].interm).type))
...@@ -3320,7 +3398,7 @@ yyreduce: ...@@ -3320,7 +3398,7 @@ yyreduce:
} }
break; break;
case 95: case 99:
{ {
if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type)) if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
...@@ -3344,7 +3422,7 @@ yyreduce: ...@@ -3344,7 +3422,7 @@ yyreduce:
} }
break; break;
case 96: case 100:
{ {
(yyval.interm).type = (yyvsp[(1) - (1)].interm.type); (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
...@@ -3352,7 +3430,7 @@ yyreduce: ...@@ -3352,7 +3430,7 @@ yyreduce:
} }
break; break;
case 97: case 101:
{ {
TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyvsp[(1) - (2)].interm.type)), (yyvsp[(2) - (2)].lex).line); TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyvsp[(1) - (2)].interm.type)), (yyvsp[(2) - (2)].lex).line);
...@@ -3374,7 +3452,7 @@ yyreduce: ...@@ -3374,7 +3452,7 @@ yyreduce:
} }
break; break;
case 98: case 102:
{ {
context->error((yyvsp[(2) - (4)].lex).line, "unsized array declarations not supported", (yyvsp[(2) - (4)].lex).string->c_str()); context->error((yyvsp[(2) - (4)].lex).line, "unsized array declarations not supported", (yyvsp[(2) - (4)].lex).string->c_str());
...@@ -3386,7 +3464,7 @@ yyreduce: ...@@ -3386,7 +3464,7 @@ yyreduce:
} }
break; break;
case 99: case 103:
{ {
TType type = TType((yyvsp[(1) - (5)].interm.type)); TType type = TType((yyvsp[(1) - (5)].interm.type));
...@@ -3422,7 +3500,7 @@ yyreduce: ...@@ -3422,7 +3500,7 @@ yyreduce:
} }
break; break;
case 100: case 104:
{ {
if (context->structQualifierErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type))) if (context->structQualifierErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
...@@ -3446,7 +3524,7 @@ yyreduce: ...@@ -3446,7 +3524,7 @@ yyreduce:
} }
break; break;
case 101: case 105:
{ {
VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line); VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line);
...@@ -3468,7 +3546,7 @@ yyreduce: ...@@ -3468,7 +3546,7 @@ yyreduce:
} }
break; break;
case 102: case 106:
{ {
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
...@@ -3481,7 +3559,7 @@ yyreduce: ...@@ -3481,7 +3559,7 @@ yyreduce:
} }
break; break;
case 103: case 107:
{ {
if ((yyvsp[(2) - (2)].interm.type).array) { if ((yyvsp[(2) - (2)].interm.type).array) {
...@@ -3505,7 +3583,7 @@ yyreduce: ...@@ -3505,7 +3583,7 @@ yyreduce:
} }
break; break;
case 104: case 108:
{ {
(yyval.interm.type).qualifier = EvqSmooth; (yyval.interm.type).qualifier = EvqSmooth;
...@@ -3513,7 +3591,7 @@ yyreduce: ...@@ -3513,7 +3591,7 @@ yyreduce:
} }
break; break;
case 105: case 109:
{ {
(yyval.interm.type).qualifier = EvqFlat; (yyval.interm.type).qualifier = EvqFlat;
...@@ -3521,14 +3599,14 @@ yyreduce: ...@@ -3521,14 +3599,14 @@ yyreduce:
} }
break; break;
case 106: case 110:
{ {
(yyval.interm.qualifier) = EvqConst; (yyval.interm.qualifier) = EvqConst;
} }
break; break;
case 107: case 111:
{ {
VERTEX_ONLY("attribute", (yyvsp[(1) - (1)].lex).line); VERTEX_ONLY("attribute", (yyvsp[(1) - (1)].lex).line);
...@@ -3539,7 +3617,7 @@ yyreduce: ...@@ -3539,7 +3617,7 @@ yyreduce:
} }
break; break;
case 108: case 112:
{ {
ES2_ONLY("varying", (yyvsp[(1) - (1)].lex).line); ES2_ONLY("varying", (yyvsp[(1) - (1)].lex).line);
...@@ -3552,7 +3630,7 @@ yyreduce: ...@@ -3552,7 +3630,7 @@ yyreduce:
} }
break; break;
case 109: case 113:
{ {
ES2_ONLY("varying", (yyvsp[(1) - (2)].lex).line); ES2_ONLY("varying", (yyvsp[(1) - (2)].lex).line);
...@@ -3565,14 +3643,14 @@ yyreduce: ...@@ -3565,14 +3643,14 @@ yyreduce:
} }
break; break;
case 110: case 114:
{ {
(yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yyvsp[(1) - (1)].interm.type).line); (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yyvsp[(1) - (1)].interm.type).line);
} }
break; break;
case 111: case 115:
{ {
if ((yyvsp[(2) - (2)].interm.type).qualifier == EvqSmoothIn) { if ((yyvsp[(2) - (2)].interm.type).qualifier == EvqSmoothIn) {
...@@ -3612,7 +3690,7 @@ yyreduce: ...@@ -3612,7 +3690,7 @@ yyreduce:
} }
break; break;
case 112: case 116:
{ {
context->error((yyvsp[(1) - (1)].interm.type).line, "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString((yyvsp[(1) - (1)].interm.type).qualifier)); context->error((yyvsp[(1) - (1)].interm.type).line, "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString((yyvsp[(1) - (1)].interm.type).qualifier));
...@@ -3623,7 +3701,7 @@ yyreduce: ...@@ -3623,7 +3701,7 @@ yyreduce:
} }
break; break;
case 113: case 117:
{ {
(yyval.interm.type).qualifier = EvqConst; (yyval.interm.type).qualifier = EvqConst;
...@@ -3631,43 +3709,43 @@ yyreduce: ...@@ -3631,43 +3709,43 @@ yyreduce:
} }
break; break;
case 114: case 118:
{ {
ES3_ONLY("in", (yyvsp[(1) - (1)].lex).line); ES3_ONLY("in", (yyvsp[(1) - (1)].lex).line, "storage qualifier");
(yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqSmoothIn : EvqAttribute; (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqSmoothIn : EvqAttribute;
(yyval.interm.type).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm.type).line = (yyvsp[(1) - (1)].lex).line;
} }
break; break;
case 115: case 119:
{ {
ES3_ONLY("out", (yyvsp[(1) - (1)].lex).line); ES3_ONLY("out", (yyvsp[(1) - (1)].lex).line, "storage qualifier");
(yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqSmoothOut; (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqSmoothOut;
(yyval.interm.type).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm.type).line = (yyvsp[(1) - (1)].lex).line;
} }
break; break;
case 116: case 120:
{ {
ES3_ONLY("centroid in", (yyvsp[(1) - (2)].lex).line); ES3_ONLY("centroid in", (yyvsp[(1) - (2)].lex).line, "storage qualifier");
(yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqAttribute; (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqCentroidIn : EvqAttribute;
(yyval.interm.type).line = (yyvsp[(1) - (2)].lex).line; (yyval.interm.type).line = (yyvsp[(1) - (2)].lex).line;
} }
break; break;
case 117: case 121:
{ {
ES3_ONLY("centroid out", (yyvsp[(1) - (2)].lex).line); ES3_ONLY("centroid out", (yyvsp[(1) - (2)].lex).line, "storage qualifier");
(yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqCentroidOut; (yyval.interm.type).qualifier = (context->shaderType == SH_FRAGMENT_SHADER) ? EvqFragColor : EvqCentroidOut;
(yyval.interm.type).line = (yyvsp[(1) - (2)].lex).line; (yyval.interm.type).line = (yyvsp[(1) - (2)].lex).line;
} }
break; break;
case 118: case 122:
{ {
if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "uniform")) if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "uniform"))
...@@ -3677,7 +3755,7 @@ yyreduce: ...@@ -3677,7 +3755,7 @@ yyreduce:
} }
break; break;
case 119: case 123:
{ {
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
...@@ -3691,7 +3769,7 @@ yyreduce: ...@@ -3691,7 +3769,7 @@ yyreduce:
} }
break; break;
case 120: case 124:
{ {
(yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
...@@ -3699,35 +3777,35 @@ yyreduce: ...@@ -3699,35 +3777,35 @@ yyreduce:
} }
break; break;
case 121: case 125:
{ {
(yyval.interm.precision) = EbpHigh; (yyval.interm.precision) = EbpHigh;
} }
break; break;
case 122: case 126:
{ {
(yyval.interm.precision) = EbpMedium; (yyval.interm.precision) = EbpMedium;
} }
break; break;
case 123: case 127:
{ {
(yyval.interm.precision) = EbpLow; (yyval.interm.precision) = EbpLow;
} }
break; break;
case 124: case 128:
{ {
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
} }
break; break;
case 125: case 129:
{ {
(yyval.interm.type) = (yyvsp[(1) - (4)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
...@@ -3743,7 +3821,7 @@ yyreduce: ...@@ -3743,7 +3821,7 @@ yyreduce:
} }
break; break;
case 126: case 130:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3751,7 +3829,7 @@ yyreduce: ...@@ -3751,7 +3829,7 @@ yyreduce:
} }
break; break;
case 127: case 131:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3759,7 +3837,7 @@ yyreduce: ...@@ -3759,7 +3837,7 @@ yyreduce:
} }
break; break;
case 128: case 132:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3767,7 +3845,7 @@ yyreduce: ...@@ -3767,7 +3845,7 @@ yyreduce:
} }
break; break;
case 129: case 133:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3775,7 +3853,7 @@ yyreduce: ...@@ -3775,7 +3853,7 @@ yyreduce:
} }
break; break;
case 130: case 134:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3784,7 +3862,7 @@ yyreduce: ...@@ -3784,7 +3862,7 @@ yyreduce:
} }
break; break;
case 131: case 135:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3793,7 +3871,7 @@ yyreduce: ...@@ -3793,7 +3871,7 @@ yyreduce:
} }
break; break;
case 132: case 136:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3802,7 +3880,7 @@ yyreduce: ...@@ -3802,7 +3880,7 @@ yyreduce:
} }
break; break;
case 133: case 137:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3811,7 +3889,7 @@ yyreduce: ...@@ -3811,7 +3889,7 @@ yyreduce:
} }
break; break;
case 134: case 138:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3820,7 +3898,7 @@ yyreduce: ...@@ -3820,7 +3898,7 @@ yyreduce:
} }
break; break;
case 135: case 139:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3829,7 +3907,7 @@ yyreduce: ...@@ -3829,7 +3907,7 @@ yyreduce:
} }
break; break;
case 136: case 140:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3838,7 +3916,7 @@ yyreduce: ...@@ -3838,7 +3916,7 @@ yyreduce:
} }
break; break;
case 137: case 141:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3847,7 +3925,7 @@ yyreduce: ...@@ -3847,7 +3925,7 @@ yyreduce:
} }
break; break;
case 138: case 142:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
...@@ -3856,7 +3934,7 @@ yyreduce: ...@@ -3856,7 +3934,7 @@ yyreduce:
} }
break; break;
case 139: case 143:
{ {
FRAG_VERT_ONLY("mat2", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("mat2", (yyvsp[(1) - (1)].lex).line);
...@@ -3866,7 +3944,7 @@ yyreduce: ...@@ -3866,7 +3944,7 @@ yyreduce:
} }
break; break;
case 140: case 144:
{ {
FRAG_VERT_ONLY("mat3", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("mat3", (yyvsp[(1) - (1)].lex).line);
...@@ -3876,7 +3954,7 @@ yyreduce: ...@@ -3876,7 +3954,7 @@ yyreduce:
} }
break; break;
case 141: case 145:
{ {
FRAG_VERT_ONLY("mat4", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("mat4", (yyvsp[(1) - (1)].lex).line);
...@@ -3886,7 +3964,7 @@ yyreduce: ...@@ -3886,7 +3964,7 @@ yyreduce:
} }
break; break;
case 142: case 146:
{ {
FRAG_VERT_ONLY("sampler2D", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("sampler2D", (yyvsp[(1) - (1)].lex).line);
...@@ -3895,7 +3973,7 @@ yyreduce: ...@@ -3895,7 +3973,7 @@ yyreduce:
} }
break; break;
case 143: case 147:
{ {
FRAG_VERT_ONLY("samplerCube", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("samplerCube", (yyvsp[(1) - (1)].lex).line);
...@@ -3904,7 +3982,7 @@ yyreduce: ...@@ -3904,7 +3982,7 @@ yyreduce:
} }
break; break;
case 144: case 148:
{ {
if (!context->supportsExtension("GL_OES_EGL_image_external")) { if (!context->supportsExtension("GL_OES_EGL_image_external")) {
...@@ -3917,7 +3995,7 @@ yyreduce: ...@@ -3917,7 +3995,7 @@ yyreduce:
} }
break; break;
case 145: case 149:
{ {
if (!context->supportsExtension("GL_ARB_texture_rectangle")) { if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
...@@ -3930,7 +4008,7 @@ yyreduce: ...@@ -3930,7 +4008,7 @@ yyreduce:
} }
break; break;
case 146: case 150:
{ {
FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line); FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line);
...@@ -3939,7 +4017,7 @@ yyreduce: ...@@ -3939,7 +4017,7 @@ yyreduce:
} }
break; break;
case 147: case 151:
{ {
// //
...@@ -3953,38 +4031,38 @@ yyreduce: ...@@ -3953,38 +4031,38 @@ yyreduce:
} }
break; break;
case 148: case 152:
{ if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); } { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
break; break;
case 149: case 153:
{ {
(yyval.interm.type) = context->addStructure((yyvsp[(1) - (6)].lex).line, (yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.typeList)); (yyval.interm.type) = context->addStructure((yyvsp[(1) - (6)].lex).line, (yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.typeList));
} }
break; break;
case 150: case 154:
{ if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); } { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
break; break;
case 151: case 155:
{ {
(yyval.interm.type) = context->addStructure((yyvsp[(1) - (5)].lex).line, 0, "", (yyvsp[(4) - (5)].interm.typeList)); (yyval.interm.type) = context->addStructure((yyvsp[(1) - (5)].lex).line, 0, "", (yyvsp[(4) - (5)].interm.typeList));
} }
break; break;
case 152: case 156:
{ {
(yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
} }
break; break;
case 153: case 157:
{ {
(yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList);
...@@ -4000,14 +4078,23 @@ yyreduce: ...@@ -4000,14 +4078,23 @@ yyreduce:
} }
break; break;
case 154: case 158:
{ {
(yyval.interm.typeList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.typeList)); (yyval.interm.typeList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.typeList));
} }
break; break;
case 155: case 159:
{
// ES3 Only, but errors should be handled elsewhere
(yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
(yyval.interm.typeList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.typeList));
}
break;
case 160:
{ {
(yyval.interm.typeList) = NewPoolTTypeList(); (yyval.interm.typeList) = NewPoolTTypeList();
...@@ -4015,14 +4102,14 @@ yyreduce: ...@@ -4015,14 +4102,14 @@ yyreduce:
} }
break; break;
case 156: case 161:
{ {
(yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
} }
break; break;
case 157: case 162:
{ {
if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string)) if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
...@@ -4034,7 +4121,7 @@ yyreduce: ...@@ -4034,7 +4121,7 @@ yyreduce:
} }
break; break;
case 158: case 163:
{ {
if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string)) if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string))
...@@ -4051,67 +4138,67 @@ yyreduce: ...@@ -4051,67 +4138,67 @@ yyreduce:
} }
break; break;
case 159: case 164:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
break; break;
case 160: case 165:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 161: case 166:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
break; break;
case 162: case 167:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 163: case 168:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 164: case 169:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 165: case 170:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 166: case 171:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 167: case 172:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 168: case 173:
{ (yyval.interm.intermAggregate) = 0; } { (yyval.interm.intermAggregate) = 0; }
break; break;
case 169: case 174:
{ context->symbolTable.push(); } { context->symbolTable.push(); }
break; break;
case 170: case 175:
{ context->symbolTable.pop(); } { context->symbolTable.pop(); }
break; break;
case 171: case 176:
{ {
if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) { if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
...@@ -4122,44 +4209,44 @@ yyreduce: ...@@ -4122,44 +4209,44 @@ yyreduce:
} }
break; break;
case 172: case 177:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 173: case 178:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
break; break;
case 174: case 179:
{ context->symbolTable.push(); } { context->symbolTable.push(); }
break; break;
case 175: case 180:
{ context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
break; break;
case 176: case 181:
{ context->symbolTable.push(); } { context->symbolTable.push(); }
break; break;
case 177: case 182:
{ context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
break; break;
case 178: case 183:
{ {
(yyval.interm.intermNode) = 0; (yyval.interm.intermNode) = 0;
} }
break; break;
case 179: case 184:
{ {
if ((yyvsp[(2) - (3)].interm.intermAggregate)) { if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
...@@ -4170,31 +4257,31 @@ yyreduce: ...@@ -4170,31 +4257,31 @@ yyreduce:
} }
break; break;
case 180: case 185:
{ {
(yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
} }
break; break;
case 181: case 186:
{ {
(yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
} }
break; break;
case 182: case 187:
{ (yyval.interm.intermNode) = 0; } { (yyval.interm.intermNode) = 0; }
break; break;
case 183: case 188:
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); } { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
break; break;
case 184: case 189:
{ {
if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
...@@ -4203,7 +4290,7 @@ yyreduce: ...@@ -4203,7 +4290,7 @@ yyreduce:
} }
break; break;
case 185: case 190:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
...@@ -4211,7 +4298,7 @@ yyreduce: ...@@ -4211,7 +4298,7 @@ yyreduce:
} }
break; break;
case 186: case 191:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
...@@ -4219,7 +4306,7 @@ yyreduce: ...@@ -4219,7 +4306,7 @@ yyreduce:
} }
break; break;
case 187: case 192:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
...@@ -4228,7 +4315,7 @@ yyreduce: ...@@ -4228,7 +4315,7 @@ yyreduce:
} }
break; break;
case 188: case 193:
{ {
TIntermNode* intermNode; TIntermNode* intermNode;
...@@ -4246,12 +4333,12 @@ yyreduce: ...@@ -4246,12 +4333,12 @@ yyreduce:
} }
break; break;
case 189: case 194:
{ context->symbolTable.push(); ++context->loopNestingLevel; } { context->symbolTable.push(); ++context->loopNestingLevel; }
break; break;
case 190: case 195:
{ {
context->symbolTable.pop(); context->symbolTable.pop();
...@@ -4260,12 +4347,12 @@ yyreduce: ...@@ -4260,12 +4347,12 @@ yyreduce:
} }
break; break;
case 191: case 196:
{ ++context->loopNestingLevel; } { ++context->loopNestingLevel; }
break; break;
case 192: case 197:
{ {
if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode)))
...@@ -4276,12 +4363,12 @@ yyreduce: ...@@ -4276,12 +4363,12 @@ yyreduce:
} }
break; break;
case 193: case 198:
{ context->symbolTable.push(); ++context->loopNestingLevel; } { context->symbolTable.push(); ++context->loopNestingLevel; }
break; break;
case 194: case 199:
{ {
context->symbolTable.pop(); context->symbolTable.pop();
...@@ -4290,35 +4377,35 @@ yyreduce: ...@@ -4290,35 +4377,35 @@ yyreduce:
} }
break; break;
case 195: case 200:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} }
break; break;
case 196: case 201:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} }
break; break;
case 197: case 202:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} }
break; break;
case 198: case 203:
{ {
(yyval.interm.intermTypedNode) = 0; (yyval.interm.intermTypedNode) = 0;
} }
break; break;
case 199: case 204:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
...@@ -4326,7 +4413,7 @@ yyreduce: ...@@ -4326,7 +4413,7 @@ yyreduce:
} }
break; break;
case 200: case 205:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
...@@ -4334,7 +4421,7 @@ yyreduce: ...@@ -4334,7 +4421,7 @@ yyreduce:
} }
break; break;
case 201: case 206:
{ {
if (context->loopNestingLevel <= 0) { if (context->loopNestingLevel <= 0) {
...@@ -4345,7 +4432,7 @@ yyreduce: ...@@ -4345,7 +4432,7 @@ yyreduce:
} }
break; break;
case 202: case 207:
{ {
if (context->loopNestingLevel <= 0) { if (context->loopNestingLevel <= 0) {
...@@ -4356,7 +4443,7 @@ yyreduce: ...@@ -4356,7 +4443,7 @@ yyreduce:
} }
break; break;
case 203: case 208:
{ {
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line);
...@@ -4367,7 +4454,7 @@ yyreduce: ...@@ -4367,7 +4454,7 @@ yyreduce:
} }
break; break;
case 204: case 209:
{ {
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line);
...@@ -4382,7 +4469,7 @@ yyreduce: ...@@ -4382,7 +4469,7 @@ yyreduce:
} }
break; break;
case 205: case 210:
{ {
FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line); FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
...@@ -4390,7 +4477,7 @@ yyreduce: ...@@ -4390,7 +4477,7 @@ yyreduce:
} }
break; break;
case 206: case 211:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
...@@ -4398,7 +4485,7 @@ yyreduce: ...@@ -4398,7 +4485,7 @@ yyreduce:
} }
break; break;
case 207: case 212:
{ {
(yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
...@@ -4406,21 +4493,21 @@ yyreduce: ...@@ -4406,21 +4493,21 @@ yyreduce:
} }
break; break;
case 208: case 213:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} }
break; break;
case 209: case 214:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} }
break; break;
case 210: case 215:
{ {
TFunction* function = (yyvsp[(1) - (1)].interm).function; TFunction* function = (yyvsp[(1) - (1)].interm).function;
...@@ -4509,7 +4596,7 @@ yyreduce: ...@@ -4509,7 +4596,7 @@ yyreduce:
} }
break; break;
case 211: case 216:
{ {
//?? Check that all paths return a value if return type != void ? //?? Check that all paths return a value if return type != void ?
......
...@@ -85,6 +85,7 @@ enum TOperator { ...@@ -85,6 +85,7 @@ enum TOperator {
EOpIndexDirect, EOpIndexDirect,
EOpIndexIndirect, EOpIndexIndirect,
EOpIndexDirectStruct, EOpIndexDirectStruct,
EOpIndexDirectInterfaceBlock,
EOpVectorSwizzle, EOpVectorSwizzle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment