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);
if (keyword) {
if (keyword->value == ADDOP || keyword->value == MULOP) {
yylval.integer_val = yytext[0];
yylval.op = yytext[0];
} else {
yylval.type = keyword->type;
}

View File

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