rascal

Setting up a Rascal example project


How do I setup a Rascal-MPL project to consume the DSL built with Rascal?

I don't seem to find any resource that details how to solve that particular problem


Solution

  • The documentation hasn't been written for that case but here goes:

    In the terminal the active version of the path configuration for the interpreter will be printed. It should have the DSL project in the list of srcs.

    In VScode log for the Rascal LSP you can see the path configuration printed when compiling/checking source files in the client project. There the DSL project should be in the libs path.

    If the DSL project isn't compiled to .tpl files that appear in the target folder and eventually in the jar, you will get spurious error messages in the client code. In that case trigger the compiler in the DSL project by saving the top module, or run mvn install again. Revisit the pom file for the settings of the rascal-maven-plugin