[mercury-users] Custom declarations and preprocessors.
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Tue Apr 18 08:30:19 AEST 2000
I note that Erlang has for many years supported "user directives".
Write
-Atom(String).
and the parser will check that it has the form dash, atom, lpar, string,
(or atom), rpar, dot, and what's more, it will include that in the abstract
syntax tree, making it easy for tools to pick this stuff up and look at it.
The snag is that the parser doesn't know anything about what's supposed to
be inside the string, so
-author('Fred Nurke').
-author('Nurke, Fred').
-author('fred').
-author('fn at picadilly').
-author('fn at picadilly.circus.co.uk').
-author('fn, ch, jf').
might all be used in the same project to refer to the same person
(with the last one referring to three people). So you get a false
sense of security. The compiler knows enough about it to accept good
annotations, but not enough to reject bad ones.
Has anyone thought about using the Dublin Core annotations for
indexing collections of Mercury documents?
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list