~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to volk/gen/volk_regexp.py

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import re
 
2
 
 
3
remove_after_underscore = re.compile("_.*");
 
4
space_remove = re.compile(" ");
 
5
leading_space_remove = re.compile("^ *");
 
6
replace_arch = re.compile(", const char\* arch");
 
7
replace_bracket = re.compile(" {");
 
8
replace_volk = re.compile("volk");
 
9
 
 
10
def strip_trailing(tostrip, stripstr):
 
11
    lindex = tostrip.rfind(stripstr)
 
12
    tostrip = tostrip[0:lindex] + tostrip[lindex:len(tostrip)].replace(stripstr, "");
 
13
    return tostrip