3 ms·
> most languages don't seem to have a simple library for parsing data This is what lex and yacc (etc) are for, but they aren't quite simple. Arguably, XML has
by 6ren 14y ago
> most languages don't seem to have a simple library for parsing data
This is what lex and yacc (etc) are for, but they aren't quite simple. Arguably, XML has largely replaced these for "parsing data", since DTDs and XML Schema are CFGs with some minor restrictions (e.g. 1-unambiguous). In many cases, you don't even need a CFG, just nested lists is enough, so JSON fills that role. For even simpler data, just lists of values, there's csv and unix-style line-based formats (use awk etc for parsing).
Interest in CFG's seems to have decreased dramatically since XML (and later JSON) met the simpler needs it served.