<?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[User-Defined Language: cannot make Extras2 work with Suffix1]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">I’m trying to set up my own syntax highlighting for VerilogHDL.<br />
Binary and Decimal numbers i has successfully set up ( Suffix1='b 'd ) - they are yellow now as i wanted.<br />
Problem is, i cannot set up Hexadecimals the same way. I added 'h to Suffix1 and a-f A-F to Extras2 but it’s not working: numbers like 8’hF8  are still grey.<br />
I followed advices from <a href="https://ivan-radic.github.io/udl-documentation/" rel="nofollow ugc">https://ivan-radic.github.io/udl-documentation/</a><br />
What do i do wrong?</p>
<pre><code>        &lt;Keywords name="Numbers, extras2"&gt;A B C D E F a b c d e f&lt;/Keywords&gt;
        &lt;Keywords name="Numbers, suffix1"&gt;&amp;apos;b &amp;apos;d &amp;apos;h&lt;/Keywords&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/topic/13885/user-defined-language-cannot-make-extras2-work-with-suffix1</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 12:56:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13885.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 May 2017 10:32:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to User-Defined Language: cannot make Extras2 work with Suffix1 on Tue, 30 May 2017 13:15:46 GMT]]></title><description><![CDATA[<p dir="auto">The difference is probably because 'b and 'd will have normal digits (0-1 or 0-9) both before and after the 'b or 'd, whereas 'h will also have letters after.  And since UDL defines it as a suffix, not an infix, it gets confused once there’s a non-numeric <em>after</em> the <em>suffix</em>.  You might try to define all the hex prefixes you generally use in your Verilog in the Prefix 2 entry:</p>
<pre><code>&lt;Keywords name="Numbers, prefix2"&gt;1&amp;apos;h 2&amp;apos;h 3&amp;apos;h 4&amp;apos;h 5&amp;apos;h 6&amp;apos;h 7&amp;apos;h 8&amp;apos;h 12&amp;apos;h 16&amp;apos;h 32&amp;apos;h 64&amp;apos;h&lt;/Keywords&gt;
</code></pre>
<p dir="auto">However, if you happened to have an 11-bit segment you tried to access as 11’h75A, but hadn’t included <code>11&amp;apos;h</code> in your prefix 2, it wouldn’t highlight for you.</p>
<p dir="auto">Is there a reason you aren’t using the built-in Verilog lexer?  It defaults to Verilog for extensions v, sv, vh, and svh; I added vams (using Settings &gt; Style Configurator &gt;  Verilog &gt; User Ext).</p>
<p dir="auto">I’m not a huge user of Verilog and its variants, but in the times I have been editing such files, I haven’t noticed any significant deficiency.  It properly highlights any bitness for hex, binary, and decimal that I’ve noticed, and the other syntax I’ve used has looked reasonable.</p>
<p dir="auto">If there are words that aren’t getting marked up using the Verilog lexer, you can use the Style Configurator to add custom words: both INSTRUCTION WORD and KEYWORD have a User-defined box for extending what gets highlighted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/24700</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24700</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 30 May 2017 13:15:46 GMT</pubDate></item><item><title><![CDATA[Reply to User-Defined Language: cannot make Extras2 work with Suffix1 on Sun, 28 May 2017 20:29:48 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for reply, fuhrmanator!</p>
<p dir="auto">There’s no mistake - it’s 8’hF8 with &amp;apos ( it appears as ’ in preview already, funnily enough ).<br />
'b and 'd work as suffix OK, even if they have digit(s) after them.<br />
Is there any way to highlight the numbers with 'h inside?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/24665</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24665</guid><dc:creator><![CDATA[ianpo100]]></dc:creator><pubDate>Sun, 28 May 2017 20:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to User-Defined Language: cannot make Extras2 work with Suffix1 on Sun, 28 May 2017 15:54:57 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">numbers like 8’hF8 are still grey.</p>
</blockquote>
<p dir="auto">Did you mean 8F8’h ? Otherwise, your suffix 'h is not a suffix.</p>
<p dir="auto">Also, is it possible you’re mixing apostrophe characters? There are two (making them big so you can see the difference):</p>
<h1><code>’</code> vs  <code>'</code></h1>
<p dir="auto">Your quoted text number looks like this:</p>
<h1><code>8’hF8</code></h1>
<p dir="auto">whereas your suffix is defined as</p>
<h1><code>Suffix1='b 'd</code></h1>
<p dir="auto">The XML shows also you’re defining it as <code>&amp;apos;</code> or</p>
<h1>'</h1>
]]></description><link>https://community.notepad-plus-plus.org/post/24655</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/24655</guid><dc:creator><![CDATA[fuhrmanator]]></dc:creator><pubDate>Sun, 28 May 2017 15:54:57 GMT</pubDate></item></channel></rss>