Added an option for setting grammar features to output