Namespace Hi.NcParsers.InspectionSyntaxs
Classes
- CleanupSyntax
Removes indicated JSON keys from JsonObject after upstream syntaxes have consumed them. Useful for cleaning up runtime-derived intermediate data (e.g., ProgramToMcTransform) that should not persist in the final output.
Place at the end of the syntax list, after all consumers have read the keys.
- ProgramXyzBackfillSyntax
Debug / observability back-fill: writes ProgramXyz onto blocks that did not have it written by upstream logic syntaxes (e.g. HomeMcInitializer block, chain-change blocks that only updated MC via a rotary-only path), only when the effective program position has changed from the last block that stored a ProgramXyz.
Skips the block entirely when either of these holds:
- The block already has ProgramXyz written — e.g. by ProgramXyzSyntax, G53p1RotaryPositionSyntax, MachineCoordSelectSyntax, ReferenceReturnSyntax, McAbcXyzFallbackSyntax, or RadiusCompensationSyntax.
- The effective value equals the last stored value (modal-only block such as pure F / S / M / plane-select — no program motion).
Only back-fills the root block; ItemsKey items are intentionally skipped (they are managed by Hi.NcParsers.LogicSyntaxs.CompoundMotionSyntaxUtil and per-cycle syntaxes that already write the right per-item
ProgramXyz).Placement: end of NcSyntaxList, after UnconsumedCheckSyntax. Runs purely as a bookkeeping pass — no other syntax / semantic in the default pipeline reads the additional back-fill values it emits, so the runtime output (IAct stream) is unchanged whether this syntax is present or not. The only observable effect is additional
ProgramXyzentries in the cachedsyntax-piecesdump, which makes block-to-block debugging and diffing easier.
- SnapshotSyntax
Debug-time JsonObject capture: deep-clones every key on the current JsonObject (except the SnapshotKey envelope itself) into
json[SnapshotKey][SectionName], leaving the rest of the block untouched.Insertable at any position in NcSyntaxList — placement determines what stage the dump captures (e.g. drop after the Parsing bundle for "after-parsing", drop after the Logic bundle for "after-logic"). Two instances with different SectionName values can coexist on the same pipeline and their dumps end up under sibling keys of the same SnapshotKey envelope, so a single cache file shows the data at every captured stage in one place.
Excluding the SnapshotKey envelope from the clone keeps each captured section flat: it reflects "everything else on the block at that stage", and re-running through additional SnapshotSyntax instances never nests past one level.
Set IsEnabled =
falseto keep the configuration in place but skip the capture (no JSON mutation, no allocation) — convenient for toggling a debug pipeline without removing the entries.
- UnconsumedCheckSyntax
Emits diagnostic warnings for content remaining after all upstream syntaxes have run: unconsumed Parsing entries and non-empty UnparsedText. Flags listed in ExcludedFlags are silently ignored. Must be placed at the end of NcSyntaxList.