Lexer rule can I create a token by doing a dynamic lookup of a list of values?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Archana_Vembakam
Posted On:   Tuesday, July 24, 2007 02:29 PM


Lexer rule can I create a token by doing a dynamic lookup of a list of values?
eg

CHEMICALNAME: {getAllChemicalNames());

Here if the string passed in is A LIQUID HYDROGEN PUMP then after processing 'A' LIQUID HYDROGEN should be a single token as getChemicalNames() is a list which contains liquid hydrogen.

How do I populate a list of literals which is dynamic so that if it occurs in a string it is considered as a single token?

About | Sitemap | Contact