Libraryless. Click here for Pure Java version (4064L/26K/84K).
!759 static S codeSnippetID = "#1002732"; static Lisp code; p { code = snlToTree(loadSnippet(codeSnippetID)); print(getProgramID() + ": parse result = " + code); } static boolean yo(Lisp snl, Map m) { new HashMap<S, Lisp> m2; // we don't know jack! if (snlMatch("i < don't < know < X", snl, m2)) ret true; ret false; } !include #1002743 // LThread answer { if (!attn()) ret null; // convert to SNL first s = or((S) callOpt/*Safe*/(getBot ("#1002700"), "naiveSNL", s), s); Lisp in = snlToTree(s); LThread thread = new LThread(code); thread.statements.add(snlToTree("user < says < [" + snlFromTree(in) + "]")); print("Statements: " + structure(thread.statements)); if (!thread.run()) ret null; Lisp out = first(thread.output); if (out != null) ret "[SNL: " + snlFromTree(in) + "]\n" + snlToText(out); }
Began life as a copy of #1002723
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment