public class Rule
extends java.lang.Object
Constructor and Description |
---|
Rule(java.lang.String nonterminalSymbol,
java.lang.String terminalSymbol,
java.lang.String contentModel)
Creates a new instance of the production 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.
|
java.lang.String |
getContentModel()
Returns a regular expression from the production rule.
|
Automaton |
getGlushkovAutomaton()
Returns the Glushkov automaton for an associated regular expression.
|
java.lang.String |
getNonterminalSymbol()
Returns a nonterminal symbol from the production rule.
|
java.lang.String |
getTerminalSymbol()
Returns a terminal symbol from the production rule.
|
public Rule(java.lang.String nonterminalSymbol, java.lang.String terminalSymbol, java.lang.String contentModel)
nonterminalSymbol
- Nonterminal on a right-hand side.terminalSymbol
- Terminal on a left-hand side.contentModel
- Regular expression on a left-hand side.public java.lang.String getNonterminalSymbol()
public java.lang.String getTerminalSymbol()
public java.lang.String getContentModel()
public java.util.Set<java.lang.String> getAllowedNonterminals()
public Automaton getGlushkovAutomaton()