I am exploring different ways to create a simple business rule engine in Java. I need to present the client with a simple webapp that lets him configure a bunch of rules. A
As parsing code with Java only is an implementation suicide, you may want to write a simple compiler using Jflex and CUP, which are the Java version of GNU FLEX
and YACC
. In this way you can generate simple tokens with Jflex
(a token is a keyword like IF
, ELSE
etc) while CUP will consume those token in order to execute some code.