stevedlawrence commented on a change in pull request #262: Unordered sequences
URL: https://github.com/apache/incubator-daffodil/pull/262#discussion_r323994347
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/AlignedMixin.scala
##########
@@ -170,18 +172,29 @@ trait AlignedMixin extends GrammarMixin { self: Term =>
Seq()
}
+ val unorderedSequenceSelfAlignment =
+ if (isInUnorderedSequence) {
+ Seq(alignmentApprox + (elementSpecifiedLengthApprox +
trailingSkipApprox))
+ } else {
+ Seq()
+ }
+
val priorSibsAlignmentsApprox = priorSibs.map { ps =>
- val eaa = ps.endingAlignmentApprox
+ val eaa = if (isInUnorderedSequence) {
+ alignmentApprox + (elementSpecifiedLengthApprox + trailingSkipApprox)
Review comment:
This isn't getting any of the alignments of the prior siblings, it's only
using the values of itself. But I guess this is the recursive issue you were
running into? But since every element depends on the alignment and length of
every other element, it seems like that would be difficult to avoid.
Maybe the logic you had before was correct, and it just needed better
documentation for how it was calculating things?
----------------------------------------------------------------
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