Fix for bison 1.75 enum name clash.
authorTim Josling <tej@melbpc.org.au>
Sat, 1 Mar 2003 12:03:50 +0000 (12:03 +0000)
committerTim Josling <timjosling@gcc.gnu.org>
Sat, 1 Mar 2003 12:03:50 +0000 (12:03 +0000)
From-SVN: r63606

gcc/treelang/ChangeLog
gcc/treelang/lex.l
gcc/treelang/parse.y

index 40a9b32388a56ec12ae0e9a4d50fb45e46e2ac2f..a8008dc6a14070e70fe99a829053058baec00638 100644 (file)
@@ -1,3 +1,12 @@
+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>
 
        * parse.y (my_yylex): New - ensure lexer time is charged to
index 869138c410b42f33968f4b6e486132a3e8bb5b22..293da379711262e4f5408a5157879f14ee6eddd9 100644 (file)
@@ -122,12 +122,12 @@ static void dump_lex_value (int lexret);
   
 "+" {
   update_lineno_charno ();
-  SAVE_RETURN (PLUS);
+  SAVE_RETURN (tl_PLUS);
 }
   
 "-" {
   update_lineno_charno ();
-  SAVE_RETURN (MINUS);
+  SAVE_RETURN (tl_MINUS);
 }
   
 "=" {
@@ -187,7 +187,7 @@ static void dump_lex_value (int lexret);
   
 "return" {
   update_lineno_charno ();
-  SAVE_RETURN (RETURN);
+  SAVE_RETURN (tl_RETURN);
 }
   
 "if" {
index d1954e2c516ebda4f8a99a5f19264e7f179c0dd2..3361fcf426316c62e7518cb60d880ea8f9b39064 100644 (file)
@@ -106,8 +106,8 @@ static struct prod_token_parm_item *current_function=NULL;
 %token COMMA
 %right EQUALS
 %right ASSIGN
-%left  PLUS
-%left  MINUS
+%left  tl_PLUS
+%left  tl_MINUS
 
 /* Literals.  */
 %token INTEGER
@@ -115,7 +115,7 @@ static struct prod_token_parm_item *current_function=NULL;
 /* Keywords.  */
 %token IF
 %token ELSE
-%token RETURN
+%token tl_RETURN
 %token CHAR
 %token INT
 %token UNSIGNED
@@ -505,7 +505,7 @@ LEFT_BRACE statements_opt RIGHT_BRACE {
 
 
 return:
-RETURN expression_opt {
+tl_RETURN expression_opt {
   struct prod_token_parm_item *type_prod;
   struct prod_token_parm_item* ret_tok;
   ret_tok = $1;
@@ -568,7 +568,7 @@ INTEGER {
 |variable_ref {
   $$ = $1;
 }
-|expression PLUS expression {
+|expression tl_PLUS expression {
   struct prod_token_parm_item* tok;
   struct prod_token_parm_item *prod;
   struct prod_token_parm_item *op1;
@@ -597,7 +597,7 @@ INTEGER {
     }
   $$ = prod;
 }
-|expression MINUS expression %prec PLUS {
+|expression tl_MINUS expression %prec tl_PLUS {
   struct prod_token_parm_item* tok;
   struct prod_token_parm_item *prod;
   struct prod_token_parm_item *op1;