Skip to content
Adish Vartak edited this page Apr 3, 2021 · 8 revisions

DIMPLE : What is it ?

DIMPLE is a low-level procedural language that is similar to C in terms of functionality. The compiler consists of a hand-written lexer and parser, and uses LLVM to generate an intermediate representation (IR) of the source program and finally the machine code. The language is simple enough for the compiler source code to be reasonably compact. It should hopefully be easy for anyone interested to go through the entire source and understand how the various elements of the compiler come together. It's also a handy reference for someone interested in understanding how to use LLVM for writing a compiler. Writing DIMPLE has been a part of my own journey of learning about compilers and compiler tools like LLVM.

The DIMPLE compiler produces relocatable object files. The ABI closely mirrors that of C. Therefore, the object files can be linked into an executable using a gcc or clang linker. At some point a custom linkage editor may be provided. Feel free to try it out, and send me your feedback. If you find bugs do let me know.

Clone this wiki locally