Replies: 1 comment
-
Hey @TimPigden,
Generally yes, but it depends on how you want to use Langium and how you want to integrate it into your toolchain: First off, Langium as a tool to build language servers (or editing services, see here for a general outline of what Langium aims to help with) and compiler tool chains is independent of the actual runtime that is used to "execute" your DSL. We have a lot of projects using Langium (i.e. running in Node.js or the browser) that generate Java code from the DSL content. In this case the user interaction with the DSL happens using a language server in your IDE (likely vscode, or something similar that supports the LSP) and a compiler-like tool (maybe a CLI) that generates Java source code artifacts from the written DSL code. In the same step, the Java code could also be already compiled into an executable program. Both language server and CLI are written in TypeScript with Langium, while the final artifacts are JVM based. Alternatively, if you need a deeper integration with the JVM world, Xtext might be a suitable (but more legacy) framework to build a DSL. Note that JVM interop can be also accomplished with Langium, see this project which allows to link JVM classes in Langium.
We have a tutorial on our website for building a more complicated language. Obviously, it won't map completely to your use case, but it should get you started. In case you have further questions, don't hesitate to ask on this board or hit us up directly in case you need professional support. |
Beta Was this translation helpful? Give feedback.
-
Hi, the docs seem to be about running node or in browser. But I want to layer a dsl on top of an existing scala (jvm) application. Is langium an appropriate tool? If so where can I find a step-by-step outline of what I need to do?
Beta Was this translation helpful? Give feedback.
All reactions