Libraryless. Click here for Pure Java version (3070L/21K/68K).
!7 p { File f = loadLibrary(#1200000); L<S> names = endingWithIC(".ctx", listFilesInZip(f)); int good = 0, bad = 0; for (S name : names) { L<S> lines = lines(loadTextFileFromZip(f, name)); print(name + ": " + n(lines, "lines")); L<S> rules = [S s : lines | javaTokC(s).contains("RULE")]; for (S rule : rules) { Explain e = explain(rule, ctxParsingRules(), "rule"); bool ok = e != null; if (ok) ++good; else ++bad; if (!ok) print(" " + (ok ? "OK RULE" : "BAD RULE") + ": " + rule); } } print(); print("Good rules: " + good + ", bad rules: " + bad); }
Began life as a copy of #1008832
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: | #1008834 |
Snippet name: | List .ctx files + find rules in woody zip |
Eternal ID of this version: | #1008834/10 |
Text MD5: | 2d8e52758e29e3ff4ea324a631dbcf17 |
Transpilation MD5: | 1fc924a518c94c4ba0f457c5b9798136 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-10 15:32:52 |
Source code size: | 637 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 628 / 762 |
Version history: | 9 change(s) |
Referenced in: | #1008838 - ctxFindRules |