|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.tools.tags.ActionTagsParser
An ECMAScript action tags parser for tags embedded in JSGF RuleGrammars. A typical use of this class is to create an instance of it and then call the parseTags method using RuleParse's generated by a RuleGrammar. The instance will maintain a context/scope between calls to parseTags.
parseTags(javax.speech.recognition.RuleParse)
,
ActionTagsUtilities
Constructor Summary | |
ActionTagsParser()
Create a new ECMATagsParser. |
Method Summary | |
static java.lang.String |
debug(java.lang.String string)
A debug utility that can be referenced within ECMAScript source. |
java.lang.Object |
evaluateString(java.lang.String script)
Evaluate the given ECMAScript script as ECMAScript within the context/scope of this parser. |
java.lang.Object |
get(java.lang.String name)
Get the given object from the result value after a RuleParse has been parsed with the parseTags method. |
java.lang.Object |
getGlobal(java.lang.String name)
Get the given object from the global context/scope of the parser. |
void |
parseTags(RuleParse ruleParse)
Convert the tags embedded in the RuleParse to ECMAScript and then process them within the scope of this parser. |
static void |
print(java.lang.String string)
A debug utility that can be referenced within ECMAScript source. |
java.lang.String |
showValue()
A debug utility to show the result value after a RuleParse has been parsed with the parseTags method. |
java.lang.String |
toString()
Recurse through the properties in the context/scope of this parser and generate a String from them. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ActionTagsParser()
parseTags(javax.speech.recognition.RuleParse)
Method Detail |
public void parseTags(RuleParse ruleParse)
ruleParse
- the RuleParse from a RuleGrammar.get(java.lang.String)
public java.lang.Object evaluateString(java.lang.String script)
script
- a String containing ECMAScript to be evaluated
public java.lang.Object getGlobal(java.lang.String name)
name
- the name of the object to get
parseTags(javax.speech.recognition.RuleParse)
public java.lang.Object get(java.lang.String name)
name
- the name of the object to get
parseTags(javax.speech.recognition.RuleParse)
public static void print(java.lang.String string)
string
- the string to send to System.outpublic static java.lang.String debug(java.lang.String string)
ActionTagsUtilities.setDebugging(boolean)
public java.lang.String toString()
public java.lang.String showValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |