Xtend vs. Xpand? [message #1149285] |
Tue, 22 October 2013 02:37 |
Gary Worsham Messages: 176 Registered: September 2013 |
Senior Member |
|
|
The Xtext tutorial references Xtend for code generation.
http://www.eclipse.org/Xtext/documentation.html
What I need to do is iterate through my model line by line and for the most part translate specific instructions into Java and align the arguments correctly. In other cases I will need to count forward from a skip instruction until I find the matching label. Finally I may need to make value substitutions from a list of equates declared at the top of the file. I will create one output file per input file (model). As I gather the example generates a bunch of Java output files from individual Entities in the model.
The Xtend code generation example given above doesn't seem like it maps to my goal, but maybe it does and I just don't realize it yet.
I found an Xpand code generation example here:
http://www.danielschneller.com/2010/08/code-generation-with-xtext.html
and this is a lot easier for me to grasp. However I don't know whether Xpand will do everything I am looking for.
One thing I read indicated that Xtend was a superset of Xpand, or better for some reason.
Any opinions as to which one is easier to deal with or more appropriate for my application?
Many thanks!
GW
[Updated on: Tue, 22 October 2013 04:26] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03899 seconds