Objective:
- Break input into parts and build parse tree.
- Bail out if syntax is wrong.
Arbitrary input, that the parser should be able to parse:
On one line (consisting of both constraint-set and update):
~(~p ( X , Y ,Z) AND x(Y) AND X<>Y) AND q(?a) OR v(j) ;
p(?a,?b,?c)
Note: Negations, con/dis-junctions, parenthesis, variables, constants, parameters, (in)equalities.
Could I do with less? - Didn't think so.