Feeds some more data into parser
 @return [void]
513858
def read_more(size)
      return if @parser.finished?

      value = @socket.readpartial(size, @buffer)
      if value == :eof
        @parser << ""
        :eof
      elsif value
        @parser << value
      end
    rescue IOError, SocketError, SystemCallError => ex
      raise ConnectionError, "error reading from socket: #{ex}", ex.backtrace
    end
1267627
def parse(data, options = {})

      return nil if data.nil? || data == ""
      json = get_json_structure(data, options)
      parse_json(json)

    end
1059190
def load
      resp = @client.describe_tags(filters: [
        {
          name: "key",
          values: [@key]
        },
        {
          name: "value",
          values: [@value]
        }
      ])
      @data = resp.tags[0]
      self
    end
960258
def many(p):
    

    @Parser
    def _many(tokens, s):
        """Iterative implementation preventing the stack overflow."""
        res = []
        try:
            while True:
                (v, s) = p.run(tokens, s)
                res.append(v)
        except NoParseError, e:
            return res, State(s.pos, e.state.max)

    _many.name = u'{ %s }' % p.name
    return _many
644485
function FeedParser() {
    this.current_tag = null;
    var parser       = this.parser = sax.parser(true,
        { trim: true
        , normalize: true
        })
      , _this        = this;
    
    parser.onopentag  = function(tag) { _this.open(tag); };
    parser.onclosetag = function(tag) { _this.close(tag); };
    
    parser.onerror = function() { this.error = undefined; }
    parser.ontext  = function(text) { _this.ontext(text); };
    parser.oncdata = function(text) { _this.ontext(text); };
    parser.onend   = function() { _this.onend(); };
  }
64702
public function parse()
    {
        if ($this->arfMail !== true) {
            $this->feedName = 'default';

            // As this is a generic FBL parser we need to see which was the source and add the name
            // to the report, so its origin is clearly shown.
            $source = $this->parsedMail->getHeader('from');
            foreach (config("{$this->configBase}.parser.aliases") as $from => $alias) {
                if (preg_match($from, $source)) {
                    // If there is an alias, prefer that name instead of the from address
                    $source = $alias;

                    // If there is an more specific feed configuration prefer that config over the default
                    if (!empty(config("{$this->configBase}.feeds.{$source}"))) {
                        $this->feedName = $source;
                    }
                }
            }

            // If feed is known and enabled, validate data and save report
            if ($this->isKnownFeed() && $this->isEnabledFeed()) {
                // To get some more consitency, remove "\r" from the report.
                $this->arfMail['report'] = str_replace("\r", "", $this->arfMail['report']);

                // Build up the report
                preg_match_all(
                    "/([\w\-]+): (.*)[ ]*\n/m",
                    $this->arfMail['report'],
                    $matches
                );

                $report = array_combine($matches[1], $matches[2]);

                if (empty($report['Received-Date'])) {
                    if (!empty($report['Arrival-Date'])) {
                        $report['Received-Date'] = $report['Arrival-Date'];
                        unset($report['Arrival-Date']);
                    }
                }

                // Now parse the headers from the spam messages and add it to the report
                if (!empty($this->arfMail['evidence'])) {
                    $spamMessage = new MimeParser();
                    $spamMessage->setText($this->arfMail['evidence']);
                    $report['headers'] = $spamMessage->getHeaders();
                } else {
                    $this->failed(
                        'The e-mail received at the parser is not RFC822 compliant, and therefor not a FBL message'
                    );
                }

                // Also add the spam message body to the report
                $report['body'] = $spamMessage->getMessageBody();

                // Sanity check
                if ($this->hasRequiredFields($report) === true) {

                    // incident has all requirements met, filter and add!
                    $report = $this->applyFilters($report);

                    $incident = new Incident();
                    $incident->source      = $source; // FeedName
                    $incident->source_id   = false;
                    $incident->ip          = $report['Source-IP'];
                    $incident->domain      = false;
                    $incident->class       = config("{$this->configBase}.feeds.{$this->feedName}.class");
                    $incident->type        = config("{$this->configBase}.feeds.{$this->feedName}.type");
                    $incident->timestamp   = strtotime($report['Received-Date']);
                    $incident->information = json_encode($report);

                    $this->incidents[] = $incident;

                }
            }
        }

        return $this->success();
    }
82780
public function feed()
    {
        if (isset( $_POST[$this->name] )
            && $this->name !== 'uri' && $this->name !== 'classUri'
        ) {
            $this->setValue( tao_helpers_Uri::decode( $_POST[$this->name] ) );
        }
    }
409249
public function parse()
    {
        if ($this->getProtocol()==='RSS') {
            // channel
            $parser                 = new Parser($this->xml->channel, $this, 'channel');
            $channel                = $parser->getData();
            $channel->protocol      = strtolower($this->getProtocol());
            $this->setData($channel);

            // items
            $this->items            = new XMLObjectsCollection($this->xml->channel);
            foreach ($this->items as $i=>$item) {
                $parser             = new Parser($item, $this, 'item');
                $item               = $parser->getData();
                $item->protocol     = strtolower($this->getProtocol());
                $item->id           = $this->id.'_'.Helper::encodeStringToId($item->title->content);
                $this->items->addData($i, $item);
            }
        } elseif ($this->getProtocol()==='ATOM') {
            // entry
            $parser             = new Parser($this->xml, $this, 'feed');
            $channel            = $parser->getData();
            $channel->protocol  = strtolower($this->getProtocol());
            $this->setData($channel);

            // entry
            $this->items            = new XMLObjectsCollection($this->xml);
            foreach ($this->items as $i=>$item) {
                $parser             = new Parser($item, $this, 'feed');
                $item               = $parser->getData();
                $item->protocol     = strtolower($this->getProtocol());
                $item->id           = $this->id.'_'.Helper::encodeStringToId($item->title->content);
                $this->items->addData($i, $item);
            }
        }
    }
142756
def add(*arguments)
      Element.parse(arguments.flatten, @options).each do |element|
        data << element.added_to_bibliography(self)
      end
      self
    end
963903
protected function parse()
    {
        $this->parseParam('sort');
        $this->parseParam('fields');
        $this->parseParam('limit');
        if ($this->isEloquentBuilder()) {
            $this->parseParam('with');
        }
        $this->parseFilter();
    }
437570
def parse!
      check_absorption!

      @expected.each do |type, *rest|
        case type
        when :list
          parse_list!(*rest)
        else
          parse_type!(type, *rest)
        end
      end

      self
    end
241829
def feed(self, data):
        
        send = self._send_to_parser
        draw = self.listener.draw
        match_text = self._text_pattern.match
        taking_plain_text = self._taking_plain_text

        length = len(data)
        offset = 0
        while offset < length:
            if taking_plain_text:
                match = match_text(data, offset)
                if match:
                    start, offset = match.span()
                    draw(data[start:offset])
                else:
                    taking_plain_text = False
            else:
                taking_plain_text = send(data[offset:offset + 1])
                offset += 1

        self._taking_plain_text = taking_plain_text
301087
final protected function parseRow(): void
    {
        // only parse the next row if only one in buffer
        if (\count($this->bufferedRow) > 1) {
            return;
        }
        if (feof($this->file)) {
            $this->currentRow = null;

            return;
        }

        $this->currentRowEnded = false;
        // read file until row is ended
        while (!$this->currentRowEnded && !feof($this->file)) {
            $data = fread($this->file, 1024);
            xml_parse($this->parser, $data);
        }
    }
409972
private String parseRssFeed(String feed) {
        String[] result = feed.split("<br />");
        String[] result2 = result[2].split("<BR />");

        return result2[0];
    }
554703
def feed(self, data):
        
        self.buffer += data
        while len(self.buffer) >= 6:
            self.next_packet()
511788
public function feed()
    {
        common_Logger::t('Evaluating AsyncFile ' . $this->getName(), array(
            'TAO'));
        if (isset($_POST[$this->name])) {
            $struct = json_decode($_POST[$this->name], true);
            if ($struct !== false) {
                $this->setValue($struct);
            } else {
                common_Logger::w('Could not unserialise AsyncFile field ' . $this->getName(), array(
                    'TAO'));
            }
        }
    }
338075
def next_feed(feed = nil)
      return Feed.load_xml(get_collection(collection_uri).body) if feed.nil?
      return nil unless feed.has_next?
      Feed.load_xml(get_collection(feed.next_uri).body)
    end