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.
%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
$$ = new ast_type_specifier($1);
$$->set_location(yylloc);
}
- | TYPE_NAME
+ | IDENTIFIER
{
$$ = new ast_type_specifier($1);
$$->set_location(yylloc);