Skip to content

Compiled analyzers run zone mode; zone lines take no pass number (4.2.49) - #807

Merged
ddehilster merged 1 commit into
masterfrom
feat/compiled-zones
Oct 27, 2026
Merged

ddehilster merged 1 commit into
masterfrom
feat/compiled-zones

Conversation

@ddehilster

Copy link
Copy Markdown
Member

Compiled analyzers used to ignore zone and endzone lines and run every pass on the whole document. They now zone the same way an interpreted run does.

Compiled zone mode

  • The generated run_analyzer() runs the passes before the zone line, then hands two generated functions to Arun::zones:
    • zonepasses(): the passes between zone and endzone;
    • endzonepasses(): the passes after endzone, or 0 if there is no endzone line.
  • Parse::zoneLoop is the zone loop (find zones, hide the path, run, check, restore, stub). Interpreted and compiled runs now share it; executeZones and runZones are thin wrappers.
  • Parse::zonePrefix gives compiled passes the same z001-ana###.tree names and the same three-zone -DEV cap as interpreted ones.

Pass numbers

  • 4.2.48 stopped numbering zone/endzone lines in the run, but the sequence loader still numbered them. After a zone line, an NLP++ error therefore named the pass before the one that failed: "pass 4 (words)" for an error in report.
  • Seqn::isZoneMarker now keeps zone lines unnumbered everywhere passes are numbered (Ana, Aseq intern and numberSeq, Seqn::gen), so generated pass names match too.

Build

  • Parse::iniPass is no longer inline on Windows. Arun.cpp calls it, and it only linked while parse.cpp happened to keep an out-of-line copy. With this change it didn't, and the link failed.

Tests

  • New Windows CI step: it builds the zone-mode fixture as a compiled analyzer and diffs its stdout and -DEV tree list against the interpreted run.
  • Locally, x86 against hand-assembled compile-libs:
    • the compiled run matches the interpreted run line for line, including final.tree and the z00N-ana00M.tree files;
    • all 56 Windows fixture steps pass;
    • parse-en-us -DEV output on its three inputs is byte-identical to 4.2.48 (454 files);
    • an NLP++ error after a zone line now reports pass 4 (report).

🤖 Generated with Claude Code

….49)

A compiled analyzer ignored zone and endzone lines and ran every pass on
the whole document. The generated run_analyzer() now puts the zone passes
in zonepasses() and the passes after endzone in endzonepasses(), and hands
them to Arun::zones, which runs the same zone loop as an interpreted run
(Parse::zoneLoop, now shared). Compiled passes name their -DEV trees
z001-ana###.tree like interpreted ones (Parse::zonePrefix).

Zone and endzone lines no longer take a pass number when the sequence is
loaded either (Seqn::isZoneMarker). 4.2.48 stopped numbering them only in
the run, so after a zone line an NLP++ error named the pass before the
one that failed ("pass 4 (words)" for an error in report).

Parse::iniPass is no longer inline: Arun.cpp calls it, and it only linked
while parse.cpp happened to keep an out-of-line copy.

CI: the Windows job builds the zone-mode fixture as a compiled analyzer
and compares its output and -DEV trees with the interpreted run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 846f162 into master Oct 27, 2026
7 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