[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: Is Lojban a CFG? (was Re: [lojban-beginners] Re: Enumerating in Lojban)
On Thu, Jul 13, 2006 at 11:09:49AM -0300, Jorge Llamb?as wrote:
> If I'm not mistaken, for any CFG, there is a PEG that will accept
> all and only the strings generated by that CFG.
I don't think anyone's really sure about that.
> If that's correct, then what Jonathan wants (a CFG for Lojban) is
> compatible with what Robin wants (a PEG for Lojban).
Not really. What I want is something that parses Lojban as it's
currently defined. I care not at all what formalism does so, as
long as there is a pure formalism for it.
What Jonathan wants is a CFG, which cannot parse Lojban as it is
currently defined. In particular, there is probably not any pure
CFG that will reject "le nu le broda brode brodi".
> At least in principle, because maybe the required PEG might be way
> too complicated to write. Or maybe not, we can at least try.
Erm. camxes is a PEG that parses Lojban as currently defined. You
helped build it... Perhaps you meant CFG there?
> I think this is, simplifying, the kind of thing we would need the
> PEG to do in order to handle the {li pa pa pa pa moi} example:
The PEG already handles it just fine: it barfs, as it should. That
string isn't valid Lojban.
> Current PEG rules:
>
> sentence <- sumti* selbri sumti*
> selbri <- number MOI
> sumti <- LI number LOhO?
> number <- PA+
>
> Possible modification to make it context-free:
>
> sentence <- sumti* selbri sumti*
> selbri <- moi-number MOI
> sumti <- LI li-number LOhO?
> li-number <- PA (PA !MOI)*
> moi-number <- PA+
I don't know what language that encodes, but it's not Lojban as I
currently understand Lojban to be defined. My reading of it is that
it makes {li pa pa pa pa moi} equivalent to {li pa pa pa boi pa
moi}.
> But I don't know how hard it would be to modify the whole PEG so
> that it fully corresponds to a CFG.
I don't see the point of doing so; if we're going to make a CFG, we
should use CFGs to do so, no make a CFG-alike PEG. I just don't see
the point of butchering Lojban to make a CFG that encodes a language
that is almost, but not quite, Lojban.
-Robin
--
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/
To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.