Scroll Effect

COMPILER ENGINEERING LAB

COMPILER ENGINEERING LAB

 

Course Objective:

 

This course will help the learner to design context-free grammar, construct regular expressions and implement several phases in compilation process like scanning, parsing, Adhoc syntax directed translation, code generation, code optimization using Lex & YACC tools.

 

 

  1. Construct an NFA for the given regular expression using Thomson’s algorithm.
  2. Convert the NFA into a DFA using subset construction algorithm.
  3. Minimize the DFA using Hopcroft’s algorithm.
  4. Develop a scanner using LEX for recognizing the token types in a given C program.
  5. Implement a bottom up parser LR(1) bottom up parsing to decide whether the input string is valid or not. (Context- Free Grammar, Action and GOTO tables are supplied as inputs)
  6. Develop a parser for all branching statements using LEX & YACC. (inputs in ‘c’ language)
  7. Develop a parser for all loop statements using LEX & YACC. (inputs in ‘c’ language)
  8. Develop a parser for complex expressions with procedure calls and array references using LEX & YACC. (inputs in ‘c’ language)
  9. Implement adhoc syntax directed translation for evaluating a compound expression with arithmetic, logical and relational operators.
  10. Use LEX and YACC to create two translators that would translate a given input (compound expression used in experiment 8) into three-address and postfix intermediate codes. The output of the translators should be files.
  11. Write an optimizer pass that does common-sub expression elimination on the intermediate code.
  12. Write a back end that traverses the three address intermediate code and generates x86 code.

 

COURSE LEARNING OUTCOMES

 

Upon successful completion of this course, the learner will be able to

  • Demonstrate modules of scanner and parser
  • Illustrate scanners and parsers using Lex and YACC tools
  • Illustrate intermediate code generations
  • Demonstrate common sub expression elimination as part of code optimization
  • Illustrate the generation of x86 target code by implementing ad-hoc syntax directed translation

 

Contact

SASTRA DEEMED UNIVERSITY
Tirumalaisamudram
Thanjavur - 613401
Tamilnadu, India

+91 4362 264101 - 108
        304000 - 010
+91 4362 264120

admissions@sastra.edu

SOC BRANCHES

Visit