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 Summary

    Modifier and Type Method Description
    Command create​(java.lang.String commandKeyword)
    Create a Command that starts with the keyword.
  • Method Details

    • create

      Command create​(java.lang.String commandKeyword) throws AnalysisException
      Create a Command that starts with the keyword.
      Parameters:
      commandKeyword - the command keyword lexeme or null in 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)