Execute Brain**** is an implementation of Brainf***.
Other implementations of Brainf***.
RCBF is a set of Brainf*** compilers and interpreters written for Rosetta Code in a variety of languages.

Below are links to each of the versions of RCBF.

An implementation need only properly implement the following instructions:



Command

Description


 > 
 Move the pointer to the right


 < 
 Move the pointer to the left


 + 
 Increment the memory cell under the pointer


 - 
 Decrement the memory cell under the pointer


 . 
 Output the character signified by the cell at the pointer


 , 
 Input a character and store it in the cell at the pointer


 [ 
 Jump past the matching ] if the cell under the pointer is 0


 ] 
 Jump back to the matching [ if the cell under the pointer is nonzero

Any cell size is allowed,   EOF   (End-O-File)   support is optional, as is whether you have bounded or unbounded memory.




  [ stack ]                                        is switch.arg (       --> [     )
 
  [ switch.arg put ]                               is switch     (     x -->       )
 
  [ switch.arg release ]                           is otherwise  (       -->       )
 
  [ switch.arg share != iff ]else[ done  
    otherwise  ]'[ do ]done[ ]                     is case       (     x -->       )
 
  [ dip tuck unrot poke swap ]                     is poketape   ( [ n n --> [ n   )
 
  [ 1+ over size over = if [ dip [ 0 join ] ] ]    is stepright  (   [ n --> [ n   )
 
  [ dup 0 = iff [ 0 rot join swap ] else [ 1 - ] ] is stepleft   (   [ n --> [ n   )
 
  [ 2dup peek 1 + poketape ]                       is increment  (   [ n --> [ n   )
 
  [ 2dup peek 1 - poketape ]                       is decrement  (   [ n --> [ n   )
 
  [ 2dup peek emit ]                               is print      (   [ n --> [ n   )
 
  [ temp take dup $ "" = iff 0 else behead
    swap temp put poketape ]                       is getchar    (   [ n --> [ n   )
 
  [ 2dup peek 0 = ]                                is zero       (   [ n --> [ n b )
 
  [ temp put $ "" swap witheach
      [ switch
        [ char > case [ $ "stepright "      join ]
          char < case [ $ "stepleft "       join ] 
          char + case [ $ "increment "      join ]
          char - case [ $ "decrement "      join ]
          char . case [ $ "print "          join ] 
          char , case [ $ "getchar "        join ]
          char [ case [ $ "[ zero if done " join ] 
          char ] case [ $ "zero until ] "   join ] 
          otherwise ( ignore ) ] ]
    0 nested 0 rot quackery temp release 2drop ]   is brainf***  (   $ $ -->       )