mbeckerle commented on a change in pull request #88: Daffodil 1919 separators
URL: https://github.com/apache/incubator-daffodil/pull/88#discussion_r206566689
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/SpecifiedLength.scala
##########
@@ -29,21 +29,32 @@ import
org.apache.daffodil.processors.parsers.SpecifiedLengthExplicitParser
import org.apache.daffodil.processors.parsers.SpecifiedLengthImplicitParser
import org.apache.daffodil.dpath.NodeInfo.PrimType
import org.apache.daffodil.processors.parsers.Parser
+import org.apache.daffodil.util.Maybe
+import org.apache.daffodil.util.Maybe._
abstract class SpecifiedLengthCombinatorBase(val e: ElementBase, eGramArg: =>
Gram)
extends Terminal(e, true) {
lazy val eGram = eGramArg // once only
- lazy val eParser = eGram.parser
+
Review comment:
Add comments explaining why this conditional logic is needed and why the
parser could be empty.
This is about the removal of the NadaParser and NadaUnparser. Grammar terms
have to propagate empty parser/unparser now. This needs to be notated here, but
also belongs on the Gram base trait/class as part of the overall contract of
parser/unparser methods now.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services