private String readSymbol(int c) throws IOException {
        StringBuilder buf = new StringBuilder();
        loop: while (true) {
            buf.appendCodePoint(c);
            c = getCodePoint();
            switch (c) {
            case -1:
            case '(':
            case ')':
            case '"':
            case '\'':
            case ';':
                ungetChar = c;
                break loop;
            default:
                if (Character.isWhitespace(c))
                    break loop;
                continue;
            }
        }
        return buf.toString();
    }