From: Eli Zaretskii <eliz@gnu.org>
To: fabrnicol@gmail.com
Cc: 47408@debbugs.gnu.org
Subject: bug#47408: Etags support for Mercury [v0.5]
Date: Thu, 10 Jun 2021 22:15:11 +0300 [thread overview]
Message-ID: <838s3hbkg0.fsf@gnu.org> (raw)
In-Reply-To: <83h7i5bpqq.fsf@gnu.org> (message from Eli Zaretskii on Thu, 10 Jun 2021 20:20:45 +0300)
> Date: Thu, 10 Jun 2021 20:20:45 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 47408@debbugs.gnu.org
>
> It should have been the job of mercury_pr to find the identifier
> itself within the line whose pointer it accepts as S, and pass only
> that to make_tag as NAME/NAMELEN arguments. I made a step in that
> direction, but it turns out I didn't go far enough. Feel free to
> propose improvements to the code I installed so as to identify the
> name of the identifier and nothing else, as other callers of make_tag
> do.
>
> > The issue seems to be located at the patch line below:
> >
> >
> > + char *name = skip_non_spaces (s + len0);
>
> The only problem with the above line is that it assumes there's only
> one non-space "word" before the identifier proper, whereas the example
> you show makes it clear there could be more than one. Which means the
> code might need to repeatedly skip these non-identifier words until we
> exhaust them all. I will look into fixing that (but I really prefer
> that you do it in my stead, as I don't know enough about the Mercury's
> syntax).
I think one way of solving this would be for mercury_decl to return
more information to the caller than it currently does. That function
already performs the necessary analysis of the line, and knows where
the real identifier is located within that line. But it doesn't
return that information to the caller. If it could return the pointer
to the beginning of the identifier and the length of the identifier,
it would allow mercury_pr to call make_tag correctly without doing
again what mercury_decl already did.
If you agree with this analysis, I'd be grateful if you could submit a
patch along these lines. TIA.
next prev parent reply other threads:[~2021-06-10 19:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <25b8baef-11f2-7079-69d8-3207a24658fc@gmail.com>
2021-03-26 7:09 ` bug#47408: Emacs etags support for Mercury [v0.2] fabrice nicol
2021-03-27 10:51 ` bug#47408: Etags support for Mercury [v0.3] fabrice nicol
2021-03-28 13:11 ` Eli Zaretskii
2021-03-28 15:49 ` fabrice nicol
2021-03-28 16:22 ` Eli Zaretskii
2021-03-29 11:53 ` bug#47408: Etags support for Mercury [v0.4] fabrice nicol
[not found] ` <70503251-f8ea-9006-b7e7-b13b93bb71de@gmail.com>
2021-05-15 8:31 ` bug#47408: Fwd: " Eli Zaretskii
[not found] ` <53162dfb-0715-3077-78d1-3a8340943f2f@gmail.com>
2021-05-29 8:01 ` Eli Zaretskii
[not found] ` <CANTSrJtDMu=4SWUcBRt51X8n42mOfB6_sFi8mNoZ0YgYdtE-DA@mail.gmail.com>
2021-05-29 10:22 ` Eli Zaretskii
2021-06-01 2:38 ` bug#47408: Etags support for Mercury [v0.5] fabrice nicol
2021-06-06 9:48 ` Eli Zaretskii
2021-06-06 13:34 ` fabrice nicol
2021-06-06 18:18 ` Francesco Potortì
2021-06-06 20:49 ` fabrice nicol
2021-06-06 21:04 ` Francesco Potortì
2021-06-07 12:13 ` Eli Zaretskii
2021-06-08 0:38 ` Fabrice Nicol
2021-06-08 10:53 ` Francesco Potortì
2021-06-08 11:47 ` Eli Zaretskii
2021-06-08 12:47 ` Francesco Potortì
2021-06-10 13:59 ` Eli Zaretskii
2021-06-10 16:52 ` fabrice nicol
2021-06-10 17:05 ` Francesco Potortì
2021-06-10 17:20 ` Eli Zaretskii
2021-06-10 19:15 ` Eli Zaretskii [this message]
2021-06-10 20:39 ` bug#47408: Etags support for Mercury -- fix explicit tags for existentially-quantified procedures fabrice nicol
2021-06-11 5:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838s3hbkg0.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=47408@debbugs.gnu.org \
--cc=fabrnicol@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.