added grammar and sample input. Please review and propose revision.