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

18
LINES

< > BotCompany Repo | #1022867 // PJFindAttractor

JavaX fragment (include)

// uses jfind (case-insensitive)
sclass PJFindAttractor > PartialAttractor {
  S pattern;
  TokCondition condition;
  S[] tokens;
  
  *(S *pattern) {}
  *(S *pattern, TokCondition *condition) {}

  public bool find() { 
    if (tokens == null)
      tokens = javaTokForJFind_array(pattern);
    int i = findCodeTokens(tok, 0, true, tokens, condition);
    if (i < 0) false;
    matchedRange = intRange(i, i+l(tokens)*2-1);
    true;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022867
Snippet name: PJFindAttractor
Eternal ID of this version: #1022867/4
Text MD5: 0bcc568e0d0c7898549ba6a7d4114645
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-12 16:38:51
Source code size: 456 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 226 / 669
Version history: 3 change(s)
Referenced in: [show references]