Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like how Coq describes its grammar (https://coq.inria.fr/refman/language/core/basic.html), though it's definitely not a standard. The Coq grammar and language is very complex with edge cases for niche features so it's good they have a detailed reference (also because other than CPDT and Software Foundations there aren't many references or tutorials out there...).

IntelliJ Grammar-Kit also uses sort of EBNF (https://plugins.jetbrains.com/plugin/6606-grammar-kit), the file extension is even `.bnf`.

Even though parser generators are often much different than EBNF, I still wish more people followed this standard, and parser generators could create EBNF grammar definitions. Because it's not just for parsing directly: it's a good starting point for creating parsers; a reference to validate and regression test; and it can be used to generate a (sometimes ambiguous) parser which is good for prototypes and toy languages.



It seems to be a compact graphical representation.

Speaking of graphical representations, here's a less compact one, but more intuitive: https://sqlite.org/syntaxdiagrams.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: