Use IDENTIFIER instead of TYPE_NAME for structure names
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 19 Apr 2010 22:11:31 +0000 (15:11 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Apr 2010 01:22:47 +0000 (18:22 -0700)
Since there is no track of which names are structure names during parsing,
TYPE_NAME cannot be produced by the lexer.  Use IDENTIFIER and let the AST
processor sort it out.

glsl_parser.ypp

index 250c51c7ee3feb4e6e204cc00c30e2f47ce6c60e..131f23d8c1e098850af6716439f75c79a346823b 100644 (file)
@@ -84,7 +84,7 @@
 %token ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
 %token USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
 %token STRUCT VOID WHILE
-%token <identifier> IDENTIFIER TYPE_NAME
+%token <identifier> IDENTIFIER
 %token <real> FLOATCONSTANT
 %token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
 %token <identifier> FIELD_SELECTION
@@ -941,7 +941,7 @@ type_specifier_nonarray:
           $$ = new ast_type_specifier($1);
           $$->set_location(yylloc);
        }
-       | TYPE_NAME
+       | IDENTIFIER
        {
           $$ = new ast_type_specifier($1);
           $$->set_location(yylloc);