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

18
LINES

< > BotCompany Repo | #1022862 // PDefaultAttractor + PFind3Attractor

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2055L/13K).

// attracts everything
sclass PDefaultAttractor > PartialAttractor {
  public bool find() {
    ret acceptFull();
  }
}

// uses find3
sclass PFind3Attractor > PartialAttractor {
  S pattern;
  
  *(S *pattern) {}

  public bool find() {
    matchedRange = find2_range(pattern, tok);
    ret matchedRange != null;
  }
}

Author comment

Began life as a copy of #1022817

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: #1022862
Snippet name: PDefaultAttractor + PFind3Attractor
Eternal ID of this version: #1022862/12
Text MD5: 78945f3b3d5415d415e1c5332e1570e8
Transpilation MD5: f8c8e7c73dd199fc6ec28f9e4fcda35d
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 01:35:22
Source code size: 336 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 181 / 288
Version history: 11 change(s)
Referenced in: [show references]