public Grammar CreateGrammar()
{
/*
* We need to lock here in order to support concurrency, which could cause problems
* because of the usage of the static CurrentGrammar of Irony during the construction of the grammar.
* */
lock (Grammar.GrammarCreationLock)
{
return (Grammar)Activator.CreateInstance(GrammarType);
}
}