refactoring in ParsingContext