<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 /* Copyright 2006 Oliver Steele.  All rights reserved. */
 
-var Context = function (model) {
+var Context = function(model) {
 	this.model = model;
 	this.transform = new Transform;
     this.graphics = new Graphics;
@@ -10,7 +10,7 @@ var Context = function (model) {
 };
 
 Context.prototype = {
-	clone: function () {
+	clone: function() {
 		var clone = new Context(this.model);
         clone.transform = this.transform.clone();
         clone.graphics = this.graphics;
@@ -19,56 +19,56 @@ Context.prototype = {
         clone.stats = this.stats;
 		return clone;
 	},
-	invoke: function (name) {
+	invoke: function(name) {
         if (Math.abs(this.transform.determinant()) &lt; this.stats.cutoff) return;
 		//this.model.draw(this, name);
         this.queue[this.queue.length] = [this, name];
 	},
-    flush: function () {
+    flush: function() {
         while (this.queue.length &amp;&amp; --this.stats.countdown &gt; 0) {
             var item = this.queue.shift();
             item[0].model.draw(item[0], item[1]);
             this.stats.rules += 1;
         }
     },
-	setBackground: function (hsv) {
+	setBackground: function(hsv) {
 		this.graphics.setBackgroundHSV(hsv);
 	},
-    drawPolygon: function (points) {
+    drawPolygon: function(points) {
         var points = this.transform.transformPoints(points);
         this.graphics.setHSVA(this.color);
 		this.graphics.drawPolygon(points);
     },
-	drawCircle: function (center, radius) {
+	drawCircle: function(center, radius) {
         this.graphics.setHSVA(this.color);
 		this.graphics.drawCircle(center, radius, this.transform);
 	},
-    transform: function (points) {return this.transform.transform(points)},
-    set_x: function (dx) {this.transform.pretranslate(dx, 0)},
-    set_y: function (dy) {this.transform.pretranslate(0, dy)},
-	set_size: function (size) {this.transform.prescale(size[0], size[1])},
-	set_rotate: function (r) {this.transform.prerotate(r*Math.PI/180);},
-	set_skew: function (skew) {
+    transform: function(points) {return this.transform.transform(points)},
+    set_x: function(dx) {this.transform.pretranslate(dx, 0)},
+    set_y: function(dy) {this.transform.pretranslate(0, dy)},
+	set_size: function(size) {this.transform.prescale(size[0], size[1])},
+	set_rotate: function(r) {this.transform.prerotate(r*Math.PI/180);},
+	set_skew: function(skew) {
 		t = new Transform;
 		t.m[0][1] = Math.tan(skew[0]*Math.PI/180);
 		t.m[1][0] = Math.tan(skew[1]*Math.PI/180);
 		this.transform.premultiply(t);
 	},
-    set_flip: function (r) {
+    set_flip: function(r) {
         r *= Math.PI/180;
         this.transform.prerotate(-r);
         this.transform.prescale(1, -1);
         this.transform.prerotate(r);
     },
-    set_hue: function (h) { this.color[0] += h; },
-    set_sat: function (s) { this.color[1] = s; },
-    set_brightness: function (b) { 
+    set_hue: function(h) { this.color[0] += h; },
+    set_sat: function(s) { this.color[1] = s; },
+    set_brightness: function(b) { 
         this.color[2] += (1-this.color[2])*b;
     },
-    set_alpha: function (a) { this.color[3] += this.color[3]*a; }
+    set_alpha: function(a) { this.color[3] += this.color[3]*a; }
 };
 
-Model.prototype.draw = function (context, name) {
+Model.prototype.draw = function(context, name) {
 	context.setBackground(this.background);
 	if (!name) name = this.startName;
     var rule = this.choose(name);
@@ -76,12 +76,12 @@ Model.prototype.draw = function (context, name) {
     context.flush();
 };
 
-Rule.prototype.draw = function (context) {
+Rule.prototype.draw = function(context) {
 	for (var i = 0; i &lt; this.calls.length; i++)
 		this.calls[i].draw(context);
 };
 
-Call.prototype.draw = function (context) {
+Call.prototype.draw = function(context) {
 	if (this.attributes.length)
 		context = context.clone();
     for (var i = 0; i &lt; this.attributes.length; i++)
@@ -94,18 +94,18 @@ Call.prototype.draw = function (context) {
 var Sqrt3 = Math.sqrt(3);
 
 var Shapes = {
-	CIRCLE: function (context) {
+	CIRCLE: function(context) {
 		if (Math.abs(context.transform.determinant()) &lt; context.stats.cutoff*2)
             return this.SQUARE(context);
 		context.drawCircle([0,0],0.5);
 	},
-	SQUARE: function (context) {
+	SQUARE: function(context) {
 		var pts = [[-.5,-.5], [-.5,.5], [.5,.5], [.5,-.5]];
 		context.drawPolygon(pts);
 	},
-	TRIANGLE: function (context) {
-        var y = -0.5/Sqrt3;
-		var pts = [[-.5,y], [.5,y], [0, y+Sqrt3/2]];
+	TRIANGLE: function(context) {
+        var y = -0.5/Sqrt3,
+            pts = [[-.5,y], [.5,y], [0, y+Sqrt3/2]];
 		context.drawPolygon(pts);
 	}
 }
\ No newline at end of file</diff>
      <filename>javascripts/cfdg.drawing.js</filename>
    </modified>
    <modified>
      <diff>@@ -3,37 +3,39 @@
 function Graphics() {}
 
 Graphics.prototype = {
-    drawPolygon: function (points) {},
-	drawCircle: function (center, radius, transform) {},
-	drawPath: function (points) {},
-    setRGBA: function (rgba) {},
-    setHSVA: function (hsva) { this.setRGBA(hsv2rgb(hsva).concat([hsva[3]])); },
-	setBackground: function (rgb) {},
-	setBackgroundHSV: function (hsv) {
+    drawPolygon      : function(points) {},
+	drawCircle       : function(center, radius, transform) {},
+	drawPath         : function(points) {},
+    setRGBA          : function(rgba) {},
+    setHSVA          : function(hsva) {
+        this.setRGBA(hsv2rgb(hsva).concat([hsva[3]]));
+    },
+	setBackground    : function(rgb) {},
+	setBackgroundHSV : function(hsv) {
 		hsv = [hsv.hue, hsv.sat, hsv.brightness];
 		this.setBackground(hsv2rgb(hsv));
 	}
 };
 
 function hsv2rgb(hsv) {
-	var h = ((hsv[0] % 360) + 360) % 360;
-	var s = Math.min(1, Math.max(0, hsv[1]));
-	var v = Math.min(1, Math.max(0, hsv[2]));
+	var h = ((hsv[0] % 360) + 360) % 360,
+	    s = Math.min(1, Math.max(0, hsv[1])),
+	    v = Math.min(1, Math.max(0, hsv[2]));
 	if (s == 0) return [v, v, v];
 	h = h / 60.0; // sector 0 to 5
-	var i = Math.floor(h);
-	var f = h - i;
-	var p = v * (1 - s);
-	var q = v * (1 - s * f);
-	var t = v * (1 - s * (1 - f));
+	var i = Math.floor(h),
+        f = h - i,
+        p = v * (1 - s),
+        q = v * (1 - s * f),
+        t = v * (1 - s * (1 - f));
 	return rgb = [[v,t,p],[q,v,p],[p,v,t],[p,q,v],[t,p,v],[v,p,q]][i % 6];
 }
 
 function makeQuadraticCircle() {
-	var pts = [[1, 0]];
-	var theta = Math.PI/4;
-	var rctl = 1/Math.cos(theta/2);
-	var angle = 0;
+	var pts = [[1, 0]],
+        theta = Math.PI/4,
+        rctl = 1/Math.cos(theta/2),
+        angle = 0;
 	for (var i = 0; i &lt; 8; i++) {
 		angle += theta/2;
 		pts.push([rctl*Math.cos(angle), rctl*Math.sin(angle)]);
@@ -45,8 +47,7 @@ function makeQuadraticCircle() {
 
 function makeCubicCircle() {
 	// http://graphics.stanford.edu/courses/cs248-98-fall/Final/q1.html
-	var a = .552;
-	a = (Math.sqrt(2)-1)*4/3;
+	var a = (Math.sqrt(2)-1)*4/3;
 	return [[1,0],
 			[1,a],[a,1],[0,1],
 			[-a,1],[-1,a],[-1,0],
@@ -54,28 +55,28 @@ function makeCubicCircle() {
 			[a,-1],[1,-a],[1,0]];
 }
 
-Transform = function () {
+Transform = function() {
     this.m = [[1,0,0],[0,1,0],[0,0,1]];
 };
 
 Transform.prototype = {
-    clone: function () {
-        var clone = new Transform;
-        var m = clone.m = [];
+    clone: function() {
+        var clone = new Transform,
+            m = clone.m = [];
         for (var i = 0; i &lt; this.m.length; i++)
             m.push([].concat(this.m[i]));
         return clone;
     },
     
-    determinant: function () {
+    determinant: function() {
         var m = this.m;
         return m[0][0]*m[1][1]-m[0][1]*m[1][0];
     },
 
-	transformPoints: function (points) {
-		var result = new Array(points.length);
-		var mx = this.m[0];
-		var my = this.m[1];
+	transformPoints: function(points) {
+		var result = new Array(points.length),
+            mx = this.m[0],
+            my = this.m[1];
 		for (var i = 0; i &lt; points.length; i++) {
 			var x = points[i][0];
 			var y = points[i][1];
@@ -86,8 +87,8 @@ Transform.prototype = {
 	},
     
     prescale: function(sx, sy) {
-        var t = new Transform;
-        var m = t.m;
+        var t = new Transform,
+            m = t.m;
         m[0][0] = sx;
         m[1][1] = sy;
         this.premultiply(t);
@@ -100,31 +101,32 @@ Transform.prototype = {
 		m[1][1] *= sy;*/
 	},
     
-    pretranslate: function (dx, dy) {
-        var t = new Transform;
-        var m = t.m;
+    pretranslate: function(dx, dy) {
+        var t = new Transform,
+            m = t.m;
         m[0][2] = dx;
         m[1][2] = dy;
         this.premultiply(t);
-        return;
+        return this;
         /*var m = this.m;
         m[0][2] += m[0][0]*dx+m[0][1]*dy;
         m[1][2] += m[1][0]*dx+m[1][1]*dy;*/
     },
     
-    prerotate: function (theta) {
-        var t = new Transform;
-        var m = t.m;
+    prerotate: function(theta) {
+        var t = new Transform,
+            m = t.m;
         m[0][0] = m[1][1] = Math.cos(theta);
         m[0][1] = -(m[1][0] = Math.sin(theta));
         this.premultiply(t);
+        return this;
     },
     
-    premultiply: function (a) {
-        var b = this.clone();
-        var ma = a.m;
-        var mb = b.m;
-        var m = this.m;
+    premultiply: function(a) {
+        var b = this.clone(),
+            ma = a.m,
+            mb = b.m,
+            m = this.m;
         for (var i = 0; i &lt;= 2; i++) {
             for (var j = 0; j &lt;= 2; j++) {
                 var sum = mb[i][0]*ma[0][j];
@@ -133,8 +135,9 @@ Transform.prototype = {
                 m[i][j] = sum;
             }
         }
+        return this;
     },
-    floor: function () {
+    floor: function() {
         for (var i = 0; i &lt;= 2; i++)
             for (var j = 0; j &lt;= 2; j++)
                 if (Math.abs(this.m[i][j]) &lt; .01)</diff>
      <filename>javascripts/cfdg.graphics.js</filename>
    </modified>
    <modified>
      <diff>@@ -25,38 +25,38 @@ Bounds.prototype.equals = function(bounds) {
 HalfUnitCircle = new Transform().prescale(.5,.5).
 	transformPoints(makeCubicCircle());
 
-var RepeatableRandom = function () {
+var RepeatableRandom = function() {
 	self.store = [];
 	self.index = 0;
 };
 
 RepeatableRandom.prototype = {
-	random: function () {
+	random: function() {
 		if (self.index &lt; self.store.length) return self.store[self.index++];
 		return self.store[self.index++] = Math.random();
 	},
-	rewind: function () {
+	rewind: function() {
 		self.index = 0;
 	}
 };
 
-Graphics.prototype.setCanvas = function (canvas) {
+Graphics.prototype.setCanvas = function(canvas) {
 	this.canvas = canvas;
 	this.ctx = canvas.getContext(&quot;2d&quot;);
 };
 
-Graphics.prototype.reset = function () {
+Graphics.prototype.reset = function() {
     this.setRGBA([0,0,0,1]);
 }
 
-Graphics.prototype.clear = function () {
+Graphics.prototype.clear = function() {
 	this.ctx.clearRect(0, 0, canvas.width, canvas.height);
 };
 
-Graphics.prototype.setViewport = function (bounds) {
-	var canvas = this.canvas;
-    var xmin = bounds.xmin, ymin = bounds.ymin;
-    var xmax = bounds.xmax, ymax = bounds.ymax;
+Graphics.prototype.setViewport = function(bounds) {
+	var canvas = this.canvas,
+        xmin = bounds.xmin, ymin = bounds.ymin,
+        xmax = bounds.xmax, ymax = bounds.ymax;
 	this.ctx.restore();
 	this.clear();
 	this.ctx.save();
@@ -70,18 +70,18 @@ Graphics.prototype.setViewport = function (bounds) {
 	//this.ctx.translate(.5-(xmax+xmin)/2, .5-(ymin+ymax)/2);
 };
 
-Graphics.prototype.drawPolygon = function (pts) {
+Graphics.prototype.drawPolygon = function(pts) {
 	Stats.shapeCount += 1;
 	this.drawPath(pts, false);
 };
 
-Graphics.prototype.drawCircle = function (center, radius, transform) {
+Graphics.prototype.drawCircle = function(center, radius, transform) {
 	Stats.shapeCount += 1;
 	var pts = transform.transformPoints(HalfUnitCircle);
 	this.drawPath(pts, true);
 };
 
-Graphics.prototype.drawPath = function (pts, isCubic) {
+Graphics.prototype.drawPath = function(pts, isCubic) {
 	var ctx = this.ctx;
 	ctx.beginPath();
 	ctx.moveTo(pts[0][0], pts[0][1]);
@@ -109,7 +109,7 @@ Graphics.prototype.drawPath = function (pts, isCubic) {
     this.bounds = new Bounds(xmin, ymin, xmax, ymax);
 };
 
-Graphics.prototype.setRGBA = function (rgba) {
+Graphics.prototype.setRGBA = function(rgba) {
 	var s = '';
 	for (var i = 0; i &lt; 3; i++)
 		s += (s ? ',' : '') + Math.floor(255*rgba[i]);</diff>
      <filename>javascripts/cfdg.js</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ var ATTRIBUTE_NAME_SYNONYMS = {s: 'size', r: 'rotate', b: 'brightness', h: 'hue'
 var BACKGROUND_ATTRIBUTE_NAMES = 'hue sat brightness'.split(' ');
 var ATTRIBUTE_ARITY = {size: 2, skew: 2}
 
-var Model = function () {
+var Model = function() {
 	this.startName = null;
 	this.rules = {};
 	this.randomGenerator = Math;
@@ -14,7 +14,7 @@ var Model = function () {
 };
 
 Model.prototype = {
-	makeRule: function (name) {
+	makeRule: function(name) {
         if (!this.startName) this.startName = name;
 		var rules = this.rules[name];
 		if (!rules) {
@@ -26,7 +26,7 @@ Model.prototype = {
 		return r;
 	},
     
-	to_s: function (name) {
+	to_s: function(name) {
 		var s = '';
 		for (var name in this.rules)
 			for (var i = 0; i &lt; this.rules[name].length; i++) {
@@ -38,12 +38,12 @@ Model.prototype = {
 		return s;
 	},
 
-	setBackground: function (attributes) {
+	setBackground: function(attributes) {
 		for (var name in attributes)
 			this.background[name] = attributes[name];
 	},
 	
-    choose: function (name) {
+    choose: function(name) {
         rules = this.rules[name];
         if (!rules) {error(&quot;No rule named &quot; + name); return}
         if (rules.length == 1) return rules[0];
@@ -62,20 +62,20 @@ Model.prototype = {
     }
 };
 
-var Rule = function (name) {
+var Rule = function(name) {
 	this.name = name;
 	this.weight = 1.0;
 	this.calls = [];
 };
 
 Rule.prototype = {
-	addCall: function (name) {
+	addCall: function(name) {
 		var c = new Call(name);
 		this.calls.push(c);
 		return c;
 	},
     
-	to_s: function () {
+	to_s: function() {
 		var s = this.name;
         if (this.weight != 1.0) s += ' ' + this.weight;
         s += &quot; {&quot;;
@@ -87,19 +87,19 @@ Rule.prototype = {
 	}
 };
 
-var Call = function (name) {
+var Call = function(name) {
 	this.name = name;
 	this.attributes = [];
 };
 
 Call.prototype = {
-	setAttributeList: function (attrs) {
+	setAttributeList: function(attrs) {
 		this.attributes = attrs
 	},
 	
-	setAttributeSet: function (attrs) {
-		var names = this.ATTRIBUTE_NAMES;
-		var list = [];
+	setAttributeSet: function(attrs) {
+		var names = this.ATTRIBUTE_NAMES,
+            list = [];
 		for (var i = 0; i &lt; names.length; i++) {
 			var name = names[i];
 			if (attrs[name])
@@ -107,7 +107,7 @@ Call.prototype = {
 		}
 		this.attributes = list;
 	},
-	to_s: function () {
+	to_s: function() {
 		if (!this.attributes.length) return this.name + &quot; {}&quot;;
 		var s = this.name + &quot; [&quot;;
 		for (var i = 0; i &lt; this.attributes.length; i++) {
@@ -119,13 +119,13 @@ Call.prototype = {
 };
 
 Call.prototype = {
-	setAttributeList: function (attrs) {
+	setAttributeList: function(attrs) {
 		this.attributes = attrs
 	},
 	
-	setAttributeSet: function (attrs) {
-		var names = this.ATTRIBUTE_NAMES;
-		var list = [];
+	setAttributeSet: function(attrs) {
+		var names = this.ATTRIBUTE_NAMES,
+            list = [];
 		for (var i = 0; i &lt; names.length; i++) {
 			var name = names[i];
 			if (attrs[name])
@@ -133,7 +133,7 @@ Call.prototype = {
 		}
 		this.attributes = list;
 	},
-	to_s: function () {
+	to_s: function() {
 		if (!this.attributes.length) return this.name + &quot; {}&quot;;
 		var s = this.name + &quot; [&quot;;
 		for (var i = 0; i &lt; this.attributes.length; i++) {
@@ -145,11 +145,11 @@ Call.prototype = {
 };
 
 Call.prototype = {
-	setAttributeList: function (attrs) {
+	setAttributeList: function(attrs) {
 		this.attributes = attrs
 	},
 	
-	setAttributeSet: function (attrs) {
+	setAttributeSet: function(attrs) {
 		var names = ATTRIBUTE_NAMES;
 		var list = [];
 		for (var i = 0; i &lt; names.length; i++) {
@@ -160,7 +160,7 @@ Call.prototype = {
 		this.attributes = list;
 	},
     
-	to_s: function () {
+	to_s: function() {
 		if (!this.attributes.length) return this.name + &quot; {}&quot;;
 		var s = this.name + &quot; [&quot;;
 		for (var i = 0; i &lt; this.attributes.length; i++) {</diff>
      <filename>javascripts/cfdg.model.js</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,8 @@ var EOF = -1;
 var PUNCTUATION = &quot;()[]{}|;&quot;;
 
 function lex(text, parser) {
-    parser = parser || {receive: function (type, token) {info(type, &quot;: '&quot; + token + &quot;'&quot;)}};
+    parser = parser || {receive: function(type, token) {
+        console.info(type, &quot;: '&quot; + token + &quot;'&quot;) }};
 	var lines = text.lines();
 	for (var i = 0; i &lt; lines.length; i++) {
 		var words = lines[i].words();
@@ -26,9 +27,9 @@ function lex(text, parser) {
 					}
 				}
 			}
-            var type = null;
-            var token = word;
-			var c0 = word.charAt(0).toLowerCase();
+            var type = null,
+                token = word,
+                c0 = word.charAt(0).toLowerCase();
 			if (('a' &lt;= c0 &amp;&amp; c0 &lt;= 'z') || c0 == '_')
 				type = '&lt;string&gt;';
 			if (('0' &lt;= c0 &amp;&amp; c0 &lt;= '9') || &quot;.-&quot;.indexOf(c0) &gt;= 0) {
@@ -52,17 +53,17 @@ function lex(text, parser) {
     if (msg) return {message: msg, lineno: i, token: 'end of document'};
 }
 
-var Parser = function (builder) {
+var Parser = function(builder) {
 	this.builder = builder;
 	this.set_initial_state();
 };
 
 Parser.prototype = {
-	receive: function (type, token) {
+	receive: function(type, token) {
 		var fn = this.transitions[token] || this.transitions[type];
 		if (!fn) {
-			var msg = &quot;Expected one of: &quot;;
-			var sep = '';
+			var msg = &quot;Expected one of: &quot;,
+                sep = '';
 			for (var key in this.transitions) {
 				msg += sep + key;
 				sep = ', ';
@@ -77,16 +78,16 @@ Parser.prototype = {
 		}
 	},
 	
-	expect: function () {
+	expect: function() {
 		this.transitions = {};
 		for (var i = 0; i &lt; arguments.length; i += 2)
 			this.transitions[arguments[i]] = arguments[i+1];
 	},
 	
-	set_initial_state: function () {
+	set_initial_state: function() {
 		this.expect('rule', this.rule,
-					'background', function () {
-						this.expect('{', function () {
+					'background', function() {
+						this.expect('{', function() {
 										this.builder.start_background();
 										this.attributes_handle = {
 											rule: this.rule
@@ -95,57 +96,57 @@ Parser.prototype = {
 										this.expect_attribute_name();
 									});
 					},
-					'startshape', function () {
-						this.expect('&lt;string&gt;', function (name) {
+					'startshape', function() {
+						this.expect('&lt;string&gt;', function(name) {
 										this.builder.startshape(name);
 										this.set_initial_state();
 									})
 							});
 	},
 	
-	rule: function () {
+	rule: function() {
 		this.expect(
-			'&lt;string&gt;', function (name) {
+			'&lt;string&gt;', function(name) {
 				this.builder.start_rule(name);
 				this.expect('{', this.rule_body_transitions,
-                            '&lt;number&gt;', function (weight) {
+                            '&lt;number&gt;', function(weight) {
                                 this.builder.add_weight(weight);
                                 this.expect('{', this.rule_body_transitions);
                             });
 			})
 	},
 	
-	rule_body: function (name) {
+	rule_body: function(name) {
 		this.builder.start_child(name);
-		this.expect('{', function () {
+		this.expect('{', function() {
 						this.builder.start_attribute_set();
 						this.attributes_handle = this.rule_body_transitions;
 						this.end_punctuation = '}';
 						this.expect_attribute_name();
 					},
-					'[', function () {
+					'[', function() {
 						this.builder.start_attribute_list();
 						this.attributes_handle = this.rule_body_transitions;
 						this.end_punctuation = ']';
 						this.expect_attribute_name()});
 	},
 	
-	expect_attribute_name: function () {
+	expect_attribute_name: function() {
 		this.expect('&lt;string&gt;', this.attribute_name,
-					this.end_punctuation, function () {
+					this.end_punctuation, function() {
 						this.builder.end_attributes();
 						this.transitions = this.attributes_handle;
 					});
 	},
 	
-	attribute_name: function (name) {
-		this.expect('&lt;number&gt;', function (value) {
+	attribute_name: function(name) {
+		this.expect('&lt;number&gt;', function(value) {
 						this.expect_attribute_name();
-						this.transitions['&lt;number&gt;'] = function (value) {
+						this.transitions['&lt;number&gt;'] = function(value) {
 							this.expect_attribute_name();
 							return this.builder.add_attribute_value(value);
 						};
-						this.transitions['|'] = function () {
+						this.transitions['|'] = function() {
 							this.expect_attribute_name();
 							return this.builder.pipe();
 						}
@@ -154,14 +155,14 @@ Parser.prototype = {
 	},
 
 	rule_body_transitions: {
-		'}': function () {this.expect('rule', this.rule,
+		'}': function() {this.expect('rule', this.rule,
                                       '&lt;eof&gt;', {})},
-		'&lt;string&gt;': function (s) {this.rule_body(s)}
+		'&lt;string&gt;': function(s) {this.rule_body(s)}
 	}
 	
 };
 
-var Builder = function (model) {
+var Builder = function(model) {
 	this.model = model;
     var names = [].concat(ATTRIBUTE_NAMES);
     for (var name in ATTRIBUTE_NAME_SYNONYMS)
@@ -170,95 +171,95 @@ var Builder = function (model) {
 };
 
 Builder.prototype = {
-	startshape: function (name) {
+	startshape: function(name) {
 		//info('builder: startshape ' + name);
 		this.model.startName = name;
 	},
 	
-	start_rule: function (name) {
+	start_rule: function(name) {
 		//info('builder: rule ' + name);
 		this.rule = this.model.makeRule(name);
 	},
 	
-    add_weight: function (weight) {
+    add_weight: function(weight) {
         this.rule.weight = weight;
     },
     
-	start_child: function (name) {
+	start_child: function(name) {
 		//info('builder: child ' + name);
 		this.call = this.rule.addCall(name);
 	},
 	
-	start_attribute_set: function () {
+	start_attribute_set: function() {
 		//info('builder: attribute set');
 		this.attributeSet = {};
 		this.set_attribute_handlers(this.attribute_handlers.set);
 	},
 	
-	start_attribute_list: function () {
+	start_attribute_list: function() {
 		//info('builder: attribute list');
 		this.attributeList = [];
 		this.set_attribute_handlers(this.attribute_handlers.list);
 	},
 	
-	start_background: function () {
+	start_background: function() {
 		//info('builder: background');
 		this.attributeSet = {};
 		this.set_attribute_handlers(this.attribute_handlers.background);
 	},
 	
-	set_attribute_handlers: function (table) {
+	set_attribute_handlers: function(table) {
 		for (var key in table)
 			this[key] = table[key];
 	},
 	
 	attribute_handlers: {
 		set: {
-			add_attribute_helper: function (name, value) {
+			add_attribute_helper: function(name, value) {
 				this.lastAttributeName = name;
 				this.attributeSet[name] = value;
 			},
 			
-			pop_attribute_value: function (name) {
+			pop_attribute_value: function(name) {
 				var value = this.attributeSet[name];
 				delete this.attributeSet[name];
 				return value;
 			},
 			
-			end_attributes: function () {
+			end_attributes: function() {
 				this.call.setAttributeSet(this.attributeSet);
 			}
 		},
 		
 		list: {
-			add_attribute_helper: function (name, value) {
+			add_attribute_helper: function(name, value) {
 				this.lastAttributeName = name;
 				this.attributeList.push([name, value]);
 			},
 			
-			pop_attribute_value: function (name) {
+			pop_attribute_value: function(name) {
 				return this.attributeList.pop()[1];
 			},
 			
-			end_attributes: function () {
+			end_attributes: function() {
 				this.call.setAttributeList(this.attributeList);
 			}
 		},
 		
 		background: {
-			add_attribute_helper: function (name, value) {
+			add_attribute_helper: function(name, value) {
 				if (!BACKGROUND_ATTRIBUTE_NAMES.include(name))
 					return &quot;Invalid attribute name: &quot; + name;
 				this.attributeSet[name] = value;
 			},
 			
-			end_attributes: function () {
+			end_attributes: function() {
 				this.model.setBackground(this.attributeSet);
 			}
 		}
 	},
 	
-	add_attribute: function (name, value) {
+	add_attribute: function(name, value) {
 		//info('builder: add attribute ' + name + &quot;, &quot; + value);
 		if (ATTRIBUTE_NAME_SYNONYMS[name])
 			name = ATTRIBUTE_NAME_SYNONYMS[name];
@@ -269,7 +270,7 @@ Builder.prototype = {
 		this.add_attribute_helper(name, value);
 	},
 	
-	add_attribute_value: function (value) {
+	add_attribute_value: function(value) {
 		var name = this.lastAttributeName;
 		if (ATTRIBUTE_ARITY[name] != 2)
 			return &quot;The \'&quot; + name + &quot;\' attribute can only have one value&quot;;
@@ -278,7 +279,7 @@ Builder.prototype = {
         this.add_attribute_helper(name, vector);
 	},
 	
-	pipe: function () {
+	pipe: function() {
 		var name = this.lastAttributeName;
 		if (name == 'hue') {
 			this.pop_attribute_value(name);</diff>
      <filename>javascripts/cfdg.parser.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d14dee3904b5cd60c82424954f06acdc9736c34a</id>
    </parent>
  </parents>
  <author>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </author>
  <url>http://github.com/osteele/cfdg-js/commit/572f95ea3c244ae039c2e46d54011cfc93910bb4</url>
  <id>572f95ea3c244ae039c2e46d54011cfc93910bb4</id>
  <committed-date>2008-03-23T20:03:32-07:00</committed-date>
  <authored-date>2008-03-23T20:03:32-07:00</authored-date>
  <message>update to this year's ws conventions</message>
  <tree>8f60c9f7fad4773bf8efd1188fea9f3aa7c9cebe</tree>
  <committer>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </committer>
</commit>
