Suggestions for a preprocessor



If you were given the task of generating a set of text files whose different
versions differed only in a set of numerical values, which tool would you
choose?

The first tool that jumped to my mind was the M4 preprocessor, but it
appears it doesn't handle algebraic operations that well.


Thanks in advance,
Rui Maciel
.