PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

LTPMC

3 1 0 100 4

9+3 Compilers, Analysis of the Source Program, The Phases of a Compiler, Cousins of the Compiler, The Grouping of Phases, Compiler-Construction Tools, Translators- Compilation and Interpretation, A simple one-p ass compiler UNIT II LEXICAL ANALYSIS 9+3 Need and role of lexical analyzer-Lexical errors, Input Buffering - Specification of Tokens, Recognition of Tokens, A Language for Specifying Lexical Analyzers, FiniteAutomata, From a Regular Expression to an NFA, Design of a Lexical AnalyzerGenerator UNIT III SYNTAX ANALYSIS 9+3 Need and role of the parser- Context Free Grammars-Top Down parsing – Recursive Descent Parser - Predictive Parser - LL(1) Parser -Shift Reduce Parser - LR Parser - LR(0) item - Construction of SLR Parsing table -Introduction to LALR Parser, YACCDesignof a syntax analyzer for a sample language UNIT IV SYNTAX DIRECTED TRANSLATION AND TYPE CHECKING 9+3 Syntax-Directed Definitions, Construction of Syntax Trees, Bottom-Up Evaluation of SAttributedDefinitions, L-Attributed Definitions, Top Down Translation, BottomUpEvaluation of Inherited Attributes, Forms of intermediate code -Translation of Assignment, Boolean Expression and Control statements - Back patching type systems- Specification of a simple type checker - equivalence of type expressions – typeconversions UNIT V RUN-TIME ENVIRONMENT AND ERROR HANDLING 9+3 Source language issues-Storage organization-Storage allocation-parameter passing-Symbol tables-Dynamic storage allocation-Storage allocation in FORTRAN, Errorhandling and recovery in different phases. Principal sources of Optimization – DAG -Optimization of basic blocks-Global data flow analysis Efficient data flow algorithms -Issues in design of a code generator-a simple code generator algorithm TOTAL : 60 TEXT BOOKS 1. Alfred V.Aho, Ravi Sethi and Jeffrey D.Ullman, "Compilers – Principles, Techniquesand Tools", second edition, Pearson Education, New Delhi, 2006. 2. Raghavan V, “Principles of Compiler Design”, Tata Mc-Graw Hill Education Pvt.Ltd., New Delhi, 2009

McGraw Hill. "Compiler Construction Principles and Practice". Construction of LR Parsing Table. "The Theory and Practice of Compiler Writing".REFERENCE BOOKS 1. second edition. 6. 9. Macmillan India Ltd. 2. 8. . Syntax Analysis using YACC 4. Ceriel J H Jacobs and Koen G Langendoen. Dhamdhere D M. Jean Paul Tremblay. 5. Paul G Serenson. New Delhi. COMPILER DESIGN LAB LTPC 0032 1. Lexical Analysis using LEX. 3. Implementation of Symbol Table. Implementation of Shift Reduce Parsing Algorithm. 7. John Wiley. “Modern Compiler Design”. Study of LEX and YACC 2. 2001. Construction of minimized DFA from a given regular expression. Henri E Bal. Dick Grone. Construction of NFA from a given regular expression. Implementation of Code Optimization techniques. New Delhi. New Delhi.. 2001. Generation of Code for a given Intermediate Code. 2000. 3. 10.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times