apache / incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
http://www.drools.org
5.82k stars 2.48k forks source link

Experiment: New DRL parser #5678

Open tkobayas opened 6 months ago

tkobayas commented 6 months ago

Issue Description:

Migrate a new DRL parser based on antlr 4, because the current DRL parser (based on antlr 3) is hard-coded in the generated Java codes that make it hard to maintain.

Acceptance Criteria:

Out of Scope:

tkobayas commented 6 months ago

Migrate a new DRL parser in the drools code base with a feature branch dev-new-parser.

This is done by https://github.com/apache/incubator-kie-drools/pull/5677 https://github.com/apache/incubator-kie-drools/pull/5682

tkobayas commented 6 months ago
  • Fix and improve the parser by solving the test failures
    • It could be several separated issues/PRs which we can work on in parallel

Each issue would be listed in this issue so that this issue (5678) is the parent issue.

tkobayas commented 6 months ago

Child issue: Test failure : RHS end without preceding white-space https://github.com/apache/incubator-kie-drools/issues/5679

tkobayas commented 6 months ago

Child issue: Test failure : Unknown language level https://github.com/apache/incubator-kie-drools/issues/5681

tkobayas commented 6 months ago

Child issue: Better implementation switch https://github.com/apache/incubator-kie-drools/issues/5683

tkobayas commented 6 months ago

@yurloc Thank you very much for the effort to raise the issue list! I'm going to start with:

tkobayas commented 2 months ago

As of 2024-07-11, unit tests are all green. Remaining child issues are low priority, so they can be handled after merging to main.

https://github.com/apache/incubator-kie-drools/issues/5799 https://github.com/apache/incubator-kie-drools/issues/5807 https://github.com/apache/incubator-kie-drools/issues/5856 https://github.com/apache/incubator-kie-drools/issues/5874 https://github.com/apache/incubator-kie-drools/issues/5938

The next step is to create a PR to merge this branch to main branch. Notes:

anand188 commented 4 days ago

@tkobayas Hi is there any timeline when we can expect 10.0 with antlr4-runtime updated will be released ?

tkobayas commented 4 days ago

@anand188 There is no timeline forecast yet. I hope 10.0 (without new parser) release will happen in 1 or 2 months, but not very sure. New parser will be included in the next minor version (probably 10.1).

anand188 commented 4 days ago

@tkobayas is that fair statement we can expect 10.1 before December, is this something we can wait for ?

tkobayas commented 3 days ago

@anand188 Sorry, we cannot provide a timeline forecast at the moment.

Btw, I'm interested in why you wait for the antlr4 based parser. Could you let me know? It's implementation details and doesn't directly affect users.