package org.teamstbf.yats.logic.parser;

import org.teamstbf.yats.logic.commands.Command;
import org.teamstbf.yats.logic.commands.ListCommand;

/**
 * Parses input arguments and creates a new ListCommand object
 */
public class ListCommandParser {

	/**
	 * Parses the given {@code String} of arguments in the context of the ListCommand
	 * and returns a ListCommand object for execution.
	 */
	public Command parse(String args) {
		// if (args.contains(ListCommand.COMMAND_WORD_EXTENTION)) {
		//	switch(args) {
		//	case (ListCommand.COMMAND_WORD_SUFFIX_TITLE):
		//	case (ListCommand.COMMAND_WORD_SUFFIX_DEADLINE):
		//	case (ListCommand.COMMAND_WORD_SUFFIX_TIMING):
		//	case (ListCommand.COMMAND_WORD_SUFFIX_TAG):
		return new ListCommand();
	}
}

@@ -246,13 +246,55 @@
  %7B%0A%0A
+%09private final int LISTCOMMANDSUFFIX = 3;%0A
 %09/**%0A
-
 %09 * 
@@ -472,98 +472,46 @@
 %7B%0A%09%09
-// if (args.contains(ListCommand.COMMAND_WORD_EXTENTION)) %7B%0A%09%09//%09switch
+switch(stringTokenizer
 (args)
+)
  %7B%0A%09
-%09//
 %09case
- 
 (Lis
@@ -545,32 +545,57 @@
 X_TITLE):%0A%09%09
-//
+%09return new ListCommand();%0A%09
 %09case
- 
 (ListCommand
@@ -632,133 +632,222 @@
 :%0A%09%09
-//%09case (ListCommand.COMMAND_WORD_SUFFIX_TIMING):%0A%09%09//%09case (ListCommand.COMMAND_WORD_SUFFIX_TAG):%0A%09%09return new ListCommand()
+%09return new ListCommand();%0A%09%09%7D%0A%09%09return new ListCommand();%0A%09%7D%0A%0A%09public String stringTokenizer(String commandText) %7B%0A%09%09String commandTextArray%5B%5D = commandText.split(%22 %22);%0A%09%09return commandTextArray%5BLISTCOMMANDSUFFIX%5D
 ;%0A%09%7D

Update ListCommandParser