A survey of formal grammars and algorithms for recognition and transformation in mechanical translation