[antlr-interest] Re: Token Streams, multiple lexers - how does lexer access selector?

Ric Klaren klaren at cs.utwente.nl
Thu Dec 19 07:21:57 PST 2002


Hi,

On Thu, Dec 19, 2002 at 03:15:49PM -0000, davidjpenton2002 <djplists at arrowsash.com> wrote:
> Is it "safe" to push and pop lexers using a selector object (as in
> the example in the ref manual) from within a parser action instead of 
> from within a lexer rule?

It's unsafe to do from parser. In some situations you might get away with
it, but it's something that will break very easily. Think guns and feet
with holes in them.

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
 "Don't call me stupid." "Oh, right. To call you stupid would be an insult
    to stupid people. I've known sheep that could outwit you! I've worn
              dresses with higher IQs!" --- A Fish Called Wanda


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list