- Rust 100%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Tres
Tres is an interpreter for the Tc2 esolang.
The language uses a command pointer between 0 and and 7 that points to a list of brainfuck commands.
Instructions
Tc2 features two instructions:
a - Moves the command pointer to the right one, wrapping around to 0 after 7.
b - Executes the brainfuck command at the current pointer index.
The commands, in order of index, are: + - < > . , [ ]
Additionally, there is a special instruction, !, used to dump the memory (or tape) of the interpreted program for debugging.
Any characters that aren't instructions get ignored.
Example
This program reads a character as input, prints the value to debug, then doubles it and prints it to debug again.
aaaaab!abaaabaabaaaaabbaabaaaaab!
Usage
- Ensure that Cargo is installed.
- Run
cargo install Tres. - Run
Tres <path/to/input/file>.
The interpeter does not prompt for input, instead pausing until you provide it. If the program seems to hang, type a character and press Enter.