Recommendations on porting Python to D

mw mingwu at gmail.com
Thu Apr 25 16:57:53 UTC 2024


On Wednesday, 24 April 2024 at 22:07:41 UTC, Chris Piker wrote:

> Python-AST to D source converter may already exist?

https://github.com/joortcom/eiffel_rename/tree/main/yi

A rudimentary converter from (extended) Python to D. Maybe you 
can use it as a starting point.

It uses: PEG parser generator for (standard) Python (to extend 
Python syntax):

https://github.com/we-like-parsers/pegen



Another thing you can try (but both the Python-like syntax and 
parser is home-made I think):

dmt is a converter (offline or auto-invoking compiler after 
conversion) from Python-like indention style to curly braces for 
D programming language.

https://github.com/baryluk/dmt

ref:

https://forum.dlang.org/thread/vtftlolshtrtwhlhgubn@forum.dlang.org?page=1


More information about the Digitalmars-d-learn mailing list