March 2019 progress report

This is the first of what I hope will be a regular series of reports about Aki's development and progress. Since this is the first one since the project's teardown and reboot (more on that in another post), it's going to be more tentative than usual.


Project revamp

Again, I'll go into this in detail in another post, but the project has been rebooted and is being rewritten entirely from scratch. With that comes the following additions right upfront:

A new lexer/parser

The original lexer and parser were written by hand and prone to errors. The new one uses David Beazley's Sly. Sly itself is still in the early stages, but it's quite promising and I hope it proves to be worth sticking with. If not, the lexer and parser can be pretty elegantly decoupled from the rest of the compiler and replaced with something else in time.

New AST type system

The original Aki had a very clumsy attempt to overload the native LLVM types. I'm now adding Aki-native type information to LLVM objects by way of an .aki property.

New codegen module

I kept the basic idea of the original codegen module, an AST node visitor that emitted LLVM instructions as it traversed the program's instruction graph. But I also applied some new thought, courtesy of the ultimate failure of the old project, about how to keep things relatively clean and separate.


The REPL owes a lot to the original one in terms of how it's commanded and controlled. But it has its functionality split out a little more elegantly, and it uses different LLVM code modules for loaded code vs. REPL-entered code.


See above! (Future Aki updates will have more details here, since we'll have an actual history of changes.)

Needs fixing

This section will eventually feature details about any major, lingering issues that need addressing, whether in the form of persistent bugs or features that need rewriting.

Still missing

A lot, We still can't manipulate anything more than ints and floats. No external functions linked in yet, so no snprintf etc. But that's all coming.