[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] the formal grammars' utility
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, 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.
> 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.
- Jay Kominek <jay.kominek@colorado.edu>