classPrecedence
final class Precedence
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
The rank and associativity a grammar declares for one terminal.
Ranks are numbered from one in the order the declarations appear, so a later declaration binds tighter than an earlier one.
Properties§
public int $levelpublic Associativity $associativityMethods§
public function __construct(public int $level, public Associativity $associativity)Parameters
$level | int | Rank of the declaration group, higher binds tighter |
$associativity | Associativity | How ties within the rank are settled |
Test cases 15§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 14
ConflictResolverTest::testReduceOrReducecallsConflictResolverTest::testResolveLetsAHigherRankedLaterRuleWinUnderLemonsPolicycallsConflictResolverTest::testShiftOrReducecallsConflictResolverTest::testShiftOrReduceLeavesABareRankUnresolvedcallsParseTableBuilderTestcallsBisonGrammarReaderTestcallsLemonGrammarReaderTestcallsGrammarBuilderTestcallsGrammarTest::testMemberPrecedenceLooksThroughATokenClasscallsGrammarTest::testPrecedenceOfcallsGrammarTest::testRulePrecedencePrefersTheNamedTerminalcallsGrammarTest::testRulePrecedenceTakesTheFirstRankedTerminalUnderLemonsPolicycallsGrammarTest::testRulePrecedenceTakesTheLastTerminalUnderBisonsPolicycallsLrParserTestcalls