Skip to content

A program to convert a mini C program (limited feature set) to a three address intermediate representation.

Notifications You must be signed in to change notification settings

SBaori/C-to-ThreeAddressCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features Implemented

  1. data types supported - int, float and char
  2. multi variable declaration and assigment
  3. if and if-else
  4. for and while loops
  5. evaluation of boolean expressions (backpatching)

Planned to add

  1. multi dimensional arrays
  2. symbol table

Build

  yacc -d yacc.y
  flex lex.l
  gcc y.tab.c lex.yy.c -o generator

or

  ./build.sh

Run

  ./generator < input.txt

About

A program to convert a mini C program (limited feature set) to a three address intermediate representation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published