comparison lisp/progmodes/cc-menus.el @ 79114:5a26fd1686ae

(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
author Glenn Morris <rgm@gnu.org>
date Wed, 17 Oct 2007 01:36:24 +0000
parents c1ec1c8a8d2e
children a1342e6e097a 1251cabc40b7
comparison
equal deleted inserted replaced
79113:72e8c1dc7591 79114:5a26fd1686ae
104 ) 1) 104 ) 1)
105 ;; General function name regexp 105 ;; General function name regexp
106 (nil 106 (nil
107 ,(concat 107 ,(concat
108 "^\\<" ; line MUST start with word char 108 "^\\<" ; line MUST start with word char
109 "[^()]*" ; no parentheses before 109 ;; \n added to prevent overflow in regexp matcher.
110 ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html
111 "[^()\n]*" ; no parentheses before
110 "[^" c-alnum "_:<>~]" ; match any non-identifier char 112 "[^" c-alnum "_:<>~]" ; match any non-identifier char
111 "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name 113 "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
112 "\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list 114 "\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list
113 "\\([ \t\n]\\|\\\\\n\\)*\\([^ \t\n(*][^)]*\\)?)" ; must not start 115 "\\([ \t\n]\\|\\\\\n\\)*\\([^ \t\n(*][^)]*\\)?)" ; must not start
114 "\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]" ; with an asterisk or parentheses 116 "\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]" ; with an asterisk or parentheses