[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] 'unparsing' the AST

Hello,

A cool example of AST transformation and then back to source code can
be found here: http://code.google.com/p/jspde/source/browse/trunk/examples/eu.tl1.examples/src/eu/tl1/examples/refactoring/GlobalVariableWrapper.java
and here: http://code.google.com/p/apdt/source/browse/trunk/org.phpaspect.apdt.core/src/org/phpaspect/apdt/internal/core/visitor/WeaverVisitor.java.
It is all based from this article:
http://www.eclipse.org/pdt/articles/ast/PHP_AST.html.

There is also some slides about extending pdt on slideshare:
http://www.slideshare.net/spektom/php-development-tools-20-success-story
http://www.slideshare.net/wcandillon/extending-and-scripting-pdt

Best regards,

William


On Sat, Dec 5, 2009 at 10:00 AM, Roy Ganor <roy@xxxxxxxx> wrote:
> I would probably start in
> org.eclipse.php.internal.core.ast.rewrite.ASTRewrite (see the comments
> in this class)
>
> Roy
> -----Original Message-----
> From: pdt-dev-bounces@xxxxxxxxxxx [mailto:pdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Raphael Pigulla
> Sent: Friday, December 04, 2009 12:06 PM
> To: pdt-dev@xxxxxxxxxxx
> Subject: [pdt-dev] 'unparsing' the AST
>
> Hi everyone,
>
> I'm looking for a way to 'unparse' the AST of a PHP program back into
> source code. I've looked around the source and found the
> org.eclipse.php.internal.core.format package which is probably what I
> need to use, but I haven't figured out yet how to wire everything up.
>
> Any help is appreciated.
>
> Thanks a lot in advance
> Raphael
> _______________________________________________
> pdt-dev mailing list
> pdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
> _______________________________________________
> pdt-dev mailing list
> pdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>