Generates LR(1) parsing table and lexer from a grammar definition file. Includes parser and lexer classes which can be constructed from the generated parsing table and used to build a syntax tree for a given plaintext. Supports easy compilation of the syntax tree into a custom object graph,...
More information
GDShrapt.Reader is .Net library and object-oriented one-pass parser of GDScript. It can build a lexical tree of GDScript code or generate a new code from scratch.
Is free to use.
Usage: Just create GDScriptReader instance and call methods from it.
Rexer is an awesome regex lexer library that fulfills your needs easily!
It's also open-source so if you ever find a bug, you can fix it(and make a pull request on the Github.)
The functions and classes are all well documented so you will not have much trouble settings things up.
Alternatively...
More information