Use op instead of integer_val for ADDOP etc.

This commit is contained in:
Bill Currie 2011-01-06 21:55:07 +09:00
parent edaa6235e7
commit e34f7caeb0
2 changed files with 3 additions and 3 deletions

View file

@ -237,7 +237,7 @@ keyword_or_id (const char *token)
keyword = Hash_Find (keyword_tab, token); keyword = Hash_Find (keyword_tab, token);
if (keyword) { if (keyword) {
if (keyword->value == ADDOP || keyword->value == MULOP) { if (keyword->value == ADDOP || keyword->value == MULOP) {
yylval.integer_val = yytext[0]; yylval.op = yytext[0];
} else { } else {
yylval.type = keyword->type; yylval.type = keyword->type;
} }

View file

@ -105,8 +105,8 @@ int yylex (void);
%nonassoc ELSE %nonassoc ELSE
%left <string_val> RELOP %left <string_val> RELOP
%left <integer_val> ADDOP %left <op> ADDOP
%left <integer_val> MULOP %left <op> MULOP
%right UNARY %right UNARY
%token <type> TYPE %token <type> TYPE