private void findOpeningBracket(String str, boolean sign) throws ParseException
    {
        Matcher matcher = Pattern.compile(sign ? "\\s*([+-]?)\\(" : "\\s*\\(").matcher(str);
        if (!matcher.lookingAt())
        {
            throw new ParseException("(", offset);
        }
        if (sign)
        {
            minus = (matcher.group(1).equals("-"));
        }
        offset += matcher.end();
        length += matcher.end();
    }