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

21
LINES

< > BotCompany Repo | #1001519 - Sequences of NL instructions (developing)

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

Libraryless. Click here for Pure Java version (266L/3K/6K).

!747
!multi-line strings

m {
  static S input =
    [[print "hello", sleep, print "mama", sleep, print ":)".]];
  
  p {
    L<S> tok = codeTokensOnly(parse3(input));
    for (int i = 0; i < l(tok); i++) {
      S t = tok.get(i);
      if (eqic(t, "print"))
        print(unquote(tok.get(++i)));
      else if (eqic(t, "sleep")) {
        print("[zzz]");
        sleepSeconds(1);
      } else
        print("? " + t);
    }
  }
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, teubizvjbppd, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1001519
Snippet name: Sequences of NL instructions (developing)
Eternal ID of this version: #1001519/1
Text MD5: 0197548e5af1655aee3c2e8ca03e3f60
Transpilation MD5: afaec6c227f87f3252b84742946411b7
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-21 20:05:38
Source code size: 450 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 418 / 689
Referenced in: [show references]

Formerly at http://tinybrain.de/1001519 & http://1001519.tinybrain.de