public function build(RootNode &$root)
    {
        $parser = new RoutingRuleParser($this->routing_rule);
        
        try{
            $section_list_set = $parser->parse();
        }
        catch(RoutingRuleParseException $e){
            throw new RouterNodeBuilderException($this->routing_rule, 'Parse failed');
        }
        
        $node = $root;
        
        foreach($section_list_set as $section_list){
            while(($section = array_shift($section_list))!==null) {
                $last = empty($section_list);
                if (is_string($section)){
                    if ($last){
                        $node->leaf($section)->bind($this->filter, $this->event);
                        break;
                    }
                    $node = $node->node($section);
                }
                else if (is_array($section)){
                    $varname = $section['varname'] ?? null;
                    $regex = $section['regex'] ?? null;
                    $type = $section['type'] ?? null;
                    $regex = empty($regex) ? '.*' : $regex;
                    if ($last){
                        $node->leaf($regex,$varname,$type)->bind($this->filter, $this->event);
                        break;
                    }
                    $node = $node->node($regex,$varname,$type);
                }
                else if ($section instanceof EmptyRoutingPathInterface){
                    if ($last){
                        $node->leaf('()')->bind($this->filter, $this->event);
                        break;
                    }
                    throw new RouterNodeBuilderException($this->routing_rule, 'Empty section not allowed before last section');
                }
                else{
                    throw new RouterNodeBuilderException($this->routing_rule, 'invalid section');
                }
            }
        }
    }