# Recent questions tagged ll1

1 vote
1
Can any one verify this soln plz.. Thank you
2
Show that no grammar that has cycles can be LL(1). Is it true ?? It is saying if the grammar has cycle it can't be LL(1) But what if the cycle in grammar is due to RIGHT RECURSiON which is allowed in LL(1) ???
3
Can you give an example which is not LL(1) but is CLR(1)
1 vote
4
To compute FOLLOW(A) for any grammar symbol A a) We must compute FIRST of some grammar symbols. b) No need of computing FIRST of some symbols. c) Maybe compute FIRST of some symbols. d) None of the above. The answer is given as option (A) but if we take start symbol( ... will definitely in FOLLOW(S) and we didn't computed FIRST of any symbol for it. So option (C) should be the answer.
1 vote
5
A LL(k) parser recognizes the languages generated by some ε-free LL(k) grammar. (From Wikiepedia) Why epsilon free LL(k) grammar?
6
Check whether the following grammar is $LL(1)$ or not? $S \rightarrow aAbA/Ba$ $B \rightarrow b/ \epsilon$ $A \rightarrow aBb/ \epsilon$
7
$\$ S->( L)|a L->L,S|S While parsing string ( a,((a,a),(a,a))) generated by the above grammar ,using predictive parsing table ,what is the maximum number of data item in stack at an instant________?
8
LL(1) parser cannot accept nondeterministic grammar at we have only single lookahead and there can be no predictable parsing in this case. Suppose we have LL(n) and we are given that maximum length of non-determinism in a production is n - 1. Can we use this grammar for LL(n) predictive parsing?
1 vote
9
I still think B) is ans, is it not?
10
S-> AB|d A->aA|b B->bB|c Is the above grammar both LL(1) and LR(0)?
11
Which of the following is LL(1) conflict? a)FIRST/FIRST conflict b)FIRST/FOLLOW conflict c) both d)none
12
Consider the grammar with the following productions. S→aaB/aaC B→b C→c Which of the following option is true ? (A) The grammar is LL(3) (B) The grammar is LL(1) (C) The grammar is LL(2) (D) It can’t be LL(k) grammar for any k, as it contains left factoring.
13
How to determine whether a grammar is LL(K) or LR(0) or SLR(1)?
14
15
Why isn't it LL(1) ?
16
17
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) OR LALR(1)
18
Can LL(k) and LR(k) gammer has null and unit productions?
19
lets consider a grammar as: $A\rightarrow Ab | Ac | a$ while checking whether it belongs to LL(1) grammar, we would point out that it has a left recursion as well as left factoring. I was wondering that what would be the case if we had lookahead, k, ... we are looking beyond the common symbol, A to decide the production rule to be applied. any further insights about the same will be very helpful.
20
The LL(1) and LR(0) techniques, 1)are both having the same power. 2)both simulate the reverse of a leftmost derivation. 3)are incomparable. 4)both simulate the reverse of a rightmost derivation. I am unable to find the correct answer in given choices. What is the best choice among 4?
21
As I know that LL(1) and LALR(1) grammars are incomperable ,but if a grammar is LL(1) then, it may be LALR(1) if the following conditions hold. 1.A ε-free LL(1) grammar is also a SLR(1) grammar and thus LALR(1) too. 2. A LL(1) grammar with ... only the empty derivation may or may not be LALR(1). can anyone explain each point with example. and what is this "non-empty derivation/empty derivation"?
22
Every LL(1) grammer is LALR(1) TRUE OR FALSE Every LL(1) grammer is CLR(1) TRUE OR FALSE AS I think 2nd is True and 1st is False if I am wrong please let me correct.
1 vote
23
True or False , 1) Is every LL grammar have one to one correspondance with DCFL? Please explain with examples.
24
S -> (L) | a L -> L . S | S Question: Make necessary changes to make it suitable for LL(1) parsing and Construct FIRST and FOLLOW sets.
25
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 ... abS) = { a }, Follow(A) = { dollar Sign } . here also no common terminals. Is My understanding correct. Please correct me if iam wrong.
1 vote
26
ARE NUMBER OF SHIFT ENTRIES / ACTIONS IN PARSING TABLE OF SLR(1) AND LALR(1) SAME ALWAYS??
Consider a Grammar G as follows : $S\rightarrow W$ $W \rightarrow ZXY / XY$ $Y\rightarrow c/\epsilon$ $Z\rightarrow a/d$ $X\rightarrow Xb/\epsilon$ Draw the LL(1) parsing table for the given grammar ? NOTE :- The above grammar is NOT LL(1) .