drccrd opened a new issue, #6891:
URL: https://github.com/apache/incubator-kie/issues/6891

   ### Describe the bug
   
   The ANTLR4 DRL parser (`DRL10ParserWrapper`) cannot parse Java 8 functional 
syntax inside a `function` declaration's body, while the legacy parser accepts 
it. Rules using such functions compile today only because 
`drools.drl.antlr4.parser.enabled` defaults to `false`; they will stop 
compiling when the ANTLR4 parser becomes the default.
   
   ### Expected behavior
   
   The ANTLR4 parser supports patterns supported by the ANTLR3 parser, 
including functions in DRL
   
   ### Actual behavior
   
   Line X:Y missing ';' at '<token>'
   
   ### How to Reproduce?
   
   any of these as a DRL function body:
   
   ```drl
   package org.example;
   
   function void f( java.util.List xs, java.util.List out )
   {
     xs.forEach(e -> out.add(e));      // lambda
   }
   ```
   
   ```drl
   function void g( java.util.List xs, java.util.List out )
   {
     xs.forEach(out::add);             // method reference
   }
   ```
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### GraalVM version (if different from Java)
   
   _No response_
   
   ### Kogito version or git rev (or at least Quarkus version if you are using 
Kogito via Quarkus platform BOM)
   
   10.2.0
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to