Related articles |
---|
if then else shift/reduce Syndrome tarnwb@holly.colostate.edu (Tarn Burton) (1996-02-13) |
Re: if then else shift/reduce Syndrome solution@gate.net (1996-02-13) |
Re: if then else shift/reduce Syndrome tim@franck.Princeton.EDU (1996-02-13) |
Re: if then else shift/reduce Syndrome mab@wdl.loral.com (1996-02-14) |
Re: if then else shift/reduce Syndrome theo@engr.mun.ca (1996-02-16) |
Re: if then else shift/reduce Syndrome meissner@cygnus.com (Michael Meissner) (1996-02-16) |
Re: if then else shift/reduce Syndrome solution@gate.net (1996-02-16) |
Re: if then else shift/reduce Syndrome tarnwb@holly.colostate.edu (Tarn Burton) (1996-02-16) |
Re: if then else shift/reduce Syndrome meissner@cygnus.com (Michael Meissner) (1996-02-21) |
Re: if then else shift/reduce Syndrome henry@zoo.toronto.edu (Henry Spencer) (1996-02-27) |
Re: if then else shift/reduce Syndrome neitzel@gaertner.de (1996-03-01) |
Re: if then else shift/reduce Syndrome bakul@netcom.com (1996-03-03) |
From: | Tarn Burton <tarnwb@holly.colostate.edu> |
Newsgroups: | comp.compilers |
Date: | 16 Feb 1996 23:44:15 -0500 |
Organization: | Colorado State University |
References: | 96-02-123 96-02-175 |
Keywords: | yacc, parse |
I asked:
>Does anyone know how to get rid of the bison shift/reduce conflict in
>the C if then else.
I received several replies via direct email regarding this conflict
and all of the methods were represented in some form by postings to
the newsgroup. With the exception of one.
This was an explicit precedence setting.
For example:
%nonassoc LOWER_THEN_ELSE
%nonassoc ELSE
statement
: IF '(' bexpr ')' statement else_statement
;
else_statement
: %prec LOWER_THEN_ELSE
| ELSE statement
;
Thanks for the response, just thought I'd through this other
alternative into the pile
Tarn Burton
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.