Commit 2bcbe1b7 by Tim Josling Committed by Tim Josling

Fix for bison 1.75 enum name clash.

From-SVN: r63606
parent 74dd1333
2003-03-01 Tim Josling <tej@melbpc.org.au>
Name clashes with rtl.h fixed.
* lex.l: Tokens PLUS, MINUS, RETURN changed to tl_PLUS tl_MINUS
tl_RETURN.
* parse.y: Ditto.
2003-02-24 Tim Josling <tej@melbpc.org.au> 2003-02-24 Tim Josling <tej@melbpc.org.au>
* parse.y (my_yylex): New - ensure lexer time is charged to * parse.y (my_yylex): New - ensure lexer time is charged to
......
...@@ -122,12 +122,12 @@ static void dump_lex_value (int lexret); ...@@ -122,12 +122,12 @@ static void dump_lex_value (int lexret);
"+" { "+" {
update_lineno_charno (); update_lineno_charno ();
SAVE_RETURN (PLUS); SAVE_RETURN (tl_PLUS);
} }
"-" { "-" {
update_lineno_charno (); update_lineno_charno ();
SAVE_RETURN (MINUS); SAVE_RETURN (tl_MINUS);
} }
"=" { "=" {
...@@ -187,7 +187,7 @@ static void dump_lex_value (int lexret); ...@@ -187,7 +187,7 @@ static void dump_lex_value (int lexret);
"return" { "return" {
update_lineno_charno (); update_lineno_charno ();
SAVE_RETURN (RETURN); SAVE_RETURN (tl_RETURN);
} }
"if" { "if" {
......
...@@ -106,8 +106,8 @@ static struct prod_token_parm_item *current_function=NULL; ...@@ -106,8 +106,8 @@ static struct prod_token_parm_item *current_function=NULL;
%token COMMA %token COMMA
%right EQUALS %right EQUALS
%right ASSIGN %right ASSIGN
%left PLUS %left tl_PLUS
%left MINUS %left tl_MINUS
/* Literals. */ /* Literals. */
%token INTEGER %token INTEGER
...@@ -115,7 +115,7 @@ static struct prod_token_parm_item *current_function=NULL; ...@@ -115,7 +115,7 @@ static struct prod_token_parm_item *current_function=NULL;
/* Keywords. */ /* Keywords. */
%token IF %token IF
%token ELSE %token ELSE
%token RETURN %token tl_RETURN
%token CHAR %token CHAR
%token INT %token INT
%token UNSIGNED %token UNSIGNED
...@@ -505,7 +505,7 @@ LEFT_BRACE statements_opt RIGHT_BRACE { ...@@ -505,7 +505,7 @@ LEFT_BRACE statements_opt RIGHT_BRACE {
return: return:
RETURN expression_opt { tl_RETURN expression_opt {
struct prod_token_parm_item *type_prod; struct prod_token_parm_item *type_prod;
struct prod_token_parm_item* ret_tok; struct prod_token_parm_item* ret_tok;
ret_tok = $1; ret_tok = $1;
...@@ -568,7 +568,7 @@ INTEGER { ...@@ -568,7 +568,7 @@ INTEGER {
|variable_ref { |variable_ref {
$$ = $1; $$ = $1;
} }
|expression PLUS expression { |expression tl_PLUS expression {
struct prod_token_parm_item* tok; struct prod_token_parm_item* tok;
struct prod_token_parm_item *prod; struct prod_token_parm_item *prod;
struct prod_token_parm_item *op1; struct prod_token_parm_item *op1;
...@@ -597,7 +597,7 @@ INTEGER { ...@@ -597,7 +597,7 @@ INTEGER {
} }
$$ = prod; $$ = prod;
} }
|expression MINUS expression %prec PLUS { |expression tl_MINUS expression %prec tl_PLUS {
struct prod_token_parm_item* tok; struct prod_token_parm_item* tok;
struct prod_token_parm_item *prod; struct prod_token_parm_item *prod;
struct prod_token_parm_item *op1; struct prod_token_parm_item *op1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment