Grammalecte  Diff

Differences From Artifact [dfe32ac11e]:

To Artifact [1d9a1d39be]:


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:
                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:
                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:
                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:
                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)







|

|

|

|







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 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 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 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 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)