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

19
LINES

< > BotCompany Repo | #1021555 // gazelle_parseInstruction

JavaX fragment (include)

1  
svoid gazelle_parseInstruction(RuleEngine2.SimplifyWithRule r) {
2  
  new Matches m;
3  
  S s = r.text;
4  
  if "simplify with *"
5  
    ret with r._function = $1;
6  
  else if "simplify with * on tree" {
7  
    r.callOnTree = true;
8  
    ret with r._function = $1;
9  
  } else if "drop after word *" {
10  
    fS word = $1;
11  
    ret with r._function = func(S s) { tok_dropStartingWithWord(word, s) };
12  
  } else if "group words *" {
13  
    fS words = $1;
14  
    ret with r._function = func(S s) { tok_groupPhrase(s, words) };
15  
  } else if "split with *" {
16  
    r.isSplitRule = true;
17  
    ret with r._function = $1;
18  
  }
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021555
Snippet name: gazelle_parseInstruction
Eternal ID of this version: #1021555/6
Text MD5: e3b9a56683a2f5acb45feebc6ec62be9
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-18 16:54:12
Source code size: 600 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 252 / 283
Version history: 5 change(s)
Referenced in: [show references]