emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unquoted special characters in regexps


From: Luc Teirlinck
Subject: Re: Unquoted special characters in regexps
Date: Sat, 4 Mar 2006 17:16:40 -0600 (CST)

I believe that we should just decide whether there is a bug in the
regexp in question (which seems _nearly_ certain) and correct it if
so.  For people who use the Java debugger jdb (I do not know Java),
I summarize the problem, so there is no need to read through any of
the prior postings in this thread.

The regexp in question occurs in `gud-jdb-marker-filter' on line 2155
of progmodes/gud.el and is:

     "\\(\[[0-9]+\] \\)*\\([a-zA-Z0-9.$_]+\\)\\.[a-zA-Z0-9$_<>(),]+ \
\\(([a-zA-Z0-9.$_]+:\\|line=\\)\\([0-9.,]+\\)"

The problem is limited to the \\(\[[0-9]+\] \\)* part at the beginning.
According to the Change Logs, this part _seems_ to be used to
search/detect classpath information in jdb's output.

The regexp as given is valid.  But it looks like \\(\[[0-9]+\] \\)*
was actualy meant to mean \\(\\[[0-9]+] \\)*, since the author
seemingly forgot to double up `\' for Lisp syntax.

I do not know Java, so I have no way of knowing what the correct
syntax is.

According to the current regexp, it consists of a something that looks
like a sequence of integers written in base 11, where `[' bizarrely
stands for ten, separated and terminated by "] ".

The "obvious" correction \\(\\[[0-9]+] \\)* looks for a bunch of
decimal digits enclosed in square brackets separated by a space,
like "[1276] [0] ".

It seems that we should make the "obvious" correction, but it would
nevertheless be good if somebody who knows the syntax could confirm
this.

Sincerely,

Luc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]