|
|
3 дней назад | |
|---|---|---|
| .. | ||
| tests | 3 дней назад | |
| README.md | 3 дней назад | |
| build.sh | 3 дней назад | |
| pasta80.atg | 3 дней назад | |
pasta80.atg describes Pascal-S as implemented by Arzu/Terry's
Coco/R-Turbo-Pascal compiler (1996-97). The reference files
(Grammars/Pasta80/pasta80.atg, identical to Pascual/pascual.atg
modulo its tags line) are written for a newer Coco/R generation:
attributed rules (<params>, (.. actions ..), SYNC), so the
pilot is a mechanical port — actions/attributes stripped by script,
<> restored where the stripper ate the operator — plus hand fixes,
all diagnosed against psc (the Turbo batch interpreter built with
fpc -Mtp) as oracle:
| empty literal from the eaten <> (in RelOp).Statement { ";" Statement } lists (block body,
CompStat, parameter tails) made tolerant.preal in RealConst merged.WriteArg string-vs-expression conflict merged into
Expression [ ":" ... ] (after proving psc accepts string
comparisons, so StrConst belongs in Factor).";" after every record field relaxed to the tolerant
list shape.CASE statement added whole (CASE/OF/|/END,
labels are pnumber/ident/pstring, no ranges, no ELSE —
each shape probed).REPEAT with "," separators corrected to ";" (probed:
psc takes semicolons, rejects commas).READ/WRITE calls: parens made optional (probed).One benign LL(1) warning family remains (dangling-ELSE).
./build.sh # -> build/Pasta80 (build/ is git-ignored)
Needs CR (Coco/R), gm2 -fiso, the parser.frm/scanner.frm
frames and FileIO.def/.mod — all resolved from the environment with
sensible defaults (CRFRAMES, M2LIB, CR, GM2).
psc)The PascalS accept battery (22 cases) + tests/deep.pas (nested
routines with var params, records, all statements, reals):
0 false positives. Broken mutants (12): 0 missed, positions
close. (i := 1 without ; and unterminated comments are accepted
by psc too — separator/recovery leniency, correctly skipped.)