Compiler Design
2170701
Importanat Questions for GTU Exam
UNIT -1-INTRODUCTION TO COMPILERS
- Explain the phases of compiler? And how the following statement will be translated into every phase. Position := initial + rate * 60.
- (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 analysis?
- (i).Tell the various phases of the compiler and examine with programs segment(ii).Discuss in detail about symbol table.
- Describe the following expressions after each phases a:= b*c-d how various phases could be combined as pass in a compiler.
- (i).Explain in detail about the compiler construction tools. (ii).Explain in detail about the language processing system.
- (i).Describe the errors encountered in different phases of compiler. (ii).Explain the functions of Preprocessor.
- 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.
- Generalize the important terminologies used in programming language basics
- 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 | b A →Ac | Sd |ε
- Consider the following grammar S → AS|b A→SA|a. 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) |id. (ii). Prepare the following grammar is LL(1) but not SLR(1). S→AaAb | BbBa A→€ B→€
- (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
- (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.
- (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. (ii).Describe in detail about storage organization.
UNIT-7,8-CODE OPTIMIZATION AND CODE Generation
- (i).Generalize the process of optimization of basic blocks. Give an example. (ii). Generalize the concept of register allocation and assignment.
- Define a DAG. Construct a DAG and Discover the sequence of instructions for a+a*(b-c)+(b-c)*d.
- (i).Explain in detail about the various issues in code generation with examples. (ii).Explain the data flow analysis of structured programs.
- (i).Discuss the code generation phase with simple code generation algorithm. (ii).Discuss the various peephole optimization in detail
- Describe the common examples of function preserving transformations and loop optimization process?
- (i).Describe the efficient data flow algorithms in detail. (ii).Describe in detail about code improving transformations
No comments:
Post a Comment