Impfish PDA

From Esolang
Jump to navigation Jump to search

Impfish PDA is an esolang by User:BoundedBeans which aims to be like Deadfish PDA but procedural rather than declarative.

Differences

  • Input is taken through an instruction, not every time.
  • Input can be any character.
  • There is no limit to the number of states, but they must be positive.

Commands

 i - increment state
 d - decrement state
 s - square state
 o - output state
 a - push a
 b - push b
 c - push c
 ! - push !
 ^ - pop from the stack
 : - input into current character
 Note: this can be any character, unlike in normal Deadfish PDA where it can only be X, Y, Z, or ?.
 [(state)(top of stack)(current character)]=(name)= - go to label name if match
 "(name)" - define label name

Examples

Truth-machine

Use numerical output.

i:[1!1]=True=[1!0]=False="True"o[1!1]=True="False"do