Principles of Compiler Design
Technical Publications, Jan 1, 2009 - 595 pages
Translator issues, why to write compiler, compilation process in brief, front end and backend model, compiler construction tools. Interpreter and the related issues, Cross compiler, Incremental compiler, Boot strapping, byte code compilers
Review of lexical analysis : alphabet, token, lexical error, Block schematic of lexical analyser, Automatic construction of lexical analyser (LEX), LEX specification and features.
Role to parsers, Top down - RD parser, predictive parsers, LL (k) parsers, Bottom up parsers - Operator precedence parsers, shift-reduce : SLR, LR (k), LALR etc. using ambiguous grammars, Error detection and recovery, Automatic construction of parsers (YACC), YACC specifications.
Need of semantic analysis, type checking and type conversion.
Syntax Directed Translation
Syntax directed definitions, construction of syntax trees, bottom-up evaluation of S-attributed definitions, L-attributed definitions, Top-down translation, bottom-up evaluation of inherited attributes.
Intermediate Code Generation
Intermediate languages, declarations, assignment statements, iterative statements, case statements, arrays, structures, conditional statements, Boolean expressions, back patching, procedure calls, Intermediate code generation using YACC.
Run Time Storage Organisation
Source language issues, Storage organization and allocation strategies, for block structured and non block structured languages, Activation record, variable-length data, procedure parameters, nested procedures, access to non-local names, procedure call and return, static and dynamic scope, Symbol table organisation and management.
Issues in code generation, Target machine description, Basic blocks and flow graphs, next use information, Register allocation and assignment, Dag representation of basic blocks, Peephole optimisation, Generating code from a DAG, Dynamic programming, Code generator, generator concept.
Classification of optimisation, Principle Sources of optimisation, optimisation of basic blocks, Loops in flow graphs, Optimising transformations :compile time evaluation, Common sub-expression elimination, variable propagation, code movement, strength reduction, dead code elimination and loop optimisation, Local optimisation, DAG based local optimisation. Global optimisation : Control and data flow analysis, computing global data flow information : meet over paths, Data flow equations, Data flow analysis, Iterative data flow analysis : Available expressions, live range identification.
What people are saying - Write a review
Solved Exercise 268
Review Questions 2
Chapter2 Lexical Analysis 21 to 282
Chapter4 Semantic Analysis 4 1 to 4 14
Chapter 5 Syntax Directed Translation 5 1 to 5
Chapter 4 Semantic Analysis 41 to 414
Chapter6 Intermediate Code Generation 6 1 to 6
Chapter 8 Code Generation 8 1 to 8
Chapter9 Code Optimization 91 to 970
Other editions - View all
access link activation record algorithm allocation apply goto array basic block called char closure code optimization common sub expression computation construct context free grammar data flow digit e-closure E.place elimination entry evaluation example flow graph following grammar function given grammar goto I0 Hence identifier induction variables inherited attributes input buffer input string integer intermediate code L-attributed LALR LALR parser left recursion lexeme lexical analyzer lookahead loop LR parser machine code match node non-terminal obtained operand operator output parameters parse tree parsing table phases of compiler pointer printf procedure production rules Reduce regular expression semantic actions semantic analysis set of items Shift Solution source language source program statement subexpression symbol table syntax analysis syntax directed definition syntax tree synthesized attributes target code three address code tokens top-down parsing transition diagram translation scheme type expression YACC