You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/01/25 16:12:05 UTC

[GitHub] [daffodil] mbeckerle commented on a change in pull request #736: Disable capture value length parsers for all delimited simple types

mbeckerle commented on a change in pull request #736:
URL: https://github.com/apache/daffodil/pull/736#discussion_r791873615



##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/runtime1/ElementBaseRuntime1Mixin.scala
##########
@@ -81,6 +81,9 @@ trait ElementBaseRuntime1Mixin { self: ElementBase =>
 
     // For simple elements with text representation, valueLength is captured in
     // individual parsers since they handle removing delimiters and padding.
+    // Related, simple types that aren't text (e.g. hex binary, packed decimal)
+    // but are delimited also use the same test delimited parsers that capture

Review comment:
       "the same test delimited parsers" ???

##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/runtime1/ElementBaseRuntime1Mixin.scala
##########
@@ -81,6 +81,9 @@ trait ElementBaseRuntime1Mixin { self: ElementBase =>
 
     // For simple elements with text representation, valueLength is captured in
     // individual parsers since they handle removing delimiters and padding.

Review comment:
       This comment is ambiguous to me. 
   
   "Capture in individual parsers" to me means "the separate capturing parsers", but we mean the opposite of that. 
   
   How about "Capture directly by the value parsers". 

##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/runtime1/ElementBaseRuntime1Mixin.scala
##########
@@ -90,7 +93,7 @@ trait ElementBaseRuntime1Mixin { self: ElementBase =>
     // So for these cases we do not want to capture value length, since
     // they are handled by the parsers as necessary
     val capturedByParsers =
-      (isSimpleType && impliedRepresentation == Representation.Text) ||
+      (isSimpleType && (impliedRepresentation == Representation.Text || lengthKind == LengthKind.Delimited)) ||

Review comment:
       Is there no analogous flaw/situation for unparsers, or are they doing this stuff right? 




-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org