final class ProductionOccurrence

Records a selected grammar alternative even when it emits no terminal.

Properties§

public int $id
public ?int $parent
public string $rule
public int $ordinal

Methods§

public function __construct(
    public int $id,
    public ?int $parent,
    public string $rule,
    public int $ordinal,
)

Binds the selection to the derivation tree and its original alternative ordinal.

Parameters

$idint
$parent?int
$rulestring
$ordinalint
Test cases 1

Test cases 185§

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 184

Relations§

Instantiated in 1
Type declarations 2