adplus-dvertising
frame-decoration

Question

An LALR(1) parser for a grammar can have shift-reduce (S-R) conflicts if and only if

a.

The SLR(1) parser for G has S-R conflicts

b.

The LR(1) parser for G has S-R conflicts

c.

The LR(0) parser for G has S-R conflicts

d.

The LALR(1) parser for G has reduce-reduce conflicts

Posted under Compiler Design

Answer: (b).The LR(1) parser for G has S-R conflicts

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. An LALR(1) parser for a grammar can have shift-reduce (S-R) conflicts if and only if

Similar Questions

Discover Related MCQs

Q. Which of the following statements are TRUE ?
I There exist parsing algorithms for some programming languages hose complex are less than θ(n 3 )

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 source language and intermediate code level

Q. What data structure in a complier is used for managing information about variables and their attributes?

Q. Which languages necessarily need heap allocation in the runtime environment?

Q. Given the language L-{ab, aa, baa}, which of the following strings are in LG?
1) abaabaaabaa

2) aaaabaaaa

3) baaaaabaaaab

4) baaaaabaa

Q. A simple two-pass assembler does which of the following in the first pass

Q. The lexical analyzer takes _________as input and produces a stream of _______as output.

Q. Task of the lexical analysis

Q. The output of lexical analyzer is a

Q. In a two pass assembler, adding literals to literal table and address resolution of local symbols are done using

Q. In Two pass assembler the object code generation is done during the

Q. Which of the following type of software should be used if you need to create, edit and print document?

Q. Output file of the Lex is _________ is the input file is Sam.

Q. Yacc is available as a command on the

Q. oading process can be divided into two programs. The first is binder the other is

Q. In Lex, a class is complemented by first placing

Q. Which of the following is not a feature of compiler?

Q. Predictive parsers can be

Q. An example of intermediate language is

Q. In a two pass assembler the object code generation is done during the

Q. A programming language is to be designed to run on a machine that does not have a big memory.