{ module HappyLR1 where } -- Typ der Eingabe %tokentype { Char } -- Terminalsymbole und zugehoerige Eingabe: %token a { 'a' } b { 'b' } c { 'c' } d { 'd' } e { 'e' } -- Name der Parse-Funktion %name parseLR1 S %% -- Rueckgabe: Dummy-Wert ("Unit") S : a A d { () } | b B d { () } | a B e { () } | b A e { () } A : c { () } B : c { () } { happyError :: String -> a happyError input = error ("Passt nicht: " ++ show input) }