grammatica-users
[Top][All Lists]
Advanced

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

Re: [Grammatica-users] Grammar for "Nesting"


From: Per Cederberg
Subject: Re: [Grammatica-users] Grammar for "Nesting"
Date: Mon, 25 Jul 2005 07:32:13 +0200

I think a production for Message could look like this:

  Message = MethodCall Message?
          | Object Message? ;

This will allow an infinite list of method calls and
objects mixed together. If the Object production can
only be placed at the end, you'd write the production
like this:

  Message = MessageCall Message?
          | Object ;

Cheers,

/Per

On sun, 2005-07-24 at 19:40 -0500, Patrick M Gremo wrote:
> 
> I'm trying to create a kind of "reverse" call stack type of thing.  It
> sounds easy but for some reason I just can't figure it out.
> 
> I have this:
> 
> (object | methodCall) methodCall methodCall methodCall ...
> 
> 
> I want a tree like:
> 
> message
>    |-methodCall
>    |-message
>         |-methodCall
>         |-message
>              |-methodCall
>              |-message
>                   |-object | methodCall
> 
> 
> 
> 
> _______________________________________________
> Grammatica-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]