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
Snippet ID: | #1002733 |
Snippet name: | SNL Logic Engine 2 |
Eternal ID of this version: | #1002733/1 |
Text MD5: | f23b24b7076af72013cdf707bd17b4a4 |
Transpilation MD5: | 067c27c18c4188095b1b97e7eac82957 |
Author: | stefan |
Category: | eleu / nl |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-19 03:24:46 |
Source code size: | 915 bytes / 43 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 729 / 976 |
Referenced in: | [show references] |