API Reference¶
Generate exact signatures locally with:
./gradlew dokkaGeneratePublicationHtml
CharSet¶
CharSet is an immutable set of Char values backed by sorted, non-overlapping ranges.
Key members:
size: number of characters in the set.nonConsecutiveRangeCount: number of stored ranges.isEmpty,isNotEmpty,isAll: shape checks.contains: single-character membership check.containsAll(Collection<Char>): collection membership check.containsAll(CharSet): set containment check.sample: choose a random contained character.overlap: classify overlap with another set.map,filter,count: per-character transformations and queries.invert,union,intersect,difference: set algebra.- subset, superset, disjoint, overlap, and proper subset/superset predicates.
toSet,toList,toRangeList,toCharArray: materialization helpers.iterator,forEach: iteration helpers.
Factory and constant members:
noneallonerangeofunionasciidigitletterletterOrDigithexDigitwhitespacevalidUnicodeunicodeDigitunicodeLetterunicodeLetterOrDigitunicodeWhitespace
The of(vararg CharRange) overload rejects empty ranges, including Kotlin ranges whose first is
greater than last.
CharSetTop¶
CharSetTop represents a partition of the complete Char space.
Key members:
basis: list of adjacentCharRangepartitions.size: number of partitions.refine(CharSetTop): combine two partitions.refine(CharSet): refine a partition with a character set.trivial: one-range partition covering everyChar.fromSet: construct a partition from aCharSet.
Topology¶
SetLike, SetLike1, and Topology define generic set operations used by parser infrastructure.
Topology.charRanges is the provided topology instance for Char, CharSet, and CharSetTop.
Overlap¶
Overlap classifies two sets as:
EMPTYPARTIALFIRST_CONTAINS_SECONDSECOND_CONTAINS_FIRSTEQUAL