December 13, 2006
Folks FYI,

Scintilla now has a lexer for D.  At the moment it is available only via CVS but should appear in the next release.  This will make all scintilla-based editors and IDEs capable of supporting D very easily.
December 13, 2006
Waldemar Wrote:

> Folks FYI,
> 
> Scintilla now has a lexer for D.  At the moment it is available only via CVS but should appear in the next release.  This will make all scintilla-based editors and IDEs capable of supporting D very easily.

Sounds great! Thanks for doing this.

I took a glance at the source (I think I found the right file): http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup

It looks like you've even managed to support nested comments. That's fantastic!

Do you have any idea how often the Scintilla team releases new versions? I can't wait to try this out. ;)

jcc7
December 13, 2006

jcc7 wrote:
> Waldemar Wrote:
> 
>> Folks FYI,
>>
>> Scintilla now has a lexer for D.  At the moment it is available only via CVS
>> but should appear in the next release.  This will make all scintilla-based
>> editors and IDEs capable of supporting D very easily.
> 
> Sounds great! Thanks for doing this.
> 
> I took a glance at the source (I think I found the right file):
> http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup
> 
> It looks like you've even managed to support nested comments. That's fantastic!
> 
> Do you have any idea how often the Scintilla team releases new versions? I can't wait to try this out. ;)
> 
> jcc7

   30 // We use custom qualifiers since it is not clear what D allows.
   31
   32 static bool IsWordStart(int ch) {
   33 	return isascii(ch) && (isalpha(ch) || ch == '_');
   34 }
   35
   36 static bool IsWord(int ch) {
   37 	return isascii(ch) && (isalnum(ch) || ch == '_');
   38 }

I think D allows unicode alphas in identifiers.
See std.uni.isUniAlpha(dchar u);
http://digimars.com/d/phobos/std_uni.html

There's a C version in the dmd front end source. (unialpha.c)
December 13, 2006
Waldemar wrote:
> Folks FYI,
> 
> Scintilla now has a lexer for D.  At the moment it is available only via CVS but should appear in the next release.  This will make all scintilla-based editors and IDEs capable of supporting D very easily.

Cool.  I've made Trac aware of this lexer, and now dsource.org will have syntax highlighting for the repos browser, in addition to the wiki pages. That is, when I can put it up on the server.

Thanks!!

BA
December 13, 2006
Brad Anderson Wrote:

> Waldemar wrote:
> > Folks FYI,
> > 
> > Scintilla now has a lexer for D.  At the moment it is available only via CVS but should appear in the next release.  This will make all scintilla-based editors and IDEs capable of supporting D very easily.
> 
> Cool.  I've made Trac aware of this lexer, and now dsource.org will have syntax highlighting for the repos browser, in addition to the wiki pages.

Sounds good. It'll be really nice to finally have syntax highlighting for the source browser.

(By the way, just yesterday I found a small problem in D2HTML's syntax highlighting. It'd be nice to have a better highlighter for the wiki pages.)

jcc7
December 13, 2006
== Quote from Hasan Aljudy (hasan.aljudy@gmail.com)'s article
> jcc7 wrote:
> > Waldemar Wrote:
> >
> >> Folks FYI,
> >>
> >> Scintilla now has a lexer for D.  At the moment it is available only via CVS but should appear in the next release.  This will make all scintilla-based editors and IDEs capable of supporting D very easily.
> >
> > Sounds great! Thanks for doing this.
> >
> > I took a glance at the source (I think I found the right file):
> >
http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup
> >
> > It looks like you've even managed to support nested comments. That's fantastic!
> >
> > Do you have any idea how often the Scintilla team releases new versions? I
can't wait to try this out. ;)
> >
> > jcc7
>     30 // We use custom qualifiers since it is not clear what D allows.
>     31
>     32 static bool IsWordStart(int ch) {
>     33 	return isascii(ch) && (isalpha(ch) || ch == '_');
>     34 }
>     35
>     36 static bool IsWord(int ch) {
>     37 	return isascii(ch) && (isalnum(ch) || ch == '_');
>     38 }
> I think D allows unicode alphas in identifiers.
> See std.uni.isUniAlpha(dchar u);
> http://digimars.com/d/phobos/std_uni.html
> There's a C version in the dmd front end source. (unialpha.c)

There was a lengthy exchange on the subject in the archives.  I concluded D lexer needs its own qualifiers.  This will allow to extend beyond ascii.  I am curious what gdc allows.  Probably the best is to lift code from the compiler itself if reasonably contained.
December 14, 2006
On Wed, 13 Dec 2006 11:31:19 -0500, jcc7 <technocrat7@gmail.com> wrote:

