final class Start
    implements Declaration
Public API: explicitly declared with @visibility public.

A %start directive naming the start symbol, or several of them.

Reading the start symboldoctest
$file = (new \BisonParser\Parser())->parse("%start program\n%%\nprogram: 'a';\n");
    $file->declarations[0]->symbols[0]->value // => 'program'

Properties§

public list<Symbol> $symbols
public Location $location

Methods§

public function __construct(public list<Symbol> $symbols, public Location $location)

Parameters

$symbolslist<Symbol>The named start symbols, at least one
$locationLocationWhere the directive is written
public function location(): Location

Answers where the declaration begins.

Returns

Location Line and column of the percent sign
Test cases 1

Test cases 8§

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

Dedicated tests 1
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Constant reads 1
Type checks 2