small parser refactorings