[mercury-users] mtags, .int files and vim
John Eikenberry
jae at zhar.net
Sat Dec 16 10:19:51 AEDT 2000
There seems to be an incompatibility in the way mtags generates tag files
for the .int files... at least in respect to Vim.
For example, here's a line from random.int and the corresponding tags line
(generated via 'mtags --ext /usr/lib/mercury/ints/random.int'):
:- pred random:random(int, (random:supply), (random:supply)).
random:random /usr/lib/mercury/ints/random.int /^:- pred \
random:random(int, (random:supply), (random:supply)).$/;-;/random:random/
The problem is in the predicate name generated in the tags file. When the
tag name contains a colon like this, it is categorized by Vim as a 'static tag'
with the following format:
2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
The restriction on this format is that the 2 occurances of the tagfile must be
exactly the same. As you can see, they are not. This causes Vim to fail in
finding the tag when trying to jump to it.
I'm fairly new to tags and very new to mercury, so I'm not positive, but it
seems like the way to correct this would be to strip the module name from the
tag name with mtags. Maybe adding something like...
$name =~ s/[\w]+://;
to the output_name funtion near the beginning, right after the other $name
handling regex patterns.
BTW, this is using Mercury-0.9.1 on Debian GNU/Linux. I also looked at the
mtags in the snapshot releases, and they still had this 'problem'.
Thanks in advance for any feedback.
--
John Eikenberry
[jae at zhar.net - http://zhar.net]
______________________________________________________________
"A society that will trade a little liberty for a little order
will deserve neither and lose both."
--B. Franklin
--------------------------------------------------------------------------
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