<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Displaying Comma Separated Structures in FunctionList]]></title><description><![CDATA[<p dir="auto">The custom language I work with allows multiple structures with the same definition to be declared using one command. Here is the syntax:</p>
<p dir="auto">STRUCT name[{,name}] (contents)</p>
<p dir="auto">For example:<br />
STRUCT str1, str2, str3 (…)</p>
<p dir="auto">Is there a regex that would be able to grab all structure names and display them separately in the FunctionList? I was reading about recursion but that’s a little too advanced for me and I am not even sure it would work.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19873/displaying-comma-separated-structures-in-functionlist</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 03:34:39 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19873.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Aug 2020 05:27:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Displaying Comma Separated Structures in FunctionList on Tue, 18 Aug 2020 19:22:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Well done!</p>
<p dir="auto">Nitpicking: you could remove the <code>x</code> in <code>(?x-s)</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56917</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56917</guid><dc:creator><![CDATA[MAPJe71]]></dc:creator><pubDate>Tue, 18 Aug 2020 19:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to Displaying Comma Separated Structures in FunctionList on Tue, 18 Aug 2020 16:02:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
That’s awesome. Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56915</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56915</guid><dc:creator><![CDATA[Dravok]]></dc:creator><pubDate>Tue, 18 Aug 2020 16:02:40 GMT</pubDate></item><item><title><![CDATA[Reply to Displaying Comma Separated Structures in FunctionList on Tue, 18 Aug 2020 14:21:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dravok" aria-label="Profile: Dravok">@<bdi>Dravok</bdi></a> ,</p>
<p dir="auto">I created a small UDL called <code>CommaStruct</code>, and gave it a dummy file of:</p>
<pre><code>https://community.notepad-plus-plus.org/topic/19873/displaying-comma-separated-structures-in-functionlist
STRUCT str1, str2, str3 (…)
    STRUCT aaa, bbb, ccc (…)
STRUCT zzz (…,…,…)
</code></pre>
<p dir="auto">To my functionList.xml, I added:</p>
<pre><code>&lt;association id="CommaStruct"             userDefinedLangName="CommaStruct"    /&gt;
&lt;association id="CommaStruct"             ext=".csl"                           /&gt;
...
&lt;parser id="CommaStruct" displayName="Comma-based STRUCT" commentExpr=""&gt;
  &lt;function
    mainExpr="(?x-s)^\h*STRUCT\h+(\w+)|\G,\h*(\w+)"
  &gt;
    &lt;functionName&gt;
        &lt;nameExpr expr="(?:STRUCT\h+|,\h*)\K\w+" /&gt;
    &lt;/functionName&gt;
  &lt;/function&gt;
&lt;/parser&gt;
</code></pre>
<p dir="auto">When I reloaded, I saw:<br />
<img src="/assets/uploads/files/1597760342933-16ea5a9f-514b-4bef-ad2a-0dce9db2c517-image.png" alt="16ea5a9f-514b-4bef-ad2a-0dce9db2c517-image.png" class=" img-fluid img-markdown" /><br />
… so str1,str2,str3, aaa,bbb,ccc, and zzz were all recognized as STRUCT, which is what I understood you wanted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56914</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56914</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 18 Aug 2020 14:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to Displaying Comma Separated Structures in FunctionList on Tue, 18 Aug 2020 13:12:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dravok" aria-label="Profile: Dravok">@<bdi>Dravok</bdi></a> ,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mapje71" aria-label="Profile: MAPJe71">@<bdi>MAPJe71</bdi></a> or another FunctionList expert will have to chime in, but from my understanding, when the FunctionList parses the document, each match corresponds to a single entry in the FunctionList display; I don’t know of a way to make it grab multiple from the same line.</p>
<p dir="auto">However, maybe using an alternation in the regex with <code>\G</code> syntax (which says "start at the end of the previous match), it might be possible.  I’ll give it some thought, and if I have a chance to play around with that sometime today (and if no one else has beat me to it), I’ll see if I can come up with something</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56905</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56905</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 18 Aug 2020 13:12:48 GMT</pubDate></item></channel></rss>