CS 406 Compiler Construction
Course Structure: Lectures: 3 Labs: 0 Credit Hours: 3
Prerequisites: None
Course Outline
Symbol, String Alphabet, String, Language, Translators, T diagrams, Classes of Translators.
Introduction to Compiler Compiler, Input for compiler, Compiler Output, Types of Compilation, Compiler Related Programs. Compiler Structure Lexical Analyzer, Syntax Analyzer, Semantic Analyzer, Symbol Tables, Error Handlers, Intermediate Code Generator, Code Optimizer, Code Generator.
Types of Compiler One pass and Multi pass Compilers, Front end - Back end approach in compiler, Cross compilers, Error handling techniques in Compilers. Lexical Analyzer Role of lexical Analyzer, Input Buffering, Specification of Tokens, Recognition of Tokens, Regular Grammar, Regular Expression, Finite Automata (Deterministic Finite Automata, Nondeterministic State Automata, Nondeterministic Finite Automata with -Transitions), Equivalence of Regular Grammars and Finite Automata, Equivalence of Regular Expressions and Finite State Automata, Programming of Lexical Analyzer.Syntax Analyzer Role of Syntax Analyzer, Grammar, Classification of Grammars, Push Down Automata, Equivalence of Context Free Grammar and Push Down Automata, Ambiguity, Parsing Tree, Recursive Grammar, Common Factoring, Backus Naur Form, Extended Backus Naur Form, Top Down Parsing, General Top Down Parsing Strategies, Top Down Parsing, Overview of Bottom Up Parsing.
Symbol Table Handling Techniques Perspective and Motivation, Symbol Table Contents, Operation on Symbols Tables, Symbol Table for Non-Block Structured Languages, Symbol Table for Block Structured Languages. Semantic Analyzer Role of Semantic Analyzer, Static Semantic checking, Dynamic Semantic checking. Intermediate Code Generator Role of Intermediate Code Generator, Polish Notation, N-tuple Notation, Abstract Syntax Trees, Threaded Code, Abstract Machine Code. Code Optimization Role of Code Optimization, Code Optimization Techniques: (Local Optimization, Loop Optimization, Global Optimization. Code Generation Abstract and Real Machines, Classification of Architectures, Program Representations, Code Generation, Integrated Methods, Register Allocation by Graph Colouring, Instruction Scheduling.
Text/Reference/Recommended Books: