Re: A Proposal for an ixml Preprocessor

On 11-11-2024 14:25, Steven Pemberton wrote:
> Enclosed is a document proposing a preprocessor that allows the 
> construction of an ixml grammar from several 'library' grammars 
> without having name clashes, and without changing the semantics of ixml.

This looks like it could be very useful.
As far as I understand this now, there is no way that a grammar A 
importing a grammar B could /specify/ how a conflicting rule is renamed?
To illustrate what I mean, suppose that both grammars A and B have a 
rule for z:

    --A.ixml--
    x : y , z.
    y : "Y" .
    z : "AZ" .
    -----

    --B.ixml--
    +use *zz>z* from A.ixml .
    a : z, b , zz .
    b : "B" .
    z : "BA" .
    -----

I am not sure if I have the renaming right, or if it should be the other 
way around.
Here, the B grammar knows that zz is the z from A, and can use both A's 
z and its own.

Best regards,
Nico

Received on Tuesday, 12 November 2024 08:56:59 UTC