Grammalecte  Check-in [30e9ffd98a]

Overview
Comment:[core][bug] boolean storing condition result wrongly reset
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 30e9ffd98a5e827802a9a7aeb2a152d62c4f97beba4782c590115654304bf540
User & Date: olr on 2018-06-14 12:35:21
Other Links: branch diff | manifest | tags
Context
2018-06-16
09:52
[build] handles groups of actions within rules check-in: 4452713abf user: olr tags: build, rg
2018-06-14
12:35
[core][bug] boolean storing condition result wrongly reset check-in: 30e9ffd98a user: olr tags: core, rg
12:31
[core] better debugging mode check-in: 51affbc3d4 user: olr tags: core, rg
Changes

Modified gc_core/py/lang_core/gc_engine.py from [e9a038bb63] to [c27f614a0d].

682
683
684
685
686
687
688

689
690
691
692
693
694
695
696
697
698
699
700
701
        return (bChange, dErr)

    def _executeActions (self, dGraph, dNode, nTokenOffset, dPriority, dOptions, sCountry, bShowRuleId, bDebug, bContext):
        "execute actions found in the DARG"
        dErrs = {}
        bChange = False
        for sLineId, nextNodeKey in dNode.items():

            for sRuleId in dGraph[nextNodeKey]:
                try:
                    if bDebug:
                        print("ACTION:", sRuleId)
                        print(dRule[sRuleId])
                    bCondMemo = None
                    sOption, sFuncCond, cActionType, sWhat, *eAct = dRule[sRuleId]
                    # action in lActions: [ condition, action type, replacement/suggestion/action[, iTokenStart, iTokenEnd[, nPriority, message, URL]] ]
                    if not sOption or dOptions.get(sOption, False):
                        bCondMemo = not sFuncCond or globals()[sFuncCond](self.lToken, nTokenOffset, sCountry, bCondMemo)
                        if bCondMemo:
                            if cActionType == "-":
                                # grammar error







>





<







682
683
684
685
686
687
688
689
690
691
692
693
694

695
696
697
698
699
700
701
        return (bChange, dErr)

    def _executeActions (self, dGraph, dNode, nTokenOffset, dPriority, dOptions, sCountry, bShowRuleId, bDebug, bContext):
        "execute actions found in the DARG"
        dErrs = {}
        bChange = False
        for sLineId, nextNodeKey in dNode.items():
            bCondMemo = None
            for sRuleId in dGraph[nextNodeKey]:
                try:
                    if bDebug:
                        print("ACTION:", sRuleId)
                        print(dRule[sRuleId])

                    sOption, sFuncCond, cActionType, sWhat, *eAct = dRule[sRuleId]
                    # action in lActions: [ condition, action type, replacement/suggestion/action[, iTokenStart, iTokenEnd[, nPriority, message, URL]] ]
                    if not sOption or dOptions.get(sOption, False):
                        bCondMemo = not sFuncCond or globals()[sFuncCond](self.lToken, nTokenOffset, sCountry, bCondMemo)
                        if bCondMemo:
                            if cActionType == "-":
                                # grammar error