On Wed, Jan 24, 2018 at 4:25 PM, Guido Chari <[hidden email]> 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?
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
- You don't have the grammar, then you can write a PetitParser and
write the symbol resolution.