'From the list of commands names, find the exact match or
set of potential matches that we are looking for'

@staticmethod
def build_command_tree(command_table):

    result = {}
    for command in command_table:
        index = result
        parts = command.split()
        for part in parts[:(-1)]:
            if (part not in index):
                index[part] = {}
            index = index[part]
        index[parts[(-1)]] = command_table[command]
    return result
