def p_constructor(p):
    """constructor : CONID types
                   | CONID
                   | CONID type_record
    """
    if len(p) == 3 and p[2][0] == 'map':
        p[0] = [p[1], p[2]]
    elif len(p) == 2:
        p[0] = [p[1], ['list', []]]
    else:
        p[0] = [p[1], ['list', p[2]]]
