Closed nadavhames closed 10 months ago
Use parserImports
to add static imports for your constants, and turn off the generation of the Types class:
generate=[elements="no" tokens="no"] // this attribute has a QuickDoc for all options (Ctrl-Q/Ctrl-J)
parserImports=[
"static com.sample.MyTokenTypes.*"
]
Is there a way to tell grammarkit that I already have an existing lexer implementation and TokenTypes defined? Ideally I want to point grammarkit to my Tokens class where I have all my existing TokenTypes defined so I can use them in the bnf to write my grammar. Meaning grammar kit would only need to generate ElementTypes for the nodes and the PsiElements etc.