You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/04/24 20:54:24 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #207: Added support for enumerations and TypeValueCalc

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

 ##########
 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:
   Has this proposal been run by the DFDL-WG? There's some things in here (i.e. all the different type functions, next sibling one-off) that I feel like the DFDL-WG might have some objections too. I'd rather get those issues resolved and not have to change things later and deal with backwards compatability issues.

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


With regards,
Apache Git Services