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

The productions of one grammar release, spelled as the grammar writes them.

A production is identified by its signature: the rule name, a colon, and the symbols of the alternative, terminals by terminal or token-class name, such as where_opt: WHERE expr or where_opt:. The list is generated from the grammar artifact of the release. Rules dispatch on signatures, so one rule serves every release that has the production, and the list of a release is the complete set of productions its rules must claim.

Methods§

public function __construct(private array<string, list<string>> $signatures)

Parameters

$signaturesarray<string, list<string>>The signature of each alternative by rule name
public static function load(string $path): self

Loads the generated production list of a release, once per file.

Parameters

$pathstring

Returns

self
Called from 2
Calls 5
public function all(): list<string>

Answers every signature of the release.

Returns

list<string>
Calls 2

Private surface 2§

Implementation details, listed for orientation only.

private static array<string, self> $loaded = []
private array<string, list<string>> $signatures

Relations§

Static calls 2
Method calls 6
Type declarations 4