|
|
4 ngày trước cách đây | |
|---|---|---|
| .. | ||
| tests | 4 ngày trước cách đây | |
| README.md | 4 ngày trước cách đây | |
| build.sh | 4 ngày trước cách đây | |
| oberon07_oberon.atg | 4 ngày trước cách đây | |
oberon07_oberon.atg is the installed Oberon-07 grammar plus 5 fixes
needed to build a working validator with Coco/R V1.53 (CR) and GNU
Modula-2 (gm2 -fiso), all diagnosed against voc as oracle:
statement: assignment | ProcedureCall factored into
AssignmentOrProcedureCall (the unfactored form generated duplicate
CASE labels — uncompilable parser).designator: dropped "(" qualident ")" (hijacked call parens;
Out.String("hi") failed with ident expected).qualident: [ ident "." ] ident rewritten as
ident { "." ident } (optional-prefix lookahead trap; same rewrite
the M2 grammar uses).real requires post-dot digits + CONTEXT ("..") on integers
(the 2..3 lexer trap; same as the M2 grammar's documented fix).ForStatement (voc accepts FOR as an extension although
strict Oberon-07 dropped it; without it every FOR loop is a
false positive).Two benign LL(1) warnings remain (DeclarationSequence PROCEDURE
conflict, qualident dot conflict); the differential below shows they
do not bite real code.
./build.sh # -> build/O07 (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).
voc)23 accept probes + tests/deep.Mod (records, pointers, nested
recursion, multidim arrays, procedure types, CASE ranges, hex/reals):
0 false positives. 8 broken mutants: 0 missed, positions
within ~3 columns. voc quirks found on the way: bare WITH fields
rejected (only qualified p.x accepted); FOR accepted as an
extension; module END-name mismatch unreported by O07 (accepted gap).