mbeckerle commented on a change in pull request #88: Daffodil 1919 separators
URL: https://github.com/apache/incubator-daffodil/pull/88#discussion_r206580911
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/Parser.scala
##########
@@ -250,18 +254,23 @@ class AltCompParser(ctxt: RuntimeData, val childParsers:
Seq[Parser])
if (returnFlag == false) {
Assert.invariant(i == limit)
// Out of alternatives. All of them failed.
- val allDiags = new AltParseFailed(context.schemaFileLocation, pstate,
diagnostics.reverse)
+ val allDiags = new EntireChoiceFailed(context.schemaFileLocation,
pstate, diagnostics.reverse)
pstate.setFailed(allDiags)
- log(LogLevel.Debug, "All AltParser alternatives failed.")
+ log(LogLevel.Debug, "All Choice alternatives failed.")
}
pstate.popDiscriminator
} catch {
// Similar try/catch/finally logic for returning marks is also used in
- // the RepAtMostTotalNParser and RepUnboundedParser. The logic isn't
+ // the Sequence parser base. The logic isn't
// easily factored out so it is duplicated. Changes made here should also
// be made there. Only these parsers deal with taking marks, so this
logic
// should not be needed elsewhere.
+ //
+ // TODO: Refactor by hoisting this logic into CombinatorParser using same
Review comment:
Comment not correct now. Can't really refactor this as suggested.
----------------------------------------------------------------
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