> That seems suspicious. Are you sure that no alternative is
> disabled? Do you use backtracking for convenience? There is a
> tutorial which describes the removal of global backtracking
> on the wiki.

I don't know what it means for "no alternative to be disabled."

Here are my grammar options:


> >
> > Here's the one that is giving me trouble:
> ...
> > When I look at this rule in ANTLRworks, it says that the production
> > for commonObjectBodyElement corresponds to the semantic predicate
> > {synpred20_vscript}?.
> >
> > That generated code looks like this:
> ...
> > This obviously doesn't compile since it refers to an argument of a
> > parent rule (which is not part of the current context).
> >
> > Is this an ANTLR bug or a user bug?
> >
> > In any case, how can I refactor my grammar to avoid this situation
> > (and generate a parser which will compile)?
> >
> It's a user bug. Arguments and predicates don't mix. Use
> scopes instead like this.
>
> rule a
> scope {
> int i;
> }
>    : (pred)=> y {$a::i = 3;}
>    ;
>
> Johannes
>

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 [email protected]
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