move parser and eqn to derived graph classes

In preparation for finer-grained error reporting
add highlighting of errors