final class Expect
    implements Declaration
Public API: explicitly declared with @visibility public.

An %expect or %expect-rr directive declaring how many conflicts the grammar has.

Reading the expected conflictsdoctest
$file = (new \BisonParser\Parser())->parse("%expect 59\n%%\ns: 'a';\n");
    $file->declarations[0]->count // => 59
    $file->declarations[0]->reduceReduce // => false

Properties§

public int $count
public bool $reduceReduce
public Location $location

Methods§

public function __construct(
    public int $count,
    public bool $reduceReduce,
    public Location $location,
)

Parameters

$countintThe declared number of conflicts
$reduceReduceboolWhether the directive is `%expect-rr` rather than `%expect`
$locationLocationWhere the directive is written
public function location(): Location

Answers where the declaration begins.

Returns

Location Line and column of the percent sign
Test cases 1

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

Relations§

Instantiated in 1
Constant reads 1
Type checks 1