classBisonPreamble
final class BisonPreamble
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Everything a grammar file states before its rules.
The prologue and the declarations are read in one pass because they are interleaved, but they are two different things to the rest of the parser, so they travel together rather than as an unlabelled pair.
Properties§
public string|null $prologuepublic list<BisonDeclaration> $declarationsMethods§
public function __construct(
public string|null $prologue,
public list<BisonDeclaration> $declarations,
)Parameters
$prologue | string|null | Host-language code from `%{ ... %}`, or null when the file has none |
$declarations | list<BisonDeclaration> | Declarations in the order they were written |
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
BisonPreambleTest::testItKeepsThePrologueAndTheDeclarationsApartcovers and callsBisonPreambleTest::testItReportsAnAbsentPrologueAsNullcovers and calls
Other tests reaching this symbol 2
BisonParserTestcallsBisonPreambleReaderTestcalls