Introducing the L+ Compiler (and it’s free!)

I’m glad to announce that Emilio Pombo and I have just released the full source code for a custom compiler we built back in 2006!

The compiler, built as a mandatory Compilers assignment at the Catholic University of Uruguay, translates programs written in a C-like programming language, called L+, into Java Bytecode, suitable for execution on any platform with a Java Virtual Machine.

L+ supports most of C constructs (variables, branching, loops, functions, recursion, I/O), with some limitations and some additions (like native string handling). Here’s the mandatory “hello world” program written in L+.

// hello.lp
void main()
{
	print("Hello, World!");
}

The full source code is available as of now at google code, at http://code.google.com/p/lpcompiler/.

We have licensed the L+ compiler under the GPLv3, so you are free to download, compile, study, modify and ultimately redistribute your changes to anyone. I encourage you to check out the code, build it and try the examples that come bundled, so you can see what our little language can do :)

L+ is written in pure ANSI/ISO C++ and supports GNU/Linux, Mac OS X and Microsoft Windows. Dependencies are minimal and should build on any UNIX-like environment.

I want to thank Emilio Pombo and Leonardo Val for subscribing to the idea of releasing this program as Free Software and for also encouraging me to do so.

I hope you find the project as interesting as we found it fun to write it!

2 thoughts on “Introducing the L+ Compiler (and it’s free!)

Comments are closed.