BFStack

From Esolang
Jump to navigation Jump to search

BFStack is an esoteric brainfuck derivative. It is stack based instead. The instructions are almost the same, but changed to be stack based.

Instructions

  • > pushes 0 onto the stack
  • < pops the top of the stack
  • . prints top of stack as ASCII
  • , pushes ASCII input to top of stack
  • + increments the top of the stack
  • - decrements the top of the stack
  • [ jumps to the corresponding ] if the top of the stack is 0
  • ] jumps to corresponding [ if the top of the stack isn't 0

Computational class

This is a Push-down automaton, as it would be equivalent to brainfuck, except for it cannot access the non top-of-stack cells.

Implementations

A C compiler and Python interpreter by User:Bangyen.