At 22:09 11/02/2009, Liviu U wrote:
 >Is there a way to specify:
 >
 >rule
 >: BEGIN   ANY* END;
 >?

Either:

rule
   : BEGIN .* END
   ;

Or (more explicitly):

rule
   : BEGIN (~END)* END
   ;

(ANTLR is normally smart enough to compile the first as if it were 
the second, provided that your end-phrase is inline and fairly 
simple.)

Note however that at parser level this will still create tokens 
for everything between BEGIN and END.  If you don't want to do 
that, then you'll have to create a lexer rule that smooshes 
everything into one token -- but then that'll take out all of 
them, not just at one particular context level.


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 [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