|
|
@@ -58,3 +58,28 @@ The reference grammar lives at `grammars/Modula2.atg` (copy of the
|
|
|
tested `gm2-gcc-0.2.atg`); parser regression tests live in
|
|
|
`grammars/tests/` and are checked with
|
|
|
`<GNU-grammar>/bin/GM2 <test>.mod` (expect `0 errors`).
|
|
|
+
|
|
|
+## Differential results (GM2 vs `gm2 -fiso`)
|
|
|
+
|
|
|
+Measured with `bin/GM2` against gm2 16.0.1: 21 real files
|
|
|
+(m2compiler-V3, m2-sunrise, hello), 22 accepted-construct probes and
|
|
|
+9 broken probes. GM2 is syntax-only by design — it never type-checks,
|
|
|
+so semantic errors (unknown names, type mismatches, bad arities) are
|
|
|
+always missed and do not count below. GM2 exits 0 either way;
|
|
|
+consumers must parse stdout.
|
|
|
+
|
|
|
+- Valid files: 20/21 clean. The one gap is `FORWARD` procedure
|
|
|
+ headings (85 diags on the generated `M2P.mod`): the grammar's
|
|
|
+ `ProcedureDeclaration = ProcedureHeading ";" ( ProcedureBlock Ident )`
|
|
|
+ has no `FORWARD` alternative, while gm2 accepts it. Probable fix:
|
|
|
+ `( "FORWARD" | ProcedureBlock Ident )` (plus regenerating the
|
|
|
+ validator with the Coco/R toolchain).
|
|
|
+- Accepted constructs: 21/22, same `FORWARD` gap. `WITH`, `CASE`/`ELSE`,
|
|
|
+ `REPEAT`, `LOOP`/`EXIT`, nested comments, set constructors, all
|
|
|
+ literal forms, `BY -1` steps and the empty module all parse.
|
|
|
+- Broken files: 6/7 caught with gm2-matching positions (GM2 columns
|
|
|
+ are zero-based, which the server already accounts for — no column
|
|
|
+ adjustment needed). Missed: module `END`-name mismatch (unchecked).
|
|
|
+ Two probes were correctly *not* errors: gm2 itself only warns on a
|
|
|
+ missing `;` before `END` and on an unclosed `(` (separator/recovery
|
|
|
+ leniency), and GM2 agrees with it.
|