Eric Streit faddb4ddb2 corpus: run the V3 compiler over the gm2 testsuite (219/612 compile-OK) há 2 semanas atrás
..
README.md faddb4ddb2 corpus: run the V3 compiler over the gm2 testsuite (219/612 compile-OK) há 2 semanas atrás
corpus.sh faddb4ddb2 corpus: run the V3 compiler over the gm2 testsuite (219/612 compile-OK) há 2 semanas atrás

README.md

v3-corpus

Runs the V3 compiler (compiler/M2) over a corpus of standard Modula-2 sources and reports compile coverage — unlike tools/topspeed-grammar, which runs the sidecar grammar.

./corpus.sh [corpus-dir ...]
# default: gm2 testsuite pim/pass + iso/run/pass

Each source is copied into a scratch tree (so its .LST listing never touches the corpus) and compiled on its own. A file with 0 errors is a pass. Failures are split into:

  • CRASH — M2 died (rc ≥ 128): a real compiler bug;
  • LIB — the file imports a module outside V3's known stdlib set (gm2's StrIO/NumberIO/STextIO/…), so the undeclared identifiers are expected, not a language gap;
  • LANG — otherwise: a genuine parse/semantic gap in V3.

A "pass" is syntactic+semantic cleanup, not a linkable image (many testsuite files are DEFINITION/IMPLEMENTATION modules with no program; V3 reports those as Incorrect source but with 0 errors).

Current baseline: docs/summary_v3-corpus.md.