Descriptors: Representation of formal languages, lexical analysis, syntactic analysis, semantic analysis, code generation, error recovery, code optimization
UNIT I: Introduction
History of compilers and languages
Basics
Languages and grammars
Formal definitions of Grammar, Regular Expressions and Automata
Phases and structure of a compiler
Tombstone diagrams
TOPIC II: Lexical Analysis
Design of a Lexical Analyzer
Finite Automata Regular Languages ¿¿recognizers
Construction of a Finite Automaton. Examples
Automatic Lexical Analyzer Generator: LEX
Handling Lexical Errors
THEME III: Parsing
Introduction to Syntactic Analysis
Classification of methods of syntactic analysis
Descending Scan, Syntactic LL
LL obtaining table (1). Examples
Ascending Scan, Syntactic LR
Treatment of Ambiguous Grammars. Examples
Automatic Parser Generator: YACC
UNIT IV: Treatment of Syntactic Errors
Errors. Detection and Recovery Strategies. Examples
Recovery with different analyzers
Descent parser LL
Up operator precedence parser
Ascending LR Parser
UNIT V: Semantic Analysis
Attribute Grammars, Examples, Registration
Specifying a translator: Translation Directed by Syntax and Translation Schemes
Evaluation of grammars
Construction of Abstract Syntax Trees
UNIT VI: Verification of Types
Introduction
Type expressions
Type systems. Checking static and dynamic
Sample construction and verification of simple types
Equivalence of type expressions
Overloading and Object Orientation
UNIT VII: Intermediate Code Generation
Types of Intermediate Languages
Codes three directions. Alternatives
Intermediate code generation: statements, arithmetic expressions, arrays
Control Flow Statements
UNIT VIII: Machine Code Generation
Machine and target machine code
Options machine code
Instructions and addressing and cost
Simple code generation from intermediate language
Basic blocks and flow graphs
Register allocation
Translation of other instructions
UNIT IX: Table of Symbols and Execution Environment
Memory allocation
Static and dynamic allocation
Stack and heap management. Examples
Function calls
Activation records
Passing parameters
Operations and organization of the symbol table
UNIT X: Code Optimization
Code optimization concept
Local optimization of basic blocks
Function preserving transformations
Elimination of dead code
Loops optimizatio
Global analysis of the data stream
UNIT XI: Specific Aspects
Other language processor
interpreter
Preprocesadotes and macroprocesadores
Language desig
Data structures and contro
Aspects of compilation for specific types of language
Examples of compilers