private int getBalancedPredciateEndLocation(String literalString, int locStart) throws ComponentMismatchException {
		int bracketCount = 0;

		int currLoc = locStart;
		while (currLoc < literalString.length() && literalString.charAt(currLoc) != DflTheoryConst.PREDICATE_START) {
			currLoc++;
		}
		if (literalString.charAt(currLoc) != DflTheoryConst.PREDICATE_START) throw new ComponentMismatchException(
				"no start predicate found");
		do {
			switch (literalString.charAt(currLoc)) {
			case DflTheoryConst.PREDICATE_START:
				bracketCount++;
				break;
			case DflTheoryConst.PREDICATE_END:
				bracketCount--;
				break;
			default:
			}
			if (bracketCount == 0) return currLoc;
		} while (currLoc++ < literalString.length());
		throw new ComponentMismatchException("no end predicate found, literalString=" + literalString);
	}