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

20
LINES

< > BotCompany Repo | #1002845 // Test Prolog with NL 2 (if-then)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (4676L/30K/96K).

1  
!752
2  
3  
static S code = [=[
4  
  
5  
  [if [yes] then [yeah]]
6  
  [yes]
7  
  
8  
]=];
9  
10  
p {
11  
  Lisp parsed = nlParse(code);
12  
  assertTrue("juxta", isJuxta(parsed));
13  
  print("ops: " + structure(snlSplitOps(parsed.get(0))));
14  
  
15  
  new Prolog p;
16  
  p.showStuff = true;
17  
  p.addClauses(parsed);
18  
  print("Program: " + structure_seen(p.program));
19  
  printStructure(p.solve(nlParse("yeah")));
20  
}

Author comment

Began life as a copy of #1002844

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: #1002845
Snippet name: Test Prolog with NL 2 (if-then)
Eternal ID of this version: #1002845/1
Text MD5: 7010fa1c4447ff5162787c3d0a995e89
Transpilation MD5: 18754a1d993e71ba2479b91b2dfa768f
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-03 02:35:50
Source code size: 383 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 618 / 667
Referenced in: [show references]