Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate and parse Python code from C# application

I need to generate Python code to be more specific IronPyton. I also need to be able to parse the code and to load it into AST. I just started looking at some tools. I played with "Oslo" and made a decision that it's not the right tool for me. I just looked very briefly at Coco/R and it looks promising.

Does anyone use Coco/R? If you did what's your experience with the tool Can you recommend some other tool?

like image 950
Vadim Avatar asked Sep 16 '09 13:09

Vadim


2 Answers

The IronPython implementation itself includes a parser and an AST representation of Python programs which can be walked with a PythonWalker.

like image 182
dtb Avatar answered Sep 21 '22 06:09

dtb


Not really my area of expertise but you might want to try ANTLR 4. It has support for generating Python 2 and Python 3.

like image 31
Richard Nienaber Avatar answered Sep 21 '22 06:09

Richard Nienaber