Creating a DSL
summary
A text DSL is used to encode supplier discount and rebate rules for automatic margin calculation and it proves readable enough for non-developers to copy paste and edit; implementation uses a hand‑written parser producing an AST with location info, a small interpreter rather than codegen, and Babel code‑frame for precise errors; avoids PEG.js and big regex pitfalls and adds a web syntax highlighter and autocomplete; an experimental Rust+WASM JavaScript sandbox is pursued for heavier plugin needs.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:37What is a domain specific language?
- 8:01DSL vs. General Purpose
- 10:58Compiler
- 13:58Regular Expression
- 15:52Define an AST
- 33:14Alternative
related talks
13mBrewing JavaScript: Compile your own domain-specific language to JavaScript
31mWrite your Own Domain Specific Language with F#
38mThe magical land of AST's with babel, eslint and codemods
01h 02mProgramming Language Research for Technical and Social Good: What PL Can Do for Good?
01h 57mMPS Talk Series 2021. Day 4
16mBringing the WebAssembly Standard up to Speed with SpecTec
41mmetadsl: separating API from execution
28mFantastic ASTs and where to find them
