I want to know which alternative rule antlr is current in .I read "the definitivie antlr4 reference",it use ctx.getChildCount() or ctx.ID()!=null to know which alternative rule antlr is currently in.
But I want to know is there a method which could give the specific index of the alternative rule.
I see this question How to know which alternative rule ANTLR parser is currently in during visit ,but it doesn't have the answer .