Table of Contents

Class NumberedFlagSyntax

Namespace
Hi.Numerical.SoftParsers.SyntaxBased
Assembly
HiMech.dll

Syntax for numbered flags (prefix + number) with optional decimal support. NumberedFlagSyntax often should place after something like ParameterizedFlagSyntax. Since NumberedFlagSyntax is easy to eat those kind of flags.

public class NumberedFlagSyntax : INcSyntax
Inheritance
NumberedFlagSyntax
Implements
Inherited Members
Extension Methods

Remarks

Examples:

  • Integer codes: G0, G1, G54, M3, M30, T5, S1000
  • Decimal codes: G54.1 (Fanuc extended work coordinates)
Note: Parameters like P2 in G54.1P2 should be handled by TagSetupSyntax separately.

Constructors

NumberedFlagSyntax(IEnumerable<string>, IEnumerable<string>, bool)

Creates a new NumberedFlagSyntax instance.

public NumberedFlagSyntax(IEnumerable<string> categoryPath, IEnumerable<string> codePrefixes, bool allowDecimal = true)

Parameters

categoryPath IEnumerable<string>

JSON path for storing matched codes.

codePrefixes IEnumerable<string>

Code prefixes to match (e.g., [“G”, “M”]).

allowDecimal bool

Whether to allow decimal numbers.

Properties

AllowDecimal

Whether to allow decimal numbers (e.g., G54.1).

public bool AllowDecimal { get; set; }

Property Value

bool

CategoryPath

Category path for storing matched codes in JSON.

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

Property Value

List<string>

CodePrefixes

Code prefixes to match (e.g., [“G”, “M”]).

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

Property Value

List<string>

Name

public string Name { get; }

Property Value

string

Methods

ToArranged(JsonObject)

Get arranged json from src.

public JsonObject ToArranged(JsonObject src)

Parameters

src JsonObject

Returns

JsonObject