I was trying to do it but stumbled upon another tool called ANTLR…it seems to do wonders tried out with the bundled example and still in the process to understand it. Do you have any idea about it? There is a plugin for netbeans available

i am sorry but your solution is not at all clear to me ,how can you find the lex file in netbeans project as you mention….. From NetBeans –> Projects Side Tab –> right click on the lex file –> Properties: can you please give clear explanation to this ,i will be thankful to you.