private void error(String expected, String actual) {
        if (!recovering) {
            recovering = true;
            final String outputString = (EOF_STRING.equals(actual) || UNTERMINATED_COMMENT_STRING.equals(actual) || COMMENT_NOT_ALLOWED.equals(actual)) ? actual : "'"
                    + actual + "'";
            errors.add(SyntaxError._UnexpectedToken(expected, outputString,
                    lookahead(1).beginLine));
        }
    }
private void error ( String expected , String actual ) { if ( ! recovering ) { recovering = true ; final String outputString = ( EOF_STRING . equals ( actual ) || UNTERMINATED_COMMENT_STRING . equals ( actual ) || COMMENT_NOT_ALLOWED . equals ( actual ) ) ? actual : "'" + actual + "'" ; errors . add ( SyntaxError . _UnexpectedToken ( expected , outputString , lookahead ( 1 ) . beginLine ) ) ; } }
If not currently recovering, adds an error to the errors list and sets
recovering to true

@param expected
the kind of thing expected