Skip to content

Compilers course project in Computer Department in Faculty of Engineering, Cairo University

License

Notifications You must be signed in to change notification settings

OmarKimo/CompilersProject

Repository files navigation

Compilers Project

Project Overview:

Simple C language Compiler that is designed to compile basic functions of C language components.

Tools and Technologies used:

  • Flex: compile lex files
  • Bison: compile yacc files
  • Cygwin: generate executable files

Production rules:

  • Variables and Constants declaration
  • Mathematical expressions (+, -, *, /)
  • Assignment statement
  • Block structure ({}, ())

Quadruples:

  • MOV 3, R0 [move value 3 to register R0]
  • MOV R0, x [move value in register R0 to variable x]
  • ADD R0, R1, R2 [add the value in R0 & R1 and move it to R2]
  • SUB R0, R1, R2 [the same as ADD but subtract]
  • MUL R0, R1, R2 [the same as ADD but multiply]
  • DIV R0, R1, R2 [the same as ADD but divide]

About

Compilers course project in Computer Department in Faculty of Engineering, Cairo University

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages