package parser;

import java.io.File;

public class Parser {

    CommandFactory commandFactory = new CommandFactory();

    public Parser() {
    }
    
    
    /**
     * Accepts a file for parsing
     * 
     * @param file
     * file to parse
     */
    public void parseCommandFile(File file)  {
        
    }
    
    /**
     * Accepts a command for parsing.  Should utilize the command factory's addCommand method
     * 
     * @param command
     * command to parse
     */
    public void parseCommand(String command) {
        
    }
    
}

@@ -25,20 +25,83 @@
 java.io.
-File
+ByteArrayInputStream;%0Aimport java.io.InputStream;%0Aimport commands.*
 ;%0A%0Apubli
@@ -122,23 +122,32 @@
  %7B%0A%0A    
+private 
 Command
+s
 Factory 
@@ -149,24 +149,25 @@
 tory command
+s
 Factory = ne
@@ -169,210 +169,194 @@
  = n
-ew CommandFactory();%0A%0A    public Parser() %7B%0A    %7D%0A    %0A    %0A    /**%0A     * Accepts a file for parsing%0A     * %0A     * @param file%0A     * file to parse%0A     */%0A    public void parseCommandFile(File file) 
+ull;%0A    private LogoParser logoParser;%0A%0A    public Parser(CommandsFactory commandsFactory) %7B%0A        this.commandsFactory = commandsFactory;%0A    %7D%0A   %0A    public void createLogoParser()
  %7B%0A 
@@ -366,239 +366,285 @@
     
-%0A    %7D%0A    %0A    /**%0A     * Accepts a command for parsing.  Should utilize the command factory's addCommand method%0A     * %0A     * @param command%0A     * command to parse%0A     */%0A    public void parseCommand(String command) %7B%0A        
+logoParser = new LogoParser(System.in);%0A    %7D%0A    %0A    public ICommand parse(String input) throws Exception %7B%0A        InputStream inputStream = new ByteArrayInputStream(input.getBytes());%0A        logoParser.ReInit(inputStream);%0A        return logoParser.parse(commandsFactory);
 %0A   

Implement parser