Chapter Wise Questions Subject: Compiler Design: Common Short Answer Questions (CD &FLAT)

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Chapter wise questions

Subject : Compiler Design

Common Short answer questions(CD &FLAT)

1) Explain briefly about Regular Expression (AU 2011)


2) Write the definition of grammar (AU 2011)
3) Define ambigous grammar (AU 2011,12,4-5 admitted)
4) What is a transition Diagram
5) What is FSM? Explain with its model (AU 2012)
6) What is a Context Free Grammar (AU 2013)
7) Define Context Sensitivity (AU 2013)

Common Essay type questions(CD & FLAT)

1) Explain the equivalence of NFA`s and DFA`s and write the proof
(AU2011,,12,(AU 2011,4-5 admitted))
.2) Define Regular set and Regular grammar . Give examples for Regular grammar
3) Differentiate DFA & NFA with example
4) Write about Chomsky Hierarchy of Grammars
5) Discuss different types of grammars (AU 2011)
6) Explain about Finite Automata (AU 2011)
7) What is a grammar ? Explain different types of grammar and theier associated machines with an
example (AU 2011,12,4-5 admitted)
8) Construct the minimized DFA for the Regular Expression (0+1)*( 0+1)10 (AU 2013)

UNIT1
Short answer questions

1) Write about interpreter Vs compiler (AU 2011)


2) What is a preprocessor (AU 2011,4-5 admitted)
3) List any two basic functions of language translator (AU 2011,4-5 admitted)
4) Differentiate between pass and phase of compiler (AU 2010,12)
5) What is Boot strapping (AU 2012)
6) What are the impacts of compilers (AU 2013)
7) Define syntax and semantic analysis (AU 2013)

Essay type questions

1) Discuss importance of various phases of a compiler and functioning of each phase


(AU2011,13)
2) What are the issues to be considered while designing a compiler (AU 2012)
UNIT1
Short answer questions
1) what is a Lexical Analyzer
2) What is LEX
3) Define Lexeme, token and pattern
4) What is a buffer pair (AU 2013)

Essay type questions

1). Briefly explain three parts of LEX specification program


2) Design transition diagrams used for recognizing keywords, identifiers,
numbers and relational operators
3) Discuss the design of Lexical Analyzer (AU2011)
5) a) Develop a Lexical Analyzer to recognize a few patterns in Pascal(Ex: Identifiers,constants
and operators) (AU 2011,4-5 admitted)
b)Explain why seperate lexical and syntax analysis in a compiler (AU 2011,4-5 admitted)
5) Design a Lexical Analyzer for recognizing some C keywords(int,switch,while,for and char)
6) Explain about the compiler construction tools in detail (AU 2013)

UNIT2&3
Short answer questions

1) Explain briefly about predictive parser (AU 2011)


2) What do you mean by shift reduce technique (AU 2011,12,4-5 admitted)
3) Define Handle (AU 2010)
4) Define Handle Pruning (AU 2013)
5) Write a note on error recovery strategies (AU 2013)

Essay type questions

1) Explain the construction of Recursive Descent parser with an example?


2) consider the grammar
E T E'
E' + T E' | ε
T F T'
T' * F T' | ε
F ( E ) | id
a) Find the FIRST and FOLLOW functions for the above grammar
b) Construct Parsing table and parse the input string id+id.
3) a) Construct predictive parser parsing table for the grammar
E E+T/T
T T *F/F
F (E)/id
State whether the above grammar is LL(1) or not
b) Explain about operator precedence parsing. ( AU 2011, 12, 4-5 admitted)

4) a) Explain the function of shift reduce parser (AU 2011)


b)Discuss design of SLR parser (AU 2011)

5) a) Explain about operator precedence parsing. (AU 2011,12,4-5 admitted)


b) Write an algorithm for constructing SLR parsing table.

6). Consider grammar for arithmetic expressions

E E+T|T
T T*F|F
F ( E ) | id

Construct set of LR(0) items and SLR parsing table for the above grammar.(AU 2011,4-5 admitted)

7) consider the grammar


S' S
S CC
C aC | d
a) Construct LR(1) set of items for the above grammar
b) Construct LALR Parsing table and parse the input string aadd.

You might also like