Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Chain 2 parsers/generators
Chain 2 parsers/generators [message #985782] Fri, 16 November 2012 07:40
Sergio Otero is currently offline Sergio OteroFriend
Messages: 39
Registered: June 2012
Member
Hi

I have a template grammar that parses files with extension ".LANG1" and the output is ".LANG2" files.
I have another grammar that parses files with extension ".LANG2" and the output is ".java"

When i save a ".LANG1" file, the generator ouptuts a ".LANG2" file in the src-gen directory, but the generated file is not parsed nor compiled into java.

If i open the file and save it, then it gets generated.

I've tried several options to accomplish this, but none have worked:

* Change the OutputConfiguration to set derived to false
* In the compiler, after the ".LANG2" file is generated in xtend, find the IResource and save it
* Add a dependency from the Lang2 plugin to the Lang1 plugin and then in the compiler, after the ".LANG2" file is generated in xtend, find the IResource and invoke the lang2Generator.doGenerate(resource,fsa) method. It doesn't seem the right option because i think the lang1 generator is being invoked with the lang2 guice configuration (i had a custom OutputConfiguration in lang2 and lang1 didn't seem to find the default OutputConfiguration that was deleted only in lang2)

Any ideas?

Thanks
Previous Topic:Display Exception while generating Model-Output to User
Next Topic:Resolving cross-references in standalone
Goto Forum:
  


Current Time: Fri Apr 19 05:04:58 GMT 2024

Powered by FUDForum. Page generated in 0.01838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top