stevedlawrence commented on a change in pull request #12: Revised daffodil-io 
module to require passing in a FormatInfo object.
URL: https://github.com/apache/incubator-daffodil/pull/12#discussion_r158019836
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/grammar/BitOrderMixin.scala
 ##########
 @@ -79,8 +87,29 @@ trait BitOrderMixin extends GrammarMixin with 
ByteOrderAnalysisMixin { self: Ter
         (isArray && !hasUniformBitOrderThroughout)))
   }
 
-  protected final lazy val bitOrderChange = prod("bitOrderChange", 
needsBitOrderChange) {
-    BitOrderChange(this)
+  //
+  //  protected final lazy val bitOrderChange = prod("bitOrderChange", 
needsBitOrderChange) {
+  //    BitOrderChange(this)
+  //  }
+
+  private lazy val checkByteAndBitOrder = {
+    val ev = new CheckByteAndBitOrderEv(termRuntimeData, defaultBitOrder)
+    ev.compile()
+    ev
   }
 
+  lazy val maybeCheckByteAndBitOrderEv =
+    if (optionByteOrderRaw.isDefined) Maybe(checkByteAndBitOrder)
+    else Maybe.Nope
+
+  private lazy val checkBitOrderAndCharset = {
+    val ev = new CheckBitOrderAndCharsetEv(termRuntimeData, defaultBitOrder, 
charsetEv)
+    ev.compile()
+    ev
+  }
+
+  lazy val maybeCheckBitOrderAndCharset =
+    if (this.optionEncodingRaw.isDefined) Maybe(checkBitOrderAndCharset)
 
 Review comment:
   Similarly, doesn't encoding always have to be defined? Rather than checking 
encoding, shoudl this check if representation is text? Do we care about 
checking charset/bitOrder if representation is binary?

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