Class GrammarSectionHost
- java.lang.Object
-
- org.kohsuke.rngom.rngparser.parse.host.Base
-
- org.kohsuke.rngom.rngparser.parse.host.GrammarSectionHost
-
- All Implemented Interfaces:
GrammarSection
- Direct Known Subclasses:
DivHost,IncludeHost,ScopeHost
public class GrammarSectionHost extends Base implements GrammarSection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.kohsuke.rngom.rngparser.ast.builder.GrammarSection
GrammarSection.Combine
-
-
Field Summary
-
Fields inherited from interface org.kohsuke.rngom.rngparser.ast.builder.GrammarSection
COMBINE_CHOICE, COMBINE_INTERLEAVE, START
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefine(java.lang.String name, GrammarSection.Combine combine, ParsedPattern _pattern, Location _loc, Annotations _anno)Called when a pattern is defined.DivmakeDiv()Called when <div> is found.IncludemakeInclude()Returns null if already in an include.voidtopLevelAnnotation(ParsedElementAnnotation _ea)Called when an annotation is found.voidtopLevelComment(CommentList _comments)Called when a comment is found.
-
-
-
Method Detail
-
define
public void define(java.lang.String name, GrammarSection.Combine combine, ParsedPattern _pattern, Location _loc, Annotations _anno) throws BuildExceptionDescription copied from interface:GrammarSectionCalled when a pattern is defined.- Specified by:
definein interfaceGrammarSection- Parameters:
name- Name of the pattern. For the definition by a <start/> element, this parameter is the same asGrammarSection.START. to test if it's a named pattern definition or the start pattern definition.combine- null orGrammarSection.COMBINE_CHOICEorGrammarSection.COMBINE_INTERLEAVEdepending on the value of the combine attribute._pattern- The pattern to be defined.- Throws:
BuildException
-
makeDiv
public Div makeDiv()
Description copied from interface:GrammarSectionCalled when <div> is found.- Specified by:
makeDivin interfaceGrammarSection- Returns:
- the returned
Divobject will receive callbacks for structures inside the <div> element.
-
makeInclude
public Include makeInclude()
Description copied from interface:GrammarSectionReturns null if already in an include.- Specified by:
makeIncludein interfaceGrammarSection
-
topLevelAnnotation
public void topLevelAnnotation(ParsedElementAnnotation _ea) throws BuildException
Description copied from interface:GrammarSectionCalled when an annotation is found.- Specified by:
topLevelAnnotationin interfaceGrammarSection- Throws:
BuildException
-
topLevelComment
public void topLevelComment(CommentList _comments) throws BuildException
Description copied from interface:GrammarSectionCalled when a comment is found.- Specified by:
topLevelCommentin interfaceGrammarSection- Throws:
BuildException
-
-