You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/02 16:32:07 UTC

[GitHub] [spark] zhenlineo edited a comment on pull request #35701: [SPARK-38378][SQL] Refactoring of the ANTLR grammar definition into separate Parser and Lexer files

zhenlineo edited a comment on pull request #35701:
URL: https://github.com/apache/spark/pull/35701#issuecomment-1057123793


   @cloud-fan It is a best practice to use ANTLR for a complex grammar. 
   With an explicit lexer, we now could: 
   1. Access lexer specific rules: lexer specific rules (e.g. [Lexer mode](https://github.com/antlr/antlr4/blob/master/doc/lexer-rules.md#lexical-modes)) can be used for new SQL features.
   2. Reuse lexer rules: we can now use inheritance to have multiple lexers sharing a common set of lexical rules.
   3. Define the order of tokens: the order the tokens are tokenized by the lexer in the order they appear in the lexer.


-- 
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: reviews-unsubscribe@spark.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org