Skip to content

Simple compiler - Parses a simple mathematical expression and generates NASM Assembly code

Notifications You must be signed in to change notification settings

deepanprabhu/simple-expression-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Expression Compiler

  • My first successful compiler project
  • Basically takes a simple mathematical expression like "6 * 5 + ( 3 / 2 * 1 )" and compiles it into NASM x64 assembly for Mac.
  • This code is spitted out to the console.
  • I copy this code and manually assemble it with Nasm for MacOS.
  • and then link it to create an executable !
  • There are many todos left, like considering unary negatives like "-3", doing error checks and exceptions.
  • These are on my list, but I want to create a basic working compiler soon, to understand the theory.
  • Lots of fun ! Hope you enjoy !!

About

Simple compiler - Parses a simple mathematical expression and generates NASM Assembly code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published