diff options
Diffstat (limited to 'src/glsl/glsl_lexer.cpp')
-rw-r--r-- | src/glsl/glsl_lexer.cpp | 223 |
1 files changed, 112 insertions, 111 deletions
diff --git a/src/glsl/glsl_lexer.cpp b/src/glsl/glsl_lexer.cpp index 4f14c58bc52..9db1652ed2f 100644 --- a/src/glsl/glsl_lexer.cpp +++ b/src/glsl/glsl_lexer.cpp @@ -1749,6 +1749,7 @@ YY_RULE_SETUP #line 219 "glsl_lexer.lpp" { if ((yyextra->language_version >= 140) + || yyextra->ARB_explicit_attrib_location_enable || (yyextra->ARB_fragment_coord_conventions_enable)){ return LAYOUT_TOK; } else { @@ -1759,102 +1760,102 @@ YY_RULE_SETUP YY_BREAK case 75: YY_RULE_SETUP -#line 229 "glsl_lexer.lpp" +#line 230 "glsl_lexer.lpp" return INC_OP; YY_BREAK case 76: YY_RULE_SETUP -#line 230 "glsl_lexer.lpp" +#line 231 "glsl_lexer.lpp" return DEC_OP; YY_BREAK case 77: YY_RULE_SETUP -#line 231 "glsl_lexer.lpp" +#line 232 "glsl_lexer.lpp" return LE_OP; YY_BREAK case 78: YY_RULE_SETUP -#line 232 "glsl_lexer.lpp" +#line 233 "glsl_lexer.lpp" return GE_OP; YY_BREAK case 79: YY_RULE_SETUP -#line 233 "glsl_lexer.lpp" +#line 234 "glsl_lexer.lpp" return EQ_OP; YY_BREAK case 80: YY_RULE_SETUP -#line 234 "glsl_lexer.lpp" +#line 235 "glsl_lexer.lpp" return NE_OP; YY_BREAK case 81: YY_RULE_SETUP -#line 235 "glsl_lexer.lpp" +#line 236 "glsl_lexer.lpp" return AND_OP; YY_BREAK case 82: YY_RULE_SETUP -#line 236 "glsl_lexer.lpp" +#line 237 "glsl_lexer.lpp" return OR_OP; YY_BREAK case 83: YY_RULE_SETUP -#line 237 "glsl_lexer.lpp" +#line 238 "glsl_lexer.lpp" return XOR_OP; YY_BREAK case 84: YY_RULE_SETUP -#line 239 "glsl_lexer.lpp" +#line 240 "glsl_lexer.lpp" return MUL_ASSIGN; YY_BREAK case 85: YY_RULE_SETUP -#line 240 "glsl_lexer.lpp" +#line 241 "glsl_lexer.lpp" return DIV_ASSIGN; YY_BREAK case 86: YY_RULE_SETUP -#line 241 "glsl_lexer.lpp" +#line 242 "glsl_lexer.lpp" return ADD_ASSIGN; YY_BREAK case 87: YY_RULE_SETUP -#line 242 "glsl_lexer.lpp" +#line 243 "glsl_lexer.lpp" return MOD_ASSIGN; YY_BREAK case 88: YY_RULE_SETUP -#line 243 "glsl_lexer.lpp" +#line 244 "glsl_lexer.lpp" return LEFT_ASSIGN; YY_BREAK case 89: YY_RULE_SETUP -#line 244 "glsl_lexer.lpp" +#line 245 "glsl_lexer.lpp" return RIGHT_ASSIGN; YY_BREAK case 90: YY_RULE_SETUP -#line 245 "glsl_lexer.lpp" +#line 246 "glsl_lexer.lpp" return AND_ASSIGN; YY_BREAK case 91: YY_RULE_SETUP -#line 246 "glsl_lexer.lpp" +#line 247 "glsl_lexer.lpp" return XOR_ASSIGN; YY_BREAK case 92: YY_RULE_SETUP -#line 247 "glsl_lexer.lpp" +#line 248 "glsl_lexer.lpp" return OR_ASSIGN; YY_BREAK case 93: YY_RULE_SETUP -#line 248 "glsl_lexer.lpp" +#line 249 "glsl_lexer.lpp" return SUB_ASSIGN; YY_BREAK case 94: YY_RULE_SETUP -#line 250 "glsl_lexer.lpp" +#line 251 "glsl_lexer.lpp" { yylval->n = strtol(yytext, NULL, 10); return INTCONSTANT; @@ -1862,7 +1863,7 @@ YY_RULE_SETUP YY_BREAK case 95: YY_RULE_SETUP -#line 254 "glsl_lexer.lpp" +#line 255 "glsl_lexer.lpp" { yylval->n = strtol(yytext + 2, NULL, 16); return INTCONSTANT; @@ -1870,7 +1871,7 @@ YY_RULE_SETUP YY_BREAK case 96: YY_RULE_SETUP -#line 258 "glsl_lexer.lpp" +#line 259 "glsl_lexer.lpp" { yylval->n = strtol(yytext, NULL, 8); return INTCONSTANT; @@ -1878,7 +1879,7 @@ YY_RULE_SETUP YY_BREAK case 97: YY_RULE_SETUP -#line 263 "glsl_lexer.lpp" +#line 264 "glsl_lexer.lpp" { yylval->real = strtod(yytext, NULL); return FLOATCONSTANT; @@ -1886,7 +1887,7 @@ YY_RULE_SETUP YY_BREAK case 98: YY_RULE_SETUP -#line 267 "glsl_lexer.lpp" +#line 268 "glsl_lexer.lpp" { yylval->real = strtod(yytext, NULL); return FLOATCONSTANT; @@ -1894,7 +1895,7 @@ YY_RULE_SETUP YY_BREAK case 99: YY_RULE_SETUP -#line 271 "glsl_lexer.lpp" +#line 272 "glsl_lexer.lpp" { yylval->real = strtod(yytext, NULL); return FLOATCONSTANT; @@ -1902,7 +1903,7 @@ YY_RULE_SETUP YY_BREAK case 100: YY_RULE_SETUP -#line 275 "glsl_lexer.lpp" +#line 276 "glsl_lexer.lpp" { yylval->real = strtod(yytext, NULL); return FLOATCONSTANT; @@ -1910,7 +1911,7 @@ YY_RULE_SETUP YY_BREAK case 101: YY_RULE_SETUP -#line 279 "glsl_lexer.lpp" +#line 280 "glsl_lexer.lpp" { yylval->real = strtod(yytext, NULL); return FLOATCONSTANT; @@ -1918,7 +1919,7 @@ YY_RULE_SETUP YY_BREAK case 102: YY_RULE_SETUP -#line 284 "glsl_lexer.lpp" +#line 285 "glsl_lexer.lpp" { yylval->n = 1; return BOOLCONSTANT; @@ -1926,7 +1927,7 @@ YY_RULE_SETUP YY_BREAK case 103: YY_RULE_SETUP -#line 288 "glsl_lexer.lpp" +#line 289 "glsl_lexer.lpp" { yylval->n = 0; return BOOLCONSTANT; @@ -1935,394 +1936,394 @@ YY_RULE_SETUP /* Reserved words in GLSL 1.10. */ case 104: YY_RULE_SETUP -#line 295 "glsl_lexer.lpp" +#line 296 "glsl_lexer.lpp" RESERVED_WORD(999, ASM); YY_BREAK case 105: YY_RULE_SETUP -#line 296 "glsl_lexer.lpp" +#line 297 "glsl_lexer.lpp" RESERVED_WORD(999, CLASS); YY_BREAK case 106: YY_RULE_SETUP -#line 297 "glsl_lexer.lpp" +#line 298 "glsl_lexer.lpp" RESERVED_WORD(999, UNION); YY_BREAK case 107: YY_RULE_SETUP -#line 298 "glsl_lexer.lpp" +#line 299 "glsl_lexer.lpp" RESERVED_WORD(999, ENUM); YY_BREAK case 108: YY_RULE_SETUP -#line 299 "glsl_lexer.lpp" +#line 300 "glsl_lexer.lpp" RESERVED_WORD(999, TYPEDEF); YY_BREAK case 109: YY_RULE_SETUP -#line 300 "glsl_lexer.lpp" +#line 301 "glsl_lexer.lpp" RESERVED_WORD(999, TEMPLATE); YY_BREAK case 110: YY_RULE_SETUP -#line 301 "glsl_lexer.lpp" +#line 302 "glsl_lexer.lpp" RESERVED_WORD(999, THIS); YY_BREAK case 111: YY_RULE_SETUP -#line 302 "glsl_lexer.lpp" +#line 303 "glsl_lexer.lpp" RESERVED_WORD(999, PACKED_TOK); YY_BREAK case 112: YY_RULE_SETUP -#line 303 "glsl_lexer.lpp" +#line 304 "glsl_lexer.lpp" RESERVED_WORD(999, GOTO); YY_BREAK case 113: YY_RULE_SETUP -#line 304 "glsl_lexer.lpp" +#line 305 "glsl_lexer.lpp" RESERVED_WORD(130, SWITCH); YY_BREAK case 114: YY_RULE_SETUP -#line 305 "glsl_lexer.lpp" +#line 306 "glsl_lexer.lpp" RESERVED_WORD(130, DEFAULT); YY_BREAK case 115: YY_RULE_SETUP -#line 306 "glsl_lexer.lpp" +#line 307 "glsl_lexer.lpp" RESERVED_WORD(999, INLINE_TOK); YY_BREAK case 116: YY_RULE_SETUP -#line 307 "glsl_lexer.lpp" +#line 308 "glsl_lexer.lpp" RESERVED_WORD(999, NOINLINE); YY_BREAK case 117: YY_RULE_SETUP -#line 308 "glsl_lexer.lpp" +#line 309 "glsl_lexer.lpp" RESERVED_WORD(999, VOLATILE); YY_BREAK case 118: YY_RULE_SETUP -#line 309 "glsl_lexer.lpp" +#line 310 "glsl_lexer.lpp" RESERVED_WORD(999, PUBLIC_TOK); YY_BREAK case 119: YY_RULE_SETUP -#line 310 "glsl_lexer.lpp" +#line 311 "glsl_lexer.lpp" RESERVED_WORD(999, STATIC); YY_BREAK case 120: YY_RULE_SETUP -#line 311 "glsl_lexer.lpp" +#line 312 "glsl_lexer.lpp" RESERVED_WORD(999, EXTERN); YY_BREAK case 121: YY_RULE_SETUP -#line 312 "glsl_lexer.lpp" +#line 313 "glsl_lexer.lpp" RESERVED_WORD(999, EXTERNAL); YY_BREAK case 122: YY_RULE_SETUP -#line 313 "glsl_lexer.lpp" +#line 314 "glsl_lexer.lpp" RESERVED_WORD(999, INTERFACE); YY_BREAK case 123: YY_RULE_SETUP -#line 314 "glsl_lexer.lpp" +#line 315 "glsl_lexer.lpp" RESERVED_WORD(999, LONG_TOK); YY_BREAK case 124: YY_RULE_SETUP -#line 315 "glsl_lexer.lpp" +#line 316 "glsl_lexer.lpp" RESERVED_WORD(999, SHORT_TOK); YY_BREAK case 125: YY_RULE_SETUP -#line 316 "glsl_lexer.lpp" +#line 317 "glsl_lexer.lpp" RESERVED_WORD(999, DOUBLE_TOK); YY_BREAK case 126: YY_RULE_SETUP -#line 317 "glsl_lexer.lpp" +#line 318 "glsl_lexer.lpp" RESERVED_WORD(999, HALF); YY_BREAK case 127: YY_RULE_SETUP -#line 318 "glsl_lexer.lpp" +#line 319 "glsl_lexer.lpp" RESERVED_WORD(999, FIXED_TOK); YY_BREAK case 128: YY_RULE_SETUP -#line 319 "glsl_lexer.lpp" +#line 320 "glsl_lexer.lpp" RESERVED_WORD(999, UNSIGNED); YY_BREAK case 129: YY_RULE_SETUP -#line 320 "glsl_lexer.lpp" +#line 321 "glsl_lexer.lpp" RESERVED_WORD(999, INPUT_TOK); YY_BREAK case 130: YY_RULE_SETUP -#line 321 "glsl_lexer.lpp" +#line 322 "glsl_lexer.lpp" RESERVED_WORD(999, OUTPUT); YY_BREAK case 131: YY_RULE_SETUP -#line 322 "glsl_lexer.lpp" +#line 323 "glsl_lexer.lpp" RESERVED_WORD(999, HVEC2); YY_BREAK case 132: YY_RULE_SETUP -#line 323 "glsl_lexer.lpp" +#line 324 "glsl_lexer.lpp" RESERVED_WORD(999, HVEC3); YY_BREAK case 133: YY_RULE_SETUP -#line 324 "glsl_lexer.lpp" +#line 325 "glsl_lexer.lpp" RESERVED_WORD(999, HVEC4); YY_BREAK case 134: YY_RULE_SETUP -#line 325 "glsl_lexer.lpp" +#line 326 "glsl_lexer.lpp" RESERVED_WORD(999, DVEC2); YY_BREAK case 135: YY_RULE_SETUP -#line 326 "glsl_lexer.lpp" +#line 327 "glsl_lexer.lpp" RESERVED_WORD(999, DVEC3); YY_BREAK case 136: YY_RULE_SETUP -#line 327 "glsl_lexer.lpp" +#line 328 "glsl_lexer.lpp" RESERVED_WORD(999, DVEC4); YY_BREAK case 137: YY_RULE_SETUP -#line 328 "glsl_lexer.lpp" +#line 329 "glsl_lexer.lpp" RESERVED_WORD(999, FVEC2); YY_BREAK case 138: YY_RULE_SETUP -#line 329 "glsl_lexer.lpp" +#line 330 "glsl_lexer.lpp" RESERVED_WORD(999, FVEC3); YY_BREAK case 139: YY_RULE_SETUP -#line 330 "glsl_lexer.lpp" +#line 331 "glsl_lexer.lpp" RESERVED_WORD(999, FVEC4); YY_BREAK case 140: YY_RULE_SETUP -#line 331 "glsl_lexer.lpp" +#line 332 "glsl_lexer.lpp" return SAMPLER2DRECT; YY_BREAK case 141: YY_RULE_SETUP -#line 332 "glsl_lexer.lpp" +#line 333 "glsl_lexer.lpp" RESERVED_WORD(999, SAMPLER3DRECT); YY_BREAK case 142: YY_RULE_SETUP -#line 333 "glsl_lexer.lpp" +#line 334 "glsl_lexer.lpp" return SAMPLER2DRECTSHADOW; YY_BREAK case 143: YY_RULE_SETUP -#line 334 "glsl_lexer.lpp" +#line 335 "glsl_lexer.lpp" RESERVED_WORD(999, SIZEOF); YY_BREAK case 144: YY_RULE_SETUP -#line 335 "glsl_lexer.lpp" +#line 336 "glsl_lexer.lpp" RESERVED_WORD(999, CAST); YY_BREAK case 145: YY_RULE_SETUP -#line 336 "glsl_lexer.lpp" +#line 337 "glsl_lexer.lpp" RESERVED_WORD(999, NAMESPACE); YY_BREAK case 146: YY_RULE_SETUP -#line 337 "glsl_lexer.lpp" +#line 338 "glsl_lexer.lpp" RESERVED_WORD(999, USING); YY_BREAK /* Additional reserved words in GLSL 1.20. */ case 147: YY_RULE_SETUP -#line 340 "glsl_lexer.lpp" +#line 341 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER_ES(120, LOWP); YY_BREAK case 148: YY_RULE_SETUP -#line 341 "glsl_lexer.lpp" +#line 342 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER_ES(120, MEDIUMP); YY_BREAK case 149: YY_RULE_SETUP -#line 342 "glsl_lexer.lpp" +#line 343 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER_ES(120, HIGHP); YY_BREAK case 150: YY_RULE_SETUP -#line 343 "glsl_lexer.lpp" +#line 344 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER_ES(120, PRECISION); YY_BREAK /* Additional reserved words in GLSL 1.30. */ case 151: YY_RULE_SETUP -#line 346 "glsl_lexer.lpp" +#line 347 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, COMMON); YY_BREAK case 152: YY_RULE_SETUP -#line 347 "glsl_lexer.lpp" +#line 348 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, PARTITION); YY_BREAK case 153: YY_RULE_SETUP -#line 348 "glsl_lexer.lpp" +#line 349 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, ACTIVE); YY_BREAK case 154: YY_RULE_SETUP -#line 349 "glsl_lexer.lpp" +#line 350 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER_ES(130, SUPERP); YY_BREAK case 155: YY_RULE_SETUP -#line 350 "glsl_lexer.lpp" +#line 351 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, SAMPLERBUFFER); YY_BREAK case 156: YY_RULE_SETUP -#line 351 "glsl_lexer.lpp" +#line 352 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, FILTER); YY_BREAK case 157: YY_RULE_SETUP -#line 352 "glsl_lexer.lpp" +#line 353 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE1D); YY_BREAK case 158: YY_RULE_SETUP -#line 353 "glsl_lexer.lpp" +#line 354 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE2D); YY_BREAK case 159: YY_RULE_SETUP -#line 354 "glsl_lexer.lpp" +#line 355 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE3D); YY_BREAK case 160: YY_RULE_SETUP -#line 355 "glsl_lexer.lpp" +#line 356 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGECUBE); YY_BREAK case 161: YY_RULE_SETUP -#line 356 "glsl_lexer.lpp" +#line 357 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGE1D); YY_BREAK case 162: YY_RULE_SETUP -#line 357 "glsl_lexer.lpp" +#line 358 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGE2D); YY_BREAK case 163: YY_RULE_SETUP -#line 358 "glsl_lexer.lpp" +#line 359 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGE3D); YY_BREAK case 164: YY_RULE_SETUP -#line 359 "glsl_lexer.lpp" +#line 360 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGECUBE); YY_BREAK case 165: YY_RULE_SETUP -#line 360 "glsl_lexer.lpp" +#line 361 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGE1D); YY_BREAK case 166: YY_RULE_SETUP -#line 361 "glsl_lexer.lpp" +#line 362 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGE2D); YY_BREAK case 167: YY_RULE_SETUP -#line 362 "glsl_lexer.lpp" +#line 363 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGE3D); YY_BREAK case 168: YY_RULE_SETUP -#line 363 "glsl_lexer.lpp" +#line 364 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGECUBE); YY_BREAK case 169: YY_RULE_SETUP -#line 364 "glsl_lexer.lpp" +#line 365 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE1DARRAY); YY_BREAK case 170: YY_RULE_SETUP -#line 365 "glsl_lexer.lpp" +#line 366 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE2DARRAY); YY_BREAK case 171: YY_RULE_SETUP -#line 366 "glsl_lexer.lpp" +#line 367 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGE1DARRAY); YY_BREAK case 172: YY_RULE_SETUP -#line 367 "glsl_lexer.lpp" +#line 368 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGE2DARRAY); YY_BREAK case 173: YY_RULE_SETUP -#line 368 "glsl_lexer.lpp" +#line 369 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGE1DARRAY); YY_BREAK case 174: YY_RULE_SETUP -#line 369 "glsl_lexer.lpp" +#line 370 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGE2DARRAY); YY_BREAK case 175: YY_RULE_SETUP -#line 370 "glsl_lexer.lpp" +#line 371 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE1DSHADOW); YY_BREAK case 176: YY_RULE_SETUP -#line 371 "glsl_lexer.lpp" +#line 372 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGE2DSHADOW); YY_BREAK case 177: YY_RULE_SETUP -#line 372 "glsl_lexer.lpp" +#line 373 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IMAGEBUFFER); YY_BREAK case 178: YY_RULE_SETUP -#line 373 "glsl_lexer.lpp" +#line 374 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, IIMAGEBUFFER); YY_BREAK case 179: YY_RULE_SETUP -#line 374 "glsl_lexer.lpp" +#line 375 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, UIMAGEBUFFER); YY_BREAK case 180: YY_RULE_SETUP -#line 375 "glsl_lexer.lpp" +#line 376 "glsl_lexer.lpp" TOKEN_OR_IDENTIFIER(130, ROW_MAJOR); YY_BREAK case 181: YY_RULE_SETUP -#line 377 "glsl_lexer.lpp" +#line 378 "glsl_lexer.lpp" { struct _mesa_glsl_parse_state *state = yyextra; void *ctx = state; @@ -2332,15 +2333,15 @@ YY_RULE_SETUP YY_BREAK case 182: YY_RULE_SETUP -#line 384 "glsl_lexer.lpp" +#line 385 "glsl_lexer.lpp" { return yytext[0]; } YY_BREAK case 183: YY_RULE_SETUP -#line 386 "glsl_lexer.lpp" +#line 387 "glsl_lexer.lpp" ECHO; YY_BREAK -#line 2344 "glsl_lexer.cpp" +#line 2345 "glsl_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PP): case YY_STATE_EOF(PRAGMA): @@ -3483,7 +3484,7 @@ void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 386 "glsl_lexer.lpp" +#line 387 "glsl_lexer.lpp" |