Interface Command
-
- All Known Implementing Classes:
BreakCommand
,DELETECommand
,ErrorCommand
,GETCommand
,IfCommand
,InsertCommand
,POSTCommand
,PrintCommand
,PUTCommand
,RemoveCommand
,SetCommand
,WaitCommand
,WhileCommand
public interface Command
Interface describing what a command needs to do.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
parseAndExecute(ScriptParser sp, TokenStream currentStream)
Parse and execute.void
parseAndSkip(ScriptParser sp, TokenStream currentStream)
Parse and skip.
-
-
-
Method Detail
-
parseAndExecute
boolean parseAndExecute(ScriptParser sp, TokenStream currentStream) throws ScriptException
Parse and execute. Parsing begins right after the command name, and should stop before the trailing semicolon.- Parameters:
sp
- is the script parser to use to help in the parsing.currentStream
- is the current token stream.- Returns:
- true to send a break signal, false otherwise.
- Throws:
ScriptException
-
parseAndSkip
void parseAndSkip(ScriptParser sp, TokenStream currentStream) throws ScriptException
Parse and skip. Parsing begins right after the command name, and should stop before the trailing semicolon.- Parameters:
sp
- is the script parser to use to help in the parsing.currentStream
- is the current token stream.- Throws:
ScriptException
-
-