/Compiler_Sessional_CSE_310

This is a lab course of CSE BUET 2015.

Primary LanguageYacc

CSE 310: Compiler Sessional

This was a course in my Level 3 Term 1.The name clearly suggests this is a course on Compiler. We were given four assignments that gradually builds a C compiler using various tools like YACC,BISON.

1 Symbol Table

A Symbol Table management was developed from scrach in C++

2 Lexical Analyser

Lexical Analyser was built using YACC.

3 Syntax & Semantic Analyser

The parsed token in Lexical Analyser was combined with BISON to build a Syntax & Semantic Analyser.

4 Intermediate Code Generation, Optimization

In the final stage all the previous works are combined to generate assembly code for Intel 8086 processor. So, given a subset of C code as text,the compiler would assembly code for Intel 8086 processor. Also the assembly code is optimized to reduce etra variable.

I also handled function calls,recurrsive function calls. Unfortunately due to Ubuntu failure I've lost the code for the final assignment!