code: def Oper(klass, *kinds, **kwargs):
      
      @action(Seq(*map(Loc, kinds)), loc=kwargs.get("loc", None))
      def rule(parser, *tokens):
          return klass(loc=tokens[0].join(tokens[-1]))
      return rule
docs: A rule that accepts a sequence of tokens of kinds ``kinds`` and returns
      an instance of ``klass`` with ``loc`` encompassing the entire sequence
      or None if the first token is not of ``kinds[0]``.