Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the general structure of an LR parser. Construct the LR(0) item sets for the grammar S -> AA, A -> aA | b.

lr-parsing
2long10 marks

What is syntax-directed translation? Explain syntax-directed definitions with an example of a translation scheme.

syntax-directed-translation
3long10 marks

Discuss the specification and recognition of tokens. Explain the role of finite automata and input buffering in lexical analysis.

lexical-analysis
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

What is three-address code? Write the three-address code for x = (a + b) * (c + d).

intermediate-code
5short5 marks

Explain peephole optimization with an example.

code-optimization
6short5 marks

Differentiate between synthesized and inherited attributes.

syntax-directed-translation
7short5 marks

What is bootstrapping in compiler construction?

bootstrapping
8short5 marks

Construct an NFA for the regular expression (a|b)*abb.

finite-automatalexical-analysis
9short5 marks

What is operator precedence parsing?

parsing
10short5 marks

Explain activation records and their role in run-time storage management.

runtime-environment
11short5 marks

What is a basic block and a flow graph?

code-optimization
12short5 marks

Differentiate between top-down and bottom-up parsing.

parsing