Eclipse plugin

Bruno Medeiros brunodomedeiros+spam at com.gmail
Sun Nov 5 06:30:13 PST 2006


Ary Manzana wrote:
> Bruno Medeiros escribió:
>> Ary Manzana wrote:
>> Hi, yes, I'm working on an Eclipse plugin too. I've started very 
>> recently (about two weeks ago), so I don't have anything significant 
>> to show yet, but I'm doing this as my degree final project, so I will 
>> be working on it during all school year.
>>
>> We definitely should talk and see if we can combine efforts, but the 
>> approach I was thinking was to build a parser using ANTLR, similar to 
>> what the previous eclipse plugins did (Blackbird, DDT). However, you 
>> seem to be far ahead of I've done. You say you've converted the whole 
>> D frontend to Java? (to descent\internal\core\dom\Parser.java I 
>> presume) That must have been a lot of work. I'd actually like to know 
>> how long it took for you to do that
> 
> About a month and a half? (in my precious little spare time, of course 
> :-P). I don't remember...
> 
> , and if it's working correctly. I'm gonna take a
>> better look at your code.
>>
>>
> 
> Great! I would be very happy to combine efforts. The project now has a 
> webpage in dsource.org:
> 
> http://www.dsource.org/projects/descent/
> 
> There I wrote an explanation about why not to use ANTLR (I started doing 
> that, then I changed to using DMD source code and it was *way* faster 
> and better).
> 
> I only converted parser.h, parser.c (yes, 
> descent\internal\core\dom\Parser.java) , lexer.h, lexer.c 
> (descent\internal\core\dom\Lexer.java) and the classes/functions 
> referenced there: just the clean model with no semmantic stuff. Porting 
> c++ to Java was not an easy task, especially since Java has no powerful 
> "goto" (oh my, 732 in the whole code), so I had to change some of the 
> code, or duplicate it (I don't want to break anything at first).
> 
> Is it working ok? Check descent.test.jar. You can find cases to test 
> both the parser and the lexer. I just downloaded the excelent 
> Coverclipse ( http://coverlipse.sourceforge.net/ ): the parser is %65 
> tested; the lexer %68. That's more than half of it! :-)
> 
> And it's not just copy-paste and test. The Token class now has two 
> properties to tell its start position and length, as well as every class 
> in the model, since a regular compiler dosen't need it, but a visual 
> does. And I've written nice interfaces to the model (check 
> descent.core.dom).
> 
> The first step would be to get (close to) %100 test coverage on parser 
> and lexer, then move on to the big (juicy) stuff.
> 
> Read the last sentence I wrote on the dsource page: wait for me until 
> then :-)
> 
> (I will write all of these explanations in the webpage, and more, when 
> I'll come back, I promise)

Let me know when you get back. I have a lot of questions, it would be 
nice if we could exchange IM contacts (MSN, YM?), for now, I'm usually 
at the D IRC channel (bruno_m).
For starters: "Ported most of DMD lexer and parser code. " - What do you 
mean "most" ? And what task are you planning to do next?

My original planning was for me to do first an IDE-decoupled 
command-line tool that would perform some operations 
useful-even-outside-of-an-IDE, like code beautification or refactoring. 
This isn't just for project phased planning or code abstraction, I think 
it's a worthy goal of itself. Such IDE-decoupled tool could then be used 
by developers who use another IDE,editor (or none at all). Perhaps it 
could also be useful (by porting or direct use) to other IDEs in the 
future. (like Poseidon maybe?)
Anyways, I'm gonna keep looking at you code and what it can do, I still 
have only taken a quick look at it.

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list