Skip to content

A -DEV run's tree and rule matches, on every pass - #20

Merged
ddehilster merged 1 commit into
mainfrom
feat/tree-and-matches-icons
Sep 17, 2026
Merged

ddehilster merged 1 commit into
mainfrom
feat/tree-and-matches-icons

Conversation

@ddehilster

@ddehilster ddehilster commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Tick Debug — the engine's -DEV — and every pass in the Analyzer Sequence now carries the two buttons the VS Code extension's sequence view offers a pass that has a log: its parse tree, and what its rules matched.

What the matches are

Not a file the engine writes. The extension derives them from the pass's tree, and ruleMatches() (analyzer-views/src/matches.ts) does the same: every node the tree marks fired, put back over the input the run read.

<<<hello world>>>. <<<Hi there>>>, and <<<hey everyone>>>!

<<< >>> is what a rule built, ((( ))) what one matched without building. That is the .txxt grammar's own markup, so the document colours as a rule-match file in the editor.

Deriving it in the browser is the point: a page that can fetch a pass's tree can show its matches, with nothing new from the run server. The TEG console's Browse and run gets it the same way, from the same package.

The package

<nlp-sequence> takes the run's trees and raises nlp-open-tree and nlp-open-matches, each with the tree's name and its pass number; the page decides what to do with them. Rows are otherwise unchanged, and a sequence with no trees looks exactly as it did. @visualtext/analyzer-views goes to 0.5.0 — the admin console installs it from a release, so it needs one cut before it can use this.

Checked

npm test in both workspaces (57 + 29), tsc --noEmit, and npm run selftest against the real engine — 53/53, including the new check that pass 3's matches open as <<<hello world>>>. <<<Hi there>>>, and <<<hey everyone>>>!

🤖 Generated with Claude Code

Tick Debug -- the engine's -DEV -- and every pass in the sequence now carries
two buttons, the two the VS Code extension's sequence view offers a pass that
has a log: its parse tree, and what its rules matched.

The matches are not a file the engine writes. The extension derives them from
the pass's tree, and ruleMatches() (analyzer-views/src/matches.ts) does the
same: every node the tree marks "fired", put back over the input the run read as
<<<what a rule built>>> and ((( what one matched ))). That is the .txxt
grammar's own markup, so it colours as a rule-match file, and deriving it in the
browser means a page that can fetch a pass's tree can show its matches --
nothing new from the run server, and the TEG console gets it the same way.

<nlp-sequence> takes the run's trees and raises nlp-open-tree and
nlp-open-matches with the tree's name and its pass number; the page decides what
to do with them. The rows are otherwise as they were.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 2e0b0d6 into main Sep 17, 2026
2 checks passed
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.

1 participant