Added a parser for the grammar.

This allows for the grammar to be specified in the format used by the
book.  I still need to test it with the bigger grammar.