This implementation was wrong anyway because it did not respect
scoping rules. This will need to be revisited soon. The most likely
result is that the grammar is going to need some significant re-work
to be able to use a IDENTIFIER in all the places where a TYPE_NAME is
currently used.
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
-#include "symbol_table.h"
#define YY_USER_ACTION \
do { \
[_a-zA-Z][_a-zA-Z0-9]* {
yylval->identifier = strdup(yytext);
-
- if (_mesa_symbol_table_find_symbol(yyextra->symbols,
- 0,
- yylval->identifier))
- return TYPE_NAME;
- else
- return IDENTIFIER;
+ return IDENTIFIER;
}
. { return yytext[0]; }
#include "ast.h"
#include "glsl_parser_extras.h"
-#include "symbol_table.h"
#include "glsl_types.h"
#define YYLEX_PARAM state->scanner
STRUCT IDENTIFIER '{' struct_declaration_list '}'
{
$$ = new ast_struct_specifier($2, $4);
-
- _mesa_symbol_table_add_symbol(state->symbols, 0, $2, $$);
}
| STRUCT '{' struct_declaration_list '}'
{