help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why Bison prefer reduce to shift in dangling else?


From: Lunjin Lu
Subject: Why Bison prefer reduce to shift in dangling else?
Date: Fri, 21 Feb 2003 23:01:57 -0500

Hello,

I am swamped by the following dangling else problem. Bison prefers reduce to
shift for the following gramma. Any suggestions to resolve this problem will
be appreciated.

Regards,

Lunjin Lu


%token NIL IF THEN ELSE

%start exp

%%

exp : NIL
  | IF exp THEN exp
  | IF exp THEN exp ELSE exp

%%






reply via email to

[Prev in Thread] Current Thread [Next in Thread]