Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText Workflow for Expensive Analysis
XText Workflow for Expensive Analysis [message #1807988] Thu, 13 June 2019 18:29 Go to next message
Ben Holland is currently offline Ben HollandFriend
Messages: 34
Registered: April 2019
Member
I have a DSL implementation currently working with code generation, however my DSL contains some properties that I would like to do further analysis of. I think this analysis would be different than the XText validation in that the analysis could be expensive (proving properties about the DSL program) and I would like to trigger it on-demand by the user after code generation is complete. I don't want to trigger this logic every time the code is compiled.

Where would be the right place to put this logic? The analysis would need to consider the AST of the full program.

[Updated on: Thu, 13 June 2019 18:30]

Report message to a moderator

Re: XText Workflow for Expensive Analysis [message #1808021 is a reply to message #1807988] Fri, 14 June 2019 06:51 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
Add a special keyword like "ExpensiveAnalysis" to your grammar
and depending on that keyword run this analysis in the generator where you have the AST.

After this is done, delete the keyword (or comment it out) so your generator works the ordinary way.
Re: XText Workflow for Expensive Analysis [message #1808849 is a reply to message #1808021] Wed, 03 July 2019 06:15 Go to previous message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
Just for my curiosity: Is there a better, more obvious way to access the AST ?
Previous Topic:Hover information support in Xtext Web editor
Next Topic:Customizing validator behavior
Goto Forum:
  


Current Time: Tue Apr 23 07:47:57 GMT 2024

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

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

Back to the top