Libraryless. Click here for Pure Java version (3679L/23K/77K).
1 | !759 |
2 | |
3 | // [=[ doesn't work yet, but no time to hunt for this... |
4 | |
5 | static S input = [[ |
6 | if [User < says < what < is < a < XY] |
7 | and [XY < can < be < split < in < 2 < as < X < and < Y] |
8 | and [X < is < an < adjective] |
9 | then [say < maybe < [a > XY] is < [a > Y] < that < is < [very > X] ] |
10 | ]]; |
11 | |
12 | p { |
13 | // parse lines |
14 | for (S s : toLinesFullTrim(input)) { |
15 | printStructure(snlToTree(s)); |
16 | } |
17 | |
18 | // parse all |
19 | print(); |
20 | Lisp tree; |
21 | time { |
22 | tree = snlToTree(input); |
23 | } |
24 | printStructure(tree); |
25 | } |
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: | #1002718 |
Snippet name: | SNL Logic Engine (parsing test) |
Eternal ID of this version: | #1002718/1 |
Text MD5: | 2517451b2a36ed3b78dbbb8a2d01646c |
Transpilation MD5: | 377d89489b51d908b7cd80dcbab83ad9 |
Author: | stefan |
Category: | eleu / nl |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-18 00:39:05 |
Source code size: | 525 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 715 / 715 |
Referenced in: | [show references] |