stevedlawrence commented on code in PR #1338:
URL: https://github.com/apache/daffodil/pull/1338#discussion_r1910498123
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/ElementBaseGrammarMixin.scala:
##########
@@ -1341,7 +1356,13 @@ trait ElementBaseGrammarMixin
case LengthKind.Delimited => body
case LengthKind.Pattern => new SpecifiedLengthPattern(this, body)
case LengthKind.Explicit if bitsMultiplier != 0 =>
- new SpecifiedLengthExplicit(this, body, bitsMultiplier)
+ if (isSimpleType && primType == PrimType.HexBinary) {
+ // hexBinary has some checks that need to be done that
SpecifiedLengthExplicit
+ // gets in the way of
+ body
+ } else {
+ new SpecifiedLengthExplicit(this, body, bitsMultiplier)
+ }
case LengthKind.Explicit => {
Assert.invariant(!knownEncodingIsFixedWidth)
Assert.invariant(lengthUnits eq LengthUnits.Characters)
Review Comment:
I'm not sure this is a cleanup of existing issues. I think this change could
possibly lead to adding duplicate parsers and might slow things down. So it's
not that we already have duplicates, but this change could lead to new
duplicates.
--
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]