jadams-tresys commented on code in PR #987:
URL: https://github.com/apache/daffodil/pull/987#discussion_r1907370113


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/Grammar.scala:
##########
@@ -89,10 +90,19 @@ class SeqComp private (context: SchemaComponent, children: 
Seq[Gram])
       _.isInstanceOf[NadaParser]
     }
 
+  lazy val assertExpressionChildren = parserChildren.filter {
+    _.isInstanceOf[AssertExpressionEvaluationParser]
+  }
+
   final override lazy val parser = {
     if (parserChildren.isEmpty) new NadaParser(context.runtimeData)
     else if (parserChildren.length == 1) parserChildren.head
-    else new SeqCompParser(context.runtimeData, parserChildren.toVector)
+    else
+      new SeqCompParser(
+        context.runtimeData,
+        parserChildren.toVector,
+        assertExpressionChildren.toVector,

Review Comment:
   I believe I have fixed this.  I didn't realize (or forgot since starting 
this pull request a year ago) that we internally handle discriminator 
expressions as an assert expression just with a discriminator flag set.
   
   I've changed it so that now we are filtering out just the discriminator 
statements from the rest of the sequence child parsers and run those after the 
rest of the sequence body.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to