private static ArrayList<String> parenthSubExpr(String expr,
			int splitIndex, boolean leftResult, boolean rightResult,
			HashMap<String, ArrayList<String>> cache) {
		ArrayList<String> leftSub = parenthExpr(expr.substring(0, splitIndex),
				leftResult, cache);
		ArrayList<String> rightSub = parenthExpr(
				expr.substring(splitIndex + 1), rightResult, cache);

		ArrayList<String> ret = new ArrayList<String>();
		if (leftSub != null && leftSub.size() > 0 && rightSub != null
				&& rightSub.size() > 0) {
			for (String left : new ArrayList<String>(leftSub)) {
				for (String right : new ArrayList<String>(rightSub)) {
					if (left.length() > 1) {
						left = '(' + left + ')';
					}
					if (right.length() > 1) {
						right = '(' + right + ')';
					}
					ret.add(left + expr.charAt(splitIndex) + right);
				}
			}
		}

		return ret;
	}