All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.parser.elementary.EmptyParser Maven / Gradle / Ivy

package org.unlaxer.parser.elementary;

import java.util.Optional;

import org.unlaxer.Name;
import org.unlaxer.parser.Parser;
import org.unlaxer.parser.combinator.LazyZeroOrOne;
import org.unlaxer.parser.combinator.MatchOnly;

public class EmptyParser extends LazyZeroOrOne{

	private static final long serialVersionUID = 2737636685837145192L;
	
	public EmptyParser() {
		super();
	}

	public EmptyParser(Name name) {
		super(name);
	}

	@Override
	public Parser getLazyParser() {
		return new MatchOnly(
			new WildCardCharacterParser()
		);
	}

	@Override
	public Optional getLazyTerminatorParser() {
		return Optional.empty();
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy