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

26
LINES

< > BotCompany Repo | #1002296 // @bgrgndz's language parser

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

Libraryless. Compilation Failed (1965L/13K).

!752

static L<S> get = new ArrayList();
static L<S> say = new ArrayList();
static L<S> wordlist = new ArrayList();

p {
  for (S line : toLinesFullTrim(loadSnippet("#1002295"))) {
    if(line.contains("eleu:")) {
      line = line.replace("eleu:","");
      say.add(line);
    } else {
      get.add(line);
    }
  }

  makeBot("bgrgndz language parser");
}

answer {
  for (int i = 0; i < l(get); i++){
    if (" " + s + " ".contains(get(get, i)) && toString(s.charAt(s.indexOf(get(get, i)) - 1)) == " " && toString(s.charAt(s.indexOf(get(get, i)) + l(get(get, i)))) == " "){
      ret get(say, i);
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002296
Snippet name: @bgrgndz's language parser
Eternal ID of this version: #1002296/1
Text MD5: 49ab63654f3681d21832f11e3b3658cd
Transpilation MD5: 7bae701e229562e74f03236021aad6d9
Author: bgrgndz
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-19 20:14:40
Source code size: 639 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 781 / 889
Referenced in: [show references]