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

org.unlaxer.vocabulary.ebnf.part2.Syntax Maven / Gradle / Ivy

There is a newer version: 1.1.26
Show newest version
package org.unlaxer.vocabulary.ebnf.part2;

import java.util.List;

import org.unlaxer.parser.ChainParsers;
import org.unlaxer.parser.Parser;
import org.unlaxer.parser.combinator.Chain;
import org.unlaxer.parser.combinator.LazyChain;
import org.unlaxer.parser.combinator.ZeroOrMore;


/**
 * https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
 * 
 * (* see 6.5 *) syntax
 * = {gap separator},
 * gap free symbol, {gap separator},
 * {gap free symbol, {gap separator}};
 * 
*/
public class Syntax extends LazyChain{

	private static final long serialVersionUID = 1104388143810209029L;

	@Override
	public List getLazyParsers() {
		return new ChainParsers(
			new ZeroOrMore(
				new GapSeparator()
			),
			new GapFreeSymbol(),
			new ZeroOrMore(
				new GapSeparator()
			),
			new ZeroOrMore(
				new Chain(
					new GapFreeSymbol(),
					new ZeroOrMore(
						new GapSeparator()
					)
				)
			)
		);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy