final class ProductionRule
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Represents a production rule in a formal grammar.

A production rule defines how a non-terminal symbol (left-hand side) can be expanded into a sequence of symbols (right-hand side alternatives).

Properties§

public string $lhs
public list<Production> $alternatives

Methods§

public function __construct(public string $lhs, public list<Production> $alternatives)

Parameters

$lhsstringLeft-hand side: non-terminal symbol name
$alternativeslist<Production>Right-hand side alternatives
Test cases 1136

Test cases 1286§

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 1283

Relations§

Instantiated in 6
Type declarations 2