21 lines
793 B
Markdown
21 lines
793 B
Markdown
Commands
|
|
--------
|
|
Gir brainfuck has in addition to the base 8 commands `+-<>[].,` also `:;`
|
|
for printing and reading integers and `#` for triggering a breakpoint. These
|
|
can be turned off by passing a second `false` parameter to `compile()`
|
|
|
|
Tape
|
|
----
|
|
Gir's tape is unbounded in both directions and made out of unsigned 8-bit
|
|
cells that wrap around
|
|
|
|
IO
|
|
--
|
|
`.` and `,` operate on a utf-8 stream. `,` produces `0` on EOF
|
|
|
|
`:` produces a decimal representation of the current cell. `;` skips any
|
|
space (U+20) characters in the input stream and then reads 1 or more ASCII
|
|
digit (U+30 to U+39), clamps the number to the range [0, 255] and sets the
|
|
cell to it. If it can't read a digit and EOF has been reached it returns 0,
|
|
but if EOF hasn't been reached it raises an error flag and stops execution
|