search
Log In
1 vote
144 views

 Describe all the viable prefixes for the following grammars:

  1. The grammar $S\rightarrow 0S1\mid 01$ of Question $4.2.2(a)$.
  2. The grammar $S\rightarrow SS+\mid SS\ast\mid a$ of Question $4.2.1$.
  3. The grammar $S\rightarrow S(S)\mid \epsilon$ of Question $4.2.2(c)$.
in Compiler Design 144 views

Please log in or register to answer this question.

Related questions

0 votes
0 answers
1
81 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: $G_{n}$, has $2n^{2}-n$ productions. $G_{n}$, has $2^{n} + n^{2} + n$ sets of $LR(0)$ items. $G_{n}$ is $SLR(1)$. What does this analysis say about how large $LR$ parsers can get?
asked Aug 20, 2019 in Compiler Design Lakshman Patel RJIT 81 views
0 votes
0 answers
3
0 votes
0 answers
4
96 views
Modify the SDD of Fig. $5.25$ to include a synthesized attribute $B.le$, the length of a box. The length of the concatenation of two boxes is the sum of the lengths of each. Then add your new rules to the proper positions in the SDT of Fig. $5.26$.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 96 views
...