> Waldemar Wrote:
>
>> Folks FYI,
>>
>> Scintilla now has a lexer for D.  At the moment it is available only via CVS
>> but should appear in the next release.  This will make all scintilla-based
>> editors and IDEs capable of supporting D very easily.
>
> Sounds great! Thanks for doing this.
>
> I took a glance at the source (I think I found the right file):
> http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup
>
> It looks like you've even managed to support nested comments. That's fantastic!
>
> Do you have any idea how often the Scintilla team releases new versions? I can't wait to try this out. ;)
>
> jcc7

Hmm.. My Scintilla changes supported D and its nesting comments for a long time, almost a year and a half.
This guy even emailed me a while back asking if my changes could be incorporated in Scintilla and I said sure.
http://wiki.dprogramming.com/DLex/HomePage ~ http://wiki.dprogramming.com/SciTE/HomePage
o-kay.
December 14, 2006

Chris Miller wrote:
> On Wed, 13 Dec 2006 11:31:19 -0500, jcc7 <technocrat7@gmail.com> wrote:
> 
>> Waldemar Wrote:
>>
>>> Folks FYI,
>>>
>>> Scintilla now has a lexer for D.  At the moment it is available only via CVS
>>> but should appear in the next release.  This will make all scintilla-based
>>> editors and IDEs capable of supporting D very easily.
>>
>> Sounds great! Thanks for doing this.
>>
>> I took a glance at the source (I think I found the right file):
>> http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup 
>>
>>
>> It looks like you've even managed to support nested comments. That's fantastic!
>>
>> Do you have any idea how often the Scintilla team releases new versions? I can't wait to try this out. ;)
>>
>> jcc7
> 
> Hmm.. My Scintilla changes supported D and its nesting comments for a long time, almost a year and a half.
> This guy even emailed me a while back asking if my changes could be incorporated in Scintilla and I said sure.
> http://wiki.dprogramming.com/DLex/HomePage ~ http://wiki.dprogramming.com/SciTE/HomePage
> o-kay.

heheh ..
I knew there's already a D port of Scintilla, and I was gonna say that, but I know next to nothing about Scintilla, and I wasn't sure if there was a fundamental difference between this one and that one, so I didn't say anything, fearing that I would only put myself in an embarrassing position.
December 14, 2006
== Quote from Hasan Aljudy (hasan.aljudy@gmail.com)'s article
> Chris Miller wrote:
> > On Wed, 13 Dec 2006 11:31:19 -0500, jcc7 <technocrat7@gmail.com> wrote:
> >
> >> Waldemar Wrote:
> >>
> >>> Folks FYI,
> >>>
> >>> Scintilla now has a lexer for D.  At the moment it is available only
> >>> via CVS
> >>> but should appear in the next release.  This will make all
> >>> scintilla-based
> >>> editors and IDEs capable of supporting D very easily.
> >>
> >> Sounds great! Thanks for doing this.
> >>
> >> I took a glance at the source (I think I found the right file):
> >>
http://scintilla.cvs.sourceforge.net/scintilla/scintilla/src/LexD.cxx?revision=1.1&view=markup
> >>
> >>
> >> It looks like you've even managed to support nested comments. That's fantastic!
> >>
> >> Do you have any idea how often the Scintilla team releases new versions? I can't wait to try this out. ;)
> >>
> >> jcc7
> >
> > Hmm.. My Scintilla changes supported D and its nesting comments for a
> > long time, almost a year and a half.
> > This guy even emailed me a while back asking if my changes could be
> > incorporated in Scintilla and I said sure.
> > http://wiki.dprogramming.com/DLex/HomePage ~
> > http://wiki.dprogramming.com/SciTE/HomePage
> > o-kay.
> heheh ..
> I knew there's already a D port of Scintilla, and I was gonna say that,
> but I know next to nothing about Scintilla, and I wasn't sure if there
> was a fundamental difference between this one and that one, so I didn't
> say anything, fearing that I would only put myself in an embarrassing
> position.


I knew about it, too.  But I did my research and found out that this code was rejected by scintilla.  It was never resubmitted.  It was based on an old CPP lexer and had several problems including a questionable method of dealing with nested comments.  The best way to get it in was to modify the existing CPP lexer and use standard mechanisms for nesting comments.  I also added folding.
December 20, 2006
In article <elqf6q$uef$1@digitaldaemon.com>, hasan.aljudy@gmail.com says...
> I knew there's already a D port of Scintilla

Anyone know where this is? I found this post on dsource:

http://www.dsource.org/forums/viewtopic.php?t=913&sid= 573b789ce96dc0678ff324bc34228c65

But there doesn't seem to be any followup there. Nor is the project listed on this Scintilla ports page:

http://scintilla.sourceforge.net/ScintillaRelated.html

I could contact AgentOrange directly, I suppose . . .

TK
Top | Discussion index | About this forum | D home