// http://javascript.crockford.com/tdop/index.html
// Douglas Crockford 2010-06-26
+// See also http://effbot.org/zone/simple-top-down-parsing.htm
+
+
/*jslint onevar: false
*/
}
};
+ /*
try {
if (console && console.debug) {
function print() {
}
}
} catch (e) {}
+ */
var symbol = function (id) {
var s = symbol_table[id];
res = make_lam2(s, z, res);
number_table[this.value] = res;
}
- return res;
+ if (this.first) {
+ return make_app(this.first.handler(), res);
+ } else {
+ return res;
+ }
}
var constant = function (s, v) {