Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain semantic analysis and type checking. Discuss type expressions, type systems and type conversion.

semantic-analysistype-checking
2long10 marks

Explain the different phases of a compiler with a suitable diagram, showing the output of each phase for the statement position = initial + rate * 60.

phasescompiler
3long10 marks

Construct the LR(1) parsing table for the grammar S -> CC, C -> cC | d and parse the input string cdd.

lr-parsingparsing
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