On Thursday 02 October 2008 15:23, Jim Idle wrote:
> On Thu, 2008-10-02 at 15:01 -0700, Randall R Schulz wrote:
> > On Thursday 02 October 2008 14:29, Jim Idle wrote:
> > > Have you tried:
> > >
> > >
> > > o : v1=nextrule
> > >           (
> > >               (Or v2+=nextrule )+ ->^(OR $v1 $v2+)
> > >
> > >             | // No OR's, default tree
> > >
> > >           )
> > >     ;
> > >
> > >
> > > Or something similar?
> >
> > Well, it looks to me like it's very similar to what I did try, and
> > this, too, yields the
> > org.antlr.runtime.tree.RewriteEmptyStreamException.
> >
> > Whether you include an empty alternative (as you showed) or make
> > the entire sub-rule optional, as I'd tried earlier:
>
> Yeah but you are referencing the rule itself there. If you get a
> rewrite exception then it could be a bug. I will try a small example
> - if htat works, then perhaps your lower down rules are returning
> empty trees in cases of error or something way.

I'm sure the more deeply nested rules aren't returning empty trees, 
because they're the same rules I use to successfully produce the fully 
nested trees I'm trying to avoid.


Randall Schulz

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to