Package edu.tufts.hrilab.action
Class ScriptParser
java.lang.Object
edu.tufts.hrilab.action.ScriptParser
This class is mostly to help with finding the relevant parts of a
control block (e.g., while, if/else, for, etc).
NOTE: now this class is only needed for CONTROL types and could probably be
removed if the ActionScriptLanguageParser class and EventSpec classes handled grouping the bodies
of controls into single EventSpec instances. This would require EventSpecs to optionally contain children
EventSpecs, but the ASLParser should be able to easily handle this, since it's already parsing the actual ASL files.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ScriptParser
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
getType
Get the EventType of the next EventSpec.- Returns:
-
getEventSpec
Returns the next EventSpec.- Returns:
-
getCommand
The command in String form. Mostly just useful for debugging.- Returns:
-
getBody
In the case of a control EventSpec, this returns the body the of control. For example, for While control, the body consists of the condition, and all the contents in the "do" block.- Returns:
-
getRest
-