types : type
                 | type COMMA types

def p_types(self, p):
        '''types : type
                 | type COMMA types'''
        if len(p) == 2:
            p[0] = tuple((t,) for t in p[1])
        else:
            p[0] = tuple((t,) + ts for t in p[1] for ts in p[3])