From: Peter Johnson Date: Thu, 5 Jul 2001 09:50:51 +0000 (-0000) Subject: Eliminate conflicts by setting associativity (and precedence too). X-Git-Tag: v0.1.0~396 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=187eda1c36804d8fc9a0e13032b80412b8b5c264;p=yasm Eliminate conflicts by setting associativity (and precedence too). svn path=/trunk/yasm/; revision=115 --- diff --git a/modules/parsers/nasm/bison.y.in b/modules/parsers/nasm/bison.y.in index f282e8b5..0c155b22 100644 --- a/modules/parsers/nasm/bison.y.in +++ b/modules/parsers/nasm/bison.y.in @@ -1,4 +1,4 @@ -/* $Id: bison.y.in,v 1.17 2001/07/05 09:32:58 mu Exp $ +/* $Id: bison.y.in,v 1.18 2001/07/05 09:50:51 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -90,8 +90,13 @@ extern void yyerror(char *); %type immlabel %type label_id +%left '|' +%left '^' +%left '&' +%left LEFT_OP RIGHT_OP %left '-' '+' -%left '*' '/' +%left '*' '/' '%' +%nonassoc '~' %% input: /* empty */ diff --git a/modules/parsers/nasm/nasm-bison.y b/modules/parsers/nasm/nasm-bison.y index 5dbfced1..f3132d3a 100644 --- a/modules/parsers/nasm/nasm-bison.y +++ b/modules/parsers/nasm/nasm-bison.y @@ -1,4 +1,4 @@ -/* $Id: nasm-bison.y,v 1.17 2001/07/05 09:32:58 mu Exp $ +/* $Id: nasm-bison.y,v 1.18 2001/07/05 09:50:51 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -90,8 +90,13 @@ extern void yyerror(char *); %type immlabel %type label_id +%left '|' +%left '^' +%left '&' +%left LEFT_OP RIGHT_OP %left '-' '+' -%left '*' '/' +%left '*' '/' '%' +%nonassoc '~' %% input: /* empty */ diff --git a/src/bison.y.in b/src/bison.y.in index f282e8b5..0c155b22 100644 --- a/src/bison.y.in +++ b/src/bison.y.in @@ -1,4 +1,4 @@ -/* $Id: bison.y.in,v 1.17 2001/07/05 09:32:58 mu Exp $ +/* $Id: bison.y.in,v 1.18 2001/07/05 09:50:51 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -90,8 +90,13 @@ extern void yyerror(char *); %type immlabel %type label_id +%left '|' +%left '^' +%left '&' +%left LEFT_OP RIGHT_OP %left '-' '+' -%left '*' '/' +%left '*' '/' '%' +%nonassoc '~' %% input: /* empty */ diff --git a/src/parsers/nasm/bison.y.in b/src/parsers/nasm/bison.y.in index f282e8b5..0c155b22 100644 --- a/src/parsers/nasm/bison.y.in +++ b/src/parsers/nasm/bison.y.in @@ -1,4 +1,4 @@ -/* $Id: bison.y.in,v 1.17 2001/07/05 09:32:58 mu Exp $ +/* $Id: bison.y.in,v 1.18 2001/07/05 09:50:51 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -90,8 +90,13 @@ extern void yyerror(char *); %type immlabel %type label_id +%left '|' +%left '^' +%left '&' +%left LEFT_OP RIGHT_OP %left '-' '+' -%left '*' '/' +%left '*' '/' '%' +%nonassoc '~' %% input: /* empty */ diff --git a/src/parsers/nasm/nasm-bison.y b/src/parsers/nasm/nasm-bison.y index 5dbfced1..f3132d3a 100644 --- a/src/parsers/nasm/nasm-bison.y +++ b/src/parsers/nasm/nasm-bison.y @@ -1,4 +1,4 @@ -/* $Id: nasm-bison.y,v 1.17 2001/07/05 09:32:58 mu Exp $ +/* $Id: nasm-bison.y,v 1.18 2001/07/05 09:50:51 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -90,8 +90,13 @@ extern void yyerror(char *); %type immlabel %type label_id +%left '|' +%left '^' +%left '&' +%left LEFT_OP RIGHT_OP %left '-' '+' -%left '*' '/' +%left '*' '/' '%' +%nonassoc '~' %% input: /* empty */