OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: Issue: Should we disallow nested grammars?


Kohsuke KAWAGUCHI wrote:

> This BNF still has a loophole:

Yes, it does.

> I don't think schema is enough to completely prohibit them: 

I tried to further tighten the BNF and failed.  It does not seem 
to be possible to provide a just-enough BNF.

Kohsuke KAWAGUCHI wrote:

> By the way, rewritten BNF is an ambiguous grammar, isn't it.

No, it isn't.

Murata Makoto wrote:

> textPattern ::=
...
>  | <t:choice> textPattern textPattern </t:choice> 
> 
> nonTextPattern ::=
...
>  | <t:choice> nonTextPattern nonTextPattern </t:choice> 
>  | <t:choice> textPattern nonTextPattern </t:choice> 
>  | <t:choice> nonTextPattern  textPattern</t:choice> 

We only have to consider these productions, since other productions 
have non-overlapping terminals.  By easy induction, each sentence 
has one and only one derivation tree.

Cheers,

Makoto


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC