diff options
author | Johnathan Corgan | 2011-07-08 10:23:31 -0700 |
---|---|---|
committer | Johnathan Corgan | 2011-07-08 10:23:31 -0700 |
commit | 666cd2dd6818fb66e538fa52957f3a23d68e7b94 (patch) | |
tree | 93a5240422a410d380cf11488097a2a871b8a2be /volk/gen/volk_regexp.py | |
parent | 5938a37512ec66872adf28b260cb1d2bfefa9602 (diff) | |
parent | 9bfe75fd7c6a7069db2d2a98195faabf6ba248e2 (diff) | |
download | gnuradio-666cd2dd6818fb66e538fa52957f3a23d68e7b94.tar.gz gnuradio-666cd2dd6818fb66e538fa52957f3a23d68e7b94.tar.bz2 gnuradio-666cd2dd6818fb66e538fa52957f3a23d68e7b94.zip |
Merged jblum/new_volk into master
Diffstat (limited to 'volk/gen/volk_regexp.py')
-rw-r--r-- | volk/gen/volk_regexp.py | 14 |
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 |