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   

Travelled to 17 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, mqsvbyillbrs, onxytkatvevr, sawdedvomwva, tslmcundralx, tvejysmllsmz, 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: 602 / 7036
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001104 & http://1001104.tinybrain.de