Grammalecte  Diff

Differences From Artifact [e9a038bb63]:

To Artifact [c27f614a0d]:


682
683
684
685
686
687
688

689
690
691
692
693
694
695
696
697
698
699
700
701
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])
                    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