def p_track(t):
    """track : TRACK NUMBER tracktype trackitems"""
    from audiotools.cue import Track
    indexes = []
    args = {}
    for key, value in t[4]:
        if key == 'index':
            indexes.append(value)
        else:
            args[key] = value
    t[0] = Track(number=t[2], track_type=t[3], indexes=indexes, **args)
