package dk.dtu.brainfuckcomp;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Brainfuck bf = new Brainfuck(7);
		
		String str;
		Scanner sc = new Scanner(System.in);
		
        System.out.println("Enter Brainfuck (Leave blank for \"Hello World!\"):");
		str = sc.nextLine();
		if (str.equals("")) {
			str = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
		}
		
		sc.close();
				
		try {
			bf.parse(str);
		} catch (UnknownSymbolExeption e) {
			e.printStackTrace();
		}
		
		System.out.println(bf.toString());
		
		
	}
	
	
	
}

@@ -120,56 +120,220 @@
 %7B%0A%09%09
-Brainfuck bf = new Brainfuck(7);%0A%09%09%0A%09%09String str
+int n;%0A%09%09if (args.length == 0) %7B%0A%09%09%09System.out.println(%22Length of Brainfuck array not specified. Defaulting to 8.%22);%0A%09%09%09n = 8;%0A%09%09%7D else %7B%0A%09%09%09n = Integer.parseInt(args%5B0%5D);%0A%09%09%7D%0A%09%09%0A%09%09Brainfuck bf = new Brainfuck(n)
 ;%0A%09%09
@@ -455,18 +455,31 @@
 %5C%22):%22);%0A
-%09%09
+        String 
 str = sc
@@ -638,19 +638,16 @@
 .%22;%0A%09%09%7D%0A
-%09%09%0A
 %09%09sc.clo
@@ -792,22 +792,12 @@
 ());
-%0A%09%09%0A
 %09%09%0A%09%7D%0A
-%09%0A%09%0A%09%0A
 %7D%0A

Add dynamic changable brainfuck arraylength