1 | static Lisp clParse(S s) {
|
2 | L<S> tok = tok_groupRoundBrackets(s); |
3 | if (l(tok) == 1) null; |
4 | Lisp l = lisp(unquote(tok.get(1))); |
5 | for (int i = 3; i < l(tok); i += 2) {
|
6 | S t = tok.get(i); |
7 | if (t.startsWith("(") && t.endsWith(")"))
|
8 | l.add(assertNotNull(clParse(dropFirstAndLast(t)))); |
9 | else |
10 | l.add(lisp(aiUsing(unquote(t)))); |
11 | } |
12 | ret l; |
13 | } |
14 | |
15 | static L<Lisp> clParse(L<S> l) {
|
16 | ret map(f clParse, l); |
17 | } |
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: | #1007462 |
| Snippet name: | clParse - Computer Language to Lisp |
| Eternal ID of this version: | #1007462/6 |
| Text MD5: | fc9a600f0e337d9228950f7cc7a52800 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-04-02 19:28:37 |
| Source code size: | 436 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 838 / 851 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |