SetTypeLexer.g4:
1 | lexer grammar SetTypeLexer; |
SetTypeParser.g4:
1 | parser grammar SetTypeParser; |
Java Code:
1 | import org.antlr.v4.runtime.CharStream; |
Output:
1 | (root "aaa" 'bbb' <EOF>) |
Reference
Lexer Rules - type()
antlrworks2/TemplateLexer.g4 at master · sharwell/antlrworks2 · GitHub