0
NotesKhan


IT6612                                              COMPILER LABORATORY                                              L T P C
0 0  3 2
OBJECTIVES:
The student should be made to:
  • Be exposed to compiler writing tools.
  • Learn to implement the different Phases of compiler
  • Be familiar with control flow and data flow analysis
  • Learn simple optimization techniques

LIST OF EXPERIMENTS:
  1. Implementation of Symbol Table
  2. Develop a lexical analyzer to recognize a few patterns in C. (Ex. identifiers, constants, comments, operators etc.)
  3. Implementation of Lexical Analyzer using Lex Tool
  4. Generate YACC specification for a few syntactic categories.
  5. a) Program to recognize a valid arithmetic expression that usesoperator +, - , * and /. b) Program to recognize a valid variable which starts with a letterfollowed by any
number of letters or digits.
d)Implementation of Calculator using LEX and YACC
  1. Convert the BNF rules into Yacc form and write code to generate Abstract Syntax Tree.
  2. Implement type checking
  3. Implement control flow analysis and Data flow Analysis
  4. Implement any one storage allocation strategies(Heap,Stack,Static)
  5. Construction of DAG
  6. Implement the back end of the compiler which takes the three address code and produces the
8086 assembly language instructions that can be assembled and run using a 8086 assembler. The target assembly instructions can be simple move, add, sub, jump. Also simple addressing modes are used.
  1. Implementation of Simple Code Optimization Techniques (Constant Folding., etc.)



OUTCOMES:
At the end of the course, the student should be able to
  • Implement the different Phases of compiler using tools
  • Analyze the control flow and data flow of a typical program
  • Optimize a given program

TOTAL: 45 PERIODS

  • Generate an assembly language program equivalent to a source language program


LIST OF EQUIPMENT  FOR A BATCH OF 30 STUDENTS:
Standalone desktops with C / C++ compiler and Compiler writing tools      30 Nos. (or)
Server with C / C++ compiler and Compiler writing tools supporting 30 terminals or more.

LEX and YACC

Post a Comment Blogger

 
Top