The Drools DSL Translator
A generic DSL translator
- Uses regular expressions for detecting and translating DSL phrases
into Drools Rule Language (DRL).
- Separate definitions for translating condition and consquence phrases
- Retain the basic rule structure
rule - when - then - end
- "Leading hyphen" indicates, by convention, a constraint insertion into the
preceding pattern
- Captures for substituting varying snippets during transformation
- Expansion by repeated application of patterns and replacement after
substituting captured strings
Note: There are almost no dependencies on the DRL syntax in this
translator.