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

WG: AST Transformation

Title: WG: AST Transformation


it is possible, just change the parse tree as you like.
But this is 'handwork'. SableCC just provides the parse tree.
All the other stuff is up to you.


> -----Ursprüngliche Nachricht-----
> Von: owner-sablecc-list@sable.mcgill.ca
> [mailto:owner-sablecc-list@sable.mcgill.ca]Im Auftrag von
> Nicholas Read
> Gesendet: 22 July 2002 11:35
> An: sablecc-list@sable.mcgill.ca
> Betreff: AST Transformation
> Hi,
> 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.
> Regards,
> Nick
> --
> Nicholas Read, BSc
> Hobart, Tasmania
> Australia
> 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"