Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1960

RepUnboundedParser incorrectly handling points of uncertainty

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: Back End
    • Labels:
      None

      Description

      The RepUnboundedParser currently creates two marks: startState and priorState. The priorState mark changes as we go through each repetition of the array. The startState mark never changes. If an error occurs during a repetition and a discriminator IS NOT set, we reset to the prior mark, effectively backtracking the single failed repetition and keep all successful repetitions of the array. However, if an error occurs during a repetition and a discriminator IS set, then we backtrack the entire array back to the startState mark.

      This behavior is not correct. This behavior treats the beginning of an array as if it were a point of uncertainty, but that is not the case. Only each element of the array is a point of uncertainty. So there is no need for the startState mark. It should be removed, and if a repetition fails and a discriminator is set then we should simply discard priorState mark and backtrack to whatever point of uncertainty enclosed the array (i.e. just return from the parse call and let containing parsers handle it).

      We should also examine the other repetition parsers and ensure they have the correct behavior.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                slawrence Steve Lawrence
                Reporter:
                slawrence Steve Lawrence
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: