Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.3.0
-
None
-
None
Description
User reports looking at a debug trace and seeing a parse error associated with internal behavior of Daffodil.
The specific situation is for a nillable element. The parser is trying the nil representation, then it issues a parse error and backtracks to try the normal representation. This shows up on the diagnostic output as a parse error associated with the nilled element, which parsed fine, just wasn't nil.
Really we shouldn't use regular failure backtracking internally like this, as it misleads users. Really we need a nilledElement combinator that orchestrates trying the nil representation and then tries the other representations if that doesn't work. The point being to eliminate user-visible backtracking and diagnostics activity.