[m-users.] Funny syntax in xml.parse.m

Volker Wysk post at volker-wysk.de
Fri Jun 24 04:36:23 AEST 2022


Hi

In xml.parse.m in the XML library there are a lot of constructs like this:

xmlDecl -->
    lit("<?xml")        then (pred(_::in, pdi, puo) is det -->
    versionInfo         then (pred(_::in, pdi, puo) is det -->
    opt(encodingDecl)   then (pred(MEnc::in, pdi, puo) is det -->
    opt(sdDecl)         then (pred(_::in, pdi, puo) is det -->
...

There's no "if" or "else" corresponding to the "then"'s. Can someone tell me
what this syntax is called? I couldn't find it documented in the sections
2.13/2.14 about DCGs, in the language reference manual.

Bye,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220623/c7116266/attachment.sig>


More information about the users mailing list