java: public String getErrorHeader(RecognitionException e) {int line = e.getOffendingToken().getLine();int charPositionInLine = e.getOffendingToken().getCharPositionInLine();return "line "+line+":"+charPositionInLine;}
C#: public virtual string GetErrorHeader(RecognitionException e){int line = e.OffendingToken.Line;int charPositionInLine = e.OffendingToken.Column;return "line " + line + ":" + charPositionInLine;}