public class Context
extends java.lang.Object
Constructor and Description |
---|
Context(Rule baseRule,
Grammar grammarRef)
Creates a new instance of a grammar context for a given rule.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAllowedNonterminals()
Returns the set of symbols with occurrence in the content model.
|
Rule |
getBaseRule()
Returns the base production rule associated with the context.
|
Automaton |
getGlushkovAutomaton()
Returns the Glushkov automaton for an associated regular expression.
|
void |
printDebugDump(java.lang.String indentPrefix)
Prints the debugging dump of the grammar context.
|
java.util.List<java.lang.String> |
resolveTerminalSymbols(java.lang.String nonterminalSymbol)
Translates the given nonterminal symbol into terminal symbols.
|
public Rule getBaseRule()
public java.util.Set<java.lang.String> getAllowedNonterminals()
public Automaton getGlushkovAutomaton()
public java.util.List<java.lang.String> resolveTerminalSymbols(java.lang.String nonterminalSymbol)
nonterminalSymbol
- Nonterminal symbol to be translated.public void printDebugDump(java.lang.String indentPrefix)
indentPrefix
- Indentation string.