You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zihaoAK47 (via GitHub)" <gi...@apache.org> on 2023/05/15 11:52:49 UTC

[GitHub] [shardingsphere] zihaoAK47 commented on a diff in pull request #25620: Support MySQL Oracle DROP USER statement for SQL parsing based on IP address deletion.

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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org