Subject: RE: [lojban] the formal grammars' utility

From: "And Rosta" <[email-masked]>
Date: Sun, 15 Jul 2001 02:16:01 +0100

Jay:
> On Sat, 14 Jul 2001, And Rosta wrote:
> 
> > 1. What use is the EBNF grammar, given that it can't be used instead of
> > YACC?
> 
> It is quite a bit more human readable.
> 
> I believe there are some parser generators in existance which can digest
> various forms of BNF, too.
> 
> > 2. Is there a downloadable version of YACC ordered alphabetically (or
> > in any way such that one knows whereabouts in the rule list to find the
> > expansion for a given node)?
> 
> It would be easy enough to whip up some Perl to alphabetize the
> productions, 

easy enough for you; not for me.

> but I fail to see the utility of that. Nearly ever text
> viewer in existance provides searching functionality, simply search for,
> say, the string 'sumti' at the beginning of a line.

calling up the search function & typing in the search string is
laborious. An internally hyperlinked document would be useful.
But anyway, I was wanting a hardcopy, which I'll just do for myself
by brute force.

> > 3. Has anybody created a more succinct but unabbreviated (and, ideally,
> > more intuitive) version of the YACC grammar?
> 
> That seems to be the point of the EBNF grammar. The YACC grammar is for
> machines. YACC's syntax was not meant to be intuitive, since YACC is
> meant for making compilers, quite possibly one of the most arcane tasks
> one can participate in.
> 
> Condensing the YACC grammar may not be possible without violating LALR(1).
> Whoever constructed it ought to know.

I was looking for a convenient reference guide. Maybe I'll try to make
one if I have time.

--And.