mbeckerle commented on a change in pull request #88: Daffodil 1919 separators
URL: https://github.com/apache/incubator-daffodil/pull/88#discussion_r209037834
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/TermGrammarMixin.scala
 ##########
 @@ -55,46 +50,19 @@ trait TermGrammarMixin
     newVarEnds.fold(mt) { _ ~ _ }
   }
 
-  // I am not sure we need to distinguish these two.
-  final lazy val asTermInSequence = prod("asTermInSequence") {
-    separatedForSequencePosition(termContentBody)
-  }
-
-  /**
-   * overridden in LocalElementGrammarMixin
-   */
-  lazy val asTermInChoice = termContentBody
-
-  /**
-   * separator combinators - detect cases where no separator applies.
-   * Note that repeating elements are excluded because they have to
-   * managed their own separatedForArrayPosition inside the repetition.
-   */
-  protected final def separatedForArrayPosition(bodyArg: => Gram): Gram = {
-    val body = bodyArg
-    val (isElementWithNoRep, isRepeatingElement) = body.context match {
-      case e: ElementBase => (!e.isRepresented, !e.isScalar)
-      case other => (false, false)
-    }
-    Assert.usage(isRepeatingElement)
-    Assert.invariant(!isElementWithNoRep) //inputValueCalc not allowed on 
arrays in DFDL v1.0
-    val res = prefixSep ~ infixSepRule ~ body ~ postfixSep
-    res
-  }
-
-  protected final def separatedForSequencePosition(bodyArg: => Gram): Gram = {
-    val body = bodyArg
-    val (isElementWithNoRep, isRepeatingElement) = body.context match {
-      case e: ElementBase => (!e.isRepresented, !e.isScalar)
-      case other => (false, false)
-    }
-    if (isElementWithNoRep) body // no separators for things that have no 
representation in the data stream
-    else if (isRepeatingElement) body
-    else {
-      val res = prefixSep ~ infixSepRule ~ body ~ postfixSep
-      res
-    }
-  }
+  //  protected final def separatedForSequencePosition(bodyArg: => Gram): Gram 
= {
 
 Review comment:
   Done

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