private Mode extractRuleMode() throws XMLStreamException, ParserException {
		String modeName = "";
		boolean isModeNegation = false;

		Tag startTag = currTag;

		if (Tag.NOT.equals(currTag)) isModeNegation = true;
		do {
			int event = reader.next();
			switch (event) {
			case XMLStreamConstants.START_ELEMENT:
				currTag = getXmlTag(reader.getLocalName());
				break;
			case XMLStreamConstants.END_ELEMENT:
				if (startTag.equals(currTag)) return new Mode(modeName.trim(), isModeNegation);
				break;
			case XMLStreamConstants.CHARACTERS:
				if (Tag.MODE.equals(currTag)) {
					modeName += reader.getText();
				}
				break;
			}
		} while (reader.hasNext());
		throw new ParserException(ErrorMessage.IO_UNEXPECTED_END_OF_FILE);
	}