Is John Bill's son?
List all … sons of Bill
… persons of which John is a son
… son relationships
- A rule is a leaf or a compound term.
- A leaf term (op) is a word.
- A compound term is a word followed by an argument list.
- A word has one letter or more.
- One-letter words are variables.
- Whitespace is ignored.
- Case-sensitive (a and A are different).
Rule ::= Op | Compound
Op ::= Letter+
Compound ::= Op "(" Rule ( "," Rule )* ")"
Letter ::= [A-Za-z]