Table of Contents

Class SiemensCallStatementSyntax

Namespace
Hi.NcParsers.ParsingSyntaxs.Siemens
Assembly
HiMech.dll

Captures a whole-line Siemens subprogram-call statement into Parsing.SiemensCall for SiemensSubProgramCallSyntax to resolve (inline the file) or safe-skip (structured warning, zero motion). Two shapes are owned:

  • Parenthesized call, any identifierHQ_FC(1,50,75,160), L_39(0.000,0.000), HH_ROBOT(2){ "Name": "HQ_FC", "Args": ["1","50",…] }. The argument grammar (complete quoted runs admitted, quote-aware comma split) is SiemensCycleCallSyntax's, reused verbatim.
  • Bare-word callL9810, L_ZYM91, HH_ROBOTOFF, with an optional repeat count L123 P3{ "Name": "L123", "P": 3 }. Restricted to L-leading or underscore-bearing identifiers on purpose: this syntax runs ahead of FlagSyntax and a generic bare-identifier capture would steal TRAORI-class words before their consumers ever saw them — the same underscore heuristic NamedIdentPattern blessed for assignments (corpus named entities all carry an underscore; controller vocabulary never does). On real Sinumerik any bare identifier can be a by-name call; widening further is a corpus-driven follow-up.

Placement: last of the dedicated statement owners and still before SiemensQuotedStatementSyntax — quoted arguments must reach this capture (paired quotes ride inside the args body; a line whose quotes do not pair falls through whole to the quarantine). ExcludedNames keeps this catch-all from re-owning statements that belong elsewhere (default: WRITE stays with the quoted-statement quarantine; control-flow words are reserved for their future syntaxes). Whole-line anchored: a call mixed with other tokens (L9810 M8) does not match and stays visible in the unparsed warning.

public class SiemensCallStatementSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
Inheritance
SiemensCallStatementSyntax
Implements
Inherited Members
Extension Methods

Examples

OEM cycle call with positional args: #BeforeBuild.UnparsedText: HQ_FC(1,50,75,160) #AfterBuild:

{
  "Parsing": {
    "SiemensCall": { "Name": "HQ_FC", "Args": ["1", "50", "75", "160"] }
  }
}

Bare L-number call (Renishaw style): #BeforeBuild.UnparsedText: L9810 #AfterBuild:

{
  "Parsing": { "SiemensCall": { "Name": "L9810" } }
}

L-call with repeat count: #BeforeBuild.UnparsedText: L123 P3 #AfterBuild:

{
  "Parsing": { "SiemensCall": { "Name": "L123", "P": 3 } }
}

Underscore-bearing bare identifier (OEM switch subprogram): #BeforeBuild.UnparsedText: HH_ROBOTOFF #AfterBuild:

{
  "Parsing": { "SiemensCall": { "Name": "HH_ROBOTOFF" } }
}

A plain bare identifier (no L prefix, no underscore) is NOT a call shape here — left for the flag word table and the visible unparsed warning: #BeforeBuild.UnparsedText: TOFRAME #AfterBuild:

{
  "UnparsedText": "TOFRAME"
}

An excluded name falls through whole (WRITE belongs to the quoted-statement quarantine): #BeforeBuild.UnparsedText: WRITE(VAR,“file”,“text”) #AfterBuild:

{
  "UnparsedText": "WRITE(VAR,\"file\",\"text\")"
}

Constructors

SiemensCallStatementSyntax()

Parameterless instance with default settings.

public SiemensCallStatementSyntax()

SiemensCallStatementSyntax(XElement)

Initializes a new instance by deserializing from the given XML element.

public SiemensCallStatementSyntax(XElement src)

Parameters

src XElement

Source XML element.

Properties

ExcludedNames

Identifiers this catch-all must never treat as a call — matched case-insensitively against the callee name. See the class remarks for the default rationale.

public List<string> ExcludedNames { get; set; }

Property Value

List<string>

Name

Syntax kind name (typically the concrete type name).

public string Name { get; }

Property Value

string

XName

XML element name used to register this syntax with XFactory.

public static string XName { get; }

Property Value

string

Methods

Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)

Build syntax arrangement into the syntaxPieceNode in-place.

public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)

Parameters

syntaxPieceNode LazyLinkedListNode<SyntaxPiece>
ncDependencyList List<INcDependency>
ncDiagnosticProgress NcDiagnosticProgress

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory