diff options
author | Neil <nyamatongwe@gmail.com> | 2015-11-20 11:05:28 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-11-20 11:05:28 +1100 |
commit | 6652c4eadad09cf6ea23b690c92d70b55a49d57f (patch) | |
tree | 955441c738e7e43de65414f956b16d678486eb1a /scripts | |
parent | ad16ecb14a085d950b6a243b02267a0eca50f5c9 (diff) | |
download | scintilla-mirror-6652c4eadad09cf6ea23b690c92d70b55a49d57f.tar.gz |
Remove line end whitespace.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Face.py | 34 | ||||
-rw-r--r-- | scripts/FileGenerator.py | 4 | ||||
-rw-r--r-- | scripts/GenerateCaseConvert.py | 20 | ||||
-rw-r--r-- | scripts/LexGen.py | 4 | ||||
-rw-r--r-- | scripts/ScintillaData.py | 4 |
5 files changed, 33 insertions, 33 deletions
diff --git a/scripts/Face.py b/scripts/Face.py index 17d161fd7..05864f17c 100644 --- a/scripts/Face.py +++ b/scripts/Face.py @@ -9,7 +9,7 @@ def sanitiseLine(line): line = line[:line.find("##")] line = line.strip() return line - + def decodeFunction(featureVal): retType, rest = featureVal.split(" ", 1) nameIdent, params = rest.split("(") @@ -17,13 +17,13 @@ def decodeFunction(featureVal): params, rest = params.split(")") param1, param2 = params.split(",") return retType, name, value, param1, param2 - + def decodeEvent(featureVal): retType, rest = featureVal.split(" ", 1) nameIdent, params = rest.split("(") name, value = nameIdent.split("=") return retType, name, value - + def decodeParam(p): param = p.strip() type = "" @@ -44,7 +44,7 @@ class Face: self.features = {} self.values = {} self.events = {} - + def ReadFromFile(self, name): currentCategory = "" currentComment = [] @@ -70,11 +70,11 @@ class Face: raise p1 = decodeParam(param1) p2 = decodeParam(param2) - self.features[name] = { - "FeatureType": featureType, + self.features[name] = { + "FeatureType": featureType, "ReturnType": retType, - "Value": value, - "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], + "Value": value, + "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], "Param2Type": p2[0], "Param2Name": p2[1], "Param2Value": p2[2], "Category": currentCategory, "Comment": currentComment } @@ -84,10 +84,10 @@ class Face: self.order.append(name) elif featureType == "evt": retType, name, value = decodeEvent(featureVal) - self.features[name] = { - "FeatureType": featureType, + self.features[name] = { + "FeatureType": featureType, "ReturnType": retType, - "Value": value, + "Value": value, "Category": currentCategory, "Comment": currentComment } if value in self.events: @@ -102,16 +102,16 @@ class Face: except ValueError: print("Failure %s" % featureVal) raise Exception() - self.features[name] = { - "FeatureType": featureType, - "Category": currentCategory, + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, "Value": value } self.order.append(name) elif featureType == "enu" or featureType == "lex": name, value = featureVal.split("=", 1) - self.features[name] = { - "FeatureType": featureType, - "Category": currentCategory, + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, "Value": value } self.order.append(name) diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index e2750ebe0..11d6d70ba 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -7,8 +7,8 @@ # Requires Python 2.5 or later # The files are copied to a string apart from sections between a # ++Autogenerated comment and a --Autogenerated comment which is -# generated by the CopyWithInsertion function. After the whole string is -# instantiated, it is compared with the target file and if different the file +# generated by the CopyWithInsertion function. After the whole string is +# instantiated, it is compared with the target file and if different the file # is rewritten. from __future__ import with_statement diff --git a/scripts/GenerateCaseConvert.py b/scripts/GenerateCaseConvert.py index 37506b7b9..068a068cd 100644 --- a/scripts/GenerateCaseConvert.py +++ b/scripts/GenerateCaseConvert.py @@ -3,15 +3,15 @@ # Requires Python 3.3 or later # Should not be run with old versions of Python. -# Current best approach divides case conversions into two cases: +# Current best approach divides case conversions into two cases: # simple symmetric and complex. # Simple symmetric is where a lower and upper case pair convert to each -# other and the folded form is the same as the lower case. +# other and the folded form is the same as the lower case. # There are 1006 symmetric pairs. # These are further divided into ranges (stored as lower, upper, range length, -# range pitch and singletons (stored as lower, upper). +# range pitch and singletons (stored as lower, upper). # Complex is for cases that don't fit the above: where there are multiple -# characters in one of the forms or fold is different to lower or +# characters in one of the forms or fold is different to lower or # lower(upper(x)) or upper(lower(x)) are not x. These are represented as UTF-8 # strings with original, folded, upper, and lower separated by '|'. # There are 126 complex cases. @@ -33,7 +33,7 @@ def contiguousRanges(l, diff): def flatten(listOfLists): "Flatten one level of nesting" return itertools.chain.from_iterable(listOfLists) - + def conversionSets(): # For all Unicode characters, see whether they have case conversions # Return 2 sets: one of simple symmetric conversion cases and another @@ -89,7 +89,7 @@ def groupRanges(symmetrics): contiguousGroups = flatten([contiguousRanges(g, 1) for g in groups]) longGroups = [(x[0][0], x[0][1], len(x), 1) for x in contiguousGroups if len(x) > 4] - + oneDiffs = [s for s in symmetrics if s[2] == 1] contiguousOnes = flatten([contiguousRanges(g, 2) for g in [oneDiffs]]) longOneGroups = [(x[0][0], x[0][1], len(x), 2) for x in contiguousOnes if len(x) > 4] @@ -97,7 +97,7 @@ def groupRanges(symmetrics): rangeGroups = sorted(longGroups+longOneGroups, key=lambda s: s[0]) rangeCoverage = list(flatten([range(r[0], r[0]+r[2]*r[3], r[3]) for r in rangeGroups])) - + nonRanges = [(l, u) for l, u, d in symmetrics if l not in rangeCoverage] return rangeGroups, nonRanges @@ -107,7 +107,7 @@ def escape(s): def updateCaseConvert(): symmetrics, complexes = conversionSets() - + rangeGroups, nonRanges = groupRanges(symmetrics) print(len(rangeGroups), "ranges") @@ -115,9 +115,9 @@ def updateCaseConvert(): print(len(nonRanges), "non ranges") nonRangeLines = ["%d,%d, " % x for x in nonRanges] - + print(len(symmetrics), "symmetric") - + complexLines = ['"%s|%s|%s|%s|"' % tuple(escape(t) for t in x) for x in complexes] print(len(complexLines), "complex") diff --git a/scripts/LexGen.py b/scripts/LexGen.py index 934968c27..ba179eee0 100644 --- a/scripts/LexGen.py +++ b/scripts/LexGen.py @@ -44,14 +44,14 @@ def UpdateVersionNumbers(sci, root): "CFBundleShortVersionString", sci.versionDotted) def RegenerateAll(root): - + sci = ScintillaData.ScintillaData(root) Regenerate(root + "src/Catalogue.cxx", "//", sci.lexerModules) Regenerate(root + "win32/scintilla.mak", "#", sci.lexFiles) UpdateVersionNumbers(sci, root) - + HFacer.RegenerateAll(root, False) if __name__=="__main__": diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py index a5f269573..7aeee4f62 100644 --- a/scripts/ScintillaData.py +++ b/scripts/ScintillaData.py @@ -7,14 +7,14 @@ # version # versionDotted # versionCommad -# +# # Date last modified # dateModified # yearModified # mdyModified # dmyModified # myModified -# +# # Information about lexers and properties defined in lexers # lexFiles # sorted list of lexer files |