FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mmrnmhrm IDE sneak peak announcement

 
Post new topic   Reply to topic     Forum Index -> Descent
View previous topic :: View next topic  
Author Message
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Mon Jul 23, 2007 2:10 pm    Post subject: Mmrnmhrm IDE sneak peak announcement Reply with quote

Hi. This post is an announcement of the release of a "sneak peak" version of the Mmrnmhrm IDE.
What is the Mmrnmhrm IDE? Mmrnmhrm is an Eclipse IDE I've been working on, loosely based on Descent, and aimed at bringing semantic IDE functionality (such as code completion, find definition, find references, etc.) to D.
This release features basic IDE features, and a working Find Definition functionality. Altough Find-Def itself should be stable and correct enough, there are lot of rough edges in the rest of the IDE. Here's a full listing of features, and shortcomings:

New Project Wizard
Project Configuration Page
D Project model (it is what supports the IDE functionality):
--> build path supports Source Folders only, no Library Folder support, not even the Standard Lib
--> model is updated manually by pressing the Update Dee Model icon.
--> model supports only DMD 0.178 parsing (it uses Descent's parser dated from 2006)
--> ... and even so there are some parser bugs
D Editor:
-Syntax Highlighting
-Content Outline
Syntax Highlighting configuration page
AST Viewer (for IDE debugging purposes only)


Open Definition operation:
Locates any definition unit:
-Module, class, struct/union, variable, function parameter, template, template parameter, alias, typedef, named enums, enum member, named mixins, import aliases, import selections.
---> Not supported: goto labels, version/debug identifiers
-Search scopes:
--Primary namespace/scope.
--Secondary namespace (where imports bring names);
--Super scope;
--Outer scope;
---> Doesn't support/search: unnamed mixins, unnamed enums, with() statement;

All kinds of references nodes supported except:
--> References where the root is an expression.
--> Some nodes that have some source range bugs (missing source range)
--> special references (new, delete, this, super);
Some intrinsic/native type references are detected but there is nowhere to go.
--> Does not do function or template overload resolution (if there are several matches, lists all homonyms).

You can download Mmrnmhrm from here:
http://www.dsource.org/projects/descent/browser/trunk/mmrnmhrm.ui/dist
Install it by placing all latest (0.0.3) version jar files in the Eclipse plugin directory. Requires Eclipse 3.3. Descent may or may not be installed as well, altough if it is, it's editor may take priority in opening .d files.
The Find Ref functionality is invoked by pressing F3 when in the Mmrnhrm D editor, or by clicking the Find Ref button placed in the toolbar. When using the toolbar button, Find Ref will work for in any text editor (including Descent's), however it won't be able to follow imports across modules if the source file is not on the build path of a Mmrnmhrm project.
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
fraserofthenight



Joined: 08 Apr 2007
Posts: 33
Location: Seattle, WA

PostPosted: Tue Jul 24, 2007 10:32 pm    Post subject: Reply with quote

Looks like we have some stiff competition for the eclipse-based D editor space! :P
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Wed Jul 25, 2007 8:31 am    Post subject: Reply with quote

In Mmmrnhrm I used Descent's parser, and the rest of the IDE was built from scratch, by me. I did it so mostly because I wanted to have a good understanding of Eclipse internals, and I think blindly porting JDT would leave a lot to be understood. Unfortunately, in doing so, I expended more time than I expected (I've been working in this as the university's Master thesis since the start of the school year), and it took me longer to actually start doing the D-specific IDE features.
In any case, we should try to share the most amout of code, work and interoperability we can. As open-source developers with very limited time, redundancy will reduce the total amount of useful results that could be obtained. I didn't intend Mmrnmhrm to become a competitor IDE (hence the silly (but actually pronounceable) name)

The dtool plugin is where the Find Ref functionality is contained (along with the parser and AST creation), and dtool is virtually Mmrnmhrm independent. This means that I think a full dtool port to Descent could be very easily performed. However, this would mean downgrading the parser, which is not desirable. A partial port (where we would keep the current Descent parser, and port only the rest of dtool) is more desirable, but it would take quite some work. I'm willing to do that port eventually, but then I'd rather wait until there is a D 2.0 capable parser.
Right now I'll try a stab at code completion.
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
fraserofthenight



Joined: 08 Apr 2007
Posts: 33
Location: Seattle, WA

PostPosted: Mon Jul 30, 2007 4:49 pm    Post subject: Reply with quote

Awesome!

Are you coming to the conference; we might be able to talk this over there? I'll check out dtool.... it looks like you're using ANTLR for parsing, or is that not completely implemented yet? Find ref looks amazing, it even follows aliases, etc. I'll take a look into porting it over... I'm just the formatter guy, so I don't really know too much about the plugin in general.

I think asterite updated the parser for 1.20 already and is working on 2.x functionality.
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Mon Jul 30, 2007 6:31 pm    Post subject: Reply with quote

I am... I only wish Walter did not use so many gotos... I know performance is critical, but I guess the semantic pass is 3x heavier than the parsing pass... Sad

Just look at this:

Code:
Arguments *Parser::parseParameters(int *pvarargs)
{
    Arguments *arguments = new Arguments();
    int varargs = 0;
    int hasdefault = 0;

    check(TOKlparen);
    while (1)
    {   Type *tb;
   Identifier *ai;
   Type *at;
   Argument *a;
   unsigned storageClass;
   unsigned stc;
   Expression *ae;

   ai = NULL;
   storageClass = 0;      // parameter is "in" by default
   for (;1; nextToken())
   {
       switch (token.value)
       {
      case TOKrparen:
          break;

      case TOKdotdotdot:
          varargs = 1;
          nextToken();
          break;

      case TOKconst:
          if (peek(&token)->value == TOKlparen)
         goto Ldefault;
          stc = STCconst;
          goto L2;

      case TOKinvariant:
          if (peek(&token)->value == TOKlparen)
         goto Ldefault;
          stc = STCinvariant;
          goto L2;

      case TOKin:      stc = STCin;      goto L2;
      case TOKout:      stc = STCout;   goto L2;
      case TOKinout:
      case TOKref:      stc = STCref;   goto L2;
      case TOKlazy:      stc = STClazy;   goto L2;
      case TOKscope:      stc = STCscope;   goto L2;
      case TOKfinal:      stc = STCfinal;   goto L2;
      case TOKstatic:      stc = STCstatic;   goto L2;
      L2:
          if (storageClass & stc ||
         (storageClass & STCin && stc & (STCfinal | STCconst | STCscope)) ||
         (stc & STCin && storageClass & (STCfinal | STCconst | STCscope))
             )
         error("redundant storage class %s", Token::toChars(token.value));
          storageClass |= stc;
          {
          unsigned u = storageClass & (STCconst | STCinvariant);
          if (u & (u - 1))
         error("conflicting storage class %s", Token::toChars(token.value));
          }
          continue;

      default:
      Ldefault:
          stc = storageClass & (STCin | STCout | STCref | STClazy);
          if (stc & (stc - 1))   // if stc is not a power of 2
         error("incompatible parameter storage classes");
          if ((storageClass & (STCfinal | STCout)) == (STCfinal | STCout))
         error("out cannot be final");
          if ((storageClass & STCscope) &&
         (storageClass & (STCref | STCout)))
         error("scope cannot be ref or out");
          at = parseType(&ai);
          ae = NULL;
          if (token.value == TOKassign)   // = defaultArg
          {   nextToken();
         ae = parseAssignExp();
         hasdefault = 1;
          }
          else
          {   if (hasdefault)
             error("default argument expected for %s",
                ai ? ai->toChars() : at->toChars());
          }
          if (token.value == TOKdotdotdot)
          {   /* This is:
          *   at ai ...
          */

         if (storageClass & (STCout | STCref))
             error("variadic argument cannot be out or ref");
         varargs = 2;
         a = new Argument(storageClass, at, ai, ae);
         arguments->push(a);
         nextToken();
         break;
          }
          a = new Argument(storageClass, at, ai, ae);
          arguments->push(a);
          if (token.value == TOKcomma)
          {   nextToken();
         goto L1;
          }
          break;
       }
       break;
   }
   break;

    L1:   ;
    }
    check(TOKrparen);
    *pvarargs = varargs;
    return arguments;
}
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Tue Jul 31, 2007 10:26 am    Post subject: Reply with quote

fraserofthenight wrote:
Awesome!

Are you coming to the conference; we might be able to talk this over there? I'll check out dtool.... it looks like you're using ANTLR for parsing, or is that not completely implemented yet? Find ref looks amazing, it even follows aliases, etc. I'll take a look into porting it over... I'm just the formatter guy, so I don't really know too much about the plugin in general.

I think asterite updated the parser for 1.20 already and is working on 2.x functionality.

I'm from Portugal, and I'm a student, so I wont be going to the conference. ANTLR code is still there because in the very beggining, before Descent, I started doing a D parser, but that was scrapped when Descent came. Like I said I'm using Descent's 0.1 parser (i haven't updated meanwhile).
You can take a general look at dtool now (particurly dtool.refmodel) but I would advise waiting some more if you wanna look more indepth or do some work based on that, as I'll be doing some changes, cleaning up (adding more doc), and preparing support for code completion.
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Sun Aug 05, 2007 7:27 am    Post subject: Reply with quote

"And now, for a taste of things to come."

http://web.ist.utl.pt/bruno.d.o.medeiros/dee/mmrnmhrm_codecompletion1.png

Razz
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sun Aug 05, 2007 8:37 am    Post subject: Reply with quote

Awsome!!!!

Do you understand now my reply to you in the newsgroup? Razz

It would realy be great to merge the two projects sometime...
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Descent All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group