olabusayoT commented on code in PR #1652:
URL: https://github.com/apache/daffodil/pull/1652#discussion_r3405643160
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/ElementBaseGrammarMixin.scala:
##########
@@ -1341,18 +1451,29 @@ trait ElementBaseGrammarMixin
// non-explicit lengthKind
val body = bodyArg
+ val eopSimpleTypeElementThatNeedsBitLimit =
+ (isSimpleType && lengthKind == LengthKind.EndOfParent)
+ && !this.isInstanceOf[Root]
Review Comment:
So for root elements there is nothing to set the bitlimit for it, so it
needs the SpecifiedLengthEndOfParent wrapper so it can calculate itself (via
endOfDataPosition)...regular non-root non-hexbinary simple types need the
wrapper too, but they expect something else to set the bit limit.
Wondering if I ought to decompose EndOfParentParser so it doesn't do both
things, and instead only works for things that expect something else to set the
parent. Then create something else to wrap root simpleType root elements like
what is done for hexbinary? Thoughts?
--
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]