templates - source code(COBOL) generation using a java program -
I'm going to write code generator to generate a cobol program by using some input file in the record. I'm going to implement it as a Java program. I think the XML / XSL approach will not be suitable in this case, because the input file is not in the XML format.
I think a template processor will be helpful, because some part of it can be generated using the current source template. What tool should it be useful for Apache velocity? What would be helpful in this regard?
I have used velocity for the source code generation in the past. It worked quite well, but ended up writing a fair bit of generator in Java.
When your data is straight-forward in the target code from the structures, then the velocity is good. Before starting the move, the in-memory data structure is to be found in the correct form.
(And I'm not going to criticize Cobol as a target language. It is clearly a practical reason to use it.) Nuff said that
P>
Other velocity options include freemakers and jets (eclips / emf used in the world).
Comments
Post a Comment