(*l *s + and - are pretty printing commands and may be ignored by the human reader) Program = *l "" + List(Expression) - *l "" EOF. Expression : LetExp | CNF. LetExp = *l "" + "" Literal "" + Expression - *l "" -. CNF = *l "" + List(Clause) - *l [*l "" ClauseCount ""] [*l "" ClauseCount ""] "". Clause = *l "" Weight Literals "". Literals = *l "" + List(Literal) - *l "". Literal : Pos | Neg. // expanded: common Variable . Pos = "" Variable "". Neg = "" Variable "". Variable = Ident. Weight = "" int "". ClauseCount = "" int "". List(S) ~ {S} . Main = String. A sample program is: a b 2 a b 3 b a 5 10