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

27
LINES

< > BotCompany Repo | #1002304 // @bgrgndz's language parser, stuff moved to p { }

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

Libraryless. Click here for Pure Java version (2073L/14K/45K).

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

Author comment

Began life as a copy of #1002296

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: #1002304
Snippet name: @bgrgndz's language parser, stuff moved to p { }
Eternal ID of this version: #1002304/1
Text MD5: c0322203782b49f1449b5dcb06c0ff4b
Transpilation MD5: ce92f4689abf6e0c94383fc8300041ea
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-03 20:33:09
Source code size: 565 bytes / 27 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 736 / 804
Referenced in: [show references]