Extract common methods from parsers.