Inheritance: RecognitionException
コード例 #1
0
 public virtual void Recover(LexerNoViableAltException e)
 {
     if (_input.LA(1) != IntStreamConstants.EOF)
     {
         // skip a char and try again
         Interpreter.Consume(_input);
     }
 }
コード例 #2
0
        public virtual void NotifyListeners(LexerNoViableAltException e)
        {
            string text = _input.GetText(Interval.Of(_tokenStartCharIndex, _input.Index));
            string msg  = "token recognition error at: '" + GetErrorDisplay(text) + "'";
            IAntlrErrorListener <int> listener = ErrorListenerDispatch;

            listener.SyntaxError(this, 0, _tokenStartLine, _tokenStartColumn, msg, e);
        }
コード例 #3
0
ファイル: XPath.cs プロジェクト: rharrisxtheta/antlr4cs
 public override void Recover(LexerNoViableAltException e)
 {
     throw e;
 }