Skip to content

feat: YottaDB m-modern-corpus coverage — 6 of 8 backlog features (v0.1.2)#7

Open
rafael5 wants to merge 1 commit into
mainfrom
feat/ydb-modern-coverage-v2
Open

feat: YottaDB m-modern-corpus coverage — 6 of 8 backlog features (v0.1.2)#7
rafael5 wants to merge 1 commit into
mainfrom
feat/ydb-modern-coverage-v2

Conversation

@rafael5

@rafael5 rafael5 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Closes the bulk of docs/m-modern-corpus-coverage-gaps.md — standard YottaDB syntax the VistA-tuned grammar never exercised. All additive grammar.js rules; no src/scanner.c change (each new lead char &///|/[ is only reachable at argument/expression start or right after a global ^, so existing LR states disambiguate without byte-level lookahead).

This branch also lands docs/m-modern-corpus-coverage-gaps.md (the backlog/spec), authored by the prior docs-discoverability work but never merged to main.

Shipped (6 of 8 backlog features)

  • (1) &/$& external C call-outsexternal_call + external_function + _external_name
  • (2) WRITE/USE /mnemonic device controlsdevice_control
  • (4) TSTART (vars):(chars) + (8) LOCK (^a,^b):n — optional argument_postconditional on the set_target_list argument branch
  • (5) KILL * / TSTART *asterisk_argument
  • (6) extended reference^|env|gvn + single-region ^[env]gvn via extended_reference prefix on global_variable

Verification

  • 18 new corpus tests; full suite 132/132.
  • src/parser.c regenerated with pinned tree-sitter-cli@0.25.10 (byte-identical regen of the unmodified grammar verified first as a safety gate); ABI stays 15.
  • Version 0.1.1 → 0.1.2 across all six declarations.

Regression gate (full corpora)

Corpus errnode before → after clean % HasError before → after
m-modern (4,215) 451 → 230 89.30% → 94.54% 745 → 549
VistA (39,330) 363 → 336 99.08% → 99.15% 376 → 347

VistA did not regress on either metric — it improved (a few VistA-on-YDB routines share the &/extended-ref forms).

Re-backlogged tail

Vendor $Z* (upstream m-standard data), Z-command special-arg surface (ZWRITE ^?.E, ZBREAK …#n#:"action", */range subscripts), multi-region ^[gld,region] comma lists, ###REPLACE test macros. READ X#n needs no work (the # already lexes as modulo → no ERROR). Details in the gaps doc.

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

🤖 Generated with Claude Code

…1.2)

Close the bulk of docs/m-modern-corpus-coverage-gaps.md: standard
YottaDB syntax the VistA-tuned grammar never exercised. All additive
grammar.js rules — no src/scanner.c change needed, since each new
construct's lead char (&, /, |, [) is only reachable at argument /
expression start or right after a global ^, so the existing LR states
disambiguate it from the binary &/ / ]) operators without byte-level
lookahead.

Shipped:
- (1) &/$& external C call-outs: external_call + external_function
- (2) WRITE/USE /mnemonic device controls: device_control
- (4) TSTART (vars):(chars) + (8) LOCK (^a,^b):n: optional
  argument_postconditional on the set_target_list argument branch
- (5) KILL * / TSTART *: asterisk_argument
- (6) extended reference ^|env|gvn and single-region ^[env]gvn:
  extended_reference prefix on global_variable

This branch also lands docs/m-modern-corpus-coverage-gaps.md (the
backlog/spec), which the prior docs-discoverability-phase0 work authored
but never merged to main.

18 new corpus tests; full suite 132/132. Regenerated src/parser.c with
the pinned tree-sitter-cli@0.25.10 (byte-identical regen of the
unmodified grammar verified first); ABI stays 15. Version 0.1.1 -> 0.1.2
across all six declarations.

Regression gate (full corpora):
  m-modern (4,215): errnode 451 -> 230 (89.30% -> 94.54% clean)
  VistA (39,330):   errnode 363 -> 336 (99.08% -> 99.15%, improved)
VistA did not regress on either errnode or HasError.

Re-backlogged tail: vendor $Z* (upstream m-standard), Z-command
special-arg surface, multi-region ^[a,b] comma lists, ###REPLACE macros.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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