tags: fix regex passed to etags
PATCH 1/1 tags: fix regex passed to etags
Several of the regular expressions passed to etags where incorrect and missing the backslash before the closing parenthesis, causing warning:
etags: Unmatched ( or \( while compiling pattern
scripts/tags.sh +21 -21
@@ -178,27 +178,27 @@ emacs() --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' + --regex='/PAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex='/PAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex='/PAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex='/TESTSETFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTPAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex='/SETPAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex='/__SETPAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex='/TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/CLEARPAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/__PAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex='/__PAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/PAGEFLAG_FALSE\(([^,)]*\).*/Page\1/' \ + --regex='/TESTSCFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTSCFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/SETPAGEFLAG_NOOP\(([^,)]*\).*/SetPage\1/' \ + --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/TESTCLEARFLAG_FALSE\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*\).*/__TestClearPage\1/' all_kconfigs | xargs $1 -a \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Quoted 6 lines · Stephen Hemminger
Several of the regular expressions passed to etags where incorrect and missing the backslash before the closing parenthesis, causing warning:
etags: Unmatched ( or \( while compiling patternSigned-off-by Stephen Hemminger <[email protected]>
I'm confused how ctags didn't complain at me. It worked for me when I tried it. Next time I'll try both. Thanks.
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Quoted 11 lines · On Fri, 03 Feb 2012 11:42:53 -0800 Stephen Boyd <[email protected]> wrote:
Quoted 6 lines · Stephen Hemminger
Several of the regular expressions passed to etags where incorrect and missing the backslash before the closing parenthesis, causing warning:
etags: Unmatched ( or \( while compiling patternSigned-off-by Stephen Hemminger <[email protected]>I'm confused how ctags didn't complain at me. It worked for me when I tried it. Next time I'll try both. Thanks.
Most likely a new check in newer version of the tags command.
Quoted 9 lines
Quoted 6 lines · On Fri, 03 Feb 2012 11:42:53 -0800 Stephen Boyd <[email protected]> wrote:
Quoted 2 lines · Stephen Hemminger
Several of the regular expressions passed to etags where incorrect and missing the backslash before the closing parenthesis, causing
warning:
Quoted 2 lines
etags: Unmatched ( or \( while compiling pattern
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Stephen Hemminger <[email protected]>I'm confused how ctags didn't complain at me. It worked for me when I tried it. Next time I'll try both. Thanks.
Most likely a new check in newer version of the tags command.
Actually it looks like ctags also needs the fix. Can you resend with both etags and ctags fixed?
PATCH 1/1 tags: fix regex passed to etags and ctags
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, causing warning:
etags: Unmatched ( or \( while compiling pattern
---
v2 - cover all regex (not just etags)
scripts/tags.sh +45 -45
@@ -130,30 +130,30 @@ exuberant() -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ --extra=+f --c-kinds=+px \ --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ - --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ - --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \ - --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' + --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*\).*/sys_\1/' \ + --regex-c++='/^TRACE_EVENT\(([^,)]*\).*/trace_\1/' \ + --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*\).*/trace_\1/' \ + --regex-c++='/PAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex-c++='/PAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex-c++='/PAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/TESTSETFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex-c++='/TESTPAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex-c++='/SETPAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex-c++='/__SETPAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex-c++='/TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/__TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/CLEARPAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/__CLEARPAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/__PAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex-c++='/__PAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/PAGEFLAG_FALSE\(([^,)]*\).*/Page\1/' \ + --regex-c++='/TESTSCFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex-c++='/TESTSCFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*\).*/SetPage\1/' \ + --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*\).*/__TestClearPage\1/' all_kconfigs | xargs $1 -a \ --langdef=kconfig --language-force=kconfig \
@@ -178,27 +178,27 @@ emacs() --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' + --regex='/PAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex='/PAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex='/PAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex='/TESTSETFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTPAGEFLAG\(([^,)]*\).*/Page\1/' \ + --regex='/SETPAGEFLAG\(([^,)]*\).*/SetPage\1/' \ + --regex='/__SETPAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex='/TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/CLEARPAGEFLAG\(([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/__PAGEFLAG\(([^,)]*\).*/__SetPage\1/' \ + --regex='/__PAGEFLAG\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/PAGEFLAG_FALSE\(([^,)]*\).*/Page\1/' \ + --regex='/TESTSCFLAG\(([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTSCFLAG\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/SETPAGEFLAG_NOOP\(([^,)]*\).*/SetPage\1/' \ + --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*\).*/__ClearPage\1/' \ + --regex='/TESTCLEARFLAG_FALSE\(([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*\).*/__TestClearPage\1/' all_kconfigs | xargs $1 -a \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Re: [PATCH] tags: fix regex passed to etags and ctags
Quoted 9 lines · Stephen Hemminger
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, causing warning:
etags: Unmatched ( or \( while compiling patternSigned-off-by Stephen Hemminger <[email protected]>---
v2 - cover all regex (not just etags)
Ok one more problem (my eyes hurt with all these parentheses).
--regex-c++='/PAGEFLAG\(([^,)]*\).*/Page\1/'
should be
--regex-c++='/PAGEFLAG(\([^,)]*\).*/Page\1/'
so that PAGEFLAG(Foo, ...) becomes PageFoo and not Page(Foo
After that:
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH 1/1 tags: fix use of parenthesis in regex
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, and matching the wrong part of the start of the function causing warning:
etags: Unmatched ( or \( while compiling pattern
---
v2 - cover all regex (not just etags)
v3 - fix match at start of function args
scripts/tags.sh +46 -46
@@ -129,31 +129,31 @@ exuberant() -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ --extra=+f --c-kinds=+px \ - --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ - --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ - --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \ - --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' + --regex-asm='/^(ENTRY|_GLOBAL)(\([^)]*)\).*/\2/' \ + --regex-c='/^SYSCALL_DEFINE[[:digit:]]?(\([^,)]*\).*/sys_\1/' \ + --regex-c++='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ + --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*\).*/trace_\1/' \ + --regex-c++='/PAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex-c++='/PAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex-c++='/PAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/TESTSETFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex-c++='/TESTPAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex-c++='/SETPAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex-c++='/__SETPAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex-c++='/TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/__TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/CLEARPAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/__CLEARPAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/__PAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex-c++='/__PAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/PAGEFLAG_FALSE(\([^,)]*\).*/Page\1/' \ + --regex-c++='/TESTSCFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex-c++='/TESTSCFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/SETPAGEFLAG_NOOP(\([^,)]*\).*/SetPage\1/' \ + --regex-c++='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \ + --regex-c++='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ + --regex-c++='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ + --regex-c++='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' all_kconfigs | xargs $1 -a \ --langdef=kconfig --language-force=kconfig \
@@ -178,27 +178,27 @@ emacs() --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' + --regex='/PAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/TESTSETFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTPAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/SETPAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/__SETPAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/CLEARPAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/PAGEFLAG_FALSE(\([^,)]*\).*/Page\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/SETPAGEFLAG_NOOP(\([^,)]*\).*/SetPage\1/' \ + --regex='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' all_kconfigs | xargs $1 -a \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Re: [PATCH] tags: fix use of parenthesis in regex
Quoted 7 lines · Stephen Hemminger
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, and matching the wrong part of the start of the function causing warning:
etags: Unmatched ( or \( while compiling patternSigned-off-by Stephen Hemminger <[email protected]>
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH] tags: fix use of parenthesis in regex
In reply to Stephen HemmingerQuoted 4 lines · Stephen Hemminger
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, and matching the wrong part of the start of the function causing warning:
etags: Unmatched ( or \( while compiling pattern
But your patch introduces another imbalances, e.g.
Quoted 1 line
(quoted diff) +0
-0@@ -129,31 +129,31 @@ exuberant()
...
Quoted 1 line
scripts/tags.sh +0
-1- --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \
...
scripts/tags.sh exuberant() · line 134
Quoted 1 line
scripts/tags.sh +1
-0+ --regex-c++='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
The old version had left paren, start of group, ..., end of group The new version has start of group, left paren, ..., right paren
Where left / right paren means the character without any special
meaning. I actually can't see anything wrong with the old TRACE_EVENT matching, the regular expression is correct and I think it does what it should do (turn TRACE_EVENT(foo) into trace_foo).
Below is the full list of warnings I get from
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Addresses: <[email protected]>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex
GEN tags
ctags: Warning: regcomp ^SYSCALL_DEFINE[[:digit:]]?(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^TRACE_EVENT(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^DEFINE_EVENT\([^,)]*, *([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSETFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
The same list repeats, as ctags is called multiple times.
Michal
Re: [PATCH] tags: fix use of parenthesis in regex
Quoted 55 lines · On Sat, 25 Feb 2012 01:34:12 +0100 Michal Marek <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, and matching the wrong part of the start of the function causing warning:
etags: Unmatched ( or \( while compiling patternBut your patch introduces another imbalances, e.g.
Quoted 1 line
(quoted diff) +0
-0@@ -129,31 +129,31 @@ exuberant()...
Quoted 1 line
scripts/tags.sh +0
-1- --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \...
scripts/tags.sh exuberant() · line 134
Quoted 1 line
scripts/tags.sh +1
-0+ --regex-c++='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \The old version had left paren, start of group, ..., end of group The new version has start of group, left paren, ..., right paren
Where left / right paren means the character without any special
meaning. I actually can't see anything wrong with the oldTRACE_EVENTmatching, the regular expression is correct and I think it does what it should do (turnTRACE_EVENT(foo)intotrace_foo).Below is the full list of warnings I get from
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Addresses: <[email protected]>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regexGEN tags
ctags: Warning: regcomp ^SYSCALL_DEFINE[[:digit:]]?(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^TRACE_EVENT(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^DEFINE_EVENT\([^,)]*, *([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSETFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
Quoted 3 lines
The same list repeats, as ctags is called multiple times.
Michal
The problem is that in proper regex each start of sub-expression \( needs to have a matching end of sub-expression \)
The old version had no matching-end of sub-expression and therefore was technically malformed, probably old tools just ignored it.
--regex='/PAGEFLAG\(([^,)]*).*/Page\1/'
^
start but no end?
My initial patch just fixed those, but others kept wanting more.
Re: [PATCH] tags: fix use of parenthesis in regex
Dne 25.2.2012 01:56, Stephen Hemminger napsal(a):
Quoted 58 lines
Quoted 55 lines · On Sat, 25 Feb 2012 01:34:12 +0100 Michal Marek <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
Several of the regular expressions passed to etags and ctags where incorrect and missing the backslash before the closing paren, and matching the wrong part of the start of the function causing warning:
etags: Unmatched ( or \( while compiling patternBut your patch introduces another imbalances, e.g.
Quoted 1 line
(quoted diff) +0
-0@@ -129,31 +129,31 @@ exuberant()...
Quoted 1 line
scripts/tags.sh +0
-1- --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \...
scripts/tags.sh exuberant() · line 134
Quoted 1 line
scripts/tags.sh +1
-0+ --regex-c++='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \The old version had left paren, start of group, ..., end of group The new version has start of group, left paren, ..., right paren
Where left / right paren means the character without any special
meaning. I actually can't see anything wrong with the oldTRACE_EVENTmatching, the regular expression is correct and I think it does what it should do (turnTRACE_EVENT(foo)intotrace_foo).Below is the full list of warnings I get from
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Addresses: <[email protected]>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regexGEN tags
ctags: Warning: regcomp ^SYSCALL_DEFINE[[:digit:]]?(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^TRACE_EVENT(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp ^DEFINE_EVENT\([^,)]*, *([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSETFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __SETPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __PAGEFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp PAGEFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTSCFLAG(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp SETPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __CLEARPAGEFLAG_NOOP(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
ctags: Warning: regcomp __TESTCLEARFLAG_FALSE(\([^,)]*\).*: Unmatched ( or \(
Quoted 6 lines
Quoted 3 lines
The same list repeats, as ctags is called multiple times.
Michal
The problem is that in proper regex each start of sub-expression \( needs to have a matching end of sub-expression \)
But both *tags programs expect extended regexps, where \( is not start of sub-expression, but a verbatim left paren. So you balanced verbatim parens (which was not necessary, as the right paren is eaten by the trailing .*) and broke expression grouping.
Michal