|
|
1 day ago | |
|---|---|---|
| .. | ||
| build | 1 day ago | |
| README.md | 1 day ago | |
| build.sh | 1 day ago | |
| corpus.sh | 1 day ago | |
| scanner.frm | 1 day ago | |
Corpus harness for the historical TopSpeed / JPI V3 dialect, using
the sidecar grammar compiler/src/TopSpeed-V3-M2.atg.
The sidecar is a grammar deliverable: it parses the TS-V3 dialect
(pragmas, H/C/B literals, ::=, anchored subranges, address
constructors, CLASS/IS/VIRTUAL, manifest constants, tagless and
trailing-| variant records, ...). Constructs the current backend
cannot lower yet still parse and end with the standard
SemError(230) marker (parse-now / lower-later), exactly like
M2.atg.
./build.sh # -> build/TSM2 (build/ is git-ignored)
It copies the grammar, the frames and the V3
SymTab/QbeGen/FileIO sources into build/, runs CR -m -C,
compiles with gm2 -fiso and links TSM2. Needs the project CR
($HOME/Projets/Projets-Modula2/MyWork/CocoGm2/CR) and GNU Modula-2.
The sidecar uses its own scanner frame — scanner.frm in this
directory — which adds TopSpeed conditional compilation
(*%T cond*) / (*%F cond*) / (*%E*): a CondFilter blanks the
inactive regions of the source buffer (CR/LF kept) before scanning.
The define set is {_fdata, _mthread, _fptr, _fcall} (see InitDefs);
tune it there. V3's own compiler/src/scanner.frm is left untouched,
so the sidecar never affects the self-hosting compiler.
./corpus.sh [corpus-dir] # default: $HOME/bin/Dos/M2/TS-V3
Runs TSM2 over every .DEF/.MOD, copying each into a scratch tree
so the .LST listings never touch the corpus, and reports:
230/semantic markers,'x' expected, invalid X).Current result on the TS-V3 tree (662 files, 352 .DEF + 310 .MOD):
644 parse-OK / 18 syntax-bad — see
docs/summary_topspeed-corpus.md.