formal grammars