final class ConflictSummary
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

How many conflicts a table build settled by default, against what the grammar expected.

Properties§

public int $shiftReduce
public int $reduceReduce
public int|null $expected

Methods§

public function __construct(
    public int $shiftReduce,
    public int $reduceReduce,
    public int|null $expected,
)

Parameters

$shiftReduceintShift/reduce conflicts the shift won by default
$reduceReduceintReduce/reduce conflicts the earlier rule won by default
$expectedint|nullShift/reduce conflicts the grammar declares as expected, if it does
public function isExpected(): bool

Reports whether the build met the grammar's own expectation.

A grammar that declares no expectation is met only by a conflict-free build, which is what its generator would demand of it.

Returns

bool True when the shift/reduce count matches and no reduce/reduce conflict remains
Test cases 1

Test cases 4§

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 3

Relations§

Instantiated in 1
Type declarations 1