Skip to content

feat: implement full UCD 17.0#148

Open
srghma wants to merge 86 commits into
fgdorais:mainfrom
srghma:main
Open

feat: implement full UCD 17.0#148
srghma wants to merge 86 commits into
fgdorais:mainfrom
srghma:main

Conversation

@srghma

@srghma srghma commented Jun 30, 2026

Copy link
Copy Markdown

google-labs-jules Bot and others added 30 commits June 27, 2026 06:23
- Added Script_Extensions lookup support.
- Added isKhmer, isCyrillic and other script helpers.
- Verified Noncharacter and Default_Ignorable properties.

Co-authored-by: srghma <219769217+srghma@users.noreply.github.com>
- Added Script_Extensions lookup and getScriptExtensions function.
- Added isScript and hasScript functions.
- Added boolean helper functions for all 176 Unicode scripts.
- Verified Noncharacter and Default_Ignorable properties.
- Updated documentation.

Co-authored-by: srghma <219769217+srghma@users.noreply.github.com>
- Added support for Script_Extensions property.
- Added comprehensive boolean helpers for all 176 Unicode scripts.
- Added identifier properties: isIDStart, isIDContinue, isXIDStart, isXIDContinue.
- Added punctuation/extender properties: isDash, isHyphen, isQuotationMark, isTerminalPunctuation, isExtender, isRegionalIndicator.
- Verified and ensured consistency for Noncharacter and Default_Ignorable properties.
- Updated documentation and generated lookup tables.

Co-authored-by: srghma <219769217+srghma@users.noreply.github.com>
- Added Case Folding support (Full and Simple).
- Added Grapheme Cluster Break and Word Break properties.
- Added ID_Start, ID_Continue, XID_Start, XID_Continue properties.
- Added Dash, Hyphen, Quotation_Mark, Terminal_Punctuation, Diacritic, Sentence_Terminal, Pattern_Syntax, Pattern_White_Space, Extender, and Regional_Indicator properties.
- Added boolean helper functions for all 176 Unicode scripts.
- Updated documentation and generated lookup tables.
- Updated verification suite.

Co-authored-by: srghma <219769217+srghma@users.noreply.github.com>
…essing

- Added support for all 176 Unicode scripts with individual boolean helpers (isKhmer, isCyrillic, etc.).
- Added Script_Extensions support.
- Added full and simple Case Folding support (getCaseFold, getSimpleCaseFold).
- Added Grapheme Cluster Break, Word Break, Sentence Break, and Line Break properties.
- Added Identifier properties (ID_Start, ID_Continue, XID_Start, XID_Continue).
- Added Emoji properties (Emoji, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, Emoji_Component, Extended_Pictographic).
- Added various punctuation and symbol properties (Dash, Hyphen, Quotation_Mark, Terminal_Punctuation, Diacritic, Sentence_Terminal, Pattern_Syntax, Pattern_White_Space, Extender, Regional_Indicator).
- Added Grapheme_Base and Grapheme_Extend.
- Updated infrastructure (makeTables.lean, TableLookup.lean) to support efficient lookups.
- Updated documentation and verified with extensive tests.

Co-authored-by: srghma <219769217+srghma@users.noreply.github.com>
…5838323980231

Add Script_Extensions support and script-specific helper functions
# Conflicts:
#	lakefile.lean
#	makeTables.lean
srghma added 21 commits July 3, 2026 01:59
…odifier and Regional_Indicator are just "is btw two codes")
What was happening:

- The test compares d.numeric to lookupNumericValue d.code in tests/UnicodeTableTest/Spec.lean:192.
- d.numeric is built from UnicodeData.txt and augmented with DerivedNumericValues.txt in table-generators/UnicodeData/Basic.lean:246.
- The old generator compressed decimal/digit sequences into ranges but stored only the first value, e.g. 0030..0039 => decimal 0. That makes 1, 2, etc. return decimal 0.
- Your patch fixed some decimal ranges by reconstructing offsets, but the base list was incomplete and it did not address other Digit/Numeric range cases.

I fixed it in the generator by emitting exact singleton numeric rows:

table-generators/makeTablesForLookup.lean:697

| some n =>
  t := t.push (d.code, d.code, n)

Then regenerated tables. The generated Numeric_Value table is now 2023 singleton rows, so no lookup-side workaround is needed.

Verification:

- Ran just tables
- Ran just test
- Result: 54/54 tests passed, including Numeric_Value
…hape to Numeric_Value: the generator compresses ranges into a key table keyed only by the range start, so later code points in each range return #[]. I’m fixing the generator to emit per-code-point keys for script extensions, then regenerating tables and rerunning tests.
…ings like "09E8;Beng Cakm Sylo", but instead more type safe return type
@srghma

srghma commented Jul 4, 2026

Copy link
Copy Markdown
Author

ok, I finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants