Project using LLVM

Mewa: A tool to write Compiler Front-Ends for LLVM in Lua

Mewa is a compiler-compiler that generates a Lua script from an LALR(1) grammar attributed with Lua function calls. It generates a Lua script that uses a fixed schema to transform a source passing the grammar into an AST with the Lua function calls attached to the nodes. The compiler then initiates the tree traversal done by these Lua functions. The LLVM IR text output is printed in the process. LLVM command-line tools like lli or llc are used for further processing. A Lua library written in C++ supports the definition of the type system of a statically typed language. Examples and an FAQ assist you in practical problem-solving.

Mewa provides no support for the evaluation of different paths of code generation. The idea is to do a one-to-one mapping of the program structures to code and to leave all analytical optimization steps to the backend.
Mewa tries to optimize the amount of code written. It targets single authors that would like to write a prototype of a non-trivial programming language fast, but at the expense of a structure supporting collaborative work. This makes it rather a tool for experiment than for building a product.