Scala Expression Engine (See)


Yet another expression parser?
Well, yes, in a way. But there is more to it.

The Scala Expression Engine evolved from a scratch project which I had used to get familiar with Scala.
This still shines through in various places. Not only is the source code poorly documented, I also don't care for any size or performance issues. So if you are looking for a solution that is both compact and fast, you should probably better take a look at other projects like JEP or JEPLite, which both work fine.

Scala turned out to be extremely well suited to write things like this, especially due to its embedded parser library. Therefore the project grew fast into something that became more and more powerful. In the meantime, it has become a language of its own, called "Sel" for Scala expression language. Although it doesn't look much like Scala at first glance, some language constructs reflect the Scala philosophy of handling things.
So, I thought other people might find it useful, too (or at least interesting ;-) ).

Why use See after all?

Colomam, 2012


See is currently distributed as source archive only. If you are not interested in the souce code, a precompiled library may be found within the 'jar' folder.
Just copy see.jar to any location you like and add it to your Java classpath.
For convenience I have also included the required scala library from scala 2.9.2 final, so you do not need the full Scala installation.
I tested with JDK 1.7.0_07 and Scala 2.9.2, but any JRE 6 or 7 should do.
Try the See Console to validate the installation.
If you want to use another Scala version instead, you probably have to recompile.


See is intended to be used from Java (Scala is also possible, of course). Usage boils down to the following:

Thread Safety

Although I did not run exhaustive multithreading tests, some rules may be derived from design:

Sel Syntax

Here you will find more in-depth description.
It won't cover all details, but should at least provide a general overview. Also take a look at the test classes or just try out.
To get started right away:

See Console

See.jar contains command line frontend written in Java. Although quite simple, it provides a great way to try out things.
You may activate it by invoking

java -jar see.jar

If no arguments are given, you will get an interactive prompt that allows entering one expression per line. To get further help, invoke

java -jar see.jar --help

Go to Download