[m-dev.] EDCGs
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Dec 17 15:00:50 AEDT 1999
On 13-Dec-1999, Peter Nicholas MALKIN <pnmalk at cat.cs.mu.OZ.AU> wrote:
> Below is a proposed syntax for EDCGs (Extended Definite Clause Grammars).
Thanks for writing that up.
I'd be very interested to hear Peter Schachte's comments on how
this compares with his earlier "global variables" proposal.
I have a few comments on some of the specific details:
> For each HiddenVar the predicate declaration is extended with two (changed) or
> one (passed) additional argument, in the order the hidden variables are listed.
> The additional argument(s) have the Mercury type, as specified in the
> corresponding htype declaration for HiddenName. A predicate can be called
> with its hidden variables listed explicitly (only used for backwards
> compatability with DCGs, a warning message will be given if used).
Can you call a DCG from an EDCG or vice versa?
> There is no overloading allowed for predicates with hidden variables.
Hmm, that's a bit of a drawback.
And no type inference either.
Those appear to be the only major drawbacks.
Apart from that, this looks pretty good, IMHO.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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