Recent questions tagged grammar

1 votes
1 answer
272
13 votes
2 answers
273
1. LL(k) grammars have one to one correspondance with DCFL's2. LR(k) grammars have one to one correspondance with CFL'sWhich of them is True and explain it bit clearly?
0 votes
1 answer
276
An unambiguous grammar has same leftmost and rightmost derivationPlease provide an example to show this.
0 votes
0 answers
278
4 votes
1 answer
279
4 votes
2 answers
280
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states...
10 votes
2 answers
281
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw...
0 votes
3 answers
286
S->AbaCA->BCB->b/epsilonC->D/epsilonD->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
24 votes
1 answer
288
Show that grammar $G_1$ is ambiguous using parse trees:$G_{1}: S \rightarrow$ if $S$ then $S$ else $S$ $S \rightarrow$ if $S$ then $S$
2 votes
2 answers
291
Consider the following grammar:$S \rightarrow L = P \mid P$$L \rightarrow ^*P \mid id$$P \rightarrow L$The above grammar is:AmbiguousSLR(1)LALR(1)None of the above
3 votes
1 answer
292
Which grammar causes recursive-descent parser to go into infinite loop?LL(1)Left recursive grammarRight recursive grammarGrammar with left factors
3 votes
2 answers
293
3 votes
1 answer
294
2 votes
2 answers
297
Read the below mentioned grammar:$S \rightarrow X$$X \rightarrow YX \mid \epsilon$$Y \rightarrow aY \mid b$This grammar is NOT:$LALR$$LR (0)$$LR(1)$None of the above
3 votes
1 answer
298
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________.LL(1) grammarUnambiguous grammarOperator gramm...
2 votes
2 answers
299
Read the following grammar:$S \rightarrow Ka \mid bKc \mid dc \mid bda$$K \rightarrow d$This grammar is NOT:LALR(1)SLR(1)LR(1)None of the above