CS1352 – PRINCIPLES OF COMPILER DESIGN
UNIT I
INTRODUCTION TO COMPILING
Compilers − Analysis of the source program − Phases of a compiler − Cousins of the compiler − Grouping of phases − Compiler construction tools − Lexical analysis − Role of lexical analyzer − Input buffering − Specification of tokens.
UNIT II
SYNTAX ANALYSIS
Role of the parser − Writing grammars − Context-Free Grammars − Top down parsing − Recursive descent parsing − Predictive parsing − Bottom-Up Parsing − Shift Reduce Parsing − Operator Precedence Parsing − LR Parsers − SLR Parser − Canonical LR Parser − LALR Parser.
UNIT III
INTERMEDIATE CODE GENERATION
Intermediate languages − Declarations − Assignment statements − Boolean expressions − Case statements − Back patching − Procedure calls.
UNIT IV
CODE GENERATION
Issues in the design of code generation − The target machine − Runtime storage management − Basic blocks and flow graphs − Next-Use Information − A Simple code generator − DAG representation of basic blocks − Peephole optimization.
UNIT V
CODE OPTIMIZATION AND RUN TIME ENVIRONMENTS
Basics − Principal sources of optimization − Optimization of basic blocks − Introduction to global data flow analysis − Runtime environments − Source language issues − Storage organization − Storage allocation
strategies − Access to Non-Local Names − Parameter passing.
No comments:
Post a Comment