vms-c211: SET SYMBOL /ALL /GENERAL /VERB scope-domain selectors (+ /GLOBAL /LOCAL IVQUAL) - #487
Merged
Merged
Conversation
…LOBAL /LOCAL IVQUAL) Implements the SET SYMBOL command qualifiers deferred from vms-2af (#441, which added /SCOPE + per-@-level local frames). Semantics are taken from the public OpenVMS DCL Dictionary (VSI OpenVMS DCL Dictionary N-Z, SET SYMBOL), which defines EXACTLY four command qualifiers: /SCOPE=(keyword,...) the scope change (already implemented by vms-2af) /ALL (default) scope applies to BOTH first-token (verb) translation AND general symbol substitution /GENERAL scope applies to all symbols EXCEPT the first token /VERB scope applies ONLY to first-token (verb) translation /ALL, /GENERAL and /VERB are mutually exclusive. The scope state is now tracked per translation domain (general vs verb) in each command-level frame. dcl_sym_get_ex(name, domain) consults the domain's flags; the verb-position lookup in dcl_exec.c uses the VERB domain, all other lookups the GENERAL domain, so /VERB and /GENERAL have a real, observable effect on the symbol tables (verb translation can be hidden while general 'sym' substitution still works, and vice-versa). /ALL (the default) sets both, preserving the vms-2af behaviour exactly. CLEAN-ROOM / SPEC NOTE (Rule 8, source-of-truth): the item text asked for standalone /GLOBAL and /LOCAL qualifiers, but the DCL Dictionary has no such qualifiers -- LOCAL/GLOBAL are /SCOPE *keywords* (handled by vms-2af). Real DCL rejects "SET SYMBOL/GLOBAL" with %DCL-W-IVQUAL, so OVMX now emits an authentic %DCL-W-IVQUAL for any qualifier that is not a unique prefix of the real set (INV-DCL: honest error, never a silent accept). This is the VMS-matching behaviour; the deferred /GLOBAL//LOCAL premise is superseded. Test: tests/dcl/test_symbol_scope_domain.sh (auto-discovered by the DCL harness) -- differential proof that /VERB and /GENERAL split the two translation domains, plus /GLOBAL//LOCAL -> IVQUAL. dcl-integration ctest green (4/4); vms-2af test_symbol_scope unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 13, 2026
…tes real OVMX code) (#500) Bump OVMX_PRODUCT_VERSION V0.4-3 → V0.4-4. ~12 PRs since V0.4-3. Headline: OVMX's own toolchain now builds real OVMX code to a running image INSIDE OVMX. SELF-HOST IN-GUEST MMK.EXE drives TCC→LIBRARIAN→LINK over its mailbox DCL vs real /dev/vms: #476 compile-in-QEMU (first-ever TCC-in-guest), #488 archive, #493 full compile→archive→LINK→ACTIVATE (linked OVMXRT.EXE IMGACT-activates + runs, exit 216), byte-identical, CI-gated from clean archive. (BUILD.COM retirement → vms-89d.) UX FIDELITY #461 DIRECTORY wildcards/ellipsis · #478 COPY/DELETE/RENAME (explicit-version DELETE) · #481 HELP .HLB library · #487 SET SYMBOL scope · #491 DCL ON/SET NOON error control BOOT INTEGRITY #499 boot-smoke green (aligned 3 e2e tests to authentic DELETE/DIRECTORY output; strengthened the fail-stop guard) + swept other threads' merged work Co-authored-by: alice <alice@workspace.local> Co-authored-by: Claude Opus 4.8 (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.
Summary
Implements the remaining SET SYMBOL qualifiers deferred from
vms-2af(#441, which added/SCOPE+ per-@-level local symbol frames). Semantics are taken from the public OpenVMS DCL Dictionary (VSI OpenVMS DCL Dictionary N–Z, SET SYMBOL), which defines exactly four command qualifiers:/SCOPE=(keyword,…)[NO]LOCAL,[NO]GLOBAL) — already done by vms-2af/ALL(default)/SCOPEchange applies to both first-token (verb) translation and general symbol substitution/GENERAL/VERB/ALL,/GENERAL,/VERBare mutually exclusive.What changed
/SCOPEhide-flags separately for the general and verb translation domains (dcl_symbol.c).dcl_sym_get_ex(name, domain)consults the right domain; the verb-position lookup indcl_exec.cuses the VERB domain, every other lookup the GENERAL domain. So/VERBand/GENERALhave a real, observable effect: verb translation can be hidden while general'sym'substitution still works, and vice-versa./ALL(default) sets both, preserving vms-2af behaviour exactly.cmd_set_symbolrewrite (dcl_cmd_set.c): resolves each parsed qualifier against the real set with VMS unique-prefix abbreviation, applies the/SCOPEchange to the selected domain, and rejects/ALL+/GENERAL+/VERBcombinations.Clean-room / spec note (Rule 8, source-of-truth)
The item text asked for standalone
/GLOBALand/LOCALqualifiers, but the DCL Dictionary has no such qualifiers —LOCAL/GLOBALare/SCOPEkeywords (handled by vms-2af). Confirmed against three public sources (HPE V8.3 DCL Dictionary, VSI wiki, ODL V7.3): the qualifier list is/ALL /GENERAL /SCOPE /VERBonly. Real DCL rejectsSET SYMBOL/GLOBALwith%DCL-W-IVQUAL, so OVMX now emits an authentic%DCL-W-IVQUALfor any qualifier that is not a unique prefix of the real set (INV-DCL: honest error, never a silent accept). This is the VMS-matching behaviour; the deferred/GLOBAL///LOCALpremise is superseded rather than implemented as described.Citation: VSI OpenVMS DCL Dictionary N–Z, SET SYMBOL (
/ALL,/GENERAL,/SCOPE,/VERB).Testing
tests/dcl/test_symbol_scope_domain.sh(auto-discovered by the DCL harness — no CMake wiring needed). Differential test using the sameFOO=="WRITE"(verb target) andBAR=="barval"(general subst) across three scenarios, so any behaviour change is attributable to the domain qualifier alone:/SCOPE=NOGLOBAL/VERB→FOOhidden from verb translation (%DCL-E-IVVERB),'BAR'still expands./SCOPE=NOGLOBAL/GENERAL→'BAR'hidden (GN_GEN=<>),FOO→WRITEstill runs./SCOPE=NOGLOBAL(/ALL) → both hidden.SET SYMBOL/GLOBALand/LOCAL→%DCL-W-IVQUAL.dcl-integrationctest green (4/4) with the change; vms-2aftest_symbol_scopeunaffected (no scope regression). The 3 HELP/INSTALL/ATTACH failures seen when running the harness standalone are pre-existing on clean origin/main (verified by stash-baseline: 133 pass / same 3 fail) and pass under the ctest environment.No new cross-image symbols or TUs, so no native-link enumeration wiring was required.
🤖 Generated with Claude Code