FrankChen021 commented on code in PR #19896: URL: https://github.com/apache/druid/pull/19896#discussion_r3726524409
########## processing/src/main/antlr4/org/apache/druid/math/expr/antlr/Expr.g4: ########## @@ -61,11 +61,11 @@ EXP: [eE] [-]? LONG; // DOUBLE provides partial support for java double format // see: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#valueOf(java.lang.String) DOUBLE : 'NaN' | 'Infinity' | (LONG '.' LONG?) | (LONG EXP) | (LONG '.' LONG? EXP); -IDENTIFIER : [_$a-zA-Z][_$a-zA-Z0-9]* | '"' (ESC | ~ [\"\\])* '"'; +IDENTIFIER : [_$a-zA-Z][_$a-zA-Z0-9]* | '"' (ESC | ~ ["\\])* '"'; Review Comment: ANTLR 4.13.2 character-set syntax The quote escapes were removed because ANTLR 4.13.2 rejects `\"` and `\'` when they appear inside lexer character sets as invalid escapes. Quotes are literal members inside `[...]`, so this preserves the language behavior: IDENTIFIER still excludes `\"` and `\`, while STRING still excludes `\'` and `\`. The corresponding ESC rule keeps the same JSON-style escape letters and Unicode support. This is a grammar-generation compatibility fix for ANTLR 4.13.2, not a change to comment handling or the accepted expression syntax. Grammar generation and 35 ParserTest cases passed locally. -- 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]
