|
2 years ago | |
---|---|---|
src | 2 years ago | |
.gitignore | 2 years ago | |
Cargo.lock | 2 years ago | |
Cargo.toml | 2 years ago | |
README.md | 2 years ago | |
rstc.bfd | 2 years ago | |
test.bfd | 2 years ago |
Brainfuck with pointer indirection. It uses relative addressing because otherwise, the higher parts of the tape would be unreachable once indirection is used.
BF befinde
[ *[&
] *]&
. *.&
, *,&
> >
< <
+ *>&
- *<&
I'm not completely sure if this translation is correct, because indirection with relative addressing complicates things. The translation doesn't account for side effects (like modifying a cell which is dereferenced).
*&
is a NOP. &*
is a NOP most of the time, except when the &
would trigger
a panic because it would decrease the indirection to -1
.