mbeckerle commented on a change in pull request #214: Sequences and Separators 
Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r285234477
 
 

 ##########
 File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/Term.scala
 ##########
 @@ -803,4 +877,87 @@ trait Term
     }
   }
 
+  /**
+   * A zeroLengthDetector is a runtime device used by the unparser to
+   * determine whether a term could unparse to zero length or not.
+   *
+   * Computed statically, because sometimes we know that it is not possible
+   * for the representation to be zero length (e.g., non-nillable ahd 
non-defaultable
+   * int always has to have at least one digit.)
+   *
+   * Used by unparsing algorithms that involve separator suppression for
+   * zero-length data.
+   *
+   * The detector algorithm is independent of the usage of the term.
+   * That is, it doesn't take things like dfdl:separatorSuppressionPolicy 
(which
+   * is a property of the surrounding sequence) into account.
+   */
+  final lazy val zeroLengthDetector: ZeroLengthDetector = {
 
 Review comment:
   Move back to SequenceChild from Term. Really belongs there.

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

Reply via email to