stevedlawrence commented on a change in pull request #757:
URL: https://github.com/apache/daffodil/pull/757#discussion_r809345893
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SequenceParserBases.scala
##########
@@ -62,7 +62,7 @@ abstract class SequenceParserBase(
ais: ArrayIndexStatus): ArrayIndexStatus = {
Assert.invariant(currentPos >= priorPos)
if (currentPos == priorPos && pstate.groupPos > 1) {
- PE(pstate, "No forward progress.")
+ PE(pstate, "Error parsing array '%s': Array element parsed succesfully,
but consumed no data and is stuck in an infinite loop as it is
unbounded.".format(srd.groupMembers(srd.position-1)))
Review comment:
Interesting, I'm not sure if that's a bug or not...
It looks like the reason still getting the sequence as the context is that
`RepeatingChildParser` extends `SequenceChildParser`, which extends
`CombinatorParser` and passes in `srd` as the context. So when we do
`parser.PE`, the context of that parser is still that of the sequence, even
though this particular parser is really all about the the child. Maybe we
should change `SequenceChildParser` so that is passes in `trd` to the
`CombinatorParser` instead of `srd`? I think that feels more correct to me,
since I would expect the context of a `SequenceChildParser` to be the child and
not the Sequence? And then you wouldn't need diagnosticDebugName?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]