Hi Jay,

good to hear about your successes!

and yes, to write the given format you may want to use Xtext’s serializer. It 
takes an EMF model as input and outputs it as text that fully conforms to your 
grammar. 

You can invoke it via 
org.eclipse.xtext.resource.XtextResource#save(…) or
org.eclipse.xtext.serializer.ISerializer

If you want to generate text in a format that you don’t have a grammar for, 
Xtend is an excellent language to implement a mode-to-text transformation aka 
code generator.

regards,
  Moritz



> On 10 Aug 2016, at 17:08, Jay Jay Billings <[email protected]> wrote:
> 
> Everyone,
> 
> We have had some really great success deploying xtext for processing 3D 
> geometry formats in Eclipse ICE, which is work that Kasper Gammeltoft did 
> over the summer. It greatly accelerated our pace when it comes to parsing 
> these files, but is there anything that it can do to help us with writing 
> emitters? That is, can it generate routines to programmatically write to the 
> given format as well?
> 
> We haven't been able to find anything in various tutorials about it.
> 
> Thanks,
> Jay
> 
> -- 
> Jay Jay Billings
> Oak Ridge National Laboratory
> Twitter Handle: @jayjaybillings
> _______________________________________________
> xtext-dev mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/xtext-dev

_______________________________________________
xtext-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/xtext-dev

Reply via email to