Implement the parser.