Parse array specifier with a separate grammar rule
This brings the grammar closer to the GLSL ES 3.10 spec.
Some corner cases related to handling unsized arrays are fixed.
BUG=angleproject:2125
TEST=angle_unittests, angle_end2end_tests
Change-Id: I9bcf87b17b97da0e2ec2954d32037c272fde3080
Reviewed-on: https://chromium-review.googlesource.com/738233
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 390439d..8d47266 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -1030,13 +1030,13 @@
// Enforce non-initializer type/qualifier rules.
void TParseContext::checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line,
const TString &identifier,
- TPublicType *type)
+ TType *type)
{
ASSERT(type != nullptr);
- if (type->qualifier == EvqConst)
+ if (type->getQualifier() == EvqConst)
{
// Make the qualifier make sense.
- type->qualifier = EvqTemporary;
+ type->setQualifier(EvqTemporary);
// Generate informative error messages for ESSL1.
// In ESSL3 arrays and structures containing arrays can be constant.
@@ -1053,10 +1053,9 @@
}
return;
}
- if (type->isUnsizedArray())
- {
- error(line, "implicitly sized arrays need to be initialized", identifier.c_str());
- }
+ // This will make the type sized if it isn't sized yet.
+ checkIsNotUnsizedArray(line, "implicitly sized arrays need to be initialized",
+ identifier.c_str(), type);
}
// Do some simple checks that are shared between all variable declarations,
@@ -1253,10 +1252,9 @@
}
}
-void TParseContext::emptyDeclarationErrorCheck(const TPublicType &publicType,
- const TSourceLoc &location)
+void TParseContext::emptyDeclarationErrorCheck(const TType &type, const TSourceLoc &location)
{
- if (publicType.isUnsizedArray())
+ if (type.isUnsizedArray())
{
// ESSL3 spec section 4.1.9: Array declaration which leaves the size unspecified is an
// error. It is assumed that this applies to empty declarations as well.
@@ -1317,9 +1315,9 @@
{
// Valid uniform declarations can't be unsized arrays since uniforms can't be initialized.
// But invalid shaders may still reach here with an unsized array declaration.
- if (!publicType.isUnsizedArray())
+ TType type(publicType);
+ if (!type.isUnsizedArray())
{
- TType type(publicType);
checkUniformLocationInRange(identifierLocation, type.getLocationCount(),
publicType.layoutQualifier);
}
@@ -1805,7 +1803,7 @@
ASSERT(mGeometryShaderInputArraySize > 0u);
node = new TIntermSymbol(variable->getUniqueId(), variable->getName(), variableType);
- node->getTypePointer()->setArraySize(0, mGeometryShaderInputArraySize);
+ node->getTypePointer()->sizeOutermostUnsizedArray(mGeometryShaderInputArraySize);
}
else
{
@@ -1822,13 +1820,12 @@
// Returns true on success.
bool TParseContext::executeInitializer(const TSourceLoc &line,
const TString &identifier,
- const TPublicType &pType,
+ TType type,
TIntermTyped *initializer,
TIntermBinary **initNode)
{
ASSERT(initNode != nullptr);
ASSERT(*initNode == nullptr);
- TType type = TType(pType);
TVariable *variable = nullptr;
if (type.isUnsizedArray())
@@ -1943,7 +1940,8 @@
{
checkIsScalarBool(loc, pType);
TIntermBinary *initNode = nullptr;
- if (executeInitializer(loc, identifier, pType, initializer, &initNode))
+ TType type(pType);
+ if (executeInitializer(loc, identifier, type, initializer, &initNode))
{
// The initializer is valid. The init condition needs to have a node - either the
// initializer node, or a constant node in case the initialized variable is const and won't
@@ -2315,7 +2313,7 @@
TIntermSymbol *symbol = nullptr;
if (emptyDeclaration)
{
- emptyDeclarationErrorCheck(publicType, identifierOrTypeLocation);
+ emptyDeclarationErrorCheck(type, identifierOrTypeLocation);
// In most cases we don't need to create a symbol node for an empty declaration.
// But if the empty declaration is declaring a struct type, the symbol node will store that.
if (type.getBasicType() == EbtStruct)
@@ -2331,7 +2329,7 @@
{
nonEmptyDeclarationErrorCheck(publicType, identifierOrTypeLocation);
- checkCanBeDeclaredWithoutInitializer(identifierOrTypeLocation, identifier, &publicType);
+ checkCanBeDeclaredWithoutInitializer(identifierOrTypeLocation, identifier, &type);
if (IsAtomicCounter(publicType.getBasicType()))
{
@@ -2359,35 +2357,34 @@
return declaration;
}
-TIntermDeclaration *TParseContext::parseSingleArrayDeclaration(TPublicType &publicType,
+TIntermDeclaration *TParseContext::parseSingleArrayDeclaration(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression)
+ unsigned int arraySize)
{
mDeferredNonEmptyDeclarationErrorCheck = false;
- declarationQualifierErrorCheck(publicType.qualifier, publicType.layoutQualifier,
+ declarationQualifierErrorCheck(elementType.qualifier, elementType.layoutQualifier,
identifierLocation);
- nonEmptyDeclarationErrorCheck(publicType, identifierLocation);
+ nonEmptyDeclarationErrorCheck(elementType, identifierLocation);
- checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &publicType);
+ checkIsValidTypeAndQualifierForArray(indexLocation, elementType);
- checkIsValidTypeAndQualifierForArray(indexLocation, publicType);
+ TType arrayType(elementType);
+ arrayType.makeArray(arraySize);
- TType arrayType(publicType);
-
- if (indexExpression == nullptr)
+ if (IsGeometryShaderInput(mShaderType, elementType.qualifier))
{
- if (IsGeometryShaderInput(mShaderType, publicType.qualifier))
+ if (arrayType.isUnsizedArray())
{
// Set size for the unsized geometry shader inputs if they are declared after a valid
// input primitive declaration.
if (mGeometryShaderInputPrimitiveType != EptUndefined)
{
ASSERT(mGeometryShaderInputArraySize > 0u);
- arrayType.makeArray(mGeometryShaderInputArraySize);
+ arrayType.sizeOutermostUnsizedArray(mGeometryShaderInputArraySize);
}
else
{
@@ -2402,27 +2399,17 @@
}
else
{
- // Unsized array declarations are only allowed in declaring geometry shader inputs.
- error(indexLocation, "Invalid unsized array declaration", "");
+ setGeometryShaderInputArraySize(arrayType.getOutermostArraySize(), indexLocation);
}
}
- else
+
+ checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &arrayType);
+
+ if (IsAtomicCounter(elementType.getBasicType()))
{
- unsigned int size = checkIsValidArraySize(identifierLocation, indexExpression);
- if (IsGeometryShaderInput(mShaderType, publicType.qualifier))
- {
- setGeometryShaderInputArraySize(size, indexLocation);
- }
-
- // Make the type an array even if size check failed.
- // This ensures useless error messages regarding the variable's non-arrayness won't follow.
- arrayType.makeArray(size);
-
- if (IsAtomicCounter(publicType.getBasicType()))
- {
- checkAtomicCounterOffsetIsNotOverlapped(publicType, kAtomicCounterArrayStride * size,
- false, identifierLocation, arrayType);
- }
+ checkAtomicCounterOffsetIsNotOverlapped(
+ elementType, kAtomicCounterArrayStride * arrayType.getArraySizeProduct(), false,
+ identifierLocation, arrayType);
}
TVariable *variable = nullptr;
@@ -2458,7 +2445,8 @@
declaration->setLine(identifierLocation);
TIntermBinary *initNode = nullptr;
- if (executeInitializer(identifierLocation, identifier, publicType, initializer, &initNode))
+ TType type(publicType);
+ if (executeInitializer(identifierLocation, identifier, type, initializer, &initNode))
{
if (initNode)
{
@@ -2469,35 +2457,25 @@
}
TIntermDeclaration *TParseContext::parseSingleArrayInitDeclaration(
- TPublicType &publicType,
+ TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
const TSourceLoc &initLocation,
TIntermTyped *initializer)
{
mDeferredNonEmptyDeclarationErrorCheck = false;
- declarationQualifierErrorCheck(publicType.qualifier, publicType.layoutQualifier,
+ declarationQualifierErrorCheck(elementType.qualifier, elementType.layoutQualifier,
identifierLocation);
- nonEmptyDeclarationErrorCheck(publicType, identifierLocation);
+ nonEmptyDeclarationErrorCheck(elementType, identifierLocation);
- checkIsValidTypeAndQualifierForArray(indexLocation, publicType);
+ checkIsValidTypeAndQualifierForArray(indexLocation, elementType);
- TPublicType arrayType(publicType);
-
- unsigned int size = 0u;
- // If indexExpression is nullptr, then the array will eventually get its size implicitly from
- // the initializer.
- if (indexExpression != nullptr)
- {
- size = checkIsValidArraySize(identifierLocation, indexExpression);
- }
- // Make the type an array even if size check failed.
- // This ensures useless error messages regarding the variable's non-arrayness won't follow.
- arrayType.setArraySize(size);
+ TType arrayType(elementType);
+ arrayType.makeArray(arraySize);
TIntermDeclaration *declaration = new TIntermDeclaration();
declaration->setLine(identifierLocation);
@@ -2586,10 +2564,10 @@
checkDeclaratorLocationIsNotSpecified(identifierLocation, publicType);
- checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &publicType);
-
TVariable *variable = nullptr;
TType type(publicType);
+ checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &type);
+
if (IsAtomicCounter(publicType.getBasicType()))
{
checkAtomicCounterOffsetIsNotOverlapped(publicType, kAtomicCounterSize, true,
@@ -2605,35 +2583,35 @@
}
}
-void TParseContext::parseArrayDeclarator(TPublicType &publicType,
+void TParseContext::parseArrayDeclarator(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &arrayLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
TIntermDeclaration *declarationOut)
{
// If the declaration starting this declarator list was empty (example: int,), some checks were
// not performed.
if (mDeferredNonEmptyDeclarationErrorCheck)
{
- nonEmptyDeclarationErrorCheck(publicType, identifierLocation);
+ nonEmptyDeclarationErrorCheck(elementType, identifierLocation);
mDeferredNonEmptyDeclarationErrorCheck = false;
}
- checkDeclaratorLocationIsNotSpecified(identifierLocation, publicType);
+ checkDeclaratorLocationIsNotSpecified(identifierLocation, elementType);
- checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &publicType);
-
- if (checkIsValidTypeAndQualifierForArray(arrayLocation, publicType))
+ if (checkIsValidTypeAndQualifierForArray(arrayLocation, elementType))
{
- TType arrayType = TType(publicType);
- unsigned int size = checkIsValidArraySize(arrayLocation, indexExpression);
- arrayType.makeArray(size);
+ TType arrayType(elementType);
+ arrayType.makeArray(arraySize);
- if (IsAtomicCounter(publicType.getBasicType()))
+ checkCanBeDeclaredWithoutInitializer(identifierLocation, identifier, &arrayType);
+
+ if (IsAtomicCounter(elementType.getBasicType()))
{
- checkAtomicCounterOffsetIsNotOverlapped(publicType, kAtomicCounterArrayStride * size,
- true, identifierLocation, arrayType);
+ checkAtomicCounterOffsetIsNotOverlapped(
+ elementType, kAtomicCounterArrayStride * arrayType.getArraySizeProduct(), true,
+ identifierLocation, arrayType);
}
TVariable *variable = nullptr;
@@ -2667,7 +2645,8 @@
checkDeclaratorLocationIsNotSpecified(identifierLocation, publicType);
TIntermBinary *initNode = nullptr;
- if (executeInitializer(identifierLocation, identifier, publicType, initializer, &initNode))
+ TType type(publicType);
+ if (executeInitializer(identifierLocation, identifier, type, initializer, &initNode))
{
//
// build the intermediate representation
@@ -2679,11 +2658,11 @@
}
}
-void TParseContext::parseArrayInitDeclarator(const TPublicType &publicType,
+void TParseContext::parseArrayInitDeclarator(const TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
const TSourceLoc &initLocation,
TIntermTyped *initializer,
TIntermDeclaration *declarationOut)
@@ -2692,26 +2671,16 @@
// not performed.
if (mDeferredNonEmptyDeclarationErrorCheck)
{
- nonEmptyDeclarationErrorCheck(publicType, identifierLocation);
+ nonEmptyDeclarationErrorCheck(elementType, identifierLocation);
mDeferredNonEmptyDeclarationErrorCheck = false;
}
- checkDeclaratorLocationIsNotSpecified(identifierLocation, publicType);
+ checkDeclaratorLocationIsNotSpecified(identifierLocation, elementType);
- checkIsValidTypeAndQualifierForArray(indexLocation, publicType);
+ checkIsValidTypeAndQualifierForArray(indexLocation, elementType);
- TPublicType arrayType(publicType);
-
- unsigned int size = 0u;
- // If indexExpression is nullptr, then the array will eventually get its size implicitly from
- // the initializer.
- if (indexExpression != nullptr)
- {
- size = checkIsValidArraySize(identifierLocation, indexExpression);
- }
- // Make the type an array even if size check failed.
- // This ensures useless error messages regarding the variable's non-arrayness won't follow.
- arrayType.setArraySize(size);
+ TType arrayType(elementType);
+ arrayType.makeArray(arraySize);
// initNode will correspond to the whole of "b[n] = initializer".
TIntermBinary *initNode = nullptr;
@@ -3124,6 +3093,17 @@
error(location, "redefinition", param.name->c_str());
}
}
+ // Unsized type of a named parameter should have already been checked and sanitized.
+ ASSERT(!param.type->isUnsizedArray());
+ }
+ else
+ {
+ if (param.type->isUnsizedArray())
+ {
+ error(location, "function parameter array must be sized at compile time", "[]");
+ // We don't need to size the arrays since the parameter is unnamed and hence
+ // inaccessible.
+ }
}
if (!symbol)
{
@@ -3389,30 +3369,52 @@
return new TFunction(&symbolTable, nullptr, type, EOpConstruct);
}
-TParameter TParseContext::parseParameterDeclarator(const TPublicType &publicType,
+void TParseContext::checkIsNotUnsizedArray(const TSourceLoc &line,
+ const char *errorMessage,
+ const char *token,
+ TType *arrayType)
+{
+ if (arrayType->isUnsizedArray())
+ {
+ error(line, errorMessage, token);
+ arrayType->sizeUnsizedArrays(TVector<unsigned int>());
+ }
+}
+
+TParameter TParseContext::parseParameterDeclarator(TType *type,
const TString *name,
const TSourceLoc &nameLoc)
{
- if (publicType.getBasicType() == EbtVoid)
+ ASSERT(type);
+ checkIsNotUnsizedArray(nameLoc, "function parameter array must specify a size", name->c_str(),
+ type);
+ if (type->getBasicType() == EbtVoid)
{
error(nameLoc, "illegal use of type 'void'", name->c_str());
}
checkIsNotReserved(nameLoc, *name);
- TType *type = new TType(publicType);
TParameter param = {name, type};
return param;
}
-TParameter TParseContext::parseParameterArrayDeclarator(const TString *identifier,
- const TSourceLoc &identifierLoc,
- TIntermTyped *arraySize,
- const TSourceLoc &arrayLoc,
- TPublicType *type)
+TParameter TParseContext::parseParameterDeclarator(const TPublicType &publicType,
+ const TString *name,
+ const TSourceLoc &nameLoc)
{
- checkArrayElementIsNotArray(arrayLoc, *type);
- unsigned int size = checkIsValidArraySize(arrayLoc, arraySize);
- type->setArraySize(size);
- return parseParameterDeclarator(*type, identifier, identifierLoc);
+ TType *type = new TType(publicType);
+ return parseParameterDeclarator(type, name, nameLoc);
+}
+
+TParameter TParseContext::parseParameterArrayDeclarator(const TString *name,
+ const TSourceLoc &nameLoc,
+ unsigned int arraySize,
+ const TSourceLoc &arrayLoc,
+ TPublicType *elementType)
+{
+ checkArrayElementIsNotArray(arrayLoc, *elementType);
+ TType *arrayType = new TType(*elementType);
+ arrayType->makeArray(arraySize);
+ return parseParameterDeclarator(arrayType, name, nameLoc);
}
bool TParseContext::checkUnsizedArrayConstructorArgumentDimensionality(TIntermSequence *arguments,
@@ -4599,23 +4601,26 @@
checkWorkGroupSizeIsNotSpecified(typeSpecifier.getLine(), typeSpecifier.layoutQualifier);
- for (unsigned int i = 0; i < declaratorList->size(); ++i)
+ for (TField *declarator : *declaratorList)
{
- auto declaratorArraySizes = (*declaratorList)[i]->type()->getArraySizes();
+ auto declaratorArraySizes = declarator->type()->getArraySizes();
// don't allow arrays of arrays
if (!declaratorArraySizes.empty())
{
checkArrayElementIsNotArray(typeSpecifier.getLine(), typeSpecifier);
}
- TType *type = (*declaratorList)[i]->type();
+ TType *type = declarator->type();
*type = TType(typeSpecifier);
for (unsigned int arraySize : declaratorArraySizes)
{
type->makeArray(arraySize);
}
+ checkIsNotUnsizedArray(typeSpecifier.getLine(),
+ "array members of structs must specify a size",
+ declarator->name().c_str(), type);
- checkIsBelowStructNestingLimit(typeSpecifier.getLine(), *(*declaratorList)[i]);
+ checkIsBelowStructNestingLimit(typeSpecifier.getLine(), *declarator);
}
return declaratorList;
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 0694fbb..8d0b2ad 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -148,7 +148,7 @@
void nonEmptyDeclarationErrorCheck(const TPublicType &publicType,
const TSourceLoc &identifierLocation);
// Done only for empty declarations.
- void emptyDeclarationErrorCheck(const TPublicType &publicType, const TSourceLoc &location);
+ void emptyDeclarationErrorCheck(const TType &type, const TSourceLoc &location);
void checkLayoutQualifierSupported(const TSourceLoc &location,
const TString &layoutQualifierName,
@@ -180,7 +180,7 @@
// is not needed in the AST.
bool executeInitializer(const TSourceLoc &line,
const TString &identifier,
- const TPublicType &pType,
+ TType type,
TIntermTyped *initializer,
TIntermBinary **initNode);
TIntermNode *addConditionInitializer(const TPublicType &pType,
@@ -205,11 +205,11 @@
TIntermDeclaration *parseSingleDeclaration(TPublicType &publicType,
const TSourceLoc &identifierOrTypeLocation,
const TString &identifier);
- TIntermDeclaration *parseSingleArrayDeclaration(TPublicType &publicType,
+ TIntermDeclaration *parseSingleArrayDeclaration(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression);
+ unsigned int arraySize);
TIntermDeclaration *parseSingleInitDeclaration(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
const TString &identifier,
@@ -218,11 +218,11 @@
// Parse a declaration like "type a[n] = initializer"
// Note that this does not apply to declarations like "type[n] a = initializer"
- TIntermDeclaration *parseSingleArrayInitDeclaration(TPublicType &publicType,
+ TIntermDeclaration *parseSingleArrayInitDeclaration(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
const TSourceLoc &initLocation,
TIntermTyped *initializer);
@@ -236,11 +236,11 @@
const TSourceLoc &identifierLocation,
const TString &identifier,
TIntermDeclaration *declarationOut);
- void parseArrayDeclarator(TPublicType &publicType,
+ void parseArrayDeclarator(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &arrayLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
TIntermDeclaration *declarationOut);
void parseInitDeclarator(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
@@ -250,11 +250,11 @@
TIntermDeclaration *declarationOut);
// Parse a declarator like "a[n] = initializer"
- void parseArrayInitDeclarator(const TPublicType &publicType,
+ void parseArrayInitDeclarator(const TPublicType &elementType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
- TIntermTyped *indexExpression,
+ unsigned int arraySize,
const TSourceLoc &initLocation,
TIntermTyped *initializer,
TIntermDeclaration *declarationOut);
@@ -281,11 +281,12 @@
TParameter parseParameterDeclarator(const TPublicType &publicType,
const TString *name,
const TSourceLoc &nameLoc);
- TParameter parseParameterArrayDeclarator(const TString *identifier,
- const TSourceLoc &identifierLoc,
- TIntermTyped *arraySize,
+
+ TParameter parseParameterArrayDeclarator(const TString *name,
+ const TSourceLoc &nameLoc,
+ unsigned int arraySize,
const TSourceLoc &arrayLoc,
- TPublicType *type);
+ TPublicType *elementType);
TIntermTyped *addIndexExpression(TIntermTyped *baseExpression,
const TSourceLoc &location,
@@ -453,7 +454,11 @@
void checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line,
const TString &identifier,
- TPublicType *type);
+ TType *type);
+
+ TParameter parseParameterDeclarator(TType *type,
+ const TString *name,
+ const TSourceLoc &nameLoc);
bool checkIsValidTypeAndQualifierForArray(const TSourceLoc &indexLocation,
const TPublicType &elementType);
@@ -502,6 +507,13 @@
TType type,
const TSourceLoc &line);
+ // Will size any unsized array type so unsized arrays won't need to be taken into account
+ // further along the line in parsing.
+ void checkIsNotUnsizedArray(const TSourceLoc &line,
+ const char *errorMessage,
+ const char *token,
+ TType *arrayType);
+
TIntermTyped *addBinaryMathInternal(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
diff --git a/src/compiler/translator/Types.cpp b/src/compiler/translator/Types.cpp
index c20e335..a525f58 100644
--- a/src/compiler/translator/Types.cpp
+++ b/src/compiler/translator/Types.cpp
@@ -577,6 +577,12 @@
invalidateMangledName();
}
+void TType::sizeOutermostUnsizedArray(unsigned int arraySize)
+{
+ ASSERT(isArray());
+ mArraySizes.back() = arraySize;
+}
+
TStructure::TStructure(TSymbolTable *symbolTable, const TString *name, TFieldList *fields)
: TFieldListCollection(name, fields),
mDeepestNesting(0),
diff --git a/src/compiler/translator/Types.h b/src/compiler/translator/Types.h
index d90e926..d1a88d0 100644
--- a/src/compiler/translator/Types.h
+++ b/src/compiler/translator/Types.h
@@ -349,6 +349,9 @@
// than there are sizes in arraySizes, defaults to setting array sizes to 1.
void sizeUnsizedArrays(const TVector<unsigned int> &arraySizes);
+ // Will size the outermost array according to arraySize.
+ void sizeOutermostUnsizedArray(unsigned int arraySize);
+
// Note that the array element type might still be an array type in GLSL ES version >= 3.10.
void toArrayElementType()
{
@@ -636,7 +639,6 @@
return typeSpecifierNonArray.userDef->containsType(t);
}
- bool isUnsizedArray() const { return array && arraySize == 0; }
void setArraySize(int s)
{
array = true;
diff --git a/src/compiler/translator/glslang.y b/src/compiler/translator/glslang.y
index 5f897f9..ba7d881 100644
--- a/src/compiler/translator/glslang.y
+++ b/src/compiler/translator/glslang.y
@@ -86,6 +86,7 @@
TIntermCase *intermCase;
};
union {
+ unsigned int arraySize;
TTypeSpecifierNonArray typeSpecifierNonArray;
TPublicType type;
TPrecision precision;
@@ -218,6 +219,8 @@
%type <interm.param> parameter_declaration parameter_declarator parameter_type_specifier
%type <interm.layoutQualifier> layout_qualifier_id_list layout_qualifier_id
+%type <interm.arraySize> array_specifier
+
%type <interm.type> fully_specified_type type_specifier
%type <interm.precision> precision_qualifier
@@ -681,8 +684,8 @@
: type_specifier identifier {
$$ = context->parseParameterDeclarator($1, $2.string, @2);
}
- | type_specifier identifier LEFT_BRACKET constant_expression RIGHT_BRACKET {
- $$ = context->parseParameterArrayDeclarator($2.string, @2, $4, @3, &$1);
+ | type_specifier identifier array_specifier {
+ $$ = context->parseParameterArrayDeclarator($2.string, @2, $3, @3, &$1);
}
;
@@ -720,19 +723,14 @@
$$ = $1;
context->parseDeclarator($$.type, @3, *$3.string, $$.intermDeclaration);
}
- | init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET {
+ | init_declarator_list COMMA identifier array_specifier {
$$ = $1;
- context->parseArrayDeclarator($$.type, @3, *$3.string, @4, $5, $$.intermDeclaration);
+ context->parseArrayDeclarator($$.type, @3, *$3.string, @4, $4, $$.intermDeclaration);
}
- | init_declarator_list COMMA identifier LEFT_BRACKET RIGHT_BRACKET EQUAL initializer {
- ES3_OR_NEWER("[]", @3, "implicitly sized array");
+ | init_declarator_list COMMA identifier array_specifier EQUAL initializer {
+ ES3_OR_NEWER("=", @5, "first-class arrays (array initializer)");
$$ = $1;
- context->parseArrayInitDeclarator($$.type, @3, *$3.string, @4, nullptr, @6, $7, $$.intermDeclaration);
- }
- | init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer {
- ES3_OR_NEWER("=", @7, "first-class arrays (array initializer)");
- $$ = $1;
- context->parseArrayInitDeclarator($$.type, @3, *$3.string, @4, $5, @7, $8, $$.intermDeclaration);
+ context->parseArrayInitDeclarator($$.type, @3, *$3.string, @4, $4, @5, $6, $$.intermDeclaration);
}
| init_declarator_list COMMA identifier EQUAL initializer {
$$ = $1;
@@ -749,24 +747,14 @@
$$.type = $1;
$$.intermDeclaration = context->parseSingleDeclaration($$.type, @2, *$2.string);
}
- | fully_specified_type identifier LEFT_BRACKET RIGHT_BRACKET {
- ES3_1_ONLY("[]", @3, "implicitly sized array declaration");
+ | fully_specified_type identifier array_specifier {
$$.type = $1;
- $$.intermDeclaration = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, nullptr);
+ $$.intermDeclaration = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, $3);
}
- | fully_specified_type identifier LEFT_BRACKET constant_expression RIGHT_BRACKET {
+ | fully_specified_type identifier array_specifier EQUAL initializer {
+ ES3_OR_NEWER("[]", @3, "first-class arrays (array initializer)");
$$.type = $1;
- $$.intermDeclaration = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, $4);
- }
- | fully_specified_type identifier LEFT_BRACKET RIGHT_BRACKET EQUAL initializer {
- ES3_OR_NEWER("[]", @3, "implicitly sized array");
- $$.type = $1;
- $$.intermDeclaration = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, nullptr, @5, $6);
- }
- | fully_specified_type identifier LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer {
- ES3_OR_NEWER("=", @6, "first-class arrays (array initializer)");
- $$.type = $1;
- $$.intermDeclaration = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, $4, @6, $7);
+ $$.intermDeclaration = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, $3, @4, $5);
}
| fully_specified_type identifier EQUAL initializer {
$$.type = $1;
@@ -941,15 +929,22 @@
: type_specifier_nonarray {
$$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
}
- | type_specifier_nonarray LEFT_BRACKET RIGHT_BRACKET {
- ES3_OR_NEWER("[]", @2, "implicitly sized array");
+ | type_specifier_nonarray array_specifier {
$$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
- $$.setArraySize(0);
+ $$.setArraySize($2);
}
- | type_specifier_nonarray LEFT_BRACKET constant_expression RIGHT_BRACKET {
- $$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
- unsigned int size = context->checkIsValidArraySize(@2, $3);
- $$.setArraySize(size);
+ ;
+
+array_specifier
+ : LEFT_BRACKET RIGHT_BRACKET {
+ ES3_OR_NEWER("[]", @1, "implicitly sized array");
+ $$ = 0u;
+ }
+ | LEFT_BRACKET constant_expression RIGHT_BRACKET {
+ unsigned int size = context->checkIsValidArraySize(@1, $2);
+ // Make the type an array even if size check failed.
+ // This ensures useless error messages regarding a variable's non-arrayness won't follow.
+ $$ = size;
}
;
diff --git a/src/compiler/translator/glslang_tab.cpp b/src/compiler/translator/glslang_tab.cpp
index 1a8d22a..764fd8a 100644
--- a/src/compiler/translator/glslang_tab.cpp
+++ b/src/compiler/translator/glslang_tab.cpp
@@ -327,6 +327,7 @@
TIntermCase *intermCase;
};
union {
+ unsigned int arraySize;
TTypeSpecifierNonArray typeSpecifierNonArray;
TPublicType type;
TPrecision precision;
@@ -669,18 +670,18 @@
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 134
+#define YYFINAL 135
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 3031
+#define YYLAST 2771
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 154
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 94
+#define YYNNTS 95
/* YYNRULES -- Number of rules. */
-#define YYNRULES 297
+#define YYNRULES 295
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 432
+#define YYNSTATES 421
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
@@ -741,36 +742,36 @@
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 244, 244, 245, 248, 258, 261, 266, 271, 276,
- 281, 289, 295, 298, 301, 304, 307, 310, 316, 323,
- 329, 333, 341, 344, 350, 354, 361, 366, 373, 381,
- 384, 387, 393, 396, 399, 402, 409, 410, 411, 412,
- 420, 421, 424, 427, 434, 435, 438, 444, 445, 449,
- 456, 457, 460, 463, 466, 472, 473, 476, 482, 483,
- 490, 491, 498, 499, 506, 507, 513, 514, 520, 521,
- 527, 528, 534, 535, 541, 542, 543, 544, 548, 549,
- 550, 554, 558, 562, 566, 573, 576, 582, 589, 596,
- 599, 602, 606, 610, 614, 618, 622, 629, 636, 639,
- 646, 654, 671, 681, 684, 690, 694, 698, 702, 709,
- 716, 719, 723, 727, 732, 737, 744, 748, 752, 757,
- 761, 766, 771, 778, 782, 788, 791, 797, 801, 808,
- 814, 818, 822, 825, 828, 837, 842, 846, 849, 852,
- 855, 858, 862, 865, 869, 872, 875, 878, 881, 884,
- 891, 898, 901, 904, 910, 917, 920, 926, 929, 932,
- 935, 941, 944, 949, 957, 960, 963, 966, 969, 972,
- 976, 980, 984, 988, 992, 996, 1000, 1004, 1008, 1012,
- 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, 1048, 1052,
- 1056, 1062, 1065, 1068, 1071, 1074, 1077, 1080, 1083, 1086,
- 1089, 1092, 1095, 1098, 1101, 1104, 1107, 1110, 1113, 1116,
- 1123, 1129, 1135, 1138, 1141, 1144, 1147, 1150, 1153, 1156,
- 1159, 1162, 1165, 1168, 1171, 1174, 1177, 1185, 1185, 1188,
- 1188, 1194, 1197, 1203, 1206, 1213, 1217, 1223, 1226, 1232,
- 1236, 1240, 1241, 1247, 1248, 1249, 1250, 1251, 1252, 1253,
- 1257, 1261, 1261, 1261, 1268, 1269, 1273, 1273, 1274, 1274,
- 1279, 1283, 1290, 1294, 1301, 1302, 1306, 1312, 1316, 1325,
- 1325, 1332, 1335, 1341, 1345, 1351, 1351, 1356, 1356, 1360,
- 1360, 1368, 1371, 1377, 1380, 1386, 1390, 1397, 1400, 1403,
- 1406, 1409, 1417, 1423, 1429, 1432, 1438, 1438
+ 0, 247, 247, 248, 251, 261, 264, 269, 274, 279,
+ 284, 292, 298, 301, 304, 307, 310, 313, 319, 326,
+ 332, 336, 344, 347, 353, 357, 364, 369, 376, 384,
+ 387, 390, 396, 399, 402, 405, 412, 413, 414, 415,
+ 423, 424, 427, 430, 437, 438, 441, 447, 448, 452,
+ 459, 460, 463, 466, 469, 475, 476, 479, 485, 486,
+ 493, 494, 501, 502, 509, 510, 516, 517, 523, 524,
+ 530, 531, 537, 538, 544, 545, 546, 547, 551, 552,
+ 553, 557, 561, 565, 569, 576, 579, 585, 592, 599,
+ 602, 605, 609, 613, 617, 621, 625, 632, 639, 642,
+ 649, 657, 674, 684, 687, 693, 697, 701, 705, 712,
+ 719, 722, 726, 730, 735, 742, 746, 750, 754, 759,
+ 766, 770, 776, 779, 785, 789, 796, 802, 806, 810,
+ 813, 816, 825, 830, 834, 837, 840, 843, 846, 850,
+ 853, 857, 860, 863, 866, 869, 872, 879, 886, 889,
+ 892, 898, 905, 908, 914, 917, 920, 923, 929, 932,
+ 939, 943, 952, 955, 958, 961, 964, 967, 971, 975,
+ 979, 983, 987, 991, 995, 999, 1003, 1007, 1011, 1015,
+ 1019, 1023, 1027, 1031, 1035, 1039, 1043, 1047, 1051, 1057,
+ 1060, 1063, 1066, 1069, 1072, 1075, 1078, 1081, 1084, 1087,
+ 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1111, 1118, 1124,
+ 1130, 1133, 1136, 1139, 1142, 1145, 1148, 1151, 1154, 1157,
+ 1160, 1163, 1166, 1169, 1172, 1180, 1180, 1183, 1183, 1189,
+ 1192, 1198, 1201, 1208, 1212, 1218, 1221, 1227, 1231, 1235,
+ 1236, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1252, 1256,
+ 1256, 1256, 1263, 1264, 1268, 1268, 1269, 1269, 1274, 1278,
+ 1285, 1289, 1296, 1297, 1301, 1307, 1311, 1320, 1320, 1327,
+ 1330, 1336, 1340, 1346, 1346, 1351, 1351, 1355, 1355, 1363,
+ 1366, 1372, 1375, 1381, 1385, 1392, 1395, 1398, 1401, 1404,
+ 1412, 1418, 1424, 1427, 1433, 1433
};
#endif
@@ -828,10 +829,10 @@
"invariant_qualifier", "single_type_qualifier", "storage_qualifier",
"type_specifier", "precision_qualifier", "layout_qualifier",
"layout_qualifier_id_list", "layout_qualifier_id",
- "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
- "$@1", "$@2", "struct_declaration_list", "struct_declaration",
- "struct_declarator_list", "struct_declarator", "initializer",
- "declaration_statement", "statement", "simple_statement",
+ "type_specifier_no_prec", "array_specifier", "type_specifier_nonarray",
+ "struct_specifier", "$@1", "$@2", "struct_declaration_list",
+ "struct_declaration", "struct_declarator_list", "struct_declarator",
+ "initializer", "declaration_statement", "statement", "simple_statement",
"compound_statement_with_scope", "$@3", "$@4", "statement_no_new_scope",
"statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
"statement_list", "expression_statement", "selection_statement",
@@ -867,12 +868,12 @@
};
# endif
-#define YYPACT_NINF -369
+#define YYPACT_NINF -359
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-369)))
+ (!!((Yystate) == (-359)))
-#define YYTABLE_NINF -257
+#define YYTABLE_NINF -255
#define yytable_value_is_error(Yytable_value) \
0
@@ -881,50 +882,49 @@
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 2639, -369, -369, -369, -369, 80, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -75, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -109, -369, -369, -369, -105, -79,
- -66, 2740, -73, -369, -8, -369, 1373, -369, -369, -369,
- -369, -369, -369, -369, -27, -369, 2538, -369, -369, 2928,
- -369, -369, -369, -31, -45, -369, -18, -369, 2740, -369,
- -369, -369, 2740, 8, 8, -369, -1, -93, -100, -369,
- 2740, -369, -369, 1468, -369, -369, -96, 2740, -369, -369,
- 1, -59, -369, 417, -369, -369, -369, -369, 10, -76,
- -369, 1592, 1961, -369, -369, 2740, 8, 2205, -369, -369,
- 3, -369, -369, -369, -369, -369, 1961, 1961, 1961, -369,
- -369, -369, -369, -369, -369, -369, -74, -369, -369, -369,
- 23, -57, 2082, 26, -369, 1961, 24, -52, 36, -88,
- 33, 6, 30, 34, 57, 69, -99, -369, 56, -369,
- -369, 2316, 2740, 46, -369, -45, 50, 51, -369, 64,
- 65, 59, 1716, 66, 1961, 67, 73, 72, -369, -369,
- 39, -369, -369, -33, -369, -105, 78, -369, -369, -369,
- -369, 559, -369, -369, -369, -369, -369, -369, 1961, 1837,
- 1961, 70, 77, -369, -369, 8, 79, -6, -369, -85,
- -369, -369, -369, -50, -369, -369, 1961, 2834, -369, -369,
- 1961, 81, -369, -369, -369, 1961, 1961, 1961, 1961, 1961,
- 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
- 1961, 1961, 1961, 1961, 1961, -369, -369, 2427, -369, -369,
- -369, -369, -369, 82, -369, 1961, -369, -369, -2, 1961,
- 76, -369, -369, -369, 701, -369, -369, -369, -369, -369,
- -369, -369, -369, -369, -369, -369, 1961, 1961, -369, -369,
- -369, 84, 83, 85, -369, 1961, 86, 4, 1961, 8,
- -369, -110, -369, -369, 88, 87, -369, 93, -369, -369,
- -369, -369, -369, 24, 24, -52, -52, 36, 36, 36,
- 36, -88, -88, 33, 6, 30, 34, 57, 69, 35,
- -369, 152, -18, 985, 1127, -49, -369, -48, -369, 1250,
- 701, -369, -369, -369, 1961, 89, -369, 1961, -369, 96,
- -369, 1961, -369, -369, 1961, 100, -369, -369, -369, -369,
- 1250, 82, -369, 87, 8, 2740, 95, 97, -369, 1961,
- -369, -369, 102, -369, 1961, -369, 99, 105, 216, -369,
- 108, 104, 843, -369, -369, 106, -29, 1961, 843, 82,
- -369, 1961, -369, -369, -369, -369, 107, 87, -369, -369,
- -369, -369
+ 2379, -359, -359, -359, -359, 56, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -66, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -100, -359, -359, -359, -115, -57,
+ -91, 2480, -65, -359, -64, -359, 1361, -359, -359, -359,
+ -359, -359, -359, -359, -53, -359, 2278, -359, -359, 2668,
+ -359, -359, -359, -31, -43, -359, 7, -359, 2480, -359,
+ -359, -359, 2480, 17, 17, -359, 9, -69, -41, -359,
+ 2480, -359, -359, 1456, -359, -359, -359, 3, 2480, -359,
+ -359, 28, -33, -359, 405, -359, -359, -359, -359, -53,
+ -37, -359, 1701, 32, -359, -359, 2480, 17, 1945, -359,
+ -359, 27, -359, -359, -359, -359, -359, 1701, 1701, 1701,
+ -359, -359, -359, -359, -359, -359, -359, -88, -359, -359,
+ -359, 21, -26, 1822, 31, -359, 1701, 23, -32, 66,
+ -93, 16, 34, 38, 15, 73, 64, -96, -359, 58,
+ -359, -359, 2056, 2480, 72, -359, -43, 52, 53, -359,
+ 67, 69, 61, 1580, 94, 1701, 87, 96, 92, -359,
+ -359, -39, -359, -359, 13, -359, -115, 98, -359, -359,
+ -359, -359, 547, -359, -359, -359, -359, -359, -359, -359,
+ 1701, 57, -359, -359, 1701, 17, 97, 14, -359, -86,
+ -359, -359, -359, -4, -359, -359, 1701, 2574, -359, -359,
+ 1701, 99, -359, -359, -359, 1701, 1701, 1701, 1701, 1701,
+ 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701,
+ 1701, 1701, 1701, 1701, 1701, -359, -359, 2167, -359, -359,
+ -359, -359, -359, 101, -359, 1701, -359, -359, 22, 1701,
+ 95, -359, -359, -359, 689, -359, -359, -359, -359, -359,
+ -359, -359, -359, -359, -359, -359, 1701, 1701, -359, -359,
+ -359, -359, 1701, -359, 26, 1701, 17, -359, -105, -359,
+ -359, 103, 100, -359, 108, -359, -359, -359, -359, -359,
+ 23, 23, -32, -32, 66, 66, 66, 66, -93, -93,
+ 16, 34, 38, 15, 73, 64, 44, -359, 176, 7,
+ 973, 1115, -3, -359, -2, -359, 1238, 689, -359, -359,
+ -359, -359, 107, -359, 1701, -359, -359, 1701, 111, -359,
+ -359, -359, -359, 1238, 101, -359, 100, 17, 2480, 112,
+ 109, -359, 114, -359, 1701, -359, 102, 118, 228, -359,
+ 116, 113, 831, -359, 115, 5, 1701, 831, 101, -359,
+ 1701, -359, -359, -359, -359, 117, 100, -359, -359, -359,
+ -359
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -932,80 +932,79 @@
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 129, 151, 152, 153, 0, 135, 137, 168, 165,
- 166, 167, 172, 173, 174, 175, 176, 177, 169, 170,
- 171, 178, 179, 180, 181, 182, 183, 138, 139, 140,
- 142, 143, 136, 184, 185, 186, 187, 188, 189, 141,
- 126, 125, 144, 145, 146, 147, 148, 149, 0, 164,
- 191, 193, 209, 211, 194, 196, 197, 198, 199, 201,
- 202, 203, 204, 195, 200, 205, 192, 206, 207, 208,
- 210, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 0, 190, 226, 295, 296, 0,
- 99, 98, 0, 110, 116, 133, 0, 134, 127, 130,
- 123, 132, 131, 150, 161, 212, 0, 292, 294, 0,
- 2, 3, 229, 0, 0, 89, 0, 97, 0, 106,
- 100, 108, 0, 109, 0, 90, 2, 117, 0, 95,
- 0, 128, 124, 0, 1, 293, 0, 0, 227, 160,
- 157, 0, 155, 0, 297, 101, 105, 107, 103, 111,
- 102, 0, 0, 88, 96, 0, 0, 0, 231, 10,
- 4, 8, 6, 7, 9, 31, 0, 0, 0, 162,
- 38, 37, 39, 36, 5, 12, 32, 14, 19, 20,
- 0, 0, 25, 0, 40, 0, 44, 47, 50, 55,
- 58, 60, 62, 64, 66, 68, 70, 87, 0, 29,
- 91, 0, 0, 0, 154, 0, 0, 0, 277, 0,
- 0, 0, 0, 0, 0, 0, 0, 251, 260, 264,
- 40, 72, 85, 0, 240, 0, 150, 243, 262, 242,
- 241, 0, 244, 245, 246, 247, 248, 249, 0, 0,
- 0, 118, 0, 239, 122, 0, 237, 0, 235, 0,
- 232, 33, 34, 0, 16, 17, 0, 0, 23, 22,
- 0, 164, 26, 28, 35, 0, 0, 0, 0, 0,
+ 0, 126, 148, 149, 150, 0, 132, 134, 166, 163,
+ 164, 165, 170, 171, 172, 173, 174, 175, 167, 168,
+ 169, 176, 177, 178, 179, 180, 181, 135, 136, 137,
+ 139, 140, 133, 182, 183, 184, 185, 186, 187, 138,
+ 123, 122, 141, 142, 143, 144, 145, 146, 0, 162,
+ 189, 191, 207, 209, 192, 194, 195, 196, 197, 199,
+ 200, 201, 202, 193, 198, 203, 190, 204, 205, 206,
+ 208, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 0, 188, 224, 293, 294, 0,
+ 99, 98, 0, 110, 115, 130, 0, 131, 124, 127,
+ 120, 129, 128, 147, 158, 210, 0, 290, 292, 0,
+ 2, 3, 227, 0, 0, 89, 0, 97, 0, 106,
+ 100, 108, 0, 109, 0, 90, 2, 116, 0, 95,
+ 0, 125, 121, 0, 159, 1, 291, 0, 0, 225,
+ 157, 154, 0, 152, 0, 295, 101, 105, 107, 103,
+ 111, 102, 0, 117, 88, 96, 0, 0, 0, 229,
+ 10, 4, 8, 6, 7, 9, 31, 0, 0, 0,
+ 160, 38, 37, 39, 36, 5, 12, 32, 14, 19,
+ 20, 0, 0, 25, 0, 40, 0, 44, 47, 50,
+ 55, 58, 60, 62, 64, 66, 68, 70, 87, 0,
+ 29, 91, 0, 0, 0, 151, 0, 0, 0, 275,
+ 0, 0, 0, 0, 0, 0, 0, 0, 249, 258,
+ 262, 40, 72, 85, 0, 238, 0, 147, 241, 260,
+ 240, 239, 0, 242, 243, 244, 245, 246, 247, 104,
+ 0, 112, 237, 119, 0, 0, 235, 0, 233, 0,
+ 230, 33, 34, 0, 16, 17, 0, 0, 23, 22,
+ 0, 162, 26, 28, 35, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 163, 230, 0, 158, 159,
- 156, 288, 287, 258, 279, 0, 291, 289, 0, 0,
- 0, 272, 275, 250, 0, 75, 76, 78, 77, 80,
- 81, 82, 83, 84, 79, 74, 0, 0, 265, 261,
- 263, 0, 0, 0, 115, 0, 119, 0, 0, 0,
- 233, 0, 92, 11, 0, 18, 30, 15, 21, 27,
- 41, 42, 43, 46, 45, 48, 49, 53, 54, 51,
- 52, 56, 57, 59, 61, 63, 65, 67, 69, 0,
- 228, 0, 0, 0, 0, 0, 290, 0, 271, 0,
- 252, 73, 86, 104, 0, 112, 120, 0, 234, 0,
- 236, 0, 93, 13, 0, 0, 257, 259, 282, 281,
- 284, 258, 269, 273, 0, 0, 0, 0, 113, 0,
- 121, 238, 0, 71, 0, 283, 0, 0, 268, 266,
- 0, 0, 0, 253, 114, 0, 0, 285, 0, 258,
- 270, 0, 255, 276, 254, 94, 0, 286, 280, 267,
- 274, 278
+ 0, 0, 0, 0, 0, 161, 228, 0, 155, 156,
+ 153, 286, 285, 256, 277, 0, 289, 287, 0, 0,
+ 0, 270, 273, 248, 0, 75, 76, 78, 77, 80,
+ 81, 82, 83, 84, 79, 74, 0, 0, 263, 259,
+ 261, 114, 0, 118, 0, 0, 0, 231, 0, 92,
+ 11, 0, 18, 30, 15, 21, 27, 41, 42, 43,
+ 46, 45, 48, 49, 53, 54, 51, 52, 56, 57,
+ 59, 61, 63, 65, 67, 69, 0, 226, 0, 0,
+ 0, 0, 0, 288, 0, 269, 0, 250, 73, 86,
+ 113, 232, 0, 234, 0, 93, 13, 0, 0, 255,
+ 257, 280, 279, 282, 256, 267, 271, 0, 0, 0,
+ 0, 236, 0, 71, 0, 281, 0, 0, 266, 264,
+ 0, 0, 0, 251, 0, 0, 283, 0, 256, 268,
+ 0, 253, 274, 252, 94, 0, 284, 278, 265, 272,
+ 276
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -369, -47, -369, -369, -369, -369, -369, -369, -12, -369,
- -369, -369, -369, 53, -369, -86, -91, -147, -84, -30,
- -28, -25, -24, -32, -23, -369, -115, -140, -369, -163,
- -141, -369, 11, 13, -369, -369, -369, 130, 135, 134,
- -369, -369, -345, -369, -87, -369, -90, -369, -89, 253,
- -369, -369, 58, 0, -369, -369, -369, -369, -123, -148,
- 16, -67, -224, -95, -223, -343, -146, -369, -369, -153,
- -368, -369, -369, -113, -36, -94, -369, -369, -369, -369,
- -369, -119, -369, -369, -369, -369, -369, -369, -369, -369,
- -369, 166, -369, -369
+ -359, -47, -359, -359, -359, -359, -359, -359, -6, -359,
+ -359, -359, -359, -60, -359, -84, -83, -127, -82, -24,
+ -23, -22, -21, -20, -19, -359, -121, -143, -359, -135,
+ -202, -359, 18, 19, -359, -359, -359, 139, 145, 144,
+ -359, -359, -338, -359, -87, -359, -90, -359, -89, 263,
+ -359, -359, 63, 0, -85, -359, -359, -359, -359, -123,
+ -150, 25, -54, -230, -81, -227, -349, -126, -359, -359,
+ -134, -358, -359, -359, -113, -29, -80, -359, -359, -359,
+ -359, -359, -107, -359, -359, -359, -359, -359, -359, -359,
+ -359, -359, 171, -359, -359
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 246, 174, 175, 176, 334, 177, 178, 179, 180,
- 181, 182, 183, 220, 185, 186, 187, 188, 189, 190,
- 191, 192, 193, 194, 195, 196, 221, 222, 316, 223,
- 198, 130, 224, 225, 89, 90, 91, 119, 120, 121,
+ -1, 246, 175, 176, 177, 331, 178, 179, 180, 181,
+ 182, 183, 184, 221, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 222, 223, 316, 224,
+ 199, 130, 225, 226, 89, 90, 91, 119, 120, 121,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 141, 142, 199, 104, 105, 202, 137, 157, 158,
- 247, 248, 244, 227, 228, 229, 230, 304, 397, 423,
- 361, 362, 363, 424, 231, 232, 233, 409, 234, 410,
- 235, 396, 236, 369, 293, 364, 390, 406, 407, 237,
- 106, 107, 108, 116
+ 102, 142, 143, 200, 134, 104, 105, 203, 138, 158,
+ 159, 247, 248, 243, 228, 229, 230, 231, 304, 390,
+ 412, 358, 359, 360, 413, 232, 233, 234, 399, 235,
+ 400, 236, 389, 237, 366, 293, 361, 383, 396, 397,
+ 238, 106, 107, 108, 116
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1013,205 +1012,179 @@
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 103, 113, 123, 144, 122, 253, 131, 132, 320, 250,
- 242, 87, 243, 88, 201, 139, 324, 331, 197, 283,
- 387, 114, 381, 408, 394, 272, 273, 110, 111, 123,
- 382, 122, 131, 123, 153, 115, 197, 254, 255, 151,
- 154, 156, 262, 155, 200, 394, 152, 127, 156, 298,
- 155, 429, 117, 250, 284, 332, 239, 140, 256, 112,
- 274, 275, 257, 240, 124, 131, 245, 125, 156, 422,
- 155, 118, 204, 300, 259, 422, 148, 149, 205, 287,
- 260, 333, 391, 392, 2, 3, 4, 317, 317, 317,
- 268, 103, 269, 335, 126, 111, 103, 321, 323, 197,
- 243, 376, 426, 138, 317, 133, 103, 318, 317, 136,
- 110, 111, 156, 156, 155, 155, 143, 87, 103, 88,
- 339, 359, 103, 197, 197, 347, 348, 349, 350, 150,
- 103, 329, 365, -30, 330, 317, 367, 103, 366, 250,
- 203, 329, 238, 226, 378, 270, 271, 320, 276, 277,
- 398, 288, 289, 400, 258, 103, 263, 103, 278, 305,
- 306, 307, 308, 309, 310, 311, 312, 313, 314, 265,
- 266, 267, 317, 384, 281, 414, 371, 372, 315, 345,
- 346, 279, 343, 344, 280, 243, 184, 379, 282, 285,
- 291, 292, 351, 352, 294, 295, 299, 430, 156, 296,
- 155, 103, 103, 302, 184, 301, 393, 303, -29, 325,
- 326, 328, -24, 197, 368, 385, -256, 373, 375, 251,
- 252, 383, 374, -31, 317, 377, 412, 393, 399, 401,
- 404, 226, 413, 419, 243, 415, 418, 243, 264, 417,
- 402, 416, 217, 421, 403, 338, 425, 431, 353, 386,
- 357, 354, 146, 145, 427, 355, 147, 356, 109, 243,
- 358, 327, 380, 290, 420, 428, 197, 184, 370, 388,
- 389, 405, 135, 0, 0, 0, 0, 0, 0, 0,
- 0, 243, 395, 0, 0, 0, 0, 103, 0, 0,
- 0, 184, 184, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 395, 226, 131, 132, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 340, 341,
- 342, 184, 184, 184, 184, 184, 184, 184, 184, 184,
- 184, 184, 184, 184, 184, 184, 184, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 411, 0, 0,
+ 103, 113, 123, 145, 122, 320, 131, 132, 250, 242,
+ 321, 380, 198, 300, 323, 202, 328, 140, 87, 88,
+ 272, 273, 283, 254, 255, 115, 398, 374, 387, 123,
+ 114, 122, 131, 123, 253, 375, 110, 111, 126, 111,
+ 262, 157, 153, 156, 256, 387, 118, 127, 257, 157,
+ 418, 156, 250, 411, 329, 274, 275, 284, 411, 141,
+ 2, 3, 4, 133, 239, 241, 131, 245, 112, 157,
+ 152, 156, 124, 185, 117, 125, 149, 150, 298, 133,
+ 287, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 103, 370, 154, 198, 133, 103, 242, 205, 155,
+ 315, 242, 240, 139, 206, 259, 103, 251, 252, 137,
+ 268, 260, 269, 157, 157, 156, 156, 336, 103, 110,
+ 111, 332, 103, 372, 87, 88, 264, 330, 384, 385,
+ 103, 276, 277, 317, 317, 317, 415, 250, 103, 151,
+ 320, 144, 317, 201, 227, 344, 345, 346, 347, 356,
+ 317, 326, 258, 318, 327, 185, 103, -30, 103, 317,
+ 362, 263, 363, 326, 364, 280, 371, 204, 265, 266,
+ 267, 244, 392, 368, 369, 270, 271, 288, 289, 242,
+ 419, 317, 377, 282, 340, 341, 278, 342, 343, 279,
+ 281, 285, 291, 292, 348, 349, 322, 294, 157, 295,
+ 156, 296, 103, 103, 198, 337, 338, 339, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 299, 301, 302, 303, -29, 325,
+ -24, 386, 227, 365, 393, -254, 376, 317, -31, 378,
+ 391, 394, 406, 402, 403, 408, 379, 404, 386, 407,
+ 218, 335, 410, 198, 350, 414, 351, 420, 352, 405,
+ 353, 147, 354, 146, 355, 185, 148, 242, 109, 290,
+ 324, 416, 373, 417, 409, 367, 395, 136, 0, 388,
+ 381, 382, 0, 0, 0, 0, 0, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 388, 0, 131, 132,
+ 0, 0, 0, 0, 227, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 185, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 226, 226, 0, 0, 0, 0, 226,
- 226, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 184, 0, 0, 0, 0, 0, 0, 0, 0,
- 226, 0, 0, 0, 0, 103, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 226, 0, 0, 0, 0, 0, 226, 0,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 206, 207, 208, 184, 209, 210, 211, 212, 213,
- 214, 215, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 216, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 0, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 159, 160,
- 86, 161, 162, 163, 164, 165, 0, 0, 166, 167,
+ 401, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 168, 0, 0,
- 0, 217, 218, 0, 0, 0, 0, 219, 170, 171,
- 172, 173, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 206, 207, 208, 0, 209, 210, 211,
- 212, 213, 214, 215, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 216, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 0, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
- 159, 160, 86, 161, 162, 163, 164, 165, 0, 0,
- 166, 167, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 168,
- 0, 0, 0, 217, 319, 0, 0, 0, 0, 219,
- 170, 171, 172, 173, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 206, 207, 208, 0, 209,
- 210, 211, 212, 213, 214, 215, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 216, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 0, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 85, 159, 160, 86, 161, 162, 163, 164, 165,
- 0, 0, 166, 167, 0, 0, 0, 0, 0, 0,
+ 227, 227, 0, 0, 0, 0, 227, 227, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 168, 0, 0, 0, 217, 0, 0, 0, 0,
- 0, 219, 170, 171, 172, 173, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 206, 207, 208,
- 0, 209, 210, 211, 212, 213, 214, 215, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 216, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 0, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 159, 160, 86, 161, 162, 163,
- 164, 165, 0, 0, 166, 167, 0, 0, 0, 0,
+ 0, 0, 0, 227, 0, 0, 0, 0, 103, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 168, 0, 0, 0, 143, 0, 0,
- 0, 0, 0, 219, 170, 171, 172, 173, 1, 2,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 206,
- 207, 208, 0, 209, 210, 211, 212, 213, 214, 215,
+ 0, 0, 227, 0, 0, 0, 0, 227, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 207,
+ 208, 209, 0, 210, 211, 212, 213, 214, 215, 216,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 216, 50,
+ 42, 43, 44, 45, 46, 47, 48, 49, 217, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 0, 67, 68, 69,
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 159, 160, 86, 161,
- 162, 163, 164, 165, 0, 0, 166, 167, 0, 0,
+ 80, 81, 82, 83, 84, 85, 160, 161, 86, 162,
+ 163, 164, 165, 166, 0, 0, 167, 168, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 168, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 219, 170, 171, 172, 173,
+ 0, 0, 0, 0, 0, 169, 0, 0, 0, 218,
+ 219, 0, 0, 0, 0, 220, 171, 172, 173, 174,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
+ 11, 207, 208, 209, 0, 210, 211, 212, 213, 214,
+ 215, 216, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 0, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 217, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 0, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 159, 160,
- 86, 161, 162, 163, 164, 165, 0, 0, 166, 167,
+ 78, 79, 80, 81, 82, 83, 84, 85, 160, 161,
+ 86, 162, 163, 164, 165, 166, 0, 0, 167, 168,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 2, 3, 4, 168, 6, 7,
- 8, 9, 10, 11, 0, 0, 0, 219, 170, 171,
- 172, 173, 0, 0, 0, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 0, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 0, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85, 159, 160, 86, 161, 162, 163, 164, 165, 0,
- 0, 166, 167, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 2, 3, 4,
- 168, 6, 7, 8, 9, 10, 11, 0, 0, 0,
- 0, 170, 171, 172, 173, 0, 0, 0, 12, 13,
+ 0, 0, 0, 0, 0, 0, 0, 169, 0, 0,
+ 0, 218, 319, 0, 0, 0, 0, 220, 171, 172,
+ 173, 174, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 207, 208, 209, 0, 210, 211, 212,
+ 213, 214, 215, 216, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 217, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 0, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ 160, 161, 86, 162, 163, 164, 165, 166, 0, 0,
+ 167, 168, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 169,
+ 0, 0, 0, 218, 0, 0, 0, 0, 0, 220,
+ 171, 172, 173, 174, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 207, 208, 209, 0, 210,
+ 211, 212, 213, 214, 215, 216, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 217, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 0, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 160, 161, 86, 162, 163, 164, 165, 166,
+ 0, 0, 167, 168, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 169, 0, 0, 0, 144, 0, 0, 0, 0,
+ 0, 220, 171, 172, 173, 174, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 207, 208, 209,
+ 0, 210, 211, 212, 213, 214, 215, 216, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 0, 50, 51, 52,
+ 44, 45, 46, 47, 48, 49, 217, 50, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 0, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 0, 128, 86, 0, 8, 9,
- 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 83, 84, 85, 160, 161, 86, 162, 163, 164,
+ 165, 166, 0, 0, 167, 168, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 169, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 220, 171, 172, 173, 174, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 0, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 0, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 160, 161, 86, 162,
+ 163, 164, 165, 166, 0, 0, 167, 168, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 3, 4, 169, 6, 7, 8, 9,
+ 10, 11, 0, 0, 0, 220, 171, 172, 173, 174,
0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
- 0, 0, 0, 129, 33, 34, 35, 36, 37, 38,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 0, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 0, 85, 159,
- 160, 86, 161, 162, 163, 164, 165, 0, 0, 166,
- 167, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 168, 0,
- 0, 169, 8, 9, 10, 11, 0, 0, 0, 170,
- 171, 172, 173, 0, 0, 0, 0, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 0, 0, 0, 0, 0, 0, 33, 34,
- 35, 36, 37, 38, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 48, 49, 0, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 0, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 0, 85, 159, 160, 86, 161, 162, 163, 164,
- 165, 0, 0, 166, 167, 0, 0, 0, 0, 0,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 160,
+ 161, 86, 162, 163, 164, 165, 166, 0, 0, 167,
+ 168, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 2, 3, 4, 169, 6,
+ 7, 8, 9, 10, 11, 0, 0, 0, 0, 171,
+ 172, 173, 174, 0, 0, 0, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 0, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 0, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 0, 128, 86, 0, 8, 9, 10, 11,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 168, 0, 0, 241, 8, 9, 10, 11,
- 0, 0, 0, 170, 171, 172, 173, 0, 0, 0,
0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
- 0, 0, 33, 34, 35, 36, 37, 38, 0, 0,
+ 0, 129, 33, 34, 35, 36, 37, 38, 0, 0,
0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 0, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 0, 85, 159, 160, 86,
- 161, 162, 163, 164, 165, 0, 0, 166, 167, 0,
+ 79, 80, 81, 82, 83, 0, 85, 160, 161, 86,
+ 162, 163, 164, 165, 166, 0, 0, 167, 168, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 168, 8, 9, 10,
- 11, 0, 0, 0, 0, 0, 297, 170, 171, 172,
- 173, 0, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
- 0, 0, 0, 33, 34, 35, 36, 37, 38, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
- 0, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 0, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 0, 85, 159, 160,
- 86, 161, 162, 163, 164, 165, 0, 0, 166, 167,
+ 0, 0, 0, 0, 0, 0, 169, 0, 0, 170,
+ 8, 9, 10, 11, 0, 0, 0, 171, 172, 173,
+ 174, 0, 0, 0, 0, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 0, 0, 0, 0, 0, 0, 33, 34, 35, 36,
+ 37, 38, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 48, 49, 0, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 0, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 0,
+ 85, 160, 161, 86, 162, 163, 164, 165, 166, 0,
+ 0, 167, 168, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 168, 0, 0,
- 322, 8, 9, 10, 11, 0, 0, 0, 170, 171,
- 172, 173, 0, 0, 0, 0, 12, 13, 14, 15,
+ 169, 8, 9, 10, 11, 0, 0, 0, 0, 0,
+ 297, 171, 172, 173, 174, 0, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 0, 0, 0, 0, 0, 0, 33, 34, 35,
36, 37, 38, 0, 0, 0, 0, 0, 0, 0,
@@ -1219,11 +1192,11 @@
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 0, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 0, 85, 159, 160, 86, 161, 162, 163, 164, 165,
- 0, 0, 166, 167, 0, 0, 0, 0, 0, 0,
+ 0, 85, 160, 161, 86, 162, 163, 164, 165, 166,
+ 0, 0, 167, 168, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 168, 8, 9, 10, 11, 0, 0, 0, 0,
- 0, 0, 170, 171, 172, 173, 0, 12, 13, 14,
+ 0, 169, 8, 9, 10, 11, 0, 0, 0, 0,
+ 0, 0, 171, 172, 173, 174, 0, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 0, 0, 0, 0, 0, 0, 33, 34,
35, 36, 37, 38, 0, 0, 0, 0, 0, 0,
@@ -1231,11 +1204,11 @@
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 0, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 0, 85, 159, 160, 86, 161, 162, 163, 164,
- 165, 0, 0, 166, 167, 0, 0, 0, 0, 0,
+ 83, 0, 85, 160, 161, 86, 162, 163, 164, 165,
+ 166, 0, 0, 167, 168, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
- 3, 4, 168, 6, 7, 8, 9, 10, 11, 0,
- 0, 0, 0, 170, 171, 172, 173, 0, 0, 0,
+ 3, 4, 169, 6, 7, 8, 9, 10, 11, 0,
+ 0, 0, 0, 171, 172, 173, 174, 0, 0, 0,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
@@ -1266,10 +1239,10 @@
59, 60, 61, 62, 63, 64, 65, 66, 0, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 0, 0,
- 86, 0, 0, 0, 0, 0, 0, 0, 134, 0,
+ 86, 0, 0, 0, 0, 0, 0, 0, 135, 0,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 360, 12, 13, 14, 15, 16, 17, 18,
+ 0, 0, 357, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
@@ -1306,8 +1279,8 @@
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 0, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 0, 85, 0, 336, 86, 8, 9,
- 10, 11, 337, 0, 0, 0, 0, 0, 0, 0,
+ 81, 82, 83, 0, 85, 0, 333, 86, 8, 9,
+ 10, 11, 334, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
0, 0, 0, 0, 33, 34, 35, 36, 37, 38,
@@ -1321,50 +1294,63 @@
static const yytype_int16 yycheck[] =
{
- 0, 48, 91, 116, 91, 168, 96, 96, 231, 157,
- 151, 0, 152, 0, 137, 60, 240, 102, 133, 118,
- 363, 130, 132, 391, 369, 113, 114, 102, 103, 118,
- 140, 118, 122, 122, 134, 140, 151, 111, 112, 132,
- 140, 130, 182, 130, 140, 390, 139, 94, 137, 212,
- 137, 419, 131, 201, 153, 140, 132, 102, 132, 134,
- 148, 149, 136, 139, 137, 155, 155, 140, 157, 412,
- 157, 137, 131, 214, 131, 418, 123, 124, 137, 202,
- 137, 131, 131, 131, 4, 5, 6, 137, 137, 137,
- 142, 91, 144, 256, 102, 103, 96, 238, 239, 214,
- 240, 325, 131, 134, 137, 132, 106, 140, 137, 109,
- 102, 103, 201, 202, 201, 202, 134, 106, 118, 106,
- 260, 284, 122, 238, 239, 272, 273, 274, 275, 130,
- 130, 137, 295, 130, 140, 137, 299, 137, 140, 287,
- 139, 137, 132, 143, 140, 109, 110, 370, 115, 116,
- 374, 105, 106, 377, 131, 155, 130, 157, 152, 120,
- 121, 122, 123, 124, 125, 126, 127, 128, 129, 145,
- 146, 147, 137, 138, 117, 399, 316, 317, 139, 270,
- 271, 151, 268, 269, 150, 325, 133, 328, 119, 133,
- 140, 140, 276, 277, 130, 130, 130, 421, 287, 140,
- 287, 201, 202, 130, 151, 138, 369, 135, 130, 139,
- 133, 132, 131, 328, 138, 63, 134, 133, 133, 166,
- 167, 133, 139, 130, 137, 139, 131, 390, 139, 133,
- 130, 231, 135, 17, 374, 133, 131, 377, 185, 140,
- 381, 404, 134, 139, 384, 257, 140, 140, 278, 362,
- 282, 279, 122, 118, 417, 280, 122, 281, 5, 399,
- 283, 245, 329, 205, 410, 418, 381, 214, 304, 364,
- 364, 390, 106, -1, -1, -1, -1, -1, -1, -1,
- -1, 421, 369, -1, -1, -1, -1, 287, -1, -1,
- -1, 238, 239, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 390, 304, 395, 395, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 394, -1, -1,
+ 0, 48, 91, 116, 91, 232, 96, 96, 158, 152,
+ 240, 360, 133, 215, 244, 138, 102, 60, 0, 0,
+ 113, 114, 118, 111, 112, 140, 384, 132, 366, 118,
+ 130, 118, 122, 122, 169, 140, 102, 103, 102, 103,
+ 183, 130, 127, 130, 132, 383, 137, 94, 136, 138,
+ 408, 138, 202, 402, 140, 148, 149, 153, 407, 102,
+ 4, 5, 6, 132, 149, 150, 156, 156, 134, 158,
+ 139, 158, 137, 133, 131, 140, 123, 124, 213, 132,
+ 203, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 91, 322, 134, 215, 132, 96, 240, 131, 140,
+ 139, 244, 139, 134, 137, 131, 106, 167, 168, 109,
+ 142, 137, 144, 202, 203, 202, 203, 260, 118, 102,
+ 103, 256, 122, 325, 106, 106, 186, 131, 131, 131,
+ 130, 115, 116, 137, 137, 137, 131, 287, 138, 130,
+ 367, 134, 137, 140, 144, 272, 273, 274, 275, 284,
+ 137, 137, 131, 140, 140, 215, 156, 130, 158, 137,
+ 295, 130, 140, 137, 299, 150, 140, 139, 145, 146,
+ 147, 139, 374, 316, 317, 109, 110, 105, 106, 322,
+ 410, 137, 138, 119, 268, 269, 152, 270, 271, 151,
+ 117, 133, 140, 140, 276, 277, 139, 130, 287, 130,
+ 287, 140, 202, 203, 325, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 130, 138, 130, 135, 130, 132,
+ 131, 366, 232, 138, 377, 134, 133, 137, 130, 63,
+ 133, 130, 140, 131, 135, 17, 359, 133, 383, 131,
+ 134, 257, 139, 374, 278, 140, 279, 140, 280, 394,
+ 281, 122, 282, 118, 283, 325, 122, 410, 5, 206,
+ 245, 406, 326, 407, 400, 304, 383, 106, -1, 366,
+ 361, 361, -1, -1, -1, -1, -1, 287, -1, -1,
+ -1, -1, -1, -1, -1, -1, 383, -1, 388, 388,
+ -1, -1, -1, -1, 304, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 374, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 363, 364, -1, -1, -1, -1, 369,
- 370, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 328, -1, -1, -1, -1, -1, -1, -1, -1,
- 390, -1, -1, -1, -1, 395, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 412, -1, -1, -1, -1, -1, 418, -1,
+ 387, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 360, 361, -1, -1, -1, -1, 366, 367, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 383, -1, -1, -1, -1, 388, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 402, -1, -1, -1, -1, 407, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, -1, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, -1, -1, 111, 112, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 130, -1, -1, -1, 134,
+ 135, -1, -1, -1, -1, 140, 141, 142, 143, 144,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 381, 18, 19, 20, 21, 22,
+ 13, 14, 15, 16, -1, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
@@ -1390,7 +1376,7 @@
101, 102, 103, 104, 105, 106, 107, 108, -1, -1,
111, 112, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 130,
- -1, -1, -1, 134, 135, -1, -1, -1, -1, 140,
+ -1, -1, -1, 134, -1, -1, -1, -1, -1, 140,
141, 142, 143, 144, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, -1, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -1418,86 +1404,47 @@
97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, -1, -1, 111, 112, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 130, -1, -1, -1, 134, -1, -1,
+ -1, -1, -1, 130, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 140, 141, 142, 143, 144, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 55, 56, 57, 58, 59, 60, 61, 62, -1, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, -1, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
105, 106, 107, 108, -1, -1, 111, 112, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 130, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 140, 141, 142, 143, 144,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- -1, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, -1, 82,
- 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, -1, -1, 111, 112,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 3, 4, 5, 6, 130, 8, 9,
- 10, 11, 12, 13, -1, -1, -1, 140, 141, 142,
- 143, 144, -1, -1, -1, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, -1, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, -1, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, 108, -1,
- -1, 111, 112, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
- 130, 8, 9, 10, 11, 12, 13, -1, -1, -1,
- -1, 141, 142, 143, 144, -1, -1, -1, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, -1, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, -1, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, -1, 102, 103, -1, 10, 11,
- 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, 6, 130, 8, 9, 10, 11,
+ 12, 13, -1, -1, -1, 140, 141, 142, 143, 144,
-1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
- -1, -1, -1, 140, 46, 47, 48, 49, 50, 51,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 61,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, -1, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, -1,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, -1, 100, 101,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, -1, -1, 111,
112, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 130, -1,
- -1, 133, 10, 11, 12, 13, -1, -1, -1, 141,
- 142, 143, 144, -1, -1, -1, -1, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, -1, -1, -1, -1, -1, -1, 46, 47,
- 48, 49, 50, 51, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 61, 62, -1, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, -1, 82, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, -1, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, -1, -1, 111, 112, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3, 4, 5, 6, 130, 8,
+ 9, 10, 11, 12, 13, -1, -1, -1, -1, 141,
+ 142, 143, 144, -1, -1, -1, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, -1, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, -1, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, -1, 102, 103, -1, 10, 11, 12, 13,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 130, -1, -1, 133, 10, 11, 12, 13,
- -1, -1, -1, 141, 142, 143, 144, -1, -1, -1,
-1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
- -1, -1, 46, 47, 48, 49, 50, 51, -1, -1,
+ -1, 140, 46, 47, 48, 49, 50, 51, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 61, 62, -1,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, -1, 82, 83,
@@ -1505,21 +1452,21 @@
94, 95, 96, 97, 98, -1, 100, 101, 102, 103,
104, 105, 106, 107, 108, -1, -1, 111, 112, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 130, 10, 11, 12,
- 13, -1, -1, -1, -1, -1, 140, 141, 142, 143,
- 144, -1, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
- -1, -1, -1, 46, 47, 48, 49, 50, 51, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 61, 62,
- -1, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, -1, 82,
- 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, -1, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, -1, -1, 111, 112,
+ -1, -1, -1, -1, -1, -1, 130, -1, -1, 133,
+ 10, 11, 12, 13, -1, -1, -1, 141, 142, 143,
+ 144, -1, -1, -1, -1, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ -1, -1, -1, -1, -1, -1, 46, 47, 48, 49,
+ 50, 51, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 61, 62, -1, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, -1, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, -1,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, -1,
+ -1, 111, 112, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 130, -1, -1,
- 133, 10, 11, 12, 13, -1, -1, -1, 141, 142,
- 143, 144, -1, -1, -1, -1, 25, 26, 27, 28,
+ 130, 10, 11, 12, 13, -1, -1, -1, -1, -1,
+ 140, 141, 142, 143, 144, -1, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, -1, -1, -1, -1, -1, -1, 46, 47, 48,
49, 50, 51, -1, -1, -1, -1, -1, -1, -1,
@@ -1641,40 +1588,39 @@
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 103, 186, 187, 188,
189, 190, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 207, 208, 209, 244, 245, 246, 203,
- 102, 103, 134, 155, 130, 140, 247, 131, 137, 191,
+ 202, 203, 204, 207, 209, 210, 245, 246, 247, 203,
+ 102, 103, 134, 155, 130, 140, 248, 131, 137, 191,
192, 193, 198, 202, 137, 140, 102, 155, 102, 140,
- 185, 200, 202, 132, 0, 245, 207, 211, 134, 60,
- 102, 205, 206, 134, 227, 192, 191, 193, 155, 155,
- 130, 132, 139, 134, 140, 198, 202, 212, 213, 101,
- 102, 104, 105, 106, 107, 108, 111, 112, 130, 133,
- 141, 142, 143, 144, 156, 157, 158, 160, 161, 162,
- 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
- 173, 174, 175, 176, 177, 178, 179, 180, 184, 207,
- 140, 212, 210, 139, 131, 137, 14, 15, 16, 18,
- 19, 20, 21, 22, 23, 24, 63, 134, 135, 140,
- 167, 180, 181, 183, 186, 187, 207, 217, 218, 219,
- 220, 228, 229, 230, 232, 234, 236, 243, 132, 132,
- 139, 133, 184, 181, 216, 202, 155, 214, 215, 135,
- 213, 167, 167, 183, 111, 112, 132, 136, 131, 131,
+ 185, 200, 202, 132, 208, 0, 246, 207, 212, 134,
+ 60, 102, 205, 206, 134, 228, 192, 191, 193, 155,
+ 155, 130, 139, 208, 134, 140, 198, 202, 213, 214,
+ 101, 102, 104, 105, 106, 107, 108, 111, 112, 130,
+ 133, 141, 142, 143, 144, 156, 157, 158, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 184,
+ 207, 140, 213, 211, 139, 131, 137, 14, 15, 16,
+ 18, 19, 20, 21, 22, 23, 24, 63, 134, 135,
+ 140, 167, 180, 181, 183, 186, 187, 207, 218, 219,
+ 220, 221, 229, 230, 231, 233, 235, 237, 244, 208,
+ 139, 208, 181, 217, 139, 202, 155, 215, 216, 135,
+ 214, 167, 167, 183, 111, 112, 132, 136, 131, 131,
137, 62, 181, 130, 167, 145, 146, 147, 142, 144,
109, 110, 113, 114, 148, 149, 115, 116, 152, 151,
- 150, 117, 119, 118, 153, 133, 135, 212, 105, 106,
- 206, 140, 140, 238, 130, 130, 140, 140, 183, 130,
- 184, 138, 130, 135, 221, 120, 121, 122, 123, 124,
+ 150, 117, 119, 118, 153, 133, 135, 213, 105, 106,
+ 206, 140, 140, 239, 130, 130, 140, 140, 183, 130,
+ 184, 138, 130, 135, 222, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 139, 182, 137, 140, 135,
- 218, 184, 133, 184, 216, 139, 133, 214, 132, 137,
- 140, 102, 140, 131, 159, 183, 102, 108, 162, 181,
- 167, 167, 167, 169, 169, 170, 170, 171, 171, 171,
- 171, 172, 172, 173, 174, 175, 176, 177, 178, 183,
- 135, 224, 225, 226, 239, 183, 140, 183, 138, 237,
- 228, 181, 181, 133, 139, 133, 216, 139, 140, 184,
- 215, 132, 140, 133, 138, 63, 227, 219, 217, 229,
- 240, 131, 131, 183, 196, 198, 235, 222, 216, 139,
- 216, 133, 184, 181, 130, 235, 241, 242, 224, 231,
- 233, 155, 131, 135, 216, 133, 183, 140, 131, 17,
- 220, 139, 219, 223, 227, 140, 131, 183, 223, 224,
- 216, 140
+ 219, 217, 139, 217, 215, 132, 137, 140, 102, 140,
+ 131, 159, 183, 102, 108, 162, 181, 167, 167, 167,
+ 169, 169, 170, 170, 171, 171, 171, 171, 172, 172,
+ 173, 174, 175, 176, 177, 178, 183, 135, 225, 226,
+ 227, 240, 183, 140, 183, 138, 238, 229, 181, 181,
+ 217, 140, 184, 216, 132, 140, 133, 138, 63, 228,
+ 220, 218, 230, 241, 131, 131, 183, 196, 198, 236,
+ 223, 133, 184, 181, 130, 236, 242, 243, 225, 232,
+ 234, 155, 131, 135, 133, 183, 140, 131, 17, 221,
+ 139, 220, 224, 228, 140, 131, 183, 224, 225, 217,
+ 140
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
@@ -1691,25 +1637,25 @@
182, 182, 182, 182, 182, 183, 183, 184, 185, 186,
186, 186, 186, 186, 186, 186, 186, 187, 188, 188,
189, 189, 190, 191, 191, 192, 192, 192, 192, 193,
- 194, 194, 194, 194, 194, 194, 195, 195, 195, 195,
- 195, 195, 195, 196, 196, 197, 197, 198, 198, 199,
- 200, 200, 200, 200, 200, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
- 202, 203, 203, 203, 204, 205, 205, 206, 206, 206,
- 206, 207, 207, 207, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 210, 209, 211,
- 209, 212, 212, 213, 213, 214, 214, 215, 215, 216,
- 217, 218, 218, 219, 219, 219, 219, 219, 219, 219,
- 220, 221, 222, 220, 223, 223, 225, 224, 226, 224,
- 227, 227, 228, 228, 229, 229, 230, 231, 231, 233,
- 232, 234, 234, 235, 235, 237, 236, 238, 236, 239,
- 236, 240, 240, 241, 241, 242, 242, 243, 243, 243,
- 243, 243, 244, 244, 245, 245, 247, 246
+ 194, 194, 194, 194, 194, 195, 195, 195, 195, 195,
+ 196, 196, 197, 197, 198, 198, 199, 200, 200, 200,
+ 200, 200, 201, 201, 201, 201, 201, 201, 201, 201,
+ 201, 201, 201, 201, 201, 201, 201, 202, 203, 203,
+ 203, 204, 205, 205, 206, 206, 206, 206, 207, 207,
+ 208, 208, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 211, 210, 212, 210, 213,
+ 213, 214, 214, 215, 215, 216, 216, 217, 218, 219,
+ 219, 220, 220, 220, 220, 220, 220, 220, 221, 222,
+ 223, 221, 224, 224, 226, 225, 227, 225, 228, 228,
+ 229, 229, 230, 230, 231, 232, 232, 234, 233, 235,
+ 235, 236, 236, 238, 237, 239, 237, 240, 237, 241,
+ 241, 242, 242, 243, 243, 244, 244, 244, 244, 244,
+ 245, 245, 246, 246, 248, 247
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1725,26 +1671,26 @@
1, 5, 1, 3, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 3, 1, 2, 2,
2, 4, 5, 6, 9, 2, 3, 2, 1, 1,
- 2, 3, 3, 2, 5, 2, 1, 2, 1, 1,
- 1, 3, 6, 7, 8, 5, 1, 2, 4, 5,
- 6, 7, 4, 1, 2, 1, 1, 1, 2, 1,
+ 2, 3, 3, 2, 3, 2, 1, 2, 1, 1,
+ 1, 3, 4, 6, 5, 1, 2, 3, 5, 4,
+ 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 4, 1, 3, 1, 3, 3,
- 1, 1, 3, 4, 1, 1, 1, 1, 1, 1,
+ 1, 4, 1, 3, 1, 3, 3, 1, 1, 2,
+ 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 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, 0,
- 5, 1, 2, 3, 4, 1, 3, 1, 4, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 0, 0, 5, 1, 1, 0, 2, 0, 2,
- 2, 3, 1, 2, 1, 2, 5, 3, 1, 0,
- 6, 3, 2, 1, 4, 0, 6, 0, 8, 0,
- 7, 1, 1, 1, 0, 2, 3, 2, 2, 2,
- 3, 2, 1, 2, 1, 1, 0, 3
+ 1, 1, 1, 1, 1, 0, 6, 0, 5, 1,
+ 2, 3, 4, 1, 3, 1, 4, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
+ 0, 5, 1, 1, 0, 2, 0, 2, 2, 3,
+ 1, 2, 1, 2, 5, 3, 1, 0, 6, 3,
+ 2, 1, 4, 0, 6, 0, 8, 0, 7, 1,
+ 1, 1, 0, 2, 3, 2, 2, 2, 3, 2,
+ 1, 2, 1, 1, 0, 3
};
@@ -3350,7 +3296,7 @@
case 104:
{
- (yyval.interm.param) = context->parseParameterArrayDeclarator((yyvsp[-3].lex).string, (yylsp[-3]), (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]), &(yyvsp[-4].interm.type));
+ (yyval.interm.param) = context->parseParameterArrayDeclarator((yyvsp[-1].lex).string, (yylsp[-1]), (yyvsp[0].interm.arraySize), (yylsp[0]), &(yyvsp[-2].interm.type));
}
break;
@@ -3420,8 +3366,8 @@
case 112:
{
- (yyval.interm) = (yyvsp[-5].interm);
- context->parseArrayDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), (yyval.interm).intermDeclaration);
+ (yyval.interm) = (yyvsp[-3].interm);
+ context->parseArrayDeclarator((yyval.interm).type, (yylsp[-1]), *(yyvsp[-1].lex).string, (yylsp[0]), (yyvsp[0].interm.arraySize), (yyval.interm).intermDeclaration);
}
break;
@@ -3429,9 +3375,9 @@
case 113:
{
- ES3_OR_NEWER("[]", (yylsp[-4]), "implicitly sized array");
- (yyval.interm) = (yyvsp[-6].interm);
- context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
+ ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)");
+ (yyval.interm) = (yyvsp[-5].interm);
+ context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-2].interm.arraySize), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
}
break;
@@ -3439,23 +3385,13 @@
case 114:
{
- ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)");
- (yyval.interm) = (yyvsp[-7].interm);
- context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
- }
-
- break;
-
- case 115:
-
- {
(yyval.interm) = (yyvsp[-4].interm);
context->parseInitDeclarator((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
}
break;
- case 116:
+ case 115:
{
(yyval.interm).type = (yyvsp[0].interm.type);
@@ -3464,7 +3400,7 @@
break;
- case 117:
+ case 116:
{
(yyval.interm).type = (yyvsp[-1].interm.type);
@@ -3473,12 +3409,21 @@
break;
+ case 117:
+
+ {
+ (yyval.interm).type = (yyvsp[-2].interm.type);
+ (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-1]), *(yyvsp[-1].lex).string, (yylsp[0]), (yyvsp[0].interm.arraySize));
+ }
+
+ break;
+
case 118:
{
- ES3_1_ONLY("[]", (yylsp[-1]), "implicitly sized array declaration");
- (yyval.interm).type = (yyvsp[-3].interm.type);
- (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), nullptr);
+ ES3_OR_NEWER("[]", (yylsp[-2]), "first-class arrays (array initializer)");
+ (yyval.interm).type = (yyvsp[-4].interm.type);
+ (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-2].interm.arraySize), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
}
break;
@@ -3486,42 +3431,13 @@
case 119:
{
- (yyval.interm).type = (yyvsp[-4].interm.type);
- (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
- }
-
- break;
-
- case 120:
-
- {
- ES3_OR_NEWER("[]", (yylsp[-3]), "implicitly sized array");
- (yyval.interm).type = (yyvsp[-5].interm.type);
- (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
- }
-
- break;
-
- case 121:
-
- {
- ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)");
- (yyval.interm).type = (yyvsp[-6].interm.type);
- (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
- }
-
- break;
-
- case 122:
-
- {
(yyval.interm).type = (yyvsp[-3].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
}
break;
- case 123:
+ case 120:
{
context->addFullySpecifiedType(&(yyvsp[0].interm.type));
@@ -3530,7 +3446,7 @@
break;
- case 124:
+ case 121:
{
(yyval.interm.type) = context->addFullySpecifiedType(*(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type));
@@ -3538,7 +3454,7 @@
break;
- case 125:
+ case 122:
{
(yyval.interm.qualifier) = EvqSmooth;
@@ -3546,7 +3462,7 @@
break;
- case 126:
+ case 123:
{
(yyval.interm.qualifier) = EvqFlat;
@@ -3554,7 +3470,7 @@
break;
- case 127:
+ case 124:
{
(yyval.interm.typeQualifierBuilder) = context->createTypeQualifierBuilder((yylsp[0]));
@@ -3563,7 +3479,7 @@
break;
- case 128:
+ case 125:
{
(yyval.interm.typeQualifierBuilder) = (yyvsp[-1].interm.typeQualifierBuilder);
@@ -3572,7 +3488,7 @@
break;
- case 129:
+ case 126:
{
// empty
@@ -3580,7 +3496,7 @@
break;
- case 130:
+ case 127:
{
context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper));
@@ -3589,7 +3505,7 @@
break;
- case 131:
+ case 128:
{
context->checkIsAtGlobalLevel((yylsp[0]), "layout");
@@ -3598,7 +3514,7 @@
break;
- case 132:
+ case 129:
{
(yyval.interm.qualifierWrapper) = new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0]));
@@ -3606,7 +3522,7 @@
break;
- case 133:
+ case 130:
{
(yyval.interm.qualifierWrapper) = new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0]));
@@ -3614,7 +3530,7 @@
break;
- case 134:
+ case 131:
{
context->checkIsAtGlobalLevel((yylsp[0]), "invariant");
@@ -3623,7 +3539,7 @@
break;
- case 135:
+ case 132:
{
VERTEX_ONLY("attribute", (yylsp[0]));
@@ -3633,7 +3549,7 @@
break;
- case 136:
+ case 133:
{
ES2_ONLY("varying", (yylsp[0]));
@@ -3642,7 +3558,7 @@
break;
- case 137:
+ case 134:
{
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0]));
@@ -3650,7 +3566,7 @@
break;
- case 138:
+ case 135:
{
(yyval.interm.qualifierWrapper) = context->parseInQualifier((yylsp[0]));
@@ -3658,7 +3574,7 @@
break;
- case 139:
+ case 136:
{
(yyval.interm.qualifierWrapper) = context->parseOutQualifier((yylsp[0]));
@@ -3666,7 +3582,7 @@
break;
- case 140:
+ case 137:
{
(yyval.interm.qualifierWrapper) = context->parseInOutQualifier((yylsp[0]));
@@ -3674,7 +3590,7 @@
break;
- case 141:
+ case 138:
{
ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier");
@@ -3683,7 +3599,7 @@
break;
- case 142:
+ case 139:
{
(yyval.interm.qualifierWrapper) = context->parseGlobalStorageQualifier(EvqUniform, (yylsp[0]));
@@ -3691,7 +3607,7 @@
break;
- case 143:
+ case 140:
{
ES3_1_ONLY("buffer", (yylsp[0]), "storage qualifier");
@@ -3700,7 +3616,7 @@
break;
- case 144:
+ case 141:
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0]));
@@ -3708,7 +3624,7 @@
break;
- case 145:
+ case 142:
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0]));
@@ -3716,7 +3632,7 @@
break;
- case 146:
+ case 143:
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0]));
@@ -3724,7 +3640,7 @@
break;
- case 147:
+ case 144:
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0]));
@@ -3732,7 +3648,7 @@
break;
- case 148:
+ case 145:
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0]));
@@ -3740,7 +3656,7 @@
break;
- case 149:
+ case 146:
{
COMPUTE_ONLY("shared", (yylsp[0]));
@@ -3749,7 +3665,7 @@
break;
- case 150:
+ case 147:
{
(yyval.interm.type) = (yyvsp[0].interm.type);
@@ -3758,7 +3674,7 @@
break;
- case 151:
+ case 148:
{
(yyval.interm.precision) = EbpHigh;
@@ -3766,7 +3682,7 @@
break;
- case 152:
+ case 149:
{
(yyval.interm.precision) = EbpMedium;
@@ -3774,7 +3690,7 @@
break;
- case 153:
+ case 150:
{
(yyval.interm.precision) = EbpLow;
@@ -3782,7 +3698,7 @@
break;
- case 154:
+ case 151:
{
ES3_OR_NEWER_OR_MULTIVIEW("layout", (yylsp[-3]), "qualifier");
@@ -3791,7 +3707,7 @@
break;
- case 155:
+ case 152:
{
(yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
@@ -3799,7 +3715,7 @@
break;
- case 156:
+ case 153:
{
(yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0]));
@@ -3807,7 +3723,7 @@
break;
- case 157:
+ case 154:
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
@@ -3815,7 +3731,7 @@
break;
- case 158:
+ case 155:
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
@@ -3823,7 +3739,7 @@
break;
- case 159:
+ case 156:
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
@@ -3831,7 +3747,7 @@
break;
- case 160:
+ case 157:
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier("shared", (yylsp[0]));
@@ -3839,7 +3755,7 @@
break;
- case 161:
+ case 158:
{
(yyval.interm.type).initialize((yyvsp[0].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
@@ -3847,27 +3763,36 @@
break;
- case 162:
+ case 159:
+
+ {
+ (yyval.interm.type).initialize((yyvsp[-1].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
+ (yyval.interm.type).setArraySize((yyvsp[0].interm.arraySize));
+ }
+
+ break;
+
+ case 160:
{
ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array");
- (yyval.interm.type).initialize((yyvsp[-2].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
- (yyval.interm.type).setArraySize(0);
+ (yyval.interm.arraySize) = 0u;
}
break;
- case 163:
+ case 161:
{
- (yyval.interm.type).initialize((yyvsp[-3].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
unsigned int size = context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
- (yyval.interm.type).setArraySize(size);
+ // Make the type an array even if size check failed.
+ // This ensures useless error messages regarding a variable's non-arrayness won't follow.
+ (yyval.interm.arraySize) = size;
}
break;
- case 164:
+ case 162:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0]));
@@ -3875,7 +3800,7 @@
break;
- case 165:
+ case 163:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -3883,7 +3808,7 @@
break;
- case 166:
+ case 164:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
@@ -3891,7 +3816,7 @@
break;
- case 167:
+ case 165:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
@@ -3899,7 +3824,7 @@
break;
- case 168:
+ case 166:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
@@ -3907,11 +3832,29 @@
break;
+ case 167:
+
+ {
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(2);
+ }
+
+ break;
+
+ case 168:
+
+ {
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(3);
+ }
+
+ break;
+
case 169:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(2);
+ (yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
@@ -3919,8 +3862,8 @@
case 170:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(3);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
@@ -3928,8 +3871,8 @@
case 171:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(4);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
@@ -3938,7 +3881,7 @@
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(2);
+ (yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
@@ -3946,8 +3889,8 @@
case 173:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(3);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
@@ -3955,8 +3898,8 @@
case 174:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(4);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
@@ -3965,7 +3908,7 @@
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(2);
+ (yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
@@ -3973,8 +3916,8 @@
case 176:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(3);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
@@ -3982,8 +3925,8 @@
case 177:
{
- (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(4);
+ (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
+ (yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
@@ -3992,30 +3935,12 @@
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(2);
- }
-
- break;
-
- case 179:
-
- {
- (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
- (yyval.interm.typeSpecifierNonArray).setAggregate(3);
- }
-
- break;
-
- case 180:
-
- {
- (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
- case 181:
+ case 179:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4024,7 +3949,7 @@
break;
- case 182:
+ case 180:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4033,7 +3958,7 @@
break;
- case 183:
+ case 181:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4042,7 +3967,7 @@
break;
- case 184:
+ case 182:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4051,7 +3976,7 @@
break;
- case 185:
+ case 183:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4060,7 +3985,7 @@
break;
- case 186:
+ case 184:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4069,7 +3994,7 @@
break;
- case 187:
+ case 185:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4078,7 +4003,7 @@
break;
- case 188:
+ case 186:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4087,7 +4012,7 @@
break;
- case 189:
+ case 187:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
@@ -4096,7 +4021,7 @@
break;
- case 190:
+ case 188:
{
if (!context->isExtensionEnabled(TExtension::EXT_YUV_target)) {
@@ -4107,7 +4032,7 @@
break;
- case 191:
+ case 189:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0]));
@@ -4115,7 +4040,7 @@
break;
- case 192:
+ case 190:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0]));
@@ -4123,7 +4048,7 @@
break;
- case 193:
+ case 191:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0]));
@@ -4131,7 +4056,7 @@
break;
- case 194:
+ case 192:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0]));
@@ -4139,7 +4064,7 @@
break;
- case 195:
+ case 193:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMS, (yylsp[0]));
@@ -4147,7 +4072,7 @@
break;
- case 196:
+ case 194:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0]));
@@ -4155,7 +4080,7 @@
break;
- case 197:
+ case 195:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0]));
@@ -4163,7 +4088,7 @@
break;
- case 198:
+ case 196:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0]));
@@ -4171,7 +4096,7 @@
break;
- case 199:
+ case 197:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0]));
@@ -4179,7 +4104,7 @@
break;
- case 200:
+ case 198:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMS, (yylsp[0]));
@@ -4187,7 +4112,7 @@
break;
- case 201:
+ case 199:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0]));
@@ -4195,7 +4120,7 @@
break;
- case 202:
+ case 200:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0]));
@@ -4203,7 +4128,7 @@
break;
- case 203:
+ case 201:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0]));
@@ -4211,7 +4136,7 @@
break;
- case 204:
+ case 202:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0]));
@@ -4219,7 +4144,7 @@
break;
- case 205:
+ case 203:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMS, (yylsp[0]));
@@ -4227,7 +4152,7 @@
break;
- case 206:
+ case 204:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0]));
@@ -4235,7 +4160,7 @@
break;
- case 207:
+ case 205:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0]));
@@ -4243,7 +4168,7 @@
break;
- case 208:
+ case 206:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0]));
@@ -4251,7 +4176,7 @@
break;
- case 209:
+ case 207:
{
if (!context->supportsExtension(TExtension::OES_EGL_image_external) &&
@@ -4263,7 +4188,7 @@
break;
- case 210:
+ case 208:
{
if (!context->isExtensionEnabled(TExtension::EXT_YUV_target)) {
@@ -4274,7 +4199,7 @@
break;
- case 211:
+ case 209:
{
if (!context->supportsExtension(TExtension::ARB_texture_rectangle)) {
@@ -4285,7 +4210,7 @@
break;
- case 212:
+ case 210:
{
(yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray);
@@ -4293,7 +4218,7 @@
break;
- case 213:
+ case 211:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0]));
@@ -4301,7 +4226,7 @@
break;
- case 214:
+ case 212:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0]));
@@ -4309,7 +4234,7 @@
break;
- case 215:
+ case 213:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0]));
@@ -4317,7 +4242,7 @@
break;
- case 216:
+ case 214:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0]));
@@ -4325,7 +4250,7 @@
break;
- case 217:
+ case 215:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0]));
@@ -4333,7 +4258,7 @@
break;
- case 218:
+ case 216:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0]));
@@ -4341,7 +4266,7 @@
break;
- case 219:
+ case 217:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0]));
@@ -4349,7 +4274,7 @@
break;
- case 220:
+ case 218:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0]));
@@ -4357,7 +4282,7 @@
break;
- case 221:
+ case 219:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0]));
@@ -4365,7 +4290,7 @@
break;
- case 222:
+ case 220:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0]));
@@ -4373,7 +4298,7 @@
break;
- case 223:
+ case 221:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0]));
@@ -4381,7 +4306,7 @@
break;
- case 224:
+ case 222:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0]));
@@ -4389,7 +4314,7 @@
break;
- case 225:
+ case 223:
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtAtomicCounter, (yylsp[0]));
@@ -4397,7 +4322,7 @@
break;
- case 226:
+ case 224:
{
// This is for user defined type names. The lexical phase looked up the type.
@@ -4407,13 +4332,13 @@
break;
- case 227:
+ case 225:
{ context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string); }
break;
- case 228:
+ case 226:
{
(yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
@@ -4421,13 +4346,13 @@
break;
- case 229:
+ case 227:
{ context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string); }
break;
- case 230:
+ case 228:
{
(yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-4]), (yyloc), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
@@ -4435,7 +4360,7 @@
break;
- case 231:
+ case 229:
{
(yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
@@ -4443,7 +4368,7 @@
break;
- case 232:
+ case 230:
{
(yyval.interm.fieldList) = context->combineStructFieldLists((yyvsp[-1].interm.fieldList), (yyvsp[0].interm.fieldList), (yylsp[0]));
@@ -4451,7 +4376,7 @@
break;
- case 233:
+ case 231:
{
(yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
@@ -4459,7 +4384,7 @@
break;
- case 234:
+ case 232:
{
// ES3 Only, but errors should be handled elsewhere
@@ -4468,7 +4393,7 @@
break;
- case 235:
+ case 233:
{
(yyval.interm.fieldList) = NewPoolTFieldList();
@@ -4477,7 +4402,7 @@
break;
- case 236:
+ case 234:
{
(yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
@@ -4485,7 +4410,7 @@
break;
- case 237:
+ case 235:
{
(yyval.interm.field) = context->parseStructDeclarator((yyvsp[0].lex).string, (yylsp[0]));
@@ -4493,7 +4418,7 @@
break;
- case 238:
+ case 236:
{
(yyval.interm.field) = context->parseStructArrayDeclarator((yyvsp[-3].lex).string, (yylsp[-3]), (yyvsp[-1].interm.intermTypedNode), (yylsp[-1]));
@@ -4501,12 +4426,24 @@
break;
- case 239:
+ case 237:
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
break;
+ case 238:
+
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+
+ break;
+
+ case 239:
+
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); }
+
+ break;
+
case 240:
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
@@ -4515,7 +4452,7 @@
case 241:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); }
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
break;
@@ -4533,42 +4470,30 @@
case 244:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
break;
case 245:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
break;
case 246:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
break;
case 247:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
break;
case 248:
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-
- break;
-
- case 249:
-
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-
- break;
-
- case 250:
-
{
(yyval.interm.intermBlock) = new TIntermBlock();
(yyval.interm.intermBlock)->setLine((yyloc));
@@ -4576,19 +4501,19 @@
break;
- case 251:
+ case 249:
{ context->symbolTable.push(); }
break;
- case 252:
+ case 250:
{ context->symbolTable.pop(); }
break;
- case 253:
+ case 251:
{
(yyvsp[-2].interm.intermBlock)->setLine((yyloc));
@@ -4597,18 +4522,30 @@
break;
- case 254:
+ case 252:
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); }
break;
- case 255:
+ case 253:
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
break;
+ case 254:
+
+ { context->symbolTable.push(); }
+
+ break;
+
+ case 255:
+
+ { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); }
+
+ break;
+
case 256:
{ context->symbolTable.push(); }
@@ -4617,23 +4554,11 @@
case 257:
- { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); }
-
- break;
-
- case 258:
-
- { context->symbolTable.push(); }
-
- break;
-
- case 259:
-
{ context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
break;
- case 260:
+ case 258:
{
(yyval.interm.intermBlock) = new TIntermBlock();
@@ -4642,7 +4567,7 @@
break;
- case 261:
+ case 259:
{
(yyvsp[-1].interm.intermBlock)->setLine((yyloc));
@@ -4651,7 +4576,7 @@
break;
- case 262:
+ case 260:
{
(yyval.interm.intermBlock) = new TIntermBlock();
@@ -4660,7 +4585,7 @@
break;
- case 263:
+ case 261:
{
(yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock);
@@ -4669,19 +4594,19 @@
break;
- case 264:
+ case 262:
{ (yyval.interm.intermNode) = 0; }
break;
- case 265:
+ case 263:
{ (yyval.interm.intermNode) = (yyvsp[-1].interm.intermTypedNode); }
break;
- case 266:
+ case 264:
{
(yyval.interm.intermNode) = context->addIfElse((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
@@ -4689,7 +4614,7 @@
break;
- case 267:
+ case 265:
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
@@ -4698,7 +4623,7 @@
break;
- case 268:
+ case 266:
{
(yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
@@ -4707,13 +4632,13 @@
break;
- case 269:
+ case 267:
{ context->incrSwitchNestingLevel(); }
break;
- case 270:
+ case 268:
{
(yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5]));
@@ -4722,7 +4647,7 @@
break;
- case 271:
+ case 269:
{
(yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
@@ -4730,7 +4655,7 @@
break;
- case 272:
+ case 270:
{
(yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
@@ -4738,7 +4663,7 @@
break;
- case 273:
+ case 271:
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode);
@@ -4747,7 +4672,7 @@
break;
- case 274:
+ case 272:
{
(yyval.interm.intermNode) = context->addConditionInitializer((yyvsp[-3].interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode), (yylsp[-2]));
@@ -4755,13 +4680,13 @@
break;
- case 275:
+ case 273:
{ context->symbolTable.push(); context->incrLoopNestingLevel(); }
break;
- case 276:
+ case 274:
{
context->symbolTable.pop();
@@ -4771,13 +4696,13 @@
break;
- case 277:
+ case 275:
{ context->incrLoopNestingLevel(); }
break;
- case 278:
+ case 276:
{
(yyval.interm.intermNode) = context->addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[-5].interm.intermNode), (yylsp[-4]));
@@ -4786,18 +4711,34 @@
break;
- case 279:
+ case 277:
{ context->symbolTable.push(); context->incrLoopNestingLevel(); }
break;
+ case 278:
+
+ {
+ context->symbolTable.pop();
+ (yyval.interm.intermNode) = context->addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), (yyvsp[-2].interm.nodePair).node1, reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6]));
+ context->decrLoopNestingLevel();
+ }
+
+ break;
+
+ case 279:
+
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+
+ break;
+
case 280:
{
- context->symbolTable.pop();
- (yyval.interm.intermNode) = context->addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), (yyvsp[-2].interm.nodePair).node1, reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6]));
- context->decrLoopNestingLevel();
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
@@ -4813,28 +4754,12 @@
case 282:
{
- (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
- }
-
- break;
-
- case 283:
-
- {
- (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
- }
-
- break;
-
- case 284:
-
- {
(yyval.interm.intermNode) = nullptr;
}
break;
- case 285:
+ case 283:
{
(yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermNode);
@@ -4843,7 +4768,7 @@
break;
- case 286:
+ case 284:
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
@@ -4852,7 +4777,7 @@
break;
- case 287:
+ case 285:
{
(yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
@@ -4860,7 +4785,7 @@
break;
- case 288:
+ case 286:
{
(yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
@@ -4868,7 +4793,7 @@
break;
- case 289:
+ case 287:
{
(yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
@@ -4876,7 +4801,7 @@
break;
- case 290:
+ case 288:
{
(yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
@@ -4884,7 +4809,7 @@
break;
- case 291:
+ case 289:
{
(yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
@@ -4892,7 +4817,7 @@
break;
- case 292:
+ case 290:
{
(yyval.interm.intermBlock) = new TIntermBlock();
@@ -4903,7 +4828,7 @@
break;
- case 293:
+ case 291:
{
(yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode));
@@ -4911,31 +4836,31 @@
break;
+ case 292:
+
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+
+ break;
+
+ case 293:
+
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+
+ break;
+
case 294:
{
- (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
- }
-
- break;
-
- case 295:
-
- {
- (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
- }
-
- break;
-
- case 296:
-
- {
context->parseFunctionDefinitionHeader((yylsp[0]), &((yyvsp[0].interm).function), &((yyvsp[0].interm).intermFunctionPrototype));
}
break;
- case 297:
+ case 295:
{
(yyval.interm.intermNode) = context->addFunctionDefinition((yyvsp[-2].interm).intermFunctionPrototype, (yyvsp[0].interm.intermBlock), (yylsp[-2]));
diff --git a/src/compiler/translator/glslang_tab.h b/src/compiler/translator/glslang_tab.h
index 6ade7a5..5624803 100644
--- a/src/compiler/translator/glslang_tab.h
+++ b/src/compiler/translator/glslang_tab.h
@@ -238,6 +238,7 @@
TIntermCase *intermCase;
};
union {
+ unsigned int arraySize;
TTypeSpecifierNonArray typeSpecifierNonArray;
TPublicType type;
TPrecision precision;
diff --git a/src/tests/compiler_tests/ShaderValidation_test.cpp b/src/tests/compiler_tests/ShaderValidation_test.cpp
index 2b43d89..f371759 100644
--- a/src/tests/compiler_tests/ShaderValidation_test.cpp
+++ b/src/tests/compiler_tests/ShaderValidation_test.cpp
@@ -5104,3 +5104,51 @@
FAIL() << "Shader compilation succeeded, expecting failure:\n" << mInfoLog;
}
}
+
+// Test that unsized struct members are not allowed.
+TEST_F(FragmentShaderValidationTest, UnsizedStructMember)
+{
+ const std::string &shaderString =
+ R"(#version 300 es
+
+ precision highp float;
+ out vec4 color;
+
+ struct S
+ {
+ int[] foo;
+ };
+
+ void main()
+ {
+ color = vec4(1.0);
+ })";
+
+ if (compile(shaderString))
+ {
+ FAIL() << "Shader compilation succeeded, expecting failure:\n" << mInfoLog;
+ }
+}
+
+// Test that unsized parameters without a name are not allowed.
+// GLSL ES 3.10 section 6.1 Function Definitions.
+TEST_F(FragmentShaderValidationTest, UnsizedNamelessParameter)
+{
+ const std::string &shaderString =
+ R"(#version 300 es
+
+ precision highp float;
+ out vec4 color;
+
+ void foo(int[]);
+
+ void main()
+ {
+ color = vec4(1.0);
+ })";
+
+ if (compile(shaderString))
+ {
+ FAIL() << "Shader compilation succeeded, expecting failure:\n" << mInfoLog;
+ }
+}