final class IntegerLexemeGenerator
    implements LexemeGenerator

An unsigned decimal scanner domain whose inclusive bounds do not depend on PHP's integer width.

Methods§

public function __construct(
    private string $terminal,
    private string $minimum,
    private ?string $maximum,
    private non-empty-list<string> $defaults,
    private string $definition,
    private bool $digitSeparators = false,
)

Binds the source-defined magnitude interval and bounded default representatives. A null upper bound supports scanners that classify all larger integers into another token family.

Parameters

$terminalstring
$minimumstring
$maximum?string
$defaultsnon-empty-list<string>
$definitionstring
$digitSeparatorsbool
Test cases 18
public function accepts(string $spelling): bool

Compares decimal magnitudes by significant digit count, then lexicographically at equal length.

Parameters

$spellingstring

Returns

bool
Test cases 19
Called from 2
Calls 4

Private surface 6§

Implementation details, listed for orientation only.

private string $terminal
private string $minimum
private ?string $maximum
private non-empty-list<string> $defaults
private string $definition
private bool $digitSeparators = false

Test cases 35§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 19
Other tests reaching this symbol 16

Relations§

Instantiated in 21
Method calls 2