[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: Error in bnf.300
On Sun, Mar 21, 2004 at 10:44:54AM -0800, Robin Lee Powell wrote:
> There's a contradiction between grammar.300 and bnf.300 and,
> regardless of baselining issues, bnf.300 is *clearly* wrong:
>
> text-1<2> = [(I [jek | joik] [[stag] BO] #) ... | NIhO ... #] [paragraphs]
>
> The problem is that there's supposed to be a "text-1" betweev "BO]"
> and "#)".
Also, "NIhO ..." should be "(NIhO [paragraph]) ...".
BUT WAIT!
There's MORE!
If you act now, you'll also receive "This doesn't actually fix the
problem", absolutely free!
This only fixes *leading" ijek statements. The problem with "mi broda
.i je no da zo'u broda" still exists.
Furthermore, I can't find anything in grammar.300 that allows parsing of
that sentence, although the official parser seems to handle it just
fine.
The *reason* the official parser handles it is apparently due to a bug in the
lexer:
paragraph_10 : statement_11
| fragment_20
| paragraph_10 I_819 statement_11
| paragraph_10 I_819 fragment_20
| paragraph_10 I_819
/* this last fixes an erroneous start to a sentence,
and permits incomplete JOIK_JEK after I, as well
in answer to questions on those connectives */
;
I_819 : lexer_S_995
| lexer_S_995 free_modifier_32
;
lexer_S_995 : lexer_S_719 I_545
;
I_545 is just ".i".
Code for lexer_S_995:
token *lexer_S_995_driver()
{
return cpd_reduce(I_root_956(), 995);
}
I_root_956 : I_545
| I_545 simple_JOIK_JEK_957
;
So, the reason that the example works in the official parser is because
lexer_S_995 erroneously accepts an I followed by a JEK/JOIK, rather than just
an I.
Even with that, "mi broda .i je bo no da zo'u broda" fails in the official
parser because lexer_S will not erroneously accept a BO.
-Robin
--
Me: http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin.
"Constant neocortex override is the only thing that stops us all
from running out and eating all the cookies." -- Eliezer Yudkowsky
http://www.lojban.org/ *** .i cimo'o prali .ui