138x Filetype PDF File size 1.19 MB Source: hbtu.ac.in
COMPILER DESIGN (ECS-306) Teacher Name: Ms. Ankita Gautam Course Structure Sr. Course Course Name Credits Details of Sessional ESM Total No. Code Marks Marks CT TA Lab Total 1. ICS-603 Compiler 4 (3-1- 30 20 - 50 50 100 Design 0) Prerequisite: Theory of Automata and Formal Languages (ECS-305) Course Content: Unit-1: Introduction to Compiler, Phases and passes, Bootstrapping, Finite automata & regular expressions and their applications to lexical analysis, Implementation of lexical analyzers, lexical-analyzer generator, LEX-compiler, The syntactic specification of Programming languages: Context free grammars, derivation and parse trees, capabilities of CFG, Application of grammars in syntax analysis, ambiguity and BNF notation, YACC. Unit-2: Basic Parsing Techniques: Parsers, top down parsing, Shift reduces parsing, operator precedence parsing, predictive parsers. Automatic Construction of efficient Parsers: LR parsers, the canonical Collection of LR(0) items, constructing SLR parsing tables, constructing Canonical LR parsing tables, Constructing LALR parsing tables, using ambiguous grammars, an automatic parser generator, implementation of LR parsing tables, constructing LALR sets of items. Unit-3: Syntax-directed Translation: Syntax-directed Translation schemes, Implementation of Syntax directed Translators, Intermediate code, postfix notation, Parse trees & syntax trees, three address code, quadruple & triples, translation of assignment statements, Boolean expressions, statements that alter the flow of control, postfix translation, translation with a top down parser. More about translation: Array references in arithmetic expressions, procedures call, declarations, Case statements. Unit-4: Symbol Tables: Data structure and representing scope information, Run-Time Administration: Implementation of simple stack allocation scheme, storage allocation in block structured language. Error Detection & Recovery: Lexical Phase errors, syntactic phase errors semantic errors. Unit-5: Introduction to code optimization: Loop optimization, the DAG representation of basic blocks, value numbers and algebraic laws, Global Data-Flow analysis. Text and References Books: 1. Aho, Sethi & Ullman, "Compiler Design", Addition Wesley. 2. Kenneth C. Louden, “Compiler Construction: Principles and Practice”, Thomson Brooks Publication. 3. Allen I. Holub, “Compiler Design in C”, PHI Publications. Course Outcomes: 1. Describe the role of each phase of a compiler with its construction tools. (Understand) 2. Develop a Lexical Analyzer for recognizing tokens of a given language with an understanding of symbol table management and error handling. (Apply) 3. Construct top-down, bottom-up, operator precedence and SLR parsers with an understanding of Context Free Grammars and syntax analysis. (Apply) 4. Design and develop semantic analyzers for type-checking and intermediate code generators to translate the source program into an intermediate code. (Apply) 5. Construct code optimizers to optimize the target code generated. (Apply) Lesson Plan LECTURE PLAN COMPILER DESIGN (ICS-603) Lecture Unit/Topic/Subtopic Teaching Learning Remarks No. UNIT 1: Method(s) Material if any 1. Introduction to Compiler, Phases and Chalk and Books passes, Bootstrapping Board and Notes 2. Finite automata and regular Chalk and Books expressions and their applications to Board and Notes lexical analysis, 3. Implementation of lexical analyzers, Chalk and Books lexical-analyzer generator, LEX Board and Notes compiler. 4. The syntactic specification of Chalk and Books Programming languages: Context free Board and Notes grammars, 5. derivation and parse trees, capabilities of Chalk and Books CFG. Board and Notes 6. Application of grammars in syntax Chalk and Books analysis, Board and Notes 7. ambiguity and BNF notation, YACC. Chalk and Books UNIT – 2 Board and Notes 8. Basic Parsing Techniques: Parsers, top Chalk and Books down parsing. Board and Notes 9. Shift reduces parsing Chalk and Books Board and Notes 10. operator precedence parsing Chalk and Books Board and Notes 11. predictive parsers. Chalk and Books Board and Notes 12. Automatic Construction of efficient Chalk and Books Parsers: LR parsers, Board and Notes 13. the canonical Collection of LR(0) items Chalk and Books Board and Notes 14. the canonical Collection of LR(0) items Chalk and Books Board and Notes 15. constructing SLR parsing tables, Chalk and Books Board and Notes 16. constructing SLR parsing tables, Chalk and Books Board and Notes 17. constructing Canonical LR parsing Chalk and Books tables, Board and Notes 18. constructing Canonical LR parsing Chalk and Books tables, Board and Notes 19. Constructing LALR parsing tables, Chalk and Books using ambiguous grammars, Board and Notes 20. Constructing LALR parsing tables, Chalk and Books using ambiguous grammars, Board and Notes 21. An automatic parser generator, Chalk and Books implementation of LR parsing tables, Board and Notes 22. constructing LALR sets of items. Chalk and Books Board and Notes UNIT- 3 23. Syntax-directed Translation schemes, Ppt Books Implementation of Syntax directed and Notes Translators, 24. Intermediate code, postfix notation, Ppt Books and Notes 25. Parse trees & syntax trees, Ppt Books and Notes 26. Three address code, quadruple & Ppt Books triples, and Notes 27. Translation of assignment statements, Ppt Books Boolean expressions, statements that and Notes alter the flow of control, 28. Postfix translation, translation with a top Ppt Books down parser postfix translation and Notes 29. translation with a top down parser Ppt Books and Notes 30. More about translation: Array Ppt Books references in arithmetic expressions, and Notes 31. Procedures call, declarations, case Ppt Books statements. UNIT-4 : and Notes 32. Symbol Tables: Data structure and Ppt Books representing scope information. and Notes 33. Run-Time Administration: Ppt Books Implementation of simple stack and Notes allocation scheme 34. storage allocation in block structured Ppt Books language and Notes 35. Error Detection & Recovery: Lexical Ppt Books Phase errors, and Notes 36. Syntactic phase errors semantic errors. Ppt Books UNIT-5 : and Notes 37. Introduction to code optimization. Ppt Books and Notes 38. Loop optimization Ppt Books and Notes 39. The DAG representation of basic Ppt Books blocks and Notes 40. Value numbers and algebraic laws, Ppt Books Global Data-Flow analysis. and Notes
no reviews yet
Please Login to review.