A context-free grammar can enforce several matched counts by nesting their dependencies. For example,generates the context-free language . Applying the first recursive production rule times places zeros at both ends. Applying the second recursive production rule times places ones before the inner block and further zeros after it. ThusEvery terminal grammar derivation has this form, because it must switch from to exactly once. The nesting is useful: the final block records the sum of two independently chosen counts without requiring a context-sensitive grammar.
Articles by others on the same topic
There are currently no matching articles.