I am looking for a Mono/.NET expression parser generator. It must be an open-source project that I can use in MIT-licensed projects. It should be able to process a syntax description for expressions (of the complexity of arithmetic expressions) and generate a parser written in C# that outputs a custom object tree.
The expression parser should fulfill the following requirements:
- It must not be an abandoned or an experimental project, but something stable and active.
- The target project that will contain the generated parser must not require any additional dependencies (assemblies to reference etc.) for the parser code to work.
Some background on the second requirement
I am developing a reusable library. I would prefer that library to be "self-contained", so using my library does not result in also pulling a pile of other assemblies into the set of files to deploy.
The core features of the library should be directly usable without any additional configuration or setup code. One of the core features involves evaluating some expressions, which is what I need a parser for.
In the typical case, the core features offered by my library are used with default settings. Expressions, where present, are parsed with the built-in default parser. This should be very easy and straightforward, without any special configuration code, as implied above. It also means that at this point, I do not want to introduce a plugin-system or any such dynamic modularization that would distract from the clear and simple set of a few core features always available by default.
In some very simple cases, it is possible to use only some of the core features, but not the expression-related one. In complex cases, it is possible to use a custom expression evaluation component instead of the built-in one. In both of these cases, requiring the presence of a 3rd-party assembly that is not even used feels "wrong".
Hence my desire to avoid any additional assemblies just to make the parser code work.