<commit_before>package seedu.address.logic.parser;

import seedu.address.logic.commands.Command;
import seedu.address.logic.commands.IncorrectCommand;

/**
 * Parses user input.
 */
public class TaskTrackerParser {

    private final SubcommandParser parser = new SubcommandParser()
            .putSubcommand("add", new AddTaskParser())
            .putSubcommand("edit", new EditCommandParser())
            .putSubcommand("del", new DeleteCommandParser())
            .putSubcommand("fin", new MarkFinishedCommandParser())
            .putSubcommand("clear", new ClearCommandParser())
            .putSubcommand("exit", new ExitCommandParser())
            .putSubcommand("help", new HelpCommandParser())
            .putSubcommand("setdatadir", new SetDataDirectoryParser())
            ;

    /**
     * Parses user input into command for execution.
     *
     * @param userInput full user input string
     * @return the command based on the user input
     */
    public Command parseCommand(String userInput) {
        try {
            return parser.parse(userInput);
        } catch (ParseException e) {
            return new IncorrectCommand(e.getMessage());
        }
    }

}<commit_msg>Parser: add support of HideFinishedTaskParser and ShowAllTaskParser in TaskTrackerParser<commit_after>package seedu.address.logic.parser;

import seedu.address.logic.commands.Command;
import seedu.address.logic.commands.IncorrectCommand;

/**
 * Parses user input.
 */
public class TaskTrackerParser {

    private final SubcommandParser parser = new SubcommandParser()
            .putSubcommand("add", new AddTaskParser())
            .putSubcommand("edit", new EditCommandParser())
            .putSubcommand("del", new DeleteCommandParser())
            .putSubcommand("fin", new MarkFinishedCommandParser())
            .putSubcommand("hide-finished", new HideFinishedTaskParser())
            .putSubcommand("view", new ShowAllTaskParser())
            .putSubcommand("clear", new ClearCommandParser())
            .putSubcommand("exit", new ExitCommandParser())
            .putSubcommand("help", new HelpCommandParser())
            .putSubcommand("setdatadir", new SetDataDirectoryParser())
            ;

    /**
     * Parses user input into command for execution.
     *
     * @param userInput full user input string
     * @return the command based on the user input
     */
    public Command parseCommand(String userInput) {
        try {
            return parser.parse(userInput);
        } catch (ParseException e) {
            return new IncorrectCommand(e.getMessage());
        }
    }

}
{'fraction_non_alphanumeric': 0.10332950631458095, 'fraction_numerical': 0.0, 'mean_word_length': 2.777456647398844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2768435', 'n_tokens_mistral': 670, 'n_tokens_neox': 658, 'n_words': 166}