Background
I want to be able to parse Javascript source in a Delphi Application. I need to be able to identify variables and functions within the source for the purpose of making changes to the code through later code. I understand that I probably need to use a lexer for this purpose but have not had much luck using the lexer which I found (Dyaclexx).
Question
Is there a suitable freeware or open source delphi parser/lexer which already has token sets for Javascript or could be easily modified for this purpose without too much trouble?
If there isn't such a tool already available then what would be the best way to learn about writing your own lexer for this purpose?
Thank-you