[back]
# grammar for dangling else conflict
#

# start rule
start -> stmt

# stmt
stmt -> if-stmt
stmt -> expr-stmt

# if stmt
# shift on ELSE and don't guess
if-stmt -> IF expr THEN stmt ELSE >! stmt 
if-stmt -> IF expr THEN stmt 

# expr stmt
expr-stmt -> expr

# expr
expr -> NUMBER
[back]