updated gitignore
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -36,5 +36,8 @@ hs_err_pid*
|
|||||||
### VisualStudioCode Patch ###
|
### VisualStudioCode Patch ###
|
||||||
# Ignore all local history of files
|
# Ignore all local history of files
|
||||||
.history
|
.history
|
||||||
|
.idea/**
|
||||||
|
target/**
|
||||||
|
|
||||||
# End of https://www.gitignore.io/api/visualstudiocode
|
# End of https://www.gitignore.io/api/visualstudiocode
|
||||||
|
BrainfuckInterpreter.iml
|
||||||
|
|||||||
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
@@ -1,5 +1,12 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "CodeLens (Launch) - JavaFXExample",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "examples.JavaFXExample",
|
||||||
|
"projectName": "BrainfuckInterpreter"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
"name": "CodeLens (Launch) - Main",
|
"name": "CodeLens (Launch) - Main",
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"java.configuration.updateBuildConfiguration": "interactive"
|
||||||
|
}
|
||||||
27
pom.xml
27
pom.xml
@@ -1,5 +1,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>brainfuck.interpreter</groupId>
|
<groupId>brainfuck.interpreter</groupId>
|
||||||
<artifactId>BrainfuckInterpreter</artifactId>
|
<artifactId>BrainfuckInterpreter</artifactId>
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<name>BrainfuckInterpreter</name>
|
<name>BrainfuckInterpreter</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
@@ -14,5 +15,27 @@
|
|||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openjfx</groupId>
|
||||||
|
<artifactId>javafx-controls</artifactId>
|
||||||
|
<version>13</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.openjfx</groupId>
|
||||||
|
<artifactId>javafx-maven-plugin</artifactId>
|
||||||
|
<version>0.0.3</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>HelloFX</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package brainfuck.interpreter;
|
package brainfuck.interpreter;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Brainfuck interpreter.
|
* Brainfuck interpreter.
|
||||||
*
|
*
|
||||||
@@ -10,9 +13,11 @@ import java.util.Scanner;
|
|||||||
*/
|
*/
|
||||||
public class BfInterpreter {
|
public class BfInterpreter {
|
||||||
|
|
||||||
private char[] code;
|
private char[] codeArray;
|
||||||
private byte[] memory;
|
private byte[] memory;
|
||||||
private Scanner sc;
|
private Scanner sc;
|
||||||
|
private String code;
|
||||||
|
private int pointer;
|
||||||
|
|
||||||
public final int MAX_SIZE = 65535; // predefined max size for the array
|
public final int MAX_SIZE = 65535; // predefined max size for the array
|
||||||
|
|
||||||
@@ -22,16 +27,135 @@ public class BfInterpreter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.sc = new Scanner(System.in);
|
this.sc = new Scanner(System.in);
|
||||||
this.code = code.toCharArray();
|
this.codeArray = code.toCharArray();
|
||||||
|
this.code = code;
|
||||||
this.memory = new byte[MAX_SIZE];
|
this.memory = new byte[MAX_SIZE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCodeFromFile(String fileName) throws IOException, NullPointerException {
|
||||||
|
String res = "";
|
||||||
|
|
||||||
|
FileInputStream fis = new FileInputStream("src/main/java/resources/" + fileName);
|
||||||
|
code = IOUtils.toString(fis, "UTF-8");
|
||||||
|
// System.out.println("code is: " + code);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void interpret() {
|
public void interpret() {
|
||||||
// ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>++++++++++++++++++...
|
int loop = 0;
|
||||||
|
for (int i = 0; i < code.length(); i++) {
|
||||||
|
// System.out.println("char is now " + this.code.charAt(i));
|
||||||
|
|
||||||
|
if (code.charAt(i) == '>') {
|
||||||
|
// move the pointer one position to the right
|
||||||
|
// first check if the pointer is not at the end of the memory array
|
||||||
|
pointer = (pointer == MAX_SIZE - 1) ? 0 : pointer + 1;
|
||||||
|
} else if (code.charAt(i) == '<') {
|
||||||
|
// move the pointer one position to the left
|
||||||
|
// first check if the pointer is not at the beginning of the memory array
|
||||||
|
pointer = (pointer == 0) ? MAX_SIZE - 1 : pointer - 1;
|
||||||
|
} else if (code.charAt(i) == '+') {
|
||||||
|
// increment the value in the array by one
|
||||||
|
memory[pointer]++;
|
||||||
|
} else if (code.charAt(i) == '-') {
|
||||||
|
// decrement the value in the array by one
|
||||||
|
memory[pointer]--;
|
||||||
|
} else if (code.charAt(i) == '.') {
|
||||||
|
// System.out.println("printing");
|
||||||
|
// output the value in the array
|
||||||
|
System.out.print((char) memory[pointer]);
|
||||||
|
} else if (code.charAt(i) == ',') {
|
||||||
|
// the next value in the array is the next input character
|
||||||
|
// System.out.println("input");
|
||||||
|
byte input = (byte) sc.next().charAt(0);
|
||||||
|
// System.out.println(input);
|
||||||
|
memory[pointer] = input;
|
||||||
|
} else if (code.charAt(i) == '[') {
|
||||||
|
// jump to the operation after the corresponding [ if the value in the position
|
||||||
|
// of the array is 0
|
||||||
|
if (memory[pointer] == 0) {
|
||||||
|
i++;
|
||||||
|
while (loop > 0 || code.charAt(i) != ']') {
|
||||||
|
if (code.charAt(i) == '[')
|
||||||
|
loop++;
|
||||||
|
if (code.charAt(i) == ']')
|
||||||
|
loop--;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (code.charAt(i) == ']') {
|
||||||
|
// jump to the operation after the corresponding ] if the value in the position
|
||||||
|
// of the array is not 0
|
||||||
|
if (memory[pointer] != 0) {
|
||||||
|
i--;
|
||||||
|
while (loop > 0 || code.charAt(i) != '[') {
|
||||||
|
if (code.charAt(i) == ']')
|
||||||
|
loop++;
|
||||||
|
if (code.charAt(i) == '[')
|
||||||
|
loop--;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
sc.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void interpretAgain(String code) {
|
||||||
|
final int LENGTH = 65535;
|
||||||
|
byte[] mem = new byte[LENGTH];
|
||||||
|
int dataPointer = 0;
|
||||||
|
int l = 0;
|
||||||
|
for (int i = 0; i < code.length(); i++) {
|
||||||
|
if (code.charAt(i) == '>') {
|
||||||
|
dataPointer = (dataPointer == LENGTH - 1) ? 0 : dataPointer + 1;
|
||||||
|
} else if (code.charAt(i) == '<') {
|
||||||
|
dataPointer = (dataPointer == 0) ? LENGTH - 1 : dataPointer - 1;
|
||||||
|
} else if (code.charAt(i) == '+') {
|
||||||
|
mem[dataPointer]++;
|
||||||
|
} else if (code.charAt(i) == '-') {
|
||||||
|
mem[dataPointer]--;
|
||||||
|
} else if (code.charAt(i) == '.') {
|
||||||
|
System.out.print((char) mem[dataPointer]);
|
||||||
|
} else if (code.charAt(i) == ',') {
|
||||||
|
mem[dataPointer] = (byte) sc.next().charAt(0);
|
||||||
|
} else if (code.charAt(i) == '[') {
|
||||||
|
if (mem[dataPointer] == 0) {
|
||||||
|
i++;
|
||||||
|
while (l > 0 || code.charAt(i) != ']') {
|
||||||
|
if (code.charAt(i) == '[')
|
||||||
|
l++;
|
||||||
|
if (code.charAt(i) == ']')
|
||||||
|
l--;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (code.charAt(i) == ']') {
|
||||||
|
if (mem[dataPointer] != 0) {
|
||||||
|
i--;
|
||||||
|
while (l > 0 || code.charAt(i) != '[') {
|
||||||
|
if (code.charAt(i) == ']')
|
||||||
|
l++;
|
||||||
|
if (code.charAt(i) == '[')
|
||||||
|
l--;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public void interpretSwitch() {
|
||||||
int pointer = 0;
|
int pointer = 0;
|
||||||
for (int i = 0; i < this.code.length; i++) {
|
int c = 0;
|
||||||
// System.out.println("char is now " + this.code[i]);
|
for (int i = 0; i < codeArray.length; i++) {
|
||||||
switch (this.code[i]) {
|
|
||||||
|
switch (this.codeArray[i]) {
|
||||||
case '+':
|
case '+':
|
||||||
memory[pointer]++;
|
memory[pointer]++;
|
||||||
break;
|
break;
|
||||||
@@ -50,42 +174,59 @@ public class BfInterpreter {
|
|||||||
case ',':
|
case ',':
|
||||||
memory[pointer] = sc.next().trim().getBytes()[0];
|
memory[pointer] = sc.next().trim().getBytes()[0];
|
||||||
break;
|
break;
|
||||||
case '[': // als de memory[pointer] 0 is, spring naar de plek na de volgende ] ipv een
|
case '[':
|
||||||
// vooruit
|
|
||||||
// System.out.println("begin loop cell is " + memory[i]);
|
|
||||||
int endLoopPos = i;
|
|
||||||
// search for next ']'
|
|
||||||
while (code[endLoopPos] != ']') {
|
|
||||||
// keep incrementing until end of loop is found
|
|
||||||
endLoopPos++;
|
|
||||||
}
|
|
||||||
// System.out.println("end loop pos: " + endLoopPos);
|
|
||||||
if (memory[pointer] == 0) {
|
|
||||||
i = endLoopPos + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
if (memory[pointer] == 0) {
|
||||||
case ']': // als de memory[pointer] niet 0 is, spring terug naar de plek voor de vorige [
|
i++;
|
||||||
// ipv een vooruit
|
while (c > 0 || this.codeArray[i] != ']') {
|
||||||
int beginLoopPos = i;
|
if (this.codeArray[i] == '[') {
|
||||||
// System.out.println("eind loop");
|
c++;
|
||||||
// search for previous '['
|
} else if (this.codeArray[i] == ']') {
|
||||||
while (code[beginLoopPos] != '[') {
|
c--;
|
||||||
// keep decrementing until begin of loop is found
|
}
|
||||||
beginLoopPos--;
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// System.out.println("begin loop pos: " + beginLoopPos);
|
// int endLoopPos = i;
|
||||||
|
// // search for next ']'
|
||||||
|
// while (code[endLoopPos] != ']') {
|
||||||
|
// // keep incrementing until end of loop is found
|
||||||
|
// endLoopPos++;
|
||||||
|
// }
|
||||||
|
// if (memory[pointer] == 0) {
|
||||||
|
// i = endLoopPos + 1;
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
case ']':
|
||||||
|
|
||||||
if (memory[pointer] != 0) {
|
if (memory[pointer] != 0) {
|
||||||
i = beginLoopPos;
|
i--;
|
||||||
}
|
while (c > 0 || this.codeArray[i] == '[') {
|
||||||
|
if (this.codeArray[i] == ']') {
|
||||||
|
c++;
|
||||||
|
} else if (this.codeArray[i] == '[') {
|
||||||
|
c--;
|
||||||
|
}
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
// int beginLoopPos = i;
|
||||||
|
// // search for previous '['
|
||||||
|
// while (code[beginLoopPos] != '[') {
|
||||||
|
// // keep decrementing until begin of loop is found
|
||||||
|
// beginLoopPos--;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (memory[pointer] != 0) {
|
||||||
|
// i = beginLoopPos;
|
||||||
|
// }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,33 @@
|
|||||||
package brainfuck.interpreter;
|
package brainfuck.interpreter;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
public class Main {
|
public class Main extends Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String excl = "++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-----------.++++++++++++..+++++++++++++++.<<++.>+++++++.>-------------------.+++++++++++++.---.------.+++++++++++++.<<+.";
|
String excl = ">,[[----------[ >>>[>>>>]+[[-]+<[->>>>++>>>>+[>>>>]++[->+<<<<<]]<<<] ++++++[>------<-]>--[>>[->>>>]+>+[<<<<]>-],< ]> ]>>>++>+>>[ <<[>>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<<]]<[>+<-]>] >[>[>>>>]+[[-]<[+[->>>>]>+<]>[<+>[<<<<]]+<<<<]>>>[->>>>]+>+[<<<<]] >[[>+>>[<<<<+>>>>-]>]<<<<[-]>[-<<<<]]>>>>>>> ]>>+[[-]++++++>>>>]<<<<[[<++++++++>-]<.[-]<[-]<[-]<]<, ]";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
BfInterpreter interpreter = new BfInterpreter(excl);
|
BfInterpreter interpreter = new BfInterpreter(",.");
|
||||||
|
interpreter.setCodeFromFile("mandelbrot-tiny.bf");
|
||||||
interpreter.interpret();
|
interpreter.interpret();
|
||||||
|
// interpreter.interpretAgain(excl);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start(Stage stage) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
23
src/main/java/examples/JavaFXExample.java
Normal file
23
src/main/java/examples/JavaFXExample.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package examples;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JavaFXExample
|
||||||
|
*/
|
||||||
|
public class JavaFXExample extends Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
launch(JavaFXExample.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start(Stage stage) throws Exception {
|
||||||
|
stage.setTitle("Yeet");
|
||||||
|
stage.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
31
src/main/java/resources/art.bf
Normal file
31
src/main/java/resources/art.bf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
>
|
||||||
|
+ +
|
||||||
|
+ +
|
||||||
|
[ < + +
|
||||||
|
+ +
|
||||||
|
+ + + +
|
||||||
|
> - ] >
|
||||||
|
+ + + + + + + +
|
||||||
|
[ >
|
||||||
|
+ + + +
|
||||||
|
< - ] >
|
||||||
|
> + + > > > + >
|
||||||
|
> > + <
|
||||||
|
< < < < < < < <
|
||||||
|
< [ - [ - > + <
|
||||||
|
] > [ - < + > > > . < < ] > > >
|
||||||
|
[ [
|
||||||
|
- > + +
|
||||||
|
+ + + +
|
||||||
|
+ + [ > + + + +
|
||||||
|
< - ] >
|
||||||
|
. < < [ - > + <
|
||||||
|
] + > [ - > + +
|
||||||
|
+ + + + + + + + < < + > ] > . [
|
||||||
|
- ] > ]
|
||||||
|
] + < < < [ - [
|
||||||
|
- > + < ] + > [
|
||||||
|
- < + > > > - [ - > + < ] + + >
|
||||||
|
[ - < - > ] < <
|
||||||
|
< ] < < < < ] + + + + + + + + +
|
||||||
|
+ . + + + . [ - ] < ] + + + + +
|
||||||
71
src/main/java/resources/chess.bf
Normal file
71
src/main/java/resources/chess.bf
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
+++++++++++++++[>++>+++>+++>++++++>++>+++++++>++++>+<<<<<<<<-]>>--.>....
|
||||||
|
...<.>.......<.>.......<.>.......<.>.......<.>.......<.>.......<.>......
|
||||||
|
.<.>>>>>>-----.<<+++++++++++++++++++.<++.<+.++++.>>.<<.--.>.>.>--..<<<++
|
||||||
|
.<-.+++.>>>.>.<.<..<<.>---..>..>.>..<<<.>>.<<<.>>>>..<.<..<.<<.>.>>..>.>
|
||||||
|
..<<<<.>..>>>..<.<..<+++.<<+.>.>>>.<.>.>.<<<----.++++.>>.<<.--.>>>.<.>>.
|
||||||
|
<<.<..<--.<<<+++++.>>>++.>..>.>.<<<<.>++.<<<.>---.>>---.>>>.<.<..<.<<<.>
|
||||||
|
>.>>..>.>..<<<<<-.<.>+.>>>>>..<.<..>-.<+++.>++.<---..>-.>..<<<.<<<.>>.>>
|
||||||
|
>>..<.<.<<.>+++.<<<.>.>>---.>.>.>..<<<-.<<<.>>>++.>>>..<.>>.<<.<..<--.<<
|
||||||
|
<.>>>++.>..>.>..<<<<.<<.>>>-..>>>.<.<..<<<-.<.>+.>>>..>.>..<<<<<-.<.>+.>
|
||||||
|
>>>>..<.<..>-.<+++.>++.<---..>-.>..<<<<<-.<.>+.>>>>>..<.<..<<.<<.>>>..>.
|
||||||
|
>.>..<<<-.<<<.>>>++.>>>..<.>>.<<.<.<<<-.<...>+.>>>.>.>.<<<<<-.<...>+.>>>
|
||||||
|
>>.<.<.<<<-.<...>+.>>>.>.>.<<<<<-.<...>+.>>>>>.<.<.<<<-.<...>+.>>>.>.>.<
|
||||||
|
<<<<-.<...>+.>>>>>.<.<.<<<-.<...>+.>>>.>.>.<<<<<-.<...>+.>>>>>.<.>>.<<<<
|
||||||
|
<<++.>--.......<.>.......<.>.......<.>.......<.>.......<.>.......<.>....
|
||||||
|
...<.>.......<.>>>>>>.<<.>.......<.<...<++.>...>.>.......<.<...<.>...>.>
|
||||||
|
.......<.<...<.>...>.>.......<.<...<.>...>.>>.<<.>..<<<<<---.<.>+.>>>>>.
|
||||||
|
.<.<..<<<-.<.>+.>>>..>.>..<<<<<-.<.>+.>>>>>..<.<..<<<-.<.>+.>>>..>.>..<<
|
||||||
|
<<<-.<.>+.>>>>>..<.<..<<<-.<.>+.>>>..>.>..<<<<<-.<.>+.>>>>>..<.<..<<<-.<
|
||||||
|
.>+.>>>..>.>>.<<.>..<<<<++.<<.>>>---.>>>..<.<..<<.<<.>>>.>..>.>..<<<<.<<
|
||||||
|
.>>>.>>>..<.<..<<.<<.>>>.>..>.>..<<<<.<<.>>>.>>>..<.<..<<.<<.>>>.>..>.>.
|
||||||
|
.<<<<.<<.>>>.>>>..<.<..<<.<<.>>>.>..>.>>.<<.>.<<<<<-.<...>+.>>>>>.<.<.<<
|
||||||
|
<-.<...>+.>>>.>.>.<<<<<-.<...>+.>>>>>.<.<.<<<-.<...>+.>>>.>.>.<<<<<-.<..
|
||||||
|
.>+.>>>>>.<.<.<<<-.<...>+.>>>.>.>.<<<<<-.<...>+.>>>>>.<.<.<<<-.<...>+.>>
|
||||||
|
>.>.>>.<<<<<<++.>--.......<.>.......<.>.......<.>.......<.>.......<.>...
|
||||||
|
....<.>.......<.>.......<.>>>>>>.<<.<.......>.>.......<.<.......>.>.....
|
||||||
|
..<.<.......>.>.......<.<.......>.>.......<.>>.<<.<.......>.>.......<.<.
|
||||||
|
......>.>.......<.<.......>.>.......<.<.......>.>.......<.>>.<<.<.......
|
||||||
|
>.>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.
|
||||||
|
>>.<<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.<.....
|
||||||
|
..>.>.......<.>>.<<<<<<.>.......<.>.......<.>.......<.>.......<.>.......
|
||||||
|
<.>.......<.>.......<.>.......<.>>>>>>.<<.>.......<.<.......>.>.......<.
|
||||||
|
<.......>.>.......<.<.......>.>.......<.<.......>.>>.<<.>.......<.<.....
|
||||||
|
..>.>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.>>.<<.>.
|
||||||
|
......<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.<...
|
||||||
|
....>.>>.<<.>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.
|
||||||
|
>.......<.<.......>.>>.<<<<<<.>.......<.>.......<.>.......<.>.......<.>.
|
||||||
|
......<.>.......<.>.......<.>.......<.>>>>>>.<<.<.......>.>.......<.<...
|
||||||
|
....>.>.......<.<.......>.>.......<.<.......>.>.......<.>>.<<.<.......>.
|
||||||
|
>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.>>
|
||||||
|
.<<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.<.......
|
||||||
|
>.>.......<.>>.<<.<.......>.>.......<.<.......>.>.......<.<.......>.>...
|
||||||
|
....<.<.......>.>.......<.>>.<<<<<<.>.......<.>.......<.>.......<.>.....
|
||||||
|
..<.>.......<.>.......<.>.......<.>.......<.>>>>>>.<<.>.......<.<.......
|
||||||
|
>.>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.>>.<<.>...
|
||||||
|
....<.<.......>.>.......<.<.......>.>.......<.<.......>.>.......<.<.....
|
||||||
|
..>.>>.<<.>.......<.<.......>.>.......<.<.......>.>.......<.<.......>.>.
|
||||||
|
......<.<.......>.>>.<<.>.......<.<.......>.>.......<.<.......>.>.......
|
||||||
|
<.<.......>.>.......<.<.......>.>>.<<<<<<.>.......<.>.......<.>.......<.
|
||||||
|
>.......<.>.......<.>.......<.>.......<.>.......<.>>>>>>.<<.<...<+++.>..
|
||||||
|
.>.>.......<.<...<.>...>.>.......<.<...<.>...>.>.......<.<...<.>...>.>..
|
||||||
|
.....<.>>.<<.<<<<<---..>---.<.>+.>>>..>.>..<<<<<-.<.>+.>>>>>..<.<..<<<-.
|
||||||
|
<.>+.>>>..>.>..<<<<<-.<.>+.>>>>>..<.<..<<<-.<.>+.>>>..>.>..<<<<<-.<.>+.>
|
||||||
|
>>>>..<.<..<<<-.<.>+.>>>..>.>..<<<<<-.<.>+.>>>>>..<.>>.<<.<..<<++.>>.<--
|
||||||
|
-.>..>.>..<<<<.>>.<.>>>..<.<..<<.>>.<.>..>.>..<<<<.>>.<.>>>..<.<..<<.>>.
|
||||||
|
<.>..>.>..<<<<.>>.<.>>>..<.<..<<.>>.<.>..>.>..<<<<.>>.<.>>>..<.>>.<<.<.<
|
||||||
|
<-------.>+++...<<.>>>.>.>.<<<<.>...<<.>>>>>.<.<.<<.>...<<.>>>.>.>.<<<<.
|
||||||
|
>...<<.>>>>>.<.<.<<.>...<<.>>>.>.>.<<<<.>...<<.>>>>>.<.<.<<.>...<<.>>>.>
|
||||||
|
.>.<<<<.>...<+.>>>>.<.>>.<<<<<++.<++++.......>.<.......>.<.......>.<....
|
||||||
|
...>.<.......>.<.......>.<.......>.<.......>.>>>>>.<<.>.<<<----.++++.>>.
|
||||||
|
<<.--.>>>.<.<..<++.<+.+++.>>>.<.>.>..<<<<.>---..>>>..<.<..<.>>.<<<.>>..>
|
||||||
|
.>..<<<.<<--.>.>>>>..<.<..<<.>..>..>.>..<<<+++.<<+.>.>>>.>.<.<.<----.+++
|
||||||
|
+.>>.<<.--.>.>.>>.<<.>..<<<--.>.<++.>>>..<.<.<<.>++.<<<.>---.>>---.>.>.>
|
||||||
|
..<<<.>.<<.>>>>..<.<..<<<-.<.>+.>>>..>.>..<-.<.>++.>..<-.<..<.>.<<.>>..>
|
||||||
|
.>.<<<<.>+++.<<<.>.>>---.>>>.<.<..<-.>.<++.>..>.>>.<<.>..<<<--.>.<++.>>>
|
||||||
|
..<.<..<<.>>.<-..>.>.>..<<<<<-.<.>+.>>>>>..<.<..<<<-.<.>+.>>>..>.>..<-.<
|
||||||
|
.>++.>..<-.<..<<<-.<.>+.>>>..>.>..<<<<.>>.<..>>>.<.<..<-.>.<++.>..>.>>.<
|
||||||
|
<.>.<<<<-------.>++...<<.>>>>>.<.<.<<.>...<<.>>>.>.>.<<<<.>...<<.>>>>>.<
|
||||||
|
.<.<<.>...<<.>>>.>.>.<<<<.>...<<.>>>>>.<.<.<<.>...<<.>>>.>.>.<<<<.>...<<
|
||||||
|
.>>>>>.<.<.<<.>...<<.>>>.>.>>.<<<<<<++.++.......>+++.<.......>.<.......>
|
||||||
|
.<.......>.<.......>.<.......>.<....>>----.<--.<<.>++.>>+.<<.>>.>.<<-.<-
|
||||||
|
-..--.>>>>>>.
|
||||||
2
src/main/java/resources/christmastree.bf
Normal file
2
src/main/java/resources/christmastree.bf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
>>>--------<,[<[>++++++++++<-]>>[<------>>-<+],]++>>++<--[<++[+>]>+<<+++<]<
|
||||||
|
<[>>+[[>>+<<-]<<]>>>>[[<<+>.>-]>>]<.<<<+<<-]>>[<.>--]>.>>.
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<AnchorPane xmlns="http://javafx.com/javafx"
|
<AnchorPane xmlns="http://javafx.com/javafx"
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
fx:controller="$CONTROLLER_NAME$"
|
fx:controller="brainfuck.interpreter.Controller"
|
||||||
prefHeight="400.0" prefWidth="600.0">
|
prefHeight="400.0" prefWidth="600.0">
|
||||||
|
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|||||||
211
src/main/java/resources/mandelbrot-tiny.bf
Normal file
211
src/main/java/resources/mandelbrot-tiny.bf
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++
|
||||||
|
+++++++-[[>>>>>>>>>]+[<<<<<<<<<]>>>>>>>>>-]+<<<<<<<<<>>>>>>>>>[>>>>>>>>[
|
||||||
|
-]<<<<<<<<>>>>>>>>>]<<<<<<<<<[<<<<<<<<<]>>>>>>>>[-]+<<<<<<<<>+++++<>[<>-
|
||||||
|
<>[<>-<>>>>>>>>>>+<<<<<<<<<<>]<>>>>>>>>>>]<>>>>>>>>+<<<<<<<<>>>>>>>>>>>>
|
||||||
|
>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>[-]+<<<>>>[<<<>>>
|
||||||
|
>>>>>>[>>>>>>>[-]<<<<<<<>>>>>>>>>]<<<<<<<<<[<<<<<<<<<]>>>>>>>[-]+<<<<<<<
|
||||||
|
>++++<>[<>-<>[<>-<>>>>>>>>>>+<<<<<<<<<<>]<>>>>>>>>>>]<>>>>>>>+<<<<<<<>++
|
||||||
|
+++++<>[<>-<>[<>-<>>>>>>>>>>+<<<<<<<<<<>]<>>>>>>>>>>]<>>>>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>>>>>>>>]<[->+<]>>>>>>>>]<<<<<<
|
||||||
|
<<>[<>-<>>>>>>>>+<<<<<<<<>]<+<<<<<<<<<]>+++++<>[<>-<>[<>-<>>>>>>>>>>+<<<
|
||||||
|
<<<<<<<>]<>>>>>>>>>>]<>>>>>>+<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<
|
||||||
|
<<<[<<<<<<<<<]>>>>>>>>>[-+>>>>>>[-<<<<<<->>>>>>]+<<<<<<[->>>>>>-<<<<<<>>
|
||||||
|
>>>>>>[-<<<<<<<<+>>>>>>>>]<<<<<<<<[->>>>>>>>+<<<<<<<<<<<<<<<<<[<<<<<<<<<
|
||||||
|
]>>>>[-]+<<<<>>>>>>>>>[>>>>>>>>>]>+<]]+>>>>>>>>[-<<<<<<<<->>>>>>>>]+<<<<
|
||||||
|
<<<<[->>>>>>>>-<<<<<<<<>>>>>>[-<<<<<<+>>>>>>]<<<<<<[->>>>>>+<<<<<<<<<<<<
|
||||||
|
<<<[<<<<<<<<<]>>>[-]+<<<>>>>>>>>>[>>>>>>>>>]>[-]+<]]+>[-<[>>>>>>>>>]<<<<
|
||||||
|
<<<<<>]<>>>>>>>>>]<<<<<<<<<[<<<<<<<<<]>>>>[-]<<<<>+++++<>[<>-<>[<>-<>>>>
|
||||||
|
>>>>>>+<<<<<<<<<<>]<>>>>>>>>>>]<>>>>>>-<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
>>>>>>-<<<<<<[<<<<<<<<<]]>>>]<<<
|
||||||
144
src/main/java/resources/mandelbrot-titanic.bf
Normal file
144
src/main/java/resources/mandelbrot-titanic.bf
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[
|
||||||
|
>>>>>>>>>]+[<<<<<<<<<]>>>>>>>>>-]+[>>>>>>>>[-]>]<<<<<<<<<[<<<<<<<<<]>>>>>>>>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]>>>>>>>>]<+<<<<<<<<[>>>>>>[->>+<<]<<<<<<<<<<<<<<<]>>>>>>
|
||||||
|
>>>[>>>>>>>>>]<<<<<<<<<[>[-]<->>>>>>>>[-<<<<<<<<+>[<->-<<+>>]<[->+<]>>>>>>>>]<<<
|
||||||
|
<<<<[->>>>>>>+<<<<<<<]<+<<<<<<<<<]>>>>>>>>-<<<<<[-]+<<<]+>>>>>>>>[-<<<<<<<<->>>>
|
||||||
|
>>>>]+<<<<<<<<[->>>>>>>>->[>>>>>>[->>+<<]>>>]<<<<<<<<<[>[-]<->>>>>>>>[-<<<<<<<<+
|
||||||
|
>[<->-<<+>>]<[->+<]>>>>>>>>]<<<<<<<[->>>>>>>+<<<<<<<]<+<<<<<<<<<]>+++++[-[->>>>>
|
||||||
|
>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>+>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<[<<<<<<<<<]>>>>
|
||||||
|
>>>>>[>>>>>>[-<<<<<<->>>>>>]+<<<<<<[->>>>>>->>[-<<<<<<<<+>>>>>>>>]<<<<<<<<[->>>>
|
||||||
|
>>>>+<<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>>[-]+>>>>>[>>>>>>>>>]>+<]]+>>>>>>>>[-<<<<<<<
|
||||||
|
<->>>>>>>>]+<<<<<<<<[->>>>>>>>-<<[-<<<<<<+>>>>>>]<<<<<<[->>>>>>+<<<<<<<<<<<<<<<[
|
||||||
|
<<<<<<<<<]>>>[-]+>>>>>>[>>>>>>>>>]>[-]+<]]+>[-<[>>>>>>>>>]<<<<<<<<]>>>>>>>>]<<<<
|
||||||
|
<<<<<[<<<<<<<<<]>>>>[-]<<<+++++[-[->>>>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>->>>>>>>>>
|
||||||
|
>>>>>>>>>>>>>>>>>>-<<<<<<[<<<<<<<<<]]>>>]
|
||||||
12
src/main/java/resources/math/collatz.bf
Normal file
12
src/main/java/resources/math/collatz.bf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
>,[
|
||||||
|
[
|
||||||
|
----------[
|
||||||
|
>>>[>>>>]+[[-]+<[->>>>++>>>>+[>>>>]++[->+<<<<<]]<<<]
|
||||||
|
++++++[>------<-]>--[>>[->>>>]+>+[<<<<]>-],<
|
||||||
|
]>
|
||||||
|
]>>>++>+>>[
|
||||||
|
<<[>>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<<]]<[>+<-]>]
|
||||||
|
>[>[>>>>]+[[-]<[+[->>>>]>+<]>[<+>[<<<<]]+<<<<]>>>[->>>>]+>+[<<<<]]
|
||||||
|
>[[>+>>[<<<<+>>>>-]>]<<<<[-]>[-<<<<]]>>>>>>>
|
||||||
|
]>>+[[-]++++++>>>>]<<<<[[<++++++++>-]<.[-]<[-]<[-]<]<,
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user