updated grammar with more parsing rules