DEV Community

Discussion on: Writing a DSL parser using PegJS

Collapse
 
combinatorylogic profile image
combinatorylogic

Both external DSLs and eDSLs implemented as syntax extensions can come with the whole range of tools (including proper editor with semantic highlighting, linter, auto-indentation and so on), for free.

You already have a gammar - your PEG. That's pretty much all you need for deriving your tooling for free.

Internal DSLs on top of non-extensible languages are inferior to proper embedded DSLs built on top of macros and syntax extensions.