|Given in class
| || 31 ||Jan
|| 7 ||Feb
Extra credit: While it is known that one can always eliminate
from a grammar, it is not true that every grammar can be made LL(k).
Construct an unambiguous
grammar for a language that has no LL(k) grammar for any k.
- Exercise 12 on page 110.
- Compute First and Follow sets for the grammar shown in Exercise 2 on page 137.
Augment that grammar with the rule S-->Expr $.
- Exercise 1 on page 137, parts a and c.
- Exercise 2 on page 137.
- Exercise 4 on page 138. Recall that you must eliminate any left
recursion, and make the predict sets distinct for each rule of any given
- Design a grammar whose language is the set of all regular
expressions over $a$ and $b$. Examples of such regular expressions are:
Your grammar must be unambiguous, and must enforce the precedence of *
over concatenation over |; each operator is left
- a *
- b | (ab | a) *
- a | aba*