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

org.unlaxer.vocabulary.ebnf.part4.SingleDefinition Maven / Gradle / Ivy

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

import java.util.List;

import org.unlaxer.Name;
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;
import org.unlaxer.vocabulary.ebnf.part1.ConcatenateSymbol;

/**
 * https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
 * 
 * 	(* see 4.5 *) single definition
 *    = syntactic term,
 *    {concatenate symbol, syntactic term};
 *   
 */
public class SingleDefinition extends LazyChain{

	private static final long serialVersionUID = -4302312173981693221L;

	public SingleDefinition() {
		super();
	}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy