src/ViKon/Parser/Parser.php
protected function connectRulesToLexer() {
        foreach ($this->rules as $childRule) {
            $childRule->prepare($this->lexer);

            if ($childRule->getName() === $this->startRule->getName()) {
                continue;
            }

            if ($this->startRule->acceptRule($childRule->getName())) {
                $childRule->embedInto($this->startRule->getName(), $this->lexer);
            }

            $childRule->finish($this->lexer);
        }
    }
protected function connectRulesToLexer() {
        foreach ($this->rules as $childRule) {
            $childRule->prepare($this->lexer);

            if ($childRule->getName() === $this->startRule->getName()) {
                continue;
            }

            if ($this->startRule->acceptRule($childRule->getName())) {
                $childRule->embedInto($this->startRule->getName(), $this->lexer);
            }

            $childRule->finish($this->lexer);
        }
    }
protected function connectRulesToLexer ( ) { foreach ( $ this -> rules as $ childRule ) { $ childRule -> prepare ( $ this -> lexer ) ; if ( $ childRule -> getName ( ) === $ this -> startRule -> getName ( ) ) { continue ; } if ( $ this -> startRule -> acceptRule ( $ childRule -> getName ( ) ) ) { $ childRule -> embedInto ( $ this -> startRule -> getName ( ) , $ this -> lexer ) ; } $ childRule -> finish ( $ this -> lexer ) ; } }
Add rule patterns to lexer
Add rule patterns to lexer