On Fri, Oct 16, 2009 at 4:39 AM, Naveen Chawla
<naveen.c...@googlemail.com> wrote:
> So, does anybody have a way of doing "Take *a* IF not followed by *b* (both
> syntactic constructs)" ?
>
> i.e.
> q: (a !b)=> a;                        //("!" or "not" doesn't exist in
> ANTLR)

I think that would be a nice syntax for ANTLR to support.

I would guess that you could generally accomplish the same thing by
placing the "opposite" syntactic predicate on your other
alternative(s) in your production.  In other words:

(a b)=> alternative_1
| alternative_2 ...

Rather than:

(a !b)=> alternative_2
| alternative_1

--
Kaleb Pederson
Twitter - http://twitter.com/kalebpederson
Blog - http://kalebpederson.com

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/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 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to