Grammalecte  Check-in [7afd82e022]

Overview
Comment:[core] gc engine: useless trailing spaces in token rewriting
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 7afd82e0221ea03375388330e76ebd159e8216305d385238945fa041234b92a6
User & Date: olr on 2018-08-25 08:15:32
Other Links: branch diff | manifest | tags
Context
2018-08-25
08:16
[fr] quelques ajustements check-in: bc646479ae user: olr tags: fr, rg
08:15
[core] gc engine: useless trailing spaces in token rewriting check-in: 7afd82e022 user: olr tags: core, rg
2018-08-24
20:56
[fr] conversion: regex rules -> graph rules check-in: 1f4df2401c user: olr tags: fr, rg
Changes

Modified gc_core/py/lang_core/gc_engine.py from [942ee97254] to [fca8aab188].

944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
            if sWhat.startswith("="):
                sWhat = globals()[sWhat[1:]](self.lToken, nTokenOffset, nLastToken)
            else:
                sWhat = self._expand(sWhat, nTokenOffset, nLastToken)
            bUppercase = bCaseSvty and self.lToken[nTokenRewriteStart]["sValue"][0:1].isupper()
            if nTokenRewriteEnd - nTokenRewriteStart == 0:
                # one token
                sWhat = sWhat + " " * (len(self.lToken[nTokenRewriteStart]["sValue"])-len(sWhat))
                if bUppercase:
                    sWhat = sWhat[0:1].upper() + sWhat[1:]
                self.lToken[nTokenRewriteStart]["sNewValue"] = sWhat
            else:
                # several tokens
                lTokenValue = sWhat.split("|")
                if len(lTokenValue) != (nTokenRewriteEnd - nTokenRewriteStart + 1):







<







944
945
946
947
948
949
950

951
952
953
954
955
956
957
            if sWhat.startswith("="):
                sWhat = globals()[sWhat[1:]](self.lToken, nTokenOffset, nLastToken)
            else:
                sWhat = self._expand(sWhat, nTokenOffset, nLastToken)
            bUppercase = bCaseSvty and self.lToken[nTokenRewriteStart]["sValue"][0:1].isupper()
            if nTokenRewriteEnd - nTokenRewriteStart == 0:
                # one token

                if bUppercase:
                    sWhat = sWhat[0:1].upper() + sWhat[1:]
                self.lToken[nTokenRewriteStart]["sNewValue"] = sWhat
            else:
                # several tokens
                lTokenValue = sWhat.split("|")
                if len(lTokenValue) != (nTokenRewriteEnd - nTokenRewriteStart + 1):