Trying to reduce complexity of the parser class