Table of Contents

Class SiemensSyntaxUtil

Namespace
Hi.NcParsers.Syntaxs
Assembly
HiMech.dll

Pre-built parsing syntax fragments for Siemens-style programs (R parameters, TRAORI, etc.).

public static class SiemensSyntaxUtil
Inheritance
SiemensSyntaxUtil
Inherited Members

Fields

NamedIdentPattern

Identifier grammar for Siemens named-assignment LHS capture (IdentPattern override). Four alternatives: $ system variables with an optional literal index list ($P_UIFR[5,Z,TR], $AC_TIME); underscore-leading names (_X_HOME); names containing an underscore (HH_ROBOTON, L_39); and one-letter+digits words (H1=21 auxiliary functions; also re-matches R63, the P0-blessed benign overlap with TagAssignmentSyntax — both sides carry the same TerminateWords and RhsDialect). The one-letter+digits alternative also spells the TRAORI orientation addresses (A3=/B3=/C3=, A2=, A4= …), which is why SiemensOrientationVectorSyntax must run ahead of the named-assignment capture in DefaultSyntaxList — captured here they would land in Vars.Named silently, with the rotary posture frozen. Deliberately narrower than DefaultIdentPattern: a multi-letter letters+digits run must NOT match, or a fully-glued block like G90X0Y=R63 is swallowed whole as Assignments.G90X0Y before the flag/axis syntaxes can token-split it (real-corpus bug); the one-letter+digits alternative cannot fire inside it (no letter+digits run sits directly before the =). The corpus' named variables all carry an underscore; a hypothetical underscore-free DEF name is still lowered correctly because SiemensDefStatementSyntax owns DEF lines, but its later re-assignments would not be captured — corpus-driven trade-off.

public const string NamedIdentPattern = "\\$\\w+(?:\\[[^\\]=]*\\])?|_\\w+|[A-Za-z]\\w*_\\w*|[A-Za-z]\\d+"

Field Value

string

VarTag

Variable token prefix for Siemens R parameters.

public const string VarTag = "R"

Field Value

string

Properties

DefaultSyntaxList

Syntax list for general kind of Siemens Controller.

public static List<INcSyntax> DefaultSyntaxList { get; }

Property Value

List<INcSyntax>

DwellSyntax

The Siemens-dialect dwell consumer, a new instance per read: F seconds, no milliseconds word, S spindle revolutions. The Logic bundle of DefaultSyntaxList mounts one after SpindleSpeedSyntax, and the legacy patch in SoftNcRunner inserts one into a saved runner that has none.

public static DwellSyntax DwellSyntax { get; }

Property Value

DwellSyntax

FlagSyntax

Common Siemens bare-word flags under Flags: RTCP codes (TRAORI/TRAFOOF — consumed by SiemensTraoriSyntax), SUPA (consumed by MachineCoordSelectSyntax), STOPRE (consumed by SiemensStopreSyntax), RET (consumed by SiemensSubProgramReturnSyntax) and the path-control modal words consumed by SiemensPathSmoothingSyntax.

public static FlagSyntax FlagSyntax { get; }

Property Value

FlagSyntax

Kit

The kit of the shared ISO captures as the Siemens preset mounts it, a new instance per read. Siemens G74 is reference-point return, not the Fanuc LH tapping cycle, so it stays out of the canned-cycle capture and cannot mis-fire TappingCycleSyntax; the dedicated G74/G75 statement capture in DefaultSyntaxList owns it instead. The dwell arguments are the Siemens words, G4 F<seconds> / G4 S<revolutions> (the Fanuc-family X/U/P words are not Siemens dwell vocabulary, and there is no milliseconds word): captured into Parsing.G4/G04 so the F never reaches the modal FeedrateSyntax, consumed by DwellSyntax. The legacy patch in SoftNcRunner reads this kit's G4Syntax as the lists a saved Siemens capture is brought to.

public static GenericSyntaxKit Kit { get; }

Property Value

GenericSyntaxKit