Package org.kohsuke.rngom.parse.host
Class GrammarSectionHost
java.lang.Object
org.kohsuke.rngom.parse.host.Base
org.kohsuke.rngom.parse.host.GrammarSectionHost
- All Implemented Interfaces:
GrammarSection
- Direct Known Subclasses:
DivHost
,IncludeHost
,ScopeHost
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.kohsuke.rngom.ast.builder.GrammarSection
GrammarSection.Combine
-
Field Summary
Fields inherited from interface org.kohsuke.rngom.ast.builder.GrammarSection
COMBINE_CHOICE, COMBINE_INTERLEAVE, START
-
Method Summary
Modifier and TypeMethodDescriptionvoid
define
(String name, GrammarSection.Combine combine, ParsedPattern _pattern, Location _loc, Annotations _anno) Called when a pattern is defined.makeDiv()
Called when<div>
is found.Returns null if already in an include.void
Called when an annotation is found.void
topLevelComment
(CommentList _comments) Called when a comment is found.
-
Method Details
-
define
public void define(String name, GrammarSection.Combine combine, ParsedPattern _pattern, Location _loc, Annotations _anno) throws BuildException Description copied from interface:GrammarSection
Called when a pattern is defined.- Specified by:
define
in 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_CHOICE
orGrammarSection.COMBINE_INTERLEAVE
depending on the value of the combine attribute._pattern
- The pattern to be defined.- Throws:
BuildException
-
makeDiv
Description copied from interface:GrammarSection
Called when<div>
is found.- Specified by:
makeDiv
in interfaceGrammarSection
- Returns:
- the returned
Div
object will receive callbacks for structures inside the<div>
element.
-
makeInclude
Description copied from interface:GrammarSection
Returns null if already in an include.- Specified by:
makeInclude
in interfaceGrammarSection
-
topLevelAnnotation
Description copied from interface:GrammarSection
Called when an annotation is found.- Specified by:
topLevelAnnotation
in interfaceGrammarSection
- Throws:
BuildException
-
topLevelComment
Description copied from interface:GrammarSection
Called when a comment is found.- Specified by:
topLevelComment
in interfaceGrammarSection
- Throws:
BuildException
-