From 203e9a690d471e53c88e6fe577188593c98bd9ef Mon Sep 17 00:00:00 2001 From: William Blevins Date: Sat, 24 Sep 2016 06:13:49 -0400 Subject: Revert src/engine/SCons/Scanner/Fortran.py changes. --- src/engine/SCons/Scanner/Fortran.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/SCons/Scanner/Fortran.py b/src/engine/SCons/Scanner/Fortran.py index 9082015..1b55130 100644 --- a/src/engine/SCons/Scanner/Fortran.py +++ b/src/engine/SCons/Scanner/Fortran.py @@ -82,11 +82,11 @@ class F90Scanner(SCons.Scanner.Classic): mods_and_includes = node.includes else: # retrieve all included filenames - includes = self.cre_incl.findall(node.get_contents()) + includes = self.cre_incl.findall(node.get_text_contents()) # retrieve all USE'd module names - modules = self.cre_use.findall(node.get_contents()) + modules = self.cre_use.findall(node.get_text_contents()) # retrieve all defined module names - defmodules = self.cre_def.findall(node.get_contents()) + defmodules = self.cre_def.findall(node.get_text_contents()) # Remove all USE'd module names that are defined in the same file # (case-insensitively) @@ -187,7 +187,7 @@ def FortranScan(path_variable="FORTRANPATH"): # (\w+) : match the module name that is being USE'd # # - use_regex = b"(?i)(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)" + use_regex = "(?i)(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)" # The INCLUDE statement regex matches the following: @@ -275,7 +275,7 @@ def FortranScan(path_variable="FORTRANPATH"): # set of semicolon-separated INCLUDE statements # (as allowed by the F2003 standard) - include_regex = b"(?i)(?:^|['\">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<\"'](.+?)(?=[\"'>])" + include_regex = """(?i)(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])""" # The MODULE statement regex finds module definitions by matching # the following: @@ -299,7 +299,7 @@ def FortranScan(path_variable="FORTRANPATH"): # that make up the defined module name and # save it in a group - def_regex = b"(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)" + def_regex = """(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)""" scanner = F90Scanner("FortranScan", "$FORTRANSUFFIXES", -- cgit v0.12