org.kohsuke.rngom.ast.builder.IncludedGrammar Maven / Gradle / Ivy
package org.kohsuke.rngom.ast.builder;
import org.kohsuke.rngom.ast.om.Location;
import org.kohsuke.rngom.ast.om.ParsedPattern;
import org.kohsuke.rngom.ast.om.ParsedElementAnnotation;
import org.kohsuke.rngom.parse.Parseable;
/**
* {@link Scope} for <grammar> element of the <include>d grammar.
*
* This object builds <define>s in the included grammar that
* override the definitions in the original grammar.
*/
public interface IncludedGrammar<
P extends ParsedPattern,
E extends ParsedElementAnnotation,
L extends Location,
A extends Annotations,
CL extends CommentList> extends GrammarSection, Scope
{
/**
*
* @return
* technically, an included gramamr does not produce a pattern,
* but this allows {@link Parseable#parseInclude(String, SchemaBuilder, IncludedGrammar, String)}
* to return the result from {@link IncludedGrammar} nicely.
*
*
* The value returned from this method will be returned from the abovementioned method.
*/
P endIncludedGrammar(L loc, A anno) throws BuildException;
}