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

$keywordsarray<string, list<string>>
Test cases 1
public function generate(LexemeInput $input): LexemeCandidates

Rejects an impossible lookahead context before selecting a registered spelling.

Parameters

Throws

LexicalException When a declared keyword registration is missing
Test cases 1
Calls 6

Private surface 1§

Implementation details, listed for orientation only.

private array<string, list<string>> $keywords

Test 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

Relations§

Instantiated in 1