View previous topic :: View next topic |
Author |
Message |
jeremiep
Joined: 12 Jun 2009 Posts: 3
|
Posted: Fri Jun 12, 2009 11:36 am Post subject: How to add new tokens to descent's parser? |
|
|
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 |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jun 13, 2009 10:21 am Post subject: |
|
|
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.
D2 is not supported, but I hope some day (once I finish this semester's studies) it will. |
|
Back to top |
|
|
jeremiep
Joined: 12 Jun 2009 Posts: 3
|
Posted: Sat Jun 13, 2009 12:41 pm Post subject: |
|
|
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
Other than that, great job on the plugin, it definitely made me an Eclipse fan. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jun 13, 2009 2:21 pm Post subject: |
|
|
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 |
|
|
jeremiep
Joined: 12 Jun 2009 Posts: 3
|
Posted: Sun Jun 14, 2009 1:51 pm Post subject: |
|
|
Awesome! I'll keep an eye out for the next version of Descent. |
|
Back to top |
|
|
|