Converting from "Rule DSL" to "ECMAScript"