Table of Contents

Class HeidenhainLblSyntax

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

Syntax for Heidenhain LBL command (label definition). Label can be a number (1-65535) or a text name (e.g., “MyLabel”). LBL 0 is reserved for end of subprogram.

Only a DEFINITION is captured: CALL LBL (any spacing) and the FN 9–12 jump spellings (GOTO LBL n, glued GOTOLBL) are excluded — this syntax doubles as the label-scan probe of the P4 call machinery, where mistaking a jump line (or the call line itself) for a definition splices the wrong program section.

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

Examples

#BeforeBuild.UnparsedText: LBL 1 #AfterBuild:

{
  "Parsing": {
    "LBL": { "Name": "1" }
  }
}

#BeforeBuild.UnparsedText: LBL MyLabel #AfterBuild:

{
  "Parsing": {
    "LBL": { "Name": "MyLabel" }
  }
}

#BeforeBuild.UnparsedText: LBL 0 (LBL 0 is the end-of-subprogram sentinel) #AfterBuild:

{
  "Parsing": {
    "LBL": { "Name": "0" }
  }
}

#BeforeBuild.UnparsedText: LBL “SLOW_FEED” (quotes are stripped from the captured name) #AfterBuild:

{
  "Parsing": {
    "LBL": { "Name": "SLOW_FEED" }
  }
}

#BeforeBuild.UnparsedText: FN 12: IF +Q1 LT +5 GOTO LBL 5 (a jump target, not a definition — the line is left whole for the FN jump family) #AfterBuild:

{
  "UnparsedText": "FN 12: IF +Q1 LT +5 GOTO LBL 5"
}

#BeforeBuild.UnparsedText: G98 L1 (the DIN/ISO definition twin — the G98/L pair is claimed together, so no G98 flag leaks to the numbered-flag capture) #AfterBuild:

{
  "Parsing": {
    "LBL": { "Name": "1" }
  }
}

Constructors

HeidenhainLblSyntax()

Initializes a new instance with default settings.

public HeidenhainLblSyntax()

HeidenhainLblSyntax(XElement)

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

public HeidenhainLblSyntax(XElement src)

Parameters

src XElement

Source XML element.

Properties

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