adplus-dvertising
frame-decoration

Question

Which is the most powerful parser?

a.

SLR

b.

LALR

c.

Canonical LR

d.

Operator-precedence

Posted under Compiler Design

Answer: (c).Canonical LR

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which is the most powerful parser?

Similar Questions

Discover Related MCQs

Q. Lr parser are attractive because

Q. Consider the following two sets of LR (1) items of an LR (1) grammar.
X -> c.X, c/d

X -> .cX, c/d

X -> .d, c/d

X -> c.X, $

X -> .cX, $

X -> .d, $

Which one is false?

1. Cannot be merged since look ahead’s are different.

2. Can be merged but will result in S-R conflict.

3. Can be merged but will result in R-R conflict.

4. Cannot be merged since goto on c will lead to two different sets.

Q. Consider the following grammar G.
S → F ⎪ H

F → p ⎪ c

H → d ⎪ c

Which one is true?

S1: All strings generated by G can be parsed with help of LL (1).

S2: All strings generated by G can be parsed with help of LR (1).

Q. Match the following:
List-I List-II

A. Lexical analysis 1. Graph colouring

B. Parsing 2. DFA minimization

C. Register allocation 3. Post-order traversal

D. Expression evaluation 4. Production tree

A B C D

Q. lanation: e.g. input is 3*4-5 rFirst ‘- ‘ is be evaluated then ‘ *’.5. Which one of the following is true at any valid state in shift-reduce parsing?

Q. Given the following expression grammar:
E -> E * F | F + E | F

F -> F - F | id

Which of the following is true?

Q. S → C C
C → c C | d

The grammar is

Q. Which grammar rules violate the requirements of an operator grammar ?
1.P → Q R

2.P → Q s R

3.P → ε

4.P → Q t R r

Q. Consider the grammar defined by the following production rules
S --> T * P

T --> U | T * U

P --> Q + P | Q

Q --> Id

U --> Id

Which one of the following is TRUE?

Q. Consider the following two statements:
P: Every regular grammar is LL(1)

Q:Regular is LR(1) grammar

Which of the following is TRUE?

Q. Find the TRUE statement?
I. There exist parsing algorithms for some programming languages which has O (3) complexities

II. A programming language which allows recursion can be implemented with static storage allocation.

III.No L-attributed definition can be evaluated in The framework of bottom-up parsing.

IV. Code improving transformations can be performed at both intermediate code level and source Language.

Q. Consider the grammar with the following translation rules and E as the start symbol.
A -> A1 #B {A.value = A1.value * B.value}

| B {A.value = B.value}

B-> B1 & F {B.value = B1.value + C.value}

| C {B.value= C.value }

C -> num {C.value = num.value}

Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 &4.

Q. A Push Down Automata is if there is at most one transition applicable to each configuration

Q. In Right-Linear grammars, all productions have the form: A → xB.