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

14
LINES

< > BotCompany Repo | #1012137 // ai_parseRule

JavaX fragment (include)

static AI_Rule ai_parseRule(S s) {
  L<S> tok = tok_combineCurlyBraces(javaTok(s));
  new Matches m;
  if (jmatch("* => *", tok, m))
    ret ai_rule(
      ai_parseTriple(m.get(0)),
      ai_parseTriple(m.get(1)));
  if (jmatch("* & * => *", tok, m))
    ret ai_rule(
      ai_parseTriple(m.get(0)),
      ai_parseTriple(m.get(1)),
      ai_parseTriple(m.get(2)));
  null;
}

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: #1012137
Snippet name: ai_parseRule
Eternal ID of this version: #1012137/5
Text MD5: a66a468f2c6459dad33cc2600305234b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-21 14:05:44
Source code size: 387 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 409
Version history: 4 change(s)
Referenced in: [show references]