Skip to content

Implement occursCountKind="stopValue" - #1728

Open
jadams-tresys wants to merge 9 commits into
apache:mainfrom
jadams-tresys:DAFFODIL-501
Open

jadams-tresys wants to merge 9 commits into
apache:mainfrom
jadams-tresys:DAFFODIL-501

Conversation

@jadams-tresys

Copy link
Copy Markdown
Contributor

Bulk of this was done with AI. I tried to give it a thorough review and cleaned up a few things that seemed at odds with our usual coding style (see commit bf40370) but I'll admit I'm not super familiar with all the parts of Daffodil that were involved in this change.

Test coverage seems pretty good, but I think a few more need to be added to verify the various SDE/ProcessingError conditions outlined in the spec. I will add those soon, but wanted to get this up for review to make sure things are headed in the right direction.

DAFFODIL-501

@olabusayoT olabusayoT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments about style.

Comment thread daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ParticleMixin.scala Outdated
Comment thread daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ParticleMixin.scala Outdated
Comment thread daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ParticleMixin.scala Outdated
Comment on lines +249 to +255
<!--
Codegen backends cannot parse stopValueElement; generating C code for it fails with
"Code generation not supported for: RepOrderedStopValueSequenceChild"

daffodil generate c -r stopValueElement -s variablelen.dfdl.xsd
-->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks pretty straightfoward to add the ReoOrderedStopValueSequenceChild support to the C generator, any reason why we're not doing this?

Josh Adams added 9 commits October 19, 2026 07:48
For now only implemented parse support
Also remove some unused test files
One of the requirements in the DFDL spec is that if a stopValue shows up
in the infoset, it should result in a processing error.
- ParticleMixin: restore LV(Symbol(...)) for hasStopValue; cook
  dfdl:occursStopValue separately for parsing and unparsing
- SequenceChild: use if/else instead of matching on a boolean
- SeparatedSequenceParsers: comment explaining why checkParseAttemptStatus is
  applied after the separator has been parsed
- Remove DAFFODIL-501 from source comments and shorten long ones
- Clarify in the variablelen test files that only the Daffodil runtime, not the C
  code generator, supports stopValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants