Add Grammar Object

Skeleton implementation of Grammar object. Some of the parsing stages will be moved into the new object to help simplify things.