Top Description Inners Fields Methods
com.sun.tools.rngom.ast.builder

public Interface GrammarSection<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>

Known Direct Subinterfaces
com.sun.tools.rngom.ast.builder.Include, com.sun.tools.rngom.ast.builder.IncludedGrammar, com.sun.tools.rngom.ast.builder.Scope, com.sun.tools.rngom.ast.builder.Div, com.sun.tools.rngom.ast.builder.Grammar
Known Direct Implementers
com.sun.tools.rngom.parse.host.GrammarSectionHost
Imports
com.sun.tools.rngom.ast.om.Location, .ParsedElementAnnotation, .ParsedPattern

The container that can have <define> elements.

Div, Grammar, Include, or IncludedGrammar.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final GrammarSection.Combine
public static final GrammarSection.Combine
public static final String

Method Summary

Modifier and TypeMethod and Description
public void
define(String
Name of the pattern. For the definition by a <start/> element, this parameter is the same as START. to test if it's a named pattern definition or the start pattern definition.
name
,
GrammarSection.Combine
null or COMBINE_CHOICE or COMBINE_INTERLEAVE depending on the value of the combine attribute.
combine
,
P
The pattern to be defined.
pattern
,
L loc, A anno)

Called when a pattern is defined.

public Div<P, E, L, A, CL>

Returns:

the returned Div object will receive callbacks for structures inside the <div> element.
makeDiv
()

Called when <div> is found.

public Include<P, E, L, A, CL>
makeInclude()

Returns null if already in an include.

public void
topLevelAnnotation(E ea)

Called when an annotation is found.

public void
topLevelComment(CL comments)

Called when a comment is found.

Field Detail

COMBINE_CHOICEback to summary
public static final GrammarSection.Combine COMBINE_CHOICE
COMBINE_INTERLEAVEback to summary
public static final GrammarSection.Combine COMBINE_INTERLEAVE
STARTback to summary
public static final String START

Method Detail

defineback to summary
public void define(String name, GrammarSection.Combine combine, P pattern, L loc, A anno) throws BuildException

Called when a pattern is defined.

Parameters
name:String

Name of the pattern. For the definition by a <start/> element, this parameter is the same as START. to test if it's a named pattern definition or the start pattern definition.

combine:GrammarSection.Combine

null or COMBINE_CHOICE or COMBINE_INTERLEAVE depending on the value of the combine attribute.

pattern:P

The pattern to be defined.

makeDivback to summary
public Div<P, E, L, A, CL> makeDiv()

Called when <div> is found.

Returns:Div<P, E, L, A, CL>

the returned Div object will receive callbacks for structures inside the <div> element.

makeIncludeback to summary
public Include<P, E, L, A, CL> makeInclude()

Returns null if already in an include.

topLevelAnnotationback to summary
public void topLevelAnnotation(E ea) throws BuildException

Called when an annotation is found.

topLevelCommentback to summary
public void topLevelComment(CL comments) throws BuildException

Called when a comment is found.

com.sun.tools.rngom.ast.builder back to summary

public final Class GrammarSection.Combine

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private final String name

Constructor Detail

Combineback to summary
private Combine(String name)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.