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

Reads %expect, the count of shift/reduce conflicts the author accepts.

Methods§

public function handles(string $directive): bool

Reports whether the directive is %expect.

Parameters

$directivestringDirective name including its percent sign

Returns

bool True for "%expect"
Test cases 1
public function read(BisonTokenStream $stream, string $directive): BisonDeclaration|null

Consumes the conflict count.

Parameters

$streamBisonTokenStreamStream positioned just after the directive name
$directivestringDirective name including its percent sign

Returns

BisonDeclaration|null The declaration, or null when no number follows
Test cases 3
Calls 3

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 4

Relations§

Instantiated in 1