dmt: Python-like indentation in D programming language
Abdulhaq
alynch4047 at gmail.com
Tue Mar 29 08:49:16 UTC 2022
On Monday, 28 March 2022 at 22:22:18 UTC, mw wrote:
>
> Just FYI: I found a working Python PEG grammar file here
>
> https://github.com/we-like-parsers/pegen/blob/main/data/python.gram
>
> it will be a great helper to to trans-compile Python to D.
>
>
> E.g. to try parse Python code and execute the parsed code:
>
> ```
> git clone https://github.com/we-like-parsers/pegen
> cd pegen
> make demo
> ```
>
> (I did that PR :-)
Transcompilers are fun, but a heads-up before you get too
invested in this, you'll either need to restrict the python code
to a particular subset of python, or accept that you'll be
writing a python interpreter in D, and not transpiling.
More information about the Digitalmars-d-announce
mailing list