You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2024/03/08 08:44:40 UTC
[I] [new-parser] failed to parse when a method name is a drl keyword [incubator-kie-drools]
tkobayas opened a new issue, #5776:
URL: https://github.com/apache/incubator-kie-drools/issues/5776
## Parent issue
- #5678
## Failing tests
After applying https://github.com/apache/incubator-kie-drools/pull/5771 ,
- `org.drools.model.codegen.execmodel.NullSafeDereferencingTest.testNullSafeDereferencingPredicateMethod`
## Notes
- `STANDARD_FROM_DRL` and `PATTERN_DSL`.
## Rule code snippet
```
p : Person( $containsL : address!.city.contains("L") )
```
## Error output
```
[INFO] Running org.drools.model.codegen.execmodel.NullSafeDereferencingTest
### parse : ANTLR4_PARSER_ENABLED = true
line 4:46 no viable alternative at input '$containsL : address!.city.contains('
line 4:31 mismatched input '!.' expecting {'(', '.'}
line 4:52 extraneous input ')' expecting 'then'
17:43:09.609 [main] ERROR o.d.d.parser.antlr4.DRLParserWrapper.parse:77 - Exception while creating PackageDescr
org.drools.drl.parser.antlr4.DRLParserException: rhs has to start with 'then' : rhs = )
then
result.add($containsL);
at org.drools.drl.parser.antlr4.ParserStringUtils.trimThen(ParserStringUtils.java:78)
at org.drools.drl.parser.antlr4.DRLVisitorImpl.visitRuledef(DRLVisitorImpl.java:268)
at org.drools.drl.parser.antlr4.DRLVisitorImpl.visitRuledef(DRLVisitorImpl.java:74)
at org.drools.drl.parser.antlr4.DRLParser$RuledefContext.accept(DRLParser.java:1225)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
at org.drools.drl.parser.antlr4.DRLParserBaseVisitor.visitDrlStatementdef(DRLParserBaseVisitor.java:27)
at org.drools.drl.parser.antlr4.DRLParser$DrlStatementdefContext.accept(DRLParser.java:409)
at org.drools.drl.parser.antlr4.DRLVisitorImpl.visitDescrChildren(DRLVisitorImpl.java:797)
at org.drools.drl.parser.antlr4.DRLVisitorImpl.visitCompilationUnit(DRLVisitorImpl.java:91)
at org.drools.drl.parser.antlr4.DRLVisitorImpl.visitCompilationUnit(DRLVisitorImpl.java:74)
at org.drools.drl.parser.antlr4.DRLParser$CompilationUnitContext.accept(DRLParser.java:322)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.drools.drl.parser.antlr4.DRLParserHelper.compilationUnitContext2PackageDescr(DRLParserHelper.java:87)
at org.drools.drl.parser.antlr4.DRLParserWrapper.parse(DRLParserWrapper.java:75)
at org.drools.drl.parser.antlr4.DRLParserWrapper.parse(DRLParserWrapper.java:55)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] [new-parser] failed to parse when a method name is a drl keyword [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on issue #5776:
URL: https://github.com/apache/incubator-kie-drools/issues/5776#issuecomment-1985283909
/take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] [new-parser] failed to parse when a method name is a drl keyword [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on issue #5776:
URL: https://github.com/apache/incubator-kie-drools/issues/5776#issuecomment-2005888954
Fixed by https://github.com/apache/incubator-kie-drools/pull/5783
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] [new-parser] failed to parse when a method name is a drl keyword [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas closed issue #5776: [new-parser] failed to parse when a method name is a drl keyword
URL: https://github.com/apache/incubator-kie-drools/issues/5776
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org