[m-users.] alternate pairs syntax?

Matthias G├╝demann matthias.guedemann at googlemail.com
Tue Nov 10 07:07:57 AEDT 2015

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


More information about the users mailing list