In bottom up parsing
The input is scanned from left to right and constructs a leftmost derivation in reverse.
The input is scanned from left to right and constructs a rightmost derivation in reverse.
The input is scanned from right to left and constructs a leftmost derivation in reverse.
The input is scanned from right to left and constructs a rightmost derivation in reverse.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the augmented grammar given below

S’→S

S→ aL | b

L→ Lb | S

Let I0 = CLOSURE({[S’→.S]}). The number of items in the set GOTO(I0,a) is :_______

5
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the following grammar.

S->pSA| r

A->q

The number of reduction steps taken by a bottom-up parser while accepting the string ppprqqq is _______.

7
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Which of the following statements about parser is/are CORRECT?

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.

Only III is correct
Only I is correct
Only I and II are correct
All I, II and III are correct
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following two sets of CLR(1) items of an CLR(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?

I only
II only
I and IV only
I,II,III and IV
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the given grammar G:

A→pA | Apq | q

Select the correct option.

Given grammar is SLR(1) but not LR(0).
Given grammar is LALR(1) but not SLR(1).
Given grammar is CLR(1) but not LALR(1).
None
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following statements

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:

Both S1 and S2 are correct.
Both S1 and S2 are wrong.
S1 is correct while S2 is wrong.
S1 is wrong while S2 is correct.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the given below statements.

S1: Every CLR(1) grammar is unambiguous.

S2: Every unambiguous grammar is CLR(1)

Select the correct statement:

Both S1 and S2 are correct.
Both S1 and S2 are wrong.
S1 is correct while S2 is wrong.
S1 is wrong while S2 is correct.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the given below statements.

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.

Both S1 and S2 are true.
S1 is correct and S2 is false.
S1 is false and S2 is true.
Both S1 and S2 are false.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following statements

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.

Both S1 and S2 are true.
S1 is true and S2 is false.
S1 is false and S2 is true.
Both S1 and S2 are false.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the given below grammars.

G1: S → S+S | id

G2: S → SS+ | id

Select the correct option:

G1 is LR(1) grammar and G2 is operator grammar.
G1 is operator grammar and G2 is LR(1) grammar.
Both G1 and G2 are LR(1) grammar.
Both G1 and G2 are operator grammar.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following grammar (small letters are terminal symbols and capital letters are non terminals)

S→ Aw | xAy | zy | xzw

A→z

Select the correct option.

Given grammar is SLR(1) but not LR(0).
Given grammar is LALR(1) but not SLR(1).
Given grammar is CLR(1) but not LALR(1).
None of these
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following grammar (small letters are terminal symbols and capital letters are non terminals)

S→ Aw | xAy | By | xBw

A→z

B→z

Select the correct option.

Given grammar is SLR(1) but not LR(0).
Given grammar is LALR(1) but not SLR(1).
Given grammar is CLR(1) but not LALR(1).
None
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider an augmented grammar

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 ________

7
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider an augmented grammar

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.

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66