|Course Code||CS 302|
|Course Name||Introduction to Compilation Techniques|
|Reference||1. Alfred V. Aho, Monica S. Lam, Ravi Sethi and Jeffrey D. Ullman: Compiler Design: Principles, Techniques, and Tools, 2/E, Addison Prentice-Hall, 2006.
2. Andrew Appel, M Ginsburg, Modern Compiler Implementation in C/ML/Java, Cambridge University Press, 2004
|Description||The main objective of this course is to introduce the students to compilers. They will get to learn how a higher level programming language is transformed into machine code which a computer executes. This is an introductory level course for half-a-semester. 1. Compiler structure: analysis-synthesis model of compilation, various phases of a compiler, tool based approach to compiler construction.
2. Lexical analysis: interface with input, parser and symbol table, token, lexeme and patterns. Difficulties in lexical analysis. Error reporting. Implementation. Regular definition, Transition diagrams.
3. Syntax analysis: CFGs, ambiguity, associativity, precedence, top down parsing, recursive descent parsing, transformation on the grammars, predictive parsing, bottom up parsing, LR parsers (SLR, LALR, LR).
4. Syntax directed definitions: inherited and synthesized attributes, dependency graph, evaluation order, bottom up and top down evaluation of attributes, L- and S-attributed definitions.