- java.lang.Object
-
- com.sun.tools.rngom.parse.compact.CompactSyntax
-
- All Implemented Interfaces:
ValidationContext,CompactSyntaxConstants,Context
public class CompactSyntax extends Object implements Context, CompactSyntaxConstants
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.CompactSyntaxTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface com.sun.tools.rngom.parse.compact.CompactSyntaxConstants
AFTER_DOCUMENTATION, AFTER_SINGLE_LINE_COMMENT, BASE_CHAR, COMBINING_CHAR, DEFAULT, DIGIT, DOCUMENTATION, DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT, DOCUMENTATION_CONTINUE, EOF, ESCAPED_IDENTIFIER, EXTENDER, FANNOTATE, IDENTIFIER, IDEOGRAPHIC, ILLEGAL_CHAR, LETTER, LITERAL, NCNAME, NEWLINE, NMCHAR, NMSTART, NOT_NEWLINE, PREFIX_STAR, PREFIXED_NAME, SINGLE_LINE_COMMENT, SINGLE_LINE_COMMENT_CONTINUE, tokenImage, WS
-
-
Constructor Summary
Constructors Constructor Description CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs)CompactSyntax(CompactSyntaxTokenManager tm)Constructor with generated Token Manager.CompactSyntax(InputStream stream)Constructor with InputStream.CompactSyntax(InputStream stream, String encoding)Constructor with InputStream and supplied encodingCompactSyntax(Reader stream)Constructor.
-
Method Summary
-
-
-
Field Detail
-
token_source
public CompactSyntaxTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
CompactSyntax
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs)
-
CompactSyntax
public CompactSyntax(InputStream stream)
Constructor with InputStream.
-
CompactSyntax
public CompactSyntax(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
-
CompactSyntax
public CompactSyntax(Reader stream)
Constructor.
-
CompactSyntax
public CompactSyntax(CompactSyntaxTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
resolveNamespacePrefix
public String resolveNamespacePrefix(String prefix)
- Specified by:
resolveNamespacePrefixin interfaceValidationContext
-
prefixes
public Enumeration prefixes()
Description copied from interface:ContextEnumerates the prefixes bound to namespaces.
-
getBaseUri
public String getBaseUri()
- Specified by:
getBaseUriin interfaceValidationContext
-
isUnparsedEntity
public boolean isUnparsedEntity(String entityName)
- Specified by:
isUnparsedEntityin interfaceValidationContext
-
isNotation
public boolean isNotation(String notationName)
- Specified by:
isNotationin interfaceValidationContext
-
copy
public Context copy()
Description copied from interface:ContextReturns the immutable snapshot of thisContext.
-
Input
public final ParsedPattern Input(Scope scope) throws ParseException
- Throws:
ParseException
-
TopLevelLookahead
public final void TopLevelLookahead() throws ParseException- Throws:
ParseException
-
LookaheadAfterAnnotations
public final void LookaheadAfterAnnotations() throws ParseException- Throws:
ParseException
-
LookaheadGrammarKeyword
public final void LookaheadGrammarKeyword() throws ParseException- Throws:
ParseException
-
LookaheadDocumentation
public final void LookaheadDocumentation() throws ParseException- Throws:
ParseException
-
LookaheadBody
public final void LookaheadBody() throws ParseException- Throws:
ParseException
-
IncludedGrammar
public final ParsedPattern IncludedGrammar(IncludedGrammar g) throws ParseException
- Throws:
ParseException
-
TopLevelGrammar
public final ParsedPattern TopLevelGrammar(Scope scope) throws ParseException
- Throws:
ParseException
-
Preamble
public final void Preamble() throws ParseException- Throws:
ParseException
-
NamespaceDecl
public final void NamespaceDecl() throws ParseException- Throws:
ParseException
-
NamespaceName
public final String NamespaceName() throws ParseException
- Throws:
ParseException
-
DatatypesDecl
public final void DatatypesDecl() throws ParseException- Throws:
ParseException
-
AnnotatedPrimaryExpr
public final ParsedPattern AnnotatedPrimaryExpr(boolean topLevel, Scope scope, Token[] except) throws ParseException
- Throws:
ParseException
-
PrimaryExpr
public final ParsedPattern PrimaryExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) throws ParseException
- Throws:
ParseException
-
EmptyExpr
public final ParsedPattern EmptyExpr(Annotations a) throws ParseException
- Throws:
ParseException
-
TextExpr
public final ParsedPattern TextExpr(Annotations a) throws ParseException
- Throws:
ParseException
-
NotAllowedExpr
public final ParsedPattern NotAllowedExpr(Annotations a) throws ParseException
- Throws:
ParseException
-
Expr
public final ParsedPattern Expr(boolean topLevel, Scope scope, Token t, Annotations a) throws ParseException
- Throws:
ParseException
-
UnaryExpr
public final ParsedPattern UnaryExpr(boolean topLevel, Scope scope, boolean[] hadOccur, Token[] except) throws ParseException
- Throws:
ParseException
-
ElementExpr
public final ParsedPattern ElementExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
AttributeExpr
public final ParsedPattern AttributeExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
NameClass
public final ParsedNameClass NameClass(int context, Annotations[] pa) throws ParseException
- Throws:
ParseException
-
AnnotateAfter
public final ParsedNameClass AnnotateAfter(ParsedNameClass nc) throws ParseException
- Throws:
ParseException
-
NameClassAlternatives
public final ParsedNameClass NameClassAlternatives(int context, ParsedNameClass nc, Annotations[] pa) throws ParseException
- Throws:
ParseException
-
BasicNameClass
public final ParsedNameClass BasicNameClass(int context) throws ParseException
- Throws:
ParseException
-
PrimaryNameClass
public final ParsedNameClass PrimaryNameClass(int context, Annotations a) throws ParseException
- Throws:
ParseException
-
OpenNameClass
public final ParsedNameClass OpenNameClass(int context, Annotations a) throws ParseException
- Throws:
ParseException
-
UnprefixedNameClass
public final ParsedNameClass UnprefixedNameClass(int context, Annotations a) throws ParseException
- Throws:
ParseException
-
PrefixedNameClass
public final ParsedNameClass PrefixedNameClass(Annotations a) throws ParseException
- Throws:
ParseException
-
NsNameExceptClass
public final ParsedNameClass NsNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException
- Throws:
ParseException
-
NsName
public final com.sun.tools.rngom.parse.compact.CompactSyntax.LocatedString NsName() throws ParseException- Throws:
ParseException
-
AnyNameExceptClass
public final ParsedNameClass AnyNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException
- Throws:
ParseException
-
ParenNameClass
public final ParsedNameClass ParenNameClass(int context, Annotations a) throws ParseException
- Throws:
ParseException
-
ExceptNameClass
public final ParsedNameClass ExceptNameClass(int context) throws ParseException
- Throws:
ParseException
-
ListExpr
public final ParsedPattern ListExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
MixedExpr
public final ParsedPattern MixedExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
GrammarExpr
public final ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
ParenExpr
public final ParsedPattern ParenExpr(boolean topLevel, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
GrammarBody
public final Annotations GrammarBody(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
GrammarComponent
public final void GrammarComponent(GrammarSection section, Scope scope) throws ParseException
- Throws:
ParseException
-
Definition
public final void Definition(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
Start
public final void Start(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
Define
public final void Define(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
AssignOp
public final GrammarSection.Combine AssignOp() throws ParseException
- Throws:
ParseException
-
Include
public final void Include(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
IncludeBody
public final Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
IncludeComponent
public final void IncludeComponent(GrammarSection section, Scope scope) throws ParseException
- Throws:
ParseException
-
Div
public final void Div(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
IncludeDiv
public final void IncludeDiv(GrammarSection section, Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
ExternalRefExpr
public final ParsedPattern ExternalRefExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
Inherit
public final String Inherit() throws ParseException
- Throws:
ParseException
-
ParentExpr
public final ParsedPattern ParentExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
IdentifierExpr
public final ParsedPattern IdentifierExpr(Scope scope, Annotations a) throws ParseException
- Throws:
ParseException
-
ValueExpr
public final ParsedPattern ValueExpr(boolean topLevel, Annotations a) throws ParseException
- Throws:
ParseException
-
DataExpr
public final ParsedPattern DataExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) throws ParseException
- Throws:
ParseException
-
DatatypeName
public final Token DatatypeName() throws ParseException
- Throws:
ParseException
-
Identifier
public final com.sun.tools.rngom.parse.compact.CompactSyntax.LocatedString Identifier() throws ParseException- Throws:
ParseException
-
Prefix
public final String Prefix() throws ParseException
- Throws:
ParseException
-
UnprefixedName
public final com.sun.tools.rngom.parse.compact.CompactSyntax.LocatedString UnprefixedName() throws ParseException- Throws:
ParseException
-
Params
public final void Params(DataPatternBuilder dpb) throws ParseException
- Throws:
ParseException
-
Param
public final void Param(DataPatternBuilder dpb) throws ParseException
- Throws:
ParseException
-
Except
public final ParsedPattern Except(Scope scope, Token[] except) throws ParseException
- Throws:
ParseException
-
Documentation
public final ParsedElementAnnotation Documentation() throws ParseException
- Throws:
ParseException
-
Annotations
public final Annotations Annotations() throws ParseException
- Throws:
ParseException
-
AnnotationAttribute
public final void AnnotationAttribute(Annotations a) throws ParseException
- Throws:
ParseException
-
PrefixedAnnotationAttribute
public final void PrefixedAnnotationAttribute(Annotations a, boolean nested) throws ParseException
- Throws:
ParseException
-
UnprefixedAnnotationAttribute
public final void UnprefixedAnnotationAttribute(Annotations a) throws ParseException
- Throws:
ParseException
-
AnnotationElement
public final ParsedElementAnnotation AnnotationElement(boolean nested) throws ParseException
- Throws:
ParseException
-
AnnotationElementNotKeyword
public final ParsedElementAnnotation AnnotationElementNotKeyword() throws ParseException
- Throws:
ParseException
-
PrefixedAnnotationElement
public final ParsedElementAnnotation PrefixedAnnotationElement(boolean nested) throws ParseException
- Throws:
ParseException
-
UnprefixedAnnotationElement
public final ParsedElementAnnotation UnprefixedAnnotationElement() throws ParseException
- Throws:
ParseException
-
IdentifierAnnotationElement
public final ParsedElementAnnotation IdentifierAnnotationElement() throws ParseException
- Throws:
ParseException
-
AnnotationElementContent
public final void AnnotationElementContent(ElementAnnotationBuilder eab) throws ParseException
- Throws:
ParseException
-
AnnotationElementLiteral
public final void AnnotationElementLiteral(ElementAnnotationBuilder eab) throws ParseException
- Throws:
ParseException
-
Literal
public final String Literal() throws ParseException
- Throws:
ParseException
-
LocatedLiteral
public final com.sun.tools.rngom.parse.compact.CompactSyntax.LocatedString LocatedLiteral() throws ParseException- Throws:
ParseException
-
Keyword
public final Token Keyword() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(InputStream stream, String encoding)
Reinitialise.
-
ReInit
public void ReInit(Reader stream)
Reinitialise.
-
ReInit
public void ReInit(CompactSyntaxTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-