S’→S
S→ aL | b
L→ Lb | S
Let I0 = CLOSURE({[S’→.S]}). The number of items in the set GOTO(I0,a) is :_______
S->pSA| r
A->q
The number of reduction steps taken by a bottom-up parser while accepting the string ppprqqq is _______.
I. Canonical LR is more powerful than LL parser.
II. Every SLR(1) grammar is also an LALR(1) grammar.
III. Every LL(1) grammar is also an LALR(1) grammar.
Set 1:
A -> a.A, a/b
A -> .aA, a/b
A -> .b, a/b
Set 2:
A -> a.A, $
A -> .aA, $
A -> .b, $
Consider the following statements related to merging of the two sets in the corresponding LALR parser.
I. Cannot be merged since look aheads are different.
II. Can be merged but will result in S-R conflict.
III. Can be merged but will result in R-R conflict.
IV. Cannot be merged since goto on “a” will lead to two different sets.
Which of the following statement/ statements is/ are false?
A→pA | Apq | q
Select the correct option.
S1: If a grammar has null production then it cannot be LR(0) grammar.
S2: If a grammar generates a finite language then it must be unambiguous.
Select the correct option:
S1: Every CLR(1) grammar is unambiguous.
S2: Every unambiguous grammar is CLR(1)
Select the correct statement:
S1: Every regular language must have an LR(0) grammar.
S2: The language L = {a^mb^n| m,n >0 & m ≠n} must have an LR(0) grammar.
Select the correct option.
S1: If a context free grammar is unambiguous then the language generated by this grammar must be DCFL.
S2: Every CFG corresponding to a DCFL must be unambiguous.
Select the correct option.
G1: S → S+S | id
G2: S → SS+ | id
Select the correct option:
S→ Aw | xAy | zy | xzw
A→z
Select the correct option.
S→ Aw | xAy | By | xBw
A→z
B→z
Select the correct option.
E’→E
E→E+T | T
T→T*F | F
F→(E) | id
If I is the set of one item {[ E’→.E]}, then number of items (including I) in CLOSURE(I) are ________
S’→S
S→SPQ | a | b
P→QP | c | ϵ
Q→PS | d
If I is the set of one item {[ S’→.S]}, then select the correct item set representing CLOSURE(I) from options.