Esempio n. 1
0
        /// <summary>
        /// This method is called to report a syntax error which requires the
        /// insertion of a missing token into the input stream.
        /// </summary>
        protected override void ReportMissingToken(Antlr4.Runtime.Parser recognizer)
        {
            if (InErrorRecoveryMode(recognizer))
            {
                return;
            }
            BeginErrorCondition(recognizer);
            IToken t   = recognizer.CurrentToken;
            string msg = ErrorMessageForMissingToken(recognizer, t);

            recognizer.NotifyErrorListeners(t, msg, null);
        }
Esempio n. 2
0
 protected internal virtual void NotifyErrorListeners(Parser recognizer, string message, RecognitionException e)
 {
     recognizer.NotifyErrorListeners(e.OffendingToken, message, e);
 }