Commit 56b06519 by Jamie Madill Committed by Shannon Woods

Reformat tokenizer. No functional changes.

TRAC #23158 Signed-off-by: Nicolas Capens Merged-by: Jamie Madill Authored-by: alokp@chromium.org git-svn-url: https://code.google.com/p/angleproject/source/detail?r=2187 Review URL: https://codereview.appspot.com/8925044
parent 23ee2382
...@@ -88,25 +88,25 @@ O [0-7] ...@@ -88,25 +88,25 @@ O [0-7]
<COMMENT>\n ; <COMMENT>\n ;
<COMMENT>"*/" { yy_pop_state(yyscanner); } <COMMENT>"*/" { yy_pop_state(yyscanner); }
"invariant" { return(INVARIANT); } "invariant" { return INVARIANT; }
"highp" { return(HIGH_PRECISION); } "highp" { return HIGH_PRECISION; }
"mediump" { return(MEDIUM_PRECISION); } "mediump" { return MEDIUM_PRECISION; }
"lowp" { return(LOW_PRECISION); } "lowp" { return LOW_PRECISION; }
"precision" { return(PRECISION); } "precision" { return PRECISION; }
"attribute" { return ES2_keyword_ES3_reserved(context, ATTRIBUTE); } "attribute" { return ES2_keyword_ES3_reserved(context, ATTRIBUTE); }
"const" { return(CONST_QUAL); } "const" { return CONST_QUAL; }
"uniform" { return(UNIFORM); } "uniform" { return UNIFORM; }
"varying" { return ES2_keyword_ES3_reserved(context, VARYING); } "varying" { return ES2_keyword_ES3_reserved(context, VARYING); }
"break" { return(BREAK); } "break" { return BREAK; }
"continue" { return(CONTINUE); } "continue" { return CONTINUE; }
"do" { return(DO); } "do" { return DO; }
"for" { return(FOR); } "for" { return FOR; }
"while" { return(WHILE); } "while" { return WHILE; }
"if" { return(IF); } "if" { return IF; }
"else" { return(ELSE); } "else" { return ELSE; }
"switch" { return ES2_reserved_ES3_keyword(context, SWITCH); } "switch" { return ES2_reserved_ES3_keyword(context, SWITCH); }
"case" { return ES2_reserved_ES3_keyword(context, CASE); } "case" { return ES2_reserved_ES3_keyword(context, CASE); }
"default" { return ES2_reserved_ES3_keyword(context, DEFAULT); } "default" { return ES2_reserved_ES3_keyword(context, DEFAULT); }
...@@ -115,24 +115,24 @@ O [0-7] ...@@ -115,24 +115,24 @@ O [0-7]
"flat" { return ES2_reserved_ES3_keyword(context, FLAT); } "flat" { return ES2_reserved_ES3_keyword(context, FLAT); }
"smooth" { return ES2_reserved_ES3_keyword(context, SMOOTH); } "smooth" { return ES2_reserved_ES3_keyword(context, SMOOTH); }
"in" { return(IN_QUAL); } "in" { return IN_QUAL; }
"out" { return(OUT_QUAL); } "out" { return OUT_QUAL; }
"inout" { return(INOUT_QUAL); } "inout" { return INOUT_QUAL; }
"float" { context->lexAfterType = true; return(FLOAT_TYPE); } "float" { context->lexAfterType = true; return FLOAT_TYPE; }
"int" { context->lexAfterType = true; return(INT_TYPE); } "int" { context->lexAfterType = true; return INT_TYPE; }
"uint" { return ES2_ident_ES3_keyword(context, UINT_TYPE); } "uint" { return ES2_ident_ES3_keyword(context, UINT_TYPE); }
"void" { context->lexAfterType = true; return(VOID_TYPE); } "void" { context->lexAfterType = true; return VOID_TYPE; }
"bool" { context->lexAfterType = true; return(BOOL_TYPE); } "bool" { context->lexAfterType = true; return BOOL_TYPE; }
"true" { yylval->lex.b = true; return(BOOLCONSTANT); } "true" { yylval->lex.b = true; return BOOLCONSTANT; }
"false" { yylval->lex.b = false; return(BOOLCONSTANT); } "false" { yylval->lex.b = false; return BOOLCONSTANT; }
"discard" { return(DISCARD); } "discard" { return DISCARD; }
"return" { return(RETURN); } "return" { return RETURN; }
"mat2" { context->lexAfterType = true; return(MATRIX2); } "mat2" { context->lexAfterType = true; return MATRIX2; }
"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); } "mat2x2" { return ES2_ident_ES3_keyword(context, MATRIX2); }
"mat3x3" { return ES2_ident_ES3_keyword(context, MATRIX3); } "mat3x3" { return ES2_ident_ES3_keyword(context, MATRIX3); }
...@@ -145,18 +145,18 @@ O [0-7] ...@@ -145,18 +145,18 @@ O [0-7]
"mat3x4" { return ES2_ident_ES3_keyword(context, MATRIX3x4); } "mat3x4" { return ES2_ident_ES3_keyword(context, MATRIX3x4); }
"mat4x3" { return ES2_ident_ES3_keyword(context, MATRIX4x3); } "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; }
"ivec2" { context->lexAfterType = true; return (IVEC2); } "ivec2" { context->lexAfterType = true; return IVEC2; }
"ivec3" { context->lexAfterType = true; return (IVEC3); } "ivec3" { context->lexAfterType = true; return IVEC3; }
"ivec4" { context->lexAfterType = true; return (IVEC4); } "ivec4" { context->lexAfterType = true; return IVEC4; }
"bvec2" { context->lexAfterType = true; return BVEC2; }
"bvec3" { context->lexAfterType = true; return BVEC3; }
"bvec4" { context->lexAfterType = true; return BVEC4; }
"uvec2" { return ES2_ident_ES3_keyword(context, UVEC2); } "uvec2" { return ES2_ident_ES3_keyword(context, UVEC2); }
"uvec3" { return ES2_ident_ES3_keyword(context, UVEC3); } "uvec3" { return ES2_ident_ES3_keyword(context, UVEC3); }
"uvec4" { return ES2_ident_ES3_keyword(context, UVEC4); } "uvec4" { return ES2_ident_ES3_keyword(context, UVEC4); }
"bvec2" { context->lexAfterType = true; return (BVEC2); }
"bvec3" { context->lexAfterType = true; return (BVEC3); }
"bvec4" { context->lexAfterType = true; return (BVEC4); }
"sampler2D" { context->lexAfterType = true; return SAMPLER2D; } "sampler2D" { context->lexAfterType = true; return SAMPLER2D; }
"samplerCube" { context->lexAfterType = true; return SAMPLERCUBE; } "samplerCube" { context->lexAfterType = true; return SAMPLERCUBE; }
...@@ -166,7 +166,7 @@ O [0-7] ...@@ -166,7 +166,7 @@ O [0-7]
"sampler2DShadow" { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); } "sampler2DShadow" { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
"sampler2DRect" { context->lexAfterType = true; return SAMPLER2DRECT; } "sampler2DRect" { context->lexAfterType = true; return SAMPLER2DRECT; }
"struct" { context->lexAfterType = true; return(STRUCT); } "struct" { context->lexAfterType = true; return STRUCT; }
"layout" { return ES2_ident_ES3_keyword(context, LAYOUT); } "layout" { return ES2_ident_ES3_keyword(context, LAYOUT); }
...@@ -304,67 +304,69 @@ O [0-7] ...@@ -304,67 +304,69 @@ O [0-7]
return check_type(yyscanner); return check_type(yyscanner);
} }
0[xX]{H}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } 0[xX]{H}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
0{O}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } 0{O}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
0{D}+ { context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;} 0{D}+ { context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;}
{D}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return(INTCONSTANT); } {D}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
0[xX]{H}+[uU] { return uint_constant(context); } 0[xX]{H}+[uU] { return uint_constant(context); }
0{O}+[uU] { return uint_constant(context); } 0{O}+[uU] { return uint_constant(context); }
{D}+[uU] { return uint_constant(context); } {D}+[uU] { return uint_constant(context); }
{D}+{E} { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } {D}+{E} { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; }
{D}+"."{D}*({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } {D}+"."{D}*({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; }
"."{D}+({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); } "."{D}+({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; }
{D}+{E}[fF] { return floatsuffix_check(context); } {D}+{E}[fF] { return floatsuffix_check(context); }
{D}+"."{D}*({E})?[fF] { return floatsuffix_check(context); } {D}+"."{D}*({E})?[fF] { return floatsuffix_check(context); }
"."{D}+({E})?[fF] { return floatsuffix_check(context); } "."{D}+({E})?[fF] { return floatsuffix_check(context); }
"+=" { return(ADD_ASSIGN); } "+=" { return ADD_ASSIGN; }
"-=" { return(SUB_ASSIGN); } "-=" { return SUB_ASSIGN; }
"*=" { return(MUL_ASSIGN); } "*=" { return MUL_ASSIGN; }
"/=" { return(DIV_ASSIGN); } "/=" { return DIV_ASSIGN; }
"%=" { return(MOD_ASSIGN); } "%=" { return MOD_ASSIGN; }
"<<=" { return(LEFT_ASSIGN); } "<<=" { return LEFT_ASSIGN; }
">>=" { return(RIGHT_ASSIGN); } ">>=" { return RIGHT_ASSIGN; }
"&=" { return(AND_ASSIGN); } "&=" { return AND_ASSIGN; }
"^=" { return(XOR_ASSIGN); } "^=" { return XOR_ASSIGN; }
"|=" { return(OR_ASSIGN); } "|=" { return OR_ASSIGN; }
"++" { return(INC_OP); } "++" { return INC_OP; }
"--" { return(DEC_OP); } "--" { return DEC_OP; }
"&&" { return(AND_OP); } "&&" { return AND_OP; }
"||" { return(OR_OP); } "||" { return OR_OP; }
"^^" { return(XOR_OP); } "^^" { return XOR_OP; }
"<=" { return(LE_OP); } "<=" { return LE_OP; }
">=" { return(GE_OP); } ">=" { return GE_OP; }
"==" { return(EQ_OP); } "==" { return EQ_OP; }
"!=" { return(NE_OP); } "!=" { return NE_OP; }
"<<" { return(LEFT_OP); } "<<" { return LEFT_OP; }
">>" { return(RIGHT_OP); } ">>" { return RIGHT_OP; }
";" { context->lexAfterType = false; return(SEMICOLON); } ";" { context->lexAfterType = false; return SEMICOLON; }
("{"|"<%") { context->lexAfterType = false; return(LEFT_BRACE); } ("{"|"<%") { context->lexAfterType = false; return LEFT_BRACE; }
("}"|"%>") { return(RIGHT_BRACE); } ("}"|"%>") { return RIGHT_BRACE; }
"," { if (context->inTypeParen) context->lexAfterType = false; return(COMMA); } "," { if (context->inTypeParen) context->lexAfterType = false; return COMMA; }
":" { return(COLON); } ":" { return COLON; }
"=" { context->lexAfterType = false; return(EQUAL); } "=" { context->lexAfterType = false; return EQUAL; }
"(" { context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); } "(" { context->lexAfterType = false; context->inTypeParen = true; return LEFT_PAREN; }
")" { context->inTypeParen = false; return(RIGHT_PAREN); } ")" { context->inTypeParen = false; return RIGHT_PAREN; }
("["|"<:") { return(LEFT_BRACKET); } ("["|"<:") { return LEFT_BRACKET; }
("]"|":>") { return(RIGHT_BRACKET); } ("]"|":>") { return RIGHT_BRACKET; }
"." { BEGIN(FIELDS); return(DOT); } "." { BEGIN(FIELDS); return DOT; }
"!" { return(BANG); } "!" { return BANG; }
"-" { return(DASH); } "-" { return DASH; }
"~" { return(TILDE); } "~" { return TILDE; }
"+" { return(PLUS); } "+" { return PLUS; }
"*" { return(STAR); } "*" { return STAR; }
"/" { return(SLASH); } "/" { return SLASH; }
"%" { return(PERCENT); } "%" { return PERCENT; }
"<" { return(LEFT_ANGLE); } "<" { return LEFT_ANGLE; }
">" { return(RIGHT_ANGLE); } ">" { return RIGHT_ANGLE; }
"|" { return(VERTICAL_BAR); } "|" { return VERTICAL_BAR; }
"^" { return(CARET); } "^" { return CARET; }
"&" { return(AMPERSAND); } "&" { return AMPERSAND; }
"?" { return(QUESTION); } "?" { return QUESTION; }
<FIELDS>{L}({L}|{D})* { <FIELDS>{L}({L}|{D})* {
BEGIN(INITIAL); BEGIN(INITIAL);
......
...@@ -433,7 +433,7 @@ static yyconst flex_int16_t yy_accept[790] = ...@@ -433,7 +433,7 @@ static yyconst flex_int16_t yy_accept[790] =
171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 136, 36, 171, 171, 33, 171, 171, 171, 171, 171, 136, 36, 171, 171, 33, 171, 171,
171, 171, 171, 171, 171, 52, 53, 54, 34, 171, 171, 171, 171, 171, 171, 52, 53, 54, 34, 171,
171, 171, 171, 171, 171, 15, 61, 62, 63, 171, 171, 171, 171, 171, 171, 15, 58, 59, 60, 171,
131, 171, 171, 12, 171, 171, 171, 171, 158, 159, 131, 171, 171, 12, 171, 171, 171, 171, 158, 159,
160, 171, 37, 171, 150, 31, 161, 162, 163, 7, 160, 171, 37, 171, 150, 31, 161, 162, 163, 7,
155, 156, 157, 171, 171, 171, 30, 153, 171, 171, 155, 156, 157, 171, 171, 171, 30, 153, 171, 171,
...@@ -441,8 +441,8 @@ static yyconst flex_int16_t yy_accept[790] = ...@@ -441,8 +441,8 @@ static yyconst flex_int16_t yy_accept[790] =
171, 171, 171, 171, 171, 80, 171, 171, 171, 171, 171, 171, 171, 171, 171, 80, 171, 171, 171, 171,
171, 171, 171, 147, 171, 171, 171, 171, 171, 171, 171, 171, 171, 147, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 132, 171, 171, 170, 58, 171, 171, 171, 171, 171, 132, 171, 171, 170, 61,
59, 60, 171, 171, 19, 171, 85, 171, 171, 171, 62, 63, 171, 171, 19, 171, 85, 171, 171, 171,
171, 83, 171, 171, 171, 148, 143, 86, 171, 171, 171, 83, 171, 171, 171, 148, 143, 86, 171, 171,
171, 171, 171, 171, 138, 171, 171, 171, 72, 43, 171, 171, 171, 171, 138, 171, 171, 171, 72, 43,
46, 48, 47, 44, 50, 49, 51, 45, 171, 171, 46, 48, 47, 44, 50, 49, 51, 45, 171, 171,
...@@ -1360,23 +1360,23 @@ YY_RULE_SETUP ...@@ -1360,23 +1360,23 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
{ return(INVARIANT); } { return INVARIANT; }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
{ return(HIGH_PRECISION); } { return HIGH_PRECISION; }
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
{ return(MEDIUM_PRECISION); } { return MEDIUM_PRECISION; }
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LOW_PRECISION); } { return LOW_PRECISION; }
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
{ return(PRECISION); } { return PRECISION; }
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1384,11 +1384,11 @@ YY_RULE_SETUP ...@@ -1384,11 +1384,11 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
{ return(CONST_QUAL); } { return CONST_QUAL; }
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
{ return(UNIFORM); } { return UNIFORM; }
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1396,31 +1396,31 @@ YY_RULE_SETUP ...@@ -1396,31 +1396,31 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
{ return(BREAK); } { return BREAK; }
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
{ return(CONTINUE); } { return CONTINUE; }
YY_BREAK YY_BREAK
case 17: case 17:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DO); } { return DO; }
YY_BREAK YY_BREAK
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
{ return(FOR); } { return FOR; }
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
{ return(WHILE); } { return WHILE; }
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
{ return(IF); } { return IF; }
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
{ return(ELSE); } { return ELSE; }
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1448,23 +1448,23 @@ YY_RULE_SETUP ...@@ -1448,23 +1448,23 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 28: case 28:
YY_RULE_SETUP YY_RULE_SETUP
{ return(IN_QUAL); } { return IN_QUAL; }
YY_BREAK YY_BREAK
case 29: case 29:
YY_RULE_SETUP YY_RULE_SETUP
{ return(OUT_QUAL); } { return OUT_QUAL; }
YY_BREAK YY_BREAK
case 30: case 30:
YY_RULE_SETUP YY_RULE_SETUP
{ return(INOUT_QUAL); } { return INOUT_QUAL; }
YY_BREAK YY_BREAK
case 31: case 31:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(FLOAT_TYPE); } { context->lexAfterType = true; return FLOAT_TYPE; }
YY_BREAK YY_BREAK
case 32: case 32:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(INT_TYPE); } { context->lexAfterType = true; return INT_TYPE; }
YY_BREAK YY_BREAK
case 33: case 33:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1472,39 +1472,39 @@ YY_RULE_SETUP ...@@ -1472,39 +1472,39 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 34: case 34:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(VOID_TYPE); } { context->lexAfterType = true; return VOID_TYPE; }
YY_BREAK YY_BREAK
case 35: case 35:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(BOOL_TYPE); } { context->lexAfterType = true; return BOOL_TYPE; }
YY_BREAK YY_BREAK
case 36: case 36:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.b = true; return(BOOLCONSTANT); } { yylval->lex.b = true; return BOOLCONSTANT; }
YY_BREAK YY_BREAK
case 37: case 37:
YY_RULE_SETUP YY_RULE_SETUP
{ yylval->lex.b = false; return(BOOLCONSTANT); } { yylval->lex.b = false; return BOOLCONSTANT; }
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DISCARD); } { return DISCARD; }
YY_BREAK YY_BREAK
case 39: case 39:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RETURN); } { return RETURN; }
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(MATRIX2); } { context->lexAfterType = true; return MATRIX2; }
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(MATRIX3); } { context->lexAfterType = true; return MATRIX3; }
YY_BREAK YY_BREAK
case 42: case 42:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(MATRIX4); } { context->lexAfterType = true; return MATRIX4; }
YY_BREAK YY_BREAK
case 43: case 43:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1544,51 +1544,51 @@ YY_RULE_SETUP ...@@ -1544,51 +1544,51 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 52: case 52:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC2); } { context->lexAfterType = true; return VEC2; }
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC3); } { context->lexAfterType = true; return VEC3; }
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (VEC4); } { context->lexAfterType = true; return VEC4; }
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC2); } { context->lexAfterType = true; return IVEC2; }
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC3); } { context->lexAfterType = true; return IVEC3; }
YY_BREAK YY_BREAK
case 57: case 57:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (IVEC4); } { context->lexAfterType = true; return IVEC4; }
YY_BREAK YY_BREAK
case 58: case 58:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC2); } { context->lexAfterType = true; return BVEC2; }
YY_BREAK YY_BREAK
case 59: case 59:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC3); } { context->lexAfterType = true; return BVEC3; }
YY_BREAK YY_BREAK
case 60: case 60:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC4); } { context->lexAfterType = true; return BVEC4; }
YY_BREAK YY_BREAK
case 61: case 61:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC2); } { return ES2_ident_ES3_keyword(context, UVEC2); }
YY_BREAK YY_BREAK
case 62: case 62:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC3); } { return ES2_ident_ES3_keyword(context, UVEC3); }
YY_BREAK YY_BREAK
case 63: case 63:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return (BVEC4); } { return ES2_ident_ES3_keyword(context, UVEC4); }
YY_BREAK YY_BREAK
case 64: case 64:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1620,7 +1620,7 @@ YY_RULE_SETUP ...@@ -1620,7 +1620,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 71: case 71:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = true; return(STRUCT); } { context->lexAfterType = true; return STRUCT; }
YY_BREAK YY_BREAK
case 72: case 72:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1759,11 +1759,11 @@ YY_RULE_SETUP ...@@ -1759,11 +1759,11 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 172: case 172:
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 173: case 173:
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 174: case 174:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1771,7 +1771,7 @@ YY_RULE_SETUP ...@@ -1771,7 +1771,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 175: case 175:
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 176: case 176:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1787,15 +1787,15 @@ YY_RULE_SETUP ...@@ -1787,15 +1787,15 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 179: case 179:
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 180: case 180:
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 181: case 181:
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 182: case 182:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1811,183 +1811,183 @@ YY_RULE_SETUP ...@@ -1811,183 +1811,183 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 185: case 185:
YY_RULE_SETUP YY_RULE_SETUP
{ return(ADD_ASSIGN); } { return ADD_ASSIGN; }
YY_BREAK YY_BREAK
case 186: case 186:
YY_RULE_SETUP YY_RULE_SETUP
{ return(SUB_ASSIGN); } { return SUB_ASSIGN; }
YY_BREAK YY_BREAK
case 187: case 187:
YY_RULE_SETUP YY_RULE_SETUP
{ return(MUL_ASSIGN); } { return MUL_ASSIGN; }
YY_BREAK YY_BREAK
case 188: case 188:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DIV_ASSIGN); } { return DIV_ASSIGN; }
YY_BREAK YY_BREAK
case 189: case 189:
YY_RULE_SETUP YY_RULE_SETUP
{ return(MOD_ASSIGN); } { return MOD_ASSIGN; }
YY_BREAK YY_BREAK
case 190: case 190:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_ASSIGN); } { return LEFT_ASSIGN; }
YY_BREAK YY_BREAK
case 191: case 191:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_ASSIGN); } { return RIGHT_ASSIGN; }
YY_BREAK YY_BREAK
case 192: case 192:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AND_ASSIGN); } { return AND_ASSIGN; }
YY_BREAK YY_BREAK
case 193: case 193:
YY_RULE_SETUP YY_RULE_SETUP
{ return(XOR_ASSIGN); } { return XOR_ASSIGN; }
YY_BREAK YY_BREAK
case 194: case 194:
YY_RULE_SETUP YY_RULE_SETUP
{ return(OR_ASSIGN); } { return OR_ASSIGN; }
YY_BREAK YY_BREAK
case 195: case 195:
YY_RULE_SETUP YY_RULE_SETUP
{ return(INC_OP); } { return INC_OP; }
YY_BREAK YY_BREAK
case 196: case 196:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DEC_OP); } { return DEC_OP; }
YY_BREAK YY_BREAK
case 197: case 197:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AND_OP); } { return AND_OP; }
YY_BREAK YY_BREAK
case 198: case 198:
YY_RULE_SETUP YY_RULE_SETUP
{ return(OR_OP); } { return OR_OP; }
YY_BREAK YY_BREAK
case 199: case 199:
YY_RULE_SETUP YY_RULE_SETUP
{ return(XOR_OP); } { return XOR_OP; }
YY_BREAK YY_BREAK
case 200: case 200:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LE_OP); } { return LE_OP; }
YY_BREAK YY_BREAK
case 201: case 201:
YY_RULE_SETUP YY_RULE_SETUP
{ return(GE_OP); } { return GE_OP; }
YY_BREAK YY_BREAK
case 202: case 202:
YY_RULE_SETUP YY_RULE_SETUP
{ return(EQ_OP); } { return EQ_OP; }
YY_BREAK YY_BREAK
case 203: case 203:
YY_RULE_SETUP YY_RULE_SETUP
{ return(NE_OP); } { return NE_OP; }
YY_BREAK YY_BREAK
case 204: case 204:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_OP); } { return LEFT_OP; }
YY_BREAK YY_BREAK
case 205: case 205:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_OP); } { return RIGHT_OP; }
YY_BREAK YY_BREAK
case 206: case 206:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(SEMICOLON); } { context->lexAfterType = false; return SEMICOLON; }
YY_BREAK YY_BREAK
case 207: case 207:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(LEFT_BRACE); } { context->lexAfterType = false; return LEFT_BRACE; }
YY_BREAK YY_BREAK
case 208: case 208:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_BRACE); } { return RIGHT_BRACE; }
YY_BREAK YY_BREAK
case 209: case 209:
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 210: case 210:
YY_RULE_SETUP YY_RULE_SETUP
{ return(COLON); } { return COLON; }
YY_BREAK YY_BREAK
case 211: case 211:
YY_RULE_SETUP YY_RULE_SETUP
{ context->lexAfterType = false; return(EQUAL); } { context->lexAfterType = false; return EQUAL; }
YY_BREAK YY_BREAK
case 212: case 212:
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 213: case 213:
YY_RULE_SETUP YY_RULE_SETUP
{ context->inTypeParen = false; return(RIGHT_PAREN); } { context->inTypeParen = false; return RIGHT_PAREN; }
YY_BREAK YY_BREAK
case 214: case 214:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_BRACKET); } { return LEFT_BRACKET; }
YY_BREAK YY_BREAK
case 215: case 215:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_BRACKET); } { return RIGHT_BRACKET; }
YY_BREAK YY_BREAK
case 216: case 216:
YY_RULE_SETUP YY_RULE_SETUP
{ BEGIN(FIELDS); return(DOT); } { BEGIN(FIELDS); return DOT; }
YY_BREAK YY_BREAK
case 217: case 217:
YY_RULE_SETUP YY_RULE_SETUP
{ return(BANG); } { return BANG; }
YY_BREAK YY_BREAK
case 218: case 218:
YY_RULE_SETUP YY_RULE_SETUP
{ return(DASH); } { return DASH; }
YY_BREAK YY_BREAK
case 219: case 219:
YY_RULE_SETUP YY_RULE_SETUP
{ return(TILDE); } { return TILDE; }
YY_BREAK YY_BREAK
case 220: case 220:
YY_RULE_SETUP YY_RULE_SETUP
{ return(PLUS); } { return PLUS; }
YY_BREAK YY_BREAK
case 221: case 221:
YY_RULE_SETUP YY_RULE_SETUP
{ return(STAR); } { return STAR; }
YY_BREAK YY_BREAK
case 222: case 222:
YY_RULE_SETUP YY_RULE_SETUP
{ return(SLASH); } { return SLASH; }
YY_BREAK YY_BREAK
case 223: case 223:
YY_RULE_SETUP YY_RULE_SETUP
{ return(PERCENT); } { return PERCENT; }
YY_BREAK YY_BREAK
case 224: case 224:
YY_RULE_SETUP YY_RULE_SETUP
{ return(LEFT_ANGLE); } { return LEFT_ANGLE; }
YY_BREAK YY_BREAK
case 225: case 225:
YY_RULE_SETUP YY_RULE_SETUP
{ return(RIGHT_ANGLE); } { return RIGHT_ANGLE; }
YY_BREAK YY_BREAK
case 226: case 226:
YY_RULE_SETUP YY_RULE_SETUP
{ return(VERTICAL_BAR); } { return VERTICAL_BAR; }
YY_BREAK YY_BREAK
case 227: case 227:
YY_RULE_SETUP YY_RULE_SETUP
{ return(CARET); } { return CARET; }
YY_BREAK YY_BREAK
case 228: case 228:
YY_RULE_SETUP YY_RULE_SETUP
{ return(AMPERSAND); } { return AMPERSAND; }
YY_BREAK YY_BREAK
case 229: case 229:
YY_RULE_SETUP YY_RULE_SETUP
{ return(QUESTION); } { return QUESTION; }
YY_BREAK YY_BREAK
case 230: case 230:
YY_RULE_SETUP YY_RULE_SETUP
......
--- glslang_lex.cpp
+++ glslang_lex.cpp
@@ -68,6 +68,7 @@
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -191,6 +192,11 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -204,7 +210,7 @@
*/
#define YY_LESS_LINENO(n) \
do { \
- int yyl;\
+ yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
@@ -226,11 +232,6 @@
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -248,7 +249,7 @@
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -327,7 +328,7 @@
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -378,7 +379,7 @@
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -1035,8 +1036,8 @@
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -1089,7 +1090,7 @@
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int yyget_leng (yyscan_t yyscanner );
+yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
@@ -1158,7 +1159,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1317,7 +1318,7 @@
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -2203,7 +2204,7 @@
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2217,7 +2218,7 @@
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2248,7 +2249,7 @@
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2373,7 +2374,7 @@
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2660,7 +2661,7 @@
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2758,12 +2759,11 @@
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2913,7 +2913,7 @@
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int yyget_leng (yyscan_t yyscanner)
+yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
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