At 16:54 1/10/2008, Wayne Venables wrote:
 >In ANTLR3, how do I get the parser to switch to a new lexer
 >in the middle of the processing and then retry the match?  Or
 >is there a different/better way of handling this in ANTLR3?
 >I'm using the CSharp target.  So far I haven't had any luck
 >with the book, the online manuals, or google.

If you can unambiguously detect that you need to switch over while 
in the lexer, then you can have a look at the 'island-grammar' 
example in the ANTLR examples pack.  This is by far the simplest 
method.

If things are sufficiently ambiguous that you can't decide until 
the parser, then have a look at this:
   
<<http://www.antlr.org/wiki/display/ANTLR3/Island+Grammars+Under+Parser+Control>http://www.antlr.org/wiki/display/ANTLR3/Island+Grammars+Under+Parser+Control>


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