[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-mode imenu: Stack overflow in regexp matcher
From: |
Kim F. Storm |
Subject: |
Re: c-mode imenu: Stack overflow in regexp matcher |
Date: |
Wed, 07 Feb 2007 16:22:41 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> This will do it:
>
>> (goto-char (point-max))
>> (re-search-backward "^\\<[^()]*[^[:alnum:]_:<>~]")
>
>> It matches the whole of etc/splash.xpm from "static char..." right
>> through to the end, some 60000 odd characters later.
>
> Good, thanks. Then now we have to find someone who knows what the regexp is
> supposed to match, so as to figure out how to rewrite it.
progmodes/cc-menus.el:
(defvar cc-imenu-c++-generic-expression
...
;; General function name regexp
(nil
,(concat
"^\\<" ; line MUST start with word char
"[^()]*" ; no parentheses before
"[^" c-alnum "_:<>~]" ; match any non-identifier char
"\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
"\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list
"\\([ \t\n]\\|\\\\\n\\)*\\([^ \t\n(*][^)]*\\)?)" ; must not start
"\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]" ; with an asterisk or parentheses
) 1)
--
Kim F. Storm <address@hidden> http://www.cua.dk
- c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Chong Yidong, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/02
- Re: c-mode imenu: Stack overflow in regexp matcher, Stefan Monnier, 2007/02/04
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/06
- Re: c-mode imenu: Stack overflow in regexp matcher, Stefan Monnier, 2007/02/07
- Re: c-mode imenu: Stack overflow in regexp matcher,
Kim F. Storm <=
- Re: c-mode imenu: Stack overflow in regexp matcher, Stefan Monnier, 2007/02/07
- Re: c-mode imenu: Stack overflow in regexp matcher, Glenn Morris, 2007/02/19
- Re: c-mode imenu: Stack overflow in regexp matcher, Nick Roberts, 2007/02/19