protected function generateRegex(
        string $regex,
        ?NodeInterface $parent,
        ?string $name
    ): NodeInterface{
        $node   = new RegexNode($this, $parent, $name);

        $node->setRegex($regex);

        return $node;
    }
protected function generateRegex(
        string $regex,
        ?NodeInterface $parent,
        ?string $name
    ): NodeInterface{
        $node   = new RegexNode($this, $parent, $name);

        $node->setRegex($regex);

        return $node;
    }
protected function generateRegex ( string $ regex , ? NodeInterface $ parent , ? string $ name ) : NodeInterface { $ node = new RegexNode ( $ this , $ parent , $ name ) ; $ node -> setRegex ( $ regex ) ; return $ node ; }
Generate regex node.

@param string             $regex
@param NodeInterface|null $parent
@param string|null        $name

@return NodeInterface
Generate regex node .