This issue aggregates improvement candidates. It may be something wrong or too tolerate in the old Antlr3 parser. Also it may be to drop features which would improve the maintainability. They will need to be discussed in dev@kie.apache ML.
In the old parser, duration attribute accepts any chunk text and expect validation at the compiler phase. We may define more strict parser syntax for the duration attribute.
The old parser allows java keywords in DRL. For example, package some.other.package. It will fail at the compile stage anyway. It’s useless, but at the moment, we try to keep backward compatibility. Discussion is https://github.com/apache/incubator-kie-drools/pull/5819
This issue aggregates improvement candidates. It may be something wrong or too tolerate in the old Antlr3 parser. Also it may be to drop features which would improve the maintainability. They will need to be discussed in dev@kie.apache ML.
In the old parser,
duration
attribute accepts any chunk text and expect validation at the compiler phase. We may define more strict parser syntax for theduration
attribute.Define expected value format where we use
chunk
, so we can reduce ambiguity (e.g. unexpected greediness)Drop Half constraint
name == “Mark” || == “Mario”, age > 10 && < 20
Drop Named consequence
if ( $a.price > Cheese.BASE_PRICE ) break[t1] else break[t2]
Drop Annotation inside LHS (except @watch)
Drop LanguageLevelOption
Disallow Java keywords in DRL
package some.other.package
. It will fail at the compile stage anyway. It’s useless, but at the moment, we try to keep backward compatibility. Discussion is https://github.com/apache/incubator-kie-drools/pull/5819||
&&
as alternatives to infix or/andAdditional syntax: ‘end’ has to end with a new line (may have trailing white-spaces / comment)
rule R1 when then end rule R2 when then end
)