aboutsummaryrefslogtreecommitdiffstats
path: root/waflib/Tools/fc_scan.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 17:31:04 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 18:14:27 +0100
commite76724d58c39a52e3f47dbff40c011c54d9a0fdb (patch)
tree62c22e362068f8ab6e7e3a4597c65a7e55841943 /waflib/Tools/fc_scan.py
parent4044751b2b7c59b9f6943a0e951aa1fd7c3a2616 (diff)
parentc7034f97a9a966bb6c04e296fdae714e80237986 (diff)
downloadblop.lv2-master.tar.gz
blop.lv2-master.tar.bz2
blop.lv2-master.zip
Update autowaf and adapt to new APIHEADmaster
Diffstat (limited to 'waflib/Tools/fc_scan.py')
-rw-r--r--waflib/Tools/fc_scan.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/waflib/Tools/fc_scan.py b/waflib/Tools/fc_scan.py
index 12cb0fc..0824c92 100644
--- a/waflib/Tools/fc_scan.py
+++ b/waflib/Tools/fc_scan.py
@@ -5,13 +5,15 @@
import re
-INC_REGEX = """(?:^|['">]\s*;)\s*(?:|#\s*)INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
-USE_REGEX = """(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
-MOD_REGEX = """(?:^|;)\s*MODULE(?!\s*PROCEDURE)(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
+INC_REGEX = r"""(?:^|['">]\s*;)\s*(?:|#\s*)INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
+USE_REGEX = r"""(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
+MOD_REGEX = r"""(?:^|;)\s*MODULE(?!\s+(?:PROCEDURE|SUBROUTINE|FUNCTION))\s+(\w+)"""
+SMD_REGEX = r"""(?:^|;)\s*SUBMODULE\s*\(([\w:]+)\)\s*(\w+)"""
re_inc = re.compile(INC_REGEX, re.I)
re_use = re.compile(USE_REGEX, re.I)
re_mod = re.compile(MOD_REGEX, re.I)
+re_smd = re.compile(SMD_REGEX, re.I)
class fortran_parser(object):
"""
@@ -58,6 +60,10 @@ class fortran_parser(object):
m = re_mod.search(line)
if m:
mods.append(m.group(1))
+ m = re_smd.search(line)
+ if m:
+ uses.append(m.group(1))
+ mods.append('{0}:{1}'.format(m.group(1),m.group(2)))
return (incs, uses, mods)
def start(self, node):