stevedlawrence commented on a change in pull request #86: Adding value of 'bcd' 
to binaryCalendarRep
URL: https://github.com/apache/incubator-daffodil/pull/86#discussion_r205426082
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
 ##########
 @@ -652,6 +659,51 @@ trait ElementBaseGrammarMixin
   private lazy val zonedTextUnsignedByte = prod("zonedTextUnsignedByte",
     textNumberRep == TextNumberRep.Zoned) { ConvertZonedCombinator(this, 
stringValue, ConvertZonedUnsignedBytePrim(this)) }
 
+
+  private lazy val bcdKnownLengthCalendar = prod("bcdCalendar", 
binaryCalendarRep == BinaryCalendarRep.Bcd) {
+    bcdDateKnownLength | bcdTimeKnownLength | bcdDateTimeKnownLength
+  }
+  private lazy val bcdRuntimeLengthCalendar = prod("bcdCalendar", 
binaryCalendarRep == BinaryCalendarRep.Bcd) {
+    bcdDateRuntimeLength | bcdTimeRuntimeLength | bcdDateTimeRuntimeLength
+  }
+  private lazy val bcdDelimitedLengthCalendar = prod("bcdCalendar", 
binaryCalendarRep == BinaryCalendarRep.Bcd) {
+    bcdDateDelimitedLength | bcdTimeDelimitedLength | 
bcdDateTimeDelimitedLength
+  }
+
+  // BCD calendar with known length
+  private lazy val bcdDateKnownLength = prod("bcdDateKnownLength", primType == 
PrimType.Date) {
+    ConvertZonedCombinator(this, new BCDDecimalKnownLength(this, 
binaryNumberKnownLengthInBits), ConvertTextDatePrim(this))
 
 Review comment:
   Instead of BCDDecimal* would  work to use BCDInteger* primitives/parsers? 
Then you don't even need to worry about binaryVirtualDecimalPoint stuff?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to