Repository navigation
Dictionary join=, split=, _name lines; bare entries load (#433 #434 #426 #417) (4.2.30) - #786
Merged
Merged
Conversation
#417) (4.2.30) - #433: a .dict line with no attributes ("license plate") was a "missing equal sign" error that ended the read of the file, silently dropping every entry after it. It is now an entry (a phrase becomes _phrase), and any bad line is reported in cgerr.log and skipped. - #434: join=1 turns a phrase into one token of its words ("HOT-ROD" -> HOTROD), which is then looked up in turn. - #426: split="license plate" replaces a token with those words, with their own offsets when they spell the token. - #417: a "_bridge type=location" line puts attributes on every _bridge node the dictionary builds; an entry's own attributes win. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four dictionary-tokenizer (
dicttok) issues. The syntax follows the choices made in review.#433: bare entries (bug). I couldn't reproduce the issue's original symptoms on master:
hot - rod s=hotrodgives_hotrod,HOT-3doesn't match, and\-works for unknown words. The real bug was different. A.dictline with no=(license plate) was a "missing equal sign" error,readDictstopped there, and every entry after it was dropped. The error only went to cgerr, so nothing looked wrong. Now:_phrase;#434:
join=1.hot - rod join=1turnsHOT-RODinto one tokenHOTROD, spanning the same text. Whitespace and punctuation are dropped. The token is then looked up itself, sohotrod s=vehiclebuilds_vehicleover it.#426:
split="words".licenseplate split="license plate"replaces the token with adjacent tokenslicense(its own offsets 42-48) andplate(49-53).weathervconditions), each word spans the whole token.weather conditions s=weather.#417:
_namelines._bridge type=location kind=genericputs those attributes on every_bridgethe dictionary builds. An entry's own attributes win:viaduct s=bridge kind=raisedgiveskind=raised.Implementation:
lite/dicttok.cpp. It addssplitToken,joinPhrase,makeLitTok(a literal-flagged token, as makeliteral makes) andreplaceRange. The attribute loop moves fromfindAttrsintoapplyAttrs, andjoin/splitaren't copied onto nodes as attributes. ThereadDict/parseDictLinechange is incs/libconsh/cg.cpp.Impact on existing dictionaries: I scanned 110
.dictfiles across analyzers, visualtext-files and package-analyzers. Three have a stray bare word on their last line. It now loads as a plain word, and nothing came after it to lose.Tests:
tests/dict-shape, with CI steps on Windows and Linux. The input is one line so the offsets hold on CRLF checkouts.$GITHUB_WORKSPACEand always fails locally.Docs: VisualText/visualtext-files PR to follow. Batched: don't tag yet.
🤖 Generated with Claude Code