We can use regular-expression-like operators in the right sides of grammar productions. Square brackets can be used to denote an optional part of a production. For example, we might writ
to denote an optional else-statement. In general. A ... (I ( I 'ß IS equivalent to the two productions A ... α 3.,), and A .... α'Y.
Curly brackets can be used to denote a phrase that can be repeated zero or more times. For example,
denotes a list of semicolon-separated stmt'» enclosed between begi
a) Modify the above sImI-production so that a semicolon-terminated list of stmt'« appears on the right side.
b) Give a set of context-free productions generating the same set of strings as A - B*a(CID).
c) Show how [0 replace any production A ... r, where r is a regular expression. by a finite collection of context-free productions.