X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=code%2Fparse.js;h=08ac5f047377cf2ba9b9b9ee394a834866b49f80;hp=08bc9a0ede9545529a2135c8447209d6032de8c4;hb=3641a9827575d2eba30d316395eb3db7c45a1477;hpb=9731d7ed813516ee7c8c7ee8f24f3295789295d3 diff --git a/code/parse.js b/code/parse.js index 08bc9a0e..08ac5f04 100644 --- a/code/parse.js +++ b/code/parse.js @@ -208,8 +208,16 @@ var make_parse = function () { constant("I", make_lam(x, xx)); constant("B", make_lam3(u, v, x, make_app(uu, make_app(vv, xx)))); constant("C", make_lam3(u, v, x, make_app3(uu, xx, vv))); - constant("W", make_lam2(u, v, make_app3(uu, vv, vv))); + + // trush \uv.vu = CI constant("T", make_lam2(u, v, make_app(vv, uu))); + // mockingbird \u.uu = SII + constant("M", make_lam(u, make_app(uu, uu))); + // warbler \uv.uvv = C(BM(BBT) = C(BS(C(BBI)I))I + constant("W", make_lam2(u, v, make_app3(uu, vv, vv))); + // lark \uv.u(vv) = CBM = BWB + constant("L", make_lam2(u, v, make_app(uu, make_app(vv, vv)))); + // Y is SLL } make_constants(); @@ -234,8 +242,10 @@ var make_parse = function () { } else { t.first = []; while (token.arity === "name" || token.id === "\\") { - if (token.id !=== "\\") {t.first.push(n);} - n = token; + if (token.id !== "\\") { + t.first.push(n); + n = token; + } advance(); } if (token.arity === "literal" && t.first.length === 0) {