New Language Setup - Block Comment defining

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
AlanStewart
Posts: 82
Joined: Fri Jun 02, 2006 6:52 pm

New Language Setup - Block Comment defining

Post by AlanStewart » Sat Jan 05, 2013 12:40 am

Hello.

We are doing some amazing development work here with a new language called Relish that is pretty sweet to use despite annoying the <bleep> outta me occasionally. Getting Zeus set up for it was pretty much a slam-dunk after following your walk-through here:
http://www.zeusedit.com/zforum/viewtopic.php?t=176

However, one of the "features" of the language is Python-like block comments using """ to start and """ to end. (I will keep my own thoughts to myself about who thinks it's a good idea to use the same string to start and end comments, much less use a VERY commonly used character like ".) Okay, this is cool. Except that putting """ and """ in the Comment Details of the Keywords dialog just doesn't seem to work for me. So I looked up how it's done for Python. And it's not defined at ALL for Python so how is it being done? Is it something completely separate like some sort of docstring recognition?

One thing I did try that didn't work was try to define that the start string was ^""" and the end string """$ but of course that was a no-go because there's only 3 characters allowed and it doesn't use regex parsing anyways.

Also, what's the difference between Comment Details #1 and #2? Is it just so that there can be multiple comment strings defined for really complicated languages?

Thanks,
Alan

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Sun Jan 06, 2013 10:46 pm

Hi Alan,
I will keep my own thoughts to myself about who thinks it's a good idea to use the same string to start and end comments, much less use a VERY commonly used character like

I could not agree with you more. From an editor's point of view that pattern and choice of character is about as hard as it gets to parse :(
And it's not defined at ALL for Python so how is it being done?
In your new language defintion just go to the Keywords section turn on the Enable triple quotes option ;)
Also, what's the difference between Comment Details #1 and #2? Is it just so that there can be multiple comment strings defined for really complicated languages?

Yep. The original Zeus was only every designed to have one block comment (based on c/c++). That worked fine for many years, until of course, language designers starting creating new languages with mulitple ways of doing block commenting :(

Cheers Jussi

AlanStewart
Posts: 82
Joined: Fri Jun 02, 2006 6:52 pm

Post by AlanStewart » Mon Jan 07, 2013 7:37 pm

In your new language defintion just go to the Keywords section turn on the Enable triple quotes option.
Is THAT what that means? I'd never thought to try it. Thanks!
... new languages with mulitple ways of doing block commenting.
I'm not sure what's worse, new ideas to try new things, even if they are bad ideas, at least it's *trying*; or copying old ideas *especially* when they are bad ideas, even if they are now "the standard".

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 3 guests