Parses the show.
196858
private CheckpointQueryBuilder parseCheckpoint(CheckpointQueryBuilder query)
  {
    Token token = scanToken();

    if (token != Token.IDENTIFIER) {
      throw error("Expected IDENTIFIER at {0}", token);
    }
    
    String pod = _lexeme;
    String name;
    
    if (peekToken() == Token.DOT) {
      scanToken();

      if ((token = scanToken()) != Token.IDENTIFIER) {
        throw error("Expected IDENTIFIER at {0}", token);
      }
      
      name = _lexeme; 
    }
    else {
      name = pod;
      pod = getPodName();
    }
    
    query.setTableName(pod + '.' + name);

    return query;
  }
604472
def parse(self):
        
        if self.parse_string is not None and self._parse is None:
            self._parse = Tree.parse(self._parse_string)
        return self._parse
753320
def parse(text, showToc=True):
	""""""
	p = Parser(show_toc=showToc)
	return p.parse(text)
1195336
protected function parse()
    {
        $lines = explode("\n", $this->comment);

        $current_annotation = null;
        $value = null;
        foreach ($lines as $line)
        {
            $line = trim(ltrim($line, "/* \t"));

            if (preg_match("/^@(\w+)( (.*))?$/", $line, $matches) === 1)
            {
                if (!empty($value))
                    $this->annotations[$current_annotation][] = $value;

                $current_annotation = $matches[1];
                $value = $matches[3] ?? '';
            }
            elseif ($current_annotation !== null)
            {
                $value .= "\n" . $line;
            }
            else
            {
                $this->preamble[] = $line;
            }
        }

        if (!empty($value))
            $this->annotations[$current_annotation][] = rtrim($value);
    }
1293532
public function parse()
    {
        // only parse user agents containing hbbtv fragment
        if (!$this->isHbbTv()) {
            return false;
        }

        parent::parse();

        // always set device type to tv, even if no model/brand could be found
        $this->deviceType = self::DEVICE_TYPE_TV;

        return true;
    }
1174464
private function parseFacts(): void
    {
        // Split the record into facts
        if ($this->gedcom) {
            $gedcom_facts = preg_split('/\n(?=1)/s', $this->gedcom);
            array_shift($gedcom_facts);
        } else {
            $gedcom_facts = [];
        }
        if ($this->pending) {
            $pending_facts = preg_split('/\n(?=1)/s', $this->pending);
            array_shift($pending_facts);
        } else {
            $pending_facts = [];
        }

        $this->facts = [];

        foreach ($gedcom_facts as $gedcom_fact) {
            $fact = new Fact($gedcom_fact, $this, md5($gedcom_fact));
            if ($this->pending !== null && !in_array($gedcom_fact, $pending_facts, true)) {
                $fact->setPendingDeletion();
            }
            $this->facts[] = $fact;
        }
        foreach ($pending_facts as $pending_fact) {
            if (!in_array($pending_fact, $gedcom_facts, true)) {
                $fact = new Fact($pending_fact, $this, md5($pending_fact));
                $fact->setPendingAddition();
                $this->facts[] = $fact;
            }
        }
    }
1152196
public final void parse() {
        Collection<Keyword> unsupportedRestKeywords = new LinkedList<>();
        unsupportedRestKeywords.addAll(Arrays.asList(DefaultKeyword.UNION, DefaultKeyword.INTERSECT, DefaultKeyword.EXCEPT, DefaultKeyword.MINUS));
        unsupportedRestKeywords.addAll(Arrays.asList(getUnsupportedKeywordsRest()));
        lexerEngine.unsupportedIfEqual(unsupportedRestKeywords.toArray(new Keyword[unsupportedRestKeywords.size()]));
    }
600302
public function parse(){
		while($this->parser->hasText()){
			if(!preg_match('/\s+(.+?):\s*((\s*(".+?"|[^"]+?)\s*)(\s*,\s*(".+?"|[^"]+?)\s*)*)((;\s*})|(;|\}))/is', $this->parser->getText(), $matches)) throw new \Exception("Invalid property at '".substr($this->parser->getText(), 0, 20)."'");
			$this->parser->move(strlen($matches[0]));
			
			$this->propertySet->setProperty($matches[1], $matches[2]);
			
			if(strpos(end($matches), '}')) break;
		}
	}
305740
public function parse()
    {
        $annotations = ['rest' => []];
        foreach ($this->classes as $c) {
            $classAnnotations = $this->annotationsFromClass($c->getName())->toArray();
            if (isset($classAnnotations['rest'])) {
                $annotations['rest'] = array_merge($classAnnotations['rest'], $annotations['rest']);
            }
        }
        $annotations = new ConfigObject($annotations);

        $this->classDefaults = $annotations->get('rest', new ConfigObject([]));

        // get method annotations
        $annotations = ['rest' => [], 'param' => []];
        foreach ($this->classes as $c) {
            try {
                $methodAnnotations = $this->annotationsFromMethod($c->getName(), $this->method->name)->toArray();
            } catch (\Exception $e) {
                continue;
            }
            if (isset($methodAnnotations['rest']) && is_array($methodAnnotations['rest'])) {
                $annotations['rest'] = array_merge($methodAnnotations['rest'], $annotations['rest']);
            }
            if (isset($methodAnnotations['param'])) {
                if (is_array($methodAnnotations['param'])) {
                    $annotations['param'] = array_merge($methodAnnotations['param'], $annotations['param']);
                } else {
                    $annotations['param'][] = $methodAnnotations['param'];
                }

            }
        }

        $annotations = new ConfigObject($annotations);

        $restAnnotations = $annotations->get('rest', new ConfigObject([]));
        $paramAnnotations = $annotations->get('param', new ConfigObject([]));

        // check if we should ignore this method
        if ($restAnnotations->get('ignore', false) !== false) {
            return false;
        }

        // create ApiMethod instance
        $parsedMethod = new ParsedMethod($this->method->name);

        // method
        $parsedMethod->method = $this->getMethod($restAnnotations);
        // role
        $parsedMethod->role = $this->getRole($restAnnotations);
        // cache.ttl
        $parsedMethod->cache = $this->getCache($restAnnotations);
        // header.cache.expires
        $parsedMethod->header = $this->getHeader($restAnnotations);
        // default
        $parsedMethod->default = $this->getDefault($restAnnotations);
        // rateControl.ignore
        $parsedMethod->rateControl = $this->getRateControl($restAnnotations);

        // parse method parameters
        $parameterParser = new ParameterParser($this->method->getParameters(), $paramAnnotations);
        $parameters = $parameterParser->parse();
        foreach ($parameters as $p) {
            $parsedMethod->addParameter($p);
        }

        // build the url pattern
        if ($restAnnotations->get('url', false)) {
            // build url pattern using the provided rest.url pattern
            $urlPattern = $this->buildUrlPatternFromPattern($restAnnotations->get('url'), $parameters);
            $resourceNaming = true;
        } else {
            // build url pattern using method name and parameters
            $urlPattern = $this->buildUrlPatternStandard($this->method->name, $parameters);
            $resourceNaming = false;
        }

        $parsedMethod->setUrlPattern($urlPattern, $resourceNaming);

        return $parsedMethod;
    }
31621
public function parse()
    {
        if (isset($this->raw->data)) {
            $this->setData($this->raw->data);
        }

        if (isset($this->raw->included)) {
            $this->setIncluded($this->raw->included);
        }

        if (isset($this->raw->links)) {
            $this->setLinks($this->raw->links);
        }

        if (isset($this->raw->meta)) {
            $this->setMeta($this->raw->meta);
        }

        if (isset($this->raw->errors)) {
            $this->setErrors($this->raw->errors);
        }

        return $this;
    }
1008827
public function parse()
    {
        $parents = array();

        // flag : are we in a <pre> Tag ?
        $tagPreIn = false;

        // action to use for each line of the content of a <pre> Tag
        $tagPreBr = array(
                    'name' => 'br',
                    'close' => false,
                    'param' => array(
                        'style' => array(),
                        'num'    => 0
                    )
                );

        // tag that can be not closed
        $tagsNotClosed = array(
            'br', 'hr', 'img', 'col',
            'input', 'link', 'option',
            'circle', 'ellipse', 'path', 'rect', 'line', 'polygon', 'polyline'
        );

        // search the HTML tags
        $tmp = array();
        $this->_searchCode($tmp);

        // all the actions to do
        $actions = array();

        // foreach part of the HTML code
        foreach ($tmp as $part) {
            // if it is a tag code
            if ($part[0]=='code') {
                // analise the HTML code
                $res = $this->_analiseCode($part[1]);

                // if it is a real HTML tag
                if ($res) {
                    // save the current posistion in the HTML code
                    $res['html_pos'] = $part[2];

                    // if the tag must be closed
                    if (!in_array($res['name'], $tagsNotClosed)) {
                        // if it is a closure tag
                        if ($res['close']) {
                            // HTML validation
                            if (count($parents)<1)
                                throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
                            else if ($parents[count($parents)-1]!=$res['name'])
                                throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
                            else
                                unset($parents[count($parents)-1]);
                        } else {
                            // if it is a autoclosed tag
                            if ($res['autoclose']) {
                                // save the opened tag
                                $actions[] = $res;

                                // prepare the closed tag
                                $res['params'] = array();
                                $res['close'] = true;
                            }
                            // else :add a child for validation
                            else
                                $parents[count($parents)] = $res['name'];
                        }

                        // if it is a <pre> tag (or <code> tag) not auclosed => update the flag
                        if (($res['name']=='pre' || $res['name']=='code') && !$res['autoclose']) {
                            $tagPreIn = !$res['close'];
                        }
                    }

                    // save the actions to convert
                    $actions[] = $res;
                } else { // else (it is not a real HTML tag => we transform it in Texte
                    $part[0]='txt';
                }
            }
            // if it is text
            if ($part[0]=='txt') {
                // if we are not in a <pre> tag
                if (!$tagPreIn) {
                    // save the action
                    $actions[] = array(
                        'name'    => 'write',
                        'close'    => false,
                        'param' => array('txt' => $this->_prepareTxt($part[1])),
                    );
                } else { // else (if we are in a <pre> tag)
                    // prepare the text
                    $part[1] = str_replace("\r", '', $part[1]);
                    $part[1] = explode("\n", $part[1]);

                    // foreach line of the text
                    foreach ($part[1] as $k => $txt) {
                        // transform the line
                        $txt = str_replace("\t", self::HTML_TAB, $txt);
                        $txt = str_replace(' ', '&nbsp;', $txt);

                        // add a break line
                        if ($k>0) $actions[] = $tagPreBr;

                        // save the action
                        $actions[] = array(
                            'name'    => 'write',
                            'close'    => false,
                            'param' => array('txt' => $this->_prepareTxt($txt, false)),
                        );
                    }
                }
            }
        }

        // for each indentified action, we have to clean up the begin and the end of the texte
        // based on tags that surround it

        // list of the tags to clean
        $tagsToClean = array(
            'page', 'page_header', 'page_footer', 'form',
            'table', 'thead', 'tfoot', 'tr', 'td', 'th', 'br',
            'div', 'hr', 'p', 'ul', 'ol', 'li',
            'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
            'bookmark', 'fieldset', 'legend',
            'draw', 'circle', 'ellipse', 'path', 'rect', 'line', 'g', 'polygon', 'polyline',
            'option'
        );

        // foreach action
        $nb = count($actions);
        for ($k=0; $k<$nb; $k++) {
            // if it is a Text
            if ($actions[$k]['name']=='write') {
                // if the tag before the text is a tag to clean => ltrim on the text
                if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean))
                    $actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);

                // if the tag after the text is a tag to clean => rtrim on the text
                if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean))
                    $actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);

                // if the text is empty => remove the action
                if (!strlen($actions[$k]['param']['txt']))
                    unset($actions[$k]);
            }
        }

        // if we are not on the level 0 => HTML validator ERROR
        if (count($parents)) throw new HTML2PDF_exception(5, $parents);

        // save the actions to do
        $this->code = array_values($actions);
    }
