7CS9 COMPILER DESIGN LAB (Comp. Engg.)

Objectives: At the end of the semester, the students should have clearly understood and implemented the following:
1. Develop an in depth understanding of system programming concept. Lexical analysis, syntax analysis, semantics analysis, code optimization, code generation. Language specification and processing
2. Develop an Understanding of Scanning by using concept of Finite state automaton. Parse tree and syntax tree, Top down parsing (recursive decent parsing, LL (1) parser) Bottom up parsing (operator precedence parsing) .Managing symbol table, opcode table, literal table, pool table
3. Develop an Understanding of Intermediate code form: Three address code, Polish notation (Postfix strings)
4. Develop an Understanding of Allocation data structure. Heaps
5. Develop an Understanding about Language processor development tools: LEX, YACC. Language processing activities (Program generation and execution)
It is expected that each laboratory assignments to given to the students with an aim to In order to achieve the above objectives

Indicative List of exercises:
1. Write grammar for a fictitious language and create a lexical analyzer for the same.
2. Develop a lexical analyzer to recognize a few patterns in PASCAL and C (ex: identifiers, constants, comments, operators etc.)
3. Write a program to parse using Brute force technique of Top down parsing
4. Develop on LL (1) parser (Construct parse table also).
5. Develop an operator precedence parser (Construct parse table also)
6. Develop a recursive descent parser
7. Write a program for generating for various intermediate code forms
i) Three address code ii) Polish notation
8. Write a program to simulate Heap storage allocation strategy
9. Generate Lexical analyzer using LEX
10. Generate YACC specification for a few syntactic categories
11. Given any intermediate code form implement code optimization techniques