Hi Jean-Christophe,
Yes, SmaCC has the infrastructure for doing that, in text form (match an ast subtree, produce a string) and linked to SmaCC produced ASTs (I believe by using a GLR parser to generate multiple matches on an input pattern). Using text is a deliberate design decision [1], as far as I know, and I can understand why ;) But under some conditions, you can easily move from text replacement to AST subtrees injection; ask me for more details.
For a system that transform ASTs, you want want to look at DMS [2]. Just significantly more expensive. Another idea would be a derivative of the RB engine you have in Pharo (after all, RB is from the same guys as SmaCC).
At the moment, the rewritting part of SmaCC is not that tested (or not working, for the master/slave client/serveur rewritting engine part), so I'd be really interested to have some feedback if you decide to use it.