Grammars and rewriting systems Theory of computing mathematics