protected function processingInstruction() {
        if ($this->scanner->current() != '?') {
            return false;
        }

        $tok = $this->scanner->next();
        $procName = $this->scanner->getAsciiAlpha();
        $white = strlen($this->scanner->whitespace());

        // If not a PI, send to bogusComment.
        if (strlen($procName) == 0 || $white == 0 || $this->scanner->current() == false) {
            $this->parseError("Expected processing instruction name, got $tok");
            $this->bogusComment('<?' . $tok . $procName);
            return true;
        }

        $data = '';
        // As long as it's not the case that the next two chars are ? and >.
        while (!($this->scanner->current() == '?' && $this->scanner->peek() == '>')) {
            $data .= $this->scanner->current();

            $tok = $this->scanner->next();
            if ($tok === false) {
                $this->parseError("Unexpected EOF in processing instruction.");
                $this->events->processingInstruction($procName, $data);
                return true;
            }
        }

        $this->scanner->next(); // >
        $this->scanner->next(); // Next token.
        $this->events->processingInstruction($procName, $data);
        return true;
    }