No description
| decks | ||
| examples | ||
| imgs | ||
| .gitignore | ||
| compiler.lua | ||
| main.lua | ||
| parser.lua | ||
| pprint.lua | ||
| README.md | ||
| syntax.lua | ||
| wul | ||
A nova compiler and front end design to have a simple and extensible parser. Wul can compile program into Lua. Designed with LuaJIT in mind.
Example
The following is Wul's default syntax:
{ @comment
an example of an assembly language
implemented in wul }
{ @ewe ( 20 fib @ewe.call ) }
@ewe def fib ; @ewe.stack 0 { @ewe.stack ( 0 ) }
@ewe def fib ; @ewe.stack 1 { @ewe.stack ( 1 ) }
@ewe def fib ; @ewe.stack $n {
@ewe (
$n @ewe.dup
1 @ewe.sub fib @ewe.call @ewe.swap
2 @ewe.sub fib @ewe.call
@ewe.add
) ;
}
You can find the full VM for the language in decks/ewe.wul. A more friendly example is on my todo list. I've unfortunately have a day job :(
