The Gateway to Computer Science Excellence
0 votes

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?

in Compiler Design by | 65 views

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,501 answers
95,325 users