parsingPadChar is the pad character for parsing unparsingPadChar is the pad character for unparsing These are always carried as MaybeChar.
parsingPadChar is the pad character for parsing unparsingPadChar is the pad character for unparsing These are always carried as MaybeChar.
We need both, because in the same schema you can have textPadKind="padChar" but textTrimKind="none", so there can't be just one pad char object if it is to carry information about both whether or not a pad character is to be used, and the value.
Provides parser.
Provides parser.
Required to examine child parsers, and optimize itself out by propagating NadaParser if there is no parser.
parsingPadChar is the pad character for parsing unparsingPadChar is the pad character for unparsing These are always carried as MaybeChar.
parsingPadChar is the pad character for parsing unparsingPadChar is the pad character for unparsing These are always carried as MaybeChar.
We need both, because in the same schema you can have textPadKind="padChar" but textTrimKind="none", so there can't be just one pad char object if it is to carry information about both whether or not a pad character is to be used, and the value.
Provides unparser.
Provides unparser.
Required to examine child unparsers, and optimize itself out by propagating NadaUnparser if there is no unparser.
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.
This uber combinator exists because we (currently) do quite different things for parsing and unparsing.
It lets us introduce the new unparser capabilities for the situations where they are truly necessary, and keep using the older style stuff for the situations where it works already.
Ultimately, some big refactoring is needed here though, or this is going to get very complicated to reason about, as if it isn't already :-), well this is going to make it worse.