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

19
LINES

< > BotCompany Repo | #1021555 // gazelle_parseInstruction

JavaX fragment (include)

svoid gazelle_parseInstruction(RuleEngine2.SimplifyWithRule r) {
  new Matches m;
  S s = r.text;
  if "simplify with *"
    ret with r._function = $1;
  else if "simplify with * on tree" {
    r.callOnTree = true;
    ret with r._function = $1;
  } else if "drop after word *" {
    fS word = $1;
    ret with r._function = func(S s) { tok_dropStartingWithWord(word, s) };
  } else if "group words *" {
    fS words = $1;
    ret with r._function = func(S s) { tok_groupPhrase(s, words) };
  } else if "split with *" {
    r.isSplitRule = true;
    ret with r._function = $1;
  }
}

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: 370 / 398
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)