A java source code instrumentor
0 posts in topic
Flat View  Flat View

Posted By:   Naimal_Khan
Posted On:   Tuesday, November 28, 2006 07:12 AM

Hi, I want to develop a java Source code instrumentor for analysing the source code. For example i want to analyse a conditional statement such as

and i've condition such as

if ((x1 x5)) {do this thing;}
else {do that thing;}

at this point i want the instrumentor to insert code. e.g,
declare temp1, temp2,...tempn variables (egual to the number of variable used in the condition) and then return the values such as (x2-x1)+(x3-x5).
Can i do such kind of intrumentation with ANTLR? how?

About | Sitemap | Contact