public static function compare(Rule $a, Rule $b, bool $checkTag = false): int
    {
        return Symbol::compare($a->subject, $b->subject)
            ?: Symbol::compareList($a->definition, $b->definition)
                ?: ($b->eof - $a->eof)
                    ?: ($checkTag ? self::compareTag($a->tag, $b->tag) : 0);
    }