RTMNU · Final Year B.Tech Computer Engineering · CBCS
Compiler Design
BTCME703.1T · Elective V · Semester VII · 3 credits · College 30 + university 70
One of the Elective V options.
Unit 1: Introduction and Lexical Analysis
7 hoursThe phases of compilation; lexical analysis (the scanner), regular languages, and the lex and flex tools.
Examined in the 70-mark end-semester paper
- Phases of a compiler
- Role of the lexical analyser and input buffering
- Regular expressions to automata for lexers
- Lex and Flex
Unit 2: Syntax Analysis
7 hoursThe parser: pushdown automata, top-down and bottom-up parsing, ambiguity, and the yacc and bison parser generators.
Examined in the 70-mark end-semester paper
- Pushdown automata
- Top-down parsing: recursive descent and LL(1)
- Bottom-up parsing and shift-reduce
- LR parsers: SLR, CLR and LALR
- Ambiguous grammars
- Parser generators: YACC and Bison
Unit 3: Semantic Analysis, Symbol Table and Runtime Environment
8 hoursAttribute grammars, syntax-directed definitions, their evaluation and the flow of attributes in a syntax tree; the symbol table — structure, attributes and management; the runtime environment — procedure activation, parameter passing, value return and memory allocation.
Examined in the 70-mark end-semester paper
- Syntax-directed definitions and translation schemes
- S-attributed and L-attributed definitions
- Symbol tables: entries, implementation and scopes
- Run-time storage organisation and activation records
- Access to non-local names and parameter passing
- Storage allocation strategies
Unit 4: Intermediate Code Generation and Optimisation
7 hoursTranslating language features, intermediate forms; code improvement through control-flow and data-dependence analysis; local, global and peephole optimisation.
Examined in the 70-mark end-semester paper
- Intermediate code: syntax trees, postfix and three-address code
- Translating to three-address code
- Basic blocks and flow graphs
- Data-flow analysis
- Machine-independent optimisations
- Peephole optimisation
Unit 5: Architecture-dependent Code Improvement
7 hoursInstruction scheduling for pipelining, loop optimisation for cache memory, register allocation and target code generation.
Examined in the 70-mark end-semester paper
- Instruction scheduling for pipelines
- Loop optimisation: code motion, induction variables, unrolling and jamming
- Register allocation and assignment
- Code generator design and the target machine
Unit contents are summarised from the official RTMNU syllabus . AiCanCode.org is not affiliated with Rashtrasant Tukadoji Maharaj Nagpur University (RTMNU).