classRegisteredLexemeGenerator
final class RegisteredLexemeGenerator
implements LexemeGenerator
Supplies spellings from a fixed upstream registration table after explicit handler selection.
Methods§
public function __construct(
private array<string, list<string>> $registrations,
private string $definition,
private array<string, string> $aliases = [],
)Parameters
$registrations | array<string, list<string>> | |
$definition | string | |
$aliases | array<string, string> | Parser lookahead names mapped to their registered base token |
public function generate(LexemeInput $input): LexemeCandidatesPreserves the complete spelling set of the selected registration.
Parameters
$input | LexemeInput |
Returns
Throws
LexicalException When a declared handler's required registration is missingTest cases 2
Called from 1
Calls 5
- method-call LexemeInput::terminal() line 38
- new LexicalException line 42
- new LexemeSequence line 46
- new Lexeme line 47
- static-call LexemeCandidates::of() line 50
Private surface 3§
Implementation details, listed for orientation only.
private array<string, list<string>> $registrationsprivate string $definitionprivate array<string, string> $aliases = []Test cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 19
DerivationTraceTestcallsTokenGeneratorTestcallsLexemeSequenceTestcallsCandidateResolverTestcallsTerminalSequenceTestcallsMySqlProviderTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsKeywordLexemeGeneratorTestcallsLexicalGrammarTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsWindowNameLexemeGeneratorTest::testGeneratePropagatesMissingRegistrationDatacallsWindowNameLexemeGeneratorTest::testGenerateQuotesIndexedOnlyWhereWindowLookaheadRequiresAnIdentifiercallsWindowNameLexemeGeneratorTest::testGenerateRetainsNonApplicabilitycallsLexicalGrammarTestcallsSqliteProviderTestcalls