Commit graph

116 commits

Author SHA1 Message Date
Steven R. Loomis
fa1fd75157 fix(core): ldml fix for multiple marker deletion
- current code only deletes a single marker and falls through
- update the ldml test code, get rid of 'expected character' backspace logic (now that we have context object)
- update test cases
2024-04-25 16:59:20 -05:00
Steven R. Loomis
dc965f4e1a fix(core): ldml backspace processing should delete all markers
- current code would only delete a single marker and fall through
- should loop consuming all markers until a non-marker char is hit
2024-04-18 08:57:19 -05:00
Steven R. Loomis
8b5723028c chore(core): optimize ldml_event_state::emit_difference() when no difference
#11057
2024-03-27 08:18:03 -05:00
Steven R. Loomis
e8a8590eee fix(core): revert some interim fixes
- ldml_test_source fix moved off to issue #11083
- an optimization in ldml_processor also rolled back
2024-03-27 08:05:39 -05:00
Steven R. Loomis
18c6ecfc08 fix(core): fix 2 marker cases in ldml_event_state::emit_difference 🙀
- handle the case where old and new context strings are the same (i.e. no work to do).
- fix pointer arithmetic error in #10356 - the special case where one marker is being replaced by another. The named regression test didn't actually hit this case.

Fixes: bug(core): 'string too long' #11057
2024-03-25 16:45:01 -05:00
Steven R. Loomis
15b7a42829 feat(core): support normalization=disabled 🙀
- clean up process_output:  remove some unnecessary steps,
refactor into 3 functions, clarify
- reorder functions for ldml_state
- remove extraneous assert() clutter when the normalization
functions already assert/DebugLog at the innermost level

#10554
2024-02-06 16:09:18 -06:00
Steven R. Loomis
7572c9476e feat(developer): support normalization=disabled 🙀
- main core changes and test changes

#10554
2024-02-01 17:32:42 -06:00
Steven R. Loomis
78f81516c0 feat(core): report on (lack of) normalization 🙀
- report normalization

#10468
2024-01-31 18:22:23 -06:00
Steven R. Loomis
04a6e164d7 feat(core): ldml actions: updates per code review 🌱
- fix backspace processing
- fix k_102 - we can no longer test for context invalidation here
- fix a test that assumed non-const km_core_actions.output

For: #10410
2024-01-19 11:24:41 -06:00
Steven R. Loomis
6ea83391a7 Merge remote-tracking branch 'origin/epic/core/9999-normalization' into feat/core/10410-ldml-really-use-action-struct 2024-01-19 10:40:42 -06:00
Marc Durdin
249ed77835
Merge branch 'epic/core/9999-normalization' into chore/merge-master-into-core/9999-normalization 2024-01-19 17:42:40 +11:00
Steven R. Loomis
ae00eda4a0 chore(core): ldml shuffle some deck chairs 🌱
- move the emit_ and context functions into an ldml_event_state object

For #10410
2024-01-18 15:47:15 -06:00
Steven R. Loomis
8095977bec feat(core): ldml action struct test runner changes 🌱
- change ldml test suite, with TODOs
- backspace validation is different, as we don't know the expected char.

For: #10410
2024-01-18 22:55:06 -06:00
Steven R. Loomis
4c322ddb8a feat(core): ldml action struct 🌱
- update km_core_actions.output to be a const*
- for now, call state->actions().commit() from ldml_event_state::commit()

For: #10410
2024-01-18 22:26:46 -06:00
Steven R. Loomis
20a13fa682 feat(core): ldml attempt to use action struct 🌱
- not quite working

For: #10410
2024-01-18 17:00:04 -06:00
Steven R. Loomis
792329fba0
chore(core): tag unused args 2024-01-17 17:30:48 -06:00
Steven R. Loomis
f484615450 chore(core): ldml don't use queue action functions 🌱 2024-01-17 16:16:56 -06:00
Steven R. Loomis
c5d0e0525e feat(developer): 32 bit escapades 🙀
- escaping working, matching not yet

#10319
2024-01-13 12:55:51 -06:00
Steven R. Loomis
f38054f65a chore(core): split out some files 🙀
- markers/normalization really needs its own file
- split out ldml_markers.* from ldml_transforms.*
- split out ldml_utils.hpp for a common assert macro

#10320
2024-01-06 11:56:11 -06:00
Steven R. Loomis
b2b897970d feat(core): stacked markers 🙀
- renamed the single-segment functions to normalize_nfd_markers_segment() since they should only be run on a single segment
- commented out NFC for now, dead code
- add some additional checks/DebugLog around normalization

#10320
2024-01-06 11:33:51 -06:00
Steven R. Loomis
0d3458deef chore(core): comments in key-not-found 🙀
- typo fix
- clarify default behavior for missing keys

For: #9451
2023-12-12 18:43:00 -06:00
Steven R. Loomis
c975b61c9b
Merge branch 'fix/core/9451-key-not-found-epic-ldml' into fix/core/8069-todo-ldml-epic-ldml 2023-12-12 08:58:11 -06:00
Steven R. Loomis
1cd97fadb9 feat(core): ldml improve key-not-found 🙀
- move vkey_to_contextreset  table into a common spot in core
- assert that vk < 0x100 to avoid running off the table

For: #9451
2023-12-12 08:56:33 -06:00
Steven R. Loomis
cadf7a1e14 fix(core): remove a TODO-LDML 🙀
Fixes: #8069

(all of the rest are in other tickets)
2023-12-08 18:48:01 -06:00
Steven R. Loomis
1e32a2a963 feat(core): ldml improve key-not-found 🙀
- copy exception table for reset from VKScanCodes.cpp
- update test

For: #9451
2023-12-07 17:15:44 -06:00
Steven R. Loomis
2071d25745 feat(core): ldml_processor fix for markers 🙀
- don't skip markers when calling context_to_string()! Oops.
- update docs on ldml_processor::remove_text()
- update remove_text() to handle markers in the context string.

This is really: #9468
2023-12-07 19:54:16 +00:00
Steven R. Loomis
392c535270 feat(core): ldml improve key-not-found 🙀
- also affects markers, feat(core): normalization per spec for transforms/etc 🙀  #9468
- keep markers in nfd context string
- fix ldml test harness to handle context reset
- update test case
- still issues with overproduction of markers in the context

For: #9451
2023-12-06 18:33:51 -06:00
Steven R. Loomis
4d22b177af feat(core): ldml improve key-not-found 🙀
- unused nit fix

For: #9451
2023-11-29 14:34:33 -06:00
Steven R. Loomis
84cc59c174 feat(core): ldml improve key-not-found 🙀
- restructure keyup/keydown code some
- new utility function emit_invalidate_passthrough_keystroke()

For: #9451
2023-11-29 14:29:26 -06:00
Steven R. Loomis
11334ed7fa feat(core): ldml improve key-not-found 🙀
- distinguish between unmapped and 0-length output strings
- don't do any processing for 0-length output strings
- no change to developer, that will be next
- remove a comment referencing transform=no

For: #9451
2023-11-28 18:07:46 -06:00
Steven R. Loomis
e9e5665cb8 feat(core): ldml backspace transform 🙀
- refactor transform/normalization inner routine

For: #9450
2023-11-16 12:27:23 -06:00
Steven R. Loomis
d0c8ea5c88 feat(core): ldml backspace transform 🙀
- refactor keypress some (needs more)
- copypasta implementation of backspace transform

For: #9450
2023-11-16 12:25:15 -06:00
Steven R. Loomis
2f843d98f3 feat(core): marker normalization 🙀
- go back to NFD for the context, for now
- anticipating when the privatecontext is NFD but the public context is NFC
- also update the test cases

For: #9468
2023-11-14 16:36:15 -06:00
Steven R. Loomis
78c2ac4aec feat(core): ldml marker normalization 🙀
- refactor out backspace processing into a function.
- for now, just drop any markers in the context when we're lopping off the end

For: #9468
2023-11-14 07:28:41 -06:00
Steven R. Loomis
a69feb583f feat(core): ldml marker normalization 🙀
- km::kbp is soooo last month!
- test_transforms can run NFD with markers, with some caveats.

For: #9468
2023-11-14 07:28:10 -06:00
Steven R. Loomis
015a738226 feat(core): ldml marker normalization 🙀
- add a new remove_markers(std::u32string) function
- add test cases for text utils
- update (failing) test cases for transform
- improve documentation of append process
- support KM_CORE_BT_UNKNOWN in ldml test
- remove_markers with a map
- update normalize test

For: #9468
2023-11-14 07:26:47 -06:00
Eberhard Beilharz
f4d8529789
chore(linux): rename keyboardprocessor_ldml.* to keyman_core_ldml 2023-10-20 17:30:10 +02:00
Eberhard Beilharz
7369b22599
chore(linux): Merge with chore/linux/9733_RenameLibknmkbp
# Conflicts:
#	core/src/debuglog.h
#	core/src/ldml/ldml_processor.cpp
#	core/src/ldml/ldml_transforms.cpp
#	core/src/ldml/ldml_transforms.hpp
#	core/tests/unit/ldml/ldml.cpp
2023-10-20 12:52:38 +02:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
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
93e1c18af2 fix(core): ldml update to normalization per review 🙀
For: #9468

Co-authored-by: Marc Durdin <marc@durdin.net>
2023-10-16 20:22:52 -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
e64f59613a feat(core): ldml normalization 🙀
- split out 'process_key_string'

For: #9468
2023-10-12 10:10:51 -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
db76e2541d chore: rename KM_KBP_ to KM_CORE_ 2023-10-09 14:53:22 +07:00
Marc Durdin
ba5f18defd chore: rename km_kbp_ to km_core_ 2023-10-09 14:53:13 +07:00
Steven R. Loomis
9f033278d4 feat(core): marker validation 🙀
- validate marker number when going in or out of the context

#9119
2023-08-11 15:09:54 -05:00
Steven R. Loomis
2bf22c440d feat(core): marker fixes per review comments 🙀
- simplify and improve context processing

For: #9119

Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2023-08-10 13:30:29 -05:00
Steven R. Loomis
66ee68d2b3
Apply suggestions from code review
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2023-08-10 09:36:16 -05:00
Steven R. Loomis
c23303ee23
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-08-09 12:52:28 -05:00