public SyntaxErrorException(SyntaxErrorInfo info)
     : this(info.Message, info.Exception, info.OffendingSymbol, info.LineNumber, info.Position, info.CodeKind)
 {
 }
        private void NotifySyntaxError(SyntaxErrorInfo info)
        {
            var handler = OnSyntaxError;

            handler?.Invoke(this, new SyntaxErrorEventArgs(info));
        }
 public SyntaxErrorEventArgs(SyntaxErrorInfo info)
 {
     Info = info;
 }
        public override void SyntaxError(IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e)
        {
            var info = new SyntaxErrorInfo(msg, e, offendingSymbol, line, charPositionInLine, CodeKind);

            NotifySyntaxError(info);
        }