I need way to match every token coming in from the lexer except one or 
two in particular.  This situation is a bit unusual, but it has to do 
with the fact that certain parsing decisions in this language cannot be 
made until semantic analysis of other parts of the code is complete; 
that is, how I choose to parse the code may vary depending upon other 
information I gather later.  In order to separate these steps cleanly, I 
simply want to parse the as-of-yet ambiguous section as a sequence of 
tokens.  (The parse is ambiguous but the lex is not.)

So here's a representative example:

program: programElement* EOF;
programElement: normal | special;
normal: 'a'..'z';
special: '<:'
     (
         special |
         ???
     )
     ':>';

In the place of the ??? above, I would like to express to ANTLR that it 
should accept ANY token which is not '<:' or ':>'.  Any suggestions?

Thanks!

- Zach

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