Parses the given `argv` and returns a dictionary mapping argument names
        to the values found in `argv`.

def parse(self, argv):
        """
        Parses the given `argv` and returns a dictionary mapping argument names
        to the values found in `argv`.
        """
        rv = {}
        for pattern in self.patterns:
            pattern.apply(rv, argv)
        return rv