3 ms·
> current BNF notations are always lacking in something fundamental that each use case needs. There are two ways to resolve this. 1) In a way that is backwards
by Karellen 4y ago
> current BNF notations are always lacking in something fundamental that each use case needs.
There are two ways to resolve this. 1) In a way that is backwards-compatible with BNF, and 2) in a way that isn't.
If you way is backwards-compatible, it's going to be much more easily understandable to anyone who already knows BNF. They don't have to go back and double-check whether some construct means concatenation or an alternative form.
It also means that if someone is working on a grammar that doesn't need one of your new fundamentals and is expressible in plain BNF, they're going to write something that anyone who already knows BNF can read without any extra research.
Also, if your additions are good enough, they provide a good draft of a new way to extend "official" BNF in the future. If you extend in an incompatible way, that's not even a possibility.
- kstenerud 4y agoI've seen both approaches used. And in both cases, nothing comes of it outside of the specific project (for an example, see the BNF in the XML spec). What you end up with is a bunch of small innovations in each project, but no incentive to consolidate these gains (because it's so niche to begin with, and there's no significant business advantage to be had). And of course anyone who tries will have massive pushback ala https://xkcd.com/927 https://xkcd.com/927 So everyone just does their own thing and we pretend that it's all fine.