Grammalecte  Check-in [79f74bad72]

Overview
Comment:[build] darg builder: count tokens for action identifier
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | build | rg
Files: files | file ages | folders
SHA3-256: 79f74bad7244b018127a308efb64b15f85b45a954a76a271013fc246efbd07a7
User & Date: olr on 2018-06-20 08:23:15
Other Links: branch diff | manifest | tags
Context
2018-06-20
08:25
[core] gc engine: move plugins code check-in: 886177ba3e user: olr tags: core, rg
08:23
[build] darg builder: count tokens for action identifier check-in: 79f74bad72 user: olr tags: build, rg
08:00
[fr] conversion: regex rules -> graph rules check-in: f69bdd4736 user: olr tags: fr, rg
Changes

Modified compile_rules_graph.py from [07324275d9] to [101570ecf9].

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
                iGroup += 1
                dPos[iGroup] = i + 1    # we add 1, for we count tokens from 1 to n (not from 0)

        # Parse actions
        for iAction, sAction in enumerate(sActions.split(" <<- "), 1):
            sAction = sAction.strip()
            if sAction:
                sActionId = sRuleName + "__b" + str(iActionBlock) + "_a" + str(iAction)
                aAction = createAction(sActionId, sAction, nPriority, len(lToken), dPos)
                if aAction:
                    dACTIONS[sActionId] = aAction
                    lResult = list(lToken)
                    lResult.extend(["##"+str(iLine), sActionId])
                    yield lResult








|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
                iGroup += 1
                dPos[iGroup] = i + 1    # we add 1, for we count tokens from 1 to n (not from 0)

        # Parse actions
        for iAction, sAction in enumerate(sActions.split(" <<- "), 1):
            sAction = sAction.strip()
            if sAction:
                sActionId = sRuleName + "__b" + str(iActionBlock) + "_a" + str(iAction) + "_" + str(len(lToken))
                aAction = createAction(sActionId, sAction, nPriority, len(lToken), dPos)
                if aAction:
                    dACTIONS[sActionId] = aAction
                    lResult = list(lToken)
                    lResult.extend(["##"+str(iLine), sActionId])
                    yield lResult