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).

1  
!752
2  
3  
static L<S> get = new ArrayList();
4  
static L<S> say = new ArrayList();
5  
static L<S> wordlist = new ArrayList();
6  
7  
p {
8  
  for (S line : toLinesFullTrim(loadSnippet("#1002295"))) {
9  
    if(line.contains("eleu:")) {
10  
      line = line.replace("eleu:","");
11  
      say.add(line);
12  
    } else {
13  
      get.add(line);
14  
    }
15  
  }
16  
17  
  makeBot("bgrgndz language parser");
18  
}
19  
20  
answer {
21  
  for (int i = 0; i < l(get); i++){
22  
    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)))) == " "){
23  
      ret get(say, i);
24  
    }
25  
  }
26  
}

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: 787 / 898
Referenced in: [show references]