Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Preprocess parsed AST before code generation(DerivedStateComputer?)
Preprocess parsed AST before code generation [message #1424326] Mon, 15 September 2014 20:41 Go to next message
Cioran Naroic is currently offline Cioran NaroicFriend
Messages: 18
Registered: December 2013
Junior Member
Hi,

In my DSL workflow, I need to preprocess the parsed AST of the user's file to load external files, infer new elements in the AST, set some derived attributes or infer typing relations.

I want this preprocess phase to happen between the parsing of the AST and the code generation by the Jvm inferrer.

Currently I'm doing these processings in a custom DerivedStateComputer, and it works just fine, but I wonder if this is really the proper way to do it or if there is a better place where to put that code (as this is pretty common to augment an AST after parsing)?

Also, is it possible to define two validators for my language: one that validates the AST just after parsing, and one that validates the AST after this preprocessings occur?

Thank you,

Cioran

[Updated on: Mon, 15 September 2014 21:14]

Report message to a moderator

Re: Preprocess parsed AST before code generation [message #1424657 is a reply to message #1424326] Tue, 16 September 2014 08:31 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Cioran,

please look into AbstractCleaningLinker#beforeModelLinked.

Regards,
SEbastian

Am 15.09.14 22:41, schrieb Cioran Naroic:
> Hi,
>
> In my DSL workflow, I need to preprocess the parsed AST of the user's
> file to load external files, infer new elements in the AST, set some
> derived attributes or infer typing relations.
>
> I want this preprocess phase to happen between the parsing of the AST
> and the code generation by the Jvm inferer.
Re: Preprocess parsed AST before code generation [message #1426118 is a reply to message #1424657] Thu, 18 September 2014 09:18 Go to previous message
Cioran Naroic is currently offline Cioran NaroicFriend
Messages: 18
Registered: December 2013
Junior Member
I'll have a look at that. Thanks !
Previous Topic:DSL for JIT ecore MM
Next Topic:Customize XtextLinkAdapter
Goto Forum:
  


Current Time: Thu Apr 25 17:08:47 GMT 2024

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

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

Back to the top