mbeckerle commented on a change in pull request #16: Implemented packed binary
formats
URL: https://github.com/apache/incubator-daffodil/pull/16#discussion_r155284135
##########
File path:
daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/grammar/ElementBaseGrammarMixin.scala
##########
@@ -480,7 +504,8 @@ trait ElementBaseGrammarMixin
case LengthKind.Implicit => implicitBinaryLengthInBits
case LengthKind.Explicit if (lengthEv.isConstant) =>
explicitBinaryLengthInBits()
case LengthKind.Explicit => -1 // means must be computed at runtime.
- case LengthKind.Delimited => subsetError("lengthKind='delimited' not yet
supported.")
+ case LengthKind.Delimited if (binaryNumberRep == BinaryNumberRep.Binary)
=> subsetError("lengthKind='delimited' only supported for packed binary
formats.")
+ case LengthKind.Delimited => -1
Review comment:
Please add scaladoc to this lazy val saying that
* Must be called for all binary numbers because it performs checks for
inconsistencies of properties
* Returns -1 if the binary number is not of known length, or is of a
lengthKind inconsistent with knowing the length.
* SDE if the lengthKind is inconsistent with binary numbers, not yet
implemented for binary numbers, or not supported by Daffodil.
Returns -1 if the element does not have a known length. SDE if the element
has a lengthKind not allowed (or not yet supported) for binary numbers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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