Gavin, Thanks for the suggestion. The parser strategy may be too complicated for me, but at least I have some ideas about how it can be done now.
-Ernest -----Original Message----- From: Gavin Lambert [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2008 3:16 PM To: Ernest Pasour; [EMAIL PROTECTED] Subject: Re: [antlr-interest] running a second lexer on unbounded input At 08:52 3/12/2008, Ernest Pasour wrote: >I have been working with a grammar for ActionScript, which is a >rather freeform language. One expression type that is allowed in >the source code is raw xml. For instance, the following code is >legal: > >var x:XML=<a> > </a>; If you can detect the use of XML purely at the lexer level, then you can use a lexer "island grammar" -- see the ANTLR example grammars for more info. If you can't detect it until it reaches the parser, then things get a lot more complicated, but have a look here: <<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 -~----------~----~----~----~------~----~------~--~---
