lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Jun 1, 2013, at 1:36 PM, Gavin Kistner <phrogz@me.com> wrote:

As before, I wholly agree that the prose is preferable for humans.
But I still maintain that a "complete" grammar that is not complete is not helpful for computers, and is not helpful for humans.

Actually I feel the the existing BNF *is* helpful for humans (it is for me, anyway, and I've always assumed I'm human), and my guess is that was the intent in the Lua BNF. It's been a few years, but the last time I read the C standard the grammar as "formally" presented there was also essentially there to clarify the text *for humans*.

One problem with BNF (and other meta-grammers) imho is they stumble when trying to formalize some things that are relatively easy to express in prose. Things like whitespace rules that, for Lua, are expressed in prose and not the BNF, presumably for that reason. (I'm not saying such things cannot be represented in BNF, just that they tend to swell the BNF significantly. While this is OK for a computer it reduces the utility of the BNF for humans.)

--Tim