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

20
LINES

< > BotCompany Repo | #1001104 // match3 function

JavaX fragment (include)

static boolean match3(S pat, S s) {
  return match3(pat, s, null);
}

static boolean match3(S pat, S s, Matches matches) {
  if (pat == null || s == null) return false;
  ret match3(pat, parse3_cachedInput(s), matches);
}
  
static boolean match3(S pat, L<S> toks, Matches matches) {
  L<S> tokpat = parse3_cachedPattern(pat);
  ret match3(tokpat, toks, matches);
}

static boolean match3(L<S> tokpat, L<S> toks, Matches matches) {
  S[] m = match2(tokpat, toks);
  //print(structure(tokpat) + " on " + structure(toks) + " => " + structure(m));
  if (m == null) false;
  if (matches != null) matches.m = m; true;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 22 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, mqsvbyillbrs, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001104
Snippet name: match3 function
Eternal ID of this version: #1001104/5
Text MD5: f2c0818bd4f3b345276012df89ec1ede
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-11 13:35:26
Source code size: 633 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 895 / 7442
Version history: 4 change(s)
Referenced in: [show references]