Combines static information about the sequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static information about the sequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static information about the sequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static information about the sequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static knowledge of whether the term can be zero length, with issues like in order for trailing sep suppression to apply, the term must be potentially trailing.
Combines static knowledge of whether the term can be zero length, with issues like in order for trailing sep suppression to apply, the term must be potentially trailing.
This combines the static information about the child term with that of the sequence child itself to answer, for this usage of the term, whether we know for sure that we should NOT suppress the separator.
True if we should never suppress separator i.e., always lay down associated separator. False if we may/may-not suppress separator depending on runtime characteristics like whether some thing(s) are zero length.
Combines static information about the model groupsequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static information about the model groupsequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
This is the concept of "empty" that applies to model groups. As they are not elements, nothing about default values or EVDP or nil reps applies here.
Combines static information about the model groupsequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
Combines static information about the model groupsequence child's definition with properties of the sequence to tell us if a zero-length after a parse attempt needs special treatment.
This is the concept of "empty" that applies to model groups. As they are not elements, nothing about default values or EVDP or nil reps applies here.
Provides parser.
Provides parser.
Required to examine child parsers, and optimize itself out by propagating NadaParser if there is no parser.
Provides unparser.
Provides unparser.
Required to examine child unparsers, and optimize itself out by propagating NadaUnparser if there is no unparser.
A zeroLengthDetector is a runtime device used by the unparser to determine whether a term could unparse to zero length or not.
A zeroLengthDetector is a runtime device used by the unparser to determine whether a term could unparse to zero length or not.
Computed statically, because sometimes we know that it is not possible for the representation to be zero length (e.g., non-nillable ahd non-defaultable int always has to have at least one digit.)
Used by unparsing algorithms that involve separator suppression for zero-length data. The point of this is to avoid the overhead of unparser uncertainty about a separator being needed or not. If you can examine the value with a zero-length-detector and it gives you a positive answer one way or the other, you can avoid a great deal of unparser overhead where it has to suspend whether to emit a separator. If the ZL detector tells you the representation will be greater than zero length, you can just emit a separator and move on.
The detector algorithm is independent of the usage of the term. That is, it doesn't take things like dfdl:separatorSuppressionPolicy (which is a property of the surrounding sequence) into account.
This || operator means one of the operands ONLY.
This || operator means one of the operands ONLY. I.e., statically they are supposed to be mutually exclusive, so only one (or none) of them should ever survive.
Sequential composition operator in the grammar.
Sequential composition operator in the grammar.
Note: This should not evaluate the argument unless it has to.
A SequenceChild is exactly that, a child Term of a Sequence
Methods/members of this class combine information about a child term with that about the sequence itself. This class is really a part of the state of the sequence object.
This is the class primarily responsible for compilation of sequence and term information into digested form for the runtime, such that the runtime can properly implement complex DFDL behaviors like separator suppression and emptyElementParsePolicy.
These objects are part of the Gram object hierarchy. They represent the use of a Term in a context. They are objects that belong to (are owned by exactly one) the enclosing sequence, are part of it, and so it is reasonable for a SequenceChild to have a backpointer to the enclosing Sequence object in all cases, and this is passed to them on construction. This particular backpointer is not a challenge to sharing substructure as these objects cannot and are not intended to be shared. They really are state of the enclosing sequence broken out for convenience.
This allows the child (of the Sequence) Term object (dsom object) that provides the definition of the SequenceChild to be shared/reused, in principle without having a backpointer to the enclosing Sequence. That allows sharing, and removes lots of duplication/copying that is otherwise needed in the schema compiler data structures.
Eventually things like alignment calculations should move from Terms to these objects. That is, those calculations should not be done on the DSOM objects, but on these SequenceChild objects in the Gram objects.