433243
def parse(link):
    
    html = get_html(link)

    data = {'rating': get_rating(html),
            'name': get_name_date(html)[0]}

    div = html.find(id="title-episode-widget")
    season_tags = get_a(div, find="season=")
    episodes = {}
    for slink in season_tags:
        for e in episode_list(slink):
            season, d = parse_episode(e)
            if season in episodes:
                episodes[season].append(d)
            else:
                episodes[season] = [d]
    data['episodes'] = episodes
    return data
452668
public function parse()
    {
        if ($this->isParsed()) {
            return;
        }

        $this->parsed = true;

        // skip parsing for empty useragents or those not containing any letter
        if (empty($this->userAgent) || !preg_match('/([a-z])/i', $this->userAgent)) {
            return;
        }

        $this->parseBot();
        if ($this->isBot()) {
            return;
        }

        $this->parseOs();

        /**
         * Parse Clients
         * Clients might be browsers, Feed Readers, Mobile Apps, Media Players or
         * any other application accessing with an parseable UA
         */
        $this->parseClient();

        $this->parseDevice();
    }
534033
public function parse()
    {
        // Fetch the basic values from possible user defined values.
        if ($this->entity->hasConfig("labels")) {
            if ($this->entity->hasConfig("labels.singular_name")) {
                $this->singular = $this->entity->getConfig("labels.singular_name");
            } elseif ($this->entity->hasConfig("labels.name")) {
                $this->plural = $this->entity->getConfig("labels.name");
            }
        }

        if (!empty($this->singular) && empty($this->plural)) {
            $this->plural = Inflector::pluralize($this->singular);
        }

        if (!empty($this->plural) && empty($this->singular)) {
            $this->singular = Inflector::singularize($this->plural);
        }

        // If nothing is sent in, guess the name from the object name.
        if (empty($this->plural) && empty($this->singular)) {
            $this->singular   = ucfirst(Inflector::singularize($this->entity->getShortName()));
            $this->plural     = ucfirst(Inflector::pluralize($this->entity->getShortName()));
        }
    }
275278
def parse(data)
      rss = SimpleRSS.parse data
      news = Array.new

      rss.items.each do |item|
        news_item = NewsItem.new(item.title, item.link, item.description.force_encoding("UTF-8"), item.pubDate)

        news.push news_item
      end

      unless @limit.nil?
        news.take(@limit)
      else
        news
      end
    end
402953
public function parseText() : void
    {
        if (!count($this->stream->getTokens())) {
            return;
        }

        if ($this->accept(Token::T_TEXT)) {
            $this->insert(new TextNode($this->getCurrentToken()->getValue()));
            $this->advance();
        }
    }
767443
private void parseResults() {
        logger.entering();

        if (result.getStatus() == ITestResult.SUCCESS) {
            this.status = "Passed";
        } else if (result.getStatus() == ITestResult.FAILURE) {
            this.status = "Failed";
        } else if (result.getStatus() == ITestResult.SKIP) {
            this.status = "Skipped";
        } else if (result.getStatus() == ITestResult.STARTED) {
            this.status = "Running";
        }

        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(result.getStartMillis());
        this.startTime = ReporterDateFormatter.getISO8601String(c.getTime());
        c.setTimeInMillis(result.getEndMillis());
        this.endTime = ReporterDateFormatter.getISO8601String(c.getTime());

        if (result.getMethod().getDescription() != null) {
            this.description = result.getMethod().getDescription();
        }

        if (result.getThrowable() != null) {
            this.exception = result.getThrowable().getClass().toString() + ":"
                    + result.getThrowable().getLocalizedMessage();
            this.stacktrace = getStackTraceInfo(result.getThrowable());
        }

        loadMethodInfo(result);

        logger.exiting();
    }