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

Reads %parse-param and %lex-param, which add arguments to the generated parser and scanner.

The argument is host-language code in braces, so it arrives as one action token rather than as a sequence of symbols.

Methods§

public function handles(string $directive): bool

Reports whether the directive declares an extra parser or scanner argument.

Parameters

$directivestringDirective name including its percent sign

Returns

bool True for "%parse-param" and "%lex-param"
Test cases 1
public function read(BisonTokenStream $stream, string $directive): BisonDeclaration|null

Consumes the braced argument declaration.

Parameters

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

Returns

BisonDeclaration|null The declaration, or null when no braced code follows
Test cases 3
Calls 4

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