Checking Grammatical Complexity