             throw new Error("Assertion failed");
     }
 
-    function cleanup(lines) {
+    function preprocess(lines) {
 	var j = 0;
 	var first = true;
 	for ( var i=0, limit=lines.length ; i < limit ; i++ ) {

	return lines;
    }

    function patterns(lines) {
	var output = [];
	var P = null;
	var G = null;
	var A = null;
	var res;
	for ( var i=0, limit=lines.length ; i < limit ; i++ ) {
	    var L = lines[i];
	    if (P == null) {
		res = /^pattern\s+(.*)$/.exec(L);
		assert(res != null);

        System.exit(1);
    }

    var T = build(parse(preprocess(File.read(System.argv[0]).split("\n"))));
    display(T, null);
}
