stevedlawrence commented on a change in pull request #235: Daffodil 2143  2154 
initiated content and nillable EDIFACT Bugs
URL: https://github.com/apache/incubator-daffodil/pull/235#discussion_r295251072
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/InitiatedTerminatedMixin.scala
 ##########
 @@ -61,7 +64,23 @@ trait InitiatedTerminatedMixin
     res
   }
 
-  private lazy val initiatorDiscriminator = prod("initiatorDiscriminator", 
parentSaysInitiatedContent) { InitiatedContent(this) }
+  private lazy val initiatorDiscriminator = prod(
+    "initiatorDiscriminator",
+    parentSaysInitiatedContent &&
+      immediatelyEnclosingModelGroup.map {
+        case c: ChoiceTermBase => true
+        case s: SequenceTermBase => (isArray || isOptional) &&
+          isVariableOccurrences
+      }.getOrElse(false)) {
 
 Review comment:
   Would it be possible to put this guard in an variable? It wasn't immediately 
clear to me that this is where the guard ended and the grammar stared.

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


With regards,
Apache Git Services

Reply via email to