Syllabus
Unit I
Finite Automata (FA): Introduction, Deterministic Finite Automata (DFA) -Formal definition, simpler notations (state
transition diagram, transition table), the language of a DFA. Nondeterministic Finite Automata (NFA)- Definition of the FA, language of an NFA, Equivalence of Deterministic and Nondeterministic Finite Automata, Applications of Finite Automata, Minimization of Deterministic Finite Automata.
Unit II
Regular Expressions (RE): Introduction, Identities of Regular Expressions, Finite Automata and Regular Expressions- Converting from DFA’s to Regular Expressions, Converting Regular Expressions to Automata, Context Free Grammar (CFG): Derivation Trees, Sentential Forms, Rightmost and Leftmost derivations of Strings.
Unit III
Introduction To Compilers: Definition of compiler, interpreter and its differences, the phases of a compiler, role of lexical analyzer, regular expressions, finite automata, from regular expressions to finite automata. Parsing: Parsing, the role the of parser, context free grammar, derivations, parse trees, elimination of left recursion, left factoring, predictive parsers, LL(1) grammars. Bottom Up Parsing: Definition of bottom-up parsing, LR grammars, LR parsers-simple LR, canonical LR(CLR) and Look Ahead LR (LALR) parsers, error recovery in parsing, parsing ambiguous grammars.
Unit IV
Syntax Directed Translation: Syntax directed definition, construction of syntax trees, S-attributed and L-attributed definitions, translation schemes. Intermediate Code Generation: intermediate forms of source programs– abstract syntax tree, polish notation and three address code, Type Checking: Definition of type checking, type expressions, type systems.
Unit V
Code Optimization: Organization of code optimizer, basic blocks and flow graphs, optimization of basic blocks, the principal sources of optimization, the directed acyclic graph (DAG) representation of basic block, and global data flow analysis. Code Generation: Machine dependent code generation, object code forms, the target machine, a simple code generator, register allocation and assignment, peephole optimization.