A question about Tokens
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Clarke
Posted On:   Tuesday, July 2, 2002 01:14 PM

In my Lexer I create a token
using my own custom Token Class. This class has some custom methods in it
(eg getAttributes - returns a Hashtable). However I don't know how to access
these methods from my parser.

How can I access methods from a custom
Token Class in my parser ?

I would be grateful for all advice
offered.

John

Some suggestions.

Posted By:   Jeffrey_Law  
Posted On:   Thursday, July 4, 2002 02:02 AM

Hi. Why dun you create a separate class outside your class lexer and use that class instead. In this way, both the lexer and parser can access methods in that class?

Just a suggestion. I am not sure if this helps.

May i also ask what is the custom Token Class for?
About | Sitemap | Contact