zihaoAK47 commented on code in PR #25620:
URL: https://github.com/apache/shardingsphere/pull/25620#discussion_r1193726570
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/Literals.g4:
##########
@@ -66,10 +66,15 @@ BIT_NUM_
;
IDENTIFIER_
- :
[A-Za-z_$0-9\u0080-\uFFFF]*?[A-Za-z_$\u0080-\uFFFF]+?[A-Za-z_$0-9\u0080-\uFFFF]*
+ : IP_ADDRESS
Review Comment:
Hi, I tried defining the syntax parsing rules for IP addresses in
BaseRule.g4.
However, during testing, I found that IP addresses were being matched by the
NUMBER_ lexical rule in Literals.g4 file first.
I have tried defining the rules multiple times, but the NUMBER_ rule always
takes priority.
I have defined the IP_ADDRESS lexical rule in the Literals.g4 file and
referenced it in the ipAddress rule in the BaseRule.g4 file. Would this be a
correct approach?
--
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]