I want to exclude some keywords from my variable token My variable token is:
variable [a-z|A-Z]+[a-z|A-Z|0-9]*
and Keyword is:
Datatype "int"|"double"|"char"|"void"
KEYWORD "include"|"define"|{Datatype}|"return"|"if"|"else"|"elif"|"loop"|"while"|"run"|"new"
I tried to use {variable}^{KEYWORD} , ^{KEYWORD}{variable} but it's not working
I want to make variable token such a way that it cant generate anything from KEYWORD. How to do that..
I couldn't find a flex way to solve this . So i ran a function to get words in a string and then checked them with keywords for match.
iskeyword function ::