overhaul the format of parse results

heavily inspired by (but not identical to) the format used by
Constellation/doctrine