25-4-22 2S5 WS21-22

25-4-22 2S5 WS21-22

University

10 Qs

quiz-placeholder

Similar activities

compiler design quiz

compiler design quiz

University

15 Qs

Compiler Parsing Techniques

Compiler Parsing Techniques

University

10 Qs

WINTER 24-25 CD

WINTER 24-25 CD

University

10 Qs

Lexical and Syntax Analysis

Lexical and Syntax Analysis

University

11 Qs

Parser - unit 2 and 3

Parser - unit 2 and 3

University

15 Qs

CD

CD

University

15 Qs

TECHIE BLAZERS

TECHIE BLAZERS

University

10 Qs

321 - Quiz07

321 - Quiz07

University

10 Qs

25-4-22 2S5 WS21-22

25-4-22 2S5 WS21-22

Assessment

Quiz

Computers

University

Hard

Created by

P S RAMESH

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is false?

Left as well as right most derivations can be in Unambiguous grammar

An LL (1) parser is a top-down parser

LALR is more powerful than SLR

Ambiguous grammar can’t be LR (k)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following expression grammar:

E -> E * F | F+E | F

F -> F-F | id

which of the following is true?

* has higher precedence than +

– has higher precedence than *

+ and — have same precedence

+ has higher precedence than *

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?

Removing left recursion only

Factoring the grammar alone

Factoring & left recursion removal

None of the mentioned

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states.

n1 is necessarily less than n2

n1 is necessarily equal to n2

n1 is necessarily greater than n2

none of the mentioned

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following describes a handle (as applicable to LR-parsing) appropriately?

Position where next reduce or shift operation will occur

The next step has use of Non-terminal for reduction

Used for reduction in a coming-up step along with a position in the sentential form where the next shift or reduce operation will occur

Used in the next step for reduction along with a position in the sentential form where the right hand side of the production may be found

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is a top-down parser?

Recursive descent parser

Operator precedence parser

An LR(k) parser

An LALR(k) parser

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The grammar A → AA | (A) | e is not suitable for predictive-parsing because the grammar is?

Ambiguous

Left recursive

Right recursive

An operator grammar

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?