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

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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).
Help us help you: attach a .love.
Brother Erryn
Prole
Posts: 15
Joined: Fri Mar 20, 2009 2:37 am

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

Post 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.
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

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

Post 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.
Now posting IN STEREO (where available)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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).
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin »

bartbes wrote:EOF might be a problem,
Dunno which dialect is needed here, but in Python, \Z matches EOF.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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*
Help us help you: attach a .love.
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

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

Post 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-)
Now posting IN STEREO (where available)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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...)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Ross and 48 guests