Principle of Compiler
Construction
CDCSC14
PRACTICAL FILE
Submitted by:
Name: Yachna Saxena
Roll No.: 2022UCD2177
Branch: CSDS
Section: 1
Netaji Subhas University of Technology
Contents
1. Implement a program for symbol table using hashing...................................................................2
2. implement a 2 pass assembler 8085/8086....................................................................................4
Develop a Lexical Analyser for 'C' using LEX tool...................................................................................7
Represent ‘C’ Language using Context Free Grammar Language...........................................................9
Develop a Parser for ‘C’ using the LEX and YACC tools.........................................................................10
Design a small high-level Language and implement a compiler for the same. If the target machine if
the compiler is a hypothetical machine, then implement a simulator for it........................................14
Develop a simple calculator using LEX and YACC tools........................................................................16
Add assignment statement, if then else statement, and while loop to the calculator and generate the
three address code for the same.........................................................................................................18
1. Implement a program for symbol table using
hashing
Output:
2. implement a 2 pass assembler 8085/8086
3. Develop a Lexical Analyser for 'C' using LEX tool
4. Represent ‘C’ Language using Context Free
Grammar Language
5. Develop a Parser for ‘C’ using the LEX and YACC
tools
6. Design a small high-level Language and implement
a compiler for the same. If the target machine if
the compiler is a hypothetical machine, then
implement a simulator for it.
7. Develop a simple calculator using LEX and YACC
tools
Calc.l
Calc.y
8. Add assignment statement, if then else statement,
and while loop to the calculator and generate the
three address code for the same