public function calculatePrecedence() {
        $this->precedence = 0;

        if (!$this->hasContextRules()) {
            return;
        }

        foreach($this->context as $token_name=>$rules) {
            foreach($rules as $context_key=>$rule_key) {
                if ($rule_key == "other")
                    $this->precedence += 1;
            }
        }
    }