Changed the grammar to support types.