module languages/sdf2/idioms/DanglingElse

exports

sorts S E

lexical syntax
  [\ \t\n] -> LAYOUT

context-free start-symbols
  S
  
context-free syntax

  "expr" -> E

  "if" E "then" S          -> S
  "if" E "then" S "else" S -> S {prefer}
  "other"                  -> S

%% example term:
%% if expr then if expr then other else other
