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

   `DRL6Expressions` is a bit ahead of `DRLParser` so I take that as a 
benchmark.
   
   ## Impl
   The code that registers error listeners is very different for both parsers. 
It could be unified and reused.
   
   ## API
   Contents of `parser.getErrors()` should be unified.
   
   ### DRL6Expressions
   ```
   org.drools.drl.parser.DroolsParserException: [ERR 102] Line 1:1 mismatched 
input '<EOF>' expecting {...}
   ```
   
   ### DRLParser
   ```
   org.drools.drl.parser.ParserError: [18,0]: mismatched input 'impot' 
expecting {...}
   ```
   
   So while the problem occurs during parsing (mismatched input), parsers 
report different exception types with slightly different messages. This should 
be unified.
   
   ## Tests
   - `DRL6Expressions` has error reporting test coverage in 
`org.drools.drl.parser.antlr4.DRLExprParserTest#testMismatchedInput` and other 
test methods.
   - `DRLParser` should receive equal test coverage.
   


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