I have lexer grammar
called BasicTokens
which is set of basic tokens for my language, having tokens like null
, true
, false
etc.
Now when I create parser grammar say BasicGrammar
which imports refers BasicTokens
and another grammar called InheritedGrammar
which imports BasicGrammar
.
When Antlr4 generates the parser for InheritedGrammar
it included all the rules already defined in BasicGrammar
.
Is there a way to make Antlr describe only the rules generated in InheritedGrammar
and not in BasicGrammar
and also inherit BasicGrammarParser
instead of Parser
?