parser base refactoring