Grammalecte  Check-in [239c6642dc]

Overview
Comment:[build][bug] graph builder: don’t reset priority
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | build | rg
Files: files | file ages | folders
SHA3-256: 239c6642dca1c8aa1d13f690f5e2b693c7343cdcd780de5a40b7f4f9f4c9d84f
User & Date: olr on 2018-06-13 21:03:52
Other Links: branch diff | manifest | tags
Context
2018-06-14
12:09
[fr] conversion: regex rules -> graph rules check-in: 1d33e72e1b user: olr tags: fr, rg
2018-06-13
21:03
[build][bug] graph builder: don’t reset priority check-in: 239c6642dc user: olr tags: build, rg
20:44
[build][bug] graph builder: don’t remove rulename check-in: e43f77fe66 user: olr tags: build, rg
Changes

Modified compile_rules_graph.py from [e8cbe17853] to [1ffdcd91bb].

274
275
276
277
278
279
280
281
282
283
284
285

286
287
288
289
290
291
292
            if not sGraphName:
                print("Error. All rules must belong to a named graph. Line: ", i)
                exit()
            for j, sTokenLine in lTokenLine:
                dAllGraph[sGraphName].append((j, sRuleName, sTokenLine, sActions, nPriority))
            lTokenLine.clear()
            sActions = ""
            nPriority = 4
        elif re.search("    +<<- ", sLine):
            # actions
            sActions += " " + sLine.strip()
        elif sLine.startswith(("    ")):

            lTokenLine.append([i, sLine.strip()])
        else:
            print("Unknown line:")
            print(sLine)

    # processing rules
    print("  preparing rules...")







<




>







274
275
276
277
278
279
280

281
282
283
284
285
286
287
288
289
290
291
292
            if not sGraphName:
                print("Error. All rules must belong to a named graph. Line: ", i)
                exit()
            for j, sTokenLine in lTokenLine:
                dAllGraph[sGraphName].append((j, sRuleName, sTokenLine, sActions, nPriority))
            lTokenLine.clear()
            sActions = ""

        elif re.search("    +<<- ", sLine):
            # actions
            sActions += " " + sLine.strip()
        elif sLine.startswith(("    ")):
            # tokens
            lTokenLine.append([i, sLine.strip()])
        else:
            print("Unknown line:")
            print(sLine)

    # processing rules
    print("  preparing rules...")