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?



From: "Murata Makoto" <mura034@attglobal.net>
To: <trex@lists.oasis-open.org>
Sent: Sunday, April 29, 2001 9:58 PM
Subject: Issue: Should we disallow nested grammars?


> At present, nesting of grammars is freely allowed.  I propose
> to disallow such nesting in V1.0.

I strongly disagree with this. I believe it to be a very good feature of
TREX that it allows all forms of pattern to be composed with very few
restrictions.  A grammar is just another kind of pattern.

> First, I do not see any use cases.  The TREX tutorial says:
> "Of course, in a trivial case like this, there is no advantage in nesting
> the grammars: we could simply have have included table.trex within the
outer
> grammar element."
>
> It further says: "However, when the included grammar has many definitions,
> nesting it avoids the possibility of name conflicts between the including
> grammar and the included grammar."  In other words, we only have to
perform
> renaming upon inclusion.  This is very easy.

Yes, it is easy for computers.  But for humans, it means they have to create
a copy of a pattern and rename definitions.  This renamed copy has to be
kept in sync with the original whenever it changes.

> Second, I believe that modularization mechanisms requires further study.
> I think that it is dangerous to provide nested grammars without fully
> understanding modularization.

Wherein lies the danger?

James




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


Powered by eList eXpress LLC