Skip to content

Bootstrap C++ compiler and restore Python reference tests - #18

Merged
ewanc26 merged 11 commits into
mainfrom
codex/numlang-cpp-bootstrap-v3
Oct 25, 2026
Merged

ewanc26 merged 11 commits into
mainfrom
codex/numlang-cpp-bootstrap-v3

Conversation

@ewanc26

@ewanc26 ewanc26 commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

This begins the C++ migration with a buildable C++20 compiler for an explicitly scoped core subset, rather than claiming the full language is already ported.

  • Adds the numlangc C++20 CLI, C source generation, numeric/character/string literals, core arithmetic/comparison/math/bitwise operations, numbered variables, basic console I/O, runtime stack checks, and hardened --run temporary-file/shell handling.
  • Fails with diagnostics for known structural/runtime opcodes that are not implemented in the C++ port.
  • Restores the previous Python compiler package as a reference implementation and adds its existing unit suite to CTest.
  • Adds C++ CLI smoke tests for hello-world, arithmetic, numbered variables, hexadecimal/binary literals, integer suffixes, malformed numeric diagnostics, unsupported-opcode diagnostics, output generation, missing source files, and paths containing spaces/apostrophes.
  • Hardens numeric parsing so invalid binary digits, octal digits, integer suffixes, and out-of-range values are rejected instead of being partially parsed.
  • Emits string literals with length-aware fwrite and fixed-width NUL escapes, preserving embedded NUL bytes even when followed by decimal digits; adds an end-to-end regression test.
  • Avoids converting large finite floating-point literals to long long; adds a 1e100 end-to-end regression test.
  • Corrects README, contributor guidance, CI, and C++ status documentation to distinguish the current C++ subset from the full language design.
  • Updates the shared capability matrix: unported Numlang, Selenium, and Sigi capabilities are no longer incorrectly marked fully implemented by their current C++ compilers.

Verification

The prior revision passed CI (run 40241216285). The embedded-NUL string regression test has been added and awaits a CI run. The C++ port still does not cover control-flow blocks, arrays, FFI, named functions/variables, or the broader C-like type system, and issue #16 remains open for that work.

Superseded by PR #19, which includes the latest C++ string-output correctness fix and regression test.

@ewanc26
ewanc26 merged commit 9260dbe into main Oct 25, 2026
1 check passed
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