Refactor some parser interfaces to fix PR3278 and a FIXME: