Shift/reduce parser.