DBATU · Third Year B.Tech Computer Engineering · NEP 2020
Compiler Design
26AF1245PC601 · Semester VI · 3 credits · Continuous assessment 20 + mid-semester 20 + end-semester 60
Unit 1: Introduction to Compiling
6 hoursAnalysis of the source program; the phases of a compiler and their grouping; compiler-construction tools; a simple one-pass compiler.
Examined in the 60-mark end-semester paper, and in the mid-semester exam if it is taught by then
- Language processors: compilers, interpreters, assemblers, linkers and loaders
- Phases of a compiler
- Front end, back end and passes
Unit 2: Lexical Analysis
6 hoursThe role of the lexical analyser; input buffering; specifying tokens; a language for lexical analysers; designing a lexical-analyser generator.
Examined in the 60-mark end-semester paper, and in the mid-semester exam if it is taught by then
- Role of the lexical analyser and input buffering
- Specifying and recognising tokens
- Lex and Flex
- Regular expressions to automata for lexers
Unit 3: Syntax Analysis
6 hoursThe role of the parser; context-free grammars; top-down and bottom-up parsing; operator-precedence and LR parsers; ambiguous grammars; parser generators.
Examined in the 60-mark end-semester paper, and in the mid-semester exam if it is taught by then
- Top-down parsing: recursive descent and LL(1)
- Bottom-up parsing and shift-reduce
- Operator-precedence parsing
- LR parsers: SLR, CLR and LALR
- Parser generators: YACC and Bison
Unit 4: Syntax-Directed Translation
6 hoursSyntax-directed definitions and syntax trees; S-attributed and inherited attributes; intermediate languages; translating declarations, assignments, Boolean expressions, case statements and procedure calls; backpatching.
Examined in the 60-mark end-semester paper, and in the mid-semester exam if it is taught by then
- Syntax-directed definitions and translation schemes
- S-attributed and L-attributed definitions
- Intermediate code: syntax trees, postfix and three-address code
- Translating to three-address code
- Backpatching
Unit 5: Code Generation
6 hoursCode-generator design and the target machine; run-time storage management; basic blocks, flow graphs and next-use information; register allocation; DAGs and generating code from them; dynamic-programming code generation.
Examined in the 60-mark end-semester paper, and in the mid-semester exam if it is taught by then
- Code generator design and the target machine
- Run-time storage organisation and activation records
- Basic blocks and flow graphs
- Register allocation and assignment
- DAG representation of basic blocks
Unit contents are summarised from the official DBATU syllabus . AiCanCode.org is not affiliated with Dr. Babasaheb Ambedkar Technological University (DBATU).