Archived
deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.
This commit is contained in:
@@ -229,8 +229,8 @@ Class NcSyntaxUtil
|
||||
|
||||
<a id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagAssignment_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagAssignment*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagAssignment_System_String__System_Collections_Generic_IEnumerable_System_String__System_String_System_Collections_Generic_IEnumerable_System_String__" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagAssignment(System.String@,System.Collections.Generic.IEnumerable{System.String},System.String,System.Collections.Generic.IEnumerable{System.String})">
|
||||
GrabTagAssignment(ref string, IEnumerable<string>, string, IEnumerable<string>)
|
||||
<h3 id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagAssignment_System_String__System_Collections_Generic_IEnumerable_System_String__System_String_System_Collections_Generic_IEnumerable_System_String__Hi_NcParsers_Syntaxs_ExpressionPrefixParser_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagAssignment(System.String@,System.Collections.Generic.IEnumerable{System.String},System.String,System.Collections.Generic.IEnumerable{System.String},Hi.NcParsers.Syntaxs.ExpressionPrefixParser)">
|
||||
GrabTagAssignment(ref string, IEnumerable<string>, string, IEnumerable<string>, ExpressionPrefixParser)
|
||||
|
||||
</h3>
|
||||
|
||||
@@ -243,7 +243,7 @@ Fanuc: #1=#2+#3</p>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static List<TagValue> GrabTagAssignment(ref string unparsedText, IEnumerable<string> targetTags, string varPrefix, IEnumerable<string> terminateWords = null)</code></pre>
|
||||
<pre><code class="lang-csharp hljs">public static List<TagValue> GrabTagAssignment(ref string unparsedText, IEnumerable<string> targetTags, string varPrefix, IEnumerable<string> terminateWords = null, ExpressionPrefixParser rhsPrefixParser = null)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
@@ -260,6 +260,15 @@ Fanuc: #1=#2+#3</p>
|
||||
<dt><code>terminateWords</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
||||
<dd><p>words that terminate expression (e.g., F, G, M, S).
|
||||
These are different from varPrefix - they signal end of expression, not variables.</p>
|
||||
</dd>
|
||||
<dt><code>rhsPrefixParser</code> <a class="xref" href="Hi.NcParsers.Syntaxs.ExpressionPrefixParser.html">ExpressionPrefixParser</a></dt>
|
||||
<dd><p>Optional longest-valid-prefix expression
|
||||
parser (see <a class="xref" href="Hi.NcParsers.Syntaxs.ExpressionPrefixParser.html">ExpressionPrefixParser</a>). When provided and a
|
||||
prefix parses, it supersedes both the lexical boundary and the
|
||||
<code class="paramref">terminateWords</code> cut for that match — the grammar
|
||||
itself ends the RHS (<code>R26=R64-14/2 R23=2</code>,
|
||||
<code>Z=R63 + 150 X100</code>); the lexical machinery remains the per-match
|
||||
fallback when no prefix parses.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -280,26 +289,91 @@ These are different from varPrefix - they signal end of expression, not variable
|
||||
|
||||
|
||||
|
||||
<a id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagEqualsValue_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagEqualsValue*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagEqualsValue_System_String__System_Collections_Generic_IEnumerable_System_String__Hi_NcParsers_Syntaxs_ExpressionPrefixParser_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagEqualsValue(System.String@,System.Collections.Generic.IEnumerable{System.String},Hi.NcParsers.Syntaxs.ExpressionPrefixParser)">
|
||||
GrabTagEqualsValue(ref string, IEnumerable<string>, ExpressionPrefixParser)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Get tag values written in the Siemens address=value form
|
||||
(an explicit <code>=</code> between a single-letter tag and its value).
|
||||
ex.
|
||||
Siemens: X=100, Z=R63+150, C=R61, F=R103, Z=_Z_HOME</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static List<TagValue> GrabTagEqualsValue(ref string unparsedText, IEnumerable<string> targetTags, ExpressionPrefixParser rhsPrefixParser = null)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>unparsedText</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>The NC text to parse and modify.</p>
|
||||
</dd>
|
||||
<dt><code>targetTags</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
||||
<dd><p>candidate target tags to extract values for</p>
|
||||
</dd>
|
||||
<dt><code>rhsPrefixParser</code> <a class="xref" href="Hi.NcParsers.Syntaxs.ExpressionPrefixParser.html">ExpressionPrefixParser</a></dt>
|
||||
<dd><p>Optional longest-valid-prefix expression
|
||||
parser delimiting each RHS (see <a class="xref" href="Hi.NcParsers.Syntaxs.ExpressionPrefixParser.html">ExpressionPrefixParser</a>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Hi.NcParsers.Syntaxs.TagValue.html">TagValue</a>></dt>
|
||||
<dd><p>List of extracted tag values.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="section" id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagEqualsValue_System_String__System_Collections_Generic_IEnumerable_System_String__Hi_NcParsers_Syntaxs_ExpressionPrefixParser__remarks">Remarks</h4>
|
||||
<div class="markdown level1 remarks"><p>Without <code class="paramref">rhsPrefixParser</code>, the value is captured as
|
||||
the following non-whitespace run, so arithmetic expressions without
|
||||
embedded spaces (<code>R63+150</code>) and named-variable references
|
||||
(<code>_Z_HOME</code>) survive as strings for the evaluation stage; numeric
|
||||
literals are typed later by the caller's converter
|
||||
(e.g. <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.FloatTagValueSyntax.html#Hi_NcParsers_ParsingSyntaxs_FloatTagValueSyntax_ToFloat_System_String_">ToFloat(string)</a>).
|
||||
With <code class="paramref">rhsPrefixParser</code> (parser-delimited capture),
|
||||
the value is the longest valid expression prefix after the <code>=</code> —
|
||||
spaced arithmetic (<code>R63 + 150</code>), balanced call parentheses
|
||||
(<code>DC(47.296)</code>) and glued following words (<code>X=100Y50</code>) all
|
||||
delimit correctly; the lexical <code>\S+</code> run stays as the per-match
|
||||
fallback when no prefix parses.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagValue_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagValue*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagValue_System_String__System_Collections_Generic_IEnumerable_System_String__System_String_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagValue(System.String@,System.Collections.Generic.IEnumerable{System.String},System.String)">
|
||||
GrabTagValue(ref string, IEnumerable<string>, string)
|
||||
<h3 id="Hi_NcParsers_Syntaxs_NcSyntaxUtil_GrabTagValue_System_String__System_Collections_Generic_IEnumerable_System_String__System_String_System_Boolean_" data-uid="Hi.NcParsers.Syntaxs.NcSyntaxUtil.GrabTagValue(System.String@,System.Collections.Generic.IEnumerable{System.String},System.String,System.Boolean)">
|
||||
GrabTagValue(ref string, IEnumerable<string>, string, bool)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Get tag values.
|
||||
Concatenated tag-value syntax (no = sign).
|
||||
The syntax is for assignment with space or no separation.
|
||||
Concatenated tag-value syntax (no = sign), glued by default:
|
||||
the value must follow the tag immediately. Pass
|
||||
<code class="paramref">allowSpacedValue</code> to also accept whitespace
|
||||
between tag and value (the Heidenhain detached feed word).
|
||||
ex.
|
||||
Heidenhain: L X Q2 Y33.4 FQ1
|
||||
Heidenhain: L X Q2 Y33.4 F+Q1
|
||||
Heidenhain: L X+10 Y33.4 FQ1
|
||||
Heidenhain (allowSpacedValue): L Z-22.5 F 20000
|
||||
ISO: X100.3Y3.3
|
||||
Fanuc Macro: X[#1+#2] Y[#1*2+100]</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static List<TagValue> GrabTagValue(ref string unparsedText, IEnumerable<string> targetTags, string varPrefix)</code></pre>
|
||||
<pre><code class="lang-csharp hljs">public static List<TagValue> GrabTagValue(ref string unparsedText, IEnumerable<string> targetTags, string varPrefix, bool allowSpacedValue = false)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
@@ -312,6 +386,13 @@ Fanuc Macro: X[#1+#2] Y[#1*2+100]</p>
|
||||
</dd>
|
||||
<dt><code>varPrefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>variable index code prefix. ex. Fanuc # for #123; Heidenhain Q for Q123.</p>
|
||||
</dd>
|
||||
<dt><code>allowSpacedValue</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
||||
<dd><p>when true, whitespace may separate a
|
||||
tag from its value (<code>F 20000</code>); the value grammar must still
|
||||
match right after the run, so <code>F MAX</code> or <code>F X+10</code> stay
|
||||
unclaimed. Default false keeps the glued-only grammar every other
|
||||
brand pins.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user