Package com.sun.tools.rngom.parse.host
Class GrammarSectionHost
java.lang.Object
com.sun.tools.rngom.parse.host.Base
com.sun.tools.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 com.sun.tools.rngom.ast.builder.GrammarSection
GrammarSection.Combine -
Field Summary
Fields inherited from interface com.sun.tools.rngom.ast.builder.GrammarSection
COMBINE_CHOICE, COMBINE_INTERLEAVE, START -
Method Summary
Modifier and TypeMethodDescriptionvoiddefine(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.voidCalled when an annotation is found.voidtopLevelComment(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: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
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
Description copied from interface:GrammarSectionReturns null if already in an include.- Specified by:
makeIncludein interfaceGrammarSection
-
topLevelAnnotation
Description copied from interface:GrammarSectionCalled when an annotation is found.- Specified by:
topLevelAnnotationin interfaceGrammarSection- Throws:
BuildException
-
topLevelComment
Description copied from interface:GrammarSectionCalled when a comment is found.- Specified by:
topLevelCommentin interfaceGrammarSection- Throws:
BuildException
-