The complaints about ISO Prolog, and about ISO standards generally not being available publicly / at no cost, resonate a lot with me. If you compare eg. the POSIX and the ISO C development workflows, and their respective end results, there's a world of difference.<p>"ISO" (International Standards Organization), where you have "national member bodies", should absolutely be a thing of the past <i>for programming languages</i> (or for anything related to computing). My country's national body's own homepage has a huge tirade, aiming to "dispel myths", such as the "myth" that "standards should be available free of charge". Meanwhile, <i>lots</i> of std orgs have published computing standards with various degrees of openness <i>already</i>.<p>ISO is a relic when it comes to computing. (So are other standards bodies that choose to remain proprietary; like those behind PCI, SCSI, ... Computing is ubiquitous and these bodies should be forced open by law, for the public interest.)
> <i>every single language document uses its own notation, which is more often than not, a dialect of the (Extended) Backus-Naur Form</i><p>I came across this recently while writing an article that references Lua, Go and Python (3.8) syntax. Each of them uses a slightly different form of EBNF.<p>To make them more easily comparable, I wanted to convert all three to the same format. Looking for something fairly standard (not entirely ad-hoc but also not as formal as ISO/IEC EBNF or RFC 5234 ABNF), I came across Wirth Syntax Notation [0] [1]:<p><pre><code> syntax = { production } .
production = identifier "=" expression "." .
expression = term { "|" term } .
term = factor { factor } .
factor = identifier | literal | "(" expression ")" | "[" expression "]" | "{" expression "}" .
literal = "\"" character {character} "\"" .
</code></pre>
It turns out that the Go specification already uses WSN [2]. I converted Lua and Python, and then could work with all three language grammars in a consistent, machine-readable notation.<p>[0] <a href="https://en.wikipedia.org/wiki/Wirth_syntax_notation" rel="nofollow">https://en.wikipedia.org/wiki/Wirth_syntax_notation</a><p>[1] <a href="https://dl.acm.org/doi/10.1145/359863.359883" rel="nofollow">https://dl.acm.org/doi/10.1145/359863.359883</a><p>[2] <a href="https://go.dev/ref/spec#Notation" rel="nofollow">https://go.dev/ref/spec#Notation</a>
Still use EBNF, so some of my tools, citations, and sources are:<p>Here is a list of all variants of EBNFs as well as Vim syntax highlighter for EBNF variants:<p><a href="https://github.com/egberts/vim-syntax-ebnf">https://github.com/egberts/vim-syntax-ebnf</a><p>And a EBNF format detector:<p><a href="https://github.com/egberts/filetype-ebnf-grammars">https://github.com/egberts/filetype-ebnf-grammars</a><p>And a master list of all variants of EBNF:<p><a href="http://www.cs.man.ac.uk/~pjj/bnf/ebnf.html" rel="nofollow">http://www.cs.man.ac.uk/~pjj/bnf/ebnf.html</a>
> One of the most common operations in a grammar, by far, is concatenation (aka sequencing). ISO/IEC 14977:1996 requires that a comma be used for every concatenation, so any sequence of N symbols will have N-1 commas.<p>It seems they were trying really hard to make EBNF NOT look like the grammar it is representing.<p>> ISO/IEC 14977:1996 represents “one or more” as { symbol }- which means “0 or more symbols, and then subtract the empty set<p>It's almost as if they were looking for a special syntax to express "1 or more".<p>Bizarre ... just bizarre.
IMHO ABNF is just as annoying to read, especially its insistence on '/' instead of '|' for alternation (when | has universally become the "OR" symbol in other languages) and "%x" for hex prefixes. My preference for syntax descriptions is [ ] for "optional", ",,," or "+" for "1 or more", "*" for "0 or more", and "{min,max}" or "{n}" for repetition ranges, which closely mirrors regex syntax; I'm not sure if this has been standardised or even has a name, but I've seen it far more often than ABNF/EBNF.
These are some of the many reasons why I developed the Dogma metalanguage.<p><a href="https://dogma-lang.org/" rel="nofollow">https://dogma-lang.org/</a><p><a href="https://github.com/kstenerud/dogma/blob/master/v1/dogma_v1.0.md">https://github.com/kstenerud/dogma/blob/master/v1/dogma_v1.0...</a><p>That, and also I needed a language that could describe binary data.
(4) -> I would say that the lack of regex use is a plus. Yes I use them all the time. For anything complicated I'll just ask ChatGPT to make it. And of course, are regexs all the same across everything?<p>(5) -> Once you get it you get it.<p>Every language specification is odd in its own special way. In any case I haven't really seen BNF/EBNF used in the last few years, so this is probably a moot discussion.