From: Tim Josling Date: Sat, 1 Mar 2003 12:03:50 +0000 (+0000) Subject: Fix for bison 1.75 enum name clash. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2bcbe1b74a08bffddd9a459d12b952932eafd1ff;p=gcc.git Fix for bison 1.75 enum name clash. From-SVN: r63606 --- diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 40a9b32388a..a8008dc6a14 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,12 @@ +2003-03-01 Tim Josling + + 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 * parse.y (my_yylex): New - ensure lexer time is charged to diff --git a/gcc/treelang/lex.l b/gcc/treelang/lex.l index 869138c410b..293da379711 100644 --- a/gcc/treelang/lex.l +++ b/gcc/treelang/lex.l @@ -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" { diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y index d1954e2c516..3361fcf4263 100644 --- a/gcc/treelang/parse.y +++ b/gcc/treelang/parse.y @@ -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;