Libraryless. Click here for Pure Java version (11535L/81K).
1 | static Scorer ai_runNLParserTests() { |
2 | new Scorer scorer; |
3 | scorer.verboseAll = true; |
4 | LPairS tests = mL_pairs_tlftj(ai_language() + " Parser Tests"); |
5 | if (empty(tests)) print("Have no parser tests for " + ai_language()); |
6 | fOr (PairS p : tests) { |
7 | print(p.a); |
8 | AI_BottomUpParser1 parser = ai_standardBUParserForCurrentLanguage(); |
9 | parser.parse(p.a); |
10 | Set<S> classes = asCISet(parser.fullClasses()); |
11 | print("Classes: " + classes); |
12 | for (S c : tok_splitAtComma(p.b)) |
13 | scorer.add(contains(classes, angleBracket(dropPrefix("!", c))) == !startsWith(c, "!"), c); |
14 | } |
15 | ret scorer; |
16 | } |
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: | #1023819 |
Snippet name: | ai_runNLParserTests (for current language) |
Eternal ID of this version: | #1023819/7 |
Text MD5: | d688ad5bda303df44c8d2101345248e6 |
Transpilation MD5: | 794dba3367088dcf7d6237acec78b4b3 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-09 13:55:53 |
Source code size: | 618 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 186 / 280 |
Version history: | 6 change(s) |
Referenced in: | [show references] |