if then else shift/reduce Syndrome

Tarn Burton <tarnwb@holly.colostate.edu>
13 Feb 1996 00:18:55 -0500

          From comp.compilers

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)
[5 later articles]
| List of all articles for this month |

From: Tarn Burton <tarnwb@holly.colostate.edu>
Newsgroups: comp.compilers
Date: 13 Feb 1996 00:18:55 -0500
Organization: Colorado State University
Keywords: yacc, question

Does anyone know how to get rid of the bison shift/reduce conflict in
the C if then else.


expression
: if '(' expression ')' statement
| if '(' expression ')' statement else statement
.
.
.
;




I've looked at few publicly available grammar files and this conflict
still shows up. I understand the problem but was just wondering if
anyone had a solution. After all don't reinvent the wheel!


Tarn Burton
[If someone has a tidy solution to this question, I'll stash it somewhere and
add a pointer thereto to the FAQ. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.