Page 5 of 6

Re: DEVötiön IDE (Now available for Download!)

Posted: Fri May 08, 2009 10:20 am
by Robin
CR4SH3D wrote:something like spliff is still picked up as if by auto complete (make the check string "if " i think to fix it?)
Does C# have regular expressions? If so, the check should probably be "(nonalphanumeric)if(nonalphanumeric)" (with (nonalphanumeric) replaced with the right escape code.)
If not, how about looking for " if " (but \n and \t have to be replaced by " " in a temporary string).

Re: DEVötiön IDE (Now available for Download!)

Posted: Fri May 08, 2009 9:08 pm
by Brother Erryn
Certainly, but that parsing is being handled inside the syntax highlighter control that is really a "3rd party" control. The source is part of the project, but I haven't delved into it that much. Most likely any problem like you're describing is in how the syntax file is set up.

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 1:34 pm
by mike
Robin wrote:Does C# have regular expressions? If so, the check should probably be "(nonalphanumeric)if(nonalphanumeric)" (with (nonalphanumeric) replaced with the right escape code.)
If not, how about looking for " if " (but \n and \t have to be replaced by " " in a temporary string).
What if "if" is the first text in a line? Does (nonalphanumeric) handle line-breaks as well? What if it is the first/last text in a document? Won't you have to add the contingency:
"(nonalphanumeric|beginningoftext)if(nonalphanumeric|endoftext)"

I've used regex a lot, but there are certain quirks that I am still unsure of, especially when it comes to the different syntaxi.

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 2:24 pm
by Robin
Well, I'm used to Python regex, and there newlines can be matched just like any other character.
The search string one would use would probably be something like r"[\A\W]if[\Z\W]", or r"[\A\W]if[\W]" if it's not necessary to match an "if" at the end of the file.

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 5:12 pm
by bartbes
Nonalphanumeric is every character that is.. not alphanumeric, so yes, it will match newlines. EOF might be a problem, you'd say * is enough (0 or more), but that also matches ifa (for example).

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 5:18 pm
by Robin
bartbes wrote:EOF might be a problem,
Dunno which dialect is needed here, but in Python, \Z matches EOF.

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 5:20 pm
by bartbes
Well, yes, but the problem is you need to match (>0, nonalphanumeric)if(>0, nonalphanumeric), which doesn't match EOF. (I know that's not a regex, don't yell at me)

Re: DEVötiön IDE (Now available for Download!)

Posted: Sun May 10, 2009 6:00 pm
by Robin
For the other: please disregard above discussion. It's nonsense. We don't know anything about regexes in C#. Look over there! Ponies! *runs off while everybody looks the other way*

Re: DEVötiön IDE (Now available for Download!)

Posted: Mon May 11, 2009 1:24 am
by mike
Robin wrote:For the other: please disregard above discussion. It's nonsense. We don't know anything about regexes in C#. Look over there! Ponies! *runs off while everybody looks the other way*
You and your damned ponies... jeez 8-)

Re: DEVötiön IDE (Now available for Download!)

Posted: Mon May 11, 2009 3:21 pm
by Robin
mike wrote:You and your damned ponies... jeez 8-)
What about them? :( Why are you saying such mean things? :cry:
But anyway, :ehem: to return to the topic at hand: we have no clue about regexes in C#. At least I don't. Please, somebody who knows what the heck they are talking about: say something! (Or, you know... post a reply...)