public abstract class AbstractGrammar extends Object implements Grammar
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
The grammar name
|
protected HashMap<Tag,GrammarTransition>[] |
transitions
Table of transitions.
|
| Constructor and Description |
|---|
AbstractGrammar() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeAction(Dsmlv2Container container)
This method, when called, executes an action on the current data stored in
the container.
|
String |
getName()
Returns the grammar's name
|
Enum<Dsmlv2StatesEnum>[] |
getStatesEnum()
Gets the states of the current grammar
|
GrammarTransition |
getTransition(Enum<Dsmlv2StatesEnum> state,
Tag tag)
Gets the transition associated with the state and tag
|
void |
setName(String name)
Sets the grammar's name
|
protected HashMap<Tag,GrammarTransition>[] transitions
protected String name
public String getName()
public void setName(String name)
public GrammarTransition getTransition(Enum<Dsmlv2StatesEnum> state, Tag tag)
state - The current statetag - The current tagpublic Enum<Dsmlv2StatesEnum>[] getStatesEnum()
getStatesEnum in interface Grammarpublic void executeAction(Dsmlv2Container container) throws org.xmlpull.v1.XmlPullParserException, IOException
executeAction in interface Grammarcontainer - the DSML containerorg.xmlpull.v1.XmlPullParserException - when an unrecoverable error occursIOException - when an IO error occursCopyright © 2021. All rights reserved.