<?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[UDL Syntax coloring for JSON-encoded language]]></title><description><![CDATA[<p dir="auto">Hello everyone<br />
I am trying to define a UDL for a Language called “TTP” - Table Type Patterns, used by ONF (<a href="http://www.opennetworking.org" rel="nofollow ugc">www.opennetworking.org</a>) to describe OpenFlow Switches.</p>
<p dir="auto">The trouble I am having is that the language is JSON encoded. EVRYTHING is a string, and<br />
the general structure is full of nested objects and lists with the final elements being Name:value pairs separated by commas.</p>
<p dir="auto">{<br />
“name”: [<br />
{“name” : “value”, “name”:“value”}<br />
]<br />
}</p>
<p dir="auto">I can ALMOST get it done, but</p>
<ol>
<li>I manage to define the keywords by using "keyword" in the lists and defined styles</li>
<li>I added both : and , as operators</li>
<li>I defined both { and [ and } ] as start-end code-folding markers</li>
</ol>
<p dir="auto">this gets me about 95% of what I want. I need help with the last 5%</p>
<ol>
<li>
<p dir="auto">The Language uses sometimes hex numbers in strings, like so '0x1000". I can’t<br />
figure out how to teach UDL this is a number.</p>
</li>
<li>
<p dir="auto">The language has a built in keyword that introduces a comment string. Like this:</p>
<pre><code>"doc": "Descriptive text here.",
</code></pre>
</li>
</ol>
<p dir="auto">but also can be multi-line</p>
<pre><code>   "doc": ["Descriptinve text line 1:",
          " - Descriptinve text Line 2",
          " - Descriptinve text line 3" ]
</code></pre>
<p dir="auto">If I define “doc” as a starting delimiter, I can define EITHER ‘]’ or ‘,’ as closing the delimiter, but not<br />
both. One works correctly for the multi-line, but fails on the 1-line version that does not have a closing brace as the next character, and the other works on the one-liner, but not on the block. AM I missing something?</p>
<ol start="3">
<li>(bonus) a couple of keywords actually have two distinct usages. in one context I want them styles as per “1st Group” and in the other context I’d want them styles as per '2nd Group". Is there a way to do this?</li>
</ol>
<p dir="auto">Thanks,<br />
Michael Orr</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11102/udl-syntax-coloring-for-json-encoded-language</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 05:13:30 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11102.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Jan 2016 00:59:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Wed, 20 Jan 2016 18:57:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael" aria-label="Profile: Michael">@<bdi>Michael</bdi></a> Orr<br />
Hello Michael,</p>
<p dir="auto">unfortunattely I din’t get it managed.<br />
I strongly believe that the current version of UDL cannot answer this question.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13444</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13444</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Wed, 20 Jan 2016 18:57:02 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Mon, 18 Jan 2016 19:17:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello Michael,</p>
<p dir="auto">thank you for the explanation. Fyi I’m still working on the comment line - the closest I have is that<br />
the line next to doc line is coloured as well.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13373</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13373</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 18 Jan 2016 19:17:35 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Mon, 18 Jan 2016 17:51:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/claudia-frank" aria-label="Profile: Claudia-Frank">@<bdi>Claudia-Frank</bdi></a> Yes, “encased” is the same as Surrounded in this context. “encased” is like saying “in a case” so “encased in Quote marks” is like saying “in a case made from quote marks” == Surrounded by quote marks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13367</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13367</guid><dc:creator><![CDATA[Michael Orr]]></dc:creator><pubDate>Mon, 18 Jan 2016 17:51:26 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Fri, 15 Jan 2016 02:48:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello Michael,</p>
<p dir="auto">ok - the encased hexnumber is solved, I guess.<br />
Just define a delimiter double quote (of course, the char not the word) and allow nesting with numbers.</p>
<p dir="auto">Let see if we find a solution to comment issue as well.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13271</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13271</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 15 Jan 2016 02:48:46 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Fri, 15 Jan 2016 01:39:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello Michael,</p>
<p dir="auto">I guess both open requests cannot be solved.<br />
The closing delimiter for the comment, the comma is used in the text as well<br />
and double quotes making a string out of the hex value.</p>
<p dir="auto">Still looking into it but I don’t think it can be achieved.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13270</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13270</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 15 Jan 2016 01:39:46 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Fri, 15 Jan 2016 01:19:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello Michael,</p>
<p dir="auto">yes, the <a href="http://udl20.weebly.com/delimiters.html" rel="nofollow ugc">delimiter section</a> is hidden on the udl webpage,<br />
don’t know why and just right now I saw that there is another hidden page to.<br />
You can find it when you hover over the home link and then move slowly down, suddenly delimiter link appears.<br />
If you move then to the right a numbers new link appears. Seems webmaster had some fun ;-)</p>
<p dir="auto">From the doc<br />
If two or more strings are defined inside of a special operator (( )), they are interchangeable.<br />
So you can have multiple closing delimiters but you need to encase (?) it by (( and )).</p>
<p dir="auto">Regarding the number encased by double quotes, I guess you are right, need to think about it.</p>
<p dir="auto">One question, I’m not a native speaker and always eager to improve my english.<br />
When you say encased by quotes is it the same as saying surrounded by quotes or<br />
does it have slightly different meanings?</p>
<p dir="auto">Thank you and cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13268</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13268</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 15 Jan 2016 01:19:32 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Fri, 15 Jan 2016 00:49:57 GMT]]></title><description><![CDATA[<p dir="auto">Claudia - First let me thank you for jumping in so fast.</p>
<p dir="auto">However, at the risk of being dense, I am still in the dark</p>
<ol>
<li>I <em>did</em> define the hex number format, as per the documentation I found, and it works<br />
for “naked” hex numbers, but not for ones encased in Quotes. so it works for<br />
0x12AB and for " 0x12AB " (note spaces between quote make and digits)  but not for “0x12AB”</li>
<li>I did not understand how to use the ‘((’ operator and what it does from your note, and I do not<br />
seem to see it in the documentation - can you give me a pointer? or an example how I might<br />
use it?</li>
</ol>
<p dir="auto">By way of Illustration, and assuming I have not already imposed on your time too much, I am copy-pasting below a snippet of the TTP language, so you get the flavor of it<br />
better.</p>
<p dir="auto">The “doc” elements are the ones I was referring to in my 2nd question. They are a sort of comment, but they are not a comment of THIS source, they are a comment of the TARGET when this code is “compiled”.<br />
I wanted to color them, but if I set ‘doc’ as delimiter 1 open and ‘,’ (a comma) as delimiter 1 close  then the 1st 2 instances are correctly marked, but in the last one marking stops at after the 4t6h word. If I set ‘]’ as the delimiter1 close, then the two liens following the 1st “doc” are incorrectly marked as if they were part of the “doc” element</p>
<p dir="auto">…<br />
{<br />
“name”: “Control-Frame-Filter”,<br />
“doc”: “Mandatory filtering of control frames with C-VLAN Bridge reserved DA.”,<br />
“priority”: 1,<br />
“match_set”: [{“field”:“ETH_DST”,“mask”:“0xfffffffffff0”,“value”:“0x0180C2000000”}],<br />
“instruction_set”: []<br />
},</p>
<pre><code>    {
      "name": "Non-Control-Frame",
      "doc": "Mandatory miss flow_mod, sends packets to IngressVLAN table.",
      "priority": 0,
      "match_set": [],
      "instruction_set": [{"instruction": "GOTO_TABLE", "table": "IngressVLAN"}]
    }
  ]  // BI FM = List of two Elements, each itself a FMT {name,doc, pri match:[],IS:[]}
},  // ControlFrame FlowTable
{
  "name": "IngressVLAN",
  "doc": ["Ingress VID processing table, including:",
          " - accepting or blocking untagged and priority tagged frames",
          " - accepting or blocking VLAN tagged frames",
          " - ingress VID filtering control",
          " - (optional) ingress VID translation" ],
</code></pre>
<p dir="auto">…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13267</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13267</guid><dc:creator><![CDATA[Michael Orr]]></dc:creator><pubDate>Fri, 15 Jan 2016 00:49:57 GMT</pubDate></item><item><title><![CDATA[Reply to UDL Syntax coloring for JSON-encoded language on Thu, 14 Jan 2016 13:27:31 GMT]]></title><description><![CDATA[<p dir="auto">Hello Michael-Orr,</p>
<p dir="auto">Here’s a quick one before I have to leave</p>
<blockquote>
<p dir="auto">The Language uses sometimes hex numbers in strings, like so '0x1000".<br />
I can’t figure out how to teach UDL this is a number.</p>
</blockquote>
<pre><code>Number style-&gt;Prefix 2: 0x
Number style-&gt;Extras 1: A B C D E F a b c d e f  (digits are recognized anyway)
</code></pre>
<blockquote>
<p dir="auto">The language has a built in keyword that introduces a comment string. Like this:</p>
</blockquote>
<p dir="auto">use the special operator (( ))  like</p>
<pre><code>(( , ] ))
</code></pre>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/13247</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/13247</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Thu, 14 Jan 2016 13:27:31 GMT</pubDate></item></channel></rss>