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,
): string

Reports the start rule of a grammar that has been read.

Parameters

$declarationslist<BisonDeclaration>Declarations from the grammar's preamble
$rulesnon-empty-list<BisonRuleNode>Rules in the order they were declared

Returns

string Name of the rule to derive from
Test 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

Relations§

Instantiated in 1
Method calls 1
Type declarations 2