update XML IO pattern.
This commit is contained in:
+37
-3
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Class FanucMacroCallSyntax | HiAPI-C# 2025 ">
|
||||
|
||||
<meta name="description" content="Inlines a Fanuc Custom Macro B one-shot call (G65 P_ L_ [letter value …]) into the source layer and binds the call-line argument letters to Vars.Local #1-#26 per the Type-I map (see ). Every inlined block carries the binding dict, a clone of the diagnostic record, and a id stamp — so LocalVariableLookup resolves arg references in a single-block lookup, a cache dump landing on any block immediately shows which call it belongs to, and downstream carries body-internal #1-#33 writes forward only within the same frame. The host block itself records but stays in the caller's frame (no stamp) and emits no motion act; after the macro body's last inlined block the pipeline continues naturally into the caller's next block (the inlined pieces sit ahead of the host block's successor in layers[0]). Frame isolation works on two layers. Statically, caller blocks have no stamp (frame id 0 by ), so the inlined frame ids (allocated fresh per L-repetition) never collide with main. Dynamically, LocalVariableLookup and compare frame ids before carrying any Vars.Local entry across a block boundary — a macro body's body-internal writes therefore stay inside the macro and never leak back into the caller's frame. Filename lookup mirrors : O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC — first match wins. The lookup root is (G65 has no "external storage" variant; M198's external root is M98/M198-only). L &gt; 1 inlines the same macro L times in series. Each repetition is a fresh segmentation pass (so each block gets its own JSON object — the downstream pipeline mutates JSON in place and would clobber sibling repetitions if instances were shared) and gets a fresh FileIndex (so (FileIndex, LineIndex) pairs stay unique across the L-copies of the same source lines). Pipeline placement: ahead of inside the Fanuc Evaluation so a hypothetical G65 P_ + M98 P_ on the same block expands the G65 macro first (would be an unusual but legal composition). Detection is on the Parsing.G65 sub-object written by (a ) — the keyword "G65" never reaches Parsing.Flags because the parameterized match has already consumed the text by the time runs.">
|
||||
<meta name="description" content="Inlines a Fanuc Custom Macro B one-shot call (G65 P_ L_ [letter value …]) into the source layer and binds the call-line argument letters to Vars.Local #1-#26 per the Type-I map (see ). Every inlined block carries the binding dict, a clone of the diagnostic record, and a id stamp — so resolves arg references in a single-block lookup, a cache dump landing on any block immediately shows which call it belongs to, and downstream carries body-internal #1-#33 writes forward only within the same frame. The host block itself records but stays in the caller's frame (no stamp) and emits no motion act; after the macro body's last inlined block the pipeline continues naturally into the caller's next block (the inlined pieces sit ahead of the host block's successor in layers[0]). Frame isolation works on two layers. Statically, caller blocks have no stamp (frame id 0 by ), so the inlined frame ids (allocated fresh per L-repetition) never collide with main. Dynamically, and compare frame ids before carrying any Vars.Local entry across a block boundary — a macro body's body-internal writes therefore stay inside the macro and never leak back into the caller's frame. Filename lookup mirrors : O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC — first match wins. The lookup root is (G65 has no "external storage" variant; M198's external root is M98/M198-only). L &gt; 1 inlines the same macro L times in series. Each repetition is a fresh segmentation pass (so each block gets its own JSON object — the downstream pipeline mutates JSON in place and would clobber sibling repetitions if instances were shared) and gets a fresh FileIndex (so (FileIndex, LineIndex) pairs stay unique across the L-copies of the same source lines). Pipeline placement: ahead of inside the Fanuc Evaluation so a hypothetical G65 P_ + M98 P_ on the same block expands the G65 macro first (would be an unusual but legal composition). Detection is on the Parsing.G65 sub-object written by (a ) — the keyword "G65" never reaches Parsing.Flags because the parameterized match has already consumed the text by the time runs.">
|
||||
<link rel="icon" href="../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../public/main.css">
|
||||
@@ -103,7 +103,7 @@ letters to <code>Vars.Local</code> <code>#1-#26</code> per the Type-I map (see
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>). Every inlined block carries the
|
||||
binding dict, a clone of the <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> diagnostic
|
||||
record, and a <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id stamp — so
|
||||
LocalVariableLookup resolves arg references in a
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html">LocalVariableLookup</a> resolves arg references in a
|
||||
single-block lookup, a cache dump landing on any block immediately
|
||||
shows which call it belongs to, and downstream
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> carries body-internal
|
||||
@@ -118,7 +118,7 @@ Frame isolation works on two layers. Statically, caller blocks
|
||||
have no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp (frame id 0 by
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a>), so the inlined frame ids (allocated
|
||||
fresh per <code>L</code>-repetition) never collide with main. Dynamically,
|
||||
LocalVariableLookup and
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html">LocalVariableLookup</a> and
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> compare frame ids
|
||||
before carrying any <code>Vars.Local</code> entry across a block boundary
|
||||
— a macro body's body-internal writes therefore stay inside the
|
||||
@@ -460,6 +460,40 @@ Since the folder can be moving with the configuration file.</p>
|
||||
|
||||
|
||||
|
||||
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Reg_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Reg*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Reg_Hi_Common_XmlUtils_XFactory_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Reg(Hi.Common.XmlUtils.XFactory)">
|
||||
Reg(XFactory)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Registers this type's deserializer with the given <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>
|
||||
(or <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Default">Default</a> when <code class="paramref">factory</code> is
|
||||
<code>null</code>). Idempotent.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static void Reg(XFactory factory = null)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>factory</code> <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user