[antlr-interest] ANTLR3 Nested parser

Bertalan Fodor (LilyPondTool) lilypondtool at organum.hu
Tue Jan 22 01:34:45 PST 2008


> END     : '*/' {token = Token.EOF_TOKEN;}
>           {System.out.println("exit javadoc");}
>         ;
Thank you! I can't try this now but I think that EOF_TOKEN emitting does 
the trick. I don't know how I didn't find this island-grammar example 
(perhaps I was looking for the words nested, tokenstreamselector and so).

Bert
>
> Your code in the outer lexer looks OK, just passing the same input 
> stream should keep it synched. Check your code for exiting the inner 
> lexer.
>
> Tom.


More information about the antlr-interest mailing list