Patchwork [pushed,gdb/contrib] Improve words extraction in words.sh script

login
register
mail settings
Submitter Simon Marchi (Code Review)
Date Nov. 22, 2019, 3:24 p.m.
Message ID <20191122152406.E1EF32816F@gnutoolchain-gerrit.osci.io>
Download mbox | patch
Permalink /patch/36112/
State New
Headers show

Comments

Simon Marchi (Code Review) - Nov. 22, 2019, 3:24 p.m.
Sourceware to Gerrit sync has submitted this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/655
......................................................................

[gdb/contrib] Improve words extraction in words.sh script

Remove more punctuation and quoting in words.sh script.

gdb/ChangeLog:

2019-11-22  Tom de Vries  <tdevries@suse.de>

	* contrib/words.sh: Improve words extraction.

Change-Id: I1d9eea165731af4e6c4e1c7e09aed9b07af6395c
---
M gdb/ChangeLog
M gdb/contrib/words.sh
2 files changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 25c63c7..93258c3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@ 
 2019-11-22  Tom de Vries  <tdevries@suse.de>
 
+	* contrib/words.sh: Improve words extraction.
+
+2019-11-22  Tom de Vries  <tdevries@suse.de>
+
 	* contrib/words.sh: Combine sed invocations.
 
 2019-11-21  Christian Biesinger  <cbiesinger@google.com>
diff --git a/gdb/contrib/words.sh b/gdb/contrib/words.sh
index 8c4fdd0..ec8bcd0 100755
--- a/gdb/contrib/words.sh
+++ b/gdb/contrib/words.sh
@@ -115,9 +115,10 @@ 
     -f "$awkfile" \
     -- "$@" \
     | sed \
-	  -e 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
+	  -e 's/[!"?;:%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
 	  -e 's/\[/\n/g' \
 	  -e 's/\]/\n/g' \
+	  -e "s/'/\n/g" \
 	  -e 's/[0-9][0-9]*/\n/g' \
 	  -e 's/[ \t]*//g' \
     | tr '[:upper:]' '[:lower:]' \