Skip to content

tigertv/compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler

Released:

  • variables, simple scope
  • functions, print function
  • calculation: addition, subtruction, multiplication, division
  • if-else (simple, ==, !=, <, !<, >, !>)
  • loop(only calculated expression without variables)
  • only integers as operands and arguments for functions

It uses ld and nasm as backend.

Build the compiler:

make

Build and run tests:

make test

Examples of code in *.calc files of tests directory