We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Compiler Design
Important Questions for GTU Exam
UNIT -1-INTRODUCTION TO COMPILERS
1. Explain the phases of compiler? And how the following statement will be translated into
every phase. Position := initial + rate * 60.
2. (i).Discuss in detail about the role of Lexical and syntax analyzer with the possible error
recovery actions. (ii).Discuss in detail about role of lexical analy:
3. ({)-Tell the various phases of the compiler and examine with programs segment{il).Discuss in
detail about symbol table.
4. Describe the following expressions after each phases a:= b*c-d how various phases could be
combined as pass in a compiler.
5. (j).Explain in detail about the compiler construction tools. (ii).Explain in detail about the
language processing system.
6. (i).Describe the errors encountered in different phases of compiler. (ii).xplain the functions
of Preprocessor.
7. Define compiler? State various phases of complier and describe in detail
i) How to solve the source program to target machine code by using language processing
system. (ii), Write in detail about the cousins of the compiler.
9. Generalize the important terminologies used in programming language basics
10.i). Analyze the given expressions 4:*+=cba with different phases of the compiler(ii). Classify
the concepts of compiler and Interpreter.UNIT -2-LEXICAL ANALYSIS
Convert the following NFA into DFA. Describe the sequence of moves made by each in
processing the input string ababba
. (i).Discuss in detail about the role of Lexical analyzer with the possible error recovery
actions. (ii).What are the issues in lexical analysis?
. (i).Describe the Input buffering techniques in detail. (ii).Elaborate in detail the recognition of
tokens.
(i) Solve the following regular expression into minimized DFA. (a/b)*baa(ii).Comparison
between NFA and DFA.
(i).Define Lex and Lex specifications? How lexical analyzer is constructed using lex?(ii).Write
a lex program that recognizer the tokens.
. Solve the given regular expression (a/b)* abb (a/b)* into NFA using Thompson construction
and then to minimized DFA.
. Write an algorithm for constructing a DFA from a regular expression. Discuss with an
example.
How to converting a Regular Expression directly to a DFA. explain with one example.UNIT -3,4 -SYNTAX ANALYSIS
. Write the rule to eliminate left recursion in a grammar. Prepare and
Eliminate the left recursion for the grammar S > Aa | bA Ac | Sd |e
Consider the following grammar S > AS|b A->SAla. construct the SLR parse
table for the grammar. Show the actions of the parser for the input string
“abab”.
(i). What is an ambiguous and un ambiguous grammar? Create the following
grammar is ambiguous or not. E->E+E | E*E | (E) lid. (ii). Prepare the
following grammar is LL(1) but not SLR(1). S>AaAb | BbBa A>€ BE
4. (i).Define YACC parser generator? List out the Error recovery actions in YACC?
(ii). What are the Error recovery techniques used in Predictive parsing?
(i).What are the different kinds of syntax error phased by a program? (ii).List
out different error recovery strategies.expalin them.UNIT-5,6 -SYNTAX DIRECTED TRANSLATION & RUNTIME ENVIRONMENT
1. (i).Discuss in detail about the Syntax Directed Definitions. (ii).Discuss in detail about the
specification of simple type checker.
. (i).Evaluate the expressions for the SDD annotated parse tree for the following
expressions. a) 3* 5 +4n b) 3 *5.
(i). How to a design a calling sequences and analyze the principles of activation records
(ii). Construct the unification algorithm by apply the type checking concepts.
4, (i).Describe the concepts of Storage allocation in FORTAN. (ii). Describe in detail about
dynamic storage allocation.
. (i),Describe the source language issues in detail. (ji). Describe in detail about storage
organization.