mbeckerle commented on a change in pull request #74: Daffodil trailing sep URL: https://github.com/apache/incubator-daffodil/pull/74#discussion_r204083507
########## File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/NilEmptyCombinatorParsers.scala ########## @@ -19,14 +19,8 @@ package org.apache.daffodil.processors.parsers import org.apache.daffodil.processors.TermRuntimeData -case class SimpleNilOrEmptyOrValueParser(ctxt: TermRuntimeData, nilParser: Parser, emptyParser: Parser, valueParser: Parser) - extends AltCompParser(ctxt, Seq(nilParser, emptyParser, valueParser)) - case class SimpleNilOrValueParser(ctxt: TermRuntimeData, nilParser: Parser, valueParser: Parser) - extends AltCompParser(ctxt, Seq(nilParser, valueParser)) - -case class SimpleEmptyOrValueParser(ctxt: TermRuntimeData, emptyParser: Parser, valueParser: Parser) - extends AltCompParser(ctxt, Seq(emptyParser, valueParser)) + extends ChoiceParser(ctxt, Seq(nilParser, valueParser)) case class ComplexNilOrContentParser(ctxt: TermRuntimeData, emptyParser: Parser, contentParser: Parser) - extends AltCompParser(ctxt, Seq(emptyParser, contentParser)) + extends ChoiceParser(ctxt, Seq(emptyParser, contentParser)) Review comment: Actually I think ChoiceParser is only used for choices now. The grammar no longer has the "|" operator in it at all, so there is no runtime alternation. All such conditional behavior is done by some explicit combinator. All the grammar alternatives must be resolvable at compilation time now, and use the "||" operator, which insists on turning into just one alternative at compile time. ---------------------------------------------------------------- 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
