1 | sbool match4_debug; |
2 | |
3 | static bool match4(S pat, S s) { |
4 | L<S> tokpat = javaTok(pat); |
5 | jfind_preprocess(tokpat); |
6 | dropPunctuation(tokpat); |
7 | L<S> tok = dropPunctuation(javaTok(s)); |
8 | if (match4_debug) |
9 | print("match4: " + tokpat + " / " + tok); |
10 | if (l(tok) != l(tokpat)) { |
11 | if (match4_debug) print("match4: length mismatch"); |
12 | false; |
13 | } |
14 | int i = jfind(tokpat, tok); |
15 | if (match4_debug) print("match4: jfind=" + i); |
16 | ret i == 1; |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007567 |
Snippet name: | match4 - ignore punctuation, support <int> etc. [dev.] |
Eternal ID of this version: | #1007567/3 |
Text MD5: | 9ec7d488e926f3cebf205c75cb92e50e |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-27 01:41:24 |
Source code size: | 457 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 445 / 484 |
Version history: | 2 change(s) |
Referenced in: | [show references] |