Table of Contents

Namespace Hi.NcParsers

Classes

IndexedSentence

Minimal ISentenceCarrier pairing a Sentence with its execution-order SentenceIndex. Use when there is no richer host object that already carries the sentence — e.g. CSV-driven runs that go straight from an input line to a Sentence without a SyntaxPiece wrapper.

NcDiagnostic

A structured diagnostic from the SoftNcRunner pipeline, designed for IProgress<T> consumption.

Id is composed as {Primary}-{Secondary}--{Abbrev} (e.g., Cycle-Peck--BadPeckQ, Syntax-Build--Exception). For irregular cases that don't fit the pattern, use a custom string.

NcDiagnosticProgress

Helper that emits NcDiagnostic records via an IProgress<T> sink. Provides one method per (NcDiagnosticCategory, NcDiagnosticSeverity) pair, each with an optional Sentence overload locating the issue in the NC source.

Sentence

A small NC block for one or several lines.

SoftNcRunner

Configurable NC Runner.

SoftNcUtil

JSON helpers for soft-NC blocks: vectors under Parsing, motion-term queries, flag grab/remove on raw text, and unparsed-line trimming.

Interfaces

IGetSentence

Abstraction for a source that carries a Sentence.

ISentenceCarrier

Carries a reference to a source Sentence together with its execution-order SentenceIndex. Used as the cross-process alignment carrier for diagnostics, messages, ClStripPos, MachiningStep, etc. — both the source content (via GetSentence()) and the execution-order position (via SentenceIndex) are available without needing two separate references.

ISentenceIndexed

Abstraction for an object that carries a SentenceIndex — a 0-based ordinal of its source Sentence in NC execution order. Use as a cross-process alignment key (messages, ClStripPos, MachiningStep, etc.) when source order (MixedIndex(IFileLineIndex)) is not enough because SubProgram inline reorders blocks relative to (FileIndex, LineIndex).

ISessionResettable

Marker for objects that hold session-scoped runtime state which must be cleared when RunControlLines(string, IEnumerable<string>, MachiningSession, SessionProgress, CancellationToken) initializes a new session pipeline (the state.IsInitialized == false edge).

Implementers may live on either chain: INcDependency or INcSyntax. SoftNcRunner scans NcDependencyList and NcSyntaxList on the session-init edge and calls OnSessionReset() on every match.

Distinct from IPowerResettable: power-reset clears retained-but-volatile state on a controller power cycle (e.g., Fanuc #100-#499), an edge that survives ordinary session boundaries. Session-reset clears state whose lifetime is one pipeline pass (iteration counters, file-index allocators, etc.).

Enums

NcDiagnosticCategory

Diagnostic category of an NC diagnostic.

  • System + Error → exception/bug, unconsidered case
  • Unsupported + Warning → known unsupported, likely harmless
  • Unsupported + Error → known unsupported, likely matters
  • Validation + Warning → manufacturing/physics may be unfeasible
  • Validation + Error → manufacturing/physics is unfeasible
  • Configuration + Message → dependency/config applied, informational event (e.g. a block skipped by an enabled IBlockSkipConfig layer)
  • Configuration + Warning → dependency/config missing, using fallback
  • Configuration + Error → dependency/config missing, cannot proceed
NcDiagnosticSeverity

Importance level of an NC diagnostic. Combined with NcDiagnosticCategory to form the full diagnostic meaning (e.g., Unsupported + Warning).