classLexemeSequence
final class LexemeSequence
All lexemes of one candidate, in output order, including any left boundary requirement.
Properties§
public list<Lexeme> $lexemespublic string $idpublic ?SpacingConstraint $left = nullpublic array<int, SpacingConstraint> $boundaries = []Methods§
public function __construct(
public list<Lexeme> $lexemes,
public string $id,
public ?SpacingConstraint $left = null,
public array<int, SpacingConstraint> $boundaries = [],
private Closure(): iterable<int, string>|null $provenance = null,
)Parameters
$lexemes | list<Lexeme> | |
$id | string | |
$left | ?SpacingConstraint | |
$boundaries | array<int, SpacingConstraint> | Constraints indexed by the right lexeme's position |
$provenance | Closure(): iterable<int, string>|null |
public function key(): stringIdentifies the candidate's output and connection semantics independently of its source IDs.
Returns
stringTest cases 3
Called from 1
public function sources(): iterable<int, string>Returns all definitions contributing this candidate without evaluating them during selection.
Returns
iterable<int, string>Test cases 1
Private surface 1§
Implementation details, listed for orientation only.
private Closure(): iterable<int, string>|null $provenance = nullTest cases 70§
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 67
ChoiceLexemeGeneratorTestcallsFixedLexemeGeneratorTestcallsIntegerLexemeGeneratorTestcallsMatchingLexemeGeneratorTestcallsRegisteredLexemeGeneratorTest::testGenerateKeepsAllRegisteredSpellingsAndTheAliasOccurrencecallsSequenceLexemeGeneratorTest::testProductRetainsTheWholePrefixAndRejectsAnEmptyRequiredFactorcallsValueLexemeGeneratorTestcallsVersionCaseTestcallsVersionedLexemeGeneratorTestcallsBytePlanCompilerTestcallsPlanBuilderTestcallsGrammarCoverageTestcallsLexicalObservationTest::testConditionsRetainsTheInputMasksAndAllContributingRulescallsLexicalObservationTest::testFeaturesKeepsValueTextOutOfFiniteDefinitionSetscallsLexicalObservationTest::testSourcesRetainsAllCandidateProvenanceInOccurrenceOrdercallsDerivationTraceTestcallsTokenGeneratorTestcallsLexicalExceptionTestcallsLexemeCandidatesTest::testOfDistinguishesNoCandidatesFromOneEmptyOutputCandidatecallsLexemeCandidatesTest::testSequencesDefersEvaluationAndCanBeTraversedRepeatedlycallsLexemeGeneratorTestcallsLexemeInputTestcallsResolvedOutputTestcallsSpacingRuleTestcallsBoundaryCompletionTest::testAcceptsOnlyCandidatesWhosePendingLeftBoundaryHasACompletioncallsBoundaryCompletionTest::testAcceptsUsesTheSampledLeftValueInsteadOfAnUnrelatedDefaultWitnesscallsCandidateResolverTest::testResolveIntersectsInternalAndExternalConstraintsWithoutChangingTheRightStatecallsCandidateResolverTest::testResolvePropagatesConditionsAcrossAnEmptyMarkerWithoutWritingSpacescallsCandidateResolverTest::testResolveRejectsAnOwedNeighborAtEitherEndOfTheInputcallsCandidateResolverTest::testResolveReportsContradictionsWithBothRuleSourcescallsCombinedSpacingRuleTestcallsReverseLexemeGeneratorTest::testMatchesRequestComparesTheWholeCompoundSpellingcallsSqlGeneratorTestcallsTerminalSequenceTestcallsGenerationContextTestcallsBoundedIntegerLexemeGeneratorTestcallsCharsetLexemeGeneratorTestcallsCharsetValueLexemeGeneratorTestcallsDefinitionFactoryTestcallsFactorLexemeGeneratorTestcallsKeywordLexemeGeneratorTestcallsLexicalDefinitionTestcallsPrecisionLexemeGeneratorTestcallsReplicationTablePatternLexemeGeneratorTestcallsSizeNumberLexemeGeneratorTestcallsLexicalGrammarTestcallsCloneAddressSpacingRuleTestcallsFunctionSpacingRuleTestcallsKeywordPhraseSpacingRuleTestcallsQualifiedNameSpacingRuleTestcallsVariableSpacingRuleTestcallsMySqlProviderTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsHashBoundLexemeGeneratorTestcallsKeywordLexemeGeneratorTestcallsLexicalDefinitionTestcallsLexicalGrammarTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsJoinLexemeGeneratorTestcallsLexicalDefinitionTestcallsWindowNameLexemeGeneratorTestcallsLexicalGrammarTestcallsSqliteProviderTestcalls
Relations§
Instantiated in 16
- new SqlFaker\Generation\Candidate\ChoiceLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/ChoiceLexemeGenerator.php:51
- new SqlFaker\Generation\Candidate\FixedLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/FixedLexemeGenerator.php:39
- new SqlFaker\Generation\Candidate\IntegerLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/IntegerLexemeGenerator.php:50
- new SqlFaker\Generation\Candidate\RegisteredLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/RegisteredLexemeGenerator.php:46
- new SqlFaker\Generation\Candidate\SequenceLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:46
- new SqlFaker\Generation\Candidate\SequenceLexemeGenerator::product() packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:68
- new SqlFaker\Generation\Candidate\ValueLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/ValueLexemeGenerator.php:53
- new SqlFaker\Generation\Candidate\VersionedLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/VersionedLexemeGenerator.php:56
- new SqlFaker\MySql\Generation\Lexeme\BoundedIntegerLexemeGenerator::generate() packages/sql-faker/src/MySql/Generation/Lexeme/BoundedIntegerLexemeGenerator.php:55
- new SqlFaker\MySql\Generation\Lexeme\KeywordLexemeGenerator::generate() packages/sql-faker/src/MySql/Generation/Lexeme/KeywordLexemeGenerator.php:48
- new SqlFaker\MySql\Generation\Lexeme\KeywordLexemeGenerator::generate() packages/sql-faker/src/MySql/Generation/Lexeme/KeywordLexemeGenerator.php:57
- new SqlFaker\MySql\Generation\Lexeme\ReplicationTablePatternLexemeGenerator::generate() packages/sql-faker/src/MySql/Generation/Lexeme/ReplicationTablePatternLexemeGenerator.php:33
- new SqlFaker\MySql\Generation\Lexeme\SizeNumberLexemeGenerator::generate() packages/sql-faker/src/MySql/Generation/Lexeme/SizeNumberLexemeGenerator.php:39
- new SqlFaker\PostgreSql\Generation\Lexeme\HashBoundLexemeGenerator::generate() packages/sql-faker/src/PostgreSql/Generation/Lexeme/HashBoundLexemeGenerator.php:41
- new SqlFaker\Sqlite\Generation\Lexeme\JoinLexemeGenerator::generate() packages/sql-faker/src/Sqlite/Generation/Lexeme/JoinLexemeGenerator.php:58
- new SqlFaker\Sqlite\Generation\Lexeme\WindowNameLexemeGenerator::generate() packages/sql-faker/src/Sqlite/Generation/Lexeme/WindowNameLexemeGenerator.php:42
Method calls 2
- method-call SqlFaker\Generation\Candidate\SequenceLexemeGenerator::product() packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:74
- method-call SqlFaker\Generation\Output\ReverseLexemeGenerator::matchesRequest() packages/sql-faker/src/Generation/Output/ReverseLexemeGenerator.php:130
Type declarations 4
- type SqlFaker\Generation\Candidate\SequenceLexemeGenerator packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:53
- type SqlFaker\Generation\Lexeme\LexemeCandidates packages/sql-faker/src/Generation/Lexeme/LexemeCandidates.php:24
- type SqlFaker\Generation\Output\CandidateResolver packages/sql-faker/src/Generation/Output/CandidateResolver.php:30
- type SqlFaker\Generation\Output\ReverseLexemeGenerator packages/sql-faker/src/Generation/Output/ReverseLexemeGenerator.php:128