equal
deleted
inserted
replaced
66 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage |
66 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage |
67 |
67 |
68 base_folder = paths.AbsParentDir(__file__) |
68 base_folder = paths.AbsParentDir(__file__) |
69 |
69 |
70 MATIEC_ERROR_MODEL = re.compile( |
70 MATIEC_ERROR_MODEL = re.compile( |
71 ".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
71 r".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
72 |
72 |
73 |
73 |
74 def ExtractChildrenTypesFromCatalog(catalog): |
74 def ExtractChildrenTypesFromCatalog(catalog): |
75 children_types = [] |
75 children_types = [] |
76 for n, d, _h, c in catalog: |
76 for n, d, _h, c in catalog: |
711 os.path.join(self._getBuildPath(), "LOCATED_VARIABLES.h")) |
711 os.path.join(self._getBuildPath(), "LOCATED_VARIABLES.h")) |
712 # each line of LOCATED_VARIABLES.h declares a located variable |
712 # each line of LOCATED_VARIABLES.h declares a located variable |
713 lines = [line.strip() for line in location_file.readlines()] |
713 lines = [line.strip() for line in location_file.readlines()] |
714 # This regular expression parses the lines genereated by IEC2C |
714 # This regular expression parses the lines genereated by IEC2C |
715 LOCATED_MODEL = re.compile( |
715 LOCATED_MODEL = re.compile( |
716 "__LOCATED_VAR\((?P<IEC_TYPE>[A-Z]*),(?P<NAME>[_A-Za-z0-9]*),(?P<DIR>[QMI])(?:,(?P<SIZE>[XBWDL]))?,(?P<LOC>[,0-9]*)\)") |
716 r"__LOCATED_VAR\((?P<IEC_TYPE>[A-Z]*),(?P<NAME>[_A-Za-z0-9]*),(?P<DIR>[QMI])(?:,(?P<SIZE>[XBWDL]))?,(?P<LOC>[,0-9]*)\)") |
717 for line in lines: |
717 for line in lines: |
718 # If line match RE, |
718 # If line match RE, |
719 result = LOCATED_MODEL.match(line) |
719 result = LOCATED_MODEL.match(line) |
720 if result: |
720 if result: |
721 # Get the resulting dict |
721 # Get the resulting dict |