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

!752

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

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

  makeBot("bgrgndz language parser");
}

answer {
  for (int i = 0; i < l(get); i++){
    if (find3(join(get(get, i)), s) ){
      ret join(get(say, i));
    }
  }
}

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