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

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/SequenceGrammarMixin.scala
 ##########
 @@ -17,36 +17,122 @@
 
 package org.apache.daffodil.grammar
 import org.apache.daffodil.schema.annotation.props.gen._
-import org.apache.daffodil.grammar.primitives.SequenceCombinator
-import org.apache.daffodil.dsom.SequenceTermBase
-import org.apache.daffodil.grammar.primitives.LayeredSequence
+import org.apache.daffodil.schema.annotation.props.SeparatorSuppressionPolicy
+import org.apache.daffodil.dsom._
+import org.apache.daffodil.exceptions.Assert
+import org.apache.daffodil.grammar.primitives._
+import org.apache.daffodil.grammar.primitives.OrderedSequence
 
 trait SequenceGrammarMixin extends GrammarMixin { self: SequenceTermBase =>
 
   final override lazy val groupContent = prod("groupContent") {
-    if (isLayered) layeredSequenceContent
-    else {
-      self.sequenceKind match {
-        case SequenceKind.Ordered => orderedSequenceContent
-        case SequenceKind.Unordered => subsetError("Unordered sequences are 
not supported.") // unorderedSequenceContent
-      }
+    if (isLayered) layerContent
+    else sequenceContent
+  }
+
+  final lazy val sequenceContent = {
+    import columnConstants._
+    self.sequenceKind match {
+      case Ordered__ => orderedSequence
+      case Unordered => subsetError("Unordered sequences are not supported.") 
// unorderedSequenceContent
     }
   }
 
-  private lazy val layeredSequenceContent = {
+  private lazy val layerContent = {
     schemaDefinitionUnless(groupMembers.length == 1, "Layered sequence can 
have only 1 child term. %s were found: %s", groupMembers.length,
       groupMembers.mkString(", "))
     val term = groupMembers(0)
     schemaDefinitionWhen(term.isArray, "Layered sequence body cannot be an 
array.")
-    val termGram = term.termContentBody
-    LayeredSequence(this, termGram)
+    LayeredSequence(this, new ScalarOrderedSequenceChild(this, term, 1))
 
 Review comment:
   Comment added. 
   
   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