You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "stevedlawrence (via GitHub)" <gi...@apache.org> on 2023/03/08 19:51:17 UTC

[GitHub] [daffodil] stevedlawrence commented on pull request #981: Update parsing when emptyValueDelimiterPolicy is 'none'

stevedlawrence commented on PR #981:
URL: https://github.com/apache/daffodil/pull/981#issuecomment-1460762916

   Sounds like maybe `emptyValueDelimiterPolicy` is just completely broken/not implemented then? We might want to consider how to best implement each of these instead of doing one at a time, there might be a very clean solution.
   
   My first insinct is that maybe we need a new combinator? So a new parser that accepts three sub parsers (initiator, content, and terminator). It parses each of these allowing some to fail depending on the `emptyValueDelimiterPolicy` and the whether the parsed content was empty.
   
   And the Unparse combinator would look at the value of content, and if empty then it unparses the initiator/terminator based on the policy.
   
   This way delimiters don't need to know if they should be optional or not, and they don't have to worry about the content being empty or not. They just do what they do, and if they fail, the combinator that controls them handles it accordingly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org