First thanks for a great project. Its definitely one of the open source projects I use the most.
I was just looking at how Irony operates and I noticed something strange. When Parser object is instantiated I also add my grammar, so like:
var myGrammar = new Parser(new MyGrammar());
Constructor then somewhere in the background uses SymbolTable class to add symbols. It has a static property Symbols of the same type.
Then when I parse text like:
It again uses SymoblTable, but the problem is that all identifiers are also added to the symbol dictionary, which is static.
For example in IdentifierTerminal.cs file there is a method QuickParse and at the end there is the following line
token.Symbol = SymbolTable.Symbols.TextToSymbol(token.ValueString);
Shouldn't this be
token.Symbol = SymbolTable.Symbols.FindSymbol(token.ValueString);
I wanted to create a fix, but I have so little knowledge about how its written I figured I'd rather ask if this is intended or if its a bug.
It feels strange that symbols are mixed with the query text. The biggest problem is that since it is static this is never collected until the app is closed. So if I parse a lot of text I will end up with a huge static dictionary.
Thanks for a great project.