www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - D lexer in Java

reply Jeremy Powers <jpowers wyrdtech.com> writes:
--047d7b86db60844df604dba00da1
Content-Type: text/plain; charset=UTF-8

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)

--047d7b86db60844df604dba00da1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div style=3D"font-family:arial,sans-serif;font-size:13px"=
Spent some time a couple months ago hacking on a D plugin for IntelliJ. =

=A0My day job got significantly crazier, so haven&#39;t had a chance to wor= k on it lately.</div> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px">Wanted to have quite a= bit more done before releasing into the wild, but thought I&#39;d throw so= mething out there before I head out the door to Dconf.</div> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px">On github:</div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px"><br></div><a href=3D"h= ttps://github.com/elendel-/intelliD" target=3D"_blank" style=3D"font-family= :arial,sans-serif;font-size:13px">https://github.com/elendel-/intelliD</a><= br style=3D"font-family:arial,sans-serif;font-size:13px"> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div style= =3D"font-family:arial,sans-serif;font-size:13px">It started out as a rewrit= e of the mono-d lexer, though ended up reorganizing/rewriting things a bit = as I went along. =C2=A0Whole thing is &#39;licensed&#39; in the public doma= in, so hopefully someone will find it useful.</div> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div style= =3D"font-family:arial,sans-serif;font-size:13px">(Resending this from a dif= ferent email address, as first one didn&#39;t appear to go through. =C2=A0A= pologies if it shows up twice. =C2=A0Also, my hotel has free internet, yay)= </div> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div></div> --047d7b86db60844df604dba00da1--
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 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
prev sibling next sibling parent Gyula Gubacsi <gyula.gubacsi gmail.com> writes:
--089e0141aa28d0990204dba5f6fe
Content-Type: text/plain; charset=ISO-8859-1

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> --089e0141aa28d0990204dba5f6fe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I can offer you my former little parser project based= on ANTLR v3:<br><a href=3D"https://github.com/progician/d-antlr-grammar">h= ttps://github.com/progician/d-antlr-grammar</a><br><br></div>I originally w= ritten 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.<br> </div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On 1 Ma= y 2013 10:26, Jacob Carlborg <span dir=3D"ltr">&lt;<a href=3D"mailto:doob m= e.com" target=3D"_blank">doob me.com</a>&gt;</span> wrote:<br><blockquote c= lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;= padding-left:1ex"> <div class=3D"im">On 2013-05-01 05:52, Jeremy Powers wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Spent some time a couple months ago hacking on a D plugin for IntelliJ.<br> =A0 Haven&#39;t gotten very far, but did result in a working lexer. =A0My d= ay<br> job got significantly crazier, so haven&#39;t had a chance to work on it la= tely.<br> <br> Wanted to have quite a bit more done before releasing into the wild, but<br=

nf.<br> <br> On github:<br> <br> <a href=3D"https://github.com/elendel-/intelliD" target=3D"_blank">https://= github.com/elendel-/<u></u>intelliD</a><br> <br> <br> It started out as a rewrite of the mono-d lexer, though ended up<br> reorganizing/rewriting things a bit as I went along. =A0Whole thing is<br> &#39;licensed&#39; in the public domain, so hopefully someone will find it = useful.<br> </blockquote> <br></div> You should post to the announce group as well. More people will see it ther= e.<span class=3D"HOEnZb"><font color=3D"#888888"><br> <br> -- <br> /Jacob Carlborg<br> </font></span></blockquote></div><br><br clear=3D"all"><br>-- <br>Gyula Gub= acsi / <a href=3D"https://github.com/progician" target=3D"_blank">progician= </a><br><br> </div> --089e0141aa28d0990204dba5f6fe--
May 01 2013
prev sibling next 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 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
prev sibling parent Jeremy Powers <jpowers wyrdtech.com> writes:
--047d7b86db604fb00204dbbe47c2
Content-Type: text/plain; charset=UTF-8

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)

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

--047d7b86db604fb00204dbbe47c2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Wonderful!<div><br></div><div style>It looks like you star= ted this work right after I looked at DDT and decided to do my own thing. = =C2=A0Feel free to take a look at my code and grab anything that is useful.= =C2=A0I&#39;ll try to find some time and swap out for your parser, maybe a= bandon my efforts in favor of yours.</div> </div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Thu,= May 2, 2013 at 7:35 AM, Bruno Medeiros <span dir=3D"ltr">&lt;<a href=3D"ma= ilto:brunodomedeiros+dng gmail.com" target=3D"_blank">brunodomedeiros+dng g= mail.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div class=3D"im">On 01/05/2013 04:52, Jerem= y Powers wrote:<br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex"><div class=3D"im"> Spent some time a couple months ago hacking on a D plugin for IntelliJ.<br> =C2=A0 Haven&#39;t gotten very far, but did result in a working lexer. =C2= =A0My day<br> job got significantly crazier, so haven&#39;t had a chance to work on it la= tely.<br> <br> Wanted to have quite a bit more done before releasing into the wild, but<br=

nf.<br> <br> On github:<br> <br> <a href=3D"https://github.com/elendel-/intelliD" target=3D"_blank">https://= github.com/elendel-/<u></u>intelliD</a><br> <br> <br> It started out as a rewrite of the mono-d lexer, though ended up<br> reorganizing/rewriting things a bit as I went along. =C2=A0Whole thing is<b= r> &#39;licensed&#39; in the public domain, so hopefully someone will find it = useful.<br> <br> <br></div><div class=3D"im"> (Resending this from a different email address, as first one didn&#39;t<br> appear to go through. =C2=A0Apologies if it shows up twice. =C2=A0Also, my = hotel<br> has free internet, yay)<br> <br> </div></blockquote> <br> Hi Jeremy. As I mentioned in a previous thread I&#39;m working on a new Jav= a 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 pa= rser is about 50-60% done.<br> <br> This work is available in the parser branch of the DDT repo:<br> <a href=3D"http://code.google.com/a/eclipselabs.org/p/ddt/source/list?name= =3Dparser" target=3D"_blank">http://code.google.com/a/<u></u>eclipselabs.or= g/p/ddt/source/<u></u>list?name=3Dparser</a><br> <br> The lexer in particular is here:<br> <a href=3D"http://code.google.com/a/eclipselabs.org/p/ddt/source/browse/org= .dsource.ddt.dtool/src/dtool/parser/DeeLexer.java?name=3Dparser" target=3D"= _blank">http://code.google.com/a/<u></u>eclipselabs.org/p/ddt/source/<u></u=
browse/org.dsource.ddt.dtool/<u></u>src/dtool/parser/DeeLexer.<u></u>java?=

<br> It&#39;s well-tested, and complete, apart from one missing aspect which is = checking that escape sequences in string and character literals are valid.<= span class=3D"HOEnZb"><font color=3D"#888888"><br> <br> -- <br> Bruno Medeiros - Software Engineer<br> </font></span></blockquote></div><br></div> --047d7b86db604fb00204dbbe47c2--
May 02 2013