From 1f959ab4d68ce7c963f9d5f3edc64b457565c291 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 19 Apr 2010 15:11:31 -0700 Subject: [PATCH] Use IDENTIFIER instead of TYPE_NAME for structure names 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glsl_parser.ypp b/glsl_parser.ypp index 250c51c..131f23d 100644 --- a/glsl_parser.ypp +++ b/glsl_parser.ypp @@ -84,7 +84,7 @@ %token ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D %token USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY %token STRUCT VOID WHILE -%token IDENTIFIER TYPE_NAME +%token IDENTIFIER %token FLOATCONSTANT %token INTCONSTANT UINTCONSTANT BOOLCONSTANT %token 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); -- 2.7.4