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

18
LINES

< > BotCompany Repo | #1008838 // ctxFindRules

JavaX fragment (include)

sbool ctxFindRules_debug;

static L<CtxRule1> ctxFindRules(S botID) {
  new L<CtxRule1> out;
  File f = loadLibrary(botID);
  L<S> names = endingWithIC(".ctx", listFilesInZip(f));
  int good = 0, bad = 0;
  for (S name : names) {
    L<S> lines = lines(loadTextFileFromZip(f, name));
    if (ctxFindRules_debug)
      print(name + ": " + n(lines, "lines"));
    for i, S s over lines: {
      if (javaTokC(s).contains("RULE"))
        out.add(nuWithValues(CtxRule1, file := name, allLines := lines, ruleIndex := i));
    }
  }
  ret out;
}

Author comment

Began life as a copy of #1008834

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: #1008838
Snippet name: ctxFindRules
Eternal ID of this version: #1008838/12
Text MD5: 86e56d9743d41be8b2c8abecdb2ec82e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-12 18:31:52
Source code size: 556 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 431 / 466
Version history: 11 change(s)
Referenced in: [show references]