Move some logic up to the parser.

As per grammar review at  https://github.com/nikodemus/esrap/issues/26,
improve the situation.