[m-users.] Warning: this disjunct will never have any solutions.
Sean Charles (emacstheviking)
objitsu at gmail.com
Fri May 28 06:31:25 AEST 2021
Is it safe to ignore this given I know why …my parsing code reaches a point where it knows a syntax error has been detected:
:- pred s_exp(anode::out, latok::in, latok::out) is nondet.
s_exp(X) -->
(
( op(_P) ->
expression_body(X),
( cp(_)
; error_pos(P),
{throw(syntax_error(P, expected_close_paren))}
)
;
error_pos(P),
{throw(syntax_error(P, expected_open_paren))}
)
).
I can see that throwing the exception does mean there can be no solution…I expect there is a compiler switch to silence it but I don’t like doing things like that… is there a Mercury-esque technique/approach etc that I have not yet learned about?
Thanks
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20210527/f0972a18/attachment.html>
More information about the users
mailing list