www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - D lexer in Java

reply Jeremy Powers <jpowers wyrdtech.com> writes:
Spent some time a couple months ago hacking on a D plugin for IntelliJ.
 Haven't gotten very far, but did result in a working lexer.  My day job
got significantly crazier, so haven't had a chance to work on it lately.

Wanted to have quite a bit more done before releasing into the wild, but
thought I'd throw something out there before I head out the door to Dconf.

On github:

https://github.com/elendel-/intelliD


It started out as a rewrite of the mono-d lexer, though ended up
reorganizing/rewriting things a bit as I went along.  Whole thing is
'licensed' in the public domain, so hopefully someone will find it useful.


(Resending this from a different email address, as first one didn't appear
to go through.  Apologies if it shows up twice.  Also, my hotel has free
internet, yay)
Apr 30 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-05-01 05:52, Jeremy Powers wrote:
 Spent some time a couple months ago hacking on a D plugin for IntelliJ.
   Haven't gotten very far, but did result in a working lexer.  My day
 job got significantly crazier, so haven't had a chance to work on it lately.

 Wanted to have quite a bit more done before releasing into the wild, but
 thought I'd throw something out there before I head out the door to Dconf.

 On github:

 https://github.com/elendel-/intelliD


 It started out as a rewrite of the mono-d lexer, though ended up
 reorganizing/rewriting things a bit as I went along.  Whole thing is
 'licensed' in the public domain, so hopefully someone will find it useful.
Cool. There are a couple of already written lexers/parsers in Java for other plugins. Desccent and DDT for Eclipse. Descent is dead and I don't know the status of DDT. Descent was from the D1 days and is still the best IDE plugin for D I've heard of. It supported lexical, syntax and semantic analyzer. With features such as as: * Show errors as you type (even semantic errors) * Autocompletion with semantic support * Compile time view. See how scope-statement is lowered to try-catch-finally. See how mixins are expanded and so on * Compile time debugger http://dsource.org/projects/descent/ http://code.google.com/a/eclipselabs.org/p/ddt/ -- /Jacob Carlborg
May 01 2013
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-05-01 05:52, Jeremy Powers wrote:
 Spent some time a couple months ago hacking on a D plugin for IntelliJ.
   Haven't gotten very far, but did result in a working lexer.  My day
 job got significantly crazier, so haven't had a chance to work on it lately.

 Wanted to have quite a bit more done before releasing into the wild, but
 thought I'd throw something out there before I head out the door to Dconf.

 On github:

 https://github.com/elendel-/intelliD


 It started out as a rewrite of the mono-d lexer, though ended up
 reorganizing/rewriting things a bit as I went along.  Whole thing is
 'licensed' in the public domain, so hopefully someone will find it useful.
You should post to the announce group as well. More people will see it there. -- /Jacob Carlborg
May 01 2013
parent Gyula Gubacsi <gyula.gubacsi gmail.com> writes:
I can offer you my former little parser project based on ANTLR v3:
https://github.com/progician/d-antlr-grammar

I originally written to replace the parser in DDT as the DDT parser
originally is Descent, which in turn is a trans-coded bit from the D
compiler.


On 1 May 2013 10:26, Jacob Carlborg <doob me.com> wrote:

 On 2013-05-01 05:52, Jeremy Powers wrote:

 Spent some time a couple months ago hacking on a D plugin for IntelliJ.
   Haven't gotten very far, but did result in a working lexer.  My day
 job got significantly crazier, so haven't had a chance to work on it
 lately.

 Wanted to have quite a bit more done before releasing into the wild, but
 thought I'd throw something out there before I head out the door to Dconf.

 On github:

 https://github.com/elendel-/**intelliD<https://github.com/elendel-/intelliD>


 It started out as a rewrite of the mono-d lexer, though ended up
 reorganizing/rewriting things a bit as I went along.  Whole thing is
 'licensed' in the public domain, so hopefully someone will find it useful.
You should post to the announce group as well. More people will see it there. -- /Jacob Carlborg
-- Gyula Gubacsi / progician <https://github.com/progician>
May 01 2013
prev sibling parent reply Bruno Medeiros <brunodomedeiros+dng gmail.com> writes:
On 01/05/2013 04:52, Jeremy Powers wrote:
 Spent some time a couple months ago hacking on a D plugin for IntelliJ.
   Haven't gotten very far, but did result in a working lexer.  My day
 job got significantly crazier, so haven't had a chance to work on it lately.

 Wanted to have quite a bit more done before releasing into the wild, but
 thought I'd throw something out there before I head out the door to Dconf.

 On github:

 https://github.com/elendel-/intelliD


 It started out as a rewrite of the mono-d lexer, though ended up
 reorganizing/rewriting things a bit as I went along.  Whole thing is
 'licensed' in the public domain, so hopefully someone will find it useful.


 (Resending this from a different email address, as first one didn't
 appear to go through.  Apologies if it shows up twice.  Also, my hotel
 has free internet, yay)
Hi Jeremy. As I mentioned in a previous thread I'm working on a new Java parser for DDT. Maybe I should have kept people up to date, but the lexer is pretty much done, it was completed in the beggining of February. The parser is about 50-60% done. This work is available in the parser branch of the DDT repo: http://code.google.com/a/eclipselabs.org/p/ddt/source/list?name=parser The lexer in particular is here: http://code.google.com/a/eclipselabs.org/p/ddt/source/browse/org.dsource.ddt.dtool/src/dtool/parser/DeeLexer.java?name=parser It's well-tested, and complete, apart from one missing aspect which is checking that escape sequences in string and character literals are valid. -- Bruno Medeiros - Software Engineer
May 02 2013
parent reply Jeremy Powers <jpowers wyrdtech.com> writes:
Wonderful!

It looks like you started this work right after I looked at DDT and decided
to do my own thing.  Feel free to take a look at my code and grab anything
that is useful.  I'll try to find some time and swap out for your parser,
maybe abandon my efforts in favor of yours.


On Thu, May 2, 2013 at 7:35 AM, Bruno Medeiros <
brunodomedeiros+dng gmail.com> wrote:

 On 01/05/2013 04:52, Jeremy Powers wrote:

 Spent some time a couple months ago hacking on a D plugin for IntelliJ.
   Haven't gotten very far, but did result in a working lexer.  My day
 job got significantly crazier, so haven't had a chance to work on it
 lately.

 Wanted to have quite a bit more done before releasing into the wild, but
 thought I'd throw something out there before I head out the door to Dconf.

 On github:

 https://github.com/elendel-/**intelliD<https://github.com/elendel-/intelliD>


 It started out as a rewrite of the mono-d lexer, though ended up
 reorganizing/rewriting things a bit as I went along.  Whole thing is
 'licensed' in the public domain, so hopefully someone will find it useful.


 (Resending this from a different email address, as first one didn't
 appear to go through.  Apologies if it shows up twice.  Also, my hotel
 has free internet, yay)
Hi Jeremy. As I mentioned in a previous thread I'm working on a new Java parser for DDT. Maybe I should have kept people up to date, but the lexer is pretty much done, it was completed in the beggining of February. The parser is about 50-60% done. This work is available in the parser branch of the DDT repo: http://code.google.com/a/**eclipselabs.org/p/ddt/source/**list?name=parser<http://code.google.com/a/eclipselabs.org/p/ddt/source/list?name=parser> The lexer in particular is here: http://code.google.com/a/**eclipselabs.org/p/ddt/source/** browse/org.dsource.ddt.dtool/**src/dtool/parser/DeeLexer.** java?name=parser<http://code.google.com/a/eclipselabs.org/p/ddt/source/browse/org.dsource.ddt.dtool/src/dtool/parser/DeeLexer.java?name=parser> It's well-tested, and complete, apart from one missing aspect which is checking that escape sequences in string and character literals are valid. -- Bruno Medeiros - Software Engineer
May 02 2013
parent Bruno Medeiros <brunodomedeiros+dng gmail.com> writes:
On 02/05/2013 16:56, Jeremy Powers wrote:
 Wonderful!

 It looks like you started this work right after I looked at DDT and
 decided to do my own thing.  Feel free to take a look at my code and
 grab anything that is useful.  I'll try to find some time and swap out
 for your parser, maybe abandon my efforts in favor of yours.
Yeah, always better to combine efforts. Let me know if you find any issues. -- Bruno Medeiros - Software Engineer
May 02 2013