if-then-else ambiguity

Umm <l41484@alfa.ist.utl.pt>
16 Apr 1997 00:04:59 -0400

          From comp.compilers

Related articles
if-then-else ambiguity l41484@alfa.ist.utl.pt (Umm) (1997-04-16)
Re: if-then-else ambiguity dds@flavors.com (Duncan Smith) (1997-04-18)
| List of all articles for this month |

From: Umm <l41484@alfa.ist.utl.pt>
Newsgroups: comp.compilers
Date: 16 Apr 1997 00:04:59 -0400
Organization: Compilers Central
Keywords: parse, question, comment

Would it be a correct way, of solving a shift reduce problem in
yacc/bison of the if-then-else by defining a %left precedence (the
biggest one) to the else?? that way, we are sure (we were already but
at least there will not be a warning) that in the presence of the
else, it will be immediately reduced and not shifted, thus making it
belong to the closest if.


Is this correct??


                                                  Tiago Umm Pascoal
                                                l41484@alfa.ist.utl.pt
[Yes. -John]
--


Post a followup to this message

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