Class NoViableAltException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NoViableAltException
    extends RecognitionException
    Indicates that the parser could not decide which of two or more paths to take based upon the remaining input. It tracks the starting token of the offending input and also knows where the parser was in the various paths when the error. Reported by reportNoViableAlternative()
    See Also:
    Serialized Form
    • Field Detail

      • deadEndConfigs

        private final ATNConfigSet deadEndConfigs
        Which configurations did we try at input.index() that couldn't match input.LT(1)?
      • startToken

        private final Token startToken
        The token object at the start index; the input stream might not be buffering tokens so get a reference to it. (At the time the error occurred, of course the stream needs to keep a buffer all of the tokens but later we might not have access to those.)
    • Method Detail

      • getStartToken

        public Token getStartToken()
      • getDeadEndConfigs

        public ATNConfigSet getDeadEndConfigs()