private ValueMatcher buildValueMatcher(String str, ValueParser parser)
			throws Exception {
		if (str.length() == 1 && str.equals("*")) {
			return new AlwaysTrueValueMatcher();
		}
		ArrayList values = new ArrayList();
		StringTokenizer st = new StringTokenizer(str, ",");
		while (st.hasMoreTokens()) {
			String element = st.nextToken();
			ArrayList local;
			try {
				local = parseListElement(element, parser);
			} catch (Exception e) {
				throw new Exception("invalid field \"" + str
						+ "\", invalid element \"" + element + "\", "
						+ e.getMessage());
			}
			for (Iterator i = local.iterator(); i.hasNext();) {
				Object value = i.next();
				if (!values.contains(value)) {
					values.add(value);
				}
			}
		}
		if (values.size() == 0) {
			throw new Exception("invalid field \"" + str + "\"");
		}
		if (parser == DAY_OF_MONTH_VALUE_PARSER) {
			return new DayOfMonthValueMatcher(values);
		} else {
			return new IntArrayValueMatcher(values);
		}
	}