parseRuleMade: ParserRuleName Colon ( parseRuleElements )* EndStatement
;
is a parser rule and while walking through the grammar i want to grab the name of the lexerRules i.e
ParserRuleName
Colon
EndStatement
inside this rule.
i can get their values through ctx.children.get( i ).getText ( ...scala... )
althou ctx.children.get( i ).asInstanceOf[ TerminalNode ].getSymbol.getType
gives me the number which Antlr4 generates in GrammarNameLexer file
but that number not always corresponds to the index of ruleNames array element in the GrammarNameLexer file. So that one can grab the name from there.
how to go about it please.
Thanks Regards
Right_Then