Use Chevrotain syntax as alternative #780
Replies: 1 comment 3 replies
-
While advanced features such as cross references can be theoretically described using something similar to the internal Chevrotain parsing DSL, this makes you lose all advantages of the offered code generation. The generated interfaces/types might not be important if you're purely writing JavaScript code anyway, but our use cases (writing large and complex DSLs/programming languages) this is hugely important. Also, I would argue that EBNF is arguably one of the easiest ways to get started with building formal languages. Nevertheless, I generally agree with the notion. Having some way to just build a language server based on an internal DSL description sounds very appealing. |
Beta Was this translation helpful? Give feedback.
-
BNF syntax might be quite complex especially if you are new to this. Since you use Chevrotain in the background anyway, why would not we create alternative as chevrotain syntax JS file instead of
.langium
file?Chevrotain is JS and everyone who created an extension for VS Code most likely know this language and it will be easy for him.
Chevrotain syntax is much easier to check and generate diagram out of it. Very useful.
When someone have a problem, they will contact Chevrotian support not langium.
I think you create those ruls anyway, why do not wee just create them ourselves? I mean the most complex thing is not BNF or Chevrotain or .langium syntax and you DSL description. The most confusing is to turn it to LanguageServer and create all those autocompletion, go to definition and so on.
Langium is a great project to solve this, and I could just use more familiar technologies like JS for DSL creation.
Beta Was this translation helpful? Give feedback.
All reactions