1 | abstract sclass PartialAttractor implements Runnable { |
2 | VF1<PartialAttractor> action; |
3 | |
4 | LS tok; |
5 | IntRange matchedRange; |
6 | |
7 | public abstract bool find(); // uses tok |
8 | public void run { callF(action, this); } |
9 | |
10 | toString { ret standard_toString(this); } |
11 | |
12 | bool acceptFull() { |
13 | matchedRange = intRange(0, l(tok)); |
14 | true; |
15 | } |
16 | |
17 | S matchedString() { |
18 | ret joinSubList(tok, matchedRange); |
19 | } |
20 | |
21 | LS tok() { |
22 | ret subList(tok, matchedRange); |
23 | } |
24 | } |
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: | #1022866 |
Snippet name: | PartialAttractor [advanced attractor matching just a part of the input] |
Eternal ID of this version: | #1022866/2 |
Text MD5: | 682f938d16ab7f53313c7ad2ed6d588d |
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:29:14 |
Source code size: | 489 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 320 / 764 |
Version history: | 1 change(s) |
Referenced in: | [show references] |