 	return output;
     }
 
-    function printT(x) {
-	var s = "{";
-	for ( var i in x ) {
-	    if (i == "toString") continue;
-	    s += i + ": " + x[i] + ", ";
-	}
-	s += "}";
-	return s;
-    }
-
     function build(patterns) {
-	var T = { toString: function () { return printT(this); } };
+	var T = {};
 	for ( var i=0, ilimit=patterns.length ; i < ilimit ; i++ ) {
 	    var p = patterns[i];
 	    var container = T;
 	    for ( var j=0, jlimit=p.P.length ; j < jlimit ; j++ ) {
 		if (!(p.P[j] in container))
-		    container[p.P[j]] = { toString: function () { return printT(this); } };
+		    container[p.P[j]] = {};
 		container = container[p.P[j]];
 	    }
 	    if (!("actions" in container))

            throw new Error("Assertion failed");
    }

    function cleanup(lines) {
	var j = 0;
	var first = true;
	for ( var i=0, limit=lines.length ; i < limit ; i++ ) {

	return lines;
    }

    function parse(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].replace(/\$([0-9]+)\.([0-9]+)/g, "I[$1][$2]");
	    if (P == null) {
		res = /^pattern\s+(.*)$/.exec(L);
		assert(res != null);
