protected int parseToken(boolean eof_ok) throws FormatterError {
        int status;
        int rc;

        try {
            status = st.nextToken();
        } catch (Exception e) {
            throw new FormatterError("parseToken: st.nextToken failed");
        }

        s = "";

        if (status == StreamTokenizer.TT_EOF) {
            if (!eof_ok) {
                throw new FormatterError("parseToken: unexpected eof");
            }

            rc = EOF_INDICATOR;
        } else if (st.ttype == StreamTokenizer.TT_NUMBER) {
            logger.debug("parseToken: token is number: " + st.nval);
            rc = (int) st.nval;
        } else {
            logger.debug("parseToken: token is string: " + st.sval);
            s = new String(st.sval);
            rc = WORD_INDICATOR;
        }

        logger.debug("parseToken: returning rc = " + rc);

        return (rc);
    }