EBNF is a DSL.
I happen to like it more than many apis because of it's history, stability, and my experience with it. But, that's an opinion.
EBNF is a DSL.
I happen to like it more than many apis because of it's history, stability, and my experience with it. But, that's an opinion.
Let's not forget that string-based programming is the source of many many bugs
But Instaparse has exposed all the functionality as an "in the language" DSL as well using parser combinators in a map structure (near the bottom of the README).
You can also turn a string specification into a grammar map/combinator specification, which I have used when a part of my parser was generated at run time.
Since the parser generator compiles the EBNF into an executable function at runtime. The solution is the same as writing code in Ruby, JavaScript, or any other dynamic language. Write a unit test.