Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Standalone AST + compilation
Standalone AST + compilation [message #147056] Tue, 02 March 2004 13:50 Go to next message
Eclipse UserFriend
Originally posted by: villard.us.ibm.com

Hi,
I'd like to create ASTs from scratch and in standalone (without having
to create a JavaProject). I'd like then to compile this AST into Java
bytecode. Can you tell me how can I do it?

Thanks!
Lionel
Re: Standalone AST + compilation [message #147125 is a reply to message #147056] Wed, 03 March 2004 04:50 Go to previous messageGo to next message
Eclipse UserFriend
It is not possible to create a DOM AST outside the Eclipse runtime. Howver
you can run the compiler in batch (i.e. standalone) mode. See
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt- core-home/howto/batch%20compile/batchCompile.html

Jerome

"Lionel Villard" <villard@us.ibm.com> wrote in message
news:c22kqm$pfc$1@eclipse.org...
> Hi,
> I'd like to create ASTs from scratch and in standalone (without having
> to create a JavaProject). I'd like then to compile this AST into Java
> bytecode. Can you tell me how can I do it?
>
> Thanks!
> Lionel
>
Re: Standalone AST + compilation [message #147306 is a reply to message #147125] Thu, 04 March 2004 11:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: robwms63.yahoo.com

It seems, though, that the AST class now has a bunch of factory methods
(all prefixed with new). You can just do:

AST newAST = new AST();
newAST.newPackageDeclaration("com.foo");
....

You have to use the factory methods in conjunction with corresponding
set methods. Since there is no 3.x JavaDoc, just open the source for AST
and ASTNode and have a look. There are some good JDs in there....

HTH.

Jerome Lanneluc wrote:

> It is not possible to create a DOM AST outside the Eclipse runtime. Howver
> you can run the compiler in batch (i.e. standalone) mode. See
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt- core-home/howto/batch%20compile/batchCompile.html
>
> Jerome
>
> "Lionel Villard" <villard@us.ibm.com> wrote in message
> news:c22kqm$pfc$1@eclipse.org...
>
>>Hi,
>>I'd like to create ASTs from scratch and in standalone (without having
>>to create a JavaProject). I'd like then to compile this AST into Java
>>bytecode. Can you tell me how can I do it?
>>
>>Thanks!
>>Lionel
>>
>
>
>
Re: Standalone AST + compilation [message #147847 is a reply to message #147306] Tue, 09 March 2004 00:34 Go to previous message
Eclipse UserFriend
Originally posted by: akiezun.cuthis.mit.edu.andthis

> It seems, though, that the AST class now has a bunch of factory methods
> (all prefixed with new). You can just do:
>
> AST newAST = new AST();
> newAST.newPackageDeclaration("com.foo");

ain't gonna work, i think:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=21428
a.
Previous Topic:How to generate SWT from source
Next Topic:test
Goto Forum:
  


Current Time: Wed Jun 04 08:36:04 EDT 2025

Powered by FUDForum. Page generated in 0.08086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top