Re: EBNF and its not-so-usefulness
> > > I am in no way suggesting that any language may be completely
> > > defined in EBNF.
> >
> > But why not, Chris? A language can most assuredly be completely
> > defined in EBNF, assuming that by a language you mean the sentences
> > generated by the grammar expressed by the EBNF definition.
>
> ...EBNF could indeed (for at least certain classes of language)
> be used to define both the "whole body of words" and "methods of
> combination of words" - in practice it is not. It may define some key
> words but in general it treats the main corpus of words as
> non-terminals...
Well, strictly speaking, non-terminals (like "<sentence>") are BNF
variables, and hence are metalinguistic entities, not part of the
language being defined.
> ...and therefore defines their general form but not the individual
> words - words that do not exist in the language appear as admissible
> as ones that are not.
I think that is the wrong way to look at it. It's not that anything is
admissible (unless this is expressly stated). Rather, the BNF with
unstated terminals is picking out a *class* of languages with similar
form but with different lexicons. Or again, BNFs with unstated
terminals are not concrete BNFs but BNF *schemas* that are completed by
specifying the terminals.
> It certainly contains no semantic definitions.
Of course not; not the role of a BNF.
> > > Not all sentences that parse according to the grammar are
> > > necessary legal or 'meaningful' in some wider sense.
> >
> > Certainly they should be in any clear and useful sense. For formal
> > languages like KIF --- at least, those with a semantics that has no
> > truth-value gaps --- every sentence generated by the grammar should have
> > a well-defined meaning in every model.
> ...
> Again it depends upon the language.
Well, more on the semantics. But it sounded like you weren't allowing
even this.
> In other cases the EBNF may be used to introduce constructs in the
> language at run time - defining operators, for example.
Languages, as standardly understood, are fixed abstract entities. I
think you are mixing apples and oranges when you try to fold run time
issues into the mix. A BNF picks out a grammar. A sentence is either
well-formed according to the grammar or it isn't (on the usual
definitions of "language" and "grammar" -- I'm not denying one couldn't
generalize the notions to allow for a more dynamic notion of a grammar).
> If a valid sentence in the language being parsed introduces an infix
> operator that expects two operands that return a truth value then the
> validity of an expression containing such a term cannot be validated
> solely against the EBNF.
Then the sentence was not valid with respect to (the grammar defined by
the BNF in question in the first place.
Regards,
-chris
--
Christopher Menzel # web: philebus.tamu.edu/~cmenzel
Philosophy, Texas A&M University # net: chris.menzel@tamu.edu
College Station, TX 77843-4237 # vox: (979) 845-8764