final class PatternProductions

Reuses immutable pattern/production matches across all frontiers and occurrences of the same constrained search.

Methods§

public function __construct(private Grammar $grammar)

A fixed grammar makes pattern matches independent of search budget and occurrence counters.

Parameters

$grammarGrammar
public function sourceRule(string $name): string

Keeps legacy occurrence counters shared across specialized copies of a rule.

Parameters

$namestring

Returns

string
Test cases 1
Called from 1
Calls 1

Private surface 2§

Implementation details, listed for orientation only.

private array<string, list<Production>> $cache = []
private Grammar $grammar

Test cases 31§

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 28

Relations§

Instantiated in 1
Method calls 3
Type declarations 2