'type ::= sum Id ( fields )'

def p_type_2(self, (sum, id, _0, attributes, _1)):

    if (id.value != 'attributes'):
        raise ASDLSyntaxError(id.lineno, msg=('expected    attributes,    found    %s' % id))
    if attributes:
        attributes.reverse()
    return Sum(sum, attributes)
