class ExtendedParser extends BaseParser {

    protected final float readNumber() throws ParserException {
        float number = 0;
        boolean charWasRead = false;
        while (available() && Character.isDigit(peek())) {
            charWasRead = true;
            number *= 10;
            number += pop() - 48;
        }
        if (!charWasRead) {
            die("Expected number");
        }
        if (available() && peek() == '.') {
            check('.');
            float factor = 0.1f;
            charWasRead = false;
            while (available() && Character.isDigit(peek())) {
                charWasRead = true;
                number += (pop() - 48) * factor;
                factor /= 10;
            }
            if (!charWasRead) {
                die("Expected number");
            }
        }
        return number;
    }

    public  ExtendedParser(String toParse);

}