@@ -127,7 +127,7 @@ class Argument:
self.vararg = False
# try for a function pointer
- match = re.match('(.*)\(\*([a-zA-Z0-9$_]*)\)\((.*)\)', text)
+ match = re.match(r'(.*)\(\*([a-zA-Z0-9$_]*)\)\((.*)\)', text)
if match:
self.function_pointer = True
self.args = match.group(3)
@@ -135,7 +135,7 @@ class Argument:
self.name = match.group(2).rstrip()
else:
# plain declaration
- match = re.match('(.*[ *])\(?\*?([a-zA-Z0-9$_]*)\)?', text)
+ match = re.match(r'(.*[ *])\(?\*?([a-zA-Z0-9$_]*)\)?', text)
# there may not be a match, say in the special case
# where an arg is '...'
if match:
@@ -237,13 +237,13 @@ class Function:
self.date = datetime.date.today().year
function, comments = line.split(';')
- comment = re.search('/\* *(.*) *\*/', comments)
+ comment = re.search(r'/\* *(.*) *\*/', comments)
if comment:
self.comments = comment.group(1)
else:
self.comments = None
- bits = re.match('([^(]*)\((.*)\)', function)
+ bits = re.match(r'([^(]*)\((.*)\)', function)
type_and_name = Argument(bits.group(1))
self.type, self.name = type_and_name.type, type_and_name.name
# convenient to have this declared here so we can use its .decl later