A sample implementation of a simple LR parser.