Package com.scriptbasic.interfaces
Interface CommandFactory
- All Known Implementing Classes:
BasicCommandFactory
public interface CommandFactory
A
CommandFactory analyzes a BASIC program line and creates a
Command that is the result of the analysis.- Author:
- Peter Verhas date June 15, 2012
-
Method Details
-
create
Create a Command that starts with the keyword.- Parameters:
commandKeyword- the command keyword lexeme ornullin case the command does not start with a keyword (e.g. procedure call or assignment or a DSL sentence)- Returns:
- the created command
- Throws:
AnalysisException- is there is a lexical or syntax exception if there is some error with the command factory itself and it can not analyze the line and does not know what the error is. (probably the syntax of the line is totally wrong)
-