retagged by
2,155 views

2 Answers

Best answer
6 votes
6 votes
  • $S \to A \mid B$
  • $A \to a \mid \epsilon$
  • $B \to b \mid \epsilon$


Now if I want to generate empty string ($\epsilon$) from above grammar, I have more than one option to generate it. Obviously grammar is ambiguous. No parser will work.

So, just for answer : Grammar is NOT LL(1).

selected by
0 votes
0 votes
First(S)^First(A) !=0 so it is not LR(1)

Related questions

2 votes
2 votes
1 answer
1
sripo asked Nov 10, 2018
3,182 views
Can you give an example which is not LL(1) but is CLR(1)
0 votes
0 votes
1 answer
2
Rahul Ranjan 1 asked Mar 19, 2018
4,923 views
Given a grammar :$E \rightarrow E + T / T$$T \rightarrow i$Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without dra...
8 votes
8 votes
3 answers
3
Parshu gate asked Nov 13, 2017
15,198 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...
7 votes
7 votes
6 answers
4
learner_geek asked Aug 5, 2017
11,490 views
Which of the following statements is true?Every LL(1) grammar is LALR(1).Every LL(1) grammar is CLR(1). AS I think 2nd is True and 1st is False if I am wrong please let ...