ANTLR4: implicit or explicit token definition
问题 What are the benefits and drawbacks of using explicit token definitions in ANTLR4? I find the text in single parentheses more descriptive and easier to use than creating a separate token and using that in place of the text. E.g.: grammar SimpleTest; top: library | module ; library: 'library' library_name ';' ; library_name: IDENTIFIER; module: MODULE module_name ';' ; module_name: IDENTIFIER; MODULE: 'module' ; IDENTIFIER: [a-zA-Z0-9]+; The generated tokens are: T__0=1 T__1=2 MODULE=3