summaryrefslogtreecommitdiff
path: root/volk/gen/volk_regexp.py
diff options
context:
space:
mode:
authorTom Rondeau2011-08-27 16:44:32 -0400
committerTom Rondeau2011-08-27 16:44:32 -0400
commit54881f8803d4f796dde2af031e6f1a37df9445f1 (patch)
treeb1e4e6c34004f22a29c03815ed3ae49065693dce /volk/gen/volk_regexp.py
parent50cde24aea52d66d69313a490f7eab78a5085849 (diff)
parentf4cc7884c608a7ec1969e68b73e12cdbcc26145c (diff)
downloadgnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.gz
gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.bz2
gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.zip
Merge branch 'master' of gnuradio.org:gnuradio
Diffstat (limited to 'volk/gen/volk_regexp.py')
-rw-r--r--volk/gen/volk_regexp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/volk/gen/volk_regexp.py b/volk/gen/volk_regexp.py
new file mode 100644
index 000000000..b83ce5206
--- /dev/null
+++ b/volk/gen/volk_regexp.py
@@ -0,0 +1,14 @@
+import re
+import string
+
+remove_after_underscore = re.compile("_.*");
+space_remove = re.compile(" ");
+leading_space_remove = re.compile("^ *");
+replace_arch = re.compile(", const char\* arch");
+replace_bracket = re.compile(" {");
+replace_volk = re.compile("volk");
+
+def strip_trailing(tostrip, stripstr):
+ lindex = tostrip.rfind(stripstr)
+ tostrip = tostrip[0:lindex] + string.replace(tostrip[lindex:len(tostrip)], stripstr, "");
+ return tostrip