{ module HappyDanglingElse where } -- Typ der Eingabe %tokentype { Char } -- Terminalsymbole und zugehoerige Eingabe: %token a { 'a' } i { 'i' } e { 'e' } -- Name der Parse-Funktion %name parseDE %% -- Rueckgabe: Exp S : i S e S { IE $2 $4 } | i S { I $2 } | a { A } { data Exp = IE Exp Exp | I Exp | A deriving Show happyError :: String -> a happyError input = error ("Passt nicht: " ++ show input) }