package dk.dtu.brainfuckcomp;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int n;
		if (args.length == 0) {
			System.out.println("Length of Brainfuck array not specified. Defaulting to 8.");
			n = 8;
		} else {
			n = Integer.parseInt(args[0]);
		}
		
		Brainfuck bf = new Brainfuck(n);
		Scanner sc = new Scanner(System.in);
		
        System.out.println("Enter Brainfuck (Leave blank for \"Hello World!\"):");
        String str = sc.nextLine();
		if (str.equals("")) {
			str = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
		}
		sc.close();
				
		try {
			bf.parse(str);
		} catch (UnknownSymbolExeption e) {
			e.printStackTrace();
		}
		
		System.out.println(bf.toString());		
	}
}

@@ -72,16 +72,164 @@
 Main %7B%0A%0A
+%09private static final String HELLO = %22++++++++%5B%3E++++%5B%3E++%3E+++%3E+++%3E+%3C%3C%3C%3C-%5D%3E+%3E+%3E-%3E%3E+%5B%3C%5D%3C-%5D%3E%3E.%3E---.+++++++..+++.%3E%3E.%3C-.%3C.+++.------.--------.%3E%3E+.%3E++.%22;%0A%0A
 %09public 
@@ -676,116 +676,13 @@
 r = 
-%22++++++++%5B%3E++++%5B%3E++%3E+++%3E+++%3E+%3C%3C%3C%3C-%5D%3E+%3E+%3E-%3E%3E+%5B%3C%5D%3C-%5D%3E%3E.%3E---.+++++++..+++.%3E%3E.%3C-.%3C.+++.------.--------.%3E%3E+.%3E++.%22
+HELLO
 ;%0A%09%09

Refactor helloWorld string final