12.6.2 Augmenting the Grammar

A context-free grammar does not adequately express the complexity of the grammar of natural languages, such as English. Two mechanisms can be added to this grammar to make it more expressive:

  • extra arguments to the non-terminal symbols and
  • arbitrary conditions on the rules.

The extra arguments will enable us to do several things: to construct a parse tree, to represent the semantic structure of a sentence, to incrementally build a query that represents a question to a database, and to accumulate information about phrase agreement (such as number, tense, gender, and person).