Fixed compiler warnings on 64bit systems.

Added parse.h header to grammar and removed all the casts.