olabusayoT commented on code in PR #1337:
URL: https://github.com/apache/daffodil/pull/1337#discussion_r1821000897


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/PackedBinaryTraits.scala:
##########
@@ -70,11 +71,16 @@ abstract class PackedBinaryDecimalBaseParser(
 
 abstract class PackedBinaryIntegerBaseParser(
   override val context: ElementRuntimeData,
-  signed: Boolean = false
 ) extends PrimParser
   with PackedBinaryConversion {
   override lazy val runtimeDependencies = Vector()
 
+  val signed = {
+    context.optPrimType.get match {
+      case n: NodeInfo.PrimType.PrimNumeric => n.isSigned
+      case _ => false
+    }
+  }
   protected def getBitLength(s: ParseOrUnparseState): Int
 
   def parse(start: PState): Unit = {

Review Comment:
   Above this we have PackedDecimal that also returns if nBits is 0, should we 
also make that a PE? Also PackedDecimal doesn't pass along decimalSigned to the 
base, is it logical to do something like the below? If so, they I think we need 
to update the PackedDecimal classes  to pass along decimalSigned
   
   ```xml
   <xs:element name="num" type="xs:decimal"  dfdl:representation="binary" 
dfdl:binaryNumberRep="ibm4690Packed" dfdl:decimalSigned="yes" 
dfdl:binaryDecimalVirtualPoint="0"/>
   ```



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

Reply via email to