apache / incubator-kie-drools

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

[incubator-kie-drools-5874] [new-parser] Adapt drlIdentifier to opera… #5951

Closed tkobayas closed 2 weeks ago

tkobayas commented 6 months ago

…tor_key and neg_operator_key in DRL6Expressions.g4

Issue:

Thanks to https://github.com/apache/incubator-kie-drools/commit/d57c5da8b785bca3f35e6a32297bc3ba7a69843b , this is no longer an issue, so I adapted drlIdentifier and enabled the tests.

tkobayas commented 6 months ago

@yurloc @mariofusco @gitgabrio Please review, Thanks!

tkobayas commented 6 months ago

@yurloc Thank you for pointing out that, and sorry for not finding it beforehand. I'll investigate it.

tkobayas commented 6 months ago

I found that adding ? to relationalExpression solves the issue, but I postpone this fix until we will fix some more remaining test failures so that I can see the potential side-effect easily. Also this issue isn't related to any existing tests.

--- a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4
+++ b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4
@@ -505,7 +505,7 @@ locals [ BaseDescr lsd ]
                $relationalExpression::lsd = $result;
            }
          }
-  )*
+  )*?
   ;
mariofusco commented 5 months ago

@tkobayas Is this work still pending? If so what is missing?

tkobayas commented 5 months ago

@mariofusco Thanks. I'll come back to work on this. This is relatively low priority. and should not block https://github.com/apache/incubator-kie-drools/pull/5989

tkobayas commented 2 weeks ago

This is not an immediate problem. Closing.