/examples/compiler/dbf2c.bf

https://github.com/FabianM/brainfuck · Brainfuck · 35 lines · 29 code · 6 blank · 0 comment · 26 complexity · dcb86f05775d6973204c4086c0216c58 MD5 · raw file

  1. +++[>+++++<-]>>+<[>>++++>++>+++++>+++++>+>>+<++[++<]>---]
  2. >++++.>>>.+++++.>------.<--.+++++++++.>+.+.<<<<---.[>]<<.<<<.-------.>++++.
  3. <+++++.+.>-----.>+.<++++.>>++.>-----.
  4. <<<-----.+++++.-------.<--.<<<.>>>.<<+.>------.-..--.+++.-----<++.<--[>+<-]
  5. >>>>>--.--.<++++.>>-.<<<.>>>--.>.
  6. <<<<-----.>----.++++++++.----<+.+++++++++>>--.+.++<<<<.[>]<.>>
  7. ,[>>+++[<+++++++>-]<[<[-[-<]]>>[>]<-]<[<+++++>-[<+++>-[<-->-[<+++>-
  8. [<++++[>[->>]<[>>]<<-]>[<+++>-[<--->-[<++++>-[<+++[>[-[-[-[->>]]]]<[>>]<<-]
  9. >[<+>-[<->-[<++>-[<[-]>-]]]]]]]]]]]]]
  10. <[
  11. -[-[>+<-]>]
  12. <[<<<<.>+++.+.+++.-------.>---.++.<.>-.++<<<<.[>]>>>>>>>>>]
  13. <[[<]>++.--[>]>>>>>>>>]
  14. <[<<++..-->>>>>>]
  15. <[<<..>>>>>]
  16. <[<<..-.+>>>>]
  17. <[<<++..---.+>>>]
  18. <[<<<.>>.>>>>>]
  19. <[<<<<-----.+++++>.----.+++.+>---.<<<-.[>]>]
  20. <[<<<<.-----.>++++.<++.+++>----.>---.<<<.-[>]]
  21. <[<<<<<----.>>.<<.+++++.>>>+.++>.>>]
  22. <.>
  23. ]>
  24. ,]
  25. <<<<<.<+.>++++.<----.>>---.<<<-.>>>+.>.>.[<]>++.[>]<.
  26. >[Translates brainfuck to C. Assumes no-change-on-EOF or EOF->0.
  27. Generated C does no-change-on-EOF, and uses unistd.h read and write calls.
  28. Daniel B Cristofani (cristofdathevanetdotcom)
  29. http://www.hevanet.com/cristofd/brainfuck/]