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


##########
drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4:
##########
@@ -445,7 +445,7 @@ attribute : name=( 'salience' | 'enabled' ) 
conditionalAttributeValue #expressio
           | name=( 'agenda-group' | 'activation-group' | 'ruleflow-group' | 
'date-effective' | 'date-expires' | 'dialect' ) DRL_STRING_LITERAL 
#stringAttribute
           | name='calendars' DRL_STRING_LITERAL ( COMMA DRL_STRING_LITERAL )* 
#stringListAttribute
           | name='timer' ( DECIMAL_LITERAL | LPAREN chunk RPAREN ) 
#intOrChunkAttribute
-          | name='duration' ( DECIMAL_LITERAL | TIME_INTERVAL | LPAREN 
TIME_INTERVAL RPAREN ) #durationAttribute
+          | name='duration' ( DECIMAL_LITERAL | LPAREN chunk RPAREN ) 
#intOrChunkAttribute

Review Comment:
   Hi @gitgabrio 
   
   > anything can be parsed as "DURATION", delegating the verification to the 
client code; 
   
   Indeed, the old Antlr3 parser delegates the verification to the compile 
phase, so the rule build reports an error anyway.
   
   At the moment (= until this new parser passes all existing unit tests), I'd 
like to follow the same approach as the old Antlr3 parser as possible, so that 
we can minimize the behaviour difference now.
   
   Then, we will consider any possible improvements. I'll note them in 
https://github.com/apache/incubator-kie-drools/issues/5972
   
   Does it sound good?
   
   Hi @yurloc . Thank you for the follow-up for the Gabriele's question.
   
   > I would maybe choose something that is more obviously wrong, for example, 
wrong input.
   
   Thanks, I'll do that.
   



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