classExpectItem
final class ExpectItem
implements RhsItem
Public API: explicitly declared with
@visibility public.An %expect or %expect-rr modifier declaring the conflicts of one alternative.
$file = (new \BisonParser\Parser())->parse("%%\ns: 'a' %expect 1 ;\n");
$file->rules()[0]->alternatives[0]->items[1]->count // => 1Properties§
public int $countpublic bool $reduceReducepublic Location $locationMethods§
public function __construct(
public int $count,
public bool $reduceReduce,
public Location $location,
)Parameters
$count | int | The declared number of conflicts |
$reduceReduce | bool | Whether the modifier is `%expect-rr` rather than `%expect` |
$location | Location | Where the modifier is written |
Test cases 6§
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 5
TreeDumper::itemcallsBisonGrammarCompilerTestcallsBisonGrammarReaderTestcallsRhsPrinterTest::testPrintcallsRuleParserTest::testModifiercalls