Repository navigation
A -DEV run's tree and rule matches, on every pass - #20
Merged
Merged
Conversation
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>
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.
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 marksfired, put back over the input the run read.<<< >>>is what a rule built,((( )))what one matched without building. That is the.txxtgrammar'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'streesand raisesnlp-open-treeandnlp-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-viewsgoes to 0.5.0 — the admin console installs it from a release, so it needs one cut before it can use this.Checked
npm testin both workspaces (57 + 29),tsc --noEmit, andnpm run selftestagainst 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