mbeckerle commented on a change in pull request #207: Added support for 
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r278376148
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
 ##########
 @@ -1543,6 +1543,49 @@ case class FunctionCallExpression(functionQNameString: 
String, expressions: List
         DFDLSetBitsExpr(functionQNameString, functionQName, args)
       }
 
+      //Begin TypeValueCalc related functions
+      case (RefQName(_, "inputTypeCalcInt", DFDL), args) =>
+        FNTwoArgsExpr(functionQNameString, functionQName, args,
+          NodeInfo.Int, NodeInfo.String, NodeInfo.AnyAtomic, 
DFDLXInputTypeCalcInt(_))
+
+      case (RefQName(_, "inputTypeCalcString", DFDL), args) =>
+        FNTwoArgsExpr(functionQNameString, functionQName, args,
+          NodeInfo.String, NodeInfo.String, NodeInfo.AnyAtomic, 
DFDLXInputTypeCalcString(_))
+
+      case (RefQName(_, "outputTypeCalcInt", DFDL), args) =>
+        FNTwoArgsExpr(functionQNameString, functionQName, args,
+          NodeInfo.Int, NodeInfo.String, NodeInfo.AnyAtomic, 
DFDLXOutputTypeCalcInt(_))
+
+      case (RefQName(_, "outputTypeCalcString", DFDL), args) =>
+        FNTwoArgsExpr(functionQNameString, functionQName, args,
+          NodeInfo.String, NodeInfo.String, NodeInfo.AnyAtomic, 
DFDLXOutputTypeCalcString(_))
+
+      case (RefQName(_, "outputTypeCalcNextSiblingInt", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.Int, NodeInfo.AnyAtomic, 
DFDLXOutputTypeCalcNextSiblingInt(_, _))
+
+      case (RefQName(_, "outputTypeCalcNextSiblingString", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.String, NodeInfo.AnyAtomic, 
DFDLXOutputTypeCalcNextSiblingString(_, _))
+
+      case (RefQName(_, "repTypeValueInt", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.Integer, NodeInfo.AnyAtomic, DFDLXRepTypeValueInt(_, _))
+
+      case (RefQName(_, "repTypeValueString", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.String, NodeInfo.AnyAtomic, DFDLXRepTypeValueString(_, _))
+
+      case (RefQName(_, "logicalTypeValueInt", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.Integer, NodeInfo.AnyAtomic, DFDLXLogicalTypeValueInt(_, _))
+          
+      case (RefQName(_, "logicalTypeValueString", DFDL), args) =>
+        FNZeroArgExpr(functionQNameString, functionQName,
+          NodeInfo.String, NodeInfo.AnyAtomic, DFDLXLogicalTypeValueString(_, 
_))
+
+      //End typeValueCalc related functions
 
 Review comment:
   Note: I decided to do this the other way round: implement, see whether we 
like the way it came out, and only once we've revised it and are satisfied with 
it, do we propose it for inclusion in DFDL.
   
   This is, in fact, the right way for a standard to be driven by an 
implementation. Standards should be based on experience with an implementation. 
So in the future I expect to do things this way. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to