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

How to add new tokens to descent's parser?

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



Joined: 12 Jun 2009
Posts: 3

PostPosted: Fri Jun 12, 2009 11:36 am    Post subject: How to add new tokens to descent's parser? Reply with quote

I've been looking around the Descent configuration searching for a place to add new parser tokens (just like you can do in Poseidon) so I can add the new tokens from D2.0 and couldn't find anything.

The closest thing I've seen is Editor->Templates and the new/edit/delete buttons do nothing.

I also don't know where the configuration files are so I can manually enter this, I'm using Ubuntu 9 with Eclipse 3.2 from apt-get.
Back to top
View user's profile Send private message
asterite



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

PostPosted: Sat Jun 13, 2009 10:21 am    Post subject: Reply with quote

It isn't as simple as just adding "new parser tokens", because each token has a place in the grammar, and it has a very clear meaning to the semantic analysis.

Descent isn't just a token-highlighter. Razz

D2 is not supported, but I hope some day (once I finish this semester's studies) it will.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jeremiep



Joined: 12 Jun 2009
Posts: 3

PostPosted: Sat Jun 13, 2009 12:41 pm    Post subject: Reply with quote

I know its not just a token highlighter, thats the main reason why I switched from Poseidon to Eclipse/Descent. I'm still new to the whole Eclipse thing but it really impresses me so far, really great IDE, and Descent has the best support for D I've seen yet, by far. And the support for ant is awesome, although it's not the fastest thing to configure.

However, what I'm asking is not for complete support for 2.0, it's still changing too fast to follow every new iteration of the language. Alls I want is to at least add new tokens to be recognized so they don't end up showing my files as containing errors when they do not.

For example the new 'immutable', 'shared' and '__gshared' tokens among others are especially nasty for that since I use them everywhere.

Also maybe I'm just blind, but is there a place where you can enter custom parameters for dmd? I need to have -vtls set and I had to write a shell script wrapper for dmd to add it, not very convenient Wink

Other than that, great job on the plugin, it definitely made me an Eclipse fan.
Back to top
View user's profile Send private message
asterite



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

PostPosted: Sat Jun 13, 2009 2:21 pm    Post subject: Reply with quote

In a couple of weeks I'll try to at least add lexer and parser support for D2, so these new tokens will be highlighted. Then I'll try to focus on porting the semantic analysis also, but you're right, at least the new tokens should be recognized.

As for the parameters, see step 6 of this:

http://dsource.org/projects/descent/wiki/CompilingPrograms

In the "Arguments" box just place the arguments you want to pass to the compiler, like:

${resource_loc} -g

will compile with debug symbols.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jeremiep



Joined: 12 Jun 2009
Posts: 3

PostPosted: Sun Jun 14, 2009 1:51 pm    Post subject: Reply with quote

Awesome! I'll keep an eye out for the next version of Descent.
Back to top
View user's profile Send private message
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