edited by
1,173 views
0 votes
0 votes
The following grammar is LL(1) ?

S -> aA/∈

A-> abS/∈

We know that, if a grammar has to be LL(1), there should be not be multiple entries for any column of any row.

Alternatively we can check like,

First(aA) and Follow(S)(This is for ∈ production) should not have common terminals.

Similarly for First(abS) and Follow(A) should not have common terminals.

so,we have First(aA) = { a },

Follow(S) = { dollarSign }.

hence no common terminals.
 

First(abS) = { a },

Follow(A) = { dollar Sign } .

here also no common terminals.
Is My understanding correct. Please correct me if iam wrong.
edited by

1 Answer

Related questions

2 votes
2 votes
1 answer
1
sripo asked Nov 10, 2018
3,238 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,957 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,439 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,642 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 ...