Skip to content

Establish R0 compiler foundation - #3

Open
igniting wants to merge 1 commit into
masterfrom
vorflux/restore-compiler-r0
Open

Establish R0 compiler foundation#3
igniting wants to merge 1 commit into
masterfrom
vorflux/restore-compiler-r0

Conversation

@igniting

@igniting igniting commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Establishes the R0 foundation for restoring the legacy Ada compiler: a reproducible modern host build, an honest analysis CLI, an executable grammar-coverage ledger, and a validated Linux MIPS/QEMU target contract.

Changes

  • Replace root-level lex/yacc artifacts with strict C11 Flex/Bison builds under build/, plus an adac driver whose R0 check phase reports stable diagnostics and whose unavailable compile/build phases fail without artifacts.
  • Remove parser-owned entry-point and symbol-table globals, preserve literal spelling, canonicalize identifiers safely, correct source positions, and modernize legacy utility/table code.
  • Inventory all 233 nonterminals and 513 grammar alternatives, validate zero parser conflicts, classify the tracked corpus by release, and add drift/ambiguity regression tests.
  • Pin the little-endian MIPS32r2/o32 hard-float toolchain contract and add freestanding startup/syscall/linker fixtures for text-only and writable-data ELF executables.
  • Validate static ELF layout, plain qemu-mipsel execution, syscall behavior, and six-argument interoperability with mipsel-linux-gnu-gcc-13.

Testing

  • PASS — make clean && make strict
  • PASS — make strict (no repeated compile/link work; validation gates reran)
  • PASS — make test
  • PASS — python3 -m unittest -v tests/unit/test_grammar_inventory.py (9 tests)
  • PASS — python3 tests/run_tests.py --build-dir /tmp/adac-r0-evidence/contract

The contract runner passed text-only ELF/QEMU, writable-data ELF/QEMU, and six-argument cross-GCC ABI probes. The grammar baseline is 233 nonterminals, 513 alternatives, 0 shift/reduce conflicts, and 0 reduce/reduce conflicts.


Session Details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant