tkobayas opened a new issue, #6237:
URL: https://github.com/apache/incubator-kie-drools/issues/6237

   `chunk` in DRL10Parser.g4 may eat greedy and doesn't provide an appropriate 
error.
   
   for example) a test case candidate
   ```
       @Test
       void annotationChunk() {
           final String drl = "rule sales\n" +
                   "@department('sales')\n" +
                   "wrongattribute \"hey\"\n" +
                   "when\n" +
                   "    $s : String( this == 'fireRules' )\n" +
                   "then\n" +
                   "    list.add(kcontext.getRule().getName());\n" +
                   "end";
           final PackageDescr pkg = 
parseAndGetPackageDescrWithoutErrorCheck(drl);
           assertThat(parser.hasErrors()).isTrue();
           
assertThat(parser.getErrors().get(0).getMessage()).contains("'wrongattribute'");
       }
   ```


-- 
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