You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/08/27 19:46:07 UTC

[GitHub] [incubator-daffodil] mbeckerle commented on a change in pull request #262: Unordered sequences

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

 ##########
 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:
   Limited validation does check that min/max Occurs constraints are respected for regular arrays and optionals.
   
   So when validation is on, we should check here for the number of occurrences of the children of an unordered sequence to be within the mix/max range and issue a validation error otherwise. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services