'Raises BitReaderError'

def _parse(self, r, length):

    def bits_left():
        return ((length * 8) - r.get_position())
    self.audioObjectType = self._get_audio_object_type(r)
    self.samplingFrequency = self._get_sampling_freq(r)
    self.channelConfiguration = r.bits(4)
    self.sbrPresentFlag = (-1)
    self.psPresentFlag = (-1)
    if (self.audioObjectType in (5, 29)):
        self.extensionAudioObjectType = 5
        self.sbrPresentFlag = 1
        if (self.audioObjectType == 29):
            self.psPresentFlag = 1
        self.extensionSamplingFrequency = self._get_sampling_freq(r)
        self.audioObjectType = self._get_audio_object_type(r)
        if (self.audioObjectType == 22):
            self.extensionChannelConfiguration = r.bits(4)
    else:
        self.extensionAudioObjectType = 0
    if (self.audioObjectType in (1, 2, 3, 4, 6, 7, 17, 19, 20, 21, 22, 23)):
        try:
            GASpecificConfig(r, self)
        except NotImplementedError:
            return
    else:
        return
    if (self.audioObjectType in (17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 39)):
        epConfig = r.bits(2)
        if (epConfig in (2, 3)):
            return
    if ((self.extensionAudioObjectType != 5) and (bits_left() >= 16)):
        syncExtensionType = r.bits(11)
        if (syncExtensionType == 695):
            self.extensionAudioObjectType = self._get_audio_object_type(r)
            if (self.extensionAudioObjectType == 5):
                self.sbrPresentFlag = r.bits(1)
                if (self.sbrPresentFlag == 1):
                    self.extensionSamplingFrequency = self._get_sampling_freq(r)
                    if (bits_left() >= 12):
                        syncExtensionType = r.bits(11)
                        if (syncExtensionType == 1352):
                            self.psPresentFlag = r.bits(1)
            if (self.extensionAudioObjectType == 22):
                self.sbrPresentFlag = r.bits(1)
                if (self.sbrPresentFlag == 1):
                    self.extensionSamplingFrequency = self._get_sampling_freq(r)
                self.extensionChannelConfiguration = r.bits(4)
