[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] Re: Is Lojban a CFG? (was Re: [lojban-beginners] Re: Enumerating in Lojban)
On 7/13/06, Seth Gordon <sethg@ropine.com> wrote:
Both CFGs and PEGs define a grammar to be used in a parser, so they're
"what the listener needs", but the parsers that use them work in
different ways.
All right, and they are also both "what the speaker needs" in order to
produce grammatical strings.
CFGs are written from the point of view of the speaker, and PEGs are
written from the point of view of the listener, even though each can be
used the other way. Would that be an acceptable way of putting it?
> If I'm not mistaken, for any CFG, there is a PEG that will accept all and
> only the strings generated by that CFG. If that's correct, then what
> Jonathan
> wants (a CFG for Lojban) is compatible with what Robin wants (a PEG for
> Lojban). At least in principle, because maybe the required PEG might be
> way too complicated to write. Or maybe not, we can at least try.
CFG and PEG are not just two different ways to express the same grammar.
Right, and I didn't say they were. But isn't it true that for any CFG,
there is always a PEG that will accept all and only the strings generated
by the CFG?
(I know the reverse is not true, there are PEGs that do not correspond to
any CFG.)
mu'o mi'e xorxes