classKeywordLexemeGenerator
final class KeywordLexemeGenerator
implements LexemeGenerator
Combines kwlist.h registrations with parser.c/base_yylex's required followers for lookahead tokens.
Methods§
public function __construct(private array<string, list<string>> $keywords)Binds only the selected release's keyword registrations.
Parameters
$keywords | array<string, list<string>> |
public function generate(LexemeInput $input): LexemeCandidatesRejects an impossible lookahead context before selecting a registered spelling.
Parameters
$input | LexemeInput |
Returns
Throws
LexicalException When a declared keyword registration is missingTest cases 1
Calls 6
- static-call PgLookahead::definitions() line 37
- method-call LexemeInput::terminal() line 39
- function-call
in_arrayline 43 - static-call LexemeCandidates::of() line 44
- method-call RegisteredLexemeGenerator::generate() line 47
- new RegisteredLexemeGenerator line 47
Private surface 1§
Implementation details, listed for orientation only.
private array<string, list<string>> $keywordsTest cases 8§
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 7
MySqlProviderTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsLexicalGrammarTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsSqliteProviderTestcalls