[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AST Transformation


I have a few questions about SableCC concerning major
transformations of the AST.  Say that I parse some Java
source code in to an AST using the the grammer supplied.

Is it then possible to make major changes to the AST,
for example, create a new method node called A (as in a
node representing a method in Java).

I then want to move the method body node from method B,
and put it in method A, and create new nodes for method B.

Is this possible using SableCC?  If so, how!  If not,
are there any alternatives to SableCC which may be able
to handle such transformations.


Nicholas Read, BSc
Hobart, Tasmania

Email:  Nicholas.Read@utas.edu.au
Mobile: 0429-487-700
ICQ #:  20770226

"Bud, if dynamite was dangerous do you think they'd
 sell it to an idiot like me?"
   - Al Bundy, "Married with Children"