01: package org.kohsuke.rngom.ast.builder;
02:
03: import org.kohsuke.rngom.ast.om.Location;
04: import org.kohsuke.rngom.ast.om.ParsedPattern;
05: import org.kohsuke.rngom.ast.om.ParsedElementAnnotation;
06: import org.kohsuke.rngom.parse.Parseable;
07:
08: /**
09: * {@link Scope} for <grammar> element of the <include>d grammar.
10: * <p>
11: * This object builds <define>s in the included grammar that
12: * override the definitions in the original grammar.
13: */
14: public interface IncludedGrammar<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
15: extends GrammarSection<P, E, L, A, CL>, Scope<P, E, L, A, CL> {
16:
17: /**
18: *
19: * @return
20: * technically, an included gramamr does not produce a pattern,
21: * but this allows {@link Parseable#parseInclude(String, SchemaBuilder, IncludedGrammar, String)}
22: * to return the result from {@link IncludedGrammar} nicely.
23: *
24: * <p>
25: * The value returned from this method will be returned from the abovementioned method.
26: */
27: P endIncludedGrammar(L loc, A anno) throws BuildException;
28: }
|