Subject Code Subject Name L T P C
R20CSE-PC3205 Compiler Design Lab 0 0 3 1.5
Course Objectives:
Course is designed to:
Teach the design and development of lexical analyzer
Teach the design and development of parser
Describe the concept of lex tool.
Explain code optimization techniques.
Course outcomes:
1. Acquire knowledge on designing lexical analyzer.
2. Acquire knowledge on designing parsers.
3. Implement lex program using LEX tool.
4. Understand the techniques of loop unrolling and constant propagation.
Lab Programs
1. Design a lexical analyzer for given language
2. Simulate First and Follow of a Grammar.
3. Develop an operator precedence parser for a given language.
4. Construct a recursive descent parser for an expression.
5. Construct a LL (1) parser for an expression
6. Design predictive parser for the given language
7. Implementation of shift reduce parsing algorithm.
8. Design a LALR bottom up parser for the given language.
9. Implement the lexical analyzer using lex tools.
10. Write a program to perform loop unrolling.
11. Write a program for constant propagation.
References:
1. Leland L. Beck,System Software – An Introduction to Systems Programming ,3rd
Edition, Pearson Education Asia, 2008.
2. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Compilers Principles,
Techniques and Tools, Second Edition, Pearson.
3. B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall
4. 4.https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.genpro
gc/ie_prog_4lex_yacc.htm
Lendi Institute of Engineering & Technology Page 59