Re: if then else shift/reduce Syndrome

tim@franck.Princeton.EDU (Tim Hollebeek)
13 Feb 1996 18:07:47 -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)
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)
[3 later articles]
| List of all articles for this month |
From: tim@franck.Princeton.EDU (Tim Hollebeek)
Newsgroups: comp.compilers
Date: 13 Feb 1996 18:07:47 -0500
Organization: Princeton University
References: 96-02-123
Keywords: yacc, syntax

Tarn Burton (tarnwb@holly.colostate.edu) wrote:
: Does anyone know how to get rid of the bison shift/reduce conflict in
: the C if then else.


%token IF
%nonassoc LOWER_THAN_ELSE
%nonassoc ELSE


cond: IF '(' expression ')' statement optional_else_part


optional_else_part: /* empty */ %prec LOWER_THAN_ELSE
| ELSE statement


Tim Hollebeek
Princeton Univ. | email: tim@wfn-shop.princeton.edu
-------------------| http://wfn-shop.princeton.edu/~tim (NEW! IMPROVED!)
--


Post a followup to this message

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