<?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[Functionlist - Different results with different line endings]]></title><description><![CDATA[<p dir="auto">Hello everybody.</p>
<p dir="auto">I try to write a parser for universe basic files with a UNIX line ending which should list the labels. Some labels are found, some not. The only difference between the labels is that some directly end with a line ending and the other are followed by a comment. The labels followed by a comment are listed, the other not. After changing the line ending from Unix (LF) to Windows (CR + LF) all labels are listed. Here is an example:</p>
<pre><code>label1:\n
</code></pre>
<p dir="auto">Label not listed.</p>
<pre><code>label1:     ;* comment\n
</code></pre>
<p dir="auto">Label listed.</p>
<p dir="auto">Now change the line ending to Windows:</p>
<pre><code>label1:\r\n
</code></pre>
<p dir="auto">Label listed.</p>
<pre><code>label1:     ;* comment\r\n
</code></pre>
<p dir="auto">Label listed.</p>
<p dir="auto">Can somebody confirm this behavior? is there a way to list labels directly followed by a UNIX line ending?</p>
<p dir="auto">Sincerely Bernd</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12742/functionlist-different-results-with-different-line-endings</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 07:02:02 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12742.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Nov 2016 07:36:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Functionlist - Different results with different line endings on Tue, 22 Nov 2016 06:50:56 GMT]]></title><description><![CDATA[<p dir="auto">Many thanks for your solution. Your Parser works fine.</p>
<p dir="auto">It also gives me a lot of stuff to study. I never heard of Pattern Modifiers before. I looked for Pattern Modifiers and found a tutorial on  <a href="http://www.regular-expressions.info/tutorial.html" title="regular-expressions.info" rel="nofollow ugc">regular-expressions.info</a>. I’ll try to work it through and learn more about Regular Expressions.</p>
<p dir="auto">Sincerely Bernd</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19410</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19410</guid><dc:creator><![CDATA[Bernd Peters-Hagemann]]></dc:creator><pubDate>Tue, 22 Nov 2016 06:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to Functionlist - Different results with different line endings on Fri, 18 Nov 2016 17:34:31 GMT]]></title><description><![CDATA[<p dir="auto">Escape of colon (<code>\:</code>) is not wrong but not required either. Can’t find anything else.</p>
<p dir="auto">My take:</p>
<pre><code class="language-XML">			&lt;parser
				displayName="UniVerse BASIC"
				id         ="universe_basic"
				commentExpr="(?x)                                               # Utilize inline comments (see `RegEx - Pattern Modifiers`)
						(?m-s:
							(?:^|;)                                             # at start-of-line or after end-of-statement
							\h*                                                 # optional leading whitespace
							(?-i:REM\b|\x24\x2A|[\x21\x2A])                     # Single Line Comment 1..4
							.*$                                                 # whatever, until end-of-line
						)
					|	(?:\x22[^\x22\r\n]*\x22)                                # String Literal - Double Quoted
					|	(?:\x27[^\x27\r\n]*\x27)                                # String Literal - Single Quoted
					|	(?:\x5C[^\x5C\r\n]*\x5C)                                # String Literal - Backslash Quoted
					"
			&gt;
				&lt;function
					mainExpr="(?x)                                              # Utilize inline comments (see `RegEx - Pattern Modifiers`)
							(?m-i)^                                             # case-sensitive, NO leading whitespace
							(?:
								\d+\b(?=:?)                                     # completely numeric label, colon optional + discarded
							|	[A-Za-z_][\w.$%]*(?=:)                          # alphanumeric label, colon required + discarded
							)
						"
				/&gt;
			&lt;/parser&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/19348</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19348</guid><dc:creator><![CDATA[MAPJe71]]></dc:creator><pubDate>Fri, 18 Nov 2016 17:34:31 GMT</pubDate></item><item><title><![CDATA[Reply to Functionlist - Different results with different line endings on Fri, 18 Nov 2016 11:11:33 GMT]]></title><description><![CDATA[<p dir="auto">I copied the parser from BAT-files and change it:</p>
<pre><code>&lt;parser
    id         ="universe-basic"
    displayName="UniVerse Basic"
    commentExpr="(^\*.*?$)"
&gt;
    &lt;function
        mainExpr="^[\w.]+\:"
    &gt;
    &lt;!--
        &lt;functionName&gt;
            &lt;nameExpr expr=".*:" /&gt;
        &lt;/functionName&gt;
    --&gt;
    &lt;/function&gt;
&lt;/parser&gt;
</code></pre>
<p dir="auto">I only use the mainExpr to list the labels. Maybe this is also a reason the not listed labels.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19338</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19338</guid><dc:creator><![CDATA[Bernd Peters-Hagemann]]></dc:creator><pubDate>Fri, 18 Nov 2016 11:11:33 GMT</pubDate></item><item><title><![CDATA[Reply to Functionlist - Different results with different line endings on Thu, 17 Nov 2016 20:56:28 GMT]]></title><description><![CDATA[<p dir="auto">Yes there is a way. It depends how you implemented the parser. So it might be helpful if you post your parser.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19323</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19323</guid><dc:creator><![CDATA[MAPJe71]]></dc:creator><pubDate>Thu, 17 Nov 2016 20:56:28 GMT</pubDate></item></channel></rss>