tkobayas commented on code in PR #5975:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5975#discussion_r1615774192


##########
drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4:
##########
@@ -340,7 +340,8 @@ fromAccumulate := ACCUMULATE LEFT_PAREN lhsAnd 
(COMMA|SEMICOLON)
                         ) RIGHT_PAREN
 */
 fromAccumulate : (DRL_ACCUMULATE|DRL_ACC) LPAREN lhsAndDef (COMMA|SEMI)
-                   ( DRL_INIT LPAREN initBlockStatements=chunk? RPAREN COMMA? 
DRL_ACTION LPAREN actionBlockStatements=chunk? RPAREN COMMA? ( DRL_REVERSE 
LPAREN reverseBlockStatements=chunk? RPAREN COMMA?)? DRL_RESULT LPAREN 
resultBlockStatements=chunk RPAREN
+                   ( DRL_INIT LPAREN initBlockStatements=chunk? RPAREN COMMA? 
DRL_ACTION LPAREN actionBlockStatements=chunk? RPAREN COMMA? DRL_REVERSE LPAREN 
reverseBlockStatements=chunk? RPAREN COMMA? DRL_RESULT LPAREN 
resultBlockStatements=chunk RPAREN
+                   | DRL_INIT LPAREN initBlockStatements=chunk? RPAREN COMMA? 
DRL_ACTION LPAREN actionBlockStatements=chunk? RPAREN COMMA? DRL_RESULT LPAREN 
resultBlockStatements=chunk RPAREN

Review Comment:
   This is not an elegant change. But in the previous rule, `chunk?` for the 
DRL_ACTION greedily eats DRL_RESULT `result`. So I changed to this one, which 
makes DRL_RESULT higher priority. If there is a better way to write, please let 
me know.



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