Add pure C89 Peppermint interpreter

This commit is contained in:
Hermes Agent
2026-08-17 23:07:09 +00:00
commit 6feabea6cb
5 changed files with 678 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Peppermint C89 port
This directory is a clean native C89 implementation of the language behavior
present in the original TypeScript interpreter.
Implemented subset:
- `let name := expression` bindings
- integer and floating-point literals
- quoted strings with basic escapes
- `+`, `-`, `*`, `/`, and `%`
- string concatenation with `+`
- `#` comments and line-oriented programs
- `@argv` and `@argv:N`
- `@env:NAME` and `@exit`
The original repository also contains a separate Brainfuck compiler/runtime;
that is not silently folded into this first language-core port.
## Build
Requires only a C compiler with C89 support:
```sh
make
./peppermint smoke.ppm hello
```
The build uses `-std=c89 -pedantic` and has no TypeScript, Node.js, Beef, or
third-party runtime dependency.