Grammalecte  Check-in [8f55493c76]

Overview
Comment:[build] check token validity: improvement
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: 8f55493c7694aa618570a4fcaea7e6378e899b2dd28976687bd46b3130f78b50
User & Date: olr on 2020-11-23 20:29:23
Other Links: manifest | tags
Context
2020-11-23
20:43
[fr] phonet_simil: danse dance check-in: 07bd6248b1 user: olr tags: trunk, fr
20:29
[build] check token validity: improvement check-in: 8f55493c76 user: olr tags: trunk, build
20:28
[fr] corrections des messages et ajustements check-in: ab708276ae user: olr tags: trunk, fr
Changes

Modified compile_rules_graph.py from [dfe32ac11e] to [1d9a1d39be].

331
332
333
334
335
336
337
338

339
340

341
342

343
344

345
346
347
348
349
350
351
331
332
333
334
335
336
337

338
339

340
341

342
343

344
345
346
347
348
349
350
351







-
+

-
+

-
+

-
+







        if iStartAction < 0:
            iStartAction += 1
        if iEndAction < 0:
            iEndAction += 1

        # check target
        if nFirstNullable > -1:
            if nFirstNullable > 0 and iStartAction > 0 and iEndAction != 0 and iStartAction > nFirstNullable:
            if nFirstNullable > 0 and iStartAction > 0 and iEndAction != 0 and (iStartAction > nFirstNullable or iStartAction == nFirstNullable == iEndAction):
                print(f"# Error. At {sLineId}, {sActionId}, target start is bigger than first nullable token.")
            if nFirstNullable > 0 and iEndAction > 0 and iStartAction != 1 and iEndAction > nFirstNullable:
            if nFirstNullable > 0 and iEndAction > 0 and iStartAction != 1 and (iEndAction > nFirstNullable or iStartAction == nFirstNullable == iEndAction):
                print(f"# Error. At {sLineId}, {sActionId}, target end is bigger than first nullable token.")
            if nLastNullable < 0 and iStartAction < 0 and iEndAction != 0 and (iStartAction-1) < nLastNullable:
            if nLastNullable < 0 and iStartAction < 0 and iEndAction != 0 and ((iStartAction-1) < nLastNullable or (iStartAction-1) == nFirstNullable == (iEndAction-1)):
                print(f"# Error. At {sLineId}, {sActionId}, target start is lower than last nullable token.")
            if nLastNullable < 0 and iEndAction < 0 and iStartAction != 1 and (iEndAction-1) < nLastNullable:
            if nLastNullable < 0 and iEndAction < 0 and iStartAction != 1 and ((iEndAction-1) < nLastNullable or (iStartAction-1) == nFirstNullable == (iEndAction-1)):
                print(f"# Error. At {sLineId}, {sActionId}, target end is lower than last nullable token.")

        if cAction == "-":
            ## error
            iMsg = sAction.find(" && ")
            if iMsg == -1:
                print("\n# Error. No message at: ", sLineId, sActionId)