mbeckerle commented on code in PR #987:
URL: https://github.com/apache/daffodil/pull/987#discussion_r2300873585
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/DFDLStatementMixin.scala:
##########
@@ -213,10 +213,10 @@ trait ProvidesDFDLStatementMixin extends ThrowsSDE with
HasTermCheck {
st.testKind != TestKind.Pattern
}
- final lazy val patternStatements: Seq[DFDLStatement] = patternAsserts ++
patternDiscrims
+ final lazy val patternStatements: Seq[DFDLStatement] = patternDiscrims ++
patternAsserts
Review Comment:
Add a comment "// disc must be before asserts."
Since this was presumably changed because this invariant is depended upon
elsewhere.
##########
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]
Review Comment:
Discussion in the DFDL Workgroup is here:
https://github.com/OpenGridForum/DFDL/issues/67
The upshot is that the order is "implementation defined", so we need to
pick, but also state the behavior.
I believe the right behavior is "schema order", and "first failure stops the
evaluation of all dfdl:assert statements" (but not discriminators, as they may
be needed to resolve an enclosing PoU.
--
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]