Skip to content

revendor: tree-sitter-m grammar v0.1.2 (YottaDB m-modern-corpus coverage)#1

Merged
rafael5 merged 1 commit into
mainfrom
feat/grammar-v0.1.2-ydb-coverage
May 29, 2026
Merged

revendor: tree-sitter-m grammar v0.1.2 (YottaDB m-modern-corpus coverage)#1
rafael5 merged 1 commit into
mainfrom
feat/grammar-v0.1.2-ydb-coverage

Conversation

@rafael5

@rafael5 rafael5 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Re-vendors the embedded M grammar to tree-sitter-m v0.1.2 (commit c796342, tree-sitter-m PR #7) and rebuilds parse/tree-sitter-m.wasm via emscripten/emsdk:4.0.4.

  • ABI unchanged (15); scanner.c + headers unchanged — the grammar change was additive grammar.js only.
  • New YottaDB syntax now parsed: &/$& external C call-outs, WRITE/USE /mnemonic device controls, TSTART/LOCK argument-list :timeout, KILL */TSTART *, extended reference ^|env|gvn / ^[env]gvn.

Parse-coverage impact (files with a literal ERROR node, full corpora)

Corpus before (v0.1.1) after (v0.1.2)
m-modern-corpus (4,215) 451 err / 89.30% clean 230 err / 94.54% clean
VistA (39,330) 363 err / 99.08% clean 336 err / 99.15% clean (held)

VistA did not regress.

Verification

  • CGO_ENABLED=0 go test ./... ✓, gofmt ✓, go vet ✓, golangci-lint
  • Committed wasm re-measured: m-modern errnode = 230 (matches the grammar's validated number).

Follow-up (separate): m-cli must bump its m-parse dependency to consume this grammar.

🤖 Generated with Claude Code

…age)

Re-vendor wasm/vendor/grammar/src/parser.c from tree-sitter-m v0.1.2
(commit c796342, PR #7) and rebuild the embedded parse/tree-sitter-m.wasm
via emscripten/emsdk:4.0.4. ABI unchanged (15); scanner.c + headers
unchanged (the grammar change was additive grammar.js only).

The new grammar adds standard YottaDB syntax the VistA-tuned grammar
never modelled: &/$& external C call-outs, WRITE/USE /mnemonic device
controls, TSTART/LOCK argument-list :timeout, KILL */TSTART *, and
extended reference ^|env|gvn / ^[env]gvn.

Parse-coverage impact (files with a literal ERROR node, full corpora):
  m-modern-corpus (4,215): 451 -> 230 err (89.30% -> 94.54% clean)
  VistA (39,330):          363 -> 336 err (99.08% -> 99.15%, held)

VistA did not regress. VENDOR.md commit-pin + version + revendor history
updated. CGO_ENABLED=0 go test ./..., gofmt, go vet, golangci-lint all
clean. Follow-up: m-cli must bump its m-parse dependency to consume this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rafael5 rafael5 merged commit 9509c68 into main May 29, 2026
5 checks passed
@rafael5 rafael5 deleted the feat/grammar-v0.1.2-ydb-coverage branch May 29, 2026 16:33
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