[Soot-list] Accessing AST

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Jan 31 12:10:48 EST 2007


The Java frontend in Soot is Polyglot. So if you only want to use
frontend functionality you could rather use Polyglot (or SableCC or
Eclipse for instance) directly.



Eric  

> -----Original Message-----
> From: soot-list-bounces at sable.mcgill.ca 
> [mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of 
> mbatch at cs.mcgill.ca
> Sent: Tuesday, January 30, 2007 5:53 PM
> To: David A Weiser
> Cc: soot-list at sable.mcgill.ca
> Subject: Re: [Soot-list] Accessing AST
> 
> On Tue, January 30, 2007 5:19 pm, David A Weiser wrote:
> > Is there a way to traverse the AST of Java with SOOT?
> 
> Are you talking about Java source?
> 
> You could always use a SableCC generated lexer/parser. Java 
> grammars are available on the website, too, so it is as 
> simple as writing a single printer adapter class.
> 
> The other option is to look at the code of the Soot 
> decompiler (DAVA). It has a slightly-nonconformist AST, with 
> respect to the rest of Soot. Might have what you are looking for.
> 
> Finally, if you specify Java source as input to Soot, it uses 
> a Java-to-Jimple parser, which has an internal AST 
> representation. You can poke around in the code in the 
> package "soot.javaToJimple.jj".. but I'm not sure how 
> complicated and/or thorough it is.
> 
> Michael
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 



More information about the Soot-list mailing list