Grammar
, Serializable
RELAXNGGrammar
public class TREXGrammar extends ReferenceExp implements Grammar
The exp
field keeps the start pattern.
Modifier and Type | Class | Description |
---|---|---|
static class |
TREXGrammar.RefContainer |
Modifier and Type | Field | Description |
---|---|---|
DataTypeVocabularyMap |
dataTypes |
data type vocabularies used and defined by this grammar.
|
TREXGrammar.RefContainer |
namedPatterns |
named patterns which are defined by using <define> element.
|
protected TREXGrammar |
parentGrammar |
in case of nested grammar, this variable points to the parent grammar.
|
ExpressionPool |
pool |
ExpressionPool that is associated with this grammar
|
anyString, epsilon, nullSet, verifierTag
exp, name
Constructor | Description |
---|---|
TREXGrammar() |
|
TREXGrammar(ExpressionPool pool) |
|
TREXGrammar(ExpressionPool pool,
TREXGrammar parentGrammar) |
Modifier and Type | Method | Description |
---|---|---|
TREXGrammar |
getParentGrammar() |
gets a parent TREXGrammar.
|
ExpressionPool |
getPool() |
gets ExpressionPool object which was used to construct this grammar.
|
Expression |
getTopLevel() |
gets the start pattern.
|
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
calcEpsilonReducibility, calcHashCode, equals, isDefined, visit, visit, visit, visit
public final TREXGrammar.RefContainer namedPatterns
public final ExpressionPool pool
protected final TREXGrammar parentGrammar
public final DataTypeVocabularyMap dataTypes
public TREXGrammar(ExpressionPool pool, TREXGrammar parentGrammar)
parentGrammar
- this object is used to resolve <ref> element with parent
attribute.public TREXGrammar(ExpressionPool pool)
public TREXGrammar()
public Expression getTopLevel()
getTopLevel
in interface Grammar
public ExpressionPool getPool()
Grammar
public final TREXGrammar getParentGrammar()
Copyright © 2019 Oracle Corporation. All rights reserved.