Libraryless. Click here for Pure Java version (3070L/21K/68K).
1 | !7 |
2 | |
3 | p {
|
4 | File f = loadLibrary(#1200000); |
5 | L<S> names = endingWithIC(".ctx", listFilesInZip(f));
|
6 | int good = 0, bad = 0; |
7 | for (S name : names) {
|
8 | L<S> lines = lines(loadTextFileFromZip(f, name)); |
9 | print(name + ": " + n(lines, "lines")); |
10 | L<S> rules = [S s : lines | javaTokC(s).contains("RULE")];
|
11 | for (S rule : rules) {
|
12 | Explain e = explain(rule, ctxParsingRules(), "rule"); |
13 | bool ok = e != null; |
14 | if (ok) ++good; else ++bad; |
15 | if (!ok) |
16 | print(" " + (ok ? "OK RULE" : "BAD RULE") + ": " + rule);
|
17 | } |
18 | } |
19 | print(); |
20 | print("Good rules: " + good + ", bad rules: " + bad);
|
21 | } |
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: | 874 / 1050 |
| Version history: | 9 change(s) |
| Referenced in: | [show references] |