Not sure if I'm encountering a bug or if this is expected behavior. I have an error listener that is trying to detect which rule was attempted to be matched when an error occurred, but ANTLR is reporting the parent rule instead of the child rule. I've traced it to
this line which generates a NoViableAltException (the one that occurs based on the child rule failing), but then because p.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule returns alt=2, the exception isn't thrown. Instead an InputMisMatchException is thrown later for the parent rule. From my error listener, I can't seem to find a way of discovering that the error actually occurred in the child rule.