classConflictSummary
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 $shiftReducepublic int $reduceReducepublic int|null $expectedMethods§
public function __construct(
public int $shiftReduce,
public int $reduceReduce,
public int|null $expected,
)Parameters
$shiftReduce | int | Shift/reduce conflicts the shift won by default |
$reduceReduce | int | Reduce/reduce conflicts the earlier rule won by default |
$expected | int|null | Shift/reduce conflicts the grammar declares as expected, if it does |
public function isExpected(): boolReports 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 remainsTest 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
BuildResultTest::testPropertiesAreKeptcallsParseTableBuilderTestcallsLrParserTestcalls