How to emit a fake token from the lexer
1 posts in topic
Flat View  Flat View

Posted By:   Dmitry_Kakurin
Posted On:   Friday, July 25, 2003 04:15 PM

I'm using single parser with multiple lexers.
I want each lexer to emit a fake token in the begining to help the parser.

How do I do that ?

Re: How to emit a fake token from the lexer

Posted By:   Monty_Zukowski  
Posted On:   Monday, July 28, 2003 08:42 AM

You will have to subclass your generated lexer and override nextToken() to provide that behavior. Or you could delegate that responsibility. The main thing is that the interface between parser and lexer is one method called nextToken(), and that's what you have to implement to get the functionality you want.
About | Sitemap | Contact