Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.01 KB

README.md

File metadata and controls

57 lines (48 loc) · 1.01 KB

whatever

Simple compiler for a toy language using llvm framework

Features

  • Top down parsing using Bison.
  • Strictly typed.
  • Compiles to LLVM IR code
  • Only two builtin datatypes (int and double).
  • Weird syntax.
  • No functions yet
  • Casting is not allowed.
  • variables are mutable by default
  • No comments yet

TODO

  • Design a weird syntax.
  • Variables declaration.
  • Variables assignment.
  • Variables initialization.
  • Loops.
  • Mathematical Expressions.
  • Add a builtin print function ex. echo/print.
  • Functions.
  • Strings are a maybe so far.

Syntax

set x : int !  //variable declaration example

x @ 12 ! //variable assignment example 

set x : int @ 12 ! //variable initialization 

loop [12]{  //loop 120 times 

	loop[10]{
		x @ = 11!
	}!
}!

Requirements

  1. flex
  2. bison
  3. llvm libraries
  4. make

Build instructions

git clone https://github.com/OpenSourceZombie/whatever.git
cd whatever/src
make 
#run tests
make test

Why?

Because.