ΜOpal
Eine simple Programmiersprache zu der in der Lehrveranstaltung PSS ein Compiler geschrieben wird.
Beispielprogramm:
DEF fac(X:nat):nat == IF eq(X,0) THEN 1 ELSE mul(X, fac(sub(X, 1))) FI DEF MAIN:nat == fac(8)
EBNF:
Prog -> Def Def* "#" Def -> "DEF" Lhs "==" Expr Lhs -> "MAIN" ":" Type | "id" "(" [ "id" ":" Type ( "," "id" ":" Type )* ] ")" ":" Type Type -> "nat" | "bool" Expr -> "number" | "true" | "false" | "id" [ "(" [ Expr ( "," Expr )* ] ")" ] | "IF" Expr "THEN" Expr [ "ELSE" Expr ] "FI"