Commit graph

46 commits

Author SHA1 Message Date
Steven R. Loomis
9dbf70c94e fix(core): ldml more updates to normalization per review 🙀
- verify marker string as it's popped off
- add a missing pragma to debuglog.h
- move UErrorCode out of ldml_processor, change normalization functions to return true on success

For: #9468
2023-10-18 17:47:56 -05:00
Steven R. Loomis
9ee183c0ee fix(core): ldml update to normalization per review 🙀
- simplify normalize_nfc and normalize_nfd functions

For: #9468
2023-10-16 17:21:39 -05:00
Steven R. Loomis
a577bd2f53 feat(core): ldml normalization 🙀
- more progress in the normalization pipeline. Trying to keep it from leaking.
- normalize output to NFC.
- normalize json test data to NFC (both context and expected).
- we do NOT try to normalize the 'embedded' strings currently.
- yet more test data fixes (turns out u+00e0 ≠ u+00e8)

For: #9468
2023-10-12 16:57:37 -05:00
Steven R. Loomis
daa0523dde feat(core): ldml normalization 🙀
- 0 steps forward, 4294967294 steps back

For: #9468
2023-10-10 19:01:14 -05:00
Marc Durdin
ba5f18defd chore: rename km_kbp_ to km_core_ 2023-10-09 14:53:13 +07:00
Steven R. Loomis
ab29171b56 fix(core): regex set mapping support 🙀
- fix alignment

#9121
2023-08-24 14:09:31 -05:00
Steven R. Loomis
09772bb18d feat(core): regex set mapping support 🙀
- passes
- added some utilities on transform_element
- added more validation of transforms
- added tests of utility functions

#9121
2023-08-23 18:13:19 -05:00
Steven R. Loomis
935dec4304 feat(core): regex set mapping support 🙀
- restructured some things, loading and such seems to be in good shape

#9121
2023-08-23 15:03:44 -05:00
Steven R. Loomis
b9bf313129 feat(core): regex set mapping support 🙀
- good failing test
2023-08-22 20:10:42 -05:00
Steven R. Loomis
7a312520fb feat(core): regex cleanup 🙀
- restructure to not allocate the Matcher twice, save a little processing

For: #9121
2023-08-11 16:32:09 -05:00
Steven R. Loomis
ad03a5cdcf chore(core): regex cleanup 🙀
- more comments

For: #9121
2023-08-11 15:32:57 -05:00
Steven R. Loomis
75fcc5f3fe chore(core): regex cleanup 🙀
- cache the icu::RegexPattern
- rename USet to avoid a conflict with the real one!

For: #9121
2023-08-10 18:35:06 -05:00
Steven R. Loomis
aecb7c5f5e feat(core): regex apply-side 🙀
- apply side is working using replaceFirst()
- mapTo is a not-yet, that will be a special case

For: #9121
2023-08-09 18:08:25 -05:00
Steven R. Loomis
1aba900b01 feat(core): regex match-side 🙀
- match side is working
- lots of string 'schlepping!

For: #9121
2023-08-09 17:45:56 -05:00
Steven R. Loomis
5c38b18395 feat(core): update icu dependencies 🙀
- enable icui18n
- .. without breaking anything else in ldml tests

For: #9121
2023-08-08 18:45:03 -05:00
Marc Durdin
cdf026c2ba chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s18 2023-08-04 12:54:10 +07:00
Marc Durdin
41aac59a4a chore(developer): minor patches to fix compile issues
Fixes #9377.

1. ldml_transforms.cpp used emplace_back with char instead of dword
   values (#9377)
2. import was updated to src/ instead of ../ by vscode in build.ts
   (no related issue)
2023-08-01 13:27:31 +07:00
Steven R. Loomis
99c2aff760 chore(core): turn off debugging 🙀
- fix a stray define

For: #7375
2023-07-26 16:18:53 -05:00
Steven R. Loomis
875d59987a chore(core): update documentation in transform logic and processor 🙀
- drop some unneeded variables also, should be no semantic change

For: #7375
2023-07-26 16:16:57 -05:00
Steven R. Loomis
84dc28f512 feat(core): transform/reorder 🙀
- remove another debug print call

#7375
2023-07-25 16:32:42 -05:00
Steven R. Loomis
f88ffbff94 chore(core): improve validity check on transform 🙀
- also remove unnecessary loops with unused parameters

#7375
2023-07-21 12:20:54 -05:00
Steven R. Loomis
4d9fd28181 feat(core): fix UMR in Uset 🙀
- USet struct was depending on the COMP_KEYBOARD_EX (the .kmx data), but was used after load completed during processing
- Change the USet structure to contain a std::list<COMP_KMXPLUS_USET_RANGE> i.e. copying it
- but, while we're at it, added functions to validate that characters are within valid Unicode ranges.

#7375
2023-07-21 11:42:32 -05:00
Steven R. Loomis
ac6dbb6291 chore(core): scale back kmxplus debugging 🙀
- define KMXPLUS_DEBUG_LOAD, 0 by default, to get details such as 'each string' and 'each key'
- overall debugging and anomalies still DebugLog by default.
- new macro DebugLoad
- also KMXPLUS_DEBUG_TRANSFORM similarly and DebugTran
2023-07-20 12:04:50 -05:00
Steven R. Loomis
96b11d8a73 feat(core): transform/reorder passing tests! 🙀
- remove a debug print call

#7375
2023-07-19 18:14:01 -05:00
Steven R. Loomis
7f07f951ae feat(core): transform/reorder passing tests! 🙀
- reorder now handles runs, where a run starts at primary=0
- reorder still returns as if it had matched/altered the entire string

#7375
2023-07-19 18:07:19 -05:00
Steven R. Loomis
9fc62790b9 feat(core): transform/reorder processing a little less broken 🙀
#7375
2023-07-19 15:29:38 -05:00
Steven R. Loomis
bc378dcac6 feat(core): move transform processing to u32 🙀
- merge code paths…

#7375
2023-07-18 19:16:23 -05:00
Steven R. Loomis
27e524f755
Merge branch 'core/9120-reorder-test-epic-ldml' into feat/core/7375-more-reorder-epic-ldml 2023-07-14 12:14:33 -05:00
Steven R. Loomis
a5f1843247 fix(core): update per review comments 🙀
- move increments into the for loop

For: #9120
2023-07-14 12:01:30 -05:00
Steven R. Loomis
600a1d1752 fix(core): fix compiler err in transform load 🙀
- return nullptr if element load failed

For: #7375
2023-07-13 08:05:46 -05:00
Steven R. Loomis
bc642d7d3c fix(core): speedup reorder_sort_key::compare 🙀
#9120
2023-07-13 07:55:57 -05:00
Steven R. Loomis
91224d4f1d
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-07-13 07:37:34 -05:00
Steven R. Loomis
093b74a0e0 feat(core): load reorder from kmx+, test case 🙀
- move critical code OUT of assert body!

For: #7375
2023-07-12 18:43:03 -05:00
Steven R. Loomis
47f75118d4 feat(core): load reorder from kmx+, test case 🙀
- load reorder groups and their usets from KMX+
- add a test case matching the nod-Lana spec entry
(the interesting cases commented out for now)

For: #7375
2023-07-12 18:09:53 -05:00
Steven R. Loomis
878e6c13e2 chore(core): compiler fix 🙀
For: #9120
2023-07-12 18:07:20 -05:00
Steven R. Loomis
af8d8fcb33 feat(core): reorder is able to reorder nod-Lana 🙀
- cleaned up code some
- still todo: not merged with 'transform' u16 path, subranges

For: #9120
2023-07-12 18:07:20 -05:00
Steven R. Loomis
28d520f5df feat(core): reorder tests 🙀
- attempting to only subsort ranges

For: #9120
2023-07-12 18:07:20 -05:00
Steven R. Loomis
1ea3473e34 feat(core): more prep work for reorder 🙀
- tests for sortkey generation and sorting
- improvements to element flag analysis
2023-07-12 18:07:06 -05:00
Steven R. Loomis
a5a2b61479 feat(core): unit test for reorder! 🙀
- add functions for checking type and ordering
  in elements
- fails, of course! implementation to come

For #9120
2023-07-12 18:07:06 -05:00
Steven R. Loomis
f5b70a952c feat(core): refactor for reorder implementation 🙀
- some polymorphic objects
- element list
- add new reorder test

For: #9120
2023-07-12 18:07:06 -05:00
Steven R. Loomis
9eff1eb1d4 feat(core): document transform algorithm 🙀
For: #7377
2023-06-20 16:37:38 -05:00
Steven R. Loomis
903fd7e82b feat(core): transform fixes 🙀
- refactor matching per review comments
- move global fcn into class statics

#7377
2023-06-19 18:27:36 -05:00
Steven R. Loomis
3014b9e98e feat(core): transform fixes 🙀
- fix sample files
- break out on first match in a group

#7377
2023-06-16 20:16:29 -05:00
Steven R. Loomis
c74be813b1
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-06-16 20:10:50 -05:00
Steven R. Loomis
c90c7aaa64 feat(core): non-regex implementation of tran 🙀
- some scaffolding for loading transforms
- add transform_test
- simple test, simple impl - non-regex, simple strings
- scaffolding for bksp
- bksp transform test, but disabled for now

For: #7377
2023-06-14 10:14:33 -05:00
Steven R. Loomis
5a6389deb8 feat(core): ldml: basic transforms, again 🙀
- new test file for transforms
- new class, ldml_transforms

for #7234
2022-10-12 19:29:37 -05:00