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

RepUnboundedParser incorrectly handling points of uncertainty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.0
    • 2.2.0
    • Back End
    • 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

              slawrence Steve Lawrence
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: