Skip to content

ClarkThan/the-super-super-tiny-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

THE SUPER TINY COMPILER

Inspired by The Super Tiny Compiler project. I rewrite it by Golang to make it easier to understand, and I also reduce some concept!

Usage

$ git clone [email protected]:ClarkThan/the-super-super-tiny-compiler.git
$ cd the-super-super-tiny-compiler && go build compiler.go

$ ./compiler
add(3, sub(4, len("foo")));

$ ./compiler 23
23;

$ ./compiler '(add 23 (len "Jordan"))'
add(23, len("Jordan"));

$ ./compiler '(foo "Jordan") (add 23 45)'
foo("Jordan");
add(23, 45);

Funny

Feel free to modify code for inspecting the Tokenizer, Parser and CodeGen output. And I also encourage you improve the error message of the invalid input.


cc-by-4.0

Releases

No releases published

Packages

No packages published

Languages