Commit 476541f6 by kbr@chromium.org

Implemented new restrictions on nesting of structs in WebGL shaders.

Added previously missing check for embedded structs; even though these attempts would be caught by an underlying GLSL compiler, the shader validator should not let them through. BUG=http://code.google.com/p/angleproject/issues/detail?id=235 TEST=WebGL conformance tests Review URL: http://codereview.appspot.com/5327046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@809 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c5a7b690
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 808 #define BUILD_REVISION 809
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -1425,6 +1425,53 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n ...@@ -1425,6 +1425,53 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n
return typedNode; return typedNode;
} }
bool TParseContext::enterStructDeclaration(int line, const TString& identifier)
{
++structNestingLevel;
// Embedded structure definitions are not supported per GLSL ES spec.
// They aren't allowed in GLSL either, but we need to detect this here
// so we don't rely on the GLSL compiler to catch it.
if (structNestingLevel > 1) {
error(line, "", "Embedded struct definitions are not allowed", "");
return true;
}
return false;
}
void TParseContext::exitStructDeclaration()
{
--structNestingLevel;
}
namespace {
const int kWebGLMaxStructNesting = 4;
} // namespace
bool TParseContext::structNestingErrorCheck(TSourceLoc line, const TType& fieldType)
{
if (shaderSpec != SH_WEBGL_SPEC) {
return false;
}
if (fieldType.getBasicType() != EbtStruct) {
return false;
}
// We're already inside a structure definition at this point, so add
// one to the field's struct nesting.
if (1 + fieldType.getDeepestStructNesting() >= kWebGLMaxStructNesting) {
error(line, "", "", "Reference of struct type %s exceeds maximum struct nesting of %d",
fieldType.getTypeName().c_str(), kWebGLMaxStructNesting);
return true;
}
return false;
}
// //
// Parse an array of strings using yyparse. // Parse an array of strings using yyparse.
// //
......
...@@ -31,9 +31,25 @@ struct TPragma { ...@@ -31,9 +31,25 @@ struct TPragma {
// //
struct TParseContext { struct TParseContext {
TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) : TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) :
intermediate(interm), symbolTable(symt), extensionBehavior(ext), infoSink(is), shaderType(type), shaderSpec(spec), compileOptions(options), checksPrecisionErrors(checksPrecErrors), sourcePath(sourcePath), treeRoot(0), intermediate(interm),
numErrors(0), lexAfterType(false), loopNestingLevel(0), symbolTable(symt),
inTypeParen(false), contextPragma(true, false), scanner(NULL) { } extensionBehavior(ext),
infoSink(is),
shaderType(type),
shaderSpec(spec),
compileOptions(options),
sourcePath(sourcePath),
treeRoot(0),
numErrors(0),
lexAfterType(false),
loopNestingLevel(0),
structNestingLevel(0),
inTypeParen(false),
currentFunctionType(NULL),
functionReturnsValue(false),
checksPrecisionErrors(checksPrecErrors),
contextPragma(true, false),
scanner(NULL) { }
TIntermediate& intermediate; // to hold and build a parse tree TIntermediate& intermediate; // to hold and build a parse tree
TSymbolTable& symbolTable; // symbol table that goes with the language currently being parsed TSymbolTable& symbolTable; // symbol table that goes with the language currently being parsed
TExtensionBehavior& extensionBehavior; // mapping between supported extensions and current behavior. TExtensionBehavior& extensionBehavior; // mapping between supported extensions and current behavior.
...@@ -46,6 +62,7 @@ struct TParseContext { ...@@ -46,6 +62,7 @@ struct TParseContext {
int numErrors; int numErrors;
bool lexAfterType; // true if we've recognized a type, so can only be looking for an identifier bool lexAfterType; // true if we've recognized a type, so can only be looking for an identifier
int loopNestingLevel; // 0 if outside all loops int loopNestingLevel; // 0 if outside all loops
int structNestingLevel; // incremented while parsing a struct declaration
bool inTypeParen; // true if in parentheses, looking only for an identifier bool inTypeParen; // true if in parentheses, looking only for an identifier
const TType* currentFunctionType; // the return type of the function that's currently being parsed const TType* currentFunctionType; // the return type of the function that's currently being parsed
bool functionReturnsValue; // true if a non-void function has a return bool functionReturnsValue; // true if a non-void function has a return
...@@ -105,6 +122,14 @@ struct TParseContext { ...@@ -105,6 +122,14 @@ struct TParseContext {
TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc); TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc);
TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line); TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line);
TIntermTyped* addConstStruct(TString& , TIntermTyped*, TSourceLoc); TIntermTyped* addConstStruct(TString& , TIntermTyped*, TSourceLoc);
// Performs an error check for embedded struct declarations.
// Returns true if an error was raised due to the declaration of
// this struct.
bool enterStructDeclaration(TSourceLoc line, const TString& identifier);
void exitStructDeclaration();
bool structNestingErrorCheck(TSourceLoc line, const TType& fieldType);
}; };
int PaParseStrings(int count, const char* const string[], const int length[], int PaParseStrings(int count, const char* const string[], const int length[],
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <stdio.h> #include <stdio.h>
#include <algorithm>
// //
// TType helper function needs a place to live. // TType helper function needs a place to live.
// //
...@@ -71,6 +73,20 @@ int TType::getStructSize() const ...@@ -71,6 +73,20 @@ int TType::getStructSize() const
return structureSize; return structureSize;
} }
void TType::computeDeepestStructNesting()
{
if (!getStruct()) {
return;
}
int maxNesting = 0;
for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); ++tl) {
maxNesting = std::max(maxNesting, ((*tl).type)->getDeepestStructNesting());
}
deepestStructNesting = 1 + maxNesting;
}
// //
// Dump functions. // Dump functions.
// //
......
...@@ -85,21 +85,22 @@ public: ...@@ -85,21 +85,22 @@ public:
TType() {} TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) : TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0) maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{ {
} }
explicit TType(const TPublicType &p) : explicit TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize), type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize),
maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0) maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{ {
if (p.userDef) { if (p.userDef) {
structure = p.userDef->getStruct(); structure = p.userDef->getStruct();
typeName = NewPoolTString(p.userDef->getTypeName().c_str()); typeName = NewPoolTString(p.userDef->getTypeName().c_str());
computeDeepestStructNesting();
} }
} }
TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) : TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0), type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0),
maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), fieldName(0), mangled(0) maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0)
{ {
typeName = NewPoolTString(n.c_str()); typeName = NewPoolTString(n.c_str());
} }
...@@ -144,6 +145,7 @@ public: ...@@ -144,6 +145,7 @@ public:
structureSize = copyOf.structureSize; structureSize = copyOf.structureSize;
maxArraySize = copyOf.maxArraySize; maxArraySize = copyOf.maxArraySize;
deepestStructNesting = copyOf.deepestStructNesting;
assert(copyOf.arrayInformationType == 0); assert(copyOf.arrayInformationType == 0);
arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level
} }
...@@ -202,7 +204,7 @@ public: ...@@ -202,7 +204,7 @@ public:
bool isScalar() const { return size == 1 && !matrix && !structure; } bool isScalar() const { return size == 1 && !matrix && !structure; }
TTypeList* getStruct() const { return structure; } TTypeList* getStruct() const { return structure; }
void setStruct(TTypeList* s) { structure = s; } void setStruct(TTypeList* s) { structure = s; computeDeepestStructNesting(); }
const TString& getTypeName() const const TString& getTypeName() const
{ {
...@@ -268,9 +270,24 @@ public: ...@@ -268,9 +270,24 @@ public:
const char* getQualifierString() const { return ::getQualifierString(qualifier); } const char* getQualifierString() const { return ::getQualifierString(qualifier); }
TString getCompleteString() const; TString getCompleteString() const;
// If this type is a struct, returns the deepest struct nesting of
// any field in the struct. For example:
// struct nesting1 {
// vec4 position;
// };
// struct nesting2 {
// nesting1 field1;
// vec4 field2;
// };
// For type "nesting2", this method would return 2 -- the number
// of structures through which indirection must occur to reach the
// deepest field (nesting2.field1.position).
int getDeepestStructNesting() const { return deepestStructNesting; }
protected: protected:
void buildMangledName(TString&); void buildMangledName(TString&);
int getStructSize() const; int getStructSize() const;
void computeDeepestStructNesting();
TBasicType type : 6; TBasicType type : 6;
TPrecision precision; TPrecision precision;
...@@ -284,6 +301,7 @@ protected: ...@@ -284,6 +301,7 @@ protected:
TTypeList* structure; // 0 unless this is a struct TTypeList* structure; // 0 unless this is a struct
mutable int structureSize; mutable int structureSize;
int deepestStructNesting;
TString *fieldName; // for structure field names TString *fieldName; // for structure field names
TString *mangled; TString *mangled;
......
...@@ -1642,11 +1642,11 @@ type_specifier_nonarray ...@@ -1642,11 +1642,11 @@ type_specifier_nonarray
; ;
struct_specifier struct_specifier
: STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE { : STRUCT IDENTIFIER LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
if (context->reservedErrorCheck($2.line, *$2.string)) if (context->reservedErrorCheck($2.line, *$2.string))
context->recover(); context->recover();
TType* structure = new TType($4, *$2.string); TType* structure = new TType($5, *$2.string);
TVariable* userTypeDef = new TVariable($2.string, *structure, true); TVariable* userTypeDef = new TVariable($2.string, *structure, true);
if (! context->symbolTable.insert(*userTypeDef)) { if (! context->symbolTable.insert(*userTypeDef)) {
context->error($2.line, "redefinition", $2.string->c_str(), "struct"); context->error($2.line, "redefinition", $2.string->c_str(), "struct");
...@@ -1654,11 +1654,13 @@ struct_specifier ...@@ -1654,11 +1654,13 @@ struct_specifier
} }
$$.setBasic(EbtStruct, EvqTemporary, $1.line); $$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure; $$.userDef = structure;
context->exitStructDeclaration();
} }
| STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE { | STRUCT LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
TType* structure = new TType($3, TString("")); TType* structure = new TType($4, TString(""));
$$.setBasic(EbtStruct, EvqTemporary, $1.line); $$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure; $$.userDef = structure;
context->exitStructDeclaration();
} }
; ;
...@@ -1708,6 +1710,10 @@ struct_declaration ...@@ -1708,6 +1710,10 @@ struct_declaration
type->setStruct($1.userDef->getStruct()); type->setStruct($1.userDef->getStruct());
type->setTypeName($1.userDef->getTypeName()); type->setTypeName($1.userDef->getTypeName());
} }
if (context->structNestingErrorCheck($1.line, *type)) {
context->recover();
}
} }
} }
; ;
......
...@@ -327,7 +327,7 @@ typedef union YYSTYPE ...@@ -327,7 +327,7 @@ typedef union YYSTYPE
}; };
} interm; } interm;
} }
/* Line 187 of yacc.c. */ /* Line 193 of yacc.c. */
YYSTYPE; YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
...@@ -417,7 +417,7 @@ typedef short int yytype_int16; ...@@ -417,7 +417,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ #ifndef YY_
# if YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(msgid) dgettext ("bison-runtime", msgid)
...@@ -582,16 +582,16 @@ union yyalloc ...@@ -582,16 +582,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 70 #define YYFINAL 70
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1381 #define YYLAST 1327
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 95 #define YYNTOKENS 95
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 78 #define YYNNTS 80
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 194 #define YYNRULES 196
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 297 #define YYNSTATES 299
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
...@@ -658,19 +658,19 @@ static const yytype_uint16 yyprhs[] = ...@@ -658,19 +658,19 @@ static const yytype_uint16 yyprhs[] =
298, 303, 306, 308, 311, 313, 315, 317, 320, 322, 298, 303, 306, 308, 311, 313, 315, 317, 320, 322,
324, 327, 329, 331, 333, 335, 340, 342, 344, 346, 324, 327, 329, 331, 333, 335, 340, 342, 344, 346,
348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366,
368, 370, 372, 374, 376, 378, 380, 382, 388, 393, 368, 370, 372, 374, 376, 378, 380, 382, 383, 390,
395, 398, 402, 404, 408, 410, 415, 417, 419, 421, 391, 397, 399, 402, 406, 408, 412, 414, 419, 421,
423, 425, 427, 429, 431, 433, 436, 437, 438, 444, 423, 425, 427, 429, 431, 433, 435, 437, 440, 441,
446, 448, 451, 455, 457, 460, 462, 465, 471, 475, 442, 448, 450, 452, 455, 459, 461, 464, 466, 469,
477, 479, 484, 485, 492, 493, 502, 503, 511, 513, 475, 479, 481, 483, 488, 489, 496, 497, 506, 507,
515, 517, 518, 521, 525, 528, 531, 534, 538, 541, 515, 517, 519, 521, 522, 525, 529, 532, 535, 538,
543, 546, 548, 550, 551 542, 545, 547, 550, 552, 554, 555
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] = static const yytype_int16 yyrhs[] =
{ {
169, 0, -1, 44, -1, 96, -1, 47, -1, 46, 171, 0, -1, 44, -1, 96, -1, 47, -1, 46,
-1, 48, -1, 71, 123, 72, -1, 97, -1, 98, -1, 48, -1, 71, 123, 72, -1, 97, -1, 98,
73, 99, 74, -1, 100, -1, 98, 77, 49, -1, 73, 99, 74, -1, 100, -1, 98, 77, 49, -1,
98, 52, -1, 98, 53, -1, 123, -1, 101, -1, 98, 52, -1, 98, 53, -1, 123, -1, 101, -1,
...@@ -698,9 +698,9 @@ static const yytype_int16 yyrhs[] = ...@@ -698,9 +698,9 @@ static const yytype_int16 yyrhs[] =
-1, 34, -1, 35, -1, 138, -1, 135, -1, 134, -1, 34, -1, 35, -1, 138, -1, 135, -1, 134,
78, 44, -1, 134, 78, 44, 73, 74, -1, 134, 78, 44, -1, 134, 78, 44, 73, 74, -1, 134,
78, 44, 73, 124, 74, -1, 134, 78, 44, 80, 78, 44, 73, 124, 74, -1, 134, 78, 44, 80,
147, -1, 136, -1, 136, 44, -1, 136, 44, 73, 149, -1, 136, -1, 136, 44, -1, 136, 44, 73,
74, -1, 136, 44, 73, 124, 74, -1, 136, 44, 74, -1, 136, 44, 73, 124, 74, -1, 136, 44,
80, 147, -1, 3, 44, -1, 138, -1, 137, 138, 80, 149, -1, 3, 44, -1, 138, -1, 137, 138,
-1, 9, -1, 8, -1, 37, -1, 3, 37, -1, -1, 9, -1, 8, -1, 37, -1, 3, 37, -1,
36, -1, 140, -1, 139, 140, -1, 4, -1, 5, 36, -1, 140, -1, 139, 140, -1, 4, -1, 5,
-1, 6, -1, 141, -1, 141, 73, 124, 74, -1, -1, 6, -1, 141, -1, 141, 73, 124, 74, -1,
...@@ -708,24 +708,24 @@ static const yytype_int16 yyrhs[] = ...@@ -708,24 +708,24 @@ static const yytype_int16 yyrhs[] =
28, -1, 29, -1, 21, -1, 22, -1, 23, -1, 28, -1, 29, -1, 21, -1, 22, -1, 23, -1,
24, -1, 25, -1, 26, -1, 30, -1, 31, -1, 24, -1, 25, -1, 26, -1, 30, -1, 31, -1,
32, -1, 41, -1, 42, -1, 43, -1, 142, -1, 32, -1, 41, -1, 42, -1, 43, -1, 142, -1,
45, -1, 38, 44, 75, 143, 76, -1, 38, 75, 45, -1, -1, 38, 44, 75, 143, 145, 76, -1,
143, 76, -1, 144, -1, 143, 144, -1, 138, 145, -1, 38, 75, 144, 145, 76, -1, 146, -1, 145,
81, -1, 146, -1, 145, 78, 146, -1, 44, -1, 146, -1, 138, 147, 81, -1, 148, -1, 147, 78,
44, 73, 124, 74, -1, 121, -1, 125, -1, 151, 148, -1, 44, -1, 44, 73, 124, 74, -1, 121,
-1, 150, -1, 148, -1, 157, -1, 158, -1, 161, -1, 125, -1, 153, -1, 152, -1, 150, -1, 159,
-1, 168, -1, 75, 76, -1, -1, -1, 75, 152, -1, 160, -1, 163, -1, 170, -1, 75, 76, -1,
156, 153, 76, -1, 155, -1, 150, -1, 75, 76, -1, -1, 75, 154, 158, 155, 76, -1, 157, -1,
-1, 75, 156, 76, -1, 149, -1, 156, 149, -1, 152, -1, 75, 76, -1, 75, 158, 76, -1, 151,
81, -1, 123, 81, -1, 18, 71, 123, 72, 159, -1, 158, 151, -1, 81, -1, 123, 81, -1, 18,
-1, 149, 16, 149, -1, 149, -1, 123, -1, 136, 71, 123, 72, 161, -1, 151, 16, 151, -1, 151,
44, 80, 147, -1, -1, 40, 71, 162, 160, 72, -1, 123, -1, 136, 44, 80, 149, -1, -1, 40,
154, -1, -1, 15, 163, 149, 40, 71, 123, 72, 71, 164, 162, 72, 156, -1, -1, 15, 165, 151,
81, -1, -1, 17, 71, 164, 165, 167, 72, 154, 40, 71, 123, 72, 81, -1, -1, 17, 71, 166,
-1, 157, -1, 148, -1, 160, -1, -1, 166, 81, 167, 169, 72, 156, -1, 159, -1, 150, -1, 162,
-1, 166, 81, 123, -1, 14, 81, -1, 13, 81, -1, -1, 168, 81, -1, 168, 81, 123, -1, 14,
-1, 20, 81, -1, 20, 123, 81, -1, 19, 81, 81, -1, 13, 81, -1, 20, 81, -1, 20, 123,
-1, 170, -1, 169, 170, -1, 171, -1, 125, -1, 81, -1, 19, 81, -1, 172, -1, 171, 172, -1,
-1, 126, 172, 155, -1 173, -1, 125, -1, -1, 126, 174, 157, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
...@@ -744,13 +744,13 @@ static const yytype_uint16 yyrline[] = ...@@ -744,13 +744,13 @@ static const yytype_uint16 yyrline[] =
1316, 1336, 1412, 1421, 1444, 1447, 1453, 1461, 1469, 1477, 1316, 1336, 1412, 1421, 1444, 1447, 1453, 1461, 1469, 1477,
1487, 1494, 1497, 1500, 1506, 1509, 1524, 1528, 1532, 1536, 1487, 1494, 1497, 1500, 1506, 1509, 1524, 1528, 1532, 1536,
1545, 1550, 1555, 1560, 1565, 1570, 1575, 1580, 1585, 1590, 1545, 1550, 1555, 1560, 1565, 1570, 1575, 1580, 1585, 1590,
1596, 1602, 1608, 1613, 1618, 1627, 1632, 1645, 1658, 1666, 1596, 1602, 1608, 1613, 1618, 1627, 1632, 1645, 1645, 1659,
1669, 1684, 1716, 1720, 1726, 1734, 1750, 1754, 1758, 1759, 1659, 1668, 1671, 1686, 1722, 1726, 1732, 1740, 1756, 1760,
1765, 1766, 1767, 1768, 1769, 1773, 1774, 1774, 1774, 1784, 1764, 1765, 1771, 1772, 1773, 1774, 1775, 1779, 1780, 1780,
1785, 1790, 1793, 1803, 1806, 1812, 1813, 1817, 1825, 1829, 1780, 1790, 1791, 1796, 1799, 1809, 1812, 1818, 1819, 1823,
1839, 1844, 1861, 1861, 1866, 1866, 1873, 1873, 1881, 1884, 1831, 1835, 1845, 1850, 1867, 1867, 1872, 1872, 1879, 1879,
1890, 1893, 1899, 1903, 1910, 1917, 1924, 1931, 1942, 1951, 1887, 1890, 1896, 1899, 1905, 1909, 1916, 1923, 1930, 1937,
1955, 1962, 1965, 1971, 1971 1948, 1957, 1961, 1968, 1971, 1977, 1977
}; };
#endif #endif
...@@ -794,16 +794,16 @@ static const char *const yytname[] = ...@@ -794,16 +794,16 @@ static const char *const yytname[] =
"init_declarator_list", "single_declaration", "fully_specified_type", "init_declarator_list", "single_declaration", "fully_specified_type",
"type_qualifier", "type_specifier", "precision_qualifier", "type_qualifier", "type_specifier", "precision_qualifier",
"type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
"struct_declaration_list", "struct_declaration", "@1", "@2", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer", "struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement", "declaration_statement", "statement", "simple_statement",
"compound_statement", "@1", "@2", "statement_no_new_scope", "compound_statement", "@3", "@4", "statement_no_new_scope",
"compound_statement_no_new_scope", "statement_list", "compound_statement_no_new_scope", "statement_list",
"expression_statement", "selection_statement", "expression_statement", "selection_statement",
"selection_rest_statement", "condition", "iteration_statement", "@3", "selection_rest_statement", "condition", "iteration_statement", "@5",
"@4", "@5", "for_init_statement", "conditionopt", "for_rest_statement", "@6", "@7", "for_init_statement", "conditionopt", "for_rest_statement",
"jump_statement", "translation_unit", "external_declaration", "jump_statement", "translation_unit", "external_declaration",
"function_definition", "@6", 0 "function_definition", "@8", 0
}; };
#endif #endif
...@@ -841,13 +841,13 @@ static const yytype_uint8 yyr1[] = ...@@ -841,13 +841,13 @@ static const yytype_uint8 yyr1[] =
135, 135, 136, 136, 137, 137, 137, 137, 137, 138, 135, 135, 136, 136, 137, 137, 137, 137, 137, 138,
138, 139, 139, 139, 140, 140, 141, 141, 141, 141, 138, 139, 139, 139, 140, 140, 141, 141, 141, 141,
141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
141, 141, 141, 141, 141, 141, 141, 142, 142, 143, 141, 141, 141, 141, 141, 141, 141, 143, 142, 144,
143, 144, 145, 145, 146, 146, 147, 148, 149, 149, 142, 145, 145, 146, 147, 147, 148, 148, 149, 150,
150, 150, 150, 150, 150, 151, 152, 153, 151, 154, 151, 151, 152, 152, 152, 152, 152, 153, 154, 155,
154, 155, 155, 156, 156, 157, 157, 158, 159, 159, 153, 156, 156, 157, 157, 158, 158, 159, 159, 160,
160, 160, 162, 161, 163, 161, 164, 161, 165, 165, 161, 161, 162, 162, 164, 163, 165, 163, 166, 163,
166, 166, 167, 167, 168, 168, 168, 168, 168, 169, 167, 167, 168, 168, 169, 169, 170, 170, 170, 170,
169, 170, 170, 172, 171 170, 171, 171, 172, 172, 174, 173
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -866,13 +866,13 @@ static const yytype_uint8 yyr2[] = ...@@ -866,13 +866,13 @@ static const yytype_uint8 yyr2[] =
4, 2, 1, 2, 1, 1, 1, 2, 1, 1, 4, 2, 1, 2, 1, 1, 1, 2, 1, 1,
2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 0,
2, 3, 1, 3, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 1, 3, 1, 4, 1, 1,
1, 1, 1, 1, 1, 2, 0, 0, 5, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1, 2, 3, 1, 2, 1, 2, 5, 3, 1, 5, 1, 1, 2, 3, 1, 2, 1, 2, 5,
1, 4, 0, 6, 0, 8, 0, 7, 1, 1, 3, 1, 1, 4, 0, 6, 0, 8, 0, 7,
1, 0, 2, 3, 2, 2, 2, 3, 2, 1, 1, 1, 1, 0, 2, 3, 2, 2, 2, 3,
2, 1, 1, 0, 3 2, 1, 2, 1, 1, 0, 3
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
...@@ -883,96 +883,96 @@ static const yytype_uint8 yydefact[] = ...@@ -883,96 +883,96 @@ static const yytype_uint8 yydefact[] =
0, 0, 111, 112, 113, 0, 105, 104, 119, 117, 0, 0, 111, 112, 113, 0, 105, 104, 119, 117,
118, 123, 124, 125, 126, 127, 128, 120, 121, 122, 118, 123, 124, 125, 126, 127, 128, 120, 121, 122,
129, 130, 131, 108, 106, 0, 116, 132, 133, 134, 129, 130, 131, 108, 106, 0, 116, 132, 133, 134,
136, 192, 193, 0, 76, 86, 0, 91, 96, 0, 136, 194, 195, 0, 76, 86, 0, 91, 96, 0,
102, 0, 109, 114, 135, 0, 189, 191, 107, 101, 102, 0, 109, 114, 135, 0, 191, 193, 107, 101,
0, 0, 0, 71, 0, 74, 86, 0, 87, 88, 0, 0, 139, 71, 0, 74, 86, 0, 87, 88,
89, 77, 0, 86, 0, 72, 97, 103, 110, 0, 89, 77, 0, 86, 0, 72, 97, 103, 110, 0,
1, 190, 0, 0, 0, 0, 139, 0, 194, 78, 1, 192, 0, 137, 0, 0, 196, 78, 83, 85,
83, 85, 90, 0, 92, 79, 0, 0, 2, 5, 90, 0, 92, 79, 0, 0, 2, 5, 4, 6,
4, 6, 27, 0, 0, 0, 34, 33, 32, 3, 27, 0, 0, 0, 34, 33, 32, 3, 8, 28,
8, 28, 10, 15, 16, 0, 0, 21, 0, 35, 10, 15, 16, 0, 0, 21, 0, 35, 0, 38,
0, 38, 41, 42, 47, 50, 51, 52, 53, 55, 41, 42, 47, 50, 51, 52, 53, 55, 57, 59,
57, 59, 70, 0, 25, 73, 0, 144, 0, 142, 70, 0, 25, 73, 0, 0, 0, 141, 0, 0,
138, 140, 0, 0, 174, 0, 0, 0, 0, 0, 176, 0, 0, 0, 0, 0, 158, 163, 167, 35,
156, 161, 165, 35, 61, 68, 0, 147, 0, 114, 61, 68, 0, 149, 0, 114, 152, 165, 151, 150,
150, 163, 149, 148, 0, 151, 152, 153, 154, 80, 0, 153, 154, 155, 156, 80, 82, 84, 0, 0,
82, 84, 0, 0, 98, 0, 146, 100, 29, 30, 98, 0, 148, 100, 29, 30, 0, 12, 13, 0,
0, 12, 13, 0, 0, 19, 18, 0, 20, 22, 0, 19, 18, 0, 20, 22, 24, 31, 0, 0,
24, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 115, 137, 0, 0, 0, 0, 115, 0, 146, 0, 144, 140, 142, 187,
141, 185, 184, 0, 176, 0, 188, 186, 0, 172, 186, 0, 178, 0, 190, 188, 0, 174, 157, 0,
155, 0, 64, 65, 66, 67, 63, 0, 0, 166, 64, 65, 66, 67, 63, 0, 0, 168, 164, 166,
162, 164, 0, 93, 0, 95, 99, 7, 0, 14, 0, 93, 0, 95, 99, 7, 0, 14, 26, 11,
26, 11, 17, 23, 36, 37, 40, 39, 45, 46, 17, 23, 36, 37, 40, 39, 45, 46, 43, 44,
43, 44, 48, 49, 54, 56, 58, 0, 0, 143, 48, 49, 54, 56, 58, 0, 138, 0, 0, 143,
0, 0, 0, 187, 0, 157, 62, 69, 0, 94, 0, 0, 0, 189, 0, 159, 62, 69, 0, 94,
9, 0, 145, 0, 179, 178, 181, 0, 170, 0, 9, 0, 0, 145, 0, 181, 180, 183, 0, 172,
0, 0, 81, 60, 0, 180, 0, 0, 169, 167, 0, 0, 0, 81, 60, 147, 0, 182, 0, 0,
0, 0, 158, 0, 182, 0, 0, 0, 160, 173, 171, 169, 0, 0, 160, 0, 184, 0, 0, 0,
159, 0, 183, 177, 168, 171, 175 162, 175, 161, 0, 185, 179, 170, 173, 177
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] = static const yytype_int16 yydefgoto[] =
{ {
-1, 99, 100, 101, 228, 102, 103, 104, 105, 106, -1, 97, 98, 99, 226, 100, 101, 102, 103, 104,
107, 108, 143, 110, 111, 112, 113, 114, 115, 116, 105, 106, 139, 108, 109, 110, 111, 112, 113, 114,
117, 118, 119, 120, 121, 144, 145, 217, 146, 123, 115, 116, 117, 118, 119, 140, 141, 215, 142, 121,
147, 148, 33, 34, 35, 80, 61, 62, 81, 36, 143, 144, 33, 34, 35, 78, 61, 62, 79, 36,
37, 38, 39, 40, 41, 42, 124, 44, 75, 76, 37, 38, 39, 40, 41, 42, 122, 44, 124, 74,
128, 129, 167, 150, 151, 152, 153, 211, 271, 289, 126, 127, 195, 196, 163, 146, 147, 148, 149, 209,
290, 154, 155, 156, 279, 270, 157, 254, 203, 251, 272, 291, 292, 150, 151, 152, 281, 271, 153, 254,
266, 276, 277, 158, 45, 46, 47, 54 201, 251, 267, 278, 279, 154, 45, 46, 47, 54
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -251 #define YYPACT_NINF -242
static const yytype_int16 yypact[] = static const yytype_int16 yypact[] =
{ {
1233, -19, -251, -251, -251, 130, -251, -251, -251, -251, 1179, -6, -242, -242, -242, 151, -242, -242, -242, -242,
-251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
-251, -251, -251, -251, -251, -24, -251, -251, -251, -251, -242, -242, -242, -242, -242, -39, -242, -242, -242, -242,
-251, -251, -62, -6, 17, 34, -20, -251, 36, 1275, -242, -242, -69, -37, -32, 21, -61, -242, 26, 1221,
-251, 1336, -251, 32, -251, 1190, -251, -251, -251, -251, -242, 1282, -242, -58, -242, 207, -242, -242, -242, -242,
1336, 44, 1275, -251, 47, -251, 51, 78, -251, -251, 1282, 22, -242, -242, 33, -242, 70, 88, -242, -242,
-251, -251, 1275, 109, 81, -251, -50, -251, -251, 959, -242, -242, 1221, 125, 42, -242, -8, -242, -242, 961,
-251, -251, 56, 1275, 102, 1092, -251, 284, -251, -251, -242, -242, 72, -242, 1221, 286, -242, -242, -242, -242,
-251, -251, 111, 1275, -44, -251, 764, 959, 87, -251, 117, 1221, -57, -242, 766, 961, 94, -242, -242, -242,
-251, -251, -251, 959, 959, 959, -251, -251, -251, -251, -242, 961, 961, 961, -242, -242, -242, -242, -242, 14,
-251, 37, -251, -251, -251, 89, 22, 1024, 88, -251, -242, -242, -242, 99, -35, 1026, 101, -242, 961, -27,
959, -54, -9, -251, -43, 92, -251, -251, -251, 105, 46, -242, -21, 56, -242, -242, -242, 115, 119, -45,
104, -45, -251, 91, -251, -251, 1134, 93, 15, -251, -242, 103, -242, -242, 1221, 136, 1094, -242, 102, 104,
-251, -251, 86, 90, -251, 97, 98, 94, 829, 99, -242, 111, 116, 105, 831, 118, 112, -242, -242, 39,
101, -251, -251, 2, -251, -251, 31, -251, -62, 74, -242, -242, 17, -242, -69, 93, -242, -242, -242, -242,
-251, -251, -251, -251, 367, -251, -251, -251, -251, 100, 369, -242, -242, -242, -242, 122, -242, -242, 896, 961,
-251, -251, 894, 959, -251, 107, -251, -251, -251, -251, -242, 123, -242, -242, -242, -242, 10, -242, -242, 961,
25, -251, -251, 959, 1300, -251, -251, 959, 103, -251, 1246, -242, -242, 961, 120, -242, -242, -242, 961, 961,
-251, -251, 959, 959, 959, 959, 959, 959, 959, 959, 961, 961, 961, 961, 961, 961, 961, 961, 961, 961,
959, 959, 959, 959, 959, 959, -251, -251, 959, 102, 961, 961, -242, 1136, 126, 49, -242, -242, -242, -242,
-251, -251, -251, 450, -251, 959, -251, -251, 40, -251, -242, 452, -242, 961, -242, -242, 71, -242, -242, 452,
-251, 450, -251, -251, -251, -251, -251, 959, 959, -251, -242, -242, -242, -242, -242, 961, 961, -242, -242, -242,
-251, -251, 959, -251, 108, -251, -251, -251, 110, 113, 961, -242, 124, -242, -242, -242, 128, 114, -242, 129,
-251, 112, -251, -251, -251, -251, -54, -54, -251, -251, -242, -242, -242, -242, -27, -27, -242, -242, -242, -242,
-251, -251, -43, -43, -251, 105, 104, 72, 114, -251, -21, -21, -242, 115, 119, 89, -242, 961, 136, -242,
138, 616, 26, -251, 699, 450, -251, -251, 115, -251, 150, 618, 11, -242, 701, 452, -242, -242, 130, -242,
-251, 959, -251, 116, -251, -251, 699, 450, 113, 135, -242, 961, 131, -242, 137, -242, -242, 701, 452, 114,
121, 118, -251, -251, 959, -251, 117, 123, 169, -251, 152, 148, 145, -242, -242, -242, 961, -242, 141, 153,
106, 533, -251, 35, 959, 533, 450, 959, -251, -251, 208, -242, 143, 535, -242, 38, 961, 535, 452, 961,
-251, 119, 113, -251, -251, -251, -251 -242, -242, -242, 146, 114, -242, -242, -242, -242
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] = static const yytype_int16 yypgoto[] =
{ {
-251, -251, -251, -251, -251, -251, -251, 23, -251, -251, -242, -242, -242, -242, -242, -242, -242, 77, -242, -242,
-251, -251, 30, -251, -32, -251, -58, -34, -251, -251, -242, -242, -44, -242, -63, -242, -62, -17, -242, -242,
-251, 4, 6, 7, -251, -60, -85, -251, -94, -81, -242, 52, 37, 51, -242, -66, -83, -242, -92, -73,
8, 10, -251, -251, -251, 122, 148, 143, 124, -251, 7, 8, -242, -242, -242, 161, 197, 193, 176, -242,
-251, -238, -22, -35, 203, -26, 0, -251, 136, -69, -242, -241, -29, -30, 253, -22, 0, -242, -242, -242,
-251, 11, -160, -25, -147, -250, -251, -251, -251, -56, 135, -122, -242, 12, -138, 13, -140, -203, -242, -242,
171, 16, -21, -251, -251, -33, -251, -251, -251, -251, -242, -26, 209, 53, 15, -242, -242, -2, -242, -242,
-251, -251, -251, -251, -251, 186, -251, -251 -242, -242, -242, -242, -242, -242, -242, 224, -242, -242
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
...@@ -982,288 +982,276 @@ static const yytype_int16 yypgoto[] = ...@@ -982,288 +982,276 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -117 #define YYTABLE_NINF -117
static const yytype_int16 yytable[] = static const yytype_int16 yytable[] =
{ {
43, 170, 166, 225, 67, 165, 131, 221, 31, 122, 43, 166, 162, 120, 198, 51, 63, 31, 32, 67,
32, 186, 187, 63, 194, 68, 269, 74, 48, 53, 219, 161, 53, 270, 190, 69, 158, 64, 120, 68,
51, 85, 179, 86, 72, 49, 122, 82, 269, 162, 65, 223, 175, 159, 57, 107, 270, 63, 72, 6,
87, 288, 182, 183, 63, 288, 163, 57, 74, 43, 7, 48, 80, 182, 183, 55, 52, 172, 49, 43,
74, 43, 6, 7, 208, 43, 188, 189, 82, 195, 107, 43, 206, 173, 125, 43, 56, 164, 165, 191,
43, 52, 43, 31, 57, 32, 250, 131, 64, 6, 43, 80, 31, 32, 58, 59, 60, 23, 24, 178,
7, 65, 43, 212, 213, 214, 55, 58, 59, 60, 179, 250, 43, 83, 177, 84, 167, 168, 184, 185,
23, 24, 215, 43, 184, 43, 185, 149, 166, 229, 66, 198, 85, 57, 43, 145, 162, 227, 6, 7,
66, 224, 216, 43, 58, 59, 60, 23, 24, 171, 290, 43, 225, 268, 290, 222, 82, 169, 216, 216,
172, 74, 233, 199, 176, 56, 200, 227, 267, 109, 231, 170, 120, -75, 125, 216, 125, 73, 217, 245,
177, 247, 122, 218, 218, 69, -75, 291, 221, 218, 210, 211, 212, 58, 59, 60, 23, 24, 75, 213,
173, 252, 219, 218, 174, 48, 109, 248, 218, 73, 293, 252, 186, 187, 107, 219, 216, 234, 235, 214,
278, 253, 77, 168, 169, 84, 43, 295, 238, 239, 236, 237, 238, 239, 43, 48, 43, 248, 280, 180,
240, 241, 256, 257, 2, 3, 4, 125, 122, 294, 249, 181, 256, 257, 232, 233, 107, 107, 107, 107,
181, 258, 58, 59, 60, -25, 127, 69, 190, 191, 107, 107, 107, 107, 107, 107, 107, 258, 296, 216,
218, 261, 236, 237, 149, 159, 242, 243, -26, 180, 145, 297, 253, 123, 120, 2, 3, 4, 58, 59,
268, 175, 122, 192, 193, 196, 198, 201, 204, 205, 60, 155, 269, 125, -25, -26, 69, 216, 261, 240,
209, 202, 268, 222, -116, 206, 273, 210, 263, 280, 241, 171, 176, 188, 262, 269, 107, 192, 274, 189,
283, 226, 259, -27, 260, 286, 287, 274, 262, 272, 194, 120, 202, 199, 285, 200, 204, 203, 208, 207,
292, 218, 109, 281, 282, 285, 244, 232, 284, 245, 264, -116, 216, 43, 294, 220, 282, 224, 259, 247,
296, 246, 166, 149, 79, 160, 83, 161, 50, 126, -27, 145, 260, 107, 273, 275, 162, 70, 276, 145,
249, 149, 234, 235, 109, 109, 109, 109, 109, 109,
109, 109, 109, 109, 109, 78, 264, 255, 109, 293,
265, 71, 0, 275, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 149, 109, 0, 149, 149, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 149, 149, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 149, 0, 0, 0, 149, 149, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 132, 133, 134,
0, 135, 136, 137, 138, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
23, 24, 25, 26, 139, 27, 28, 29, 88, 30,
89, 90, 91, 92, 0, 0, 93, 94, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 0, 140,
141, 0, 0, 0, 0, 142, 96, 97, 0, 98,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
132, 133, 134, 0, 135, 136, 137, 138, 11, 12, 283, 284, 286, 289, 288, 287, 243, 298, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
0, 0, 0, 23, 24, 25, 26, 139, 27, 28, 242, 244, 156, 23, 24, 25, 26, 230, 27, 28,
29, 88, 30, 89, 90, 91, 92, 0, 0, 93, 29, 145, 30, 77, 145, 145, 81, 157, 50, 193,
94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, 295, 255, 76, 265, 277, 266, 145, 145, 71,
0, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 0, 140, 220, 0, 0, 0, 0, 142, 96,
97, 0, 98, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 132, 133, 134, 0, 135, 136, 137,
138, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 0, 0, 0, 23, 24, 25, 26,
139, 27, 28, 29, 88, 30, 89, 90, 91, 92,
0, 0, 93, 94, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 95, 0, 0, 0, 140, 0, 0, 0, 0,
0, 142, 96, 97, 0, 98, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 132, 133, 134, 0,
135, 136, 137, 138, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
24, 25, 26, 139, 27, 28, 29, 88, 30, 89,
90, 91, 92, 0, 0, 93, 94, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 95, 0, 0, 0, 77, 0, 0, 0, 0, 145, 0, 0, 0, 145, 145, 1,
0, 0, 0, 0, 142, 96, 97, 0, 98, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 128,
2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 129, 130, 0, 131, 132, 133, 134, 11, 12, 13,
0, 0, 0, 0, 0, 0, 0, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
0, 0, 23, 24, 25, 26, 0, 27, 28, 29, 0, 0, 23, 24, 25, 26, 135, 27, 28, 29,
88, 30, 89, 90, 91, 92, 0, 0, 93, 94, 86, 30, 87, 88, 89, 90, 0, 0, 91, 92,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0,
0, 0, 0, 0, 0, 0, 0, 142, 96, 97, 0, 136, 137, 0, 0, 0, 0, 138, 94, 95,
0, 98, 57, 2, 3, 4, 0, 6, 7, 8, 0, 96, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 128, 129, 130, 0, 131, 132, 133, 134,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 0, 0, 0, 23, 24, 25, 26, 0, 21, 22, 0, 0, 0, 23, 24, 25, 26, 135,
27, 28, 29, 88, 30, 89, 90, 91, 92, 0, 27, 28, 29, 86, 30, 87, 88, 89, 90, 0,
0, 93, 94, 0, 0, 0, 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 8, 9, 10, 0, 0, 0, 93, 0, 0, 0, 136, 218, 0, 0, 0, 0,
0, 96, 97, 0, 98, 11, 12, 13, 14, 15, 138, 94, 95, 0, 96, 1, 2, 3, 4, 5,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0, 6, 7, 8, 9, 10, 128, 129, 130, 0, 131,
0, 0, 25, 26, 0, 27, 28, 29, 88, 30, 132, 133, 134, 11, 12, 13, 14, 15, 16, 17,
89, 90, 91, 92, 0, 0, 93, 94, 0, 0, 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
25, 26, 135, 27, 28, 29, 86, 30, 87, 88,
89, 90, 0, 0, 91, 92, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 164, 8, 0, 0, 0, 93, 0, 0, 0, 136, 0, 0,
9, 10, 0, 0, 0, 0, 96, 97, 0, 98, 0, 0, 0, 138, 94, 95, 0, 96, 1, 2,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 3, 4, 5, 6, 7, 8, 9, 10, 128, 129,
21, 22, 0, 0, 0, 0, 0, 25, 26, 0, 130, 0, 131, 132, 133, 134, 11, 12, 13, 14,
27, 28, 29, 88, 30, 89, 90, 91, 92, 0, 15, 16, 17, 18, 19, 20, 21, 22, 0, 0,
0, 93, 94, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, 135, 27, 28, 29, 86,
30, 87, 88, 89, 90, 0, 0, 91, 92, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0,
207, 96, 97, 0, 98, 11, 12, 13, 14, 15, 75, 0, 0, 0, 0, 0, 138, 94, 95, 0,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0, 96, 1, 2, 3, 4, 5, 6, 7, 8, 9,
0, 0, 25, 26, 0, 27, 28, 29, 88, 30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 11,
89, 90, 91, 92, 0, 0, 93, 94, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 0, 0, 0, 23, 24, 25, 26, 0, 27,
28, 29, 86, 30, 87, 88, 89, 90, 0, 0,
91, 92, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
0, 0, 0, 0, 0, 0, 0, 0, 0, 138,
94, 95, 0, 96, 57, 2, 3, 4, 0, 6,
7, 8, 9, 10, 0, 0, 0, 0, 0, 0,
0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
26, 0, 27, 28, 29, 86, 30, 87, 88, 89,
90, 0, 0, 91, 92, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 223, 8, 0, 0, 93, 0, 0, 0, 8, 9, 10, 0,
9, 10, 0, 0, 0, 0, 96, 97, 0, 98, 0, 0, 0, 94, 95, 0, 96, 11, 12, 13,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
21, 22, 0, 0, 0, 0, 0, 25, 26, 0, 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
27, 28, 29, 88, 30, 89, 90, 91, 92, 0, 86, 30, 87, 88, 89, 90, 0, 0, 91, 92,
0, 93, 94, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0,
0, 96, 97, 0, 98, 11, 12, 13, 14, 15, 160, 8, 9, 10, 0, 0, 0, 0, 94, 95,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 96, 11, 12, 13, 14, 15, 16, 17, 18,
0, 0, 25, 178, 0, 27, 28, 29, 88, 30, 19, 20, 21, 22, 0, 0, 0, 0, 0, 25,
89, 90, 91, 92, 0, 0, 93, 94, 0, 0, 26, 0, 27, 28, 29, 86, 30, 87, 88, 89,
90, 0, 0, 91, 92, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 95, 2, 3, 4, 0, 0, 0, 93, 0, 0, 0, 8, 9, 10, 0,
0, 0, 8, 9, 10, 0, 96, 97, 0, 98, 0, 0, 205, 94, 95, 0, 96, 11, 12, 13,
0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
25, 26, 0, 27, 28, 29, 0, 30, 2, 3, 86, 30, 87, 88, 89, 90, 0, 0, 91, 92,
4, 0, 0, 0, 8, 9, 10, 0, 0, 0,
0, 0, 0, 0, 0, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 0, 130, 0,
0, 0, 25, 26, 0, 27, 28, 29, 0, 30,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0,
8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 221, 8, 9, 10, 0, 0, 0, 0, 94, 95,
197, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 96, 11, 12, 13, 14, 15, 16, 17, 18,
20, 21, 22, 0, 0, 0, 23, 24, 25, 26, 19, 20, 21, 22, 0, 0, 0, 0, 0, 25,
0, 27, 28, 29, 0, 30, 1, 2, 3, 4, 26, 0, 27, 28, 29, 86, 30, 87, 88, 89,
5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 90, 0, 0, 91, 92, 0, 0, 0, 0, 0,
0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17, 18, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 93, 0, 0, 0, 8, 9, 10, 0,
24, 25, 26, 0, 27, 28, 29, 0, 30, 2, 0, 0, 0, 94, 95, 0, 96, 11, 12, 13,
3, 4, 0, 0, 0, 8, 9, 10, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 0, 0, 0, 0, 25, 174, 0, 27, 28, 29,
15, 16, 17, 18, 19, 20, 21, 22, 0, 0, 86, 30, 87, 88, 89, 90, 0, 0, 91, 92,
8, 9, 10, 25, 26, 0, 27, 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 93, 2, 3,
20, 21, 22, 0, 0, 0, 0, 0, 25, 26, 4, 0, 0, 0, 8, 9, 10, 0, 94, 95,
0, 27, 28, 29, 230, 30, 8, 9, 10, 231, 0, 96, 0, 0, 0, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
0, 0, 25, 26, 0, 27, 28, 29, 0, 30,
2, 3, 4, 0, 0, 0, 8, 9, 10, 0,
0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
197, 0, 0, 0, 25, 26, 0, 27, 28, 29,
0, 30, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 0, 0, 0, 0, 0, 0, 0, 0,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 246, 0, 0, 23, 24, 25, 26, 0,
27, 28, 29, 0, 30, 2, 3, 4, 0, 0,
0, 8, 9, 10, 0, 0, 0, 0, 0, 0,
0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 0, 0, 8, 9, 10, 25,
26, 0, 27, 28, 29, 0, 30, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
0, 0, 0, 0, 25, 26, 0, 27, 28, 29, 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
0, 30 228, 30, 8, 9, 10, 229, 0, 0, 0, 0,
0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 0, 0, 0, 0, 0,
25, 26, 0, 27, 28, 29, 0, 30
}; };
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
0, 95, 87, 163, 39, 86, 75, 154, 0, 69, 0, 93, 85, 69, 126, 44, 35, 0, 0, 39,
0, 54, 55, 35, 59, 41, 254, 52, 37, 81, 150, 84, 81, 254, 59, 73, 73, 78, 84, 41,
44, 71, 107, 73, 50, 44, 86, 62, 266, 73, 81, 159, 105, 80, 3, 69, 267, 56, 50, 8,
80, 281, 86, 87, 56, 285, 80, 3, 73, 39, 9, 37, 62, 54, 55, 72, 75, 72, 44, 39,
75, 41, 8, 9, 138, 45, 89, 90, 83, 94, 84, 41, 134, 78, 74, 45, 78, 91, 92, 94,
50, 75, 52, 45, 3, 45, 203, 126, 78, 8, 50, 81, 45, 45, 33, 34, 35, 36, 37, 86,
9, 81, 62, 61, 62, 63, 72, 33, 34, 35, 87, 201, 62, 71, 108, 73, 52, 53, 89, 90,
36, 37, 70, 73, 83, 75, 85, 77, 163, 173, 44, 193, 80, 3, 74, 75, 159, 169, 8, 9,
44, 162, 80, 83, 33, 34, 35, 36, 37, 52, 283, 81, 72, 72, 287, 158, 44, 73, 78, 78,
53, 126, 177, 78, 72, 78, 81, 72, 72, 69, 173, 77, 158, 72, 124, 78, 126, 75, 81, 191,
78, 195, 162, 78, 78, 73, 72, 72, 255, 78, 61, 62, 63, 33, 34, 35, 36, 37, 75, 70,
73, 205, 81, 78, 77, 37, 86, 198, 78, 75, 72, 203, 56, 57, 158, 255, 78, 180, 181, 80,
267, 81, 75, 93, 94, 44, 126, 287, 186, 187, 182, 183, 184, 185, 124, 37, 126, 78, 268, 83,
188, 189, 217, 218, 4, 5, 6, 81, 198, 286, 81, 85, 215, 216, 178, 179, 180, 181, 182, 183,
110, 222, 33, 34, 35, 71, 44, 73, 56, 57, 184, 185, 186, 187, 188, 189, 190, 220, 288, 78,
78, 79, 184, 185, 154, 44, 190, 191, 71, 71, 150, 289, 81, 81, 220, 4, 5, 6, 33, 34,
254, 72, 222, 58, 60, 74, 73, 81, 71, 71, 35, 44, 254, 193, 71, 71, 73, 78, 79, 186,
71, 81, 266, 73, 71, 81, 261, 76, 40, 44, 187, 72, 71, 58, 247, 267, 220, 74, 261, 60,
274, 74, 74, 71, 74, 16, 80, 71, 74, 74, 44, 247, 71, 81, 276, 81, 81, 71, 76, 71,
284, 78, 162, 72, 76, 72, 192, 174, 81, 193, 40, 71, 78, 193, 286, 73, 44, 74, 74, 73,
81, 194, 287, 203, 56, 83, 63, 83, 5, 73, 71, 201, 74, 247, 74, 74, 289, 0, 71, 209,
199, 211, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 54, 251, 211, 198, 285,
251, 45, -1, 266, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 251, 222, -1, 254, 255, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 266, 267, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 281, -1, -1, -1, 285, 286, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
-1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, -1, -1, 52, 53, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 71, -1, -1, -1, 75,
76, -1, -1, -1, -1, 81, 82, 83, -1, 85,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, -1, 17, 18, 19, 20, 21, 22, 72, 76, 81, 80, 16, 72, 189, 81, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
-1, -1, -1, 36, 37, 38, 39, 40, 41, 42, 188, 190, 81, 36, 37, 38, 39, 170, 41, 42,
43, 44, 45, 46, 47, 48, 49, -1, -1, 52, 43, 251, 45, 56, 254, 255, 63, 81, 5, 124,
53, -1, -1, -1, -1, -1, -1, -1, -1, -1, 248, 287, 209, 54, 251, 267, 251, 267, 268, 45,
-1, -1, -1, -1, -1, -1, -1, -1, 71, -1,
-1, -1, 75, 76, -1, -1, -1, -1, 81, 82,
83, -1, 85, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, -1, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, -1, -1, -1, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
-1, -1, 52, 53, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 71, -1, -1, -1, 75, -1, -1, -1, -1,
-1, 81, 82, 83, -1, 85, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, -1, -1, 52, 53, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 71, -1, -1, -1, 75, -1, -1, -1, -1, 283, -1, -1, -1, 287, 288, 3,
-1, -1, -1, -1, 81, 82, 83, -1, 85, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, 15, -1, 17, 18, 19, 20, 21, 22, 23,
-1, -1, -1, -1, -1, -1, -1, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
-1, -1, 36, 37, 38, 39, -1, 41, 42, 43, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, -1, -1, 52, 53, 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, 75, 76, -1, -1, -1, -1, 81, 82, 83,
-1, 85, 3, 4, 5, 6, -1, 8, 9, 10, -1, 85, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, 14, 15, -1, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, -1, -1, -1, 36, 37, 38, 39, -1, 31, 32, -1, -1, -1, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, -1, 41, 42, 43, 44, 45, 46, 47, 48, 49, -1,
-1, 52, 53, -1, -1, -1, -1, -1, -1, -1, -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
71, -1, -1, -1, 10, 11, 12, -1, -1, -1, 71, -1, -1, -1, 75, 76, -1, -1, -1, -1,
-1, 82, 83, -1, 85, 21, 22, 23, 24, 25, 81, 82, 83, -1, 85, 3, 4, 5, 6, 7,
26, 27, 28, 29, 30, 31, 32, -1, -1, -1, 8, 9, 10, 11, 12, 13, 14, 15, -1, 17,
-1, -1, 38, 39, -1, 41, 42, 43, 44, 45, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
46, 47, 48, 49, -1, -1, 52, 53, -1, -1, 28, 29, 30, 31, 32, -1, -1, -1, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, -1, -1, 52, 53, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 71, -1, -1, 74, 10, -1, -1, -1, 71, -1, -1, -1, 75, -1, -1,
11, 12, -1, -1, -1, -1, 82, 83, -1, 85, -1, -1, -1, 81, 82, 83, -1, 85, 3, 4,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
31, 32, -1, -1, -1, -1, -1, 38, 39, -1, 15, -1, 17, 18, 19, 20, 21, 22, 23, 24,
41, 42, 43, 44, 45, 46, 47, 48, 49, -1, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
-1, 52, 53, -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
71, -1, -1, -1, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1,
81, 82, 83, -1, 85, 21, 22, 23, 24, 25, 75, -1, -1, -1, -1, -1, 81, 82, 83, -1,
26, 27, 28, 29, 30, 31, 32, -1, -1, -1, 85, 3, 4, 5, 6, 7, 8, 9, 10, 11,
-1, -1, 38, 39, -1, 41, 42, 43, 44, 45, 12, -1, -1, -1, -1, -1, -1, -1, -1, 21,
46, 47, 48, 49, -1, -1, 52, 53, -1, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, -1, -1, -1, 36, 37, 38, 39, -1, 41,
42, 43, 44, 45, 46, 47, 48, 49, -1, -1,
52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 71,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
82, 83, -1, 85, 3, 4, 5, 6, -1, 8,
9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
-1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, -1, -1, -1, 36, 37, 38,
39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 71, -1, -1, 74, 10, -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
11, 12, -1, -1, -1, -1, 82, 83, -1, 85, -1, -1, -1, 82, 83, -1, 85, 21, 22, 23,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
31, 32, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
41, 42, 43, 44, 45, 46, 47, 48, 49, -1, 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
-1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
71, -1, -1, -1, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
-1, 82, 83, -1, 85, 21, 22, 23, 24, 25, 74, 10, 11, 12, -1, -1, -1, -1, 82, 83,
26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, 85, 21, 22, 23, 24, 25, 26, 27, 28,
-1, -1, 38, 39, -1, 41, 42, 43, 44, 45, 29, 30, 31, 32, -1, -1, -1, -1, -1, 38,
46, 47, 48, 49, -1, -1, 52, 53, -1, -1, 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 71, 4, 5, 6, -1, -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
-1, -1, 10, 11, 12, -1, 82, 83, -1, 85, -1, -1, 81, 82, 83, -1, 85, 21, 22, 23,
-1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
38, 39, -1, 41, 42, 43, -1, 45, 4, 5, 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
6, -1, -1, -1, 10, 11, 12, -1, -1, -1,
-1, -1, -1, -1, -1, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, -1, 76, -1,
-1, -1, 38, 39, -1, 41, 42, 43, -1, 45,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, -1, -1, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
10, 11, 12, -1, -1, -1, -1, -1, -1, -1, 74, 10, 11, 12, -1, -1, -1, -1, 82, 83,
76, 21, 22, 23, 24, 25, 26, 27, 28, 29, -1, 85, 21, 22, 23, 24, 25, 26, 27, 28,
30, 31, 32, -1, -1, -1, 36, 37, 38, 39, 29, 30, 31, 32, -1, -1, -1, -1, -1, 38,
-1, 41, 42, 43, -1, 45, 3, 4, 5, 6, 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
7, 8, 9, 10, 11, 12, -1, -1, -1, -1, 49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 21, 22, 23, 24, 25, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
27, 28, 29, 30, 31, 32, -1, -1, -1, 36, -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
37, 38, 39, -1, 41, 42, 43, -1, 45, 4, -1, -1, -1, 82, 83, -1, 85, 21, 22, 23,
5, 6, -1, -1, -1, 10, 11, 12, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
-1, -1, -1, -1, -1, -1, 21, 22, 23, 24, -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
25, 26, 27, 28, 29, 30, 31, 32, -1, -1, 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
10, 11, 12, 38, 39, -1, 41, 42, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
45, 21, 22, 23, 24, 25, 26, 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 71, 4, 5,
30, 31, 32, -1, -1, -1, -1, -1, 38, 39, 6, -1, -1, -1, 10, 11, 12, -1, 82, 83,
-1, 41, 42, 43, 44, 45, 10, 11, 12, 49, -1, 85, -1, -1, -1, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
-1, -1, 38, 39, -1, 41, 42, 43, -1, 45,
4, 5, 6, -1, -1, -1, 10, 11, 12, -1,
-1, -1, -1, -1, -1, -1, -1, 21, 22, 23, -1, -1, -1, -1, -1, -1, -1, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
76, -1, -1, -1, 38, 39, -1, 41, 42, 43,
-1, 45, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 76, -1, -1, 36, 37, 38, 39, -1,
41, 42, 43, -1, 45, 4, 5, 6, -1, -1,
-1, 10, 11, 12, -1, -1, -1, -1, -1, -1,
-1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, -1, -1, 10, 11, 12, 38,
39, -1, 41, 42, 43, -1, 45, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
-1, -1, -1, -1, 38, 39, -1, 41, 42, 43, -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
-1, 45 44, 45, 10, 11, 12, 49, -1, -1, -1, -1,
-1, -1, -1, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
38, 39, -1, 41, 42, 43, -1, 45
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
...@@ -1274,32 +1262,32 @@ static const yytype_uint8 yystos[] = ...@@ -1274,32 +1262,32 @@ static const yytype_uint8 yystos[] =
12, 21, 22, 23, 24, 25, 26, 27, 28, 29, 12, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 36, 37, 38, 39, 41, 42, 43, 30, 31, 32, 36, 37, 38, 39, 41, 42, 43,
45, 125, 126, 127, 128, 129, 134, 135, 136, 137, 45, 125, 126, 127, 128, 129, 134, 135, 136, 137,
138, 139, 140, 141, 142, 169, 170, 171, 37, 44, 138, 139, 140, 141, 142, 171, 172, 173, 37, 44,
139, 44, 75, 81, 172, 72, 78, 3, 33, 34, 139, 44, 75, 81, 174, 72, 78, 3, 33, 34,
35, 131, 132, 137, 78, 81, 44, 138, 140, 73, 35, 131, 132, 137, 78, 81, 44, 138, 140, 73,
0, 170, 140, 75, 138, 143, 144, 75, 155, 131, 0, 172, 140, 75, 144, 75, 157, 131, 130, 133,
130, 133, 138, 132, 44, 71, 73, 80, 44, 46, 138, 132, 44, 71, 73, 80, 44, 46, 47, 48,
47, 48, 49, 52, 53, 71, 82, 83, 85, 96, 49, 52, 53, 71, 82, 83, 85, 96, 97, 98,
97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
118, 119, 120, 124, 141, 81, 143, 44, 145, 146, 120, 124, 141, 81, 143, 138, 145, 146, 13, 14,
76, 144, 13, 14, 15, 17, 18, 19, 20, 40, 15, 17, 18, 19, 20, 40, 75, 76, 81, 107,
75, 76, 81, 107, 120, 121, 123, 125, 126, 141, 120, 121, 123, 125, 126, 141, 150, 151, 152, 153,
148, 149, 150, 151, 156, 157, 158, 161, 168, 44, 158, 159, 160, 163, 170, 44, 130, 133, 73, 80,
130, 133, 73, 80, 74, 124, 121, 147, 107, 107, 74, 124, 121, 149, 107, 107, 123, 52, 53, 73,
123, 52, 53, 73, 77, 72, 72, 78, 39, 121, 77, 72, 72, 78, 39, 121, 71, 107, 86, 87,
71, 107, 86, 87, 83, 85, 54, 55, 89, 90, 83, 85, 54, 55, 89, 90, 56, 57, 58, 60,
56, 57, 58, 60, 59, 94, 74, 76, 73, 78, 59, 94, 74, 145, 44, 147, 148, 76, 146, 81,
81, 81, 81, 163, 71, 71, 81, 81, 123, 71, 81, 165, 71, 71, 81, 81, 123, 71, 76, 154,
76, 152, 61, 62, 63, 70, 80, 122, 78, 81, 61, 62, 63, 70, 80, 122, 78, 81, 76, 151,
76, 149, 73, 74, 124, 147, 74, 72, 99, 123, 73, 74, 124, 149, 74, 72, 99, 123, 44, 49,
44, 49, 102, 121, 107, 107, 109, 109, 111, 111, 102, 121, 107, 107, 109, 109, 111, 111, 111, 111,
111, 111, 112, 112, 116, 117, 118, 123, 124, 146, 112, 112, 116, 117, 118, 123, 76, 73, 78, 81,
149, 164, 123, 81, 162, 156, 121, 121, 124, 74, 151, 166, 123, 81, 164, 158, 121, 121, 124, 74,
74, 79, 74, 40, 148, 157, 165, 72, 123, 136, 74, 79, 124, 148, 40, 150, 159, 167, 72, 123,
160, 153, 74, 121, 71, 160, 166, 167, 149, 159, 136, 162, 155, 74, 121, 74, 71, 162, 168, 169,
44, 72, 76, 123, 81, 72, 16, 80, 150, 154, 151, 161, 44, 72, 76, 123, 81, 72, 16, 80,
155, 72, 123, 154, 149, 147, 81 152, 156, 157, 72, 123, 156, 151, 149, 81
}; };
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
...@@ -1373,7 +1361,7 @@ while (YYID (0)) ...@@ -1373,7 +1361,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */ we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \ # define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \ fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \ (Loc).first_line, (Loc).first_column, \
...@@ -3925,38 +3913,50 @@ yyreduce: ...@@ -3925,38 +3913,50 @@ yyreduce:
case 137: case 137:
{ if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); ;}
break;
case 138:
{ {
if (context->reservedErrorCheck((yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string)) if (context->reservedErrorCheck((yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string))
context->recover(); context->recover();
TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), *(yyvsp[(2) - (5)].lex).string); TType* structure = new TType((yyvsp[(5) - (6)].interm.typeList), *(yyvsp[(2) - (6)].lex).string);
TVariable* userTypeDef = new TVariable((yyvsp[(2) - (5)].lex).string, *structure, true); TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true);
if (! context->symbolTable.insert(*userTypeDef)) { if (! context->symbolTable.insert(*userTypeDef)) {
context->error((yyvsp[(2) - (5)].lex).line, "redefinition", (yyvsp[(2) - (5)].lex).string->c_str(), "struct"); context->error((yyvsp[(2) - (6)].lex).line, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct");
context->recover(); context->recover();
} }
(yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line); (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (6)].lex).line);
(yyval.interm.type).userDef = structure; (yyval.interm.type).userDef = structure;
context->exitStructDeclaration();
;} ;}
break; break;
case 138: case 139:
{ if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); ;}
break;
case 140:
{ {
TType* structure = new TType((yyvsp[(3) - (4)].interm.typeList), TString("")); TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString(""));
(yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (4)].lex).line); (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line);
(yyval.interm.type).userDef = structure; (yyval.interm.type).userDef = structure;
context->exitStructDeclaration();
;} ;}
break; break;
case 139: case 141:
{ {
(yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
;} ;}
break; break;
case 140: case 142:
{ {
(yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList);
...@@ -3972,7 +3972,7 @@ yyreduce: ...@@ -3972,7 +3972,7 @@ yyreduce:
;} ;}
break; break;
case 141: case 143:
{ {
(yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList);
...@@ -4001,11 +4001,15 @@ yyreduce: ...@@ -4001,11 +4001,15 @@ yyreduce:
type->setStruct((yyvsp[(1) - (3)].interm.type).userDef->getStruct()); type->setStruct((yyvsp[(1) - (3)].interm.type).userDef->getStruct());
type->setTypeName((yyvsp[(1) - (3)].interm.type).userDef->getTypeName()); type->setTypeName((yyvsp[(1) - (3)].interm.type).userDef->getTypeName());
} }
if (context->structNestingErrorCheck((yyvsp[(1) - (3)].interm.type).line, *type)) {
context->recover();
}
} }
;} ;}
break; break;
case 142: case 144:
{ {
(yyval.interm.typeList) = NewPoolTTypeList(); (yyval.interm.typeList) = NewPoolTTypeList();
...@@ -4013,14 +4017,14 @@ yyreduce: ...@@ -4013,14 +4017,14 @@ yyreduce:
;} ;}
break; break;
case 143: case 145:
{ {
(yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
;} ;}
break; break;
case 144: case 146:
{ {
if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string)) if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
...@@ -4032,7 +4036,7 @@ yyreduce: ...@@ -4032,7 +4036,7 @@ yyreduce:
;} ;}
break; break;
case 145: case 147:
{ {
if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string)) if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string))
...@@ -4049,67 +4053,67 @@ yyreduce: ...@@ -4049,67 +4053,67 @@ yyreduce:
;} ;}
break; break;
case 146: case 148:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;} { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 147: case 149:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 148: case 150:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); ;}
break; break;
case 149: case 151:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 150: case 152:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 151: case 153:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 152: case 154:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 153: case 155:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 154: case 156:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 155: case 157:
{ (yyval.interm.intermAggregate) = 0; ;} { (yyval.interm.intermAggregate) = 0; ;}
break; break;
case 156: case 158:
{ context->symbolTable.push(); ;} { context->symbolTable.push(); ;}
break; break;
case 157: case 159:
{ context->symbolTable.pop(); ;} { context->symbolTable.pop(); ;}
break; break;
case 158: case 160:
{ {
if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) { if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
...@@ -4120,24 +4124,24 @@ yyreduce: ...@@ -4120,24 +4124,24 @@ yyreduce:
;} ;}
break; break;
case 159: case 161:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 160: case 162:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;} { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 161: case 163:
{ {
(yyval.interm.intermNode) = 0; (yyval.interm.intermNode) = 0;
;} ;}
break; break;
case 162: case 164:
{ {
if ((yyvsp[(2) - (3)].interm.intermAggregate)) { if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
...@@ -4148,31 +4152,31 @@ yyreduce: ...@@ -4148,31 +4152,31 @@ yyreduce:
;} ;}
break; break;
case 163: case 165:
{ {
(yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
;} ;}
break; break;
case 164: case 166:
{ {
(yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
;} ;}
break; break;
case 165: case 167:
{ (yyval.interm.intermNode) = 0; ;} { (yyval.interm.intermNode) = 0; ;}
break; break;
case 166: case 168:
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); ;} { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); ;}
break; break;
case 167: case 169:
{ {
if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
...@@ -4181,7 +4185,7 @@ yyreduce: ...@@ -4181,7 +4185,7 @@ yyreduce:
;} ;}
break; break;
case 168: case 170:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
...@@ -4189,7 +4193,7 @@ yyreduce: ...@@ -4189,7 +4193,7 @@ yyreduce:
;} ;}
break; break;
case 169: case 171:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
...@@ -4197,7 +4201,7 @@ yyreduce: ...@@ -4197,7 +4201,7 @@ yyreduce:
;} ;}
break; break;
case 170: case 172:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
...@@ -4206,7 +4210,7 @@ yyreduce: ...@@ -4206,7 +4210,7 @@ yyreduce:
;} ;}
break; break;
case 171: case 173:
{ {
TIntermNode* intermNode; TIntermNode* intermNode;
...@@ -4224,12 +4228,12 @@ yyreduce: ...@@ -4224,12 +4228,12 @@ yyreduce:
;} ;}
break; break;
case 172: case 174:
{ context->symbolTable.push(); ++context->loopNestingLevel; ;} { context->symbolTable.push(); ++context->loopNestingLevel; ;}
break; break;
case 173: case 175:
{ {
context->symbolTable.pop(); context->symbolTable.pop();
...@@ -4238,12 +4242,12 @@ yyreduce: ...@@ -4238,12 +4242,12 @@ yyreduce:
;} ;}
break; break;
case 174: case 176:
{ ++context->loopNestingLevel; ;} { ++context->loopNestingLevel; ;}
break; break;
case 175: case 177:
{ {
if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode)))
...@@ -4254,12 +4258,12 @@ yyreduce: ...@@ -4254,12 +4258,12 @@ yyreduce:
;} ;}
break; break;
case 176: case 178:
{ context->symbolTable.push(); ++context->loopNestingLevel; ;} { context->symbolTable.push(); ++context->loopNestingLevel; ;}
break; break;
case 177: case 179:
{ {
context->symbolTable.pop(); context->symbolTable.pop();
...@@ -4268,35 +4272,35 @@ yyreduce: ...@@ -4268,35 +4272,35 @@ yyreduce:
;} ;}
break; break;
case 178: case 180:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;} ;}
break; break;
case 179: case 181:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;} ;}
break; break;
case 180: case 182:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
;} ;}
break; break;
case 181: case 183:
{ {
(yyval.interm.intermTypedNode) = 0; (yyval.interm.intermTypedNode) = 0;
;} ;}
break; break;
case 182: case 184:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
...@@ -4304,7 +4308,7 @@ yyreduce: ...@@ -4304,7 +4308,7 @@ yyreduce:
;} ;}
break; break;
case 183: case 185:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
...@@ -4312,7 +4316,7 @@ yyreduce: ...@@ -4312,7 +4316,7 @@ yyreduce:
;} ;}
break; break;
case 184: case 186:
{ {
if (context->loopNestingLevel <= 0) { if (context->loopNestingLevel <= 0) {
...@@ -4323,7 +4327,7 @@ yyreduce: ...@@ -4323,7 +4327,7 @@ yyreduce:
;} ;}
break; break;
case 185: case 187:
{ {
if (context->loopNestingLevel <= 0) { if (context->loopNestingLevel <= 0) {
...@@ -4334,7 +4338,7 @@ yyreduce: ...@@ -4334,7 +4338,7 @@ yyreduce:
;} ;}
break; break;
case 186: case 188:
{ {
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).line);
...@@ -4345,7 +4349,7 @@ yyreduce: ...@@ -4345,7 +4349,7 @@ yyreduce:
;} ;}
break; break;
case 187: case 189:
{ {
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line);
...@@ -4360,7 +4364,7 @@ yyreduce: ...@@ -4360,7 +4364,7 @@ yyreduce:
;} ;}
break; break;
case 188: case 190:
{ {
FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line); FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
...@@ -4368,7 +4372,7 @@ yyreduce: ...@@ -4368,7 +4372,7 @@ yyreduce:
;} ;}
break; break;
case 189: case 191:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
...@@ -4376,7 +4380,7 @@ yyreduce: ...@@ -4376,7 +4380,7 @@ yyreduce:
;} ;}
break; break;
case 190: case 192:
{ {
(yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
...@@ -4384,21 +4388,21 @@ yyreduce: ...@@ -4384,21 +4388,21 @@ yyreduce:
;} ;}
break; break;
case 191: case 193:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;} ;}
break; break;
case 192: case 194:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;} ;}
break; break;
case 193: case 195:
{ {
TFunction* function = (yyvsp[(1) - (1)].interm).function; TFunction* function = (yyvsp[(1) - (1)].interm).function;
...@@ -4483,7 +4487,7 @@ yyreduce: ...@@ -4483,7 +4487,7 @@ yyreduce:
;} ;}
break; break;
case 194: case 196:
{ {
//?? Check that all paths return a value if return type != void ? //?? Check that all paths return a value if return type != void ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment