While the format of a grammar file may vary depending both on the phrases to be recognized and the preferences of the grammar writer, we would like to illustrate two common approaches to grammar writing.
<commands> = show smart icons | hide smart icons | show ruler | hide ruler | show headers | hide headers | span margin to margin | go to the beginning of the document .
<show-hide-command> = <show-hide> <show-object> . <show-hide> = <show> | <hide> . <show-object> = <smart> <icons> | <ruler> | <headers> | <outline> <tools> | <misspelled> <words> . // lexicon <headers> = headers . <hide> = hide . <icons> = icons . <misspelled> = misspelled . <outline> = outline . <ruler> = ruler . <show> = show . <smart> = smart . <tools> = tools . <words> = words .