Antlr4.Tool.GrammarParserInterpreter.BailButConsumeErrorStrategy.Recover C# (CSharp) Method

Recover() public method

public Recover ( Parser recognizer, RecognitionException e ) : void
recognizer Parser
e Antlr4.Runtime.RecognitionException
return void
            public override void Recover(Parser recognizer, RecognitionException e)
            {
                int errIndex = recognizer.InputStream.Index;
                if (firstErrorTokenIndex == -1)
                {
                    firstErrorTokenIndex = errIndex; // latch
                }
                //			System.err.println("recover: error at " + errIndex);
                IIntStream input = recognizer.InputStream;
                if (input.Index < input.Size - 1)
                { // don't consume() eof
                    recognizer.Consume(); // just kill this bad token and let it continue.
                }
            }
GrammarParserInterpreter.BailButConsumeErrorStrategy