On Wed, Jan 24, 2018 at 4:25 PM, Guido Chari charig@gmail.com wrote:
Ok. Thanks.
And what is the expected flow for adding an importer?
To create a (petit) parser for Scala source and output mse format? Are there any examples of other "similar" languages to look at?
Hi,
Here some possibilities:
- The language you want to import has an AST with symbol resolution. Then the easiest is to generate a MSE and visit the AST. To generate the MSE the easiest way is to implement Fame in this language. In java, the Fame implementation can generate Famix classes in java from a MSE describing Famix. - You don't have the AST but you have the grammar. Then you can use SmaCC to parse the code and write a symbol resolution to build associations. - You don't have the grammar, then you can write a PetitParser and write the symbol resolution.
Best, Guido.
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev