classBisonStartSymbol
final class BisonStartSymbol
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Decides which rule a derivation begins from.
Bison takes the rule named by %start, and the first rule in the file when nothing named one. The fallback is not a guess: it is what Bison itself does, so a grammar without %start still has one answer rather than none.
Methods§
public function from(
list<BisonDeclaration> $declarations,
non-empty-list<BisonRuleNode> $rules,
): stringReports the start rule of a grammar that has been read.
Parameters
$declarations | list<BisonDeclaration> | Declarations from the grammar's preamble |
$rules | non-empty-list<BisonRuleNode> | Rules in the order they were declared |
Returns
string Name of the rule to derive fromTest cases 3
Called from 1
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 1
BisonParserTestcalls