Also exists possibility to use rewriting rules techinques.
For example, this is preprocessor implementation of operator
overloading in Javahttp://code.google.com/p/jsoo-coin/
which use TermWare rule engine and Java Parser/Printer.