public void parse(String[] cli) throws ParserException {

		List<String> cliList = asList(cli);

		boolean keepOnParsing = true;

		while (!cliList.isEmpty() && keepOnParsing) {

			keepOnParsing = false;

			for (ITokenParser option : optionDefinitions.values()) {
				IOption value = option.parse(cliList);
				if (value != null) {
					values.put(value.getName(), value);
					keepOnParsing = true;
					if (cliList.isEmpty()) {
						break;
					}
				}
			}
		}

		if (!cliList.isEmpty()) {
			throw new ParserException(
					"Unable to parse command line. Remaining tokens are : "
							+ cliList.toString());
		}

		for (ITokenParser option : optionDefinitions.values()) {
			option.validate();
		}

	}