java: public Token recoverInline(Parser recognizer)throws RecognitionException{InputMismatchException e = new InputMismatchException(recognizer);for (ParserRuleContext context = recognizer.getContext(); context != null; context = context.getParent()) {context.exception = e;}throw new ParseCancellationException(e);}
C#: public override IToken RecoverInline(Parser recognizer){InputMismatchException e = new InputMismatchException(recognizer);for (ParserRuleContext context = recognizer.Context; context != null; context = ((ParserRuleContext)context.Parent)){context.exception = e;}throw new ParseCanceledException(e);}