Extended BNF

Reecursive procedures in programming can be rewritten using iteration (and a stack). Similarly, we can rewrite recursive procedures using iteration. Braces, { } are often used to represent 0 or more occurrence of their contents, while brackets, [], enclose optional items. Thus, using extended BNF, we can write the Expression grammar:

The first rule derives the sentential forms T, T + T, T + T + T, etc.

Of course, since F can derive an E in F --> (E), this grammar is still (indirectly) recursive.

Send questions and comments to: Karen Lemone