Implemented class hierarchy. Added grammar file (may still need review).