/Compiler_Design_Lab

A repo which contains programs implemented as part of CD Lab

Primary LanguageC

Compiler_Design_Lab

This repo contains programs implemented as part of CD Lab (7th Semester)

Labs:

Lab1:-

  • Regular Expression to NFA Conversion & DFA Minimization

Lab2 - Lexical Analysis:-

  • Lexical Analyser implemented in C++ for given grammar

Lab3 - Lexical Analysis using FLEX:-

  • A lexical analyser implemented using FLEX tool

Lab4 - Syntax Analysis:-

  • Removal of left-recursion
  • Producing Left-factoring grammar
  • Implementing RecursiveDescentParser (Top-Down Parser)

Lab5 - LL1 Predictive Parser:-

  • Implmenting LL1 Predictive Parser in Python

Lab6 - LR0 Parser

Lab8 - Yacc/Bison parser generator:-

  • Using Yacc / Bison for generating parser for given grammar

Lab9 - Attribute Grammars:-

  • Implementing a simple calculator using LEX + YACC tools

Lab10 - Generating Intermediate representations:-

  • Implemented IR generators using YACC tool for generating AST, 3-address code and DAG IRs.
  • Exploring the internals, and the intermediate representations used by gcc.