jadams-tresys commented on a change in pull request #276: Updated Unordered Sequence code to better support vCard URL: https://github.com/apache/incubator-daffodil/pull/276#discussion_r334143116
########## File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/Parser.scala ########## @@ -281,6 +293,10 @@ class ChoiceParser(ctxt: RuntimeData, val childParsers: Vector[Parser]) } pstate.popDiscriminator + + if (discriminatorFailed) + pstate.setDiscriminator(true) + Review comment: The way I viewed the discriminator stack (which may be incorrect) is that the discriminator we are actually interested in is on the unordered sequence, but because we are implementing uoseq's with a ChoiceParser, that discriminator essentially gets pushed one level down to the ChoiceParser. By setting the discriminator here, we are essentially just lifting it out of the ChoiceParser and back into the Unordered Sequence. I added comments to the part of the code where discriminatorFailed gets set to true, but perhaps I should add something here too. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services