Skip to content

OpenSourceZombie/whatever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published