AFAIK there was a discussion concerning problems (bugs?) concerning
\b in regexps with XEmacs - i thought David Ponce had also posted
something (do not know if a fix for sermantic or something else...)...
Just a pointer from me...
Thomas Geffert wrote:
> Eric M. Ludlam wrote:
>>>>> Thomas Geffert <tgf-news2003@...> seems to think that:
>>> I cannot get semantic to parse my C/C++ files correctly with XEmacs.
>> Punctuation symbols like HASH are placed into a punctuation symbol
>> table. In the case of C the hash regexp looks like this: "\\b[#]\\b"
>> This regexp is then spliced directly into the grammar for the C
>> language. (The wisent parser has a better mechanism.)
>> Two things to try as an experiment are these:
>> 1) Test the regexp:
>> * put cursor on the # in the #include.
>> * M-: (looking-at "\\b[#]\\b") RET
>> -- should return t
> This doesn't work, it returns nil. But it works on a =3D with M-:
> (looking-at "\\b[=3D]\\b") RET. But the equal sign is not recognized =
> the parser, too.
>> 2) Test string-match on the regexp.
>> * from anywhere in the C file
>> * M-: (string-match "\\b[#]\\b" "#") RET
>> -- should return 0
> It returns nil too, even width the # replaced by =3D .
> It works with (string-match "\\b[#]\\b" "x#x") which returns correctly
> 1, So it seems that \b doesn't recognize a word boundary on string
> The documentation of my Emacs21 explains \b in the same way as the
> XEmacs documentation, but adds:
>> `\b' matches at the beginning or end of the buffer regardless of
>> what text appears next to it.
> This sentence is missing in the XEmacs regexp documentation.
> I'm wondering if this doesn't work only with my XEmacs or if it is
> rather a general XEmacs problem.
> Do you have any ideas how to solve this problem?
> Thanks for your help,
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> cedet-semantic mailing list
From: Thomas Geffert <tgf-news2003@pa...> - 2005-01-06 08:52:37
> AFAIK there was a discussion concerning problems (bugs?) concerning
> \b in regexps with XEmacs - i thought David Ponce had also posted
> something (do not know if a fix for sermantic or something else...)...
> Just a pointer from me...
Thanks. I searched the web and mailing lists before, but obviously I
didn't use the right search terms. Now I found an answer from David
Ponce on the cedet mailing list ( see
The solution is to replace the problematic "\\b.\\b" by "\\`.\\'" in the
*.by files and rebuild the parser by "make by" in semantic/bovine. This
regexp should work on both Emacs and XEmacs.
Thank you for your help,