[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 114312: CPP syntax file: Support '#if(...)'
From: "Matthew Woehlke" <mw_triad () users ! sourceforge ! net>
Date: 2013-12-06 23:31:57
Message-ID: 20131206233157.15012.54719 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Dec. 5, 2013, 4:48 p.m., Dominik Haumann wrote:
> > Should be ok. ;)
>
> Dominik Haumann wrote:
> ...and don't forget to increase the version number in the xml file.
>
> Kevin Funk wrote:
> Okay to get rid off 'insensitive="true"' or what? :)
>
> Dominik Haumann wrote:
> Yes, remove the insensitive flag. Seems to be not valid C/C++ (at least gcc \
> comlains).
> Dominik Haumann wrote:
> By the way, instead of..: String="#\s*if(?:def|ndef)?(?=\s+\S)"
> does it also work to use: String="#\s*if(?:def|ndef)\b"
>
> I find the latter variant more simple to understand.
>
> Dominik Haumann wrote:
> Sorry, should be: String="#\s*if(?:def|ndef)?\b"
I'd argue that allows things like '#if-3<5'... but apparently so does gcc, so I guess \
that works for me.
Related, is there a meaningful difference between (a|ba) vs (b?a)? (I.e. \
"#\s*if(?:n?def)?\b"
- Matthew
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114312/#review45233
-----------------------------------------------------------
On Dec. 5, 2013, 5:09 a.m., Kevin Funk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114312/
> -----------------------------------------------------------
>
> (Updated Dec. 5, 2013, 5:09 a.m.)
>
>
> Review request for Kate.
>
>
> Repository: kate
>
>
> Description
> -------
>
> CPP syntax file: Support '#if(...)'
>
> This works fine: "echo "#if(1)\n#endif" | g++ -E -xc++ -"
>
>
> Additional question:
> Why are the Regexp for the preprocessor directives marked with \
> 'insensitive="true"'? Is there any compiler that support sth. like '#IF'? Otherwise \
> I'd like to get rid off that. Will probably give a little speedup as well (no case \
> insensitive search anymore).
>
> Diffs
> -----
>
> part/syntax/data/cpp.xml 1b001c59858f1f74dceba931ea3458dc117abcb4
>
> Diff: http://git.reviewboard.kde.org/r/114312/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Kevin Funk
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/114312/">http://git.reviewboard.kde.org/r/114312/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On December 5th, 2013, 4:48 p.m. EST, <b>Dominik \
Haumann</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Should be ok. ;)</pre> </blockquote>
<p>On December 5th, 2013, 4:48 p.m. EST, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">...and don't forget \
to increase the version number in the xml file.</pre> </blockquote>
<p>On December 5th, 2013, 5:24 p.m. EST, <b>Kevin Funk</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Okay to get rid off \
'insensitive="true"' or what? :)</pre> </blockquote>
<p>On December 6th, 2013, 9:52 a.m. EST, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, remove the \
insensitive flag. Seems to be not valid C/C++ (at least gcc comlains).</pre> \
</blockquote>
<p>On December 6th, 2013, 9:54 a.m. EST, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">By the way, instead \
of..: String="#\s*if(?:def|ndef)?(?=\s+\S)" does it also work to use: \
String="#\s*if(?:def|ndef)\b"
I find the latter variant more simple to understand.</pre>
</blockquote>
<p>On December 6th, 2013, 9:57 a.m. EST, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Sorry, should be: \
String="#\s*if(?:def|ndef)?\b"</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'd argue that \
allows things like '#if-3<5'... but apparently so does gcc, so I guess \
that works for me.
Related, is there a meaningful difference between (a|ba) vs (b?a)? (I.e. \
"#\s*if(?:n?def)?\b"</pre> <br />
<p>- Matthew</p>
<br />
<p>On December 5th, 2013, 5:09 a.m. EST, Kevin Funk wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Kevin Funk.</div>
<p style="color: grey;"><i>Updated Dec. 5, 2013, 5:09 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">CPP syntax file: Support '#if(...)'
This works fine: "echo "#if(1)\n#endif" | g++ -E -xc++ -"
Additional question:
Why are the Regexp for the preprocessor directives marked with \
'insensitive="true"'? Is there any compiler that support sth. like \
'#IF'? Otherwise I'd like to get rid off that. Will probably give a \
little speedup as well (no case insensitive search anymore).</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>part/syntax/data/cpp.xml <span style="color: \
grey">(1b001c59858f1f74dceba931ea3458dc117abcb4)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/114312/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic