Preprocess parsed AST before code generation [message #1424326] |
Mon, 15 September 2014 20:41 |
Cioran Naroic 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03251 seconds