[m-dev.] regular expressions
schachte at cs.mu.OZ.AU
schachte at cs.mu.OZ.AU
Mon Dec 20 23:15:19 AEDT 1999
On 18 Dec, Fergus Henderson wrote:
> On 17-Dec-1999, Michael Day <mcda at cat.cs.mu.OZ.AU> wrote:
>> The repeat0/repeat1 predicates
>> look nice.
>
> Actually you probably couldn't write it exactly like that in Mercury.
> It would need to be
>
> c_identifier --> letter, repeat0((pred(in, out) is semidet -->
> letter ; digit ; ['_'])).
Bummer.
>> I suppose it would be asking too much for them to be defined as
>> postfix * and + operators, respectively :)
>
> Yes, that conflicts with the use of * and + as infix operators.
But you could make them prefix operators, which wouldn't be too bad.
Until you had to do the explicit lambda-like thing.
--
Peter Schachte | I have made this a rather long letter
mailto:pets at cs.mu.OZ.AU | because I haven't had time to make it
http://www.cs.mu.oz.au/~pets/ | shorter.
PGP: finger pets at 128.250.37.3 | -- Blaise Pascal
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list