11 views

Consider the family of grammars $G_{n}$, defined by:

• $S\rightarrow A_{i}b_{i}$ for $1\leq i\leq n$
• $A_{i} \rightarrow a_{j} A_{i}\mid a_{j}$ for $1\leq i,j\leq n$ and $i\neq j$

Show that:

1. $G_{n}$, has $2n^{2}-n$ productions.
2. $G_{n}$, has $2^{n} + n^{2} + n$ sets of $LR(0)$ items.
3. $G_{n}$ is $SLR(1)$.

What does this analysis say about how large $LR$ parsers can get?

| 11 views