stevedlawrence commented on a change in pull request #240: Add
dfdlx:choiceBranchKeyRanges
URL: https://github.com/apache/incubator-daffodil/pull/240#discussion_r295861690
##########
File path:
daffodil-lib/src/main/scala/org/apache/daffodil/cookers/Cookers.scala
##########
@@ -84,3 +89,28 @@ object ChoiceBranchKeyCooker extends
ListOfStringLiteralNonEmptyNoCharClassEntit
object RepValueCooker extends
ListOfStringLiteralNonEmptyNoCharClassEntitiesNoByteEntities()
object UpperCaseTokenCooker extends UpperCaseToken
+
+object IntRangeCooker extends Converter[String, Seq[Range[BigInt]]] {
+ protected def convert(input: String, context: ThrowsSDE, forUnparse:
Boolean): Seq[Range[BigInt]] = {
Review comment:
Maybe we rename EntityRepalcer.scala to CookerImplementations or something
more generic? You're right that it's definiely more than entity replacement
now. Following other cookers, the implementation could be something like
"IntRange" or "IntRangeCookerBase", IntRangeCookerImpl, etc. The names are a
big generic, but they are in a separate "cooker" subpackage, so conflicts
probably wouldn't be a problem.
----------------------------------------------------------------
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