yurloc commented on code in PR #5806:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5806#discussion_r1542189860


##########
drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRL6Expressions.g4:
##########
@@ -230,6 +230,7 @@ drlIdentifier returns [Token token]
     | PERMITS
     | RECORD
     | VAR
+    | THIS

Review Comment:
   The problem with this is that the parser will now allow `this` to appear at 
impossible places, for example, `Person( age.this.getSomething() )`. I _feel_ 
slightly uncomfortable about this :slightly_smiling_face: 
   
   But on second thought, I think it's OK because:
   
   1. A slightly more permissive parser is not a big problem as opposed to a 
parser that's unable to accept a valid input.
   2. It's in line with the old parser's behavior (no `THIS` token => `this` 
recognized as `ID` => accepted in the example above).
   3. Yes, this is probably the most pragmatic approach. Simplicity over (maybe 
redundant) correctness.
   
   So +0.9.



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