[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban] Error in bnf.300



At 10:44 AM 3/21/04 -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 "#)".

I don't believe so, though I don't pretend to be able to read EBNF as well as the YACC grammar.

I could be wrong, but I believe that the EBNF is NOT designed to show the structure within a single rule parses - it just shows what is a legal string. EBNF rules are also not supposed to be self-referencing so it would be invalid to have a text-1 included in the rule for text-1; that is what the "..." construct is supposed to communicate.

The first three rules of text_B_2 are in the in order to allow you to stutter:

.i   .i   .i   mi klama

This was generalized to allow
.ije  .ije  .ije   mi klama

The "mi klama" gets included when you finally get to the text_c_3 YACC rule/paragraphs EBNF rule.

It is possible that the EBNF is incorrect in how it represents the 4th rule of text_B_2, but my mind is twisted in the abbreviated recursion/alternation, so I cannot be sure. If it is incorrect, I think the fix would be to change "| NIHO" to "] [NIHO]", because the EBNF as stated appears to forbid ".i ni'o mi klama"

Here's the grammar.300 part (w/o comments); you mostly want to look at text_B_2.

%start text_0

%%

text_0                  :  text_A_1
                        |  indicators_411  text_A_1
                        |  free_modifier_32  text_A_1
                        |  cmene_404  text_A_1
                        |  indicators_411  free_modifier_32  text_A_1
                        |  NAI_581  text_0
                        ;

text_A_1                :  JOIK_JEK_422  text_B_2
                        /* incomplete JOIK_JEK  without preceding I */
                        /* compare note on paragraph_10 */
                        |  text_B_2
                        ;

text_B_2                :  I_819  text_B_2
                        |  I_JEK_820  text_B_2
                        |  I_BO_811  text_B_2
                        |  para_mark_410  text_C_3
                        |  text_C_3
                        ;

text_C_3                :  paragraphs_4
                        |  /* empty */
                        ;


The test case is "mi broda .i je no da zo'u broda", which jbofi'e chokes on
because of this problem.

I believe that it should be rejecting it.  (See my other post).

lojbab

--
lojbab                                             lojbab@lojban.org
Bob LeChevalier, Founder, The Logical Language Group
(Opinions are my own; I do not speak for the organization.)
Artificial language Loglan/Lojban:                 http://www.lojban.org