[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-dev
Subject:    Re: [groovy-dev] Re: Access to comments in sourcecode after parsing
From:       Guillaume Laforge <glaforge () codehaus ! org>
Date:       2012-10-29 15:17:48
Message-ID: CAJ2HCd_a37XqrSSY3n5g=SY4B0i88ekwTruVvzJkVVHMYwmtag () mail ! gmail ! com
[Download RAW message or body]

The lexer and parser don't remember comments, so a reformatter tool
wouldn't really work with what Groovy provides here, as you'd loose all the
comments if you were working with that.
At some point (with the rewrite of the grammar with Antlr 4) we might keep
the comments around for tools' usage.
So for now, I'm not sure what to advise you.
Perhaps a collective effort on working on the Antlr 4 grammar would be
beneficial to everybody.
For example, Chanwit was mentioning an Antlr 4 grammar for Groovy for his
Groovy->JavaScript compiler, for example.
This could be useful for you too.

On Fri, Oct 26, 2012 at 4:19 PM, miho <info@michaelhoffer.de> wrote:

> Sorry for the late response.
>
> The code formatter would be just the beginning. But I'd like to develop it
> as standalone project. Actually, I wrote an IDE that mixes visual & text
> based programming. For me Groovy is the language of choice. And a good
> editor is an essential part. I want to improve it to support formatting and
> maybe refactoring etc.
>
> If possible I would like to use Groovy without too many external
> dependencies such as eclipse jdt and such. Is there sample code somewhere
> that I could use as a starting point?
>
> Michael
>
>
>
> --
> View this message in context:
> http://groovy.329449.n5.nabble.com/Access-to-comments-in-sourcecode-after-parsing-tp385996p5711746.html
> Sent from the groovy - dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


-- 
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

[Attachment #3 (text/html)]

The lexer and parser don&#39;t remember comments, so a reformatter tool wouldn&#39;t \
really work with what Groovy provides here, as you&#39;d loose all the comments if \
you were working with that.<div>At some point (with the rewrite of the grammar with \
Antlr 4) we might keep the comments around for tools&#39; usage.</div> <div>So for \
now, I&#39;m not sure what to advise you. </div><div>Perhaps a collective effort on \
working on the Antlr 4 grammar would be beneficial to everybody.</div><div>For \
example, Chanwit was mentioning an Antlr 4 grammar for Groovy for his \
Groovy-&gt;JavaScript compiler, for example.</div> <div>This could be useful for you \
too.<br><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 4:19 PM, miho <span \
dir="ltr">&lt;<a href="mailto:info@michaelhoffer.de" \
target="_blank">info@michaelhoffer.de</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Sorry for the late response.<br> <br>
The code formatter would be just the beginning. But I&#39;d like to develop it<br>
as standalone project. Actually, I wrote an IDE that mixes visual &amp; text<br>
based programming. For me Groovy is the language of choice. And a good<br>
editor is an essential part. I want to improve it to support formatting and<br>
maybe refactoring etc.<br>
<br>
If possible I would like to use Groovy without too many external<br>
dependencies such as eclipse jdt and such. Is there sample code somewhere<br>
that I could use as a starting point?<br>
<br>
Michael<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://groovy.329449.n5.nabble.com/Access-to-comments-in-sourcecode-after-parsing-tp385996p5711746.html" \
target="_blank">http://groovy.329449.n5.nabble.com/Access-to-comments-in-sourcecode-after-parsing-tp385996p5711746.html</a><br>


<div class="HOEnZb"><div class="h5">Sent from the groovy - dev mailing list archive \
at Nabble.com.<br> <br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
    <a href="http://xircles.codehaus.org/manage_email" \
target="_blank">http://xircles.codehaus.org/manage_email</a><br> <br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Guillaume \
Laforge<br>Groovy Project Manager<br>Head of Groovy Development at SpringSource<br><a \
href="http://www.springsource.com/g2one" \
target="_blank">http://www.springsource.com/g2one</a><br>

</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic