Parse a backtick expression.
@return BacktickNode
432435
private function backtick() {
    $node = new BacktickNode();
    $this->mustMatch('`', $node);
    $this->encapsList($node, '`', TRUE);
    $this->mustMatch('`', $node, NULL, TRUE);
    return $node;
  }
1272282
protected function parseFirstLine():self
	{
		$line= $this->getLine();

		if( '@'===$line->getChar(0) ){
			return $this->setExtending($line);
		}

		$this->docType= $line->content;
		$docTypeContent= $this->getConfig('doc_types') or $this->throw("DocType $this->docType is not supported");

		$this->indentation= $this->htsl->getConfig('indentation',$this->docType) ?? ( function( $scalarOrFalse ){ return is_scalar($scalarOrFalse)?$scalarOrFalse:false; } )($this->htsl->getConfig('indentation'));

		return $this->appendLine($docTypeContent);
	}
1217469
private function formatBacktrace() {

		$backtrace = $this -> error -> getBacktrace();
		
		if(null !== $backtrace) {

			array_shift($backtrace);
			array_shift($backtrace);

			foreach($backtrace as $index => $stack) {

				foreach(['type', 'args'] as $type) {

					if(true === isset($backtrace[$index][$type])) {
						unset($backtrace[$index][$type]);
					}
				}
			}
		}

		return $backtrace;
	}
837139
public function parse()
    {
        $counter = 0;
        $continue = true;
        while ($continue) {
            $continue = $this->readNextChunk();

            ++$counter;
            if (!isset($this->rootNode)) {
                // Find root node
                if (isset($this->customRootNode)) {
                    $customRootNodePos = strpos($this->chunk, "<{$this->customRootNode}");
                    if (false !== $customRootNodePos) {
                        // Found custom root node
                        // Support attributes
                        $closer = strpos(substr($this->chunk, $customRootNodePos), '>');
                        $readFromChunkPos = $customRootNodePos + $closer + 1;

                        // Custom child node?
                        if (isset($this->customChildNode)) {
                            // Find it in the chunk
                            $customChildNodePos = strpos(substr($this->chunk, $readFromChunkPos), "<{$this->customChildNode}");
                            if (false !== $customChildNodePos) {
                                // Found it!
                                $readFromChunkPos = $readFromChunkPos + $customChildNodePos;
                            } else {
                                // Didn't find it - read a larger chunk and do everything again
                                continue;
                            }
                        }

                        $this->rootNode = $this->customRootNode;
                        $this->readFromChunkPos = $readFromChunkPos;
                    } else {
                        // Clear chunk to save memory, it doesn't contain the root anyway
                        $this->readFromChunkPos = 0;
                        $this->chunk = '';
                        continue;
                    }
                } else {
                    // XML1.0 standard allows almost all Unicode characters even Chinese and Cyrillic.
                    // see: http://en.wikipedia.org/wiki/XML#International_use
                    preg_match('/<([^>\?]+)>/', $this->chunk, $matches);
                    if (isset($matches[1])) {
                        // Found root node
                        $this->rootNode = $matches[1];
                        $this->readFromChunkPos = strpos($this->chunk, $matches[0]) + strlen($matches[0]);
                    } else {
                        // Clear chunk to save memory, it doesn't contain the root anyway
                        $this->readFromChunkPos = 0;
                        $this->chunk = '';
                        continue;
                    }
                }
            }

            while (true) {
                $fromChunkPos = substr($this->chunk, $this->readFromChunkPos);

                // Find element
                // XML1.0 standard allows almost all Unicode characters even Chinese and Cyrillic.
                // see: http://en.wikipedia.org/wiki/XML#International_use
                preg_match('/<([^>]+)>/', $fromChunkPos, $matches);
                if (isset($matches[1])) {
                    // Found element
                    $element = $matches[1];

                    // Is there an end to this element tag?
                    $spacePos = strpos($element, ' ');
                    $crPos = strpos($element, "\r");
                    $lfPos = strpos($element, "\n");
                    $tabPos = strpos($element, "\t");

                    // find min. (exclude false, as it would convert to int 0)
                    $aPositionsIn = array($spacePos, $crPos, $lfPos, $tabPos);
                    $aPositions = array();
                    foreach ($aPositionsIn as $iPos) {
                        if (false !== $iPos) {
                            $aPositions[] = $iPos;
                        }
                    }

                    $minPos = $aPositions === array() ? false : min($aPositions);

                    if (false !== $minPos && 0 != $minPos) {
                        $sElementName = substr($element, 0, $minPos);
                        $endTag = '</'.$sElementName.'>';
                    } else {
                        $sElementName = $element;
                        $endTag = "</$sElementName>";
                    }

                    $endTagPos = false;

                    // try selfclosing first!
                    // NOTE: selfclosing is inside the element
                    $lastCharPos = strlen($element) - 1;
                    if ('/' == substr($element, $lastCharPos)) {
                        $endTag = '/>';
                        $endTagPos = $lastCharPos;

                        $iPos = strpos($fromChunkPos, '<');
                        if (false !== $iPos) {
                            // correct difference between $element and $fromChunkPos
                            // "+1" is for the missing '<' in $element
                            $endTagPos += $iPos + 1;
                        }
                    }

                    if (false === $endTagPos) {
                        $endTagPos = strpos($fromChunkPos, $endTag);
                    }

                    if (false !== $endTagPos) {
                        // Found end tag
                        $endTagEndPos = $endTagPos + strlen($endTag);
                        $elementWithChildren = trim(substr($fromChunkPos, 0, $endTagEndPos));

                        $continueParsing = $this->processNode($elementWithChildren, $sElementName, $this->nodeIndex++);
                        $this->chunk = substr($this->chunk, strpos($this->chunk, $endTag) + strlen($endTag));
                        $this->readFromChunkPos = 0;

                        if (isset($continueParsing) && false === $continueParsing) {
                            $this->chunkCompleted();
                            break 2;
                        }
                    } else {
                        break;
                    }
                } else {
                    break;
                }
            }
            $this->chunkCompleted();
        }

        return isset($this->rootNode);
        fclose($this->handle);
    }
212269
private function functionCallParameter() {
    switch ($this->currentType) {
      case '&':
        return $this->writeVariable();
      case T_ELLIPSIS:
        $node = new SplatNode();
        $this->mustMatch(T_ELLIPSIS, $node);
        $node->addChild($this->expr(), 'expression');
        return $node;
      default:
        return $this->expr();
    }
  }
949345
protected function parseExamples()
    {
        $token = $this->expectTokenType('Examples');

        $keyword = $token['keyword'];

        return new ExampleTableNode($this->parseTableRows(), $keyword);
    }
516475
public function QuantifiedExpression()
    {
        $lookaheadType = $this->lexer->lookahead['type'];
        $value         = $this->lexer->lookahead['value'];

        if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) {
            $this->syntaxError('ALL, ANY or SOME');
        }

        $this->match($lookaheadType);
        $this->match(Lexer::T_OPEN_PARENTHESIS);

        $qExpr       = new AST\QuantifiedExpression($this->Subselect());
        $qExpr->type = $value;

        $this->match(Lexer::T_CLOSE_PARENTHESIS);

        return $qExpr;
    }
18197
protected function parseBranch()
	{
		// Record the control structure
		$structure = $this->captureStructure();

		// Record the output expressions at the start of this branch
		$head = $this->captureOutput();
		$body = '';
		$tail = [];

		$braces = 0;
		do
		{
			$tail = $this->mergeOutput($tail, array_reverse($this->captureOutput()));
			if ($this->tokens[$this->i] === '}' && !$braces)
			{
				break;
			}

			$body .= $this->serializeOutput(array_reverse($tail));
			$tail  = [];

			if ($this->tokens[$this->i][0] === T_IF)
			{
				$child = $this->parseIfBlock();

				// If this is the start of current branch, what's been optimized away and moved
				// outside, before the child branch is the head of this one. Otherwise it's just
				// part of its body
				if ($body === '')
				{
					$head = $this->mergeOutput($head, $child['before']);
				}
				else
				{
					$body .= $this->serializeOutput($child['before']);
				}

				$body .= $child['source'];
				$tail  = $child['after'];
			}
			else
			{
				$body .= $this->serializeToken($this->tokens[$this->i]);

				if ($this->tokens[$this->i] === '{')
				{
					++$braces;
				}
				elseif ($this->tokens[$this->i] === '}')
				{
					--$braces;
				}
			}
		}
		while (++$this->i < $this->cnt);

		return [
			'structure' => $structure,
			'head'      => $head,
			'body'      => $body,
			'tail'      => $tail
		];
	}
486869
public function parseLines()
    {
        $text = [];

        while (($line = $this->nextLine()) !== false) {
            $line = rtrim($line);

            // Skip empty lines
            if ($line == "") {
                $text[] = null;
                continue;
            }

            // Look at start of line to detect valid blocktypes
            $blockTypes = [];
            $marker = $line[0];
            if (isset($this->blockTypes[$marker])) {
                foreach ($this->blockTypes[$marker] as $blockType) {
                    $blockTypes[] = $blockType;
                }
            }

            // Check if line is matching a detected blocktype
            foreach ($blockTypes as $blockType) {
                if ($this->{"block".$blockType}($line)) {
                    continue;
                }
            }
        }

        $text = implode("\n", $this->lines);

        return [
            "text" => $text,
            "frontmatter" => $this->frontmatter,
        ];
    }
474755
public function toArrayNode() {
    return ($this->parent instanceof ArrayNode) ? clone $this->parent : Parser::parseExpression('[' . $this->getText() . ']');
  }
1060035
private function exprList() {
    $node = new CommaListNode();
    do {
      $node->addChild($this->expr());
    } while ($this->tryMatch(',', $node));
    return $node;
  }
517935
public function parse() : string
	{
		foreach($this->getters as $getter) 
		{
			$token = $getter->parse();
			if($token) {
				return $token;
			}
		}
		return '';
	}
821430
public static function backTrace() {

        $str = "<br />[backTrace]";
        foreach (debug_backtrace() as $row) {
            $str .= "<br />FILE: "
                    . $row['file'] . " FUNC: " . $row['function']
                    . " LINE: " . $row['line'] . " ARGS: "
                    . print_r($row['args'], true);
        }
        return $str;
    }
325579
public function evaluate()
    {
        $content = $this->getValue();

        /** @var $node NodeInterface */
        $node = $this->fusionValue('node');
        if (!$node instanceof NodeInterface) {
            return $content;
        }

        /** @var $property string */
        $property = $this->fusionValue('property');

        /** @var $contentContext ContentContext */
        $contentContext = $node->getContext();
        if ($contentContext->getWorkspaceName() === 'live') {
            return $content;
        }

        if (!$this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess')) {
            return $content;
        }

        if ($node->isRemoved()) {
            $content = '';
        }
        return $this->contentElementEditableService->wrapContentProperty($node, $property, $content);
    }
1114226
public function parse(){
		$where = $order = $group = $limit = $q = '';
		$source = $this->parseSource();

		if($this->stmt->getConditions())
			$where = $this->parseWhere();
		if($this->stmt instanceof Result && $this->stmt->getGrouping())
			$group = $this->parseGrouping();
		if($this->stmt->getSorting())
			$order = $this->parseSorting();

		$this->clauses = array($source, $where, $group, $order);

		if($this->stmt->getType() === Manager::STMT_SELECT)
			$q = $this->parseSelectStmt();
		elseif($this->stmt->getType() === Manager::STMT_INSERT)
			$q = $this->parseInsertStmt();
		elseif($this->stmt->getType() === Manager::STMT_UPDATE)
			$q = $this->parseUpdateStmt();
		elseif($this->stmt->getType() === Manager::STMT_DELETE)
			$q = $this->parseDeleteStmt();

		return trim($q);
	}
458422
protected function parseParams():self
	{
		$params= preg_split('/(?<!\\\\)\\|/',$this->line->pregGet('/^-[\w-:]+\((.*?)\)(?= |(\\{>)?$)/',1));

		if( ($m= count($params)) != ($n= count($this->config['params'])) ){$this->document->throw("Tag $this->name has $n parameters $m given.");}

		array_map(function( $key, $value ){return $this->setAttribute($key,$this->checkExpression(str_replace('\\|','|',$value)));},$this->config['params'],$params);

		return $this;
	}
652409
function _expression()
	{
		// If it's a string return a string node
		if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->_current_token)) {
			$tmp = str_replace('""', '"', $this->_current_token);
			if (($tmp == '"') || ($tmp == '')) $tmp = '""';	//	Trap for "" that has been used for an empty string
			$result = $this->_createTree($tmp, '', '');
			$this->_advance();
			return $result;
        // If it's an error code
        } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->_current_token) or $this->_current_token == '#N/A'){
		    $result = $this->_createTree($this->_current_token, 'ptgErr', '');
		    $this->_advance();
		    return $result;
		// If it's a negative value
        } elseif ($this->_current_token == "-") {
			// catch "-" Term
			$this->_advance();
			$result2 = $this->_expression();
			$result = $this->_createTree('ptgUminus', $result2, '');
			return $result;
        // If it's a positive value
		} elseif ($this->_current_token == "+") {
			// catch "+" Term
			$this->_advance();
			$result2 = $this->_expression();
			$result = $this->_createTree('ptgUplus', $result2, '');
			return $result;
		}
		$result = $this->_term();
		while (($this->_current_token == "+") or
			   ($this->_current_token == "-") or
			   ($this->_current_token == "^")) {
		/**/
			if ($this->_current_token == "+") {
				$this->_advance();
				$result2 = $this->_term();
				$result = $this->_createTree('ptgAdd', $result, $result2);
			} elseif ($this->_current_token == "-") {
				$this->_advance();
				$result2 = $this->_term();
				$result = $this->_createTree('ptgSub', $result, $result2);
			} else {
				$this->_advance();
				$result2 = $this->_term();
				$result = $this->_createTree('ptgPower', $result, $result2);
			}
		}
		return $result;
	}