Grammalecte  Check-in [2a778178ee]

Overview
Comment:[core] gc engine: don’t parse graph which name is also a valid option set to False
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 2a778178ee33bc14cd27ee5101e11e8c094d1259ef723839258703e3d2187c3f
User & Date: olr on 2018-08-24 20:56:00
Other Links: branch diff | manifest | tags
Context
2018-08-24
20:56
[fr] conversion: regex rules -> graph rules check-in: 1f4df2401c user: olr tags: fr, rg
20:56
[core] gc engine: don’t parse graph which name is also a valid option set to False check-in: 2a778178ee user: olr tags: core, rg
17:05
[fr] conversion: regex rules -> graph rules check-in: e73a871408 user: olr tags: fr, rg
Changes

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

158
159
160
161
162
163
164

165
166
167
168
169
170
171
172
173
174
175
176
        if sOption == "@@@@":
            # graph rules
            oSentence.dError = dErrors
            if not bParagraph and bSentenceChange:
                oSentence.update(s, bDebug)
                bSentenceChange = False
            for sGraphName, sLineId in lRuleGroup:

                if bDebug:
                    print("\n>>>> GRAPH:", sGraphName, sLineId)
                bParagraphChange, s = oSentence.parse(dAllGraph[sGraphName], dPriority, sCountry, dOptions, bShowRuleId, bDebug, bContext)
                dErrors.update(oSentence.dError)
                dTokenPos = oSentence.dTokenPos
        elif not sOption or dOptions.get(sOption, False):
            # regex rules
            for zRegex, bUppercase, sLineId, sRuleId, nPriority, lActions in lRuleGroup:
                if sRuleId not in _aIgnoredRules:
                    for m in zRegex.finditer(s):
                        bCondMemo = None
                        for sFuncCond, cActionType, sWhat, *eAct in lActions:







>
|
|
|
|
|







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
        if sOption == "@@@@":
            # graph rules
            oSentence.dError = dErrors
            if not bParagraph and bSentenceChange:
                oSentence.update(s, bDebug)
                bSentenceChange = False
            for sGraphName, sLineId in lRuleGroup:
                if sGraphName not in dOptions or dOptions[sGraphName]:
                    if bDebug:
                        print("\n>>>> GRAPH:", sGraphName, sLineId)
                    bParagraphChange, s = oSentence.parse(dAllGraph[sGraphName], dPriority, sCountry, dOptions, bShowRuleId, bDebug, bContext)
                    dErrors.update(oSentence.dError)
                    dTokenPos = oSentence.dTokenPos
        elif not sOption or dOptions.get(sOption, False):
            # regex rules
            for zRegex, bUppercase, sLineId, sRuleId, nPriority, lActions in lRuleGroup:
                if sRuleId not in _aIgnoredRules:
                    for m in zRegex.finditer(s):
                        bCondMemo = None
                        for sFuncCond, cActionType, sWhat, *eAct in lActions: