def p_track(t):
    """track : TRACK track_mode track_flags
             | TRACK track_mode sub_channel_mode track_flags"""
    from audiotools.toc import TOCTrack
    if len(t) == 4:
        t[0] = TOCTrack(mode=t[2], flags=t[3])
    else:
        t[0] = TOCTrack(mode=t[2], flags=t[4], sub_channel_mode=t[3])
