@Override
	public AbstractComponent parse(String string) throws BookParseException {
		if (string == null) {
			throw new BookParseException("String is null");
		}
		try {
			TextComponent component = (TextComponent) factory
					.newComponent(EComponentType.TEXT);
			String listing = null;
			boolean isListing = false;
			for (String s : string.split(PARAGRAPH_REGEX)) {
				if (isListing) {
					listing += s + "\n";
					if (Pattern.matches(LISTING_END_REGEX, s)) {
						component.addComponent(listingParser.parse(listing));
						isListing = false;
						listing = null;
					}
				} else if (Pattern.matches(LISTING_BEGIN_REGEX, s)) {
					listing = new String(s + "\n");
					isListing = true;
				} else {
					component.addComponent(paragraphParser.parse(s + "\n"));
				}
			}
			if (listing != null) {
				component.addComponent(listingParser.parse(listing));
			}
			return component;
		} catch (ComponentException e) {
			throw new BookParseException("Text parse failed", e);
		}
	}