0% found this document useful (0 votes)
20 views1 page

CD Important Questions For Mid 1

The document outlines important questions for a midterm exam in Compiler Design, covering topics such as compiler phases, input buffering, bootstrapping, LEX usage, regular expressions, finite automata, parsing roles, grammar types, derivations, and predictive parsing tables. Each question requires explanations, examples, and constructions related to the concepts of compiler design. The document serves as a study guide for students preparing for their midterm assessment.

Uploaded by

beastboy232472
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

CD Important Questions For Mid 1

The document outlines important questions for a midterm exam in Compiler Design, covering topics such as compiler phases, input buffering, bootstrapping, LEX usage, regular expressions, finite automata, parsing roles, grammar types, derivations, and predictive parsing tables. Each question requires explanations, examples, and constructions related to the concepts of compiler design. The document serves as a study guide for students preparing for their midterm assessment.

Uploaded by

beastboy232472
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

COMPILER DESIGN

IMPORTANT QUESTIONS FOR MID 1

1. a) Write about Phases of a compiler. Explain each with an example.

b) Explain about Input Buffering in lexical Analyzer with an example.

2.a)Explain the boot strapping process with suitable examples and diagrams.

b) What is LEX? Discuss the usage of LEX in Lexical Analyzer generation.

3. a) Write a Regular Expression for identifier, reserved words & relation operators. Design a
transition diagram for each of them.

b) Construct an FA equivalent to the regular expression (0+1)*(00+11)(0+1)*

4. a) Explain the role of parser. Explain types of grammars used for parsing.

b) Consider the following grammar

S → (L) |a L → L, S |S

Construct leftmost and Right most derivations and parse trees for the following sentences:

i. (a,(a,a)) ii. (a,((a,a),(a,a))).

5. a) Compute FIRST and FOLLOW for the grammar: S → S S + \ S S * \ a.

b) Construct the Predictive parsing table for the grammar G:

E → E+T |T, E →T*F |F, F → (E) |id.

You might also like