Invoking the parser and transformations from any Java class.
Hi colegues from Spoofax/Stratego community,
I´m facing the problem of using a transformation (implemented in a Spoofax project) in an external Java class. For example, my Spoofax project has a parser implemented and a transformation of my interest. I´d like to know if it is possible to use the parser and the transformation in another Java class. I followed the steps to compile my project to java and Spoofax generated a lot of Java classes containing strategies (one for my transformation, other named parse, and a lot of others). I just want to invoke the parse to analyse a file and build the AST, and then, I want to invoke the transformation over the AST.
I saw a related discussion about using strategies implemented in Java (extending the class Strategy) in Spoofax (as an external strategy). But I don’t need my project be a Spoofax project. Actually, I need to invoke the parse and the transformation directly from a Java class instead ot the “Transform” menu.
My spoofax project is intended to be used in a wider context: a model checker that analyses specifications and produces an outputs that are transformed by my stratego project into a graph (reachability, conterexample, and so on).
I would be grateful if someone could help me with that (a complete simple example would be very welcome).
My thanks in advance.
AdalbertoSubmitted on 21 May 2013 at 18:03
Log in to post comments