[mercury-users] term / term_io / varset

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 29 10:23:08 AEST 2001


On 28-Mar-2001, Tomas By <T.By at dcs.shef.ac.uk> wrote:
> I'm trying to use the Mercury parser to read Prolog code, and I'm
> having problems with anonymous variables. It seems they are renamed
> to `V_'number - what is the recommended way to find out if a
> `term__var' is anonymous?

`parser__read_term' does not give them names.  If you call
`varset__lookup_name' on an unnamed variable, it will use the "V_%d" form.
But the solution to that is just don't use `varset__lookup_name' -- instead,
you should use `varset__search_name'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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