* General comment searching?
@ 2002-07-25 16:33 Douglas Lewan
0 siblings, 0 replies; only message in thread
From: Douglas Lewan @ 2002-07-25 16:33 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
Hi,
I'd like to have search/match code that recognizes comments in a variety of
languages (C, perl, lisp, etc.).
My natural inclination would to write a regular expression based on the
syntax of the characters that make up comments in the style of, say, "\\s-+"
for whitespace. That is, I would like a single regular expression to match
both
1. "(*" in Pascal as a comment start and
2. "/*" in C as a comment start.
I can't see any way to get at the comment information for, say, "/" in C
since it's not in the syntax _class_, but hidden in the flags.
Can anyone help me?
Thanks.
Hi,
The introduction of (pop-tag-mark) in emacs 20 answered a real need for me
(and I assume many, many others).
It is clearly great for traversing back up a stack I've already traversed
down, but sometimes I want to go the other way around: Find possible
callers of a function. To that end I've written a simple (tag-come-from)
function that wraps (grep) with a bit of tag-relevant code. (The code for
(tag-come-from) can be found below.)
By and large it works well, but occasionally it leaves a inappropriate match
in the *grep* buffer. For example, looking for uses of that tag 'main' I
normally get in part:
...
miner_peer.c:289:main(int argc, char **argv) {
MultiBucket.c:49: int remainder[MAXBKTS];
rmipc.c:27:main(int argc, char **argv)
...
The word "remainder" should not be there even though many unwanted matches
are in fact eliminated.
Sounds like an opportunity for debugging, but in either the "ordinary
debugger" or Edebug the right thing happens, i.e. "remainder" is eliminated.
Further, if I uncomment the line marked with the arrow below, the right
thing happens too.
Have I done something wrong? Am I missing something? Is there a bug to
report here? (And just what would it be?)
Thanks in advance.
,Doug
Douglas Lewan
ADIR Technologies
732 836 3916
dlewan@adirtech.com
The legal department has requested that this message appear as a footnote to
all e-mails sent from my computer.
This e-mail and attachments, if any, may contain confidential and/or
proprietary information. Please be advised that the unauthorized use or
disclosure of the information is strictly prohibited. If you are not the
intended recipient, please notify the sender immediately by reply e-mail and
delete all copies of this message and attachments. Thank you.
[-- Attachment #2: Type: text/html, Size: 3733 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-25 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-25 16:33 General comment searching? Douglas Lewan
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.