GNU bug report logs -
#47408
Emacs etags support for Mercury [v0.2]
Previous Next
Reported by: fabrice nicol <fabrnicol <at> gmail.com>
Date: Fri, 26 Mar 2021 08:28:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Agreed. (But you may have more systematically explicit tags because of
this condition 2.)
The attached patch was tested, builds and runs OK. Replaces the former
one, is you stick to the option of modifying 's' by reference rather
than creating a copy.
Note: Prolog has a much simpler naming pattern, so differences are
normal. No need for explicit tagging in Prolog, see the call to
'make_tag' in Prolog support.
Fabrice
Le 14/06/2021 à 19:42, Eli Zaretskii a écrit :
>> Cc: 47408 <at> debbugs.gnu.org, pot <at> gnu.org
>> From: fabrice nicol <fabrnicol <at> gmail.com>
>> Date: Mon, 14 Jun 2021 19:10:53 +0200
>>
>> If you take a look at other languages that implement explicit tags (like
>> Fortran) you will see that there are buffers coming in to avoid having
>> 'name' and 'linestart' (1st and 4th arguments to 'make_tag') share a
>> same string pointer (here 's').
>>
>> This is explained in the header comment to 'make_tag':
>>
>> " 2. LINESTART contains name as either a rightmost, or rightmost but
>> * one character, substring;"
> This is just a condition for generating "implicitly named" tags.
> There's nothing wrong with having explicitly named tags, if there are
> good reasons for that.
>
>> When I applied you suggestion and tested, the TAGS base was as expected
>> accordingly: wrong.
> "Wrong" in what sense? Can you show an example of such a wrong tag?
> And how does Mercury differ from Prolog in this sense? prolog_pr
> doesn't allocate new strings before calling make_tag.
>
> Thanks.
[0001-Fix-explicit-tag-issue-with-Mercury-etags-ctags-supp-v2.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.