Libraryless. Click here for Pure Java version (3132L/20K).
1 | // use "*" as wildcard |
2 | static LLS positionalTokenIndex2_matchAll_returnTokenizations(S pat, PositionalTokenIndex2 idx) { |
3 | LS tokPat = wordTok_plusAsterisk(pat); |
4 | // get raw list from index |
5 | LLS list = positionalTokenIndex2_filter(idx, tokPat); |
6 | new LLS out; |
7 | if (list == null) ret out; |
8 | int n = l(tokPat), nAsterisks = countAsteriskTokens(tokPat); |
9 | search: for (LS tok : list) { |
10 | int iVars = 0; |
11 | for (int i = 1; i < n; i += 2) { |
12 | S t = tokPat.get(i); |
13 | if (!t.equals("*") && !eqic(t, tok.get(i))) |
14 | continue search; |
15 | } |
16 | out.add(tok); |
17 | } |
18 | ret out; |
19 | } |
Began life as a copy of #1025705
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025709 |
Snippet name: | positionalTokenIndex2_matchAll_returnTokenizations |
Eternal ID of this version: | #1025709/3 |
Text MD5: | e5f5fe9e099d73a67a7328e38fb4bc61 |
Transpilation MD5: | b4b70286f6c351ae48d0beba93ba2c5a |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-14 14:08:01 |
Source code size: | 602 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 188 / 281 |
Version history: | 2 change(s) |
Referenced in: | [show references] |