Language Report
Prose definition of the language: modules, types, EXTENDS, statements, design notes.
A clean, readable, Modula-2 / Pascal-inspired systems language that transpiles to portable C11.
Kinda-C, but not really C. It speaks C to the linker and Pascal to the soul: structured syntax, explicit modules, and safety-minded design — generating standards-compliant C you can compile with gcc, clang, or tcc. Currently built on Linux.
TMod-c (TYPE compiler; historically Mod-c during rebrand) combines the clarity of the Wirth-family languages with a practical C11 backend. It is aimed at readable, reviewable systems and compiler construction code — not at replacing C’s entire ecosystem.
The design is closer to Modula-2 + C than to full Oberon:
compile-time types, modules, and optional Oberon-shaped record extension
(STRUCT … EXTENDS) with layout and upcasts — without
hidden vtables or runtime type tags. When you need discrimination, you add it yourself
(the usual enum + union pattern).
IMPORT / EXPORT and .mh export tables (C ABI stays in .h)DEFER, design-by-contract style REQUIRE/ENSURE, OPAQUE, unions, case-insensitive keywordsTMod-c exists so a lifelong language design can be finished enough to run: modules and imports that map to real headers and linkers, types that stay honest at the C boundary, and a grammar simple enough to maintain by hand. Features earn their mass before they earn syntax — simple, but not too simple for real C interop and real Makefiles.
Language rules live in the Language Report and formal EBNF (single sources of truth in the repo). Status and release notes track the live tree.
Prose definition of the language: modules, types, EXTENDS, statements, design notes.
Complete formal syntax (Wirth-style EBNF) kept close to the implemented grammar.
Live project focus, completed calm-path items, and suggested next work.
Version-by-version history of the compiler and language features.
Actively developed personal project (from early 2026). Self-hosting compiler under continuous conversion of C sources to TMod-c. Targeting high readability and safety without a mandatory GC.
Downloads: a source archive
(tmod-c-0.26.5.179.tgz
(from make tar) may be published in the site root next to this page.
Prebuilt binaries are not provided; build from the archive or the repository.
$ tar xzf tmod-c-0.26.5.179.tgz
$ cd tmod-c-0.26.5.179/
$ make help
$ make
$ ./bin/modc.0.26.5 --help
$ ./bin/modc.0.26.5 hello.mc -C
$ cc -std=c11 -o hello hello.c
$ ./hello
See Current Status for the authoritative version line and next steps.
For more information, reach out on X: @MScottReynolds.
Designed and developed by M. Scott Reynolds (Salt Lake City, Utah), with Grok (xAI) as a long-running design and documentation collaborator. Compiler source is reviewed and typed in by hand.