Skip to Main Content

Compiler Construction: Course content

In computing, a compiler is a computer program that transforms source code written in a programming language or computer language (the source language), into another computer language (the target language, often having a binary form known as object code o

Course outline

Course outline

Introduction of Compiler and brief history

Phases of Compiler, Cousins of compiler

Lexical Analyzer,Overview and Role of Lexical Analyzer, Tokens, Lexemes

Patterns, Specification of tokens, recognition of tokens

Finite automata, NFA, DFA, Conversion from a regular expression to an NFA

NFA problems, NFA & DFA Comparison, Design of a Lexical Analyzer.

Symbol Table Manager, overview, Symbol Table organization, Classification of symbol table

Symbol table operations, working, implementation.

Syntax Analyzer,Role of Parser, Context Free grammars, writing a grammar

Types of Parsing, Top down parsing, Bottom up parsing

Backtracking, Recursive Descent parsing, problems with RD parsing, Predictive parsing

Transition diagrams for predictive parsers, Non Recursive Predictive Parsing

Practical Examples and Parser Generators

JFLex and Yacc case studies

Semantic AnalysisOverview of Type Checking, specification of a simple type checker

Equivalence of type expressions

Type conversions, type rules, type constructors

A simple type checker generator

Case studies of type checker

Intermediate Code Generator, Intermediate languages, declarations

Three address code instructions and their representations

Directed Acyclic Graphs, Value Number representation of Directed acyclic graphs

Intermediate Code Generator examples

Code Optimization, Overview, the principal of sources of optimization

Optimization of basic blocks, loops, code improvement transformations.

Role of a code generator, Issues in the design of a code generator

Runtime storage management, simple code generator.

Detection of syntax errors by compilers and their recovery mechanism

Overview of principles of programming languages. Criteria for selecting programming languages

Representing concurrency, and analyzing concurrent designs

Demos of semester projects

Course Objectives

To teach students the basic concepts of compilers, their components and how they work together

To get lexical analyzer and syntax analyzer implemented of any programming language

 

Structure of Compiler Construction, Components their Inputs & Outputs, Lexical Analyzer, Syntax Analyzer, Semantic Analyzer, Parse Tree, Abstract Syntax Tree, Regular Expressions, Context Free Grammars, Attribute Grammars, Intermediate Code Representations, three-address code, Directed Acyclic Graphs, Runtime Environments, Symbol Table, Storage Management, Code Generator, Intermediate Code Optimizer, Target Code Optimizer

Relevant Boks