Uses 911K of libraries. Click here for Pure Java version (3430L/19K).
1 | !7 |
2 | |
3 | cmodule IWantYouToBe > DynPrintLog {
|
4 | class Rule1 extends WordTokRule {
|
5 | *() { super("I want you to be my assistant", "assistant"); }
|
6 | |
7 | run {
|
8 | emit("I want that {you are my " + getVar("assistant") + "}");
|
9 | } |
10 | } |
11 | |
12 | <A extends RuleOnString> A process(A rule, S s) {
|
13 | rule.process(s); |
14 | ret rule; |
15 | } |
16 | |
17 | start-thread {
|
18 | assertNull(process(new Rule1, "I want you to be his friend").map); |
19 | new Rule1 r; |
20 | printStruct(assertEquals(litcimap("assistant", "girl"),
|
21 | process(r, "I want you to be my girl").map)); |
22 | assertEmitsContainIC(r, "I want that {you are my girl}");
|
23 | printDone(); |
24 | } |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023161 |
| Snippet name: | I want you to be... [prelude spike] |
| Eternal ID of this version: | #1023161/13 |
| Text MD5: | d3a88e13e79975f696c91fd14de4d8cc |
| Transpilation MD5: | 63e278be89669a1cf329520e2b47b94b |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-05-15 23:33:02 |
| Source code size: | 657 bytes / 25 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 520 / 787 |
| Version history: | 12 change(s) |
| Referenced in: | [show references] |