I’m looking for a really simple / limited scripting language for the JVM or the Bean Scripting Framework but can’t find any.
I need the following operators:
- +
- –
- *
- /
- maybe ** (power)
- maybe sqrt
… and the ability to define Double type variables to create expressions like
(A+B)/2
The script may not call any JVM code (maybe with the exception of a Math class, but that’s optional).
What options do i have?
I know I could just write that kind of thing myself, but I would prefer a tested, stable and fast solution.
I tried Groovy before and really like it… but it’s hard no to give my users the full power over the JVM with it.
There are no language that are as simple as I need them, so I will define one myself using ANTLR. The best example I found so far is in this answer.