Add support for non-square matrices to the shader translator.

TRAC #23081 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2394 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4f35fdf6
...@@ -240,6 +240,33 @@ bool IsMatrixType(GLenum type) ...@@ -240,6 +240,33 @@ bool IsMatrixType(GLenum type)
return VariableRowCount(type) > 1; return VariableRowCount(type) > 1;
} }
GLenum TransposeMatrixType(GLenum type)
{
if (!IsMatrixType(type))
{
return type;
}
switch (type)
{
case GL_FLOAT_MAT2: return GL_FLOAT_MAT2;
case GL_FLOAT_MAT3: return GL_FLOAT_MAT3;
case GL_FLOAT_MAT4: return GL_FLOAT_MAT4;
case GL_FLOAT_MAT2x3: return GL_FLOAT_MAT3x2;
case GL_FLOAT_MAT3x2: return GL_FLOAT_MAT2x3;
case GL_FLOAT_MAT2x4: return GL_FLOAT_MAT4x2;
case GL_FLOAT_MAT4x2: return GL_FLOAT_MAT2x4;
case GL_FLOAT_MAT3x4: return GL_FLOAT_MAT4x3;
case GL_FLOAT_MAT4x3: return GL_FLOAT_MAT3x4;
default: UNREACHABLE(); return GL_NONE;
}
}
int AttributeRegisterCount(GLenum type)
{
return IsMatrixType(type) ? VariableColumnCount(type) : 1;
}
int AllocateFirstFreeBits(unsigned int *bits, unsigned int allocationSize, unsigned int bitsSize) int AllocateFirstFreeBits(unsigned int *bits, unsigned int allocationSize, unsigned int bitsSize)
{ {
ASSERT(allocationSize <= bitsSize); ASSERT(allocationSize <= bitsSize);
......
...@@ -33,6 +33,8 @@ GLenum UniformBoolVectorType(GLenum type); ...@@ -33,6 +33,8 @@ GLenum UniformBoolVectorType(GLenum type);
int VariableRowCount(GLenum type); int VariableRowCount(GLenum type);
int VariableColumnCount(GLenum type); int VariableColumnCount(GLenum type);
bool IsMatrixType(GLenum type); bool IsMatrixType(GLenum type);
GLenum TransposeMatrixType(GLenum type);
int AttributeRegisterCount(GLenum type);
int AllocateFirstFreeBits(unsigned int *bits, unsigned int allocationSize, unsigned int bitsSize); int AllocateFirstFreeBits(unsigned int *bits, unsigned int allocationSize, unsigned int bitsSize);
......
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 1 #define MINOR_VERSION 1
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 1992 #define BUILD_REVISION 1993
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -972,6 +972,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink) ...@@ -972,6 +972,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
if (left->isVector()) if (left->isVector())
{ {
op = EOpVectorTimesMatrix; op = EOpVectorTimesMatrix;
setType(TType(basicType, higherPrecision, EvqTemporary, right->getCols(), 1));
} }
else else
{ {
...@@ -994,6 +995,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink) ...@@ -994,6 +995,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
else if (left->isMatrix() && right->isMatrix()) else if (left->isMatrix() && right->isMatrix())
{ {
op = EOpMatrixTimesMatrix; op = EOpMatrixTimesMatrix;
setType(TType(basicType, higherPrecision, EvqTemporary, right->getCols(), left->getRows()));
} }
else if (!left->isMatrix() && !right->isMatrix()) else if (!left->isMatrix() && !right->isMatrix())
{ {
...@@ -1045,6 +1047,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink) ...@@ -1045,6 +1047,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
else if (left->isMatrix() && right->isMatrix()) else if (left->isMatrix() && right->isMatrix())
{ {
op = EOpMatrixTimesMatrixAssign; op = EOpMatrixTimesMatrixAssign;
setType(TType(basicType, higherPrecision, EvqTemporary, right->getCols(), left->getRows()));
} }
else if (!left->isMatrix() && !right->isMatrix()) else if (!left->isMatrix() && !right->isMatrix())
{ {
......
...@@ -68,9 +68,14 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc ...@@ -68,9 +68,14 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc
mUsesFaceforward2 = false; mUsesFaceforward2 = false;
mUsesFaceforward3 = false; mUsesFaceforward3 = false;
mUsesFaceforward4 = false; mUsesFaceforward4 = false;
mUsesEqualMat2 = false;
mUsesEqualMat3 = false; for (unsigned int col = 0; col <= 4; col++)
mUsesEqualMat4 = false; {
for (unsigned int row = 0; row <= 4; row++)
{
mUsesEqualMat[col][row] = false;
}
}
mUsesEqualVec2 = false; mUsesEqualVec2 = false;
mUsesEqualVec3 = false; mUsesEqualVec3 = false;
mUsesEqualVec4 = false; mUsesEqualVec4 = false;
...@@ -150,7 +155,7 @@ const ActiveInterfaceBlocks &OutputHLSL::getInterfaceBlocks() const ...@@ -150,7 +155,7 @@ const ActiveInterfaceBlocks &OutputHLSL::getInterfaceBlocks() const
int OutputHLSL::vectorSize(const TType &type) const int OutputHLSL::vectorSize(const TType &type) const
{ {
int elementSize = type.isMatrix() ? type.getRows() : 1; int elementSize = type.isMatrix() ? type.getCols() : 1;
int arraySize = type.isArray() ? type.getArraySize() : 1; int arraySize = type.isArray() ? type.getArraySize() : 1;
return elementSize * arraySize; return elementSize * arraySize;
...@@ -1168,34 +1173,51 @@ void OutputHLSL::header() ...@@ -1168,34 +1173,51 @@ void OutputHLSL::header()
"\n"; "\n";
} }
if (mUsesEqualMat2) for (unsigned int cols = 2; cols <= 4; cols++)
{ {
out << "bool equal(float2x2 m, float2x2 n)\n" for (unsigned int rows = 2; rows <= 4; rows++)
"{\n" {
" return m[0][0] == n[0][0] && m[0][1] == n[0][1] &&\n" if (mUsesEqualMat[cols][rows])
" m[1][0] == n[1][0] && m[1][1] == n[1][1];\n" {
"}\n"; TString matrixType = "float" + str(cols) + "x" + str(rows);
}
if (mUsesEqualMat3) out << "bool equal(" + matrixType + " m, " + matrixType + " n)\n"
{ "{\n";
out << "bool equal(float3x3 m, float3x3 n)\n"
"{\n"
" return m[0][0] == n[0][0] && m[0][1] == n[0][1] && m[0][2] == n[0][2] &&\n"
" m[1][0] == n[1][0] && m[1][1] == n[1][1] && m[1][2] == n[1][2] &&\n"
" m[2][0] == n[2][0] && m[2][1] == n[2][1] && m[2][2] == n[2][2];\n"
"}\n";
}
if (mUsesEqualMat4) for (unsigned int row = 0; row < rows; row++)
{ {
out << "bool equal(float4x4 m, float4x4 n)\n" if (row == 0)
"{\n" {
" return m[0][0] == n[0][0] && m[0][1] == n[0][1] && m[0][2] == n[0][2] && m[0][3] == n[0][3] &&\n" out << " return ";
" m[1][0] == n[1][0] && m[1][1] == n[1][1] && m[1][2] == n[1][2] && m[1][3] == n[1][3] &&\n" }
" m[2][0] == n[2][0] && m[2][1] == n[2][1] && m[2][2] == n[2][2] && m[2][3] == n[2][3] &&\n" else
" m[3][0] == n[3][0] && m[3][1] == n[3][1] && m[3][2] == n[3][2] && m[3][3] == n[3][3];\n" {
"}\n"; out << " ";
}
for (unsigned int col = 0; col < cols; col++)
{
TString index = "[" + str(col) + "][" + str(row) + "]";
out << "m" + index + " == n" + index;
if (col == cols-1 && row == rows-1)
{
out << ";\n";
}
else if (col == cols-1)
{
out << " &&\n";
}
else
{
out << " && ";
}
}
}
out << "}\n";
}
}
} }
if (mUsesEqualVec2) if (mUsesEqualVec2)
...@@ -1573,13 +1595,7 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node) ...@@ -1573,13 +1595,7 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node)
{ {
if (node->getLeft()->isMatrix()) if (node->getLeft()->isMatrix())
{ {
switch (node->getLeft()->getRows()) mUsesEqualMat[node->getLeft()->getCols()][node->getLeft()->getRows()] = true;
{
case 2: mUsesEqualMat2 = true; break;
case 3: mUsesEqualMat3 = true; break;
case 4: mUsesEqualMat4 = true; break;
default: UNREACHABLE();
}
} }
else if (node->getLeft()->isVector()) else if (node->getLeft()->isVector())
{ {
...@@ -2816,12 +2832,9 @@ TString OutputHLSL::typeString(const TType &type) ...@@ -2816,12 +2832,9 @@ TString OutputHLSL::typeString(const TType &type)
} }
else if (type.isMatrix()) else if (type.isMatrix())
{ {
switch (type.getRows()) int cols = type.getCols();
{ int rows = type.getRows();
case 2: return "float2x2"; return "float" + str(cols) + "x" + str(rows);
case 3: return "float3x3";
case 4: return "float4x4";
}
} }
else else
{ {
...@@ -3352,11 +3365,35 @@ GLenum OutputHLSL::glVariableType(const TType &type) ...@@ -3352,11 +3365,35 @@ GLenum OutputHLSL::glVariableType(const TType &type)
} }
else if (type.isMatrix()) else if (type.isMatrix())
{ {
switch(type.getRows()) switch (type.getCols())
{ {
case 2: return GL_FLOAT_MAT2; case 2:
case 3: return GL_FLOAT_MAT3; switch(type.getRows())
case 4: return GL_FLOAT_MAT4; {
case 2: return GL_FLOAT_MAT2;
case 3: return GL_FLOAT_MAT2x3;
case 4: return GL_FLOAT_MAT2x4;
default: UNREACHABLE();
}
case 3:
switch(type.getRows())
{
case 2: return GL_FLOAT_MAT3x2;
case 3: return GL_FLOAT_MAT3;
case 4: return GL_FLOAT_MAT3x4;
default: UNREACHABLE();
}
case 4:
switch(type.getRows())
{
case 2: return GL_FLOAT_MAT4x2;
case 3: return GL_FLOAT_MAT4x3;
case 4: return GL_FLOAT_MAT4;
default: UNREACHABLE();
}
default: UNREACHABLE(); default: UNREACHABLE();
} }
} }
......
...@@ -124,9 +124,7 @@ class OutputHLSL : public TIntermTraverser ...@@ -124,9 +124,7 @@ class OutputHLSL : public TIntermTraverser
bool mUsesFaceforward2; bool mUsesFaceforward2;
bool mUsesFaceforward3; bool mUsesFaceforward3;
bool mUsesFaceforward4; bool mUsesFaceforward4;
bool mUsesEqualMat2; bool mUsesEqualMat[5][5];
bool mUsesEqualMat3;
bool mUsesEqualMat4;
bool mUsesEqualVec2; bool mUsesEqualVec2;
bool mUsesEqualVec3; bool mUsesEqualVec3;
bool mUsesEqualVec4; bool mUsesEqualVec4;
......
...@@ -1355,7 +1355,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, T ...@@ -1355,7 +1355,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, T
TIntermTyped* typedNode; TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion(); TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
if (index >= node->getType().getRows()) { if (index >= node->getType().getCols()) {
std::stringstream extraInfoStream; std::stringstream extraInfoStream;
extraInfoStream << "matrix field selection out of range '" << index << "'"; extraInfoStream << "matrix field selection out of range '" << index << "'";
std::string extraInfo = extraInfoStream.str(); std::string extraInfo = extraInfoStream.str();
......
...@@ -131,6 +131,17 @@ O [0-7] ...@@ -131,6 +131,17 @@ O [0-7]
"mat3" { context->lexAfterType = true; return(MATRIX3); } "mat3" { context->lexAfterType = true; return(MATRIX3); }
"mat4" { context->lexAfterType = true; return(MATRIX4); } "mat4" { context->lexAfterType = true; return(MATRIX4); }
"mat2x2" { return ES2_ident_ES3_keyword(context, MATRIX2); }
"mat3x3" { return ES2_ident_ES3_keyword(context, MATRIX3); }
"mat4x4" { return ES2_ident_ES3_keyword(context, MATRIX4); }
"mat2x3" { return ES2_ident_ES3_keyword(context, MATRIX2x3); }
"mat3x2" { return ES2_ident_ES3_keyword(context, MATRIX3x2); }
"mat2x4" { return ES2_ident_ES3_keyword(context, MATRIX2x4); }
"mat4x2" { return ES2_ident_ES3_keyword(context, MATRIX4x2); }
"mat3x4" { return ES2_ident_ES3_keyword(context, MATRIX3x4); }
"mat4x3" { return ES2_ident_ES3_keyword(context, MATRIX4x3); }
"vec2" { context->lexAfterType = true; return (VEC2); } "vec2" { context->lexAfterType = true; return (VEC2); }
"vec3" { context->lexAfterType = true; return (VEC3); } "vec3" { context->lexAfterType = true; return (VEC3); }
"vec4" { context->lexAfterType = true; return (VEC4); } "vec4" { context->lexAfterType = true; return (VEC4); }
......
...@@ -126,6 +126,7 @@ extern void yyerror(TParseContext* context, const char* reason); ...@@ -126,6 +126,7 @@ extern void yyerror(TParseContext* context, const char* reason);
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT %token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
%token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4 %token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4
%token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING %token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING
%token <lex> MATRIX2x3 MATRIX3x2 MATRIX2x4 MATRIX4x2 MATRIX3x4 MATRIX4x3
%token <lex> CENTROID FLAT SMOOTH %token <lex> CENTROID FLAT SMOOTH
%token <lex> STRUCT VOID_TYPE WHILE %token <lex> STRUCT VOID_TYPE WHILE
%token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT %token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT
...@@ -1606,6 +1607,36 @@ type_specifier_nonarray ...@@ -1606,6 +1607,36 @@ type_specifier_nonarray
$$.setBasic(EbtFloat, qual, $1.line); $$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(4, 4); $$.setMatrix(4, 4);
} }
| MATRIX2x3 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(2, 3);
}
| MATRIX3x2 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(3, 2);
}
| MATRIX2x4 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(2, 4);
}
| MATRIX4x2 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(4, 2);
}
| MATRIX3x4 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(3, 4);
}
| MATRIX4x3 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, $1.line);
$$.setMatrix(4, 3);
}
| SAMPLER2D { | SAMPLER2D {
FRAG_VERT_ONLY("sampler2D", $1.line); FRAG_VERT_ONLY("sampler2D", $1.line);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
......
...@@ -383,8 +383,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); ...@@ -383,8 +383,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 214 #define YY_NUM_RULES 223
#define YY_END_OF_BUFFER 215 #define YY_END_OF_BUFFER 224
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
but its presence is necessary. */ but its presence is necessary. */
struct yy_trans_info struct yy_trans_info
...@@ -392,91 +392,92 @@ struct yy_trans_info ...@@ -392,91 +392,92 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[759] = static yyconst flex_int16_t yy_accept[771] =
{ 0, { 0,
0, 0, 0, 0, 0, 0, 215, 213, 212, 212, 0, 0, 0, 0, 0, 0, 224, 222, 221, 221,
197, 203, 208, 192, 193, 201, 200, 189, 198, 196, 206, 212, 217, 201, 202, 210, 209, 198, 207, 205,
202, 161, 161, 190, 186, 204, 191, 205, 209, 157, 211, 170, 170, 199, 195, 213, 200, 214, 218, 166,
194, 195, 207, 157, 157, 157, 157, 157, 157, 157, 203, 204, 216, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 187, 206, 188, 199, 3, 4, 3, 166, 166, 166, 196, 215, 197, 208, 3, 4, 3,
211, 214, 210, 183, 169, 188, 177, 172, 167, 175, 220, 223, 219, 192, 178, 197, 186, 181, 176, 184,
165, 176, 166, 164, 2, 1, 168, 163, 159, 160, 174, 185, 175, 173, 2, 1, 177, 172, 168, 169,
0, 0, 161, 195, 187, 194, 184, 180, 182, 181, 0, 0, 170, 204, 196, 203, 193, 189, 191, 190,
185, 157, 173, 179, 157, 157, 157, 157, 157, 157, 194, 166, 182, 188, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 17, 157, 157, 157, 166, 166, 166, 166, 166, 166, 17, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
20, 157, 157, 28, 157, 157, 157, 157, 157, 157, 20, 166, 166, 28, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 174, 178, 5, 210, 0, 166, 166, 166, 166, 166, 183, 187, 5, 219, 0,
1, 163, 0, 0, 162, 158, 170, 171, 157, 115, 1, 172, 0, 0, 171, 167, 179, 180, 166, 124,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 18, 157, 157, 157, 157, 157, 157, 166, 166, 166, 18, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 32, 157, 157, 157, 157, 157, 166, 166, 166, 166, 32, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 29, 157, 157, 157, 157, 166, 166, 166, 166, 166, 29, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 0, 164, 166, 166, 166, 166, 166, 166, 166, 166, 0, 173,
0, 163, 157, 157, 157, 34, 157, 157, 23, 154, 0, 172, 166, 166, 166, 34, 166, 166, 23, 163,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
21, 118, 157, 157, 157, 157, 26, 157, 157, 123, 21, 127, 166, 166, 166, 166, 26, 166, 166, 132,
135, 157, 157, 157, 157, 157, 157, 157, 157, 157, 144, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 132, 9, 39, 40, 41, 157, 157, 157, 166, 166, 141, 9, 39, 40, 41, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 121, 35, 157, 157, 157, 157, 157, 157, 157, 166, 130, 35, 166, 166, 166, 166, 166, 166, 166,
157, 42, 43, 44, 33, 157, 157, 157, 157, 157, 166, 51, 52, 53, 33, 166, 166, 166, 166, 166,
157, 15, 48, 49, 50, 157, 116, 157, 157, 12, 166, 15, 57, 58, 59, 166, 125, 166, 166, 12,
157, 157, 157, 157, 144, 145, 146, 157, 36, 157, 166, 166, 166, 166, 153, 154, 155, 166, 36, 166,
136, 31, 147, 148, 149, 7, 141, 142, 143, 157, 145, 31, 156, 157, 158, 7, 150, 151, 152, 166,
157, 157, 30, 139, 157, 157, 157, 45, 46, 47, 166, 166, 30, 148, 166, 166, 166, 54, 55, 56,
157, 157, 157, 157, 157, 157, 157, 66, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 133, 157, 157, 157, 157, 75, 166, 166, 166, 166, 166, 166, 166, 142, 166,
157, 157, 157, 157, 157, 157, 157, 117, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
156, 157, 157, 19, 157, 71, 157, 157, 157, 157, 126, 166, 166, 165, 166, 166, 19, 166, 80, 166,
69, 157, 157, 157, 134, 129, 72, 157, 157, 157, 166, 166, 166, 78, 166, 166, 166, 143, 138, 81,
157, 157, 157, 124, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 133, 166, 166, 166,
157, 140, 122, 157, 157, 127, 157, 157, 157, 38, 42, 45, 47, 46, 43, 49, 48, 50, 44, 166,
67, 153, 27, 128, 58, 157, 138, 22, 157, 157, 166, 166, 166, 149, 131, 166, 166, 136, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 38, 76, 162, 27, 137, 67, 166, 147, 22,
157, 157, 24, 37, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
73, 74, 75, 157, 157, 157, 157, 157, 8, 157, 166, 166, 166, 166, 24, 37, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 82, 83, 84, 166, 166, 166, 166, 166,
119, 157, 157, 157, 157, 157, 13, 157, 157, 14, 8, 166, 166, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 25, 59, 16, 130, 77, 78, 166, 166, 128, 166, 166, 166, 166, 166, 13, 166,
79, 157, 157, 157, 157, 157, 157, 157, 157, 157, 166, 14, 166, 166, 166, 166, 25, 68, 16, 139,
157, 157, 157, 125, 157, 157, 157, 61, 63, 60, 86, 87, 88, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 157, 120, 81, 82, 166, 166, 166, 166, 166, 134, 166, 166, 166, 70,
83, 157, 157, 137, 157, 126, 157, 157, 11, 157, 72, 69, 166, 166, 166, 166, 166, 166, 166, 129,
157, 157, 157, 157, 157, 157, 157, 157, 76, 131, 90, 91, 92, 166, 166, 146, 166, 135, 166, 166,
6, 157, 157, 157, 155, 157, 70, 10, 150, 51, 11, 166, 166, 166, 166, 166, 166, 166, 166, 166,
54, 157, 157, 157, 157, 157, 157, 157, 157, 157, 85, 140, 6, 166, 166, 166, 164, 166, 79, 10,
157, 157, 62, 157, 157, 157, 157, 80, 157, 157, 159, 60, 63, 166, 166, 166, 166, 166, 166, 166,
157, 157, 157, 100, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 71, 166, 166, 166, 166, 89,
157, 157, 157, 157, 157, 157, 68, 157, 157, 157, 166, 166, 166, 166, 166, 109, 166, 166, 166, 166,
84, 102, 157, 157, 64, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 77, 166,
157, 157, 95, 157, 157, 157, 157, 157, 157, 157, 166, 166, 93, 111, 166, 166, 73, 166, 166, 166,
109, 157, 157, 157, 157, 52, 157, 157, 157, 157, 166, 166, 166, 166, 104, 166, 166, 166, 166, 166,
157, 157, 157, 157, 157, 157, 96, 85, 157, 86, 166, 166, 118, 166, 166, 166, 166, 61, 166, 166,
157, 157, 110, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 105, 94,
157, 157, 157, 157, 157, 157, 97, 157, 111, 157, 166, 95, 166, 166, 119, 166, 166, 166, 166, 166,
157, 87, 88, 157, 91, 157, 92, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 106, 166,
157, 65, 157, 157, 157, 57, 157, 55, 106, 157, 120, 166, 166, 96, 97, 166, 100, 166, 101, 166,
89, 90, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 74, 166, 166, 166, 66, 166, 64,
104, 107, 98, 157, 157, 157, 157, 157, 157, 157, 115, 166, 98, 99, 166, 166, 166, 166, 166, 166,
105, 108, 157, 157, 101, 157, 157, 151, 157, 157, 166, 166, 113, 116, 107, 166, 166, 166, 166, 166,
56, 157, 103, 157, 157, 157, 157, 157, 112, 157, 166, 166, 114, 117, 166, 166, 110, 166, 166, 160,
157, 157, 157, 157, 113, 157, 157, 157, 114, 93, 166, 166, 65, 166, 112, 166, 166, 166, 166, 166,
94, 157, 157, 53, 157, 152, 99, 0 121, 166, 166, 166, 166, 166, 122, 166, 166, 166,
123, 102, 103, 166, 166, 62, 166, 161, 108, 0
} ; } ;
static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_ec[256] =
...@@ -523,183 +524,185 @@ static yyconst flex_int32_t yy_meta[72] = ...@@ -523,183 +524,185 @@ static yyconst flex_int32_t yy_meta[72] =
1 1
} ; } ;
static yyconst flex_int16_t yy_base[764] = static yyconst flex_int16_t yy_base[776] =
{ 0, { 0,
0, 0, 69, 70, 79, 0, 988, 989, 989, 989, 0, 0, 69, 70, 79, 0, 1000, 1001, 1001, 1001,
962, 49, 145, 989, 989, 961, 142, 989, 141, 139, 974, 49, 145, 1001, 1001, 973, 142, 1001, 141, 139,
154, 167, 176, 959, 989, 176, 959, 51, 989, 0, 154, 167, 176, 971, 1001, 176, 971, 51, 1001, 0,
989, 989, 136, 116, 112, 159, 157, 156, 173, 926, 1001, 1001, 136, 116, 112, 159, 157, 156, 173, 938,
174, 179, 925, 175, 189, 919, 185, 932, 197, 203, 174, 179, 937, 175, 189, 931, 185, 944, 197, 203,
204, 209, 113, 989, 186, 989, 989, 989, 989, 965, 204, 209, 113, 1001, 186, 1001, 1001, 1001, 1001, 977,
989, 989, 0, 989, 989, 989, 989, 989, 989, 989, 1001, 1001, 0, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
989, 989, 989, 255, 989, 0, 989, 262, 280, 298, 1001, 1001, 1001, 255, 1001, 0, 1001, 262, 280, 298,
317, 0, 332, 989, 989, 989, 953, 989, 989, 989, 317, 0, 332, 1001, 1001, 1001, 965, 1001, 1001, 1001,
952, 0, 989, 989, 915, 920, 206, 917, 925, 924, 964, 0, 1001, 1001, 927, 932, 206, 929, 937, 936,
911, 914, 925, 233, 919, 907, 904, 917, 904, 901, 923, 926, 937, 233, 931, 919, 916, 929, 916, 913,
901, 907, 237, 248, 901, 911, 897, 903, 906, 907, 913, 919, 237, 248, 913, 923, 909, 915, 918, 919,
0, 899, 909, 300, 908, 903, 109, 889, 902, 893, 0, 911, 921, 300, 920, 915, 109, 901, 914, 905,
268, 886, 262, 898, 900, 246, 889, 886, 875, 884, 268, 898, 262, 910, 912, 246, 901, 898, 887, 896,
206, 264, 888, 884, 886, 875, 878, 880, 279, 315, 206, 264, 900, 896, 898, 887, 890, 892, 279, 315,
875, 887, 150, 880, 879, 989, 989, 989, 0, 356, 887, 899, 150, 892, 891, 1001, 1001, 1001, 0, 356,
0, 366, 384, 391, 400, 0, 989, 989, 878, 0, 0, 366, 384, 391, 400, 0, 1001, 1001, 890, 0,
874, 869, 873, 882, 879, 294, 863, 863, 874, 866, 886, 881, 885, 894, 891, 294, 875, 875, 886, 878,
225, 876, 873, 873, 871, 868, 860, 866, 853, 851, 225, 888, 885, 885, 883, 880, 872, 878, 865, 863,
863, 849, 865, 0, 862, 850, 857, 854, 858, 859, 875, 861, 877, 0, 874, 862, 869, 866, 870, 871,
852, 849, 838, 837, 850, 853, 841, 849, 844, 835, 864, 861, 850, 849, 862, 865, 853, 861, 856, 847,
371, 840, 843, 834, 841, 830, 834, 825, 839, 838, 371, 852, 855, 846, 853, 842, 846, 837, 851, 850,
829, 835, 283, 819, 822, 820, 830, 820, 815, 813, 841, 847, 283, 831, 834, 832, 842, 832, 827, 825,
815, 825, 811, 813, 810, 821, 820, 823, 313, 814, 827, 837, 823, 825, 822, 833, 832, 835, 313, 826,
810, 808, 797, 374, 815, 817, 806, 798, 407, 414, 822, 820, 809, 374, 827, 829, 818, 810, 407, 414,
421, 428, 795, 805, 804, 0, 802, 433, 0, 0, 421, 428, 807, 817, 816, 0, 814, 433, 0, 0,
795, 793, 793, 794, 789, 797, 786, 803, 792, 436, 807, 805, 805, 806, 801, 809, 798, 815, 804, 436,
0, 0, 786, 796, 795, 795, 0, 780, 439, 0, 0, 0, 798, 808, 807, 807, 0, 792, 439, 0,
0, 782, 442, 789, 790, 781, 775, 774, 775, 774, 0, 794, 442, 801, 802, 793, 787, 786, 787, 786,
774, 445, 0, 0, 0, 0, 0, 769, 770, 775, 786, 445, 0, 0, 778, 777, 776, 778, 779, 784,
769, 765, 778, 773, 773, 771, 770, 764, 758, 760, 778, 774, 787, 782, 782, 780, 779, 773, 767, 769,
759, 763, 755, 758, 753, 761, 766, 754, 751, 763, 768, 772, 764, 767, 762, 770, 775, 763, 760, 772,
754, 0, 0, 760, 756, 748, 748, 753, 744, 751, 763, 0, 0, 769, 765, 757, 757, 762, 753, 760,
748, 0, 0, 0, 0, 738, 750, 749, 748, 749, 757, 0, 0, 0, 0, 747, 759, 758, 757, 758,
749, 0, 0, 0, 0, 736, 0, 744, 735, 0, 758, 0, 0, 0, 0, 745, 0, 753, 744, 0,
734, 735, 729, 739, 0, 0, 0, 730, 0, 726, 743, 744, 738, 748, 0, 0, 0, 739, 0, 735,
0, 0, 0, 0, 0, 0, 0, 0, 0, 736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 745,
449, 735, 0, 0, 733, 729, 726, 0, 0, 0, 449, 744, 0, 0, 742, 738, 735, 0, 0, 0,
724, 720, 725, 716, 714, 727, 712, 0, 712, 725, 451, 454, 457, 733, 729, 734, 725, 723, 736, 721,
714, 710, 716, 711, 718, 0, 716, 713, 717, 701, 0, 721, 734, 723, 719, 725, 720, 727, 0, 725,
699, 702, 708, 714, 709, 708, 696, 0, 698, 699, 722, 726, 710, 708, 711, 717, 723, 718, 717, 705,
0, 696, 699, 0, 693, 0, 706, 686, 695, 690, 0, 707, 708, 0, 705, 708, 0, 702, 0, 715,
0, 683, 683, 696, 0, 698, 0, 452, 710, 709, 695, 704, 699, 0, 692, 692, 705, 0, 707, 0,
708, 676, 675, 0, 692, 691, 686, 675, 688, 675, 464, 719, 718, 717, 685, 684, 0, 701, 700, 695,
672, 0, 0, 677, 676, 0, 673, 680, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 684,
665, 0, 0, 0, 0, 662, 0, 0, 661, 672, 697, 684, 681, 0, 0, 686, 685, 0, 682, 689,
455, 665, 671, 670, 667, 662, 659, 652, 652, 665, 688, 0, 674, 0, 0, 0, 0, 671, 0, 0,
650, 662, 0, 0, 655, 677, 676, 675, 643, 642, 670, 681, 467, 674, 680, 679, 676, 671, 668, 661,
341, 448, 0, 654, 657, 655, 644, 640, 0, 652, 661, 674, 659, 671, 0, 0, 664, 686, 685, 684,
649, 648, 638, 637, 627, 644, 630, 471, 638, 641, 652, 651, 341, 449, 0, 663, 666, 664, 653, 649,
0, 657, 656, 655, 623, 622, 0, 636, 623, 0, 0, 661, 658, 657, 647, 646, 636, 653, 639, 472,
633, 626, 627, 630, 0, 0, 0, 0, 649, 648, 647, 650, 0, 666, 665, 664, 632, 631, 0, 645,
0, 626, 629, 614, 621, 612, 619, 620, 620, 619, 632, 0, 642, 635, 636, 639, 0, 0, 0, 0,
605, 475, 617, 0, 618, 607, 606, 0, 0, 0, 658, 657, 0, 635, 638, 623, 630, 621, 628, 629,
630, 629, 628, 596, 595, 591, 599, 0, 626, 625, 629, 628, 614, 482, 626, 0, 627, 616, 615, 0,
0, 603, 606, 0, 477, 0, 584, 593, 0, 589, 0, 0, 639, 638, 637, 605, 604, 600, 608, 0,
588, 597, 597, 585, 599, 583, 597, 592, 0, 0, 635, 634, 0, 612, 615, 0, 489, 0, 593, 602,
0, 608, 607, 575, 0, 575, 0, 0, 452, 460, 0, 598, 597, 606, 606, 594, 608, 592, 606, 601,
598, 585, 588, 571, 583, 571, 570, 579, 579, 595, 0, 0, 0, 617, 616, 584, 0, 584, 0, 0,
594, 562, 0, 562, 563, 562, 572, 0, 575, 571, 472, 477, 607, 594, 597, 580, 592, 580, 579, 588,
573, 569, 556, 586, 203, 564, 560, 552, 559, 571, 588, 604, 603, 571, 0, 571, 572, 571, 581, 0,
560, 556, 558, 556, 556, 555, 0, 543, 542, 552, 584, 580, 582, 578, 565, 595, 203, 573, 569, 561,
0, 571, 208, 549, 0, 553, 552, 536, 528, 536, 568, 580, 569, 565, 567, 565, 565, 564, 0, 552,
526, 534, 0, 531, 551, 540, 538, 523, 526, 540, 551, 561, 0, 580, 208, 558, 0, 562, 561, 545,
555, 536, 537, 534, 531, 0, 519, 533, 532, 516, 537, 545, 535, 543, 0, 540, 560, 549, 547, 532,
515, 535, 524, 522, 504, 503, 0, 530, 503, 528, 535, 549, 564, 545, 546, 543, 540, 0, 528, 542,
501, 505, 535, 516, 513, 512, 515, 511, 498, 495, 541, 525, 524, 544, 533, 531, 513, 512, 0, 539,
508, 493, 494, 496, 485, 484, 0, 490, 520, 501, 512, 537, 510, 514, 544, 525, 522, 521, 524, 520,
498, 0, 0, 494, 0, 493, 0, 499, 483, 480, 507, 504, 517, 502, 503, 505, 494, 493, 0, 499,
481, 0, 473, 481, 478, 498, 478, 0, 0, 490, 529, 510, 507, 0, 0, 503, 0, 502, 0, 508,
0, 0, 489, 473, 470, 471, 485, 484, 461, 467, 492, 489, 490, 0, 482, 490, 487, 507, 487, 0,
0, 0, 487, 460, 479, 471, 457, 466, 453, 457, 0, 499, 0, 0, 498, 482, 479, 480, 494, 493,
0, 0, 458, 455, 0, 455, 445, 0, 417, 433, 470, 476, 0, 0, 496, 469, 488, 480, 464, 463,
0, 439, 0, 430, 356, 340, 329, 334, 0, 318, 450, 454, 0, 0, 462, 461, 0, 463, 452, 0,
328, 290, 279, 277, 0, 278, 267, 266, 0, 0, 429, 448, 0, 455, 0, 442, 356, 340, 329, 334,
0, 211, 158, 0, 126, 0, 0, 989, 506, 508, 0, 318, 328, 290, 279, 277, 0, 278, 267, 266,
510, 514, 171 0, 0, 0, 211, 158, 0, 126, 0, 0, 1001,
518, 520, 522, 526, 171
} ; } ;
static yyconst flex_int16_t yy_def[764] = static yyconst flex_int16_t yy_def[776] =
{ 0, { 0,
758, 1, 759, 759, 758, 5, 758, 758, 758, 758, 770, 1, 771, 771, 770, 5, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 760, 770, 770, 770, 770, 770, 770, 770, 770, 770, 772,
758, 758, 758, 760, 760, 760, 760, 760, 760, 760, 770, 770, 770, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 758, 758, 758, 758, 758, 758, 758, 772, 772, 772, 770, 770, 770, 770, 770, 770, 770,
758, 758, 761, 758, 758, 758, 758, 758, 758, 758, 770, 770, 773, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 762, 758, 758, 758, 758, 770, 770, 770, 770, 770, 774, 770, 770, 770, 770,
758, 763, 758, 758, 758, 758, 758, 758, 758, 758, 770, 775, 770, 770, 770, 770, 770, 770, 770, 770,
758, 760, 758, 758, 760, 760, 760, 760, 760, 760, 770, 772, 770, 770, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 758, 758, 758, 761, 758, 772, 772, 772, 772, 772, 770, 770, 770, 773, 770,
762, 758, 758, 758, 758, 763, 758, 758, 760, 760, 774, 770, 770, 770, 770, 775, 770, 770, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 758, 758, 772, 772, 772, 772, 772, 772, 772, 772, 770, 770,
758, 758, 760, 760, 760, 760, 760, 760, 760, 760, 770, 770, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
760, 760, 760, 760, 760, 760, 760, 0, 758, 758, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,
758, 758, 758 772, 772, 772, 772, 772, 772, 772, 772, 772, 0,
770, 770, 770, 770, 770
} ; } ;
static yyconst flex_int16_t yy_nxt[1061] = static yyconst flex_int16_t yy_nxt[1073] =
{ 0, { 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23,
...@@ -720,106 +723,108 @@ static yyconst flex_int16_t yy_nxt[1061] = ...@@ -720,106 +723,108 @@ static yyconst flex_int16_t yy_nxt[1061] =
67, 70, 72, 74, 74, 74, 74, 74, 74, 74, 67, 70, 72, 74, 74, 74, 74, 74, 74, 74,
93, 95, 75, 154, 209, 73, 71, 76, 98, 68, 93, 95, 75, 154, 209, 73, 71, 76, 98, 68,
99, 155, 210, 166, 100, 96, 97, 94, 77, 78, 99, 155, 210, 166, 100, 96, 97, 94, 77, 78,
85, 79, 79, 79, 79, 79, 79, 80, 78, 757, 85, 79, 79, 79, 79, 79, 79, 80, 78, 769,
83, 83, 83, 83, 83, 83, 83, 86, 81, 87, 83, 83, 83, 83, 83, 83, 83, 86, 81, 87,
88, 245, 101, 246, 105, 82, 102, 81, 106, 109, 88, 245, 101, 246, 105, 82, 102, 81, 106, 109,
156, 110, 103, 107, 81, 104, 112, 118, 128, 108, 156, 110, 103, 107, 81, 104, 112, 118, 128, 108,
111, 756, 129, 81, 113, 119, 114, 121, 133, 115, 111, 768, 129, 81, 113, 119, 114, 121, 133, 115,
122, 82, 130, 123, 124, 116, 120, 635, 125, 636, 122, 82, 130, 123, 124, 116, 120, 647, 125, 648,
137, 126, 652, 134, 653, 131, 135, 138, 139, 229, 137, 126, 664, 134, 665, 131, 135, 138, 139, 229,
144, 140, 151, 145, 157, 148, 152, 141, 142, 149, 144, 140, 151, 145, 157, 148, 152, 141, 142, 149,
143, 146, 171, 150, 230, 153, 172, 755, 147, 74, 143, 146, 171, 150, 230, 153, 172, 767, 147, 74,
74, 74, 74, 74, 74, 74, 162, 162, 162, 162, 74, 74, 74, 74, 74, 74, 162, 162, 162, 162,
162, 162, 162, 179, 265, 266, 160, 180, 181, 222, 162, 162, 162, 179, 265, 266, 160, 180, 181, 222,
190, 192, 78, 163, 79, 79, 79, 79, 79, 79, 190, 192, 78, 163, 79, 79, 79, 79, 79, 79,
80, 191, 160, 754, 193, 223, 224, 217, 231, 163, 80, 191, 160, 766, 193, 223, 224, 217, 231, 163,
78, 81, 80, 80, 80, 80, 80, 80, 80, 214, 78, 81, 80, 80, 80, 80, 80, 80, 80, 214,
218, 232, 219, 753, 752, 215, 164, 81, 164, 81, 218, 232, 219, 765, 764, 215, 164, 81, 164, 81,
239, 165, 165, 165, 165, 165, 165, 165, 240, 309, 239, 165, 165, 165, 165, 165, 165, 165, 240, 309,
751, 259, 750, 310, 78, 81, 83, 83, 83, 83, 763, 259, 762, 310, 78, 81, 83, 83, 83, 83,
83, 83, 83, 202, 260, 749, 203, 204, 241, 748, 83, 83, 83, 202, 260, 761, 203, 204, 241, 760,
205, 326, 206, 81, 747, 249, 242, 249, 524, 327, 205, 326, 206, 81, 759, 249, 242, 249, 536, 327,
250, 250, 250, 250, 250, 250, 250, 746, 525, 81, 250, 250, 250, 250, 250, 250, 250, 758, 537, 81,
162, 162, 162, 162, 162, 162, 162, 295, 296, 297, 162, 162, 162, 162, 162, 162, 162, 295, 296, 297,
332, 333, 334, 251, 745, 251, 744, 163, 252, 252, 332, 333, 334, 251, 757, 251, 756, 163, 252, 252,
252, 252, 252, 252, 252, 165, 165, 165, 165, 165, 252, 252, 252, 252, 252, 165, 165, 165, 165, 165,
165, 165, 743, 163, 165, 165, 165, 165, 165, 165, 165, 165, 755, 163, 165, 165, 165, 165, 165, 165,
165, 250, 250, 250, 250, 250, 250, 250, 250, 250, 165, 250, 250, 250, 250, 250, 250, 250, 250, 250,
250, 250, 250, 250, 250, 252, 252, 252, 252, 252, 250, 250, 250, 250, 250, 252, 252, 252, 252, 252,
252, 252, 252, 252, 252, 252, 252, 252, 252, 343, 252, 252, 252, 252, 252, 252, 252, 252, 252, 343,
344, 345, 355, 356, 357, 363, 364, 365, 367, 368, 344, 345, 355, 356, 357, 363, 364, 365, 367, 368,
369, 378, 379, 380, 429, 430, 431, 476, 477, 478, 369, 378, 379, 380, 432, 433, 434, 441, 442, 443,
502, 503, 504, 742, 741, 526, 740, 432, 433, 608, 444, 445, 446, 447, 448, 449, 538, 435, 436, 488,
479, 480, 739, 505, 506, 527, 541, 542, 543, 609, 489, 490, 514, 515, 516, 754, 539, 553, 554, 555,
572, 573, 590, 591, 610, 738, 611, 612, 737, 544, 753, 752, 491, 492, 751, 517, 518, 584, 585, 620,
545, 736, 546, 574, 735, 592, 58, 58, 58, 58, 556, 557, 750, 558, 602, 603, 749, 748, 747, 621,
92, 92, 159, 159, 161, 734, 161, 161, 733, 732, 586, 622, 746, 623, 624, 745, 744, 604, 58, 58,
731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 58, 58, 92, 92, 159, 159, 161, 743, 161, 161,
721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733,
711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723,
701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713,
691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703,
681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693,
671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683,
661, 660, 659, 658, 657, 656, 655, 654, 651, 650, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673,
649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 672, 671, 670, 669, 668, 667, 666, 663, 662, 661,
639, 638, 637, 634, 633, 632, 631, 630, 629, 628, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651,
627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 650, 649, 646, 645, 644, 643, 642, 641, 640, 639,
617, 616, 615, 614, 613, 607, 606, 605, 604, 603, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629,
602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 628, 627, 626, 625, 619, 618, 617, 616, 615, 614,
589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 613, 612, 611, 610, 609, 608, 607, 606, 605, 601,
579, 578, 577, 576, 575, 571, 570, 569, 568, 567, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591,
566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 590, 589, 588, 587, 583, 582, 581, 580, 579, 578,
556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568,
540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 567, 566, 565, 564, 563, 562, 561, 560, 559, 552,
530, 529, 528, 523, 522, 521, 520, 519, 518, 517, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542,
516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 541, 540, 535, 534, 533, 532, 531, 530, 529, 528,
501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 527, 526, 525, 524, 523, 522, 521, 520, 519, 513,
491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503,
481, 475, 474, 473, 472, 471, 470, 469, 468, 467, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493,
466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478,
456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468,
446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458,
436, 435, 434, 428, 427, 426, 425, 424, 423, 422, 457, 456, 455, 454, 453, 452, 451, 450, 440, 439,
421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 438, 437, 431, 430, 429, 428, 427, 426, 425, 424,
411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414,
401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404,
391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394,
381, 377, 376, 375, 374, 373, 372, 371, 370, 366, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384,
362, 361, 360, 359, 358, 354, 353, 352, 351, 350, 383, 382, 381, 377, 376, 375, 374, 373, 372, 371,
349, 348, 347, 346, 342, 341, 340, 339, 338, 337, 370, 366, 362, 361, 360, 359, 358, 354, 353, 352,
336, 335, 331, 330, 329, 328, 325, 324, 323, 322, 351, 350, 349, 348, 347, 346, 342, 341, 340, 339,
321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 338, 337, 336, 335, 331, 330, 329, 328, 325, 324,
311, 308, 307, 306, 305, 304, 303, 302, 301, 300, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314,
299, 298, 294, 293, 292, 291, 290, 289, 288, 287, 313, 312, 311, 308, 307, 306, 305, 304, 303, 302,
286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 301, 300, 299, 298, 294, 293, 292, 291, 290, 289,
276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
264, 263, 262, 261, 258, 257, 256, 255, 254, 253, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269,
248, 247, 244, 243, 238, 237, 236, 235, 234, 233, 268, 267, 264, 263, 262, 261, 258, 257, 256, 255,
228, 227, 226, 225, 221, 220, 216, 213, 212, 211, 254, 253, 248, 247, 244, 243, 238, 237, 236, 235,
208, 207, 201, 200, 199, 198, 197, 196, 195, 194, 234, 233, 228, 227, 226, 225, 221, 220, 216, 213,
189, 188, 187, 186, 185, 184, 183, 182, 178, 177, 212, 211, 208, 207, 201, 200, 199, 198, 197, 196,
176, 175, 174, 173, 170, 169, 168, 167, 158, 136, 195, 194, 189, 188, 187, 186, 185, 184, 183, 182,
132, 127, 117, 89, 84, 69, 64, 758, 7, 758, 178, 177, 176, 175, 174, 173, 170, 169, 168, 167,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 158, 136, 132, 127, 117, 89, 84, 69, 64, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 7, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
770, 770
} ; } ;
static yyconst flex_int16_t yy_chk[1061] = static yyconst flex_int16_t yy_chk[1073] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -839,108 +844,110 @@ static yyconst flex_int16_t yy_chk[1061] = ...@@ -839,108 +844,110 @@ static yyconst flex_int16_t yy_chk[1061] =
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
13, 17, 19, 20, 20, 20, 20, 20, 20, 20, 13, 17, 19, 20, 20, 20, 20, 20, 20, 20,
33, 34, 21, 53, 127, 19, 17, 21, 35, 13, 33, 34, 21, 53, 127, 19, 17, 21, 35, 13,
35, 53, 127, 763, 35, 34, 34, 33, 21, 22, 35, 53, 127, 775, 35, 34, 34, 33, 21, 22,
26, 22, 22, 22, 22, 22, 22, 22, 23, 755, 26, 22, 22, 22, 22, 22, 22, 22, 23, 767,
23, 23, 23, 23, 23, 23, 23, 26, 22, 26, 23, 23, 23, 23, 23, 23, 23, 26, 22, 26,
26, 153, 36, 153, 37, 22, 36, 23, 37, 38, 26, 153, 36, 153, 37, 22, 36, 23, 37, 38,
55, 38, 36, 37, 22, 36, 39, 41, 44, 37, 55, 38, 36, 37, 22, 36, 39, 41, 44, 37,
38, 753, 44, 23, 39, 41, 39, 42, 47, 39, 38, 765, 44, 23, 39, 41, 39, 42, 47, 39,
42, 22, 45, 42, 42, 39, 41, 605, 42, 605, 42, 22, 45, 42, 42, 39, 41, 617, 42, 617,
49, 42, 623, 47, 623, 45, 47, 49, 49, 141, 49, 42, 635, 47, 635, 45, 47, 49, 49, 141,
50, 49, 52, 50, 55, 51, 52, 49, 49, 51, 50, 49, 52, 50, 55, 51, 52, 49, 49, 51,
49, 50, 97, 51, 141, 52, 97, 752, 50, 74, 49, 50, 97, 51, 141, 52, 97, 764, 50, 74,
74, 74, 74, 74, 74, 74, 78, 78, 78, 78, 74, 74, 74, 74, 74, 74, 78, 78, 78, 78,
78, 78, 78, 104, 181, 181, 74, 104, 104, 136, 78, 78, 78, 104, 181, 181, 74, 104, 104, 136,
113, 114, 79, 78, 79, 79, 79, 79, 79, 79, 113, 114, 79, 78, 79, 79, 79, 79, 79, 79,
79, 113, 74, 748, 114, 136, 136, 133, 142, 78, 79, 113, 74, 760, 114, 136, 136, 133, 142, 78,
80, 79, 80, 80, 80, 80, 80, 80, 80, 131, 80, 79, 80, 80, 80, 80, 80, 80, 80, 131,
133, 142, 133, 747, 746, 131, 81, 79, 81, 80, 133, 142, 133, 759, 758, 131, 81, 79, 81, 80,
149, 81, 81, 81, 81, 81, 81, 81, 149, 223, 149, 81, 81, 81, 81, 81, 81, 81, 149, 223,
744, 176, 743, 223, 83, 80, 83, 83, 83, 83, 756, 176, 755, 223, 83, 80, 83, 83, 83, 83,
83, 83, 83, 124, 176, 742, 124, 124, 150, 741, 83, 83, 83, 124, 176, 754, 124, 124, 150, 753,
124, 239, 124, 83, 740, 160, 150, 160, 481, 239, 124, 239, 124, 83, 752, 160, 150, 160, 493, 239,
160, 160, 160, 160, 160, 160, 160, 738, 481, 83, 160, 160, 160, 160, 160, 160, 160, 750, 493, 83,
162, 162, 162, 162, 162, 162, 162, 211, 211, 211, 162, 162, 162, 162, 162, 162, 162, 211, 211, 211,
244, 244, 244, 163, 737, 163, 736, 162, 163, 163, 244, 244, 244, 163, 749, 163, 748, 162, 163, 163,
163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164,
164, 164, 735, 162, 165, 165, 165, 165, 165, 165, 164, 164, 747, 162, 165, 165, 165, 165, 165, 165,
165, 249, 249, 249, 249, 249, 249, 249, 250, 250, 165, 249, 249, 249, 249, 249, 249, 249, 250, 250,
250, 250, 250, 250, 250, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 251, 251, 251, 251, 251,
251, 251, 252, 252, 252, 252, 252, 252, 252, 258, 251, 251, 252, 252, 252, 252, 252, 252, 252, 258,
258, 258, 270, 270, 270, 279, 279, 279, 283, 283, 258, 258, 270, 270, 270, 279, 279, 279, 283, 283,
283, 292, 292, 292, 371, 371, 371, 428, 428, 428, 283, 292, 292, 292, 371, 371, 371, 381, 381, 381,
461, 461, 461, 734, 732, 482, 730, 371, 371, 579, 382, 382, 382, 383, 383, 383, 494, 371, 371, 431,
428, 428, 729, 461, 461, 482, 498, 498, 498, 579, 431, 431, 473, 473, 473, 746, 494, 510, 510, 510,
532, 532, 555, 555, 580, 727, 580, 580, 726, 498, 744, 742, 431, 431, 741, 473, 473, 544, 544, 591,
498, 724, 498, 532, 723, 555, 759, 759, 759, 759, 510, 510, 739, 510, 567, 567, 738, 736, 735, 591,
760, 760, 761, 761, 762, 720, 762, 762, 719, 718, 544, 592, 732, 592, 592, 731, 730, 567, 771, 771,
717, 716, 715, 714, 713, 710, 709, 708, 707, 706, 771, 771, 772, 772, 773, 773, 774, 729, 774, 774,
705, 704, 703, 700, 697, 696, 695, 694, 693, 691, 728, 727, 726, 725, 722, 721, 720, 719, 718, 717,
690, 689, 688, 686, 684, 681, 680, 679, 678, 676, 716, 715, 712, 709, 708, 707, 706, 705, 703, 702,
675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 701, 700, 698, 696, 693, 692, 691, 690, 688, 687,
665, 664, 663, 662, 661, 660, 659, 658, 656, 655, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677,
654, 653, 652, 651, 650, 649, 648, 647, 645, 644, 676, 675, 674, 673, 672, 671, 670, 668, 667, 666,
643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 665, 664, 663, 662, 661, 660, 659, 657, 656, 655,
632, 631, 630, 629, 628, 627, 626, 624, 622, 620, 654, 653, 652, 651, 650, 649, 648, 647, 646, 644,
619, 618, 616, 615, 614, 613, 612, 611, 610, 609, 643, 642, 641, 640, 639, 638, 636, 634, 632, 631,
608, 607, 606, 604, 603, 602, 601, 600, 599, 597, 630, 628, 627, 626, 625, 624, 623, 622, 621, 620,
596, 595, 594, 592, 591, 590, 589, 588, 587, 586, 619, 618, 616, 615, 614, 613, 612, 611, 609, 608,
585, 584, 583, 582, 581, 576, 574, 573, 572, 568, 607, 606, 604, 603, 602, 601, 600, 599, 598, 597,
567, 566, 565, 564, 563, 562, 561, 560, 558, 557, 596, 595, 594, 593, 588, 586, 585, 584, 580, 579,
553, 552, 550, 549, 547, 546, 545, 544, 543, 542, 578, 577, 576, 575, 574, 573, 572, 570, 569, 565,
541, 537, 536, 535, 533, 531, 530, 529, 528, 527, 564, 562, 561, 559, 558, 557, 556, 555, 554, 553,
526, 525, 524, 523, 522, 520, 519, 514, 513, 512, 549, 548, 547, 545, 543, 542, 541, 540, 539, 538,
511, 509, 508, 506, 505, 504, 503, 502, 500, 499, 537, 536, 535, 534, 532, 531, 526, 525, 524, 523,
497, 496, 495, 494, 493, 492, 491, 490, 488, 487, 521, 520, 518, 517, 516, 515, 514, 512, 511, 509,
486, 485, 484, 480, 479, 478, 477, 476, 475, 472, 508, 507, 506, 505, 504, 503, 502, 500, 499, 498,
471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 497, 496, 492, 491, 490, 489, 488, 487, 484, 483,
460, 459, 456, 451, 449, 448, 447, 445, 444, 441, 482, 481, 480, 479, 478, 477, 476, 475, 474, 472,
440, 439, 438, 437, 436, 435, 433, 432, 431, 430, 471, 468, 463, 461, 460, 459, 457, 456, 453, 452,
429, 426, 424, 423, 422, 420, 419, 418, 417, 415, 451, 450, 440, 439, 438, 436, 435, 434, 433, 432,
413, 412, 410, 409, 407, 406, 405, 404, 403, 402, 429, 427, 426, 425, 423, 422, 421, 420, 418, 416,
401, 400, 399, 398, 397, 395, 394, 393, 392, 391, 415, 413, 412, 410, 409, 408, 407, 406, 405, 404,
390, 389, 387, 386, 385, 384, 383, 382, 381, 377, 403, 402, 401, 400, 398, 397, 396, 395, 394, 393,
376, 375, 372, 370, 360, 358, 354, 353, 352, 351, 392, 390, 389, 388, 387, 386, 385, 384, 377, 376,
349, 348, 346, 341, 340, 339, 338, 337, 336, 331, 375, 372, 370, 360, 358, 354, 353, 352, 351, 349,
330, 329, 328, 327, 326, 325, 324, 321, 320, 319, 348, 346, 341, 340, 339, 338, 337, 336, 331, 330,
318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 329, 328, 327, 326, 325, 324, 321, 320, 319, 318,
308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
298, 291, 290, 289, 288, 287, 286, 285, 284, 282, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
278, 276, 275, 274, 273, 269, 268, 267, 266, 265, 297, 296, 295, 291, 290, 289, 288, 287, 286, 285,
264, 263, 262, 261, 257, 255, 254, 253, 248, 247, 284, 282, 278, 276, 275, 274, 273, 269, 268, 267,
246, 245, 243, 242, 241, 240, 238, 237, 236, 235, 266, 265, 264, 263, 262, 261, 257, 255, 254, 253,
234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 248, 247, 246, 245, 243, 242, 241, 240, 238, 237,
224, 222, 221, 220, 219, 218, 217, 216, 215, 214, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227,
213, 212, 210, 209, 208, 207, 206, 205, 204, 203, 226, 225, 224, 222, 221, 220, 219, 218, 217, 216,
202, 201, 200, 199, 198, 197, 196, 195, 193, 192, 215, 214, 213, 212, 210, 209, 208, 207, 206, 205,
191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195,
180, 179, 178, 177, 175, 174, 173, 172, 171, 169, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184,
155, 154, 152, 151, 148, 147, 146, 145, 144, 143, 183, 182, 180, 179, 178, 177, 175, 174, 173, 172,
140, 139, 138, 137, 135, 134, 132, 130, 129, 128, 171, 169, 155, 154, 152, 151, 148, 147, 146, 145,
126, 125, 123, 122, 120, 119, 118, 117, 116, 115, 144, 143, 140, 139, 138, 137, 135, 134, 132, 130,
112, 111, 110, 109, 108, 107, 106, 105, 103, 102, 129, 128, 126, 125, 123, 122, 120, 119, 118, 117,
101, 100, 99, 98, 96, 95, 91, 87, 60, 48, 116, 115, 112, 111, 110, 109, 108, 107, 106, 105,
46, 43, 40, 27, 24, 16, 11, 7, 758, 758, 103, 102, 101, 100, 99, 98, 96, 95, 91, 87,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 60, 48, 46, 43, 40, 27, 24, 16, 11, 7,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
758, 758, 758, 758, 758, 758, 758, 758, 758, 758 770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
770, 770, 770, 770, 770, 770, 770, 770, 770, 770,
770, 770
} ; } ;
/* Table of booleans, true if rule could match eol. */ /* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[215] = static yyconst flex_int32_t yy_rule_can_match_eol[224] =
{ 0, { 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...@@ -952,7 +959,8 @@ static yyconst flex_int32_t yy_rule_can_match_eol[215] = ...@@ -952,7 +959,8 @@ static yyconst flex_int32_t yy_rule_can_match_eol[215] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, };
/* The intent behind this definition is that it'll catch /* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed. * any uses of REJECT which flex missed.
...@@ -1282,13 +1290,13 @@ yy_match: ...@@ -1282,13 +1290,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 759 ) if ( yy_current_state >= 771 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 758 ); while ( yy_current_state != 770 );
yy_cp = yyg->yy_last_accepting_cpos; yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state; yy_current_state = yyg->yy_last_accepting_state;
...@@ -1485,82 +1493,109 @@ YY_RULE_SETUP ...@@ -1485,82 +1493,109 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 42: case 42:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC2); } { return ES2_ident_ES3_keyword(context, MATRIX2); }
YY_BREAK YY_BREAK
case 43: case 43:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC3); } { return ES2_ident_ES3_keyword(context, MATRIX3); }
YY_BREAK YY_BREAK
case 44: case 44:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC4); } { return ES2_ident_ES3_keyword(context, MATRIX4); }
YY_BREAK YY_BREAK
case 45: case 45:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC2); } { return ES2_ident_ES3_keyword(context, MATRIX2x3); }
YY_BREAK YY_BREAK
case 46: case 46:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC3); } { return ES2_ident_ES3_keyword(context, MATRIX3x2); }
YY_BREAK YY_BREAK
case 47: case 47:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC4); } { return ES2_ident_ES3_keyword(context, MATRIX2x4); }
YY_BREAK YY_BREAK
case 48: case 48:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC2); } { return ES2_ident_ES3_keyword(context, MATRIX4x2); }
YY_BREAK YY_BREAK
case 49: case 49:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC3); } { return ES2_ident_ES3_keyword(context, MATRIX3x4); }
YY_BREAK YY_BREAK
case 50: case 50:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC4); } { return ES2_ident_ES3_keyword(context, MATRIX4x3); }
YY_BREAK YY_BREAK
case 51: case 51:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER2D; } { context->lexAfterType = true; return (VEC2); }
YY_BREAK YY_BREAK
case 52: case 52:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLERCUBE; } { context->lexAfterType = true; return (VEC3); }
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; } { context->lexAfterType = true; return (VEC4); }
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3D); } { context->lexAfterType = true; return (IVEC2); }
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); } { context->lexAfterType = true; return (IVEC3); }
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); } { context->lexAfterType = true; return (IVEC4); }
YY_BREAK YY_BREAK
case 57: case 57:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER2DRECT; } { context->lexAfterType = true; return (BVEC2); }
YY_BREAK YY_BREAK
case 58: case 58:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(STRUCT); } { context->lexAfterType = true; return (BVEC3); }
YY_BREAK YY_BREAK
/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */
case 59: case 59:
YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC4); }
YY_BREAK
case 60: case 60:
YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER2D; }
YY_BREAK
case 61: case 61:
YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLERCUBE; }
YY_BREAK
case 62: case 62:
YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
YY_BREAK
case 63: case 63:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3D); }
YY_BREAK
case 64: case 64:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); }
YY_BREAK
case 65: case 65:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
YY_BREAK
case 66: case 66:
YY_RULE_SETUP
{ context->lexAfterType = true; return SAMPLER2DRECT; }
YY_BREAK
case 67: case 67:
YY_RULE_SETUP
{ context->lexAfterType = true; return(STRUCT); }
YY_BREAK
/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */
case 68: case 68:
case 69: case 69:
case 70: case 70:
...@@ -1608,6 +1643,15 @@ case 111: ...@@ -1608,6 +1643,15 @@ case 111:
case 112: case 112:
case 113: case 113:
case 114: case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
YY_RULE_SETUP YY_RULE_SETUP
{ {
if (context->shaderVersion < 300) { if (context->shaderVersion < 300) {
...@@ -1618,15 +1662,6 @@ YY_RULE_SETUP ...@@ -1618,15 +1662,6 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
/* Reserved keywords */ /* Reserved keywords */
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
case 124: case 124:
case 125: case 125:
case 126: case 126:
...@@ -1660,225 +1695,234 @@ case 153: ...@@ -1660,225 +1695,234 @@ case 153:
case 154: case 154:
case 155: case 155:
case 156: case 156:
case 157:
case 158:
case 159:
case 160:
case 161:
case 162:
case 163:
case 164:
case 165:
YY_RULE_SETUP YY_RULE_SETUP
{ return reserved_word(yyscanner); } { return reserved_word(yyscanner); }
YY_BREAK YY_BREAK
case 157: case 166:
YY_RULE_SETUP YY_RULE_SETUP
{ {
yylval->lex.string = NewPoolTString(yytext); yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner); return check_type(yyscanner);
} }
YY_BREAK YY_BREAK
case 158: case 167:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); }
YY_BREAK YY_BREAK
case 159: case 168:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); }
YY_BREAK YY_BREAK
case 160: case 169:
YY_RULE_SETUP YY_RULE_SETUP
{ context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;} { context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;}
YY_BREAK YY_BREAK
case 161: case 170:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); }
YY_BREAK YY_BREAK
case 162: case 171:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK YY_BREAK
case 163: case 172:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK YY_BREAK
case 164: case 173:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK YY_BREAK
case 165: case 174:
YY_RULE_SETUP YY_RULE_SETUP
{ return(ADD_ASSIGN); } { return(ADD_ASSIGN); }
YY_BREAK YY_BREAK
case 166: case 175:
YY_RULE_SETUP YY_RULE_SETUP
{ return(SUB_ASSIGN); } { return(SUB_ASSIGN); }
YY_BREAK YY_BREAK
case 167: case 176:
YY_RULE_SETUP YY_RULE_SETUP
{ return(MUL_ASSIGN); } { return(MUL_ASSIGN); }
YY_BREAK YY_BREAK
case 168: case 177:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DIV_ASSIGN); } { return(DIV_ASSIGN); }
YY_BREAK YY_BREAK
case 169: case 178:
YY_RULE_SETUP YY_RULE_SETUP
{ return(MOD_ASSIGN); } { return(MOD_ASSIGN); }
YY_BREAK YY_BREAK
case 170: case 179:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_ASSIGN); } { return(LEFT_ASSIGN); }
YY_BREAK YY_BREAK
case 171: case 180:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_ASSIGN); } { return(RIGHT_ASSIGN); }
YY_BREAK YY_BREAK
case 172: case 181:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AND_ASSIGN); } { return(AND_ASSIGN); }
YY_BREAK YY_BREAK
case 173: case 182:
YY_RULE_SETUP YY_RULE_SETUP
{ return(XOR_ASSIGN); } { return(XOR_ASSIGN); }
YY_BREAK YY_BREAK
case 174: case 183:
YY_RULE_SETUP YY_RULE_SETUP
{ return(OR_ASSIGN); } { return(OR_ASSIGN); }
YY_BREAK YY_BREAK
case 175: case 184:
YY_RULE_SETUP YY_RULE_SETUP
{ return(INC_OP); } { return(INC_OP); }
YY_BREAK YY_BREAK
case 176: case 185:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DEC_OP); } { return(DEC_OP); }
YY_BREAK YY_BREAK
case 177: case 186:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AND_OP); } { return(AND_OP); }
YY_BREAK YY_BREAK
case 178: case 187:
YY_RULE_SETUP YY_RULE_SETUP
{ return(OR_OP); } { return(OR_OP); }
YY_BREAK YY_BREAK
case 179: case 188:
YY_RULE_SETUP YY_RULE_SETUP
{ return(XOR_OP); } { return(XOR_OP); }
YY_BREAK YY_BREAK
case 180: case 189:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LE_OP); } { return(LE_OP); }
YY_BREAK YY_BREAK
case 181: case 190:
YY_RULE_SETUP YY_RULE_SETUP
{ return(GE_OP); } { return(GE_OP); }
YY_BREAK YY_BREAK
case 182: case 191:
YY_RULE_SETUP YY_RULE_SETUP
{ return(EQ_OP); } { return(EQ_OP); }
YY_BREAK YY_BREAK
case 183: case 192:
YY_RULE_SETUP YY_RULE_SETUP
{ return(NE_OP); } { return(NE_OP); }
YY_BREAK YY_BREAK
case 184: case 193:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_OP); } { return(LEFT_OP); }
YY_BREAK YY_BREAK
case 185: case 194:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_OP); } { return(RIGHT_OP); }
YY_BREAK YY_BREAK
case 186: case 195:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(SEMICOLON); } { context->lexAfterType = false; return(SEMICOLON); }
YY_BREAK YY_BREAK
case 187: case 196:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(LEFT_BRACE); } { context->lexAfterType = false; return(LEFT_BRACE); }
YY_BREAK YY_BREAK
case 188: case 197:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_BRACE); } { return(RIGHT_BRACE); }
YY_BREAK YY_BREAK
case 189: case 198:
YY_RULE_SETUP YY_RULE_SETUP
{ if (context->inTypeParen) context->lexAfterType = false; return(COMMA); } { if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
YY_BREAK YY_BREAK
case 190: case 199:
YY_RULE_SETUP YY_RULE_SETUP
{ return(COLON); } { return(COLON); }
YY_BREAK YY_BREAK
case 191: case 200:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(EQUAL); } { context->lexAfterType = false; return(EQUAL); }
YY_BREAK YY_BREAK
case 192: case 201:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); } { context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
YY_BREAK YY_BREAK
case 193: case 202:
YY_RULE_SETUP YY_RULE_SETUP
{ context->inTypeParen = false; return(RIGHT_PAREN); } { context->inTypeParen = false; return(RIGHT_PAREN); }
YY_BREAK YY_BREAK
case 194: case 203:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_BRACKET); } { return(LEFT_BRACKET); }
YY_BREAK YY_BREAK
case 195: case 204:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_BRACKET); } { return(RIGHT_BRACKET); }
YY_BREAK YY_BREAK
case 196: case 205:
YY_RULE_SETUP YY_RULE_SETUP
{ BEGIN(FIELDS); return(DOT); } { BEGIN(FIELDS); return(DOT); }
YY_BREAK YY_BREAK
case 197: case 206:
YY_RULE_SETUP YY_RULE_SETUP
{ return(BANG); } { return(BANG); }
YY_BREAK YY_BREAK
case 198: case 207:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DASH); } { return(DASH); }
YY_BREAK YY_BREAK
case 199: case 208:
YY_RULE_SETUP YY_RULE_SETUP
{ return(TILDE); } { return(TILDE); }
YY_BREAK YY_BREAK
case 200: case 209:
YY_RULE_SETUP YY_RULE_SETUP
{ return(PLUS); } { return(PLUS); }
YY_BREAK YY_BREAK
case 201: case 210:
YY_RULE_SETUP YY_RULE_SETUP
{ return(STAR); } { return(STAR); }
YY_BREAK YY_BREAK
case 202: case 211:
YY_RULE_SETUP YY_RULE_SETUP
{ return(SLASH); } { return(SLASH); }
YY_BREAK YY_BREAK
case 203: case 212:
YY_RULE_SETUP YY_RULE_SETUP
{ return(PERCENT); } { return(PERCENT); }
YY_BREAK YY_BREAK
case 204: case 213:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_ANGLE); } { return(LEFT_ANGLE); }
YY_BREAK YY_BREAK
case 205: case 214:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_ANGLE); } { return(RIGHT_ANGLE); }
YY_BREAK YY_BREAK
case 206: case 215:
YY_RULE_SETUP YY_RULE_SETUP
{ return(VERTICAL_BAR); } { return(VERTICAL_BAR); }
YY_BREAK YY_BREAK
case 207: case 216:
YY_RULE_SETUP YY_RULE_SETUP
{ return(CARET); } { return(CARET); }
YY_BREAK YY_BREAK
case 208: case 217:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AMPERSAND); } { return(AMPERSAND); }
YY_BREAK YY_BREAK
case 209: case 218:
YY_RULE_SETUP YY_RULE_SETUP
{ return(QUESTION); } { return(QUESTION); }
YY_BREAK YY_BREAK
case 210: case 219:
YY_RULE_SETUP YY_RULE_SETUP
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
...@@ -1886,12 +1930,12 @@ YY_RULE_SETUP ...@@ -1886,12 +1930,12 @@ YY_RULE_SETUP
return FIELD_SELECTION; return FIELD_SELECTION;
} }
YY_BREAK YY_BREAK
case 211: case 220:
YY_RULE_SETUP YY_RULE_SETUP
{} {}
YY_BREAK YY_BREAK
case 212: case 221:
/* rule 212 can match eol */ /* rule 221 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
{ } { }
YY_BREAK YY_BREAK
...@@ -1900,11 +1944,11 @@ case YY_STATE_EOF(COMMENT): ...@@ -1900,11 +1944,11 @@ case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(FIELDS): case YY_STATE_EOF(FIELDS):
{ context->AfterEOF = true; yyterminate(); } { context->AfterEOF = true; yyterminate(); }
YY_BREAK YY_BREAK
case 213: case 222:
YY_RULE_SETUP YY_RULE_SETUP
{ context->warning(yylineno, "Unknown char", yytext, ""); return 0; } { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
YY_BREAK YY_BREAK
case 214: case 223:
YY_RULE_SETUP YY_RULE_SETUP
ECHO; ECHO;
YY_BREAK YY_BREAK
...@@ -2200,7 +2244,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2200,7 +2244,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 759 ) if ( yy_current_state >= 771 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
...@@ -2229,11 +2273,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2229,11 +2273,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 759 ) if ( yy_current_state >= 771 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 758); yy_is_jam = (yy_current_state == 770);
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -84,70 +84,76 @@ extern int yydebug; ...@@ -84,70 +84,76 @@ extern int yydebug;
INOUT_QUAL = 293, INOUT_QUAL = 293,
UNIFORM = 294, UNIFORM = 294,
VARYING = 295, VARYING = 295,
CENTROID = 296, MATRIX2x3 = 296,
FLAT = 297, MATRIX3x2 = 297,
SMOOTH = 298, MATRIX2x4 = 298,
STRUCT = 299, MATRIX4x2 = 299,
VOID_TYPE = 300, MATRIX3x4 = 300,
WHILE = 301, MATRIX4x3 = 301,
SAMPLER2D = 302, CENTROID = 302,
SAMPLERCUBE = 303, FLAT = 303,
SAMPLER_EXTERNAL_OES = 304, SMOOTH = 304,
SAMPLER2DRECT = 305, STRUCT = 305,
SAMPLER3D = 306, VOID_TYPE = 306,
SAMPLER3DRECT = 307, WHILE = 307,
SAMPLER2DSHADOW = 308, SAMPLER2D = 308,
IDENTIFIER = 309, SAMPLERCUBE = 309,
TYPE_NAME = 310, SAMPLER_EXTERNAL_OES = 310,
FLOATCONSTANT = 311, SAMPLER2DRECT = 311,
INTCONSTANT = 312, SAMPLER3D = 312,
BOOLCONSTANT = 313, SAMPLER3DRECT = 313,
FIELD_SELECTION = 314, SAMPLER2DSHADOW = 314,
LEFT_OP = 315, IDENTIFIER = 315,
RIGHT_OP = 316, TYPE_NAME = 316,
INC_OP = 317, FLOATCONSTANT = 317,
DEC_OP = 318, INTCONSTANT = 318,
LE_OP = 319, BOOLCONSTANT = 319,
GE_OP = 320, FIELD_SELECTION = 320,
EQ_OP = 321, LEFT_OP = 321,
NE_OP = 322, RIGHT_OP = 322,
AND_OP = 323, INC_OP = 323,
OR_OP = 324, DEC_OP = 324,
XOR_OP = 325, LE_OP = 325,
MUL_ASSIGN = 326, GE_OP = 326,
DIV_ASSIGN = 327, EQ_OP = 327,
ADD_ASSIGN = 328, NE_OP = 328,
MOD_ASSIGN = 329, AND_OP = 329,
LEFT_ASSIGN = 330, OR_OP = 330,
RIGHT_ASSIGN = 331, XOR_OP = 331,
AND_ASSIGN = 332, MUL_ASSIGN = 332,
XOR_ASSIGN = 333, DIV_ASSIGN = 333,
OR_ASSIGN = 334, ADD_ASSIGN = 334,
SUB_ASSIGN = 335, MOD_ASSIGN = 335,
LEFT_PAREN = 336, LEFT_ASSIGN = 336,
RIGHT_PAREN = 337, RIGHT_ASSIGN = 337,
LEFT_BRACKET = 338, AND_ASSIGN = 338,
RIGHT_BRACKET = 339, XOR_ASSIGN = 339,
LEFT_BRACE = 340, OR_ASSIGN = 340,
RIGHT_BRACE = 341, SUB_ASSIGN = 341,
DOT = 342, LEFT_PAREN = 342,
COMMA = 343, RIGHT_PAREN = 343,
COLON = 344, LEFT_BRACKET = 344,
EQUAL = 345, RIGHT_BRACKET = 345,
SEMICOLON = 346, LEFT_BRACE = 346,
BANG = 347, RIGHT_BRACE = 347,
DASH = 348, DOT = 348,
TILDE = 349, COMMA = 349,
PLUS = 350, COLON = 350,
STAR = 351, EQUAL = 351,
SLASH = 352, SEMICOLON = 352,
PERCENT = 353, BANG = 353,
LEFT_ANGLE = 354, DASH = 354,
RIGHT_ANGLE = 355, TILDE = 355,
VERTICAL_BAR = 356, PLUS = 356,
CARET = 357, STAR = 357,
AMPERSAND = 358, SLASH = 358,
QUESTION = 359 PERCENT = 359,
LEFT_ANGLE = 360,
RIGHT_ANGLE = 361,
VERTICAL_BAR = 362,
CARET = 363,
AMPERSAND = 364,
QUESTION = 365
}; };
#endif #endif
......
...@@ -22,8 +22,9 @@ public: ...@@ -22,8 +22,9 @@ public:
infoSink(sink), infoSink(sink),
symbolTable(symTable), symbolTable(symTable),
size(0), size(0),
isMatrix(false), isDiagonalMatrixInit(false),
matrixSize(0) { matrixCols(0),
matrixRows(0) {
} }
bool error; bool error;
...@@ -46,8 +47,9 @@ protected: ...@@ -46,8 +47,9 @@ protected:
TInfoSink& infoSink; TInfoSink& infoSink;
TSymbolTable& symbolTable; TSymbolTable& symbolTable;
int size; // size of the constructor ( 4 for vec4) int size; // size of the constructor ( 4 for vec4)
bool isMatrix; bool isDiagonalMatrixInit;
int matrixSize; // dimension of the matrix (nominal size and not the instance size) int matrixCols; // columns of the matrix
int matrixRows; // rows of the matrix
}; };
// //
...@@ -118,8 +120,9 @@ bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate* node) ...@@ -118,8 +120,9 @@ bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
size = node->getType().getObjectSize(); size = node->getType().getObjectSize();
if (node->getType().isMatrix()) { if (node->getType().isMatrix()) {
isMatrix = true; isDiagonalMatrixInit = true;
matrixSize = node->getType().getRows(); matrixCols = node->getType().getCols();
matrixRows = node->getType().getRows();
} }
} }
...@@ -136,8 +139,9 @@ bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate* node) ...@@ -136,8 +139,9 @@ bool TConstTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
singleConstantParam = false; singleConstantParam = false;
constructorType = EOpNull; constructorType = EOpNull;
size = 0; size = 0;
isMatrix = false; isDiagonalMatrixInit = false;
matrixSize = 0; matrixCols = 0;
matrixRows = 0;
} }
return false; return false;
} }
...@@ -178,7 +182,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) ...@@ -178,7 +182,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
} else { } else {
int totalSize = index + size; int totalSize = index + size;
ConstantUnion *rightUnionArray = node->getUnionArrayPointer(); ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
if (!isMatrix) { if (!isDiagonalMatrixInit) {
int count = 0; int count = 0;
for (int i = index; i < totalSize; i++) { for (int i = index; i < totalSize; i++) {
if (i >= instanceSize) if (i >= instanceSize)
...@@ -191,21 +195,25 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) ...@@ -191,21 +195,25 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
if (node->getType().getObjectSize() > 1) if (node->getType().getObjectSize() > 1)
count++; count++;
} }
} else { // for matrix constructors }
int count = 0; else
int element = index; {
for (int i = index; i < totalSize; i++) { // for matrix diagonal constructors from a single scalar
if (i >= instanceSize) for (int i = 0, col = 0; col < matrixCols; col++)
return; {
if (element - i == 0 || (i - element) % (matrixSize + 1) == 0 ) for (int row = 0; row < matrixRows; row++, i++)
leftUnionArray[i] = rightUnionArray[count]; {
else if (col == row)
leftUnionArray[i].setFConst(0.0f); {
leftUnionArray[i] = rightUnionArray[0];
(index)++; }
else
if (node->getType().getObjectSize() > 1) {
count++; leftUnionArray[i].setFConst(0.0f);
}
(index)++;
}
} }
} }
} }
......
...@@ -876,8 +876,9 @@ int ProgramBinary::packVaryings(InfoLog &infoLog, const Varying *packing[][4], F ...@@ -876,8 +876,9 @@ int ProgramBinary::packVaryings(InfoLog &infoLog, const Varying *packing[][4], F
for (VaryingList::iterator varying = fragmentShader->mVaryings.begin(); varying != fragmentShader->mVaryings.end(); varying++) for (VaryingList::iterator varying = fragmentShader->mVaryings.begin(); varying != fragmentShader->mVaryings.end(); varying++)
{ {
int n = VariableRowCount(varying->type) * varying->size; GLenum transposedType = TransposeMatrixType(varying->type);
int m = VariableColumnCount(varying->type); int n = VariableRowCount(transposedType) * varying->size;
int m = VariableColumnCount(transposedType);
bool success = false; bool success = false;
if (m == 2 || m == 3 || m == 4) if (m == 2 || m == 3 || m == 4)
...@@ -1124,7 +1125,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1124,7 +1125,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
int semanticIndex = 0; int semanticIndex = 0;
for (AttributeArray::iterator attribute = vertexShader->mAttributes.begin(); attribute != vertexShader->mAttributes.end(); attribute++) for (AttributeArray::iterator attribute = vertexShader->mAttributes.begin(); attribute != vertexShader->mAttributes.end(); attribute++)
{ {
switch (attribute->type) switch (TransposeMatrixType(attribute->type))
{ {
case GL_FLOAT: vertexHLSL += " float "; break; case GL_FLOAT: vertexHLSL += " float "; break;
case GL_FLOAT_VEC2: vertexHLSL += " float2 "; break; case GL_FLOAT_VEC2: vertexHLSL += " float2 "; break;
...@@ -1133,12 +1134,18 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1133,12 +1134,18 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
case GL_FLOAT_MAT2: vertexHLSL += " float2x2 "; break; case GL_FLOAT_MAT2: vertexHLSL += " float2x2 "; break;
case GL_FLOAT_MAT3: vertexHLSL += " float3x3 "; break; case GL_FLOAT_MAT3: vertexHLSL += " float3x3 "; break;
case GL_FLOAT_MAT4: vertexHLSL += " float4x4 "; break; case GL_FLOAT_MAT4: vertexHLSL += " float4x4 "; break;
case GL_FLOAT_MAT2x3: vertexHLSL += " float2x3 "; break;
case GL_FLOAT_MAT3x2: vertexHLSL += " float3x2 "; break;
case GL_FLOAT_MAT2x4: vertexHLSL += " float2x4 "; break;
case GL_FLOAT_MAT4x2: vertexHLSL += " float4x2 "; break;
case GL_FLOAT_MAT3x4: vertexHLSL += " float3x4 "; break;
case GL_FLOAT_MAT4x3: vertexHLSL += " float4x3 "; break;
default: UNREACHABLE(); default: UNREACHABLE();
} }
vertexHLSL += decorateAttribute(attribute->name) + " : TEXCOORD" + str(semanticIndex) + ";\n"; vertexHLSL += decorateAttribute(attribute->name) + " : TEXCOORD" + str(semanticIndex) + ";\n";
semanticIndex += VariableRowCount(attribute->type); semanticIndex += AttributeRegisterCount(attribute->type);
} }
vertexHLSL += "};\n" vertexHLSL += "};\n"
...@@ -1177,7 +1184,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1177,7 +1184,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
{ {
vertexHLSL += " " + decorateAttribute(attribute->name) + " = "; vertexHLSL += " " + decorateAttribute(attribute->name) + " = ";
if (VariableRowCount(attribute->type) > 1) // Matrix if (IsMatrixType(attribute->type)) // Matrix
{ {
vertexHLSL += "transpose"; vertexHLSL += "transpose";
} }
...@@ -1230,7 +1237,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1230,7 +1237,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
{ {
for (int i = 0; i < varying->size; i++) for (int i = 0; i < varying->size; i++)
{ {
int rows = VariableRowCount(varying->type); int rows = VariableRowCount(TransposeMatrixType(varying->type));
for (int j = 0; j < rows; j++) for (int j = 0; j < rows; j++)
{ {
...@@ -1404,7 +1411,8 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1404,7 +1411,8 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
{ {
for (int i = 0; i < varying->size; i++) for (int i = 0; i < varying->size; i++)
{ {
int rows = VariableRowCount(varying->type); GLenum transposedType = TransposeMatrixType(varying->type);
int rows = VariableRowCount(transposedType);
for (int j = 0; j < rows; j++) for (int j = 0; j < rows; j++)
{ {
std::string n = str(varying->reg + i * rows + j); std::string n = str(varying->reg + i * rows + j);
...@@ -1420,7 +1428,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1420,7 +1428,7 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
pixelHLSL += "[" + str(j) + "]"; pixelHLSL += "[" + str(j) + "]";
} }
switch (VariableColumnCount(varying->type)) switch (VariableColumnCount(transposedType))
{ {
case 1: pixelHLSL += " = input.v" + n + ".x;\n"; break; case 1: pixelHLSL += " = input.v" + n + ".x;\n"; break;
case 2: pixelHLSL += " = input.v" + n + ".xy;\n"; break; case 2: pixelHLSL += " = input.v" + n + ".xy;\n"; break;
...@@ -1469,7 +1477,8 @@ std::string ProgramBinary::generateVaryingHLSL(FragmentShader *fragmentShader, c ...@@ -1469,7 +1477,8 @@ std::string ProgramBinary::generateVaryingHLSL(FragmentShader *fragmentShader, c
{ {
for (int i = 0; i < varying->size; i++) for (int i = 0; i < varying->size; i++)
{ {
int rows = VariableRowCount(varying->type); GLenum transposedType = TransposeMatrixType(varying->type);
int rows = VariableRowCount(transposedType);
for (int j = 0; j < rows; j++) for (int j = 0; j < rows; j++)
{ {
switch (varying->interpolation) switch (varying->interpolation)
...@@ -1481,7 +1490,7 @@ std::string ProgramBinary::generateVaryingHLSL(FragmentShader *fragmentShader, c ...@@ -1481,7 +1490,7 @@ std::string ProgramBinary::generateVaryingHLSL(FragmentShader *fragmentShader, c
} }
std::string n = str(varying->reg + i * rows + j); std::string n = str(varying->reg + i * rows + j);
varyingHLSL += "float" + str(VariableColumnCount(varying->type)) + " v" + n + " : " + varyingSemantic + n + ";\n"; varyingHLSL += "float" + str(VariableColumnCount(transposedType)) + " v" + n + " : " + varyingSemantic + n + ";\n";
} }
} }
} }
...@@ -1988,7 +1997,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at ...@@ -1988,7 +1997,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at
if (location == -1) // Not set by glBindAttribLocation if (location == -1) // Not set by glBindAttribLocation
{ {
int rows = VariableRowCount(attribute->type); int rows = AttributeRegisterCount(attribute->type);
int availableIndex = AllocateFirstFreeBits(&usedLocations, rows, MAX_VERTEX_ATTRIBS); int availableIndex = AllocateFirstFreeBits(&usedLocations, rows, MAX_VERTEX_ATTRIBS);
if (availableIndex == -1 || availableIndex + rows > MAX_VERTEX_ATTRIBS) if (availableIndex == -1 || availableIndex + rows > MAX_VERTEX_ATTRIBS)
...@@ -2005,7 +2014,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at ...@@ -2005,7 +2014,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at
for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; ) for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; )
{ {
int index = vertexShader->getSemanticIndex(mLinkedAttribute[attributeIndex].name); int index = vertexShader->getSemanticIndex(mLinkedAttribute[attributeIndex].name);
int rows = std::max(VariableRowCount(mLinkedAttribute[attributeIndex].type), 1); int rows = std::max(AttributeRegisterCount(mLinkedAttribute[attributeIndex].type), 1);
for (int r = 0; r < rows; r++) for (int r = 0; r < rows; r++)
{ {
......
...@@ -493,6 +493,30 @@ GLenum Shader::parseType(const std::string &type) ...@@ -493,6 +493,30 @@ GLenum Shader::parseType(const std::string &type)
{ {
return GL_FLOAT_MAT4; return GL_FLOAT_MAT4;
} }
else if (type == "float2x3")
{
return GL_FLOAT_MAT2x3;
}
else if (type == "float3x2")
{
return GL_FLOAT_MAT3x2;
}
else if (type == "float2x4")
{
return GL_FLOAT_MAT2x4;
}
else if (type == "float4x2")
{
return GL_FLOAT_MAT4x2;
}
else if (type == "float3x4")
{
return GL_FLOAT_MAT3x4;
}
else if (type == "float4x3")
{
return GL_FLOAT_MAT4x3;
}
else UNREACHABLE(); else UNREACHABLE();
return GL_NONE; return GL_NONE;
...@@ -504,9 +528,15 @@ static VaryingPriorityMap varyingPriorities; ...@@ -504,9 +528,15 @@ static VaryingPriorityMap varyingPriorities;
static void makeVaryingPriorityMap() static void makeVaryingPriorityMap()
{ {
varyingPriorities[GL_FLOAT_MAT4] = 0; varyingPriorities[GL_FLOAT_MAT4] = 0;
varyingPriorities[GL_FLOAT_MAT3x4] = 10;
varyingPriorities[GL_FLOAT_MAT4x3] = 20;
varyingPriorities[GL_FLOAT_MAT2x4] = 30;
varyingPriorities[GL_FLOAT_MAT4x2] = 40;
varyingPriorities[GL_FLOAT_MAT2] = 50; varyingPriorities[GL_FLOAT_MAT2] = 50;
varyingPriorities[GL_FLOAT_VEC4] = 60; varyingPriorities[GL_FLOAT_VEC4] = 60;
varyingPriorities[GL_FLOAT_MAT3] = 70; varyingPriorities[GL_FLOAT_MAT3] = 70;
varyingPriorities[GL_FLOAT_MAT2x3] = 80;
varyingPriorities[GL_FLOAT_MAT3x2] = 90;
varyingPriorities[GL_FLOAT_VEC3] = 100; varyingPriorities[GL_FLOAT_VEC3] = 100;
varyingPriorities[GL_FLOAT_VEC2] = 110; varyingPriorities[GL_FLOAT_VEC2] = 110;
varyingPriorities[GL_FLOAT] = 120; varyingPriorities[GL_FLOAT] = 120;
...@@ -582,7 +612,7 @@ int VertexShader::getSemanticIndex(const std::string &attributeName) ...@@ -582,7 +612,7 @@ int VertexShader::getSemanticIndex(const std::string &attributeName)
return semanticIndex; return semanticIndex;
} }
semanticIndex += VariableRowCount(attribute->type); semanticIndex += AttributeRegisterCount(attribute->type);
} }
} }
......
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