fixed a bug in the grammar and added more analyzer code