Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1025448 // Propositions to objects, step 6 - parsing (shortened)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (8088L/56K).

!7

static withToList record Did$HappenBefore$(O event1, O event2) {}
static withToList record WhenDid$Happen(O event) {}
static withToList record $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, a -> parseArg(a)); }

p-exp {
  classes = new ClassesAndPatterns(myRecordClasses(), mc());
  pnl(classes.entries);
  testFunctionValues parse(
    "Did X happen before Y?" := Did$HappenBefore$("X", "Y"),
    "when did Z happen" := WhenDid$Happen("Z"),
    "{event 1} happens at second 100" := $HappensAtSecond$("event 1", 100)
  );
}

Author comment

Began life as a copy of #1025442

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025448
Snippet name: Propositions to objects, step 6 - parsing (shortened)
Eternal ID of this version: #1025448/6
Text MD5: 401a0582e96db137233367e56e0109cf
Transpilation MD5: 4b939fd1555545ca4794ce871fbc7d18
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 01:15:31
Source code size: 663 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 315 / 942
Version history: 5 change(s)
Referenced in: [show references]