private void handleError(Token tok, Recovery next, String clause, String expected) {
        if (next.contains(tok.kind)) {
            Message.error(tok.beginLine, clause + "-clause misses " + expected);
        } else {
            Message.error(tok.beginLine, clause + "-clause encountered a " +
                                ((tok.kind == TEXT_T) ? "<quoted string>" : tok.toString()) +
                                " expected " + expected);
        }
        recovery(next);
    }