class GrammarBuilderImpl extends java.lang.Object implements Grammar, Div
GrammarSection.Combine| Modifier and Type | Field and Description |
|---|---|
private java.util.List<org.w3c.dom.Element> |
additionalElementAnnotations
Additional top-level element annotations.
|
protected DGrammarPattern |
grammar |
protected Scope |
parent |
protected DSchemaBuilderImpl |
sb |
COMBINE_CHOICE, COMBINE_INTERLEAVE, START| Constructor and Description |
|---|
GrammarBuilderImpl(DGrammarPattern p,
Scope parent,
DSchemaBuilderImpl sb) |
| Modifier and Type | Method and Description |
|---|---|
void |
define(java.lang.String name,
GrammarSection.Combine combine,
ParsedPattern pattern,
Location loc,
Annotations anno)
Called when a pattern is defined.
|
void |
endDiv(Location loc,
Annotations anno) |
ParsedPattern |
endGrammar(Location loc,
Annotations anno) |
Div |
makeDiv()
Called when <div> is found.
|
Include |
makeInclude()
Returns null if already in an include.
|
ParsedPattern |
makeParentRef(java.lang.String name,
Location loc,
Annotations anno) |
ParsedPattern |
makeRef(java.lang.String name,
Location loc,
Annotations anno) |
void |
topLevelAnnotation(ParsedElementAnnotation ea)
Called when an annotation is found.
|
void |
topLevelComment(CommentList comments)
Called when a comment is found.
|
protected final DGrammarPattern grammar
protected final Scope parent
protected final DSchemaBuilderImpl sb
private java.util.List<org.w3c.dom.Element> additionalElementAnnotations
public GrammarBuilderImpl(DGrammarPattern p, Scope parent, DSchemaBuilderImpl sb)
public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException
endGrammar in interface GrammarBuildExceptionpublic void endDiv(Location loc, Annotations anno) throws BuildException
endDiv in interface DivBuildExceptionpublic void define(java.lang.String name,
GrammarSection.Combine combine,
ParsedPattern pattern,
Location loc,
Annotations anno)
throws BuildException
GrammarSectiondefine in interface GrammarSectionname - Name of the pattern. For the definition by a <start/> element,
this parameter is the same as GrammarSection.START.
to test if it's a named pattern definition or the start pattern definition.combine - null or GrammarSection.COMBINE_CHOICE or GrammarSection.COMBINE_INTERLEAVE depending
on the value of the combine attribute.pattern - The pattern to be defined.BuildExceptionpublic void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException
GrammarSectiontopLevelAnnotation in interface GrammarSectionBuildExceptionpublic void topLevelComment(CommentList comments) throws BuildException
GrammarSectiontopLevelComment in interface GrammarSectionBuildExceptionpublic Div makeDiv()
GrammarSectionmakeDiv in interface GrammarSectionDiv object will receive callbacks for structures
inside the <div> element.public Include makeInclude()
GrammarSectionmakeInclude in interface GrammarSectionpublic ParsedPattern makeParentRef(java.lang.String name, Location loc, Annotations anno) throws BuildException
makeParentRef in interface ScopeBuildExceptionpublic ParsedPattern makeRef(java.lang.String name, Location loc, Annotations anno) throws BuildException
makeRef in interface ScopeBuildException