src/ViKon/Parser/rule/AbstractRuleSet.php
public function init(Parser $parser, Lexer $lexer) {
        $parser->setStartRule($this->startRule);

        foreach ($this->rules as $rule) {
            $parser->addRule($rule);
        }

        $parser->setLexer($lexer);
        $lexer->setParser($parser);

        return $this;
    }
public function init(Parser $parser, Lexer $lexer) {
        $parser->setStartRule($this->startRule);

        foreach ($this->rules as $rule) {
            $parser->addRule($rule);
        }

        $parser->setLexer($lexer);
        $lexer->setParser($parser);

        return $this;
    }
public function init ( Parser $ parser , Lexer $ lexer ) { $ parser -> setStartRule ( $ this -> startRule ) ; foreach ( $ this -> rules as $ rule ) { $ parser -> addRule ( $ rule ) ; } $ parser -> setLexer ( $ lexer ) ; $ lexer -> setParser ( $ parser ) ; return $ this ; }
Set start rule and add set's rules to parser

@param \ViKon\Parser\Parser      $parser
@param \ViKon\Parser\Lexer\Lexer $lexer

@return $this
@throws \ViKon\Parser\ParserException
Set start rule and add set s rules to parser