stevedlawrence commented on a change in pull request #262: Unordered sequences
URL: https://github.com/apache/incubator-daffodil/pull/262#discussion_r318171212
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SequenceParserBases.scala
 ##########
 @@ -44,6 +49,23 @@ abstract class SequenceParserBase(
   override lazy val childProcessors = childParsers
 }
 
+abstract class UnorderedSequenceParserBase(
+  srd: SequenceRuntimeData,
+  choiceParser: ChoiceParser,
+  childParsersArg: Vector[Parser])
+  extends SequenceParserBase(srd, childParsersArg) {
+
+  override protected def parse(pstate: PState) = {
+
+    do {
+      choiceParser.parse(pstate)
+    } while (pstate.processorStatus eq Success)
+
+    pstate.setSuccess()
 
 Review comment:
   Are there any checks that need to be done upon completion? I'm thinking like 
making sure minOccurs elements were parsed for each of the elements?  Maybe we 
don't do that validtion and rely on external schema validators?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to