12,892 views
34 votes
34 votes

Consider the grammar with non-terminals $N=\left\{S,C,S_1\right\}$, terminals $T=\left\{a, b, i, t, e\right\}$, with $S$ as the start symbol, and the following set of rules:

$S \rightarrow iCtSS_1 \mid a$

$S_1 \rightarrow eS \mid \epsilon$

$C \rightarrow b$

The grammar is NOT LL(1) because:

  1. it is left recursive

  2. it is right recursive

  3. it is ambiguous

  4. it is not context-free

6 Answers

0 votes
0 votes
Given grammar is not LL(1) it doesn't mean it is ambiguous....it can be unambiguous also......

So u need to check ...for string for which it is ambiguous...then option c is correct...

In this case definitely option elimination give u option c... easy one only.
0 votes
0 votes
for option C can we say that ?

there are two entries for S1 for terminal ‘e’  in parsing table….so grammar couldn’t decide whether to use S-->epsilon or

S-->eS

Hence grammar is ambigious.
Answer:

Related questions

75 votes
75 votes
8 answers
7
Kathleen asked Sep 21, 2014
35,806 views
Consider the following two statements:P: Every regular grammar is LL(1)Q: Every regular set has a LR(1) grammarWhich of the following is TRUE?Both P and Q are trueP is tr...
15 votes
15 votes
3 answers
8
Kathleen asked Sep 21, 2014
9,706 views
Which one of the following is a top-down parser?Recursive descent parser.Operator precedence parser.An LR(k) parser.An LALR(k) parser.