<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Not according to the documentation I’ve read. It has an imaginary `transform` function for the purpose of explanation. It -is- just a standard call though, the file calculator.m in the samples folder has been my main source of guidance, as well as gratuitous grep-ping of the source for the release I am using, 20.6.1<div class=""><br class=""></div><div class="">In the end I made it `set` like this, I don’t see why skipping whitespace should fail anyway, if it isn’t there then the next part of the calling rule can deal with it!</div><div class=""><br class=""></div><div class="">:- pred skip_ws(list(char)::in, list(char)::out) is det.<br class=""><br class=""><font face="Courier" class="">skip_ws(In, Out) :-<br class="">    trace[io(!S), run_time(env("FELT_DBG"))]<br class="">    (io.format("skip_ws: ",[],!S),<br class="">     io.print_line(In,!S)<br class="">    ),<br class="">    ( if [C|Cs] = In then<br class="">        ( list.member(C, [' ', '\t']) -><br class="">            skip_ws(Cs, Out)<br class="">        ;<br class="">            Out =In<br class="">        )<br class="">        else<br class="">            Out = In<br class="">    ).</font></div><div class=""><br class=""></div><div class="">This seems to work and I hope I understand why. It’s ugly, I will work on it some more, here is the output for a trial from the console:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">{16:25}~/Documents/code/mercury/f2:repl-start ✗ ➭ ./felt -r  <br class="">DBUG> checking error mode: plain<br class="">DBUG> checking target language: c<br class="">DBUG> ** felt_options:<br class="">two(error_mode, maybe_string(yes("plain")), two(targets, bool(no), three(help, bool(no), version, bool(no), empty, empty, empty), two(target, maybe_string(yes("c")), empty, empty)), two(syntax_check, bool(no), three(output_file, maybe_string(yes("-")), wrap_code, bool(no), empty, empty, empty), two(repl, bool(yes), empty, empty)))<br class="">DBUG> ** Files:<br class="">[]<br class="">REPL ARGS<br class="">[]<br class="">FELT ➭ help                <br class="">['h', 'e', 'l', 'p', ' ', '\t', '\t', ' ', ' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: [' ', '\t', '\t', ' ', ' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: ['\t', '\t', ' ', ' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: ['\t', ' ', ' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: [' ', ' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: [' ', ' ', '\t', '\t', '\n']<br class="">skip_ws: [' ', '\t', '\t', '\n']<br class="">skip_ws: ['\t', '\t', '\n']<br class="">skip_ws: ['\t', '\n']<br class="">skip_ws: ['\n']<br class="">FELT ➭  Got a command:<br class="">help<br class="">FELT ➭ ^D<br class="">FELT ➭ Be excellent to one another.<br class="">{16:25}~/Documents/code/mercury/f2:repl-start ✗ ➭ </font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks Volker for the input.</div><div class="">Sean.</div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 8 May 2021, at 16:14, Volker Wysk <<a href="mailto:post@volker-wysk.de" class="">post@volker-wysk.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi!<br class=""><br class="">In Prolog, it's the rule to call a DCG rule via the "phrase" predicate. It's<br class="">not clear what it does. In Mercury, the normal way seems to be to directly<br class="">call the DCG rule. Since a DCG rule is just a regular predicate in both<br class="">cases, this ought to work.<br class=""><br class="">Is there an equivalent for Prolog's "phrase" in Mercury?<br class=""><br class="">Bye,<br class="">Volker<br class="">_______________________________________________<br class="">users mailing list<br class=""><a href="mailto:users@lists.mercurylang.org" class="">users@lists.mercurylang.org</a><br class="">https://lists.mercurylang.org/listinfo/users<br class=""></div></div></blockquote></div><br class=""></div></body></html>