Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1005497 // testParse + parseToOptions using unrollOptions

JavaX fragment (include)

1  
svoid testParse(S s) {
2  
  print("** \* s */ **");
3  
  print();
4  
  Concept parsed = parseToOptions(s);
5  
  print("Parse concept graph size: " + conceptGraphSize(parsed));
6  
  L<Concept> l = unrollOptions(parsed);
7  
  for i over l: {
8  
    Concept x = l.get(i);
9  
    bool prop = properSentence(x);
10  
    print((prop ? "! " : "") + (i+1) + ". " + structureConcept(x));
11  
  }
12  
  print();
13  
}
14  
15  
static Concept parseToOptions(S s) {
16  
  new L<Concept> l;
17  
  parse(s, listCollector(l));
18  
  ret options(l);
19  
}

Author comment

Began life as a copy of #1005484

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005497
Snippet name: testParse + parseToOptions using unrollOptions
Eternal ID of this version: #1005497/1
Text MD5: aa5672252ebfb1a4d6c582e5b4f97ec8
Author: stefan
Category: javax / concepts / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-24 00:23:13
Source code size: 493 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 580 / 1078
Referenced in: [show references]