What I would do is to write down the expression you want, quoted: ex = :(....expression you want....)
then do dump(ex) to see what the Expr data structure looks like, and you can then write a program to produce this data structure. It's not completely clear why you would be using code generation in this context. I guess you are trying to generate an inlined Vandermonde matrix of some sort?
