Download Jar. Libraryless. Click here for Pure Java version (8423L/58K).
!7 srecord Did$HappenBefore$(O event1, O event2) {} srecord WhenDid$Happen(O event) {} srecord $HappensAtSecond$(O event, O y) {} static ClassesAndPatterns classes; sO parseArg(S s) { ret isInteger(s) ? parseInt(s) : s; } sO parse (S s) { ret classes.parse(s, lambda1 parseArg); } sS unparse (O o) { ret classes.unparse(o); } p-exp { classes = new ClassesAndPatterns(myRecordClasses(), mc()); pnl(classes.entries); for (S s : ll( "Did X happen before Y", "when did Z happen", "{event 1} happens at second 100")) assertEqualsICVerbose(s, print("> ", unparse(parse(s)))); }
Began life as a copy of #1025448
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, omdjrrnzbjjv, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1025452 |
Snippet name: | Propositions to objects, step 7 - unparsing (OK) |
Eternal ID of this version: | #1025452/8 |
Text MD5: | 225950cde2ef7cf2570da45f0da147fb |
Transpilation MD5: | 7da855ceb76afe386ca96079562c664b |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-05 14:36:00 |
Source code size: | 617 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 316 / 1050 |
Version history: | 7 change(s) |
Referenced in: | -