3 ms·
So if not EBNF for defining grammars, what should people be using ie what would be your preferred that would be powerfully enough and general purpose? I’ve nev
by alfiedotwtf 1y ago
So if not EBNF for defining grammars, what should people be using ie what would be your preferred that would be powerfully enough and general purpose?
I’ve never seen PCRE used for grammars and not sure if it would be powerfully enough for all cases, but personally I think it would be pretty cool since I find it easier to read than EBNF and it’s so widely used people can slot a specification right into code and it should just work
- dwheeler 1y agoOne of those alternative specifications is in the W3C Extensible Markup Language (XML) 1.0 (Fifth Edition). As I note, "The W3C specification is much more similar to typical regex syntax making it much easier for today's software developers to understand), avoids the key problems of 14977:1996, and is already clearly described." It's freely available from w3c. You don't need to use XML to use it.
- alfiedotwtf 1y agoOops, sorry. When you said that I thought there was going to be an actual specification of the grammar specification itself rather than the application in use. Ok cool, got it thanks :)