Re: EBNF and its not-so-usefulness
Frank
I apologise for a slight carelessness in wording. Having stated: "Despite
being an advocate of XML I would not particularly recommend it as a
substitute for EBNF in defining the grammar of a language such as KIF." I
should probably have repeated the phrase "the grammar of" in the sentence
"As witness to this EBNF is defined in EBNF, XML is not defined in XML.".
I am in no way suggesting that any language may be completely defined in
EBNF. It is simply a mechanism that defines the terminals and non-terminals
that form lexically valid sentences in the language. Not all sentences that
parse according to the grammar are necessary legal or 'meaningful' in some
wider sense. Hence the notions of "well-formed" and "valid" in the XML
spec. My understanding is that for an XML document to be considered
conforming it is a necessary but not sufficient condition for it to match
the numbered BNF rules, I therefore believe that they are normative as I
think that you will find that not all productions have a corresponding plain
English descriptive clause.
I am not specifically arguing in favour of EBNF (or any particular flavour
of BNF) against other possible languages for defining a formal language
grammar, although I would argue that defining the syntax of a language in
this way can be an aid to mechanistically checking that the syntax is
unambiguous. The intent of my email was primarily to make some distinction
between EBNF and XML in the role of defining syntax.
Chris Angus
Home: +44 (0) 16977 41504
SSI: +44 (0) 207 934 4960
Fax: +44 (0) 16977 41666
Chris.Angus@BTinternet.com or Chris.C.Angus@opc.shell.com