[m-users.] alternate pairs syntax?
nll at dent.vctlabs.com
nll at dent.vctlabs.com
Tue Nov 10 07:39:12 AEDT 2015
Thank you.
Indeed I missed that.
Nick Lockwood
On Mon, 9 Nov 2015, Matthias Güdemann wrote:
> Hi Nick,
>
>> The problem here is the usage of "->"
>
>> I cannot find in the documntation this operator used to express the
>> pair constructor. I expected to see some pairs defined in this
>> context. Is this another way to talk about pairs? or am I missing out
>> on what is going on?
>
> This seems to be the function '->' defined as follows
>
> ,----
> | % Utility operator to create lexemes.
> | %
> | :- func (T1 -> token_creator(Tok)) = pair(regexp, token_creator(Tok))
> | <= regexp(T1).
> `----
>
> in lex.m:192
>
> It is probably a bit unfortunate that is uses the same operator as the
> if-then-else.
>
> Matthias
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/users
More information about the users
mailing list