mbeckerle commented on code in PR #1604:
URL: https://github.com/apache/daffodil/pull/1604#discussion_r2635965458


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/AlignedMixin.scala:
##########
@@ -228,29 +235,161 @@ trait AlignedMixin extends GrammarMixin { self: Term =>
       }
     }.value
 
+  private lazy val separatorPrefixMTAApprox =
+    this.optLexicalParent match {
+      case Some(s: SequenceTermBase) if s.hasSeparator =>
+        import SeparatorPosition.*
+        s.separatorPosition match {
+          case Prefix | Infix => 
LengthMultipleOf(s.knownEncodingAlignmentInBits)

Review Comment:
   Gotcha. I think you are correct.
   
   I think some of the complexity in this code could be reduced by rigorously 
naming the various things to avoid confusion. 
   
   Being clear about lengthApprox vs positionApprox vs. alignmentRequirement 
would go a long ways. We're overusing the term "alignment" here to mean 
position and requirement. 
   



-- 
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