Added 'getGrammar' function to compute full definitions from the type
checker's configuration.
Added some tests.