This commit is contained in:
22
tests/data/brainfuck/array.bf
Normal file
22
tests/data/brainfuck/array.bf
Normal file
@@ -0,0 +1,22 @@
|
||||
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|
||||
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|
||||
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|
||||
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|
||||
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|
||||
<<<<<<<<<<
|
||||
first put the desired index in front of the array
|
||||
++++
|
||||
we are done if there is a zero in the current tag cell
|
||||
[
|
||||
decrement the current tag cell
|
||||
-
|
||||
move the value in the current tag cell to the next if it is not zero
|
||||
[>>+<<-]
|
||||
move to next tag cell
|
||||
>>
|
||||
we found it: print the desired element
|
||||
]>.
|
||||
now print another
|
||||
<<<<<<<<<
|
||||
++
|
||||
[-[>>+<<-]>>]>.
|
1
tests/data/brainfuck/hello_world.bf
Normal file
1
tests/data/brainfuck/hello_world.bf
Normal file
@@ -0,0 +1 @@
|
||||
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
|
5
tests/data/brainfuck/sierpinski.bf
Normal file
5
tests/data/brainfuck/sierpinski.bf
Normal file
@@ -0,0 +1,5 @@
|
||||
++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[
|
||||
-<<<[
|
||||
->[+[-]+>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<<
|
||||
]>.>+[>>]>+
|
||||
]
|
Reference in New Issue
Block